Issue with updating LPS node

All discussions related to the Loco Positioning system
ishir
Beginner
Posts: 6
Joined: Mon May 16, 2022 5:24 pm

Issue with updating LPS node

Post by ishir »

Hi!
I've just started working with the crazyflie system so I apologise if my doubts are trivial. I am working with the Loco positioning system and the issue is in the step of configuring the UWB anchors using the lps tool. Upon connecting the UWB module by pressing the DFU button (as one should do for updating the firmware), after selecting the correct file and clicking update, the cursor just goes to the id field without showing the prompt "Success!" for the update step. Here I think the modules are not getting updated as upon testing my Crazyflie was not able to communicate with the UWB anchors.

Now while trying some debugging options (I believe I just ran the tool with sudo), somehow the UWB module is frozen as even on clicking the restart button only the blue light remains on and now the update firmware option is also not available (greyed out).

Can anybody help me out here?
Thanks
kristoffer
Bitcraze
Posts: 630
Joined: Tue Jun 30, 2015 7:47 am

Re: Issue with updating LPS node

Post by kristoffer »

Hi!

It sounds like you have flashed something "bad" and that is why the node is not starting up correctly.

You start the node in DFU mode by holding the DFU button ("BTN & DFU" on the PCB) while powering it on by inserting the USB-cable, or pressing the reset button. When it start the blue POWER led should light up (some other LEDs might flash too). The good news is that entering DFU mode should always work (it is stored in ROM) and can not be over written by bad firmware or similar :-)

I suspect the problem is related to your PC/python. If you can get the LPS-tools to work it should be possible to flash the latest firmware and the node should be OK again.

Have you seen the tutorial https://www.bitcraze.io/documentation/t ... ng-system/ ?
Which OS are you using? Are you running the LPS-tools from source or the windows exe?
ishir
Beginner
Posts: 6
Joined: Mon May 16, 2022 5:24 pm

Re: Issue with updating LPS node

Post by ishir »

Hello! Thank you for replying!

Okay so I'm on Ubuntu 18.04, and I am running the LPS-tools from source ( using "python3 -m lpstools" ).
Yes, I've gone through the documentation and I was following the same steps for updating the firmware. I've basically got two problems.

1) The problem with one of my UWB modules is I am not able to exit the DFU mode. No matter if I power it while pressing the DFU button or not, it starts up in the DFU mode only and the lps-tool doesn't seem to recognize that a module has been connected. The reset button has no effect on this as no other LEDs flash when I click it and only the blue light remains on. This is even if I power the module with a 5v adapter.

2) For another UWB module, the issue is that (as I explained earlier) when I power it up in the DFU mode, the tool does detect it, then I select the latest firmware (2020.09) but after clicking update it doesn't show "Success!" and just goes to the ID field. Now is this normal, or does it mean the firmware is not actually being updated? After clicking the Update button should there be a prompt "Success!" like when we click apply (for anchor IDs)?

Thanks
kristoffer
Bitcraze
Posts: 630
Joined: Tue Jun 30, 2015 7:47 am

Re: Issue with updating LPS node

Post by kristoffer »

1) It sounds like the node might be broken. Please drop us an email on support@bitcraze.io

2) Does the progress bar update while flashing? I would expect a "Success!" in the progress bar when the flashing is finished.
Do you have more anchors and do they behave differently?
ishir
Beginner
Posts: 6
Joined: Mon May 16, 2022 5:24 pm

Re: Issue with updating LPS node

Post by ishir »

Okay I'll mail the support for the first issue.

No the progress bar does not update at all and no "Success!" prompt as well for updating the firware. Yes I have another anchor and the same behaviour is seen for that as well. Do you think the problem is with Ubuntu 18.04 ?, I might as well then update to 20.04 as I had trouble flashing the firmware using "make cloud" to the crazyflie and in one of the forums it was suggested to upgrade to 20.04 as support for 18.04 was being dropped by Bitcraze.

Thanks
kristoffer
Bitcraze
Posts: 630
Joined: Tue Jun 30, 2015 7:47 am

Re: Issue with updating LPS node

Post by kristoffer »

As all anchors are behaving the same way it does sound like the problem is related to your environment.

I think the LPS tool should work with 18.04 (it is pretty old and have not been changed in a few years) but upgrading is maybe not a bad idea anyway.

Have you checked if there is any useful information in the terminal where you started the LPS tool?
Are all access rights set up correctly? You can find instructions for linux here https://github.com/bitcraze/lps-tools#u ... t-on-linux
ishir
Beginner
Posts: 6
Joined: Mon May 16, 2022 5:24 pm

Re: Issue with updating LPS node

Post by ishir »

Yeah, I'll upgrade to 20.04 and try this out again this weekend, if I can't resolve the issue on 18.04

Also yes the access rights are set up correctly:

1. My 99-lps.rules file contains
SUBSYSTEM=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", MODE="0664", GROUP="plugdev"

2. The user "my_username" is already a member of 'dialout'. So I guess no issues here as well.

3. Upon running the lps-tools the only information in the terminal is: GtkDialog mapped without a transient parent. This is discouraged.
This I think is related to a Gnome warning and not related to lpstools.

Thanks
kimberly
Bitcraze
Posts: 1050
Joined: Fri Jul 06, 2018 11:13 am

Re: Issue with updating LPS node

Post by kimberly »

Just jumping in here. You could also first try out the Bitcraze virtual machine instead of upgrading your OS right away: https://github.com/bitcraze/bitcraze-vm. I'm not sure if the lps tool is already installed but at least you will have the right environment as it is in 20.04
kristoffer
Bitcraze
Posts: 630
Joined: Tue Jun 30, 2015 7:47 am

Re: Issue with updating LPS node

Post by kristoffer »

Try to list your USB devices to check if your computer can detect the node.
Set your node in DFU mode and then run "lsusb" in a terminal, this should produce a list of devices, the node should be something like this:
"Bus 003 Device 043: ID 0483:df11 STMicroelectronics STM Device in DFU Mode"

You can also try to run "sudo dmesg -w", it will show live information about USB when you plugin in or unplug the node, or go into DFU mode.

Starting a healthy node should look similar to this:
[338393.114993] usb 3-8.1.5.4: USB disconnect, device number 48
[338393.347656] usb 3-8.1.5.4: new full-speed USB device number 49 using xhci_hcd
[338393.449983] usb 3-8.1.5.4: New USB device found, idVendor=0483, idProduct=5740, bcdDevice= 2.00
[338393.449996] usb 3-8.1.5.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[338393.450000] usb 3-8.1.5.4: Product: Loco Positioning Node
[338393.450003] usb 3-8.1.5.4: Manufacturer: Bitcraze AB
[338393.450005] usb 3-8.1.5.4: SerialNumber: 3E002F001757344730333020
[338393.460064] cdc_acm 3-8.1.5.4:1.0: ttyACM0: USB ACM device

Entering DFU mode should look like this:
[338397.978916] usb 3-8.1.5.4: USB disconnect, device number 49
[338398.351779] usb 3-8.1.5.4: new full-speed USB device number 50 using xhci_hcd
[338398.457847] usb 3-8.1.5.4: New USB device found, idVendor=0483, idProduct=df11, bcdDevice=22.00
[338398.457857] usb 3-8.1.5.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[338398.457861] usb 3-8.1.5.4: Product: STM32 BOOTLOADER
[338398.457864] usb 3-8.1.5.4: Manufacturer: STMicroelectronics
[338398.457866] usb 3-8.1.5.4: SerialNumber: FFFFFFFEFFFF
ishir
Beginner
Posts: 6
Joined: Mon May 16, 2022 5:24 pm

Re: Issue with updating LPS node

Post by ishir »

Thank you both for replying!

So the problem, it seems, is with my system only as for both the nodes ( one with blue LED on and other where the firmware isn't getting updated ), I get the correct USB information as given in your reply. I will proceed to try the VM first (as Kimberly suggested) and then maybe update to Ubuntu 20.04 if it works. I'll keep this thread updated and close it if using 20.04 resolves the issue. Thanks again for helping out so actively.
Post Reply