LPS Node sniffer UART output
Posted: Wed Apr 22, 2020 12:53 pm
Hello !
I am currently working on a project with some LPS Nodes. Our setup consists in (currently) 6 nodes functioning as TDoA3 anchors. This is working fine with a Crazyflie and a roadrunner, but we would like to use a node as a moving tag.
For that, we have configured two of them as sniffers. Our goal is to connect it to a RPI, in order to apply Kalman filter to received sniffed data.
Data retrieval is working fine from Node to RPI over Micro USB, using Python scripts included in the /lps-node-firmware/tools/sniffer directory (https://github.com/bitcraze/lps-node-firmware); it just needs some YAML installs to work fine (I've installed some libs as mentioned here : https://stackoverflow.com/questions/142 ... for-python).
So, the node is sniffer mode is working fine and we can get data over the Micro-USB port.
What we would like to do though, is to use one of the UART peripheral of the node, instead of the Micro-USB port.
As seen in the schematic (https://wiki.bitcraze.io/_media/project ... e_reve.pdf), there is two UART ports available on the Node. The one on P3 connector (FTDI), which is the USART1 of the MCU, and the EXT, which is the USART3 of the MCU.
I've read here (viewtopic.php?f=16&t=3935&p=17936&hilit ... ode#p17986) that the FTDI UART can me used by uncomenting a line in the Makefile, but I don't really know what else has to be modified in order to have the sniffed data sent over it, or even if it is possible. By using a UART to USB converter, I can create a connection between the UART and my computer, but the Node doesn't seem to send anything.
One thing that bothers me is that the .dfu file is not updated when I do a "make" with the updated Makefile., but since I'm new to this, this may be not a problem. (I use the lpstools to update the Node's firmware).
I guess maybe using the USART3 peripheral is a better idea, since I guess its availability on the PCB is here for this kind of purpose. I know a little bit about how the HAL of STM32 works, since I have a STM32F072 Nucleo board as well. I already made a simple program with STM32CubeIDE to use UART on it. But I still feel a bit lost inside the actual node firmware.
Anyway, sorry for the quite long post, and I hope someone can give me some hints on how to actually modify the firmware to use this USART3.
Cheers,
Sylvain
I am currently working on a project with some LPS Nodes. Our setup consists in (currently) 6 nodes functioning as TDoA3 anchors. This is working fine with a Crazyflie and a roadrunner, but we would like to use a node as a moving tag.
For that, we have configured two of them as sniffers. Our goal is to connect it to a RPI, in order to apply Kalman filter to received sniffed data.
Data retrieval is working fine from Node to RPI over Micro USB, using Python scripts included in the /lps-node-firmware/tools/sniffer directory (https://github.com/bitcraze/lps-node-firmware); it just needs some YAML installs to work fine (I've installed some libs as mentioned here : https://stackoverflow.com/questions/142 ... for-python).
So, the node is sniffer mode is working fine and we can get data over the Micro-USB port.
What we would like to do though, is to use one of the UART peripheral of the node, instead of the Micro-USB port.
As seen in the schematic (https://wiki.bitcraze.io/_media/project ... e_reve.pdf), there is two UART ports available on the Node. The one on P3 connector (FTDI), which is the USART1 of the MCU, and the EXT, which is the USART3 of the MCU.
I've read here (viewtopic.php?f=16&t=3935&p=17936&hilit ... ode#p17986) that the FTDI UART can me used by uncomenting a line in the Makefile, but I don't really know what else has to be modified in order to have the sniffed data sent over it, or even if it is possible. By using a UART to USB converter, I can create a connection between the UART and my computer, but the Node doesn't seem to send anything.
One thing that bothers me is that the .dfu file is not updated when I do a "make" with the updated Makefile., but since I'm new to this, this may be not a problem. (I use the lpstools to update the Node's firmware).
I guess maybe using the USART3 peripheral is a better idea, since I guess its availability on the PCB is here for this kind of purpose. I know a little bit about how the HAL of STM32 works, since I have a STM32F072 Nucleo board as well. I already made a simple program with STM32CubeIDE to use UART on it. But I still feel a bit lost inside the actual node firmware.
Anyway, sorry for the quite long post, and I hope someone can give me some hints on how to actually modify the firmware to use this USART3.
Cheers,
Sylvain