ModalAI Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    VOXL2-Mini J19 devices

    Ask your questions right here!
    4
    7
    235
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • V
      voxluser12341
      last edited by

      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.

      Alex KushleyevA 1 Reply Last reply Reply Quote 0
      • Alex KushleyevA
        Alex Kushleyev ModalAI Team @voxluser12341
        last edited by Alex Kushleyev

        @voxluser12341 ,

        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

        V 1 Reply Last reply Reply Quote 0
        • V
          voxluser12341 @Alex Kushleyev
          last edited by voxluser12341

          @Alex-Kushleyev

          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?

          Alex KushleyevA 1 Reply Last reply Reply Quote 0
          • Alex KushleyevA
            Alex Kushleyev ModalAI Team @voxluser12341
            last edited by

            @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

            Gary HolmgrenG 1 Reply Last reply Reply Quote 0
            • Gary HolmgrenG
              Gary Holmgren @Alex Kushleyev
              last edited by

              @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.

              Eric KatzfeyE Alex KushleyevA 2 Replies Last reply Reply Quote 0
              • Eric KatzfeyE
                Eric Katzfey ModalAI Team @Gary Holmgren
                last edited by

                @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.

                1 Reply Last reply Reply Quote 0
                • Alex KushleyevA
                  Alex Kushleyev ModalAI Team @Gary Holmgren
                  last edited by

                  @Gary-Holmgren ,

                  Our voxl-esc tools use a python wrapper around qrb5165-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 tell VoxlSerialPort 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

                  1 Reply Last reply Reply Quote 1
                  • First post
                    Last post
                  Powered by NodeBB | Contributors