Pixhawk firmware upload failed

Hi All,
i am finding difficulty for uploading Pixhawk firmware using Webui.
Getting error as follows

Attempting upload from file /tmp/data/ardusub.apj
Stopping mavproxy
Flashing Pixhawk…
Loaded firmware for 9,0, size: 1004192 bytes, waiting for the bootloader…
attempting reboot on /dev/autopilot…
attempting reboot on /dev/autopilot…
attempting reboot on /dev/autopilot…
attempting reboot on /dev/autopilot…
attempting reboot on /dev/autopilot…
attempting reboot on /dev/autopilot…
attempting reboot on /dev/autopilot…
attempting reboot on /dev/autopilot…
attempting reboot on /dev/autopilot…
attempting reboot on /dev/autopilot…
attempting reboot on /dev/autopilot…
attempting reboot on /dev/autopilot…
attempting reboot on /dev/autopilot…
attempting reboot on /dev/autopilot…
attempting reboot on /dev/autopilot…
attempting reboot on /dev/autopilot…
attempting reboot on /dev/autopilot…
attempting reboot on /dev/autopilot…
attempting reboot on /dev/autopilot…
attempting reboot on /dev/autopilot…
attempting reboot on /dev/autopilot…
attempting reboot on /dev/autopilot…
attempting reboot on /dev/autopilot…
attempting reboot on /dev/autopilot…
attempting reboot on /dev/autopilot…
attempting reboot on /dev/autopilot…
attempting reboot on /dev/autopilot…
attempting reboot on /dev/autopilot…
attempting reboot on /dev/autopilot…
attempting reboot on /dev/autopilot…
attempting reboot on /dev/autopilot…
attempting reboot on /dev/autopilot…
attempting reboot on /dev/autopilot…
attempting reboot on /dev/autopilot…
attempting reboot on /dev/autopilot…
Timed out trying to catch bootloader!
Please try again.
Waiting to restart mavproxy…
Restarting mavproxy
Complete!

previous ardusub version : 4.0.1
companion version : 0.0.21

-Thank you

What version of ArduSub are you attempting to upload? Is it a stable version, or one you’ve built yourself? I’ve encountered the same error message before when I mistakenly built ArduSub for the wrong type of board, however I think this error message is thrown for other issues as well.

Thanks for your response Robin.
It is ArduSub Stable version.

HI,

This means that either the Pixhawk is not detected or ir is in a bad state where it is not receiving the reboot message to get into the bootloader.

The best option is to disassemble and flash with QGroundControl via usb.

Hi ,
I tried with another pixhawk and the result was same.
Is there any chance while building ArduSub to cause this error? .
These are my build commands.

cd ~/ardupilot
git fetch --tags
git checkout ArduSub-stable
git submodule update --recursive
export PATH=/home/Desktop/gcc-arm-none-eabi-4_9-2015q3/bin/:$PATH
./waf configure --board Pixhawk1
./waf sub
./waf --upload sub

please guide me if there is anything wrong in these commands.

Thank you

Are you trying to upload via usb? ./waf --upload will try to do so via usb.

If the pixhawk doesn’t restart by itself, unplug it and plug it when ./waf --upload sub asks for it.

I am able to upload via usb, the problem is with WebUI firmware updation. I was trying to flash the generated hex file (. apj) to pixhawk and there i got such error.

-Thank you

Hi @sudheeshk, are you able to communicate to the pixhawk otherwise?
There are two possible issues here:

  • You have no communication to the pixhawk, which means it is unable to receive a mavlink message to reboot.
  • It is not being properly detected by the udev rules we have set up.

What do you see on the system page? Is the pixhawk listed there?

Hi willian,
Pixhawk 1 is listed in Serial Devices under System Tab
also i could reboot the pixhawk from webUI by clicking reboot pixhawk button.

i had sent you another message regarding this issue.i had an ardusub.px4 file . i Just flashed it to pixhawk through QGC custom fimware update option. After this process, i could flash the newly generated ardusub.apj file (ardusub 4.0) through webUI. Once the flashing process completed ,i tried once again , but the result was the same error.
I think the problem is with newly generated firmware.

-Sudheesh

can you check if “Ardusub version” in system page shows “unknown” before the flashing fails?

No, the version is showing 4.0.1

Hi Willian
The problem is now little more clear,
as you said , the pixhawk is not getting rebooted by Mavlink message, (i tried
master.reboot_autopilot() command to verify this. (in ardusub 4.0.1), but instead it gives only " Lost manual control" message
The same command will reboot the pixhawk if it was flashed with ardusub version 3.5.4
from this what my understanding is, the newly generated .apj file can’t accept a command for reboot pixhawk.
please guide me to solve this issue

-sudheesh

I will suggest you to follow the below steps:
First, you should choose the firmware version.
After that just download the firmware.zip file of that version. You may find several firmware files in firmware,zip,such as ‘px4fmu-v3_default.px4’ , ‘px4fmu-v4_default.px4’ and etc.
Then you can try those firmware files.
In my case, I use px4fum-v2_default.px4 file, and others dont work.

1 Like

Hi, can you verify is this happens with the default firmware? (first flash it via usb and then try to flash a new one on top of it via companion)

Everything looks in order here. What branch are you developing on top of? It is possible that master got broken, as it sees a lot of development on multiple vehicles.

Hi Willian,
No problem with old build files (.px4 files),I can flash newly generated .apj file on top of .px4 through webUI only once, once the new .apj file flashed to Pixhawk, then No updation through WebUI is allowed.

This is proving quite hard to track down…
Is your new fw based on 4.0.1 (stable branch)?

yes willian.
i need to provide another information too.
. i am getting usb-ArduPilot_Pixhawk1_340028000551373039383836-if00 when i run ls /dev/serial/by-id command.
is there any problem with this?
How can i solve this?
or can you send me any .apj file you have tested and verified for webui firmware updation ?

I am having the same problem. I bought a replacement PixHawk from Amazon. Can not update it to ArduSub. It’s running Ardupilot, I can see the video and everything but it thinks it’s a quadcopter?