I’m trying to use the Trek1000 system with a Raspberry Pi. All I want to do is log the data coming from the rangers, similar to what the executable gui does on a Windows desktop. Is there a simple way to open a serial connection between the Pi and the ranger’s without significant rewriting of the source code? Where should I be looking to make these changes; deca_device.c?
Also, can you log this data from the tag, and not anchor 0? The tag will be flown on a UAV with the Pi, making data retrieval from the tag the more convenient method.
Find attached a description of connecting of an EVB1000 to External control. These description will also be added as an appendix in an updated EVK user manual, to be release end this month.
Attached in the zip file also the port.c, deca_spi.c and deca_sleep.c which you’d need to compile the EVM Arm SW again.
This has been tested by connecting a EVB to a Raspberry Pi 3.
Further more attached also some SPI transaction examples as an aid to develop your own program.
In TREK all calculations are done by A0, for you to hav this done by the anchor you’d need to change the software to support that., or as a proof of concept you send A0 in the air and have TAG 0 (and other nodes) on the ground.
• Using the raspberry pi as one of the EVB, with the SPI on J6: one should only modify platform files.
o deca_spi.c : functions “SPI_Configuration”, “writetospi” and “readfromspi”
o port.c : functions “spi_set_rate_low” and “spi_set_rate_high”,
o deca_sleep.c : functions “sleep_ms”
Will I need to alter the Deca firmware at all? Are the x-y-z calculations made on A0 automatically published on the SPI protocol and can I just establish an SPI connection between A0 and the Pi? Then could I write a script on the Pi to query the correct Register ID, perhaps RX_BUFFER (as per your document shared above).
I’m fairly inexperienced with SPI message transmission. Does DECAWAVE have some more in depth instructionals or code examples which open up an SPI connection with one of the EVB1000s?
The best option would be to “hack” the EVB1000 board operating in tag mode and add UART connections to STM32 (“green wire”) and then connect UART to RiP. Then you can modify the tag code to output the required data (ranges, etc.) over UART connection to RiP.
Focusing on getting the SPI communication to work with Anchor 0, does any firmware actually need to be modified on the EVB1000s? Can’t I just connect my Pi’s SPI related headers to J6 of the EVB, disable the EVB MCU using S2 (as per the document shared by Leo)? Then, using the wiringPi library, can I send a packet to the EVB via wiringPiSPIRW function (the message as per the second document shared by Leo)? I’m querying register ID 0x09.
I’m almost certain I’m missing integral steps in here but I’m not sure what.