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

ModalAI Forum

  1. ModalAI Support Forum
  2. Ask your questions right here!
  3. VOXL Connection to MAVLINK server failed using pymavlink

VOXL Connection to MAVLINK server failed using pymavlink

Scheduled Pinned Locked Moved Ask your questions right here!
6 Posts 2 Posters 1.3k 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.
  • S Offline
    S Offline
    svempati
    Contributor
    wrote on last edited by svempati
    #1

    Hello, I am trying to read mavlink messages like the pressure and altitude from the VOXL 2 sensors using pymavlink. I wanted to make sure that the udpin to the mavlink connection is correct?

    I am having trouble connecting to the mavlink server. I set the port number to 14557 based on the first diagram in this page: (https://docs.modalai.com/mavlink/).
    When I use localhost as the port, . When I use localhost, I get an error that says OSError: [Errno 98] Address already in use, and when I use the IP address 192.168.8.10 it gives an error that says OSError: [Errno 99] Cannot assign requested address.

    If that is not the correct IP address, how can I find the IP address for my specific VOXL? It is worth noting that my VOXL isn't connected to the internet, but is physically connected to the flight controller by wire.

    Thanks for your help!

    # MAVLINK Common Message Set: https://mavlink.io/en/messages/common.html
    from pymavlink import mavutil
    
    the_connection = mavutil.mavlink_connection('udpin:192.168.8.10:14557')
    
    the_connection.wait_heartbeat()
    print("Heartbeat from system (system %u component %u)" % (the_connection.target_system, the_connection.target_component))
    
    while True:
        try:
            # local xyz position
            msg_pos = the_connection.recv_match(type='LOCAL_POSITION_NED', blocking=True)
            print(msg_pos.x, msg_pos.y, msg_pos.z)
    
            # altitude
            msg_altitude = the_connection.recv_match(type='ALTITUDE', blocking=True)
            print(msg_altitude.altitude_local, msg_altitude.altitude_relative)
    
            # pressure
            msg_pressure = the_connection.recv_match(type='SCALED_PRESSURE', blocking=True)
            print(msg_pressure.press_abs)
    
        except KeyboardInterrupt:
            print('Terminating mavlink...')
            break
    
    tomT 1 Reply Last reply
    0
    • S svempati

      Hello, I am trying to read mavlink messages like the pressure and altitude from the VOXL 2 sensors using pymavlink. I wanted to make sure that the udpin to the mavlink connection is correct?

      I am having trouble connecting to the mavlink server. I set the port number to 14557 based on the first diagram in this page: (https://docs.modalai.com/mavlink/).
      When I use localhost as the port, . When I use localhost, I get an error that says OSError: [Errno 98] Address already in use, and when I use the IP address 192.168.8.10 it gives an error that says OSError: [Errno 99] Cannot assign requested address.

      If that is not the correct IP address, how can I find the IP address for my specific VOXL? It is worth noting that my VOXL isn't connected to the internet, but is physically connected to the flight controller by wire.

      Thanks for your help!

      # MAVLINK Common Message Set: https://mavlink.io/en/messages/common.html
      from pymavlink import mavutil
      
      the_connection = mavutil.mavlink_connection('udpin:192.168.8.10:14557')
      
      the_connection.wait_heartbeat()
      print("Heartbeat from system (system %u component %u)" % (the_connection.target_system, the_connection.target_component))
      
      while True:
          try:
              # local xyz position
              msg_pos = the_connection.recv_match(type='LOCAL_POSITION_NED', blocking=True)
              print(msg_pos.x, msg_pos.y, msg_pos.z)
      
              # altitude
              msg_altitude = the_connection.recv_match(type='ALTITUDE', blocking=True)
              print(msg_altitude.altitude_local, msg_altitude.altitude_relative)
      
              # pressure
              msg_pressure = the_connection.recv_match(type='SCALED_PRESSURE', blocking=True)
              print(msg_pressure.press_abs)
      
          except KeyboardInterrupt:
              print('Terminating mavlink...')
              break
      
      tomT Offline
      tomT Offline
      tom
      admin
      wrote on last edited by
      #2

      @svempati You can run ifconfig to view the IP addresses for your various network interfaces on voxl2, if you're using wifi then you'll want to look at wlan0

      S 1 Reply Last reply
      0
      • tomT tom

        @svempati You can run ifconfig to view the IP addresses for your various network interfaces on voxl2, if you're using wifi then you'll want to look at wlan0

        S Offline
        S Offline
        svempati
        Contributor
        wrote on last edited by
        #3

        @tom I ran ifconfig on voxl2, but I haven't found anything on wlan0. This is the output I get after running that command:

        bond0: flags=5123<UP,BROADCAST,MASTER,MULTICAST>  mtu 1500
                ether fe:ca:d2:74:91:69  txqueuelen 1000  (Ethernet)
                RX packets 0  bytes 0 (0.0 B)
                RX errors 0  dropped 0  overruns 0  frame 0
                TX packets 0  bytes 0 (0.0 B)
                TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        
        dummy0: flags=195<UP,BROADCAST,RUNNING,NOARP>  mtu 1500
                inet6 fe80::e2a:ce35:6c11:d803  prefixlen 64  scopeid 0x20<link>
                ether de:92:20:5e:07:c9  txqueuelen 1000  (Ethernet)
                RX packets 0  bytes 0 (0.0 B)
                RX errors 0  dropped 0  overruns 0  frame 0
                TX packets 25  bytes 7462 (7.4 KB)
                TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        
        lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
                inet 127.0.0.1  netmask 255.0.0.0
                inet6 ::1  prefixlen 128  scopeid 0x10<host>
                loop  txqueuelen 1000  (Local Loopback)
                RX packets 368130  bytes 35420354 (35.4 MB)
                RX errors 0  dropped 0  overruns 0  frame 0
                TX packets 368130  bytes 35420354 (35.4 MB)
                TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        

        would any of these help with finding the voxl's ip address?

        tomT 1 Reply Last reply
        0
        • S svempati

          @tom I ran ifconfig on voxl2, but I haven't found anything on wlan0. This is the output I get after running that command:

          bond0: flags=5123<UP,BROADCAST,MASTER,MULTICAST>  mtu 1500
                  ether fe:ca:d2:74:91:69  txqueuelen 1000  (Ethernet)
                  RX packets 0  bytes 0 (0.0 B)
                  RX errors 0  dropped 0  overruns 0  frame 0
                  TX packets 0  bytes 0 (0.0 B)
                  TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
          
          dummy0: flags=195<UP,BROADCAST,RUNNING,NOARP>  mtu 1500
                  inet6 fe80::e2a:ce35:6c11:d803  prefixlen 64  scopeid 0x20<link>
                  ether de:92:20:5e:07:c9  txqueuelen 1000  (Ethernet)
                  RX packets 0  bytes 0 (0.0 B)
                  RX errors 0  dropped 0  overruns 0  frame 0
                  TX packets 25  bytes 7462 (7.4 KB)
                  TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
          
          lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
                  inet 127.0.0.1  netmask 255.0.0.0
                  inet6 ::1  prefixlen 128  scopeid 0x10<host>
                  loop  txqueuelen 1000  (Local Loopback)
                  RX packets 368130  bytes 35420354 (35.4 MB)
                  RX errors 0  dropped 0  overruns 0  frame 0
                  TX packets 368130  bytes 35420354 (35.4 MB)
                  TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
          

          would any of these help with finding the voxl's ip address?

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

          @svempati Do you have a wifi dongle connected to VOXL2?

          S 1 Reply Last reply
          0
          • tomT tom

            @svempati Do you have a wifi dongle connected to VOXL2?

            S Offline
            S Offline
            svempati
            Contributor
            wrote on last edited by
            #5

            @tom No I don't have a wifi dongle connected.

            tomT 1 Reply Last reply
            0
            • S svempati

              @tom No I don't have a wifi dongle connected.

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

              @svempati Are you trying to access the mavlink data from VOXL 2 itself or from an offboard computer / ground station?

              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

              • Don't have an account? Register

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