Upgrading ArduCopter to Copter 4.0.3

I’ve successfully built my quadcopter with navio2 + RPI3 and i’m trying to calibrate the sensors in MP. But it doesn’t work and it seems that it wants an upgrade because it always shows that 4.0.3 is available.
So i’ve build the 4.0.3 for navio2 following these guides:
And I’ve edited the file with the path.
But when i launch it it fails:
Process: 884 ExecStart=/bin/sh -c /home/pi/ardupilot/build/navio2 ${ARDUPILOT_OPTS] (code=exited, status=126)

I’ve also another issue, sometimes, I can’t connect to arducopter because when it gets parameters, it’s blocked on STAT_RUNTIME

Thank you for your help

Hi Jules,

Welcome to the community forum and sorry for the delayed answer!

This error comes from the incorrect path to the Ardupilot binaries. I suppose, your full path should be something like this:

#ExecStart=/bin/sh -c "/home/pi/ardupilot/build/navio2/bin/ardu* ${ARDUPILOT_OPTS}"

Instead of an asterisk, you should insert the naming of the vehicle you want to use. Please note, that you need to edit the arducopter.service or arduplane.service files (or the files with other vehicles), not ardupilot.service.

As I’ve checked, Mission Planner gets stuck on STAT_RUNTIME when there is a bad parameter or bad value. Would it be possible to check if the full reset of the parameters will work for you? You can learn more about this issue on Ardupilot’s forum thread.

@liudmila.slepova I need help regard the update process…

I have successfuly compiled the new arducopter 4.0.3 firmware and now i have the /home/pi/ardupilot/build/navio2/bin/arducopter.bin file

Now what should I do to proceed with the installation using ardupilot?

I don’t find passages in the guide where it is indicated to change routes, etc …

Can you or someone else tell me all the steps to take to be able to use the ardupilot interface and install the new version of arducopter?

I will try to guide you along the path I use to follow…

All bold type are commands to enter

arducopter file (3.6.x) is in /opt/ardupilot/navio2/arducopter-3.6/bin/

We want to replace it with the fresh 4.03 version you just compile. Before we have to backup it in order to use it if needed later.

cd /opt/ardupilot/navio2/arducopter-3.6/bin/

ls -l to show what is present in the directory (arducopter)

sudo mv arducopter arducopterlatest to rename arducopter


now we go back into ardupilot build folder

cd ardupilot/build/navio2/bin

Check arducopter is in the right place:

ls -l

Capture d’écran 2020-08-27 à 08.53.26

and copy this file in the /opt/…

sudo cp arducopter /opt/ardupilot/navio2/arducopter-3.6/bin/arducopter

cd /opt/ardupilot/navio2/arducopter-3.6/bin
ls -l to verify if copy is OK

Capture d’écran 2020-08-27 à 08.59.38

sudo reboot

You are running your compiled arducopter version


Hi i’m currently facing to a similar situation, so it might help to cross informations:

1°) I tried to Compile with waf from raspberry, in ran well t’ill i got that error message:

"> …/…/libraries/AP_GPS/AP_GPS.cpp: In member function ‘void AP_GPS::send_mavlink_gps_raw(mavlink_channel_t)’:

…/…/libraries/AP_GPS/AP_GPS.cpp:1005:10: error: too few arguments to function ‘void mavlink_msg_gps_raw_int_send(mavlink_channel_t, uint64_t, uint8_t, int32_t, int32_t, int32_t, uint16_t, uint16_t, uint16_t, uint16_t, uint8_t, int32_t, uint32_t, uint32_t, uint32_t, uint32_t, uint16_t)’
0); // TODO one-sigma heading accuracy standard deviation
compilation terminated due to -Wfatal-errors."
=> So might be a reason for this error ? (would be great to know…)

2°) So, alternatively, i decided to pick up arducopter 4.03 from https://firmware.ardupilot.org/Copter/stable/navio2/

=> I created a directory such as /opt/ardupilot/navio2/arducopter-4.0/bin/arducopter and changed rights to 0775 as well.

As i could not find 4.0 in the list on Ardupilot searching into files i replaced :
“/opt/ardupilot/navio2/arducopter-3.6/bin/arducopter” by :
in the file var/lib/dpkg/alternatives/arducopter/

=> It works fine boots directly on Arducopter-4.03 :smile:

My compilation was fine. I worked with the latest Emlid Navio img and did Upgrade and update on it. Then I downloaded the GitHub archive and worked with the dev fork (default).

The option to create an arducopter-4.0 directory is cleaner than my work.

It seems it could be possible to access it from emlidtool (doesn’t work…)

Did you use waf to compile ?

Yes, waf…

pi@navioxp:~ $ git clone --recursive https://github.com/ArduPilot/ardupilot.git

Cloning into ‘ardupilot’…

remote: Enumerating objects: 51, done.

remote: Counting objects: 100% (51/51), done.

remote: Compressing objects: 100% (49/49), done.

Resolving deltas: 100% (1477/1477), done.
Submodule path ‘modules/uavcan/libuavcan/dsdl_compiler/pyuavcan/dsdl’: checked out ‘fd12483ddd4e58242d61d74a163e7aeaa1e0f466’
Submodule path ‘modules/waf’: checked out ‘67b3eac550520cd8a7cd1dce0f77820e91fb8ad0’
pi@navioxp:~ $ cd ardupilot
pi@navioxp:~/ardupilot $ git submodule update --init --recursive
pi@navioxp:~/ardupilot $ alias waf="$PWD/modules/waf/waf-light"
pi@navioxp:~/ardupilot $ pip install future
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Requirement already satisfied: future in /usr/local/lib/python2.7/dist-packages (0.18.2)
pi@navioxp:~/ardupilot $ waf configure --board=navio2
Setting top to : /home/pi/ardupilot
Setting out to : /home/pi/ardupilot/build
Autoconfiguration : enabled

Scripting runtime checks : enabled
Checking for program ‘rsync’ : /usr/bin/rsync
‘configure’ finished successfully (12.163s)
pi@navioxp:~/ardupilot $ waf copter
Waf: Entering directory /home/pi/ardupilot/build/navio2' [3/6] Compiling libraries/AP_Scripting/generator/src/main.c [4/6] Processing modules/mavlink/message_definitions/v1.0/ardupilotmega.xml [5/6] Creating build/navio2/ap_version.h ... [696/698] Compiling ArduCopter/crash_check.cpp [697/698] Compiling ArduCopter/navigation.cpp [698/698] Linking build/navio2/bin/arducopter Waf: Leaving directory /home/pi/ardupilot/build/navio2’

Build directory: /home/pi/ardupilot/build/navio2
Target Text Data BSS Total

bin/arducopter 1714203 1736 48212 1764151

Build commands will be stored in build/navio2/compile_commands.json
‘copter’ finished successfully (15m44.424s)

@mlebret thank you for your guide.

once you have learned the path where to move the compiled arducopter file, everything is easier.

I hope that the emlid staff will update the upgrading guide.

Another error is in the git repository link. If you try compiling from source reported in the guide you stack in different error. If you use the git repository from the Ardupilot guide the compiling process through waf work well.

This command with --recursive work:

git clone https://github.com/your-github-userid/ardupilot
cd ardupilot
git submodule update --init --recursive

In general in Ardupilot ground station the flight controller can be connected without problem and configuration work well but I have a lot of problem with QGround Station because a lot of parameters configuration are not recognized correctly.

I think I return to the 3.6 copter version.

I have a question… If I use emlid tool from the terminal of raspberry the firmware version that the interface proposed the installation of 3.6 copter firmware.

But do I have to restore the old arducopter file in its folder?

You will have to restore the old arducopter file in the 3.6 folder. (mv command)

No need to use emlidtool, just reboot after renaming.

Installing latest version of QGroundControl can solve “missing parameters”, not always… Same with Mission Planner, even beta version.

Compiling is sometimes tricky. It worked with 4.10dev, it stopped working with 4.04rc4…, even with a fresh GitHub archive. I am quite happy with arducopter files from the arducopter firmware archive.

Hi i just successfully complied 4.04

sudo apt-get update
sudo apt-get install git
sudo apt-get install gitk git-gui

git clone https://github.com/ArduPilot/ardupilot.git
cd arduPilot
git checkout ArduCopter-stable
git submodule update --init --recursive
alias waf="$PWD/modules/waf/waf-light"
waf configure --board=navio2
pip install future
waf copter

[651/651] Linking build/navio2/bin/arducopter
Waf: Leaving directory `/home/pi/ardupilot/build/navio2’

Build directory: /home/pi/ardupilot/build/navio2
Target Text Data BSS Total

bin/arducopter 1601133 1620 47116 1649869

Build commands will be stored in build/navio2/compile_commands.json
‘copter’ finished successfully (22m29.887s)
pi@navio:~/ardupilot $

=> then moved the file from /home/pi/ardupilot/build/navio2
to /opt/ardupilot/navio2/arducopter-4.0/bin
*set 0775 reccursive…

1 Like

Hi everyone,

I just wanted to tell you that we have released the new image for Navio2 that supports ArduCopter 4.0.3. You can learn more about the updates and fixes on this community forum thread: