UDP Packet Fail in 1.3.69

Hi All,

I am seeing a lot of bad packets on mission planner when connecting via UDP. Can anyone decipher what mission planner is complaining about?

ssionPlanner.MAVLinkInterface - MAVLINK: bad read 6, 36, 5
INFO MissionPlanner.MAVLinkInterface - Mavlink Bad Packet (crc fail) len 36 crc 31471 vs 0 pkno 163 AHRS
Unknown Packet
INFO MissionPlanner.MAVLinkInterface - unknown packet type 58
INFO MissionPlanner.MAVLinkInterface - mav 1-1 seqno 47 exp 44 pkts lost 3
INFO MissionPlanner.MAVLinkInterface - MAVLINK: bad read 10, 40, 9
INFO MissionPlanner.MAVLinkInterface - Mavlink Bad Packet (crc fail) len 40 crc 63157 vs 0 pkno 30 ATTITUDE
INFO MissionPlanner.MAVLinkInterface - MAVLINK: bad read 6, 40, 5
INFO MissionPlanner.MAVLinkInterface - Mavlink Bad Packet (crc fail) len 40 crc 42736 vs 0 pkno 241 VIBRATION
=@@{+"=>oINFO MissionPlanner.MAVLinkInterface - mav 2-1 seqno 0 exp 255 pkts lost 1
INFO MissionPlanner.MAVLinkInterface - MAVLINK: bad read 10, 48, 9
INFO MissionPlanner.MAVLinkInterface - Mavlink Bad Packet (crc fail) len 48 crc 7829 vs 0 pkno 147 BATTERY_STATUS
dINFO MissionPlanner.MAVLinkInterface -
@==sDF<fA5sM71Df6Vd}m9)R<:X:ud:5R@=f(IJ=@@{+"=>od

INFO MissionPlanner.MAVLinkInterface - mav 2-1 seqno 17 exp 16 pkts lost 1
INFO MissionPlanner.MAVLinkInterface - MAVLINK: bad read 6, 36, 5
INFO MissionPlanner.MAVLinkInterface - Mavlink Bad Packet (crc fail) len 36 crc 6768 vs 0 pkno 30 ATTITUDE
@Q?INFO MissionPlanner.MAVLinkInterface - mav 1-1 seqno 51 exp 49 pkts lost 2
INFO MissionPlanner.MAVLinkInterface - MAVLINK: bad read 6, 30, 5
INFO MissionPlanner.MAVLinkInterface - Mavlink Bad Packet (crc fail) len 30 crc 58033 vs 0 pkno 116 SCALED_IMU2
VUnknown Packet
[INFO MissionPlanner.MAVLinkInterface - mav 1-1 seqno 56 exp 54 pkts lost 2

I am trying to connect to two aircraft over UDP through one groundstation.

Any info would be great! Thanks

complaining about bad crc which means byte/bit errors in the datastream.

What data stream does it want? 8bit,no stop bits?

udp has nothing with stop bits… somehow the data become corrupted during transfer. You have to check your UDP link.

Mission planner expect udp packet to be mavlink packet aligned.
ie the udp packet starts and end with an entire mavlink packet.

1 Like

So I am using ser2net with the settings of 8N1,no parity, 1 stop bit. Does that match up for mavlink 1?

Okay…my UDP is setup for 8N1…but you’re saying I don’t have stop bits?

To give some background…I am trying to use the Doodle Labs smart radio with a pixhawk. I am getting data, but it’s slow and lossy. I’m wondering if I have the right settings on how I send the data out. But if the data stream was wrong, wouldn’t it not function at all?

How is your ser2net.conf file looks like ?

well this will be from memory but it’s very close to this:

udp,14550:raw:0:ttysUSB0:115200 8DATABITS NONE 1STOPBIT remaddr=udp,10.160.0.214,14550

Why the USB ? Are you not connecting via serial port ?

that’s how the /dev shows up in the smart radio. When I cat i see junk(serial) come through. And Mission Planner does connect and see the aircraft, what would you normally expect to see?

Andras…interesting.

This is from the smart radio documentation:

Login to the device and update the UART settings to your liking using stty. The current default setting is configured as,
root@LEDE:~# stty -F /dev/ttyUSB0 115200 cs8 -cstopb -parenb

Should I change this to something else?

Nope, if you can connect directly with the serial port, then it is OK.

Ok, so your radio connects to the usb port, and emulate a serial interface.
Then you tries to pull up a ser2net on this to provide network interface. right.

It is long shot but I would use https://github.com/intel/mavlink-router instead of ser2net to route packets between serial and net…

Can mavlink router work on a mesh network? I am routing UDP through a mesh. I am also quite new to all of this, and the smart radio uses Openwrt…which is a non standard debian distribution. I am not sure how to connect the radio to the internet and download a package, how would I get mavlink router onto this radio?

Sorry, this far how far I can go. I have no experience with this type of radio or OpenWrt…

That’s fine. Thank you for helping this much. Is there a good way of manually getting packages onto an OS? copying a tar and extracting I suppose?

you can try tar…but if it is a problem with packetizing (as Michael said) you will see no errors.

Andras…I tried installing this and didn’t have enough room for pymavlink on my device. Is there a way to do a small install of the mavlink router?

Hi @Autonomost did you managed to solve the issue ?

@Eosbandi unfortunately not. I saw it again today. Now when the smart radios are setup to use UDP mavftp doesn’t even work. Have to use TCP for things to act properly.