Mavlink and MISSION_REQUEST_LIST

Hi there.
Please, explaine me the next one.
I use mavlink library in my microcontroller. It connect to the flight controller beetwen uart. I can send and recieve messages (MAVLINK_MSG_ID_HEARTBEAT, MAV_CMD_SET_MESSAGE_INTERVAL, MAVLINK_MSG_ID_GPS_RAW_INT and etc), but i cannot force my flight controller send me mission count on any state - arm/disarm
my code has next view:

uint8_t buf[MAVLINK_MAX_PACKET_LEN];
uint16_t len;
mavlink_msg_command_long_pack(1, 0, &msg, 1, 1, MAV_CMD_REQUEST_MESSAGE, 0, MAVLINK_MSG_ID_MISSION_REQUEST_LIST, 1, 0, 0, 0, 0, 0);
len = mavlink_msg_to_send_buffer(buf, &msg);
UART_Write(UART0, &buf[0], len);

and after then i wait for MISSION_COUNT ( #44 ) - This message is emitted as response to MISSION_REQUEST_LIST, but i do not recieve it.

version ArduPlane V4.3.5

1 Like

Hello :grinning:
On my example i tried to send message as if I was a QGC.

I will show you some parts of my code, so you can put everything in loop.

Code:

parts_of_code.cpp (4.5 KB)

Then I immediately decode AND using some sort of filter.

Kinda like so, also dont forget to check Mission Protocol · MAVLink Developer Guide.

If you have further questions ask please :slight_smile:

// edit, noticed how crappy site made code, so sending a file

1 Like

Thanks a lot!!! It was my mistake - i used command long for it, but it was wrong. You really helped me.

1 Like

Nice, glad I could help😄