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

ModalAI Forum

  1. ModalAI Support Forum
  2. Software Development
  3. VOXL SDK
  4. voxl-mavlink-server GCS udp port

voxl-mavlink-server GCS udp port

Scheduled Pinned Locked Moved VOXL SDK
13 Posts 5 Posters 3.4k 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.
  • J Offline
    J Offline
    jmltt
    Regular
    wrote on last edited by
    #1

    Is there any benefit to making the udp port the mavlink server uses to communicate with QGC/the groundstation configurable? Like by loading in a value from the config file else defaulting to 14550

    Besides the udp ports used for the mavlink streams to/from px4 and voxl-mavlink-server (14556-14559) are there any other ports used by voxl services? I was probably going to just use 14560 - 14570 unless they're reserved for something else

    Reason:

    I'm trying to get a multi-vehicle (sentinels w/ latest sdk and microhard network) set up working and I'm noticing weird behavior when I try to connect to multiple vehicles in QGC. They (the vehicles) all have distinct mavlink sys ids and static ips on the same subnet but I noticed they're all using the same udp port to connect to the groundstation (hard coded in voxl-mavlink-server to 14550). I set up separate comm links in QGC for each vehicle with server address = <voxl-microhard-ip>:14550.

    When I start up qgc with 4 vehicles running and I try to connect to one of the vehicles it randomly connects to two additional vehicles. Then when I try to connect the remaining vehicle it switches the first vehicles that connect to a "secondary comm link" and the connection profile name gets mapped to the wrong vehicles. When I restart QGC after that it connects to all vehicles at once regardless of which connection profile I connect to and the comm link profile names don't get shown next to the vehicle.

    I'm assuming this is happening because they're all sending messages to the same udp port on the gcs pc. Doesn't seem like a big deal at the moment but I feel like it could lead to unexpected behavior if I try to interact with any of the vehicles through QGC. I'm not sure how QGC establishes the connection if it's actually binding a socket to the server address or just broadcasting locally on the designated port

    Eric KatzfeyE 1 Reply Last reply
    0
    • J jmltt

      Is there any benefit to making the udp port the mavlink server uses to communicate with QGC/the groundstation configurable? Like by loading in a value from the config file else defaulting to 14550

      Besides the udp ports used for the mavlink streams to/from px4 and voxl-mavlink-server (14556-14559) are there any other ports used by voxl services? I was probably going to just use 14560 - 14570 unless they're reserved for something else

      Reason:

      I'm trying to get a multi-vehicle (sentinels w/ latest sdk and microhard network) set up working and I'm noticing weird behavior when I try to connect to multiple vehicles in QGC. They (the vehicles) all have distinct mavlink sys ids and static ips on the same subnet but I noticed they're all using the same udp port to connect to the groundstation (hard coded in voxl-mavlink-server to 14550). I set up separate comm links in QGC for each vehicle with server address = <voxl-microhard-ip>:14550.

      When I start up qgc with 4 vehicles running and I try to connect to one of the vehicles it randomly connects to two additional vehicles. Then when I try to connect the remaining vehicle it switches the first vehicles that connect to a "secondary comm link" and the connection profile name gets mapped to the wrong vehicles. When I restart QGC after that it connects to all vehicles at once regardless of which connection profile I connect to and the comm link profile names don't get shown next to the vehicle.

      I'm assuming this is happening because they're all sending messages to the same udp port on the gcs pc. Doesn't seem like a big deal at the moment but I feel like it could lead to unexpected behavior if I try to interact with any of the vehicles through QGC. I'm not sure how QGC establishes the connection if it's actually binding a socket to the server address or just broadcasting locally on the designated port

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

      @jmltt This sounds more like a QGC issue. Are you sure QGC supports what you are trying to do?

      J 1 Reply Last reply
      0
      • Eric KatzfeyE Eric Katzfey

        @jmltt This sounds more like a QGC issue. Are you sure QGC supports what you are trying to do?

        J Offline
        J Offline
        jmltt
        Regular
        wrote on last edited by
        #3

        @Eric-Katzfey I'm just trying to connect to and monitor multiple vehicles, yes QGC supports that

        I tested a modified voxl-mavlink-server with the configurable gcs udp port and assigned separate ports for each vehicle and it resolved the issue.

        I don't think it's a qgc issue unless their link manager is designed to differentiate multiple vehicles publishing to the same udp port on the ground station. I can raise the issue on their forum as well though

        I'm assuming 14560 - 14580 is a safe range, but is there any way to verify there are no conflicts short of going through every voxl service to check which publish/receive over udp?

        A 1 Reply Last reply
        0
        • J Offline
          J Offline
          jmltt
          Regular
          wrote on last edited by
          #4

          I just realized you could also probably resolve this issue by leaving the gcs ip addresses blank in the config file for voxl-mavlink-server. That would force QGC to make a server side connection because there wouldn't be any heartbeats on the local port (I think QGC link manager checks local udp port first, hence the auto connection issue).

          1 Reply Last reply
          0
          • J jmltt

            @Eric-Katzfey I'm just trying to connect to and monitor multiple vehicles, yes QGC supports that

            I tested a modified voxl-mavlink-server with the configurable gcs udp port and assigned separate ports for each vehicle and it resolved the issue.

            I don't think it's a qgc issue unless their link manager is designed to differentiate multiple vehicles publishing to the same udp port on the ground station. I can raise the issue on their forum as well though

            I'm assuming 14560 - 14580 is a safe range, but is there any way to verify there are no conflicts short of going through every voxl service to check which publish/receive over udp?

            A Offline
            A Offline
            ashwin
            wrote on last edited by
            #5

            @jmltt Hi Man, so we are also trying to do something similar. We want to change the hard coded UDP port on the voxl crafts, it would be really helpful if you could share the modified voxl-mavlink-server with the configurable gcs udp port which worked for you. Thank you.

            J 1 Reply Last reply
            0
            • A ashwin

              @jmltt Hi Man, so we are also trying to do something similar. We want to change the hard coded UDP port on the voxl crafts, it would be really helpful if you could share the modified voxl-mavlink-server with the configurable gcs udp port which worked for you. Thank you.

              J Offline
              J Offline
              jmltt
              Regular
              wrote on last edited by
              #6

              @ashwin I just added a parameter called qgc_udp_port to config_file.h/c in voxl-mavlink-server (you can use the same syntax as used for any of the other port number variables in the config file to add it) and then added some logic to the gcs_io.c file where it makes the connections and rebuilt voxl-mavlink-server locally. I don't have that version somewhere publically available, but the required changes are so minor you could easily update and rebuild voxl-mavlink-server yourself

              In the gcs_io_init(void) function in gcs_io.c you could replace the line

              si_me_gcs.sin_port = htons(GCS_UDP_PORT);

              with something like

              si_me_gcs.sin_port = htons((uint16_t)qgc_udp_port);

              where qgc_udp_port is the variable you add to the config file. You'd also need to go the _add_connection(unsigned long ip) function and replace

              connections[i].sockaddr.sin_port = htons(GCS_UDP_PORT);

              with something like

              connections[i].sockaddr.sin_port = htons((uint16_t)gcs_udp_publish_port);

              I also added some logic to check that the user generated port number is within a valid range and only change it for each connection if it's not equal to the value defined by GCS_UDP_PORT (14550), but that's not strictly necessary.

              This was all done for voxl-mavlink-server in SDK 1.3.5. I don't know how much the logic has changed in the more recent SDK versions, but I imagine these changes would carry over

              Eric KatzfeyE Aaron PorterA 2 Replies Last reply
              0
              • J jmltt

                @ashwin I just added a parameter called qgc_udp_port to config_file.h/c in voxl-mavlink-server (you can use the same syntax as used for any of the other port number variables in the config file to add it) and then added some logic to the gcs_io.c file where it makes the connections and rebuilt voxl-mavlink-server locally. I don't have that version somewhere publically available, but the required changes are so minor you could easily update and rebuild voxl-mavlink-server yourself

                In the gcs_io_init(void) function in gcs_io.c you could replace the line

                si_me_gcs.sin_port = htons(GCS_UDP_PORT);

                with something like

                si_me_gcs.sin_port = htons((uint16_t)qgc_udp_port);

                where qgc_udp_port is the variable you add to the config file. You'd also need to go the _add_connection(unsigned long ip) function and replace

                connections[i].sockaddr.sin_port = htons(GCS_UDP_PORT);

                with something like

                connections[i].sockaddr.sin_port = htons((uint16_t)gcs_udp_publish_port);

                I also added some logic to check that the user generated port number is within a valid range and only change it for each connection if it's not equal to the value defined by GCS_UDP_PORT (14550), but that's not strictly necessary.

                This was all done for voxl-mavlink-server in SDK 1.3.5. I don't know how much the logic has changed in the more recent SDK versions, but I imagine these changes would carry over

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

                @jmltt There were some places in voxl-mavlink-server where the system id was hardcoded to 1. This may have been causing problems when trying to enable multi-uav support in QGC. That has now been fixed and so it should be possible to use multi-uav in QGC now where each vehicle is assigned a separate system id. http://voxl-packages.modalai.com/dists/qrb5165/dev/binary-arm64/voxl-mavlink-server_1.4.12-202509181025_arm64.deb

                1 Reply Last reply
                0
                • J jmltt

                  @ashwin I just added a parameter called qgc_udp_port to config_file.h/c in voxl-mavlink-server (you can use the same syntax as used for any of the other port number variables in the config file to add it) and then added some logic to the gcs_io.c file where it makes the connections and rebuilt voxl-mavlink-server locally. I don't have that version somewhere publically available, but the required changes are so minor you could easily update and rebuild voxl-mavlink-server yourself

                  In the gcs_io_init(void) function in gcs_io.c you could replace the line

                  si_me_gcs.sin_port = htons(GCS_UDP_PORT);

                  with something like

                  si_me_gcs.sin_port = htons((uint16_t)qgc_udp_port);

                  where qgc_udp_port is the variable you add to the config file. You'd also need to go the _add_connection(unsigned long ip) function and replace

                  connections[i].sockaddr.sin_port = htons(GCS_UDP_PORT);

                  with something like

                  connections[i].sockaddr.sin_port = htons((uint16_t)gcs_udp_publish_port);

                  I also added some logic to check that the user generated port number is within a valid range and only change it for each connection if it's not equal to the value defined by GCS_UDP_PORT (14550), but that's not strictly necessary.

                  This was all done for voxl-mavlink-server in SDK 1.3.5. I don't know how much the logic has changed in the more recent SDK versions, but I imagine these changes would carry over

                  Aaron PorterA Offline
                  Aaron PorterA Offline
                  Aaron Porter
                  Contributor
                  wrote on last edited by
                  #8

                  @jmltt So reading the original issue that you were having back in November. The Deb file that Eric posted will solve the issue of mismatching communication links in QGC. I tested it and it works. The problem was that the voxl-mavlink-server was assigning every drone sys id 1 regardless of the MAV_SYS_ID parameter. This resulted in QGC assuming each of the drones were the same since the SYS ID on connection were the same.

                  Now as for why the drones were all connecting at once sounds like the autoconnect for UDP is enabled. The drones should not connect unless given the IP address + Port number in the comm link like you described. If QGC is setup to autoconnect to any UDP connections then that would explain why since all of the drone are set to communicate on 14550.

                  Link Preview Image
                  General Settings (Settings View) | QGC Guide

                  How to use and develop QGroundControl for PX4 or ArduPilot powered vehicles.

                  favicon

                  (docs.qgroundcontrol.com)

                  I understand why changing the port number would help prevent confusion but I don't think 4 drones using port 14550 is the issue as other have had multiple drones all on 14550 connected to a single QGC instance. There are issues if you are suing a simulation but not for physical drones.

                  J 1 Reply Last reply
                  0
                  • Aaron PorterA Aaron Porter

                    @jmltt So reading the original issue that you were having back in November. The Deb file that Eric posted will solve the issue of mismatching communication links in QGC. I tested it and it works. The problem was that the voxl-mavlink-server was assigning every drone sys id 1 regardless of the MAV_SYS_ID parameter. This resulted in QGC assuming each of the drones were the same since the SYS ID on connection were the same.

                    Now as for why the drones were all connecting at once sounds like the autoconnect for UDP is enabled. The drones should not connect unless given the IP address + Port number in the comm link like you described. If QGC is setup to autoconnect to any UDP connections then that would explain why since all of the drone are set to communicate on 14550.

                    Link Preview Image
                    General Settings (Settings View) | QGC Guide

                    How to use and develop QGroundControl for PX4 or ArduPilot powered vehicles.

                    favicon

                    (docs.qgroundcontrol.com)

                    I understand why changing the port number would help prevent confusion but I don't think 4 drones using port 14550 is the issue as other have had multiple drones all on 14550 connected to a single QGC instance. There are issues if you are suing a simulation but not for physical drones.

                    J Offline
                    J Offline
                    jmltt
                    Regular
                    wrote on last edited by
                    #9

                    @Aaron-Porter I'm sure the system id fix might have resolved the issue. I just find having separate ports for each vehicle to establish a connection over a cleaner option. This isn't an issue for me anymore, I was just responding to the question on the approach I used to resolve it

                    Aaron PorterA 1 Reply Last reply
                    0
                    • J jmltt

                      @Aaron-Porter I'm sure the system id fix might have resolved the issue. I just find having separate ports for each vehicle to establish a connection over a cleaner option. This isn't an issue for me anymore, I was just responding to the question on the approach I used to resolve it

                      Aaron PorterA Offline
                      Aaron PorterA Offline
                      Aaron Porter
                      Contributor
                      wrote on last edited by
                      #10

                      @jmltt I understand it is personal preference, I just wanted to give more detail on the issue that you were originally seeing incase anyone else ran into the same problem. Shouldn't happen in the future with the recent changes, but some still use older SDK versions.

                      1 Reply Last reply
                      0
                      • B Offline
                        B Offline
                        brandon
                        Contributor
                        wrote on last edited by
                        #11

                        I am also having this issue. I think that the voxl-mavlink-server may have an incorrect implementation of the "server" side of the UDP connection. My evidence would be that using mavproxy.py from a remote computer in client mode (e.g. mavproxy.py --master=udpout:192.168.83.254:14550) does not receive packets from the server, but the server does detect the connection.

                        afcc3ae5-385f-4247-bf65-5deb036e1f78-image.png

                        I took a look at wireshark and saw that the voxl-mavlink-server in "server" mode is not replying to the mavproxy.py client on the correct port. It is replying to 14550 at the client (incorrect). See the picture below, but ignore IPs as data capture was on a different network. You can see the mavproxy client sending from port 33935 to voxl at 14550, but the voxl incorrectly replies back to 14550 on the client computer when it should be replying back to 33935.

                        The side-effect of this is that you cannot have two independent clients (talking to different drones) running on the same computer because both drones will send their data to the same port. Computers only allow one process to be a server on a given port.

                        4ed6a412-3d51-4967-bca5-ac732411e077-Pasted Graphic 9.png

                        Eric KatzfeyE 2 Replies Last reply
                        0
                        • B brandon

                          I am also having this issue. I think that the voxl-mavlink-server may have an incorrect implementation of the "server" side of the UDP connection. My evidence would be that using mavproxy.py from a remote computer in client mode (e.g. mavproxy.py --master=udpout:192.168.83.254:14550) does not receive packets from the server, but the server does detect the connection.

                          afcc3ae5-385f-4247-bf65-5deb036e1f78-image.png

                          I took a look at wireshark and saw that the voxl-mavlink-server in "server" mode is not replying to the mavproxy.py client on the correct port. It is replying to 14550 at the client (incorrect). See the picture below, but ignore IPs as data capture was on a different network. You can see the mavproxy client sending from port 33935 to voxl at 14550, but the voxl incorrectly replies back to 14550 on the client computer when it should be replying back to 33935.

                          The side-effect of this is that you cannot have two independent clients (talking to different drones) running on the same computer because both drones will send their data to the same port. Computers only allow one process to be a server on a given port.

                          4ed6a412-3d51-4967-bca5-ac732411e077-Pasted Graphic 9.png

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

                          @brandon Agreed, the code has a fixed port but should use the source port. We will fix that and also add configurable ports for the gcs IP addresses in the configuration file.

                          1 Reply Last reply
                          0
                          • B brandon

                            I am also having this issue. I think that the voxl-mavlink-server may have an incorrect implementation of the "server" side of the UDP connection. My evidence would be that using mavproxy.py from a remote computer in client mode (e.g. mavproxy.py --master=udpout:192.168.83.254:14550) does not receive packets from the server, but the server does detect the connection.

                            afcc3ae5-385f-4247-bf65-5deb036e1f78-image.png

                            I took a look at wireshark and saw that the voxl-mavlink-server in "server" mode is not replying to the mavproxy.py client on the correct port. It is replying to 14550 at the client (incorrect). See the picture below, but ignore IPs as data capture was on a different network. You can see the mavproxy client sending from port 33935 to voxl at 14550, but the voxl incorrectly replies back to 14550 on the client computer when it should be replying back to 33935.

                            The side-effect of this is that you cannot have two independent clients (talking to different drones) running on the same computer because both drones will send their data to the same port. Computers only allow one process to be a server on a given port.

                            4ed6a412-3d51-4967-bca5-ac732411e077-Pasted Graphic 9.png

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

                            @brandon The latest voxl-mavlink-server is available here: http://voxl-packages.modalai.com/dists/qrb5165/dev/binary-arm64/voxl-mavlink-server_1.4.12-202511040816_arm64.deb. This has added configuration for the GCS ports and also fixes the above issue so that it now responds to the correct port.

                            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