ld2410 icon indicating copy to clipboard operation
ld2410 copied to clipboard

Engineering mode

Open skoona opened this issue 2 years ago • 14 comments

Added support for the commands and formatting of Engineering Data. Did not add getters to read related data at this time.

skoona avatar Nov 30 '22 21:11 skoona

PR is complete at this point

skoona avatar Dec 02 '22 16:12 skoona

Resolved merge conflict

skoona avatar Dec 05 '22 13:12 skoona

Hi, I've checked out a copy of this and had a look. I don't think I can merge it with printf in use as this will cause it to not compile for some older but still common Arduino targets, especially AVR.

One of my own use cases is to use an old AVR Arduino as an I2C peripheral with a LD2410 connected where I'm already out of UARTs on the main microcontroller in a project.

You've tidied up a lot of my messy repetition though, thanks.

ncmreynolds avatar Dec 06 '22 22:12 ncmreynolds

I get printf, but does snprintf() also cause any issues for you.

Standby, I've got more improvements to add, and I was thinking of having methods build a composite string for output vs the Stream.print method. This will allow the methods to handle the string output easier.

give me a few days to look this over.

skoona avatar Dec 07 '22 04:12 skoona

This last commit removed the printf and snprintf functions. I implemented all the commands from the LD2410 specification doc, and added some comments. The specs say command-mode once entered will support multiple follow on commands unless a command ends in error. I added user methods to begin/end command mode to allow this multiple command feature.

The advanced example is essentially my Skn2410 program which uses UDP to send reading to SerialStudio and allow configuration of the LD2410 over UDP. To test configure path you could use this command: "nc -u 8091", and issue "help" to get the menu of commands available.

The library code itself does not use printf or snprintf functions (there were only 4), so we should be fine.

Let me know if you see any other issues.

skoona avatar Dec 07 '22 14:12 skoona

Thanks, I'll grab this and test it with a sensor.

On Wed, 7 Dec 2022 at 14:26, James Scott, Jr @.***> wrote:

This last commit removed the printf and snprintf functions. I implemented all the commands from the LD2410 specification doc, and added some comments. The specs say command-mode once entered will support multiple follow on commands unless a command ends in error. I added user methods to begin/end command mode to allow this multiple command feature.

The advanced example is essentially my Skn2410 program which uses UDP to send reading to SerialStudio and allow configuration of the LD2410 over UDP. To test configure path you could use this command: "nc -u 8091", and issue "help" to get the menu of commands available.

The library code itself does not use printf or snprintf functions (there were only 4), so we should be fine.

Let me know if you see any other issues.

— Reply to this email directly, view it on GitHub https://github.com/ncmreynolds/ld2410/pull/3#issuecomment-1341045472, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABOP5GD23BG4RWFQSSKJPL3WMCNB7ANCNFSM6AAAAAASQDBOCA . You are receiving this because you commented.Message ID: @.***>

-- Nick Reynolds - 950SM|620SC

ncmreynolds avatar Dec 07 '22 14:12 ncmreynolds

The full netstat command is "nc -u SerialStudioIPAddress 8091", where SerialStudioIPAddress is the address of the machine running SerailStudio.

skoona avatar Dec 07 '22 16:12 skoona

I had left an earlier remark about the parsing of the "energy" data which I realize was the result of my taking a trip down the wrong rabbit hole. Disregard, should you have already seen it. This is great work!

PhilF66 avatar Dec 12 '22 03:12 PhilF66

Have you finished making changes to the pull request for now? I've not properly reviewed it yet as you seem to keep making small changes.

On Mon, 12 Dec 2022 at 03:42, Phil French @.***> wrote:

I had left an earlier remark about the parsing of the "energy" data which I realize was the result of my taking a trip down the wrong rabbit hole. Disregard, should you have already seen it. This is great work!

— Reply to this email directly, view it on GitHub https://github.com/ncmreynolds/ld2410/pull/3#issuecomment-1345826191, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABOP5GEXZ47MA6HV376GBADWM2NJ3ANCNFSM6AAAAAASQDBOCA . You are receiving this because you commented.Message ID: @.***>

-- Nick Reynolds - 950SM|620SC

ncmreynolds avatar Dec 12 '22 10:12 ncmreynolds

Yes, I'm finished

skoona avatar Dec 20 '22 20:12 skoona

hi! basically this will expose the energy levels of the 9 gates that are 75 cms away yes? @skoona

@ncmreynolds any reason this was not merged? found something wrong? (I wonder if I should use this version of try to work on the original)

eried avatar Feb 27 '23 11:02 eried

hi! basically this will expose the energy levels of the 9 gates that are 75 cms away yes? @skoona

@ncmreynolds any reason this was not merged? found something wrong? (I wonder if I should use this version of try to work on the original)

This PR has a massive amount of changes in one go and I've struggled to find time to meaningfully review it because of this.

I've just checked out this PR and tested it with a sensor and it seems to report incorrect values. In the basic example it constantly shows a stationary target at 0cm. Only occasionally shows a believable reading for the stationary target. Moving targets seem OK.

I can't merge this as it stands.

ncmreynolds avatar Feb 28 '23 19:02 ncmreynolds

There is lots of good work in this PR and I am likely to manually add some of it to the main branch, but as mentioned I can't merge it as it stands.

ncmreynolds avatar Mar 01 '23 13:03 ncmreynolds

yeah I understand. I feel the documentation of the protocol is quite cryptic for this mode, it would be so easy for them to just explain it better with an example (I know there is an example but not labelled)

eried avatar Mar 01 '23 15:03 eried