Help please: how to filter mavlink based on source SYSID

How can I drop processing packets from GCS? (this RPAS have two GCS’s on two telemetry links) Let’s say link1 and link2 , the link2 gives me data from the SYSID (RPAS), and 255(GCS on link1)

how can I check which SYSID the recieved packet comes from? The essential code I use is here:

from pymavlink import mavutil    
master = mavutil.mavlink_connection('udpin:0.0.0.0:14550')
    .....
                  msg = master.recv_match(blocking=False, timeout=1)
                  if not msg:
                      continue
                  type = msg.get_type()

I would like to drop anything from SYSID >250 or otherwise, heartbeat packets from the other GCS

1 Like

I have the same problem… seems to be Impossible to find out, yet this seems to be a very basic function.
Did you ever solve it?

no, I filtered heartbeat by type, but found no way of seeing source of any message.

at some point I also filtered by component ID

  if ( msg.compid != 0) {     // skip compid 0 - which is ADSB while 1 is AP
    switch (msg.msgid)

have you tried msg.get_srcSystem() ?