0

i created two python file to send and receive text message using pymavlink (statustext_send()) with this :

sender.py :

connection= mavutil.mavlink_connection("udp:14552" , source_system=21)
.
.
.
connection.mav.statustext_send(
    mavutil.mavlink.MAV_SEVERITY_INFO, "text message".encode()
)

receiver.py :

connection= mavutil.mavlink_connection("udp:14553" , source_system=22 , source_component=1)
.
.
.
while True : 
     msg = connection.recv_match(blocking=True)
    print("Message from %d %s " % (msg.get_srcSystem(), msg))

main.config

[General]
   TcpServerPort=5760
   ReportStats=false
   MavlinkDialect=common

[UdpEndpoint local]
   Mode=server
   Address=127.0.0.1
   Port=14550

[UdpEndpoint sender]
   Mode=normal
   Address=127.0.0.1
   Port=14552

[UdpEndpoint receiver]
   Mode=normal
   Address=127.0.0.1
   Port=14553
   AllowSrcSysIn=[21]

NOT : I am using SiTL

EndPoint port:14553 receives all messages from all other EndPoints even throw i used AllowSrcSysIn from specific Endpoint port:14552.

when i set AllowSrcSysOut the sender or receiver python file is not working and did nothing .

0 Answers0