I am having trouble with using MavLink over USB serial on SOME Arduino boards.
It works on: Uno, Due (Programming port) It does NOT work on: Leonardo, Due (USB native port)
When it works, I pack MavLink messages and send them with
write(buf,len) on the appropriate port. I run QGroundControl, and use its MavLink Inspector to watch incoming heartbeats from the Arduino. :grin:
When it doesn't work, I run the same code (with Serial or SerialUSB as appropriate), but either no messages get through to QGroundControl, or only one. :fearful:
I have repeatedly verified this, and also checked using MissionPlanner as an alternative to QGroundControl.
I don't know why there is this difference in behaviour... could it be that the on-chip serial port of the Leonardo is somehow different when writing blocks of data? A buffer issue? Any suggestions or ideas?
Has anyone used MavLink with a Leonardo successfully? (Or Due SerialUSB)