Beginner: Error when arduplane

  1. Image and ArduPilot version.

your RPi3 image and NAVIO2 board

  1. Detailed problem description.

Getting error:

systemctl status ardupilot.service
● ardupilot.service - ArduPilot for Linux
Loaded: error (Reason: Invalid argument)
Active: inactive (dead)


sudo journalctl -u ardupilot and uname -a
Failed to add match ‘and’: Invalid argument
Failed to add filters: Invalid argument

  1. Your step by step actions.

Set parameters in sudo nano /etc/default/arduplane

The file is sourced by systemd from arduplane.service

TELEM1="-A udp:192.168.1.6:14550"
#TELEM2="-C /dev/ttyAMA0"

Options to pass to ArduPilot

#ARDUPILOT_OPTS="$TELEM1 $TELEM2"
ARDUPILOT_OPTS="$TELEM1"

The rest from standard file is #

Then I reload: sudo systemctl daemon-reload

and start service : sudo systemctl start arduplane

What kind of parameter is wrong?
How to properly start service?

Appreciated step-by- step instruction for beginner

Thanks

Could you please post the output of these commands:

  1. sudo journalctl -u arduplane
  2. uname -a
  3. sudo update-alternatives --display arduplane

You need to use sudo systemctl start arduplane rather that ardupilot as the latter is used for custom binaries.

Below the result of above:

sudo journalctl -u ardupilot and uname -a
Failed to add match ‘and’: Invalid argument
Failed to add filters: Invalid argument

YES I started with below:

reload: sudo systemctl daemon-reload

and start service : sudo systemctl start arduplane

sudo systemctl status arduplane
and
sudo journalctl -u arduplane
You need those to see the status.

There are two different commands:

  • sudo journalctl -u ardupilot
  • uname -a

You can’t put it in one line using “and” as a separator.
The output you get is just error message which tells that terminal can not parse the command.
Thus you should execute one command at a time to get correct results.

If you really need to run multiple commands in one line, please use this cheatsheet:

A; B    Run A and then B, regardless of success of A
A && B  Run B if A succeeded
A || B  Run B if A failed
2 Likes

of course you were right:

below correct result:

$ sudo journalctl -u arduplane
– Logs begin at Thu 2017-06-01 19:17:01 UTC, end at Fri 2017-06-02 20:43:42 UTC. –
Jun 01 19:17:03 navio systemd[1]: Starting ArduPilot for Linux…
Jun 01 19:17:03 navio systemd[1]: Started ArduPilot for Linux.
Jun 02 20:32:48 navio systemd[1]: Started ArduPilot for Linux.

uname -a
Linux navio 4.4.36-a7765e7-emlid-v7+ #41 SMP PREEMPT Mon Mar 20 18:48:32 MSK 2017 armv7l GNU/Linux

sudo update-alternatives --display arduplane
arduplane - auto mode
link currently points to /opt/ardupilot/navio/arduplane-3.7/bin/arduplane
/opt/ardupilot/navio/arduplane-3.7/bin/arduplane - priority 50
/opt/ardupilot/navio/arduplane-3.7/bin/arduplane-tri - priority 50
/opt/ardupilot/navio2/arduplane-3.7/bin/arduplane - priority 50
/opt/ardupilot/navio2/arduplane-3.7/bin/arduplane-tri - priority 50
Current ‘best’ version is ‘/opt/ardupilot/navio/arduplane-3.7/bin/arduplane’.

sudo systemctl status ardupilot.service
● ardupilot.service - ArduPilot for Linux
Loaded: error (Reason: Invalid argument)
Active: inactive (dead)
Docs: https://docs.emlid.com/navio2/navio-ardupilot/installation-and-running/#autostarting-ardupilot-on-boot

Jun 02 20:32:27 navio systemd[1]: ardupilot.service lacks both ExecStart= and ExecStop= setting. Refusing.

this command shows an error:

sudo systemctl status ardupilot.service

link currently points to /opt/ardupilot/navio/arduplane-3.7/bin/arduplane

For Navio2 please choose correct binary: /opt/ardupilot/navio2/arduplane-3.7/bin/arduplane, using sudo update-alternatives --config arduplane

sudo systemctl status ardupilot.service
● ardupilot.service - ArduPilot for Linux
Loaded: error (Reason: Invalid argument)
Active: inactive (dead)
Docs: https://docs.emlid.com/navio2/navio-ardupilot/installation-and-running/#autostarting-ardupilot-on-boot
Jun 02 20:32:27 navio systemd[1]: ardupilot.service lacks both ExecStart= and ExecStop= setting. Refusing.
this command shows an error:
sudo systemctl status ardupilot.service

ardupilot.service is used for custom binaries and it needs pre-configuration, because of it you can see error.

You can close this topic.

I 've been checking the wrong service: sudo systemctl status ardupilot.service

Correct one shows I guess all is ok:

sudo systemctl status arduplane.service
● arduplane.service - ArduPilot for Linux
Loaded: loaded (/etc/systemd/system/arduplane.service; enabled)
Active: active (running) since Sun 2017-06-04 14:40:55 UTC; 22h ago
Docs: https://docs.emlid.com/navio2/navio-ardupilot/installation-and-running/#autostarting-ardupilot-on-boot
Main PID: 964 (sh)
CGroup: /system.slice/arduplane.service
├─964 /bin/sh -c /usr/bin/arduplane $TELEM1 $TELEM2
└─965 /usr/bin/arduplane -A udp:192.168.1.6:14550 -C /dev/ttyAMA0

I can also connect to APMPlanner 2 and see parameters like GPS/Gyro

Thank you for your help!