Send mavlink message with serial terminal

Hello,
I would want to send orders to a ArduPilot Mega board form the computer through a USB ttl serial UART cable with a serial terminal (such as Tera Term or an other one) but I dont want to use a software like MP or QGC. The final aim of the project is to control the autopilot board with an other Arduino board (UNO). I know the autopilot board “speak” MavLink “language”.
Is it possible ? What is the syntaxe I have to adopt in the serial terminal ?
Thank you.

Information about MAVLink can be found here qgroundcontrol.org/mavlink/start

It’s a ‘binary protocol’ so you won’t be able to type it in a Terminal program, You can get header libraries in Java, C/C++, Obj-C, python flavours.

You can also use dronekit.io as supplied by 3DR. It helps with some extra features built onto the pymavlink library.

The protocol is symmetrical(same on client and ‘server’ i.e. Companion Computer <–> autopilot) so either the qgroundcontrol.org/dev/mavlink_l … n_tutorial (really the difference is that the later uses a UDP connection)

Hope that helps :slight_smile:

You totally answered my question but if it’s possible i would like to ask you for other ones :smiley:
So I can’t communicate directly to the autopilot board from my computer without a software such as MP or QGC ? Or I have to “create” an application Drone Kit ?

You can talk to the autopilot without a GCS connected. Just use the code examples I posted above.

All the GCS does is mirror the state of the ardupilot, getting the information using MAVLink protocol. You can disconnect and reconnect another GCS, or even use two. Each system i.e. GCS and autopilot have unique identifiers in range in value from 1-255 GCSs use the high end i.e. 255, and vehicles art at the low end as a convention.

Hello,
I’m interested in this topic and I would ask you what happens when there’s a person piloting the drone by a remote control. I mean, is it still possible to send MAVLink commands, like a MAV_CMD_NAV_WAYPOINT, if the drone is in manual mode? Who has the priority between the remote control and the MAVLink command?
This is interesting for me because I’m trying to develop my own GCS and I’m concerned about what could happen if there’s a bug in my sw.
Thank you very much

Hello guys. I also like to know better about. How can I make the Arduino send to Ardupilot commands UP, DOWN, LEFT, RIGHT, FRONT and BACK? How to call these commands from the library?