Can't connet to APM 2.6 using Ubuntu 14.04

I am trying to connect APM 2.6 to APM Planner v2.0.18 using Ubuntu 14.04. I downloaded APM Planner using the Ubuntu Software Center. I was able to successfully update my firmware using APM Planner but I am unable to connect so I can change the configuration. When I click on the “connect” button I don’t get any messages but I can see the blue then red LEDs on the APM board blinking and the log.txt file has this:

DEBUG 2015-09-29T10:40:22.898 APMToolBar: connectMAV QObject(0x0) with sLink 1
DEBUG 2015-09-29T10:40:22.899 SerialConnection::connect()
ERROR 2015-09-29T10:40:22.899 serial connection: error 0
DEBUG 2015-09-29T10:40:22.900 APMToolBar setConnection: true
DEBUG 2015-09-29T10:40:22.902 APMToolBar: updateLinkDisplay “ttyACM0” : “115200” connected: true
ERROR 2015-09-29T10:40:22.914 serial connection: error 9
DEBUG 2015-09-29T10:40:22.915 SerialConnection::disconnect() QSerialPort(0xb4f3fe0)
DEBUG 2015-09-29T10:40:22.917 APMToolBar setConnection: false
DEBUG 2015-09-29T10:40:22.918 APMToolBar: updateLinkDisplay “ttyACM0” : “115200” connected: false
ERROR 2015-09-29T10:40:22.918 serial connection: error 13
DEBUG 2015-09-29T10:40:22.919 serial connection: object destroyed: QObject(0xb4f3fe0)

I couldn’t find information about the meaning of error 9 or error 13.

I’m trying to connect with a USB cable using the following settings:
Serial Port: ttyACM0
Baud Rate: 115200
Parity: Nc
Data bits: 8
Stop bits: 1

I was able to connect a few months ago.

Any ideas what I am doing wrong?

Thanks in advance for help.

Ned

Try firmware.diydrones.com/Tools/APM … 015-09-26/ 19-rc version

There was an issue with APM 2.x HW

Thanks for the quick reply. I installed apm_planner_2.0.19-rc2_ubuntu_trusty64.deb but when I run it I am experiencing the same problem. Here is the log info:

DEBUG 2015-09-29T16:24:58.342 APMToolBar: connectMAV QObject(0x0) with sLink 1
DEBUG 2015-09-29T16:24:58.342 SerialConnection::connect()
ERROR 2015-09-29T16:24:58.343 serial connection: error 0
DEBUG 2015-09-29T16:24:58.344 APMToolBar setConnection: true
DEBUG 2015-09-29T16:24:58.352 APMToolBar: updateLinkDisplay “ttyACM0” : “115200” connected: true
ERROR 2015-09-29T16:24:58.356 serial connection: error 9
DEBUG 2015-09-29T16:24:58.357 SerialConnection::disconnect() QSerialPort(0x2ca4b80)
DEBUG 2015-09-29T16:24:58.358 LinkManager::linkDisonnected: “ttyACM0” 1
DEBUG 2015-09-29T16:24:58.359 APMToolBar setConnection: false
DEBUG 2015-09-29T16:24:58.360 APMToolBar: updateLinkDisplay “ttyACM0” : “115200” connected: false
ERROR 2015-09-29T16:24:58.360 serial connection: error 13
DEBUG 2015-09-29T16:24:58.361 serial connection: object destroyed: QObject(0x2ca4b80)
DEBUG 2015-09-29T16:24:59.057 SCW: Link is disconnected
DEBUG 2015-09-29T16:25:00.057 SCW: Link is disconnected

did you try removing the modemmanager?

I removed modemmanager and still had the same problem I then reinstalled APM Planner but the problem persists with the same message in the log file.

I just checked and that error is shown if the baud rate is set incorrectly. Try 115200

I have the baud rate set to 115200 in APN Planner. Are you suggesting that I need to change it on the APM 2.6 board? I’ll try to verify that but I haven’t changed it as far as I know so it should still be 115200. In the log file it seems to indicate that the connection is 115200 or maybe I’m not reading it properly. I’ll see if I can get a window computer to see if it works with mission planner then I can see if the baud rate is ok on the APM 2.6.

For what it’s worth I was able to connect my quad to a Windows computer with a USB cable using Mission Planner.

Have you tried APM Planner 2 on Windows?

I’ve just test with an APM.2.5 and this build firmware.diydrones.com/Tools/APM … 015-09-29/ and it worked for me. Please try the same build and we can go from there.

I tried that new build and still have the same problem. I also tried it on another Ubuntu 14.04 computer and it works there so it appears to be limited to my desktop. The only thing that I can think of that I changed in recent weeks is the graphics driver since the one I was using started to have problems after updating my Linux kernel.

Qt is ‘sensitive’ to a good graphics driver as it uses OpenGL to render some of the UI controls, like the toolbar, PFD, EKF Monitor, Vibration Monitor to name the ones that spring to mind.

Solutions maybe just building a version with Qt5.4.x instead of Qy5.2.1 that we currently using also (OSX and 15.04 are using Qt5.4.1 and Qt5.4.2 respectively)

I am experiencing exactly the same problem.
On one Ubuntu 14.04 I can connect, both with radio and usb cable, on the other, i can not.

The log output is:

INFO 2015-10-04T10:39:15.772 QGCCore::initialize()
INFO 2015-10-04T10:39:15.779 Current Build Info
INFO 2015-10-04T10:39:15.779 Git Hash: 51b6aa9218a0042744c31a7ea6f03752e5c9baa9
INFO 2015-10-04T10:39:15.779 Git Commit: 2.0.18-DEV
INFO 2015-10-04T10:39:15.780 APPLICATION_NAME: "APM Planner"
INFO 2015-10-04T10:39:15.780 APPLICATION_VERSION: "v2.0.18"
INFO 2015-10-04T10:39:15.780 APP_PLATFORM: ubuntu_trusty64
INFO 2015-10-04T10:39:15.781 APP_TYPE: stable
INFO 2015-10-04T10:39:15.999 Start Link Manager
DEBUG 2015-10-04T10:39:16.000 Create MAVLinkDecoder: MAVLinkDecoder(0x2c32870)
INFO 2015-10-04T10:39:16.001 Start UAS Manager
DEBUG 2015-10-04T10:39:16.343 Creating MainWindow
INFO 2015-10-04T10:39:16.587 Creating SubMainWindow: SubMainWindow(0x2cd6620)
INFO 2015-10-04T10:39:16.587 setting objectName: "VIEW_MISSION"
INFO 2015-10-04T10:39:16.676 Creating SubMainWindow: SubMainWindow(0x2c010e0)
INFO 2015-10-04T10:39:16.677 setting objectName: "VIEW_FLIGHT"
INFO 2015-10-04T10:39:16.746 Creating SubMainWindow: SubMainWindow(0x2d96530)
INFO 2015-10-04T10:39:16.746 setting objectName: "VIEW_HARDWARE_CONFIG"
DEBUG 2015-10-04T10:39:16.988 fillPortsInfo
INFO 2015-10-04T10:39:17.000 Inserting "ttyACM0"
INFO 2015-10-04T10:39:17.000 Changed Link to: "ttyACM0"
INFO 2015-10-04T10:39:17.630 Creating SubMainWindow: SubMainWindow(0x2e12c30)
INFO 2015-10-04T10:39:17.631 setting objectName: "VIEW_SOFTWARE_CONFIG"
DEBUG 2015-10-04T10:39:17.672 Disable Controls
INFO 2015-10-04T10:39:18.051 Creating SubMainWindow: SubMainWindow(0x3b63350)
INFO 2015-10-04T10:39:18.051 setting objectName: "VIEW_ENGINEER"
INFO 2015-10-04T10:39:18.118 Creating SubMainWindow: SubMainWindow(0x3c66290)
INFO 2015-10-04T10:39:18.119 setting objectName: "VIEW_SIMULATOR"
DEBUG 2015-10-04T10:39:18.226 MODE: 0
DEBUG 2015-10-04T10:39:18.228 "D|PREFLIGHT"
DEBUG 2015-10-04T10:39:18.229 MODE: 80
DEBUG 2015-10-04T10:39:18.230 "D|STABILIZED"
DEBUG 2015-10-04T10:39:18.231 MODE: 64
DEBUG 2015-10-04T10:39:18.232 "D|MANUAL"
DEBUG 2015-10-04T10:39:18.232 MODE: 88
DEBUG 2015-10-04T10:39:18.233 "D|VECTOR|STABILIZED"
DEBUG 2015-10-04T10:39:18.234 MODE: 92
DEBUG 2015-10-04T10:39:18.235 "D|AUTO|STABILIZED"
DEBUG 2015-10-04T10:39:18.235 MODE: 66
DEBUG 2015-10-04T10:39:18.236 "D|TEST"
DEBUG 2015-10-04T10:39:18.406 QUrl( “file:///usr/share/APMPlanner2/qml/PrimaryFlightDisplayQML.qml” )
DEBUG 2015-10-04T10:39:18.600 QML Status: 1
DEBUG 2015-10-04T10:39:18.604 QUrl( “file:///usr/share/APMPlanner2/qml/PrimaryFlightDisplayQML.qml” )
DEBUG 2015-10-04T10:39:18.713 QML Status: 1
INFO 2015-10-04T10:39:18.726 UASActionsWidget creating UASActionsWidget(0x41e2890)
DEBUG 2015-10-04T10:39:18.734 QuickView: load settings
DEBUG 2015-10-04T10:39:18.736 QuickView: loading key: “GCS Status.Altitude (GPS) (m)” type: "text"
DEBUG 2015-10-04T10:39:18.751 QuickView: loading key: “GCS Status.Altitude (REL) (m)” type: "text"
DEBUG 2015-10-04T10:39:18.756 QuickView: loading key: “GCS Status.Battery (%)” type: "text"
DEBUG 2015-10-04T10:39:18.762 QuickView: loading key: “GCS Status.Climb (m/s)” type: "text"
DEBUG 2015-10-04T10:39:18.768 QuickView: loading key: “GCS Status.Current (A)” type: "text"
DEBUG 2015-10-04T10:39:18.775 QuickView: loading key: “GCS Status.GPS Fix ()” type: "text"
DEBUG 2015-10-04T10:39:18.783 QuickView: loading key: “GCS Status.GPS HDOP (m)” type: "text"
DEBUG 2015-10-04T10:39:18.791 QuickView: loading key: “GCS Status.GPS Sats ()” type: "text"
DEBUG 2015-10-04T10:39:18.800 QuickView: loading key: “GCS Status.Pitch (deg)” type: "text"
DEBUG 2015-10-04T10:39:18.809 QuickView: loading key: “GCS Status.Roll (deg)” type: "text"
DEBUG 2015-10-04T10:39:18.819 QuickView: loading key: “GCS Status.Voltage (V)” type: "text"
DEBUG 2015-10-04T10:39:18.829 QuickView: loading key: “GCS Status.Yaw (deg)” type: "text"
DEBUG 2015-10-04T10:39:18.847 QuickView: load settings END
INFO 2015-10-04T10:39:18.981 Using Alsa Audio driver
WARN 2015-10-04T10:39:18.982 Dir directory tmp_audio exists
DEBUG 2015-10-04T10:39:19.004 qmlBaseDir "/usr/share/APMPlanner2"
DEBUG 2015-10-04T10:39:19.005 QUrl( “file:///usr/share/APMPlanner2/qml/ApmToolBar.qml” )
DEBUG 2015-10-04T10:39:19.098 QML Status: 1
DEBUG 2015-10-04T10:39:19.113 Loading widget: "PRIMARY_FLIGHT_DISPLAY_QML_DOCKWIDGET"
DEBUG 2015-10-04T10:39:19.114 Loading widget: "UAS_INFO_INFOVIEW_DOCKWIDGET"
INFO 2015-10-04T10:39:19.748 UDP Created "UDP Link (port:14550)"
INFO 2015-10-04T10:39:19.752 UDP disconnect
INFO 2015-10-04T10:39:19.754 UDPLink::UDP connect QHostAddress( “0.0.0.0” ) : 14550
ERROR 2015-10-04T10:39:19.760 bind failed! QHostAddress( “0.0.0.0” ) : 14550
DEBUG 2015-10-04T10:39:19.763 Create Serial Connection: SerialConnection(0x47c2ed0)
INFO 2015-10-04T10:39:19.765 “ttyACM0” 115200
DEBUG 2015-10-04T10:39:19.798 APMToolBar: new Serial Link Created 2
DEBUG 2015-10-04T10:39:19.805 APMToolBar setConnection: false
DEBUG 2015-10-04T10:39:19.813 APMToolBar: updateLinkDisplay “ttyACM0” : “115200” connected: false
DEBUG 2015-10-04T10:39:19.836 Inserting "ttyACM0"
DEBUG 2015-10-04T10:39:19.859 Requesting firmware: “stable” "apm"
DEBUG 2015-10-04T10:39:19.872 “apm” Detected
DEBUG 2015-10-04T10:39:19.946 SCW: Link is disconnected
DEBUG 2015-10-04T10:39:19.974 Baud rate: 115200 Expected: 4
DEBUG 2015-10-04T10:39:22.541 APMToolBar: connectMAV QObject(0x0) with sLink 2
DEBUG 2015-10-04T10:39:22.543 SerialConnection::connect()
ERROR 2015-10-04T10:39:22.545 serial connection: error 0
DEBUG 2015-10-04T10:39:22.550 APMToolBar setConnection: true
DEBUG 2015-10-04T10:39:22.553 APMToolBar: updateLinkDisplay “ttyACM0” : “115200” connected: true
ERROR 2015-10-04T10:39:22.558 serial connection: error 8
DEBUG 2015-10-04T10:39:22.560 SerialConnection::disconnect() QSerialPort(0x4217bb0)
DEBUG 2015-10-04T10:39:22.583 APMToolBar setConnection: false
DEBUG 2015-10-04T10:39:22.585 APMToolBar: updateLinkDisplay “ttyACM0” : “115200” connected: false
ERROR 2015-10-04T10:39:22.587 serial connection: error 13
DEBUG 2015-10-04T10:39:22.589 serial connection: object destroyed: QObject(0x4217bb0)
DEBUG 2015-10-04T10:39:24.425 "retrieve versionobject from server: firmware.diydrones.com/Tools/APM … rsion.json"
DEBUG 2015-10-04T10:39:24.769 Downloading: 2767 / 2767
DEBUG 2015-10-04T10:39:24.770 Downloading: 2767 / 2767
DEBUG 2015-10-04T10:39:24.772 AutoUpdateCheck::httpFinished()
DEBUG 2015-10-04T10:39:24.779 Detected newVersion: (“2.0.18”, “2.0.18”, “”) count: 2
DEBUG 2015-10-04T10:39:24.780 Detected currentVersion: (“2.0.18”, “2.0.18”, “”) count: 2
DEBUG 2015-10-04T10:39:24.782 Verison Compare: " New Version 2.0.18 compared to Old Version 2.0.18"
INFO 2015-10-04T10:39:24.784 no new update available

checking with ldd I realized that the differences are about the graphic card drivers.
lib Qt is the same last version from the repository.

I tried also the daily build, but as for nedhorning, still not working.

I am going to mess my graphic configuration installing the fglrx driver, but I do not think it will make the difference, because this release was 2.0.18 was working until the last reboot (probably the I forgot to close properly apm2).

I will inform you about the result of my attempt.

I have a question about the log:

at a certain line it says:
DEBUG 2015-10-04T10:39:19.974 Baud rate: 115200 Expected: 4

What does it means? 4 baud expected?
Where is it written?
I tried also to rename the apmplaner2 folder and recreated it, but I had no luck.
I Removed and reinstalled apm2, but this line is always there.
Is there a way to remove all traces of the installation from the home folder?

tnx

there’s a new 2.0.19-rc3 build here firmware.diydrones.com/Tools/APMPlanner/beta/ try that

Also you can delete your config settings from ~/.config/com.diydrones folder, may help

Thanks for the quick reply.
I tried cleaning all traces of previous installation, but still same thing: no connection and same log.
I installed 2.0.19.rc3, but still no way to make a connection.

I am going to try compiling the source, but I am a little sceptic that it could make a difference.

I will keep you informed on the evolution.
If somebody have a solution… It would be great

Building the source will probably not solve the issue.

try cehcking that your user is in the dialout group and that modemmanger is not installed.

the error code for the serial port are here doc.qt.io/qt-5/qserialport.html# … Error-enum

I followed all the suggestions, but nothing.
Now also my Desktop is having the same problem.

Using a generic serial monitor I can see my APM, Using apmplanner it loose connection as it establish it.
I tried also as super user, but nothing…
Please, HELP

I have the same problem. I use the operating system Ubuntu 14.04 64 bit . Is there any who can help ?

Seems to have been a Python update that broke all ComPort connectivity with APM Planner 2, Using MiniCom I can connect to the radio-modem and the Arduino, but attempting to use the APM Planner will reset the Arduino Mega with the CTS signal ( If I remember it right )

Radio modem connection works with the Android Tablet with OTG Port, will work directly with Win7 in a VM and Mission Planner 1.3.32, so hardware is running ok, just APM Planner’s libraries seem to be broken.

If there is someone more “Pythonish” can do the root cause analysis with the APM in Ubuntu would be most appreciated

I have tested APM Planner 2.0.19-rc3 on Xubuntu 14.04.3 with an APM2.6. I also tested on Linux Mint 17.1 (x32) with APM2.6. Both work as expected.

There is no direct dependency on Python in APM Planner 2.0 (accept the calling of the 3DR Radio FW updater).

The issue is likely due to how you have linux configured.
make sure you have the dial out group set ‘sudo adduser dialout’ and the modemmanager is uninstalled. ‘sudo apt-get remove modem manager’

Another test is to try and connect using telemetry radios as this uses a different linux device driver.