Page 1 of 1

LPS Node firmware update with debug adapter kit

Posted: Thu Oct 10, 2019 7:54 am
by tt1739
Hi,

I have a question on using debug adapter kit to update LPS Node firmware.
As our LPS node micro USB port broke, we can not use tdoa3 which is included in firmware lately released.

So, I wonder if is it possible to update LPS node firmware using debug adapter kit
and if there is a related document to do so.

Thanks!

Re: LPS Node firmware update with debug adapter kit

Posted: Thu Oct 10, 2019 9:31 am
by arnaud
Hi,

Yes it is possible. You need to have OpenOCD as well as the required tools to compile firmware installed on your machine and the lps-node-firmware project. You can then compile the firmware with "make" and flash it using an St-Link V2 using "make flash". There is a bit of information about the build procedure and different make targets in the readme file: https://github.com/bitcraze/lps-node-fi ... ke-targets.

Re: LPS Node firmware update with debug adapter kit

Posted: Sun Oct 13, 2019 12:14 am
by tt1739
WOW!!
Thanks a lot

I've saved almost 10 anchors today : )

Can I ask one more question..?

As I mentioned, our LPS node micro USB port broke, so we cannot use LPS tool to configure or change the anchor ID.
Should I change the anchor ID number by changing LPS firmware code manually?

Re: LPS Node firmware update with debug adapter kit

Posted: Mon Oct 14, 2019 11:48 am
by arnaud
By uncomenting this line in the makefile: https://github.com/bitcraze/lps-node-fi ... akefile#L6, te node is going to use the pin header P3 named "FTDI debug" to communicate and configure the nodes, this might be a more practical option. The pin-out is the same as standard FTDI cables and the black wire position is marked on the board.

Otherwise you can hard-code values in the code. The most practical place to do it is to modify the uwbconfig structure in main where the configuration is read from the eeprom: https://github.com/bitcraze/lps-node-fi ... ain.c#L143

Re: LPS Node firmware update with debug adapter kit

Posted: Mon Oct 21, 2019 1:43 am
by tt1739
"By uncomenting this line in the makefile: https://github.com/bitcraze/lps-node-fi ... akefile#L6, te node is going to use the pin header P3 named "FTDI debug" to communicate and configure the nodes, this might be a more practical option. The pin-out is the same as standard FTDI cables and the black wire position is marked on the board."

I tried the first method you gave me (same as above).

I uncomented the #L6 and updated the lps node firmware.
Then, I used standard FTDI cable to connect node with the computer.

But the LPS tool(LPS configuration tool) does not recognize the connection with the node.

Is this a wrong way or is there any other stuff do I need to do?

Thanks.

Re: LPS Node firmware update with debug adapter kit

Posted: Mon Oct 21, 2019 2:03 pm
by arnaud
While technically possible, the lps-tool will not detect your FTDI cable as a node. The LPS tool firmware needs to be modified to use the FTDI cable and setup the right baudrate. The interesting piece of code for it is there: https://github.com/bitcraze/lps-tools/b ... tor.py#L46.

The easiest would be to use a serial terminal and to configure the node manually. You can press "h" after opening the terminal to see the possible commands.