Cannot Connect USB to Pixhawk on Linux

I’m on Ubuntu 15.10, using the most recent APM Planner 2.0 for the latest Ubuntu stable release.

I am added to dialout and tty groups, and both serial ports in general and the serial port on my Pixhawk work fine in i.e. picocom. Dmseg does not give anything untoward that I can see.

The thing works fine in Windows.

However, when I start APM Planner 2 and click Connect, it shows the connect icon as connected, but nothing happens and no data gets exchanged. No error messages appear on screen or in the terminal. It detects the serial port just fine, it just doesn’t succeed in communicating.

Similarly, it cannot determine the Pixhawk appropriate firmware, even though it can detect the pixhawk, and that it is a pixhawk, on the firmware flash screen.

You have to stop/disable the ModemManager service to connect it on MissionPlanner.

I have done this – sudo apt-get purge modemmanager. It still doesn’t work.

so you do see ttyACMx interface, and select baudrate 115200
or - in case of radio, ttyUSBx , and 57600 ?

I can see the ttyACM0 interface, and I can even send and recieve data using a program like Picocom. I can set baud rate in APM PLanner, I just cannot

I haven’t tried using a radio because I don’t have any.

I just noticed:
“even though it can detect the pixhawk, and that it is a pixhawk, on the firmware flash screen.”

  • this is a known issue fixed a month or few ago, it had to do with Qt seeing incorrect PID/VID.
    Could you build a fresh build from master ? - or I could zip and send you a Ubuntu x64 build…

If that’s a new pixhawk - or one with some strange configuration, it could explain no mavlink, or an unusual baudrate, giving you connection troubles.

I’ll try in a few days. Is the build process reasonably simple?

yes, in Linux instructions - you really only need to do step 1-4
scroll down on this page to find instructions… github.com/diydrones/apm_planner

Tried without any success.

I just tested and it works for me on 15.10 with 2.0.18 (I know not the most helpful message)

I suggest clicking on the ‘baud rate’ box and bring up the connection dialog and make sure you are connected to ttyACM0 and the baud is 115200 for a usb connection.

or enable Advanced mode from the menu and select Add Link and create a new serial link and select ttySCMO there

Otherwise try deleting com.diydrones folder from $HOME/.config folder to start with new settings.

Those are both correct, and it works fine under Windows.

did you try the other suggestions?

yes.

what does groups <your_username> return?

I believe I am having the same issue as OP. I’m on Archlinux if that makes a difference.

[ul]
[li]Plugging in device shows up as /dev/ttyACM0[/li]
[li]APM Planner v2.0.18 was not able to detect my firmware version, not able to update[/li]
[li]APM on Mac, was able to update firmware successfully, that ruled out hardware issues[/li]
[li] Found this post and compiled from GitHub, APM Planner v2.0.19 is able to update firmware successfully on Linux - making progress[/li]
[li] Able to access APM via APM Planner terminal and minicom on /dev/ttyACM0 at baud 115200 [attachment=2]serial.png[/attachment][/li]
[li] Still not getting any APM data such as GPS fix or orientation [attachment=1]no_data.png[/attachment][/li][/ul]

I have attached apm.log as the stdout from APM Planner if that helps. The only thing info I can see is the mode of APM. Not for sure if that is just a default for connected to serial. I’m not seeing any other data or messages coming in.

It looks like my issue is not the same as OP. My Pixhawk doesn’t work on OSX, only the firmware update. My issue is related to solid red LED meaning the Pixhawk hasn’t properly booted, throwing some CRC failure. I’ve posted a new thread on this specific issue.