LPS Node firmware update with debug adapter kit

All discussions related to the Loco Positioning system
Post Reply
tt1739
Beginner
Posts: 3
Joined: Thu Oct 10, 2019 7:09 am

LPS Node firmware update with debug adapter kit

Post 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!
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: LPS Node firmware update with debug adapter kit

Post 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.
tt1739
Beginner
Posts: 3
Joined: Thu Oct 10, 2019 7:09 am

Re: LPS Node firmware update with debug adapter kit

Post 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?
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: LPS Node firmware update with debug adapter kit

Post 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
tt1739
Beginner
Posts: 3
Joined: Thu Oct 10, 2019 7:09 am

Re: LPS Node firmware update with debug adapter kit

Post 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.
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: LPS Node firmware update with debug adapter kit

Post 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.
Post Reply