Sending Mavlink Messages on udp port 14552

Hello,

I’m able to read heartbeat messages and other stuff on udp port 14552 but not able to send my custom mavlink message. Trying to set mode to auto using this syntax (Kotlin),

I made sure udpSocket is the same on which it connected to the port. Not sure where I’m going wrong.

Thank you for your help!

My bad. The byte array was made up of just payload and not the whole mavlink message

Hi.

Can I ask the IP address and PORT number that you’ve used to connect to MavLink?

I have a Python code using pymavlink, and it seems like it’s not getting the heartbeats.

from pymavlink import mavutil
from SKYRON import MAVLink, MAVLink_sensor_status_message
import time, os, threading

"""
Example of how to connect pymavlink to an autopilot via an UDP connection
"""

master = mavutil.mavlink_connection('udp:192.168.144.3:14550', baud=57600)

# Make sure the connection is valid
master.wait_heartbeat()

# Get some information !
while True:
    try:
        print(master.recv_match().to_dict())
    except:
        pass
    time.sleep(0.1)

Any help is highly appreciated!