Companion computer communications

42 views
Skip to first unread message

Paul Hemans

unread,
Aug 3, 2022, 4:06:29 AM8/3/22
to MAVLink
I have an ESP32 connected to Telem 2.
On the companion computer when the GCS connects I get HEARTBEAT messages and periodically  MAVLINK_MSG_ID_REQUEST_DATA_STREAM.
It ignores any data I request.

For example, if I periodically do this;
  uint8_t buf[MAVLINK_MAX_PACKET_LEN];
  mavlink_message_t msg;
  uint8_t command = 512; // MAV_CMD_REQUEST_MESSAGE
  uint8_t param1 = MAVLINK_MSG_ID_RC_CHANNELS_RAW; 
  mavlink_msg_command_long_pack(CC_SYSID, CC_COMPID, &msg, AP_SYS_ID, AP_COMP_ID, command, 0, param1,
                                0, 0, 0, 0, 0, 0);
  uint16_t len = mavlink_msg_to_send_buffer(buf, &msg);
  ardupilotPort.write(buf, len);

Nothing changes, I still get the same messages, I have also tried other messages. Is it possible that I somehow have the Telem 2 port pre-configured for a UART GPS module or some other component?

Hamish Willee

unread,
Aug 4, 2022, 12:29:02 AM8/4/22
to MAVLink
Hi, 

The fact you are getting anything is promising. 
The command looks OK. Do you get an ACK in response to that command? 

At this level this is a flight-stack specific question. I suggest you re-raise it on https://discuss.ardupilot.org/ and also confirm what version of ArduPilot and what vehicle type. 

Regards
Hamish

Paul Hemans

unread,
Aug 4, 2022, 9:38:16 AM8/4/22
to MAVLink
Hi Hamish,
Thanks. I have tried over at the ardupilot forums but didn't get a fix.
I am using Ardurover 4.2.2
There is no ACK message.
I tried Telem 1 and reversed the TX & RX pins and reconfigured the software, in case there was some sort of pin incompatibility but got the same result.
Changed the board as well.
I am tempted to dive into the Ardupilot code, but that is really intimidating. I did download and do a local build and install, but that's as far as I have gotten so far. I wish they were still doing the meetups in Canberra it would be great to have some eyes on this.

Thanks anyway,
Paul

Hamish Willee

unread,
Aug 4, 2022, 6:42:34 PM8/4/22
to MAVLink
Hi Paul,
 Not getting an ACK is usually a pretty bad thing for a command - you should at least be getting a response of some kind.

To debug it myself I'd see if I could run mavproxy or similar in place of your script and see whether that works. If it does, then you know that the link setup is good. I'm also a big fan of wireshark for inspecting traffic too

But really, the best you can do is try again on rover forums providing as much information as possible
1. Your buildable code so people can try
2. The debug info about what is in those heartbeats - i.e. confirm the vehicle is actually in a state to respond 

Where's the link on ardupilot you posted?

Regards
Hamish

Paul Hemans

unread,
Aug 4, 2022, 8:41:15 PM8/4/22
to MAVLink

Paul Hemans

unread,
Aug 7, 2022, 12:01:29 AM8/7/22
to MAVLink
Hi Hamish,
Are you in Australia? If so, would you be open to troubleshooting this for me? I could ship you the pixhawk and the esp32, I am willing to pay. At this point I am out of options.

Regards,
Paul

Reply all
Reply to author
Forward
0 new messages