Making a mavLink Message

I am writing a GCS of my own with the MavLink protocol. but I am having some issues with certain messages. I can send the message #21 (get Parameters) and the APM returns all the parameters just fine.

However, when I send the #76 (Command_Long message… in this case the command is RTL because it takes no params) I don’t get any response. I assume I am supposed to get a Command_ACK(#77), but all I get back is the heart beat

here is the packet I am sending cast to ints

Byte Number 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
Value 254 33 0 100 0 76 1 0 0 20 0 0 0 0 0 0 0 0

Byte Number 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
value 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Byte Number 36 37 38 39 40
value 0 0 0 244 114

variables
MsgID= 76;
MsgLength=33; //from MsgLenth Array in Mavlink

my SysID=100;
my Comp= 0;

target Sys=1;
target comp=0;

command=20 // for RTL its actually 2 bytes

Conformation=0; // It says that this should be zero if first time 1-255 for command Kill I don’t know what
// this means

checksum method is working, because I can decode heartbeat messages and accept requests for parameters

If anyone Has any suggestions or ideas of why this isn’t working please let me know.

Thanks ,

Jason

Does anyone have any suggestions on why this is happening…

Hello Helibot,

I am designing a GCS for my masters capstone. its a fairly small project, I am writing in C#. However, I am having some problems with communication to the apm… So, here is what I can do:

  1. get heartbeats
  2. send a parameter list request and get a response (so I know my CRC’s are correct)

and here is what I am stuck on.

using the MavCommand Long… I tried the most basic example (RTL which takes no parameters) , but the APM (2.5) doesn’t give me an ACK message back.

I have sniffed my packets (to and from) and they look good. is there something I am missing? I am setting the sender SYSID\COMPID as 255 and 0. and the target SYSID\COMPID as 1 and 0 (the ID from the heartBeat). I have been struggling with this for almost a month and have run out of Ideas.

I desire to use the COMMAND long message because I can do everything I need (including turning on and off relay pins).

any help would be great.

thanks,

Jason Gillikin

PS. I have tried using that python mavGenerator, but It doesn’t seem to run on my computer, so I just construct my own packets according to the mavlink protocol.

[color=#004000]Who is Helibot and what has your post to do with Droidplanner?

Please post your support request into the appropriate subforum!
Topic moved to GCS/MAVLink and merged with earlier post of same OP.[/color]