Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Collapse
Brand Logo

ModalAI Forum

  1. ModalAI Support Forum
  2. VOXL Compute & Autopilot
  3. VOXL 2
  4. Connect the VOXL 2 I/O using the UART port on the 5G modem

Connect the VOXL 2 I/O using the UART port on the 5G modem

Scheduled Pinned Locked Moved VOXL 2
29 Posts 6 Posters 7.1k Views 3 Watching
  • 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.
  • X xav04

    @tom Thanks! I followed the instructions, but the Voxl 2 I/O is still in waiting mode. This is a screenshot of the voxl-mavlink-server.conf file and the voxl-mavlink-server status, it's enable and running. Please let me know how to fix this.

    I'm using voxl-suite: 0.9.5

    Mavlink.JPG

    tomT Offline
    tomT Offline
    tom
    admin
    wrote on last edited by
    #5

    @xav04 You may find some helpful info here:

    https://docs.modalai.com/voxl2-io-user-guide/
    https://docs.modalai.com/voxl2-io-developer-guide/

    X 2 Replies Last reply
    0
    • tomT tom

      @xav04 You may find some helpful info here:

      https://docs.modalai.com/voxl2-io-user-guide/
      https://docs.modalai.com/voxl2-io-developer-guide/

      X Offline
      X Offline
      xav04
      Contributor
      wrote on last edited by xav04
      #6

      @tom I was able to connect Voxl 2 I/O using the J19 UART on Voxl 2 (proving that the Voxl I/O works), but none of the devices I've tried connecting to the J9 port on the 5G modem have worked so far. The problem is "how to connect any device to J9 port on the 5G modem"

      1 Reply Last reply
      0
      • tomT tom

        @xav04 You may find some helpful info here:

        https://docs.modalai.com/voxl2-io-user-guide/
        https://docs.modalai.com/voxl2-io-developer-guide/

        X Offline
        X Offline
        xav04
        Contributor
        wrote on last edited by
        #7

        @tom Any advice? I still can't connect any device to the J9 UART port in the 5G modem

        1 Reply Last reply
        0
        • X Offline
          X Offline
          xav04
          Contributor
          wrote on last edited by
          #8

          @Eric-Katzfey Hi, just wanted to ask if you can help me to connect VOXL 2 I/O or any other device that uses a UART port to the J9 on the 5G modem.

          S 1 Reply Last reply
          0
          • X xav04

            @Eric-Katzfey Hi, just wanted to ask if you can help me to connect VOXL 2 I/O or any other device that uses a UART port to the J9 on the 5G modem.

            S Offline
            S Offline
            SMRazaRizvi
            Regular
            wrote on last edited by
            #9

            @xav04 Is there any update on this? I am also trying to connect an RTK GPS using the J9 UART Port on the 5G modem, but no luck still..

            Alex KushleyevA 1 Reply Last reply
            0
            • S SMRazaRizvi

              @xav04 Is there any update on this? I am also trying to connect an RTK GPS using the J9 UART Port on the 5G modem, but no luck still..

              Alex KushleyevA Online
              Alex KushleyevA Online
              Alex Kushleyev
              ModalAI Team
              wrote on last edited by Alex Kushleyev
              #10

              @SMRazaRizvi

              the following docs page (https://docs.modalai.com/voxl2-external-flight-controller/#using-m2-5g-modem-addon-board-m0090) shows you how to physically connect a UART device to J9 of M0090 board.

              The corresponding UART port is mapped to CPU (not DSP where PX4 is running), and can be accessed using /dev/ttyHS2

              Your GPS driver would need to run on the CPU.

              if you know the baud rate of your GPS device and the GPS device sends out data by default once it is powered on, you can do a very quick test to see if anything comes into the port:

              #assuming the device uses 115200 baud rate
              stty -F /dev/ttyHS2 115200
              cat /dev/ttyHS2
              

              at this point, if there is data coming into the serial port, you should see some characters printed (ASCII or not depending on the format of incoming data).

              You can also use a tool called screen to check serial port:

              apt-get install screen
              screen /dev/ttyHS2 115200 #assuming 115200 baud rate
              #control-a-k then y to exit screen
              

              If you don't have a device that sends out data by default, you can just do a loopback test (add a jumper between TX and RX on J9 of M0090) and then use screen, if the port is working, you should see in the terminal every letter that you type on the keyboard. If you don't see anything when you type in the screen terminal, then either loopback jumper is not correctly installed or some other issue.

              S 1 Reply Last reply
              0
              • Alex KushleyevA Alex Kushleyev

                @SMRazaRizvi

                the following docs page (https://docs.modalai.com/voxl2-external-flight-controller/#using-m2-5g-modem-addon-board-m0090) shows you how to physically connect a UART device to J9 of M0090 board.

                The corresponding UART port is mapped to CPU (not DSP where PX4 is running), and can be accessed using /dev/ttyHS2

                Your GPS driver would need to run on the CPU.

                if you know the baud rate of your GPS device and the GPS device sends out data by default once it is powered on, you can do a very quick test to see if anything comes into the port:

                #assuming the device uses 115200 baud rate
                stty -F /dev/ttyHS2 115200
                cat /dev/ttyHS2
                

                at this point, if there is data coming into the serial port, you should see some characters printed (ASCII or not depending on the format of incoming data).

                You can also use a tool called screen to check serial port:

                apt-get install screen
                screen /dev/ttyHS2 115200 #assuming 115200 baud rate
                #control-a-k then y to exit screen
                

                If you don't have a device that sends out data by default, you can just do a loopback test (add a jumper between TX and RX on J9 of M0090) and then use screen, if the port is working, you should see in the terminal every letter that you type on the keyboard. If you don't see anything when you type in the screen terminal, then either loopback jumper is not correctly installed or some other issue.

                S Offline
                S Offline
                SMRazaRizvi
                Regular
                wrote on last edited by
                #11

                @Alex-Kushleyev Thank you so much Alex!
                I can see data coming in on the port using screen.

                Now, how can I ask the PX4 to use this GPS data?

                Alex KushleyevA Eric KatzfeyE 2 Replies Last reply
                0
                • S SMRazaRizvi

                  @Alex-Kushleyev Thank you so much Alex!
                  I can see data coming in on the port using screen.

                  Now, how can I ask the PX4 to use this GPS data?

                  Alex KushleyevA Online
                  Alex KushleyevA Online
                  Alex Kushleyev
                  ModalAI Team
                  wrote on last edited by
                  #12

                  @SMRazaRizvi ,

                  On VOXL2, the majority of PX4 software is running on the DSP, so the GPS driver is set up to run on DSP and access the UART ports available to the DSP only.

                  Have you considered using our suggested configuration described here https://docs.modalai.com/voxl2-guides-onboard-offboard-sensors/#external-gps-mag--gnss ?

                  I will double check, but I do not think that we support running the GPS driver for PX4 on CPU.

                  1 Reply Last reply
                  0
                  • S SMRazaRizvi

                    @Alex-Kushleyev Thank you so much Alex!
                    I can see data coming in on the port using screen.

                    Now, how can I ask the PX4 to use this GPS data?

                    Eric KatzfeyE Online
                    Eric KatzfeyE Online
                    Eric Katzfey
                    ModalAI Team
                    wrote on last edited by
                    #13

                    @SMRazaRizvi Yes, you can run GPS driver on the apps processor for px4. Take a look at the file /usr/bin/voxl-px4-start. You can see in that file (a bash script) where the gps start command is issued. You can see that if the board is detected to be an RB5 (M0052) it will use gps start -d /dev/ttyHS2 to start the driver on the apps side and not the DSP side. So you will have to modify that file.

                    1 Reply Last reply
                    1
                    • S Offline
                      S Offline
                      SMRazaRizvi
                      Regular
                      wrote on last edited by
                      #14

                      Thanks @Alex-Kushleyev and @Eric-Katzfey

                      To avoid the complexity, I've now connected my RTK-GPS to the configuration described here: https://docs.modalai.com/voxl2-guides-onboard-offboard-sensors/#external-gps-mag--gnss

                      I'm getting the coordinate position and I am now in the process of setting the correct parameters to be set for the new GPS.

                      To confirm, I only have to adjust PX4 parameters, right?

                      Eric KatzfeyE 1 Reply Last reply
                      0
                      • S SMRazaRizvi

                        Thanks @Alex-Kushleyev and @Eric-Katzfey

                        To avoid the complexity, I've now connected my RTK-GPS to the configuration described here: https://docs.modalai.com/voxl2-guides-onboard-offboard-sensors/#external-gps-mag--gnss

                        I'm getting the coordinate position and I am now in the process of setting the correct parameters to be set for the new GPS.

                        To confirm, I only have to adjust PX4 parameters, right?

                        Eric KatzfeyE Online
                        Eric KatzfeyE Online
                        Eric Katzfey
                        ModalAI Team
                        wrote on last edited by
                        #15

                        @SMRazaRizvi We have not integrated an RTK GPS receiver before so cannot comment on the steps needed to get it working properly. Perhaps the manufacturer of the RTK GPS unit can provide some guidance on how to use it with PX4? Or the PX4 community? But if you are seeing valid data from the unit then at least the hardware seems to be connected properly.

                        S V 2 Replies Last reply
                        0
                        • Eric KatzfeyE Eric Katzfey

                          @SMRazaRizvi We have not integrated an RTK GPS receiver before so cannot comment on the steps needed to get it working properly. Perhaps the manufacturer of the RTK GPS unit can provide some guidance on how to use it with PX4? Or the PX4 community? But if you are seeing valid data from the unit then at least the hardware seems to be connected properly.

                          S Offline
                          S Offline
                          SMRazaRizvi
                          Regular
                          wrote on last edited by
                          #16

                          @Eric-Katzfey I see.

                          Actually connecting my RTK-GPS to the configuration described here: https://docs.modalai.com/voxl2-guides-onboard-offboard-sensors/#external-gps-mag--gnss was not giving me RTK corrections so I am now using the J9 connector on the 5G modem, and that works fine.

                          But another problem that I am facing is Compass Sensor 0 missing.
                          Do you think there's some setting of the default compass that was being picked up by PX4 with the M8N GPS that came with the drone? Where can I configure the compass?

                          Alex KushleyevA 1 Reply Last reply
                          0
                          • S SMRazaRizvi

                            @Eric-Katzfey I see.

                            Actually connecting my RTK-GPS to the configuration described here: https://docs.modalai.com/voxl2-guides-onboard-offboard-sensors/#external-gps-mag--gnss was not giving me RTK corrections so I am now using the J9 connector on the 5G modem, and that works fine.

                            But another problem that I am facing is Compass Sensor 0 missing.
                            Do you think there's some setting of the default compass that was being picked up by PX4 with the M8N GPS that came with the drone? Where can I configure the compass?

                            Alex KushleyevA Online
                            Alex KushleyevA Online
                            Alex Kushleyev
                            ModalAI Team
                            wrote on last edited by
                            #17

                            @SMRazaRizvi ,

                            compass driver is started inside the voxl-px4 start-up script : /usr/bin/voxl-px4-start

                            # Auto detect the magnetometer. If one or both of these devices
                            # are not connected it will fail but not cause any harm.
                            /bin/echo "Looking for qmc5883l magnetometer"
                            qshell qmc5883l start -R 10 -X -b 1
                            /bin/echo "Looking for ist8310 magnetometer"
                            qshell ist8310 start -R 10 -X -b 1
                            

                            please note that both of these drivers are expecting the compass to be connected to the DSP i2c ports. We currently don't have compass driver that can run on the cpu side (unlike GPS). However, you could potentially splice the connection for GND, SDA, SCL and connect the i2c bus to J19 on VOXL2, so that you can use the DSP driver for the compass.. Is that an option for you?

                            Alex KushleyevA 1 Reply Last reply
                            0
                            • Alex KushleyevA Alex Kushleyev

                              @SMRazaRizvi ,

                              compass driver is started inside the voxl-px4 start-up script : /usr/bin/voxl-px4-start

                              # Auto detect the magnetometer. If one or both of these devices
                              # are not connected it will fail but not cause any harm.
                              /bin/echo "Looking for qmc5883l magnetometer"
                              qshell qmc5883l start -R 10 -X -b 1
                              /bin/echo "Looking for ist8310 magnetometer"
                              qshell ist8310 start -R 10 -X -b 1
                              

                              please note that both of these drivers are expecting the compass to be connected to the DSP i2c ports. We currently don't have compass driver that can run on the cpu side (unlike GPS). However, you could potentially splice the connection for GND, SDA, SCL and connect the i2c bus to J19 on VOXL2, so that you can use the DSP driver for the compass.. Is that an option for you?

                              Alex KushleyevA Online
                              Alex KushleyevA Online
                              Alex Kushleyev
                              ModalAI Team
                              wrote on last edited by
                              #18

                              Regarding the RTK corrections not working while GPS is connected to the DSP, I am assuming you have an RTK service that downloads the data from internet and sends a mavlink message with the corrections. That mavlink message needs to be consumed by the gps driver and rtk corrections forwarded to the GPS receiver via UART. If this is not happening, then perhaps the mavlink message never gets to the GPS driver inside the DSP, potentially being filtered out somewhere (mavlink manager?). I don't have deep enough knowledge there, maybe others can comment.

                              S 1 Reply Last reply
                              0
                              • Alex KushleyevA Alex Kushleyev

                                Regarding the RTK corrections not working while GPS is connected to the DSP, I am assuming you have an RTK service that downloads the data from internet and sends a mavlink message with the corrections. That mavlink message needs to be consumed by the gps driver and rtk corrections forwarded to the GPS receiver via UART. If this is not happening, then perhaps the mavlink message never gets to the GPS driver inside the DSP, potentially being filtered out somewhere (mavlink manager?). I don't have deep enough knowledge there, maybe others can comment.

                                S Offline
                                S Offline
                                SMRazaRizvi
                                Regular
                                wrote on last edited by
                                #19

                                @Alex-Kushleyev But the RTK corrections come in when I connect the RTK to the 5G modem over J9. What do you think makes a difference here?

                                Alex KushleyevA 1 Reply Last reply
                                0
                                • S SMRazaRizvi

                                  @Alex-Kushleyev But the RTK corrections come in when I connect the RTK to the 5G modem over J9. What do you think makes a difference here?

                                  Alex KushleyevA Online
                                  Alex KushleyevA Online
                                  Alex Kushleyev
                                  ModalAI Team
                                  wrote on last edited by
                                  #20

                                  @SMRazaRizvi When you connect the GPS to J9, you start the GPS driver on the cpu side, so there is probably nothing that filters out the mavlink messages with corrections between the rtk mavlink service and your gps driver.

                                  When starting GPS driver on the DSP, there may be a filter somewhere that prevents the rtk corrections mavlink message from reaching the DSP.

                                  That is my guess

                                  S 1 Reply Last reply
                                  0
                                  • Alex KushleyevA Alex Kushleyev

                                    @SMRazaRizvi When you connect the GPS to J9, you start the GPS driver on the cpu side, so there is probably nothing that filters out the mavlink messages with corrections between the rtk mavlink service and your gps driver.

                                    When starting GPS driver on the DSP, there may be a filter somewhere that prevents the rtk corrections mavlink message from reaching the DSP.

                                    That is my guess

                                    S Offline
                                    S Offline
                                    SMRazaRizvi
                                    Regular
                                    wrote on last edited by
                                    #21

                                    @Alex-Kushleyev I see.
                                    I'll try to splice the connection for GND, SDA, and SCL and connect them to the J19 on VOXL2.

                                    In this case, should the GND, SDA, and SCL pins be connected to both the J9 on the 5G modem and the J19, or just to the J19?

                                    Alex KushleyevA 1 Reply Last reply
                                    0
                                    • S SMRazaRizvi

                                      @Alex-Kushleyev I see.
                                      I'll try to splice the connection for GND, SDA, and SCL and connect them to the J19 on VOXL2.

                                      In this case, should the GND, SDA, and SCL pins be connected to both the J9 on the 5G modem and the J19, or just to the J19?

                                      Alex KushleyevA Online
                                      Alex KushleyevA Online
                                      Alex Kushleyev
                                      ModalAI Team
                                      wrote on last edited by
                                      #22

                                      @SMRazaRizvi just J19 for gnd, sda and scl.

                                      Then you still have gnd, 3.3V, rx, tx going to GPS.

                                      S 1 Reply Last reply
                                      0
                                      • Alex KushleyevA Alex Kushleyev

                                        @SMRazaRizvi just J19 for gnd, sda and scl.

                                        Then you still have gnd, 3.3V, rx, tx going to GPS.

                                        S Offline
                                        S Offline
                                        SMRazaRizvi
                                        Regular
                                        wrote on last edited by
                                        #23

                                        @Alex-Kushleyev Works like a magic!!
                                        Thank you so much 🙂

                                        Alex KushleyevA 1 Reply Last reply
                                        0
                                        • S SMRazaRizvi

                                          @Alex-Kushleyev Works like a magic!!
                                          Thank you so much 🙂

                                          Alex KushleyevA Online
                                          Alex KushleyevA Online
                                          Alex Kushleyev
                                          ModalAI Team
                                          wrote on last edited by
                                          #24

                                          @SMRazaRizvi awesome..

                                          I want to look into why running the GPS driver on the DSP did not result in RTK corrections getting through.. This would simplify your setup.

                                          Can you please help me by telling me the topic name that is published by the RTK (rtcm) publishing app? I think it is just not going through to the DSP (being filtered out) for some reason. Also, just curious what app are you using to publish the mavlink messages with RTK (rtcm) corrections?

                                          Alex

                                          S 1 Reply Last reply
                                          0

                                          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                                          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                                          With your input, this post could be even better 💗

                                          Register Login
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          ModalAI
                                          Categories Recent Tags ModalAI.com Docs
                                          © 2026 ModalAI® · Accelerating autonomy for smaller, smarter, safer drones · Powered by NodeBB
                                          • Login

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • Users
                                          • Groups