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
$ 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’.
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.
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