I am running MAVProxy on a companion computer with a -out 127.0.0.1:9001 relay to communicate with some processes on the CC.
I’m using a Cube Black and I’ve tried it with a Pi3 over USB and a TX1 over UART. In both cases, I get garbage characters appearing whenever I send MAVLink commands relayed through MAVProxy. For example, here I am sending a baro calibration request:
The garbage appears less often at lower baudrates. I might expect some noise when connected over radio, but a direct serial or USB connection shouldn’t do this. In fact, some of the garbage chunks contain legible pieces such as garbled parameter names, so it’s not just random noise. I’m guessing that mavlink messages are somehow colliding, but I’m not sure what I did wrong. Any hints?
Yeah, I found that also, but turning off the displaying of noise doesn’t solve the issue. Usually, the noise is from corrupt radio telemetry packets, but in my case, I’m using a direct serial or USB connection which shouldn’t have so much corruption.
What could cause crc errors? These errors appear regularly and it’s over a very short wired connection, so link noise and corruption are unlikely. Am I sending the wrong Mavlink version messages?
Yeah, I tried a Pi 3 and a TX1. On both, I tried a serial UART and USB connection. Same results.
Tried this also, no combination of --mav options and SERIAL_PROTOCOL setting seemed to change anything.
One thing to note is that baudrate strongly affects how many errors I get. At 57600 baud, I get no errors at all until I do something with a high communication load like start a log download, at which point the errors trickle in. At 1500k baud I get a constant flood of errors, even when idle.
Also found that it seems to have nothing to do with my companion computer process. Just running MAVProxy by itself without a relay results in the same problem. And the invalic CRC isn’t the only error, I variously get
unknown MAVLink message ID
invalid MAVLink CRC
incompat_flags
But they’re probably all probably coming from the same problem of not parsing mavlink messages correctly… or something.
I don’t have flow control connected. I did have BRD_SER2_RTSCTS = 2, so I set it to 0 in case it was not detecting correctly but I still get errors. Also I originally encountered this issue when connecting over USB, although I haven’t tried that again in a while.
The errors are mostly gone with latest Ardupilot and Mavproxy/pymavlink, but they do appear on at random intervals. I’ll go for a long time with no errors, but then start getting them regularly for a while until they stop again. It’s usable, but I’m still a bit surprised to find this happening at all.
I had this same problem connecting a Kakute F7 AIO to a RPi4B. I updated the libraries, but it didn’t solve the problem. So, I reduced the baudrate from 921600 to 115200 and the problem is gone for now.
Regards!
Updating Ardupilot and Mavproxy/pymavlink fixed it for the most part.
If you’re seeing a lot of garbage even with latest software, double-check that you are not running multiple instances of Mavproxy or anything else using the same serial connection.