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. Connecting two GPS on VOXL2

Connecting two GPS on VOXL2

Scheduled Pinned Locked Moved VOXL 2
16 Posts 2 Posters 1.5k Views 1 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.
  • ? A Former User

    @Eric-Katzfey Thank you for the update. Any quick guide for software configuration which you can suggest for this dual gps setup? My hardware connections would be as follows :

    • GPS1 on VOXL2 J19 pins 1 to 6 (UART and I2C for GPS and Mag)

    • GPS2 UART over J18 (Modalai ESC port) and I2C over J19 pins 7 and 8.

    • I have VOXL2IO also integrated over J19 10,11 and 12 number pins.

    By this configuration I can ensure all UART and I2C connections are going to DSP directly.
    Here are my queries :

    • With above mentioned connections I would have to change QUP settings in firmware I guess. Can you mention those places?

    • Can I follow this link to enable dual GPS as per PX4 mainline or is some other settings would be essential for dual GPS enabling over ModalAI PX4 version?

    Eric KatzfeyE Offline
    Eric KatzfeyE Offline
    Eric Katzfey
    ModalAI Team
    wrote on last edited by
    #7

    @Aks Those connections look reasonable. Let me do a little digging to see what would be required to use pins 7 and 8 on J19 for the new magnetometer.

    1 Reply Last reply
    0
    • ? A Former User

      @Eric-Katzfey Thank you for the update. Any quick guide for software configuration which you can suggest for this dual gps setup? My hardware connections would be as follows :

      • GPS1 on VOXL2 J19 pins 1 to 6 (UART and I2C for GPS and Mag)

      • GPS2 UART over J18 (Modalai ESC port) and I2C over J19 pins 7 and 8.

      • I have VOXL2IO also integrated over J19 10,11 and 12 number pins.

      By this configuration I can ensure all UART and I2C connections are going to DSP directly.
      Here are my queries :

      • With above mentioned connections I would have to change QUP settings in firmware I guess. Can you mention those places?

      • Can I follow this link to enable dual GPS as per PX4 mainline or is some other settings would be essential for dual GPS enabling over ModalAI PX4 version?

      Eric KatzfeyE Offline
      Eric KatzfeyE Offline
      Eric Katzfey
      ModalAI Team
      wrote on last edited by
      #8

      @Aks I looked through the code and I don't see any obvious roadblocks to using pins 7 and 8 on J19 for the second magnetometer. The current magnetometer driver uses -b 1 to specify the i2c bus on pins 4 and 5 of J19. For pins 7 and 8 I think you would need to specify -b 4. I'll try to wire something up and try it on those pins in the next couple of days.

      1 Reply Last reply
      0
      • ? A Former User

        @Eric-Katzfey Thank you for the update. Any quick guide for software configuration which you can suggest for this dual gps setup? My hardware connections would be as follows :

        • GPS1 on VOXL2 J19 pins 1 to 6 (UART and I2C for GPS and Mag)

        • GPS2 UART over J18 (Modalai ESC port) and I2C over J19 pins 7 and 8.

        • I have VOXL2IO also integrated over J19 10,11 and 12 number pins.

        By this configuration I can ensure all UART and I2C connections are going to DSP directly.
        Here are my queries :

        • With above mentioned connections I would have to change QUP settings in firmware I guess. Can you mention those places?

        • Can I follow this link to enable dual GPS as per PX4 mainline or is some other settings would be essential for dual GPS enabling over ModalAI PX4 version?

        Eric KatzfeyE Offline
        Eric KatzfeyE Offline
        Eric Katzfey
        ModalAI Team
        wrote on last edited by
        #9

        @Aks I hooked up a magnetometer to pins 7 and 8 and it didn't work. But I found the issue in PX4 and was able to get it working by changing a couple of files. Here is the required diff:

        voxl-px4-1.12/px4-firmware$ git diff
        diff --git a/boards/modalai/rb5-flight/src/board_config.h b/boards/modalai/rb5-flight/src/board_config.h
        index d205d7b124..479fb95652 100644
        --- a/boards/modalai/rb5-flight/src/board_config.h
        +++ b/boards/modalai/rb5-flight/src/board_config.h
        @@ -54,7 +54,7 @@
         #define PX4_I2C_BUS_EXPANSION   3  // I2C3: J14 / Power
         #define PX4_I2C_BUS_EXPANSION2  9  // I2C9: J15 / Radio Receiver / Sensors
         
        -#define PX4_NUMBER_I2C_BUSES    3
        +#define PX4_NUMBER_I2C_BUSES    4
         
         #define PX4_I2C_OBDEV_BMP280  0x76
         
        diff --git a/boards/modalai/rb5-flight/src/i2c.cpp b/boards/modalai/rb5-flight/src/i2c.cpp
        index ce4b99a20c..49e361a877 100644
        --- a/boards/modalai/rb5-flight/src/i2c.cpp
        +++ b/boards/modalai/rb5-flight/src/i2c.cpp
        @@ -36,6 +36,7 @@
         constexpr px4_i2c_bus_t px4_i2c_buses[I2C_BUS_MAX_BUS_ITEMS] = {
                initI2CBusExternal(1),
                initI2CBusExternal(2),
        +       initI2CBusExternal(4),
                initI2CBusInternal(5)
                //initI2CBusExternal(3),
                //initI2CBusExternal(9),
        
        1 Reply Last reply
        0
        • ? Offline
          ? Offline
          A Former User
          wrote on last edited by A Former User
          #10

          @Eric-Katzfey Thank you for this information. I highly appreciate this. How about using J18 for GPS UART? What changes would be essential for this? Also any idea about EKF configuration for using dual GPS?

          Eric KatzfeyE 2 Replies Last reply
          0
          • ? A Former User

            @Eric-Katzfey Thank you for this information. I highly appreciate this. How about using J18 for GPS UART? What changes would be essential for this? Also any idea about EKF configuration for using dual GPS?

            Eric KatzfeyE Offline
            Eric KatzfeyE Offline
            Eric Katzfey
            ModalAI Team
            wrote on last edited by
            #11

            @Aks Should be no problem using J18 for GPS instead of ESC.

            1 Reply Last reply
            0
            • ? A Former User

              @Eric-Katzfey Thank you for this information. I highly appreciate this. How about using J18 for GPS UART? What changes would be essential for this? Also any idea about EKF configuration for using dual GPS?

              Eric KatzfeyE Offline
              Eric KatzfeyE Offline
              Eric Katzfey
              ModalAI Team
              wrote on last edited by
              #12

              @Aks We've never done a dual GPS configuration so not sure what is required for PX4.

              1 Reply Last reply
              0
              • ? Offline
                ? Offline
                A Former User
                wrote on last edited by
                #13

                @Eric-Katzfey All the points noted. Thanks alot for all the detailed digging into this. I would try out this configuration. One point which I missed is, In order to connect GPS to J18 UART, we need to change some port number / QUP number right? If you can clarify this it would be great.

                Eric KatzfeyE 1 Reply Last reply
                0
                • ? A Former User

                  @Eric-Katzfey All the points noted. Thanks alot for all the detailed digging into this. I would try out this configuration. One point which I missed is, In order to connect GPS to J18 UART, we need to change some port number / QUP number right? If you can clarify this it would be great.

                  Eric KatzfeyE Offline
                  Eric KatzfeyE Offline
                  Eric Katzfey
                  ModalAI Team
                  wrote on last edited by
                  #14

                  @Aks Unfortunately, there seems to be a bug in the handling of options in the gps driver. The standard uart ports are 2 for the ESC (J18), 6 for the GPS (J19), and 7 for RC (Also on J19). The default port in the gps code is 6. You should be able to pass a different port to the gps driver using the -d option. However, px4_getopt in gps.cpp isn't parsing it if I pass it a different port with the -d option. In fact, you can see that the Holybro gps start line includes -d 7 and -b 115200. The code seems to parse the baudrate fine but not the port which is a good thing because port 7 is for RC, not GPS! Anyways, long story short, in order to put the gps on port 2 you would need to figure out why the gps driver is not parsing the d option correctly first.

                  1 Reply Last reply
                  0
                  • ? Offline
                    ? Offline
                    A Former User
                    wrote on last edited by
                    #15

                    @Eric-Katzfey Cool thank you. This gives me some lead to think on. I will debug this further. One small query. Can I run two gps driver with different 'd' options from config file or their can be conflict of same name services running? Just checking for clarity.

                    Eric KatzfeyE 1 Reply Last reply
                    0
                    • ? A Former User

                      @Eric-Katzfey Cool thank you. This gives me some lead to think on. I will debug this further. One small query. Can I run two gps driver with different 'd' options from config file or their can be conflict of same name services running? Just checking for clarity.

                      Eric KatzfeyE Offline
                      Eric KatzfeyE Offline
                      Eric Katzfey
                      ModalAI Team
                      wrote on last edited by
                      #16

                      @Aks You should be able to run two. But, again, we have never tested.

                      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