ChibiOS: MAVLink output on Cube USB-serial link unexpectedly stops, produces only EOF when reading from USB host

We have a pixhawk cube (3.6.9/master branch) connected to a Raspberry pi compute model via USB. Mavproxy on the Rpi intermittently display “no link” messages. During this nothing can be read from the pixhawk like “battery_status” or “SYS_STATUS” for example but, a reboot command goes through and reboots the pixhawk.

It appeared that MAVProxy wasn’t seeing any messages from the autopilot–none of the counters were updating AFAICT: “wp list” didn’t work; “param fetch” didn’t work

mavproxy did respond to commands, and showed that it was sending them to the autopilot,
just didn’t seem to be getting responses.

Running stty on the serial device (just opening + querying it) didn’t work. Well, it worked in that it’s able to open the device and retrieve the serial parameters, but it didn’t have any effect on the link status in mavproxy. Using stty to toggle the baud rate back and forth likewise.

Trying a restart of mavproxy… Link still down

“cat /dev/serial/by-id/usb-ArduPilot_fmuv3_23001D000B51383130383938-if00” seems to just return immediately.

Looks like read() on the FD is just returning zero, which is EOF as far as cat is concerned.

Has anyone else had this issue? I have never seen this while using NuttX.

Any help is appreciated

1 Like

Just don’t use the USB connector of PH. get an FTDI cable and connect to one of the PH2.1 UARTs

Just to add a bit more color here. I work with Arjun and we’ve built well over 100 aircraft using the Pixhawk 2.1 Cube and done over 5000 flights with the NuttX version of APM Copter. We only saw this issue once we moved to ChibiOS. No other changes, and it is replicated across dozens of identical aircraft. Our system is unusable with the ChibiOS release due to this issue as telemetry between the autopilot and companion computer goes down after 10-20 minutes and won’t come up without a reboot.

Moving away from using USB from autopilot to companion computer is not an option. This bug is the last remaining issue preventing us from moving to the ChibiOS software. Unless there is some sort of new parameter/setting that needs to be changed under ChibiOS this seems like a major ChibiOS bug.

2 Likes

No comments or suggestions? This is on an aircraft where the cube is on a custom mainboard already wired for USB. We’re still flying Cube+NuttX at this point due to this issue.

Did you ever get this solved? We are running into a similar issue where the Pixhawk 2 cube connected to MAVProxy over USB will work fine for a while and then display ‘no link’. Rebooting MAVProxy fixes the problem for a while until it happens again

Are you really running Arducopter 3.6? If not, I would suggest you make a new post. If you are, I would wonder why.

Dave-

We are running 4.1 at the moment, but we are having similar issues with MAVProxy. I will start a new thread.

Thank you

-Brian