APM Planner 2.0.29-rc1 Hangs Updating Pixhawk firmware

I am trying to upload firmware to a Pixhawk 2.4.8 using APM Planner 2.0.29-rc1 running on Debian linux using Parallels on an iMac. The upload appears to start fine but hangs at this message:

[20210725 18:23:11.031 INFO ] - flashing: 6000 / 1202368

No further progress is made.

I am trying to load Copter 4.0.7 Category OFFICIAL Platform: fmuv3. The file is arducopter.apj.

The Pixhawk is Description: PX4 BL FMU v.3.x Manufacturer: 3D Robotics, Vendor-Ident 0x26ac and Product Ident. 0x11.

Status Info:

Fetching available firmwares from: firmware.ardupilot.org/manifest.json

Fetching done.

Found 12530 firmwares.

Downloading firmware firmware.ardupilot.org/Copter/stable/fmuv3/arducopter.apj

Start flashing firmware.

Waiting for replug of fc connected to ttyACM0

Flight controller reconnected - reading bootloader data.

Board ID: 9

Board Rev: 0

Flash rom Size: 2080768

Requesting board Serial Number

Serial Number: 0x002f001e3237511538343932

Erasing board. This may take a while - do not disconnect or power off!

Erase Complete

Flashing Firmware

It won’t let a newbie post the full log. But I figure out how to send it if it is helpful.

– Doug

Here is the full log:

QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to ‘/tmp/runtime-root’
[20210725 18:21:36.338 INFO ] - QGCCore::initialize()
[20210725 18:21:36.338 INFO ] - Current Build Info
[20210725 18:21:36.338 INFO ] - Git Hash: 38f14c34aa4af80e89f5bdae207e69e6bb81e750
[20210725 18:21:36.338 INFO ] - Git Commit: 2.0.29-rc1-6-g38f14c34a
[20210725 18:21:36.338 INFO ] - APPLICATION_NAME: “APM Planner”
[20210725 18:21:36.338 INFO ] - APPLICATION_VERSION: “v2.0.29-rc1”
[20210725 18:21:36.338 INFO ] - APP_PLATFORM: debian32
[20210725 18:21:36.339 INFO ] - APP_TYPE: stable
error: XDG_RUNTIME_DIR not set in the environment.
[20210725 18:21:36.382 INFO ] - Start Link Manager
[20210725 18:21:36.382 DEBUG] - Create MAVLinkDecoder: MAVLinkDecoder(0x5634423e8e40)
[20210725 18:21:36.384 INFO ] - Start UAS Manager
[20210725 18:21:36.408 DEBUG] - Creating MainWindow
[20210725 18:21:36.446 INFO ] - Creating SubMainWindow: SubMainWindow(0x5634426aa440)
[20210725 18:21:36.446 INFO ] - setting objectName: “VIEW_MISSION”
[20210725 18:21:36.460 INFO ] - Creating SubMainWindow: SubMainWindow(0x5634426f9060)
[20210725 18:21:36.460 INFO ] - setting objectName: “VIEW_FLIGHT”
[20210725 18:21:36.467 INFO ] - Creating SubMainWindow: SubMainWindow(0x5634427714e0)
[20210725 18:21:36.467 INFO ] - setting objectName: “VIEW_HARDWARE_CONFIG”
[20210725 18:21:36.516 DEBUG] - fillPortsInfo
[20210725 18:21:36.525 INFO ] - Inserting “ttyACM0”
[20210725 18:21:36.525 INFO ] - Changed Link to: “ttyACM0”
[20210725 18:21:36.552 WARN ] - libpng warning: iCCP: known incorrect sRGB profile
[20210725 18:21:36.554 WARN ] - libpng warning: iCCP: known incorrect sRGB profile
[20210725 18:21:36.555 WARN ] - libpng warning: iCCP: known incorrect sRGB profile
[20210725 18:21:36.580 WARN ] - QStackedWidget::setCurrentWidget: widget 0x0 not contained in stack
[20210725 18:21:36.631 INFO ] - Creating SubMainWindow: SubMainWindow(0x56344283a6e0)
[20210725 18:21:36.631 INFO ] - setting objectName: “VIEW_SOFTWARE_CONFIG”
[20210725 18:21:36.638 DEBUG] - Disable Controls
[20210725 18:21:36.648 INFO ] - BasicPidConfig Class only supports ArduPilotMegaMAV vehicles.
[20210725 18:21:36.701 INFO ] - Creating SubMainWindow: SubMainWindow(0x5634435c9030)
[20210725 18:21:36.701 INFO ] - setting objectName: “VIEW_ENGINEER”
[20210725 18:21:36.705 INFO ] - Creating SubMainWindow: SubMainWindow(0x56344362c020)
[20210725 18:21:36.705 INFO ] - setting objectName: “VIEW_SIMULATOR”
[20210725 18:21:36.719 DEBUG] - MODE: 0
[20210725 18:21:36.721 DEBUG] - “D|PREFLIGHT”
[20210725 18:21:36.721 DEBUG] - MODE: 80
[20210725 18:21:36.721 DEBUG] - “D|STABILIZED”
[20210725 18:21:36.721 DEBUG] - MODE: 64
[20210725 18:21:36.721 DEBUG] - “D|MANUAL”
[20210725 18:21:36.721 DEBUG] - MODE: 88
[20210725 18:21:36.721 DEBUG] - “D|VECTOR|STABILIZED”
[20210725 18:21:36.721 DEBUG] - MODE: 92
[20210725 18:21:36.721 DEBUG] - “D|AUTO|STABILIZED”
[20210725 18:21:36.722 DEBUG] - MODE: 66
[20210725 18:21:36.722 DEBUG] - “D|TEST”
[20210725 18:21:36.747 DEBUG] - QUrl(“file:///home/parallels/workspace/work2/apm_planner/qml/PrimaryFlightDisplayQML.qml”)
[20210725 18:21:36.822 DEBUG] - QML Status: QQuickView::Ready
[20210725 18:21:36.823 DEBUG] - QUrl(“file:///home/parallels/workspace/work2/apm_planner/qml/PrimaryFlightDisplayQML.qml”)
[20210725 18:21:36.834 DEBUG] - QML Status: QQuickView::Ready
[20210725 18:21:36.836 INFO ] - UASActionsWidget creating UASActionsWidget(0x563443ad3d40)
[20210725 18:21:36.837 DEBUG] - QuickView: load settings
[20210725 18:21:36.837 DEBUG] - QuickView: loading key: “GCS GPS.GPS Fix ()” type: “text”
[20210725 18:21:36.839 DEBUG] - QuickView: loading key: “GCS GPS.GPS HDOP ()” type: “text”
[20210725 18:21:36.839 DEBUG] - QuickView: loading key: “GCS GPS.GPS Sats (n)” type: “text”
[20210725 18:21:36.840 DEBUG] - QuickView: loading key: “GCS Metric.Alt MSL (m)” type: “text”
[20210725 18:21:36.841 DEBUG] - QuickView: loading key: “GCS Metric.Alt REL (m)” type: “text”
[20210725 18:21:36.841 DEBUG] - QuickView: loading key: “GCS Status.Battery (%)” type: “text”
[20210725 18:21:36.842 DEBUG] - QuickView: loading key: “GCS Status.Climb (m/s)” type: “text”
[20210725 18:21:36.843 DEBUG] - QuickView: loading key: “GCS Status.Current (A)” type: “text”
[20210725 18:21:36.844 DEBUG] - QuickView: loading key: “GCS Status.Pitch (deg)” type: “text”
[20210725 18:21:36.845 DEBUG] - QuickView: loading key: “GCS Status.Roll (deg)” type: “text”
[20210725 18:21:36.846 DEBUG] - QuickView: loading key: “GCS Status.Voltage (V)” type: “text”
[20210725 18:21:36.847 DEBUG] - QuickView: loading key: “GCS Status.Yaw (deg)” type: “text”
[20210725 18:21:36.849 DEBUG] - QuickView: load settings END
[20210725 18:21:36.872 DEBUG] - qmlBaseDir “/home/parallels/workspace/work2/apm_planner”
[20210725 18:21:36.872 DEBUG] - QUrl(“file:///home/parallels/workspace/work2/apm_planner/qml/ApmToolBar.qml”)
[20210725 18:21:36.878 DEBUG] - APMToolBar: button label SELECTED
[20210725 18:21:36.880 DEBUG] - QML Status: QQuickView::Ready
[20210725 18:21:36.881 DEBUG] - Setting for “USER_DONATED” : QVariant(QString, “false”)
[20210725 18:21:36.881 DEBUG] - Set Advanced Mode false USER_DONATED:false
[20210725 18:21:36.881 DEBUG] - Donate visible
[20210725 18:21:36.882 INFO ] - NETWORK_PROXY: Disabling System Network Proxies
[20210725 18:21:36.884 DEBUG] - Loading widget: “PRIMARY_FLIGHT_DISPLAY_QML_DOCKWIDGET”
[20210725 18:21:36.884 DEBUG] - Loading widget: “UAS_INFO_INFOVIEW_DOCKWIDGET”
[20210725 18:21:36.940 WARN ] - QSettings::endGroup: No matching beginGroup()
[20210725 18:21:36.959 DEBUG] - Create Serial Connection: SerialConnection(0x5634437ccd40)
[20210725 18:21:36.959 INFO ] - “ttyACM0” 115200
[20210725 18:21:36.964 DEBUG] - APMToolBar: new Serial Link Created 1
[20210725 18:21:36.964 DEBUG] - APMToolBar setConnection: false
[20210725 18:21:36.964 DEBUG] - APMToolBar: updateLinkDisplay “ttyACM0” : “115200” connected: false
[20210725 18:21:36.964 INFO ] - UDP Created “UDP Link (port:14550)”
[20210725 18:21:36.965 INFO ] - UDPLink::UDP connect QHostAddress(QHostAddress::Any) : 14550
[20210725 18:21:37.296 DEBUG] - SCW: Link is disconnected
[20210725 18:21:37.302 DEBUG] - Baud rate: 115200 Expected: 4
[20210725 18:21:37.494 DEBUG] - Writing ( “https://autotest.ardupilot.org/Parameters/ArduPlane/apm.pdef.xml” ) to ( “/root/apmplanner2/ardupilotmega/arduplane.pdef.xml” )
[20210725 18:21:37.577 DEBUG] - Writing ( “” ) to ( “/root/apmplanner2/ardupilotmega/arducopter.pdef.xml” )
[20210725 18:21:37.644 DEBUG] - Writing ( “” ) to ( “/root/apmplanner2/ardupilotmega/ardurover.pdef.xml” )
[20210725 18:21:42.192 DEBUG] - “retrieve versionobject from server: https://firmware.ardupilot.org/Tools/APMPlanner/apm_planner_version.json
[20210725 18:21:42.424 DEBUG] - Downloading: 2850 / 2850
[20210725 18:21:42.425 DEBUG] - Downloading: 2850 / 2850
[20210725 18:21:42.425 DEBUG] - AutoUpdateCheck::httpFinished()
[20210725 18:21:45.802 WARN ] - libpng warning: iCCP: known incorrect sRGB profile
[20210725 18:22:04.869 DEBUG] - APMToolBar: INITIAL SETUP SELECTED
[20210725 18:22:04.869 DEBUG] - APMToolBar: clear selected buttons
[20210725 18:22:04.870 DEBUG] - APMToolBar: FLIGHT DATA unselected
[20210725 18:22:04.870 DEBUG] - APMToolBar: INITIAL SETUP unselected
[20210725 18:22:04.886 DEBUG] - ApmCustomFirmwareConfig: Install Firmware selected
[20210725 18:22:04.886 DEBUG] - ApmCustomFirmwareConfig: Fetching available firmwares from: “https://firmware.ardupilot.org/manifest.json
[20210725 18:22:04.893 DEBUG] - APMToolBar: INITIAL SETUP SELECTED
[20210725 18:22:05.415 DEBUG] - ApmCustomFirmwareConfig: Fetching available firmwares finished
[20210725 18:22:05.441 DEBUG] - ApmCustomFirmwareConfig: Firmware list version is “1.0.0”
[20210725 18:22:05.442 DEBUG] - ApmCustomFirmwareConfig: Found 12530 firmwares.
[20210725 18:22:05.470 DEBUG] - Found 8778 elements ins category “STABLE”
[20210725 18:22:05.473 DEBUG] - Found 49 elements for platform “edge”
[20210725 18:22:05.473 DEBUG] - Found 1 elements for mavtype “ANTENNA_TRACKER”
[20210725 18:22:05.473 DEBUG] - Found valid Firmware for version: “1.1.0” on index: 0
[20210725 18:22:13.087 DEBUG] - Found 993 elements ins category “OFFICIAL”
[20210725 18:22:13.087 DEBUG] - Found 6 elements for platform “edge”
[20210725 18:22:13.087 DEBUG] - Found 1 elements for mavtype “ANTENNA_TRACKER”
[20210725 18:22:13.088 DEBUG] - Found valid Firmware for version: “1.1.0” on index: 123
[20210725 18:22:17.526 DEBUG] - Found 5 elements for platform “fmuv2”
[20210725 18:22:17.527 DEBUG] - Found 1 elements for mavtype “ANTENNA_TRACKER”
[20210725 18:22:17.527 DEBUG] - Found valid Firmware for version: “1.1.0” on index: 145
[20210725 18:22:30.251 DEBUG] - Found 18 elements for platform “fmuv3”
[20210725 18:22:30.251 DEBUG] - Found 3 elements for mavtype “ANTENNA_TRACKER”
[20210725 18:22:30.251 DEBUG] - Found valid Firmware for version: “1.1.0” on index: 193
[20210725 18:22:30.252 DEBUG] - Found valid Firmware for version: “1.1.0” on index: 194
[20210725 18:22:30.252 DEBUG] - Found valid Firmware for version: “1.1.0” on index: 195
[20210725 18:22:33.255 DEBUG] - Found 3 elements for mavtype “Copter”
[20210725 18:22:33.256 DEBUG] - Found valid Firmware for version: “4.0.7” on index: 6108
[20210725 18:22:33.256 DEBUG] - Found valid Firmware for version: “4.0.7” on index: 6109
[20210725 18:22:33.257 DEBUG] - Found valid Firmware for version: “4.0.7” on index: 6110
[20210725 18:22:36.802 DEBUG] - Selected Firmware on index: 6109
[20210725 18:22:36.803 DEBUG] - With info: QJsonObject({“USBID”:[“0x1209/0x5741”,“0x26AC/0x0011”],“board_id”:9,“bootloader_str”:[“fmuv3-BL”,“PX4 BL FMU v2.x”],“format”:“apj”,“git-sha”:“0bb18a153c73e751e0b259f011994d47ec643a11”,“image_size”:1202368,“latest”:0,“mav-autopilot”:“ARDUPILOTMEGA”,“mav-firmware-version”:“4.0.7”,“mav-firmware-version-major”:“4”,“mav-firmware-version-minor”:“0”,“mav-firmware-version-patch”:“7”,“mav-firmware-version-type”:“OFFICIAL”,“mav-type”:“Copter”,“platform”:“fmuv3”,"",“vehicletype”:“Copter”})
[20210725 18:22:44.870 DEBUG] - Selected Firmware on index: 6108
[20210725 18:22:44.870 DEBUG] - With info: QJsonObject({“format”:“hex”,“git-sha”:“0bb18a153c73e751e0b259f011994d47ec643a11”,“latest”:0,“mav-autopilot”:“ARDUPILOTMEGA”,“mav-firmware-version”:“4.0.7”,“mav-firmware-version-major”:“4”,“mav-firmware-version-minor”:“0”,“mav-firmware-version-patch”:“7”,“mav-firmware-version-type”:“OFFICIAL”,“mav-type”:“Copter”,“platform”:“fmuv3”,“url”:“firmware.ardupilot.org/Copter/stable/fmuv3/arducopter_with_bl.hex",“vehicletype”:"Copter”})
[20210725 18:22:48.723 DEBUG] - ApmCustomFirmwareConfig: Selected Device: “ttyACM0” , “PX4 BL FMU v3.x” , “3D Robotics” , Vendor: “0x26AC” , ProdID: “0x0011”
[20210725 18:22:53.440 DEBUG] - Selected Firmware on index: 6109
[20210725 18:22:53.441 DEBUG] - With info: QJsonObject({“USBID”:[“0x1209/0x5741”,“0x26AC/0x0011”],“board_id”:9,“bootloader_str”:[“fmuv3-BL”,“PX4 BL FMU v2.x”],“format”:“apj”,“git-sha”:“0bb18a153c73e751e0b259f011994d47ec643a11”,“image_size”:1202368,“latest”:0,“mav-autopilot”:“ARDUPILOTMEGA”,“mav-firmware-version”:“4.0.7”,“mav-firmware-version-major”:“4”,“mav-firmware-version-minor”:“0”,“mav-firmware-version-patch”:“7”,“mav-firmware-version-type”:“OFFICIAL”,“mav-type”:“Copter”,“platform”:“fmuv3”,“url”:",“vehicletype”:“Copter”})
[20210725 18:22:55.517 DEBUG] - Selected Firmware on index: 6110
[20210725 18:22:55.518 DEBUG] - With info: QJsonObject({“format”:“hex”,“git-sha”:“0bb18a153c73e751e0b259f011994d47ec643a11”,“latest”:0,“mav-autopilot”:“ARDUPILOTMEGA”,“mav-firmware-version”:“4.0.7”,“mav-firmware-version-major”:“4”,“mav-firmware-version-minor”:“0”,“mav-firmware-version-patch”:“7”,“mav-firmware-version-type”:“OFFICIAL”,“mav-type”:“Copter”,“platform”:“fmuv3”,“url”:"",“vehicletype”:“Copter”})
[20210725 18:22:56.697 DEBUG] - Selected Firmware on index: 6109
[20210725 18:22:56.698 DEBUG] - With info: QJsonObject({“USBID”:[“0x1209/0x5741”,“0x26AC/0x0011”],“board_id”:9,“bootloader_str”:[“fmuv3-BL”,“PX4 BL FMU v2.x”],“format”:“apj”,“git-sha”:“0bb18a153c73e751e0b259f011994d47ec643a11”,“image_size”:1202368,“latest”:0,“mav-autopilot”:“ARDUPILOTMEGA”,“mav-firmware-version”:“4.0.7”,“mav-firmware-version-major”:“4”,“mav-firmware-version-minor”:“0”,“mav-firmware-version-patch”:“7”,“mav-firmware-version-type”:“OFFICIAL”,“mav-type”:“Copter”,“platform”:“fmuv3”,“url”:"",“vehicletype”:“Copter”})
[20210725 18:23:02.201 DEBUG] - ApmCustomFirmwareConfig::flashFWButtonClicked
[20210725 18:23:02.202 DEBUG] - Downloading “https://firmware.ardupilot.org/Copter/stable/fmuv3/arducopter.apj
[20210725 18:23:02.585 DEBUG] - ApmCustomFirmwareConfig: downloading firmware finished successful
[20210725 18:23:02.610 INFO ] - Firmware size: 1202368 expected 1202368 bytes
[20210725 18:23:02.613 DEBUG] - Requesting device replug
[20210725 18:23:02.614 DEBUG] - ApmCustomFirmwareConfig::requestDeviceReplug
[20210725 18:23:09.699 INFO ] - Port found! “ttyACM0”
[20210725 18:23:09.699 DEBUG] - ApmCustomFirmwareConfig::deviceReplugDetected
[20210725 18:23:09.735 DEBUG] - Board ID: 9
[20210725 18:23:09.749 DEBUG] - Board Rev: 0
[20210725 18:23:09.752 DEBUG] - Flash rom Size: 2080768
[20210725 18:23:09.753 INFO ] - Device Info read complete
[20210725 18:23:09.781 INFO ] - SN read complete “002f001e3237511538343932”
[20210725 18:23:09.782 INFO ] - Requesting erase
[20210725 18:23:10.267 INFO ] - Erase complete
[20210725 18:23:10.267 INFO ] - Flash requested, flashing firmware
[20210725 18:23:10.267 DEBUG] - ApmCustomFirmwareConfig::startFlashing
[20210725 18:23:10.269 INFO ] - flashing: 0 / 1202368
[20210725 18:23:10.670 INFO ] - flashing: 3000 / 1202368
[20210725 18:23:11.031 INFO ] - flashing: 6000 / 1202368

OK. I solved my own problem. Searching around found there could be problems with ubuntu modem manager. The post suggested the following commands to remove it:

sudo usermod -a -G dialout $USER
sudo apt-get remove modemmanager -y
sudo apt install gstreamer1.0-plugins-bad gstreamer1.0-libav gstreamer1.0-gl -y

That worked. Install of Copter 4.0.7 was flawless.

– Doug