VOXL2-Mini J19 devices
-
Hi, I'm interfacing with the qrb5165-io library to access the UART/I2C connectors for external sensors. I know that the UART ones such as QUP2, QUP6, and QUP7 can just be accessed by passing in their respective enum into
voxl_uart_init()
, but I was wondering which devices they are mapped to in dev/, i.e. the J10 port is mapped to dev/ttyHS0. Thanks for the help. -
Please note that currently qrb5165-io library only allows access to a single uart device, you cannot run it concurrently on multiple devices. Additionally, you cannot run qrb5165-io concurrently with PX4 (PX4 can access the uart ports concurrently)
The uart device numbers correspond to the
QUP_SSCx
number (where x is the uart bus number), you can review the pin definitions with pin names here : https://docs.modalai.com/voxl2-mini-connectors/#j19---external-sensors-2x-uart-2x-i2c. so, for example, J19 pins 7 and 8 are UART2 TX and RX.The UART, I2C, SPI ports that are connected to the DSP (aka SSC, aka SLPI) are not exposed on the file system in /dev/
Alex
-
Thanks for getting back to me. So when you say that "Please note that currently qrb5165-io library only allows access to a single uart device, you cannot run it concurrently on multiple devices", it means that I can't be reading/writing from let's say /dev/ttyHS0 and QUP6 at the same time? Or the ports connected to the DSP, i.e. I can't do QUP6 and QUP7 at the same time? My current work involves building a program/service that runs on the VOXL-2 mini at startup. It will use the qrb5165-io library to read/write serial data to/from connections at each serial port and set up a running TCP socket for each of them that I can read/write serial data on those ports from other devices that will connect to that socket over ethernet. Are you saying that this is not possible?
-
@voxluser12341 , the qrb5165-io limitation only concerns the UARTs that are connected to the DSP, so SSC_QUP2, SSC_QUP6, SSC_QUP7 (dsp uarts 2,6,7).
The limitation does not apply to any Application Processor (APPS_QUP) ports which show up as
/dev/ttyHSx
qrb5165-io library could be extended to support multiple concurrent ports, but we have not done that yet, unfortunately.
Alex
-
@Alex-Kushleyev I am wondering how I could map QUP2 VOXL2 J18, VOXL2 to work with the voxl-microdds-agent .service script that normally starts up in UDP.
ExecStart=/usr/bin/MicroXRCEAgent udp4 -p 8888
I want to change it to read from the J18 port on VOXL2 which has access via the Apps Proc as I am connected to it with an external FC (the FCv2). I know it would work on the /ttyHS1 with my UART expansion board but that is dedicated to a different motor controller board so i cant use that one unfortunately. Since I have voxl-px4 disabled there should be something I can put in this service script that would allow the microdds agent to read the uORB topics in PX4. Let me know if you have any suggestions.
-
@Gary-Holmgren I'm thinking you could write a program that uses libqrb5165-io to communicate via the UART on J18 and then expose the traffic on UDP on the applications processor. Sort of like a bridge application.
-
Our
voxl-esc
tools use a python wrapper aroundqrb5165-io
library, which is pretty easy to use. The wrapper provides an api that is almost the same as the standard serial port class in python : https://gitlab.com/voxl-public/voxl-sdk/utilities/voxl-esc/-/blob/master/voxl-esc-tools/voxl_serial.py. The usage of this wrapper can be seen here : https://gitlab.com/voxl-public/voxl-sdk/utilities/voxl-esc/-/blob/master/voxl-esc-tools/voxl-esc-neopixel-test.py?ref_type=heads#L114 . You should use the port name such as/dev/slpi-uart-2
, which is a fake name (it does not exist in the Linux /dev/ folder) but the wrapper class will extract the port index at the end. Technically any name with-2
at the end will tellVoxlSerialPort
class to use the DSP's uart port 2.You could write a service that uses a python3 script to comunicate with the serial port and expose the data via UDP using other python tools.
The limitation of only one concurrent DSP uart port usage still applies here.
Alex