APM PLANNER on Chromebook

Hi Bill, did some searching and found info about running from root,

sudo -i

ran and added root to dialout

hey…it works, now connects fine

Is there a risk to running from root? should I change something, or is there something I can change so does not have to be ran from root?

Thanks
Dave

Running as root should be fine…but not always recommended. Try running as user davfar again.

It’s a good chance user root has privileges that user davfar does not.

You can check if some other process has a device open using lsof (List of Files). the example below show I have the device open with ‘screen’ command

bonney@slimvan:~$ lsof /dev/cu.usbserial-DN0019M3 COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME screen 14735 bonney 5u CHR 17,11 0t992 1169 /dev/cu.usbserial-DN0019M3 bonney@slimvan:~$
Second, you should check that you did add the user to the right group

bonney@bonney-ThinkPad-T60p:~$ groups bonney bonney : bonney adm dialout cdrom sudo dip plugdev lpadmin sambashare bonney@bonney-ThinkPad-T60p:~$
Post your results might help us :slight_smile: Thx

Thanks for replys guys,

carpy- tried running as davfar, still getting connection error -permission denied

bill- sorry, format error when entering ls command,forgot space after

davfar

(trusty)davfar@localhost:~$ ls /dev/tty*
/dev/tty /dev/tty8 /dev/ttyS0 /dev/ttyS1 /dev/ttyS2 /dev/ttyS3 /dev/ttyUSB0
(trusty)davfar@localhost:~$ groups davfar
davfar : davfar dialout sudo audio video plugdev input
(trusty)davfar@localhost:~$

root

(trusty)root@localhost:~# ls /dev/tty*
/dev/tty /dev/tty8 /dev/ttyS0 /dev/ttyS1 /dev/ttyS2 /dev/ttyS3 /dev/ttyUSB0
(trusty)root@localhost:~#

typed in other command you mentioned, not sure if it is of any help

(trusty)davfar@localhost:~$ lsof /dev/cu.usbserial-DN0019M3
lsof: WARNING: can’t stat() ext4 file system /mnt/stateful_partition
Output information may be incomplete.
lsof: WARNING: can’t stat() ext4 file system /usr/share/oem
Output information may be incomplete.
lsof: WARNING: can’t stat() ext4 file system /mnt/stateful_partition/encrypted
Output information may be incomplete.
lsof: WARNING: can’t stat() ext4 file system /home/chronos
Output information may be incomplete.
lsof: WARNING: can’t stat() debugfs file system /run/debugfs_gpu
Output information may be incomplete.
lsof: WARNING: can’t stat() ecryptfs file system /home/.shadow/fb34887ee44215900dfd9ed0816bd07d05c5d92e/mount
Output information may be incomplete.
lsof: WARNING: can’t stat() ecryptfs file system /home/chronos/user
Output information may be incomplete.
lsof: WARNING: can’t stat() ecryptfs file system /home/user/fb34887ee44215900dfd9ed0816bd07d05c5d92e
Output information may be incomplete.
lsof: WARNING: can’t stat() ecryptfs file system /home/chronos/u-fb34887ee44215900dfd9ed0816bd07d05c5d92e
Output information may be incomplete.
lsof: WARNING: can’t stat() ecryptfs file system /home/root/fb34887ee44215900dfd9ed0816bd07d05c5d92e
Output information may be incomplete.
lsof: WARNING: can’t stat() tmpfs file system /run/crw
Output information may be incomplete.
lsof: status error on /dev/cu.usbserial-DN0019M3: No such file or directory
lsof 4.86
latest revision: ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/
latest FAQ: ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/FAQ
latest man page: ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/lsof_man
usage: [-?abhKlnNoOPRtUvVX] [+|-c c] [+|-d s] [+D D] [+|-f[gG]] [+|-e s]
[-F [f]] [-g [s]] [-i [i]] [+|-L [l]] [+m [m]] [+|-M] [-o [o]] [-p s]
[+|-r [t]] [-s [p:s]] [-S [t]] [-T [t]] [-u s] [+|-w] [-x [fl]] [–] [names]
Use the ``-h’’ option to get more help information.
(trusty)davfar@localhost:~$

is that number correct or is it machine port specific? Sorry I’m so linux illiterate…
Thanks

I should have mentioned you should have type

lsof /dev/ttyUSB0 # This is the 3DR modem or lsof /dev/ttyACM0 # This is the Pixhawk not the /dev/cu.usbmodem as that is the device naming on the 3DR Radio on OSX

PS: in the BASH code snippets # is the comment symbol so you don’t need to enter it (everything to the right of it is ignored)
PPS: Try this codecademy.com/en/courses/l … mmand-line if it suits you.

Hi bill,
Think I entered command wrong again on code posted last time…
Thanks for link on code, definitely nver hurts to learn something new (would be a good winter project to get a solid grasp on language)
Yes, in first post of connection error was ttyACM0 with hardwire connection, finally got telemetry installed and it connected ttyUSB0. (both connect when ran from root but not from user davfar)

(trusty)davfar@localhost:~$ lsof /dev /ttyUSB0
lsof: WARNING: can’t stat() ext4 file system /mnt/stateful_partition
Output information may be incomplete.
lsof: WARNING: can’t stat() ext4 file system /usr/share/oem
Output information may be incomplete.
lsof: WARNING: can’t stat() ext4 file system /mnt/stateful_partition/encrypted
Output information may be incomplete.
lsof: WARNING: can’t stat() ext4 file system /home/chronos
Output information may be incomplete.
lsof: WARNING: can’t stat() debugfs file system /run/debugfs_gpu
Output information may be incomplete.
lsof: WARNING: can’t stat() ecryptfs file system /home/.shadow/fb34887ee44215900dfd9ed0816bd07d05c5d92e/mount
Output information may be incomplete.
lsof: WARNING: can’t stat() ecryptfs file system /home/chronos/user
Output information may be incomplete.
lsof: WARNING: can’t stat() ecryptfs file system /home/user/fb34887ee44215900dfd9ed0816bd07d05c5d92e
Output information may be incomplete.
lsof: WARNING: can’t stat() ecryptfs file system /home/chronos/u-fb34887ee44215900dfd9ed0816bd07d05c5d92e
Output information may be incomplete.
lsof: WARNING: can’t stat() ecryptfs file system /home/root/fb34887ee44215900dfd9ed0816bd07d05c5d92e
Output information may be incomplete.
lsof: WARNING: can’t stat() tmpfs file system /run/crw
Output information may be incomplete.
lsof: status error on /ttyUSB0: No such file or directory
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
chrome 1798 davfar 0u CHR 1,3 0t0 1028 /dev/null
chrome 1798 davfar 30r CHR 1,9 0t0 1032 /dev/urandom
chrome 1798 davfar 31r CHR 1,13 0t0 1034 /dev/chromeos-low-mem
chrome 1798 davfar 69u CHR 13,64 0t0 1079 /dev/input/event0
chrome 1798 davfar 73u CHR 13,65 0t0 1108 /dev/input/event1
chrome 1798 davfar 78u CHR 13,69 0t0 1152 /dev/input/event5
chrome 1798 davfar 79u CHR 13,66 0t0 1115 /dev/input/event2
chrome 1798 davfar 80u CHR 13,68 0t0 1117 /dev/input/event4
chrome 1798 davfar 81u CHR 13,67 0t0 1116 /dev/input/event3
chrome 1798 davfar 82u CHR 13,70 0t0 109665 /dev/input/event6
chrome 1798 davfar 311u CHR 5,2 0t0 1038 /dev/ptmx
chrome 1798 davfar 317u CHR 5,2 0t0 1038 /dev/ptmx
nacl_help 1916 davfar 0r CHR 1,3 0t0 1028 /dev/null
nacl_help 1916 davfar 4r CHR 1,9 0t0 1032 /dev/urandom
nacl_help 1941 davfar 0r CHR 1,3 0t0 1028 /dev/null
nacl_help 1941 davfar 4r CHR 1,9 0t0 1032 /dev/urandom
chrome 2077 davfar mem CHR 226,0 1047 /dev/dri/card0
chrome 2077 davfar mem CHR 10,61 1049 /dev/mali0
chrome 2077 davfar 0r CHR 1,3 0t0 1028 /dev/null
chrome 2077 davfar 9r CHR 1,9 0t0 1032 /dev/urandom
chrome 2077 davfar 11u CHR 10,61 0t0 1049 /dev/mali0
chrome 2077 davfar 18u CHR 226,0 0t0 1047 /dev/dri/card0
chrome 2157 davfar 0r CHR 1,3 0t0 1028 /dev/null
chrome 2157 davfar 9r CHR 1,9 0t0 1032 /dev/urandom
nacl_help 8970 davfar 0r CHR 1,3 0t0 1028 /dev/null
nacl_help 8970 davfar 4r CHR 1,9 0t0 1032 /dev/urandom
nacl_help 8970 davfar 20r CHR 1,9 0t0 1032 /dev/urandom
nacl_help 8970 davfar 30r CHR 1,3 0t0 1028 /dev/null
nacl_help 11314 davfar 0r CHR 1,3 0t0 1028 /dev/null
nacl_help 11314 davfar 4r CHR 1,9 0t0 1032 /dev/urandom
nacl_help 11314 davfar 20r CHR 1,9 0t0 1032 /dev/urandom
nacl_help 11314 davfar 30r CHR 1,3 0t0 1028 /dev/null
Xorg 26894 davfar mem CHR 226,0 1047 /dev/dri/card0
Xorg 26894 davfar 6u CHR 1,3 0t0 1028 /dev/null
Xorg 26894 davfar 8u CHR 226,0 0t0 1047 /dev/dri/card0
Xorg 26894 davfar 10u CHR 13,65 0t0 1108 /dev/input/event1
Xorg 26894 davfar 11u CHR 13,64 0t0 1079 /dev/input/event0
Xorg 26894 davfar 12u CHR 13,69 0t0 1152 /dev/input/event5
Xorg 26894 davfar 13u CHR 13,70 0t0 109665 /dev/input/event6
croutonpo 26960 davfar 0r CHR 1,3 0t0 1028 /dev/null
croutontr 26961 davfar 0r CHR 1,3 0t0 1028 /dev/null
croutontr 26971 davfar 0r CHR 1,3 0t0 1028 /dev/null
hexdump 26977 davfar 0r CHR 13,64 0t0 1079 /dev/input/event0
hexdump 26978 davfar 0r CHR 13,65 0t0 1108 /dev/input/event1
hexdump 26979 davfar 0r CHR 13,66 0t0 1115 /dev/input/event2
hexdump 26980 davfar 0r CHR 13,67 0t0 1116 /dev/input/event3
hexdump 26981 davfar 0r CHR 13,68 0t0 1117 /dev/input/event4
hexdump 26982 davfar 0r CHR 13,69 0t0 1152 /dev/input/event5
hexdump 26983 davfar 0r CHR 13,70 0t0 109665 /dev/input/event6
xbindkeys 26990 davfar 0u CHR 1,3 0t0 1028 /dev/null
xbindkeys 26990 davfar 1u CHR 1,3 0t0 1028 /dev/null
xbindkeys 26990 davfar 2u CHR 1,3 0t0 1028 /dev/null
xfce4-ses 27005 davfar 17r CHR 1,9 0t0 1032 /dev/urandom
dbus-laun 27008 davfar 1u CHR 1,3 0t0 1028 /dev/null
dbus-laun 27008 davfar 2u CHR 1,3 0t0 1028 /dev/null
dbus-daem 27009 davfar 0u CHR 1,3 0t0 1028 /dev/null
dbus-daem 27009 davfar 1u CHR 1,3 0t0 1028 /dev/null
dbus-daem 27009 davfar 2u CHR 1,3 0t0 1028 /dev/null
xfconfd 27017 davfar 0u CHR 1,3 0t0 1028 /dev/null
xfconfd 27017 davfar 1u CHR 1,3 0t0 1028 /dev/null
xfconfd 27017 davfar 2u CHR 1,3 0t0 1028 /dev/null
xfwm4 27020 davfar 0r CHR 1,3 0t0 1028 /dev/null
Thunar 27022 davfar 0r CHR 1,3 0t0 1028 /dev/null
xfce4-pan 27024 davfar 0r CHR 1,3 0t0 1028 /dev/null
xfdesktop 27025 davfar 0r CHR 1,3 0t0 1028 /dev/null
xfsetting 27026 davfar 0r CHR 1,3 0t0 1028 /dev/null
xfce4-pow 27037 davfar 0u CHR 1,3 0t0 1028 /dev/null
xfce4-pow 27037 davfar 1u CHR 1,3 0t0 1028 /dev/null
xfce4-pow 27037 davfar 2u CHR 1,3 0t0 1028 /dev/null
gvfsd 27039 davfar 0u CHR 1,3 0t0 1028 /dev/null
gvfsd 27039 davfar 1u CHR 1,3 0t0 1028 /dev/null
gvfsd 27039 davfar 2u CHR 1,3 0t0 1028 /dev/null
xscreensa 27056 davfar 0r CHR 1,3 0t0 1028 /dev/null
polkit-gn 27072 davfar 0r CHR 1,3 0t0 1028 /dev/null
panel-6-s 27079 davfar 0r CHR 1,3 0t0 1028 /dev/null
at-spi-bu 27082 davfar 0u CHR 1,3 0t0 1028 /dev/null
at-spi-bu 27082 davfar 1u CHR 1,3 0t0 1028 /dev/null
at-spi-bu 27082 davfar 2u CHR 1,3 0t0 1028 /dev/null
panel-2-a 27085 davfar 0r CHR 1,3 0t0 1028 /dev/null
pulseaudi 27087 davfar 0r CHR 1,3 0t0 1028 /dev/null
pulseaudi 27087 davfar 1w CHR 1,3 0t0 1028 /dev/null
pulseaudi 27087 davfar 2w CHR 1,3 0t0 1028 /dev/null
dbus-daem 27098 davfar 0r CHR 1,3 0t0 1028 /dev/null
dbus-daem 27098 davfar 1u CHR 1,3 0t0 1028 /dev/null
dbus-daem 27098 davfar 2u CHR 1,3 0t0 1028 /dev/null
at-spi2-r 27104 davfar 0r CHR 1,3 0t0 1028 /dev/null
at-spi2-r 27104 davfar 1u CHR 1,3 0t0 1028 /dev/null
at-spi2-r 27104 davfar 2u CHR 1,3 0t0 1028 /dev/null
xfce4-vol 27116 davfar 0r CHR 1,3 0t0 1028 /dev/null
gvfs-udis 27124 davfar 0u CHR 1,3 0t0 1028 /dev/null
gvfs-udis 27124 davfar 1u CHR 1,3 0t0 1028 /dev/null
gvfs-udis 27124 davfar 2u CHR 1,3 0t0 1028 /dev/null
gvfsd-tra 27141 davfar 0r CHR 1,3 0t0 1028 /dev/null
gvfsd-tra 27141 davfar 1u CHR 1,3 0t0 1028 /dev/null
gvfsd-tra 27141 davfar 2u CHR 1,3 0t0 1028 /dev/null
xfce4-ter 27161 davfar 0r CHR 1,3 0t0 1028 /dev/null
xfce4-ter 27161 davfar 7u CHR 5,2 0t0 1038 /dev/ptmx
xfce4-ter 27161 davfar 12u CHR 5,2 0t0 1038 /dev/ptmx
gconfd-2 27364 davfar 0u CHR 1,3 0t0 1028 /dev/null
gconfd-2 27364 davfar 1u CHR 1,3 0t0 1028 /dev/null
gconfd-2 27364 davfar 2u CHR 1,3 0t0 1028 /dev/null
gconfd-2 27364 davfar 3u CHR 1,3 0t0 1028 /dev/null
x-www-bro 27747 davfar 0r CHR 1,3 0t0 1028 /dev/null
sleep 29164 davfar 0r CHR 1,3 0t0 1028 /dev/null
sleep 29185 davfar 0r CHR 1,3 0t0 1028 /dev/null
(trusty)davfar@localhost:~$

Hopefully there is something here that might help…
Thanks Dave

easy on the spaces, dude :wink:

lsof /dev /ttyUSB0 # is wrong :cry: space between /dev and /ttyUSB0
lsof /dev/ttyUSB0 # is right. :sunglasses:

Hope that helps :geek: :laughing:

:blush: :blush: :blush: :blush: :blush: :blush:

And the results? (No hurry, I must sleep now :-p)

Sounds like a good idea to me too!!!

(trusty)davfar@localhost:~$ ls /dev/tty*
/dev/tty /dev/tty8 /dev/ttyS0 /dev/ttyS1 /dev/ttyS2 /dev/ttyS3 /dev/ttyUSB0
(trusty)davfar@localhost:~$ lsof /dev/ttyUSB0
lsof: WARNING: can’t stat() ext4 file system /mnt/stateful_partition
Output information may be incomplete.
lsof: WARNING: can’t stat() ext4 file system /usr/share/oem
Output information may be incomplete.
lsof: WARNING: can’t stat() ext4 file system /mnt/stateful_partition/encrypted
Output information may be incomplete.
lsof: WARNING: can’t stat() ext4 file system /home/chronos
Output information may be incomplete.
lsof: WARNING: can’t stat() debugfs file system /run/debugfs_gpu
Output information may be incomplete.
lsof: WARNING: can’t stat() ecryptfs file system /home/.shadow/fb34887ee44215900dfd9ed0816bd07d05c5d92e/mount
Output information may be incomplete.
lsof: WARNING: can’t stat() ecryptfs file system /home/chronos/user
Output information may be incomplete.
lsof: WARNING: can’t stat() ecryptfs file system /home/user/fb34887ee44215900dfd9ed0816bd07d05c5d92e
Output information may be incomplete.
lsof: WARNING: can’t stat() ecryptfs file system /home/chronos/u-fb34887ee44215900dfd9ed0816bd07d05c5d92e
Output information may be incomplete.
lsof: WARNING: can’t stat() ecryptfs file system /home/root/fb34887ee44215900dfd9ed0816bd07d05c5d92e
Output information may be incomplete.
lsof: WARNING: can’t stat() tmpfs file system /run/crw
Output information may be incomplete.
(trusty)davfar@localhost:~$

Is that showing whats expected?

Tried running sudo ampplanner2 (from davfar)
and it connects…
Again due to my linux ignorance, does this point out any issues? Does ‘super user’ have the same permissions as runnung from root?

The user ‘root’ is normally the name given to the user account with superuser privileges–so really you are doing the same with sudo as running from root.

Just curious, what is the output from the following command?
$ ls -la /dev/ttyUSB0

Hi carpy,

(trusty)davfar@localhost:~$ ls -la /dev/ttyUSB0
ls: cannot access /dev/ttyUSB0: No such file or directory
(trusty)davfar@localhost:~$

Sorry, I forgot to tell you to plug your telemetry radio in first before you execute the command.

Here’s what mine looks like:
dave@rpi2:~$ ls -la /dev/ttyUSB0
crw-rw---- 1 root dialout 188, 0 Sep 15 22:46 /dev/ttyUSB0

(trusty)davfar@localhost:~$ ls -la /dev/ttyUSB0
crw-rw---- 1 root serial 188, 0 Sep 15 23:50 /dev/ttyUSB0
(trusty)davfar@localhost:~$

Hmm…that’s interesting.
The group we are dealing with here is not ‘dialout’, it’s ‘serial’. Try adding group ‘serial’ to your user and that should do it.

YA!!! Hey…works!!!
Thanks alot for help and direction!

Seems like a simple issue, probably is for you and others with Linux knowledge. Definitely would be good winter project to learn more about it.

Thanks again, appreciate it!!!
Dave

I’m trying to do the same thing, but getting errors about qtquickwidgets. Did you have to upgrade from 5.2.1 to 5.6.4? I can’t seem to figure out how to do this on Trusty

No, you need to go to 5.4.2. You can try this package built for 14.04.4 and see if that works. It was built with static libs of Qt 5.4.2:
http://discuss.ardupilot.org/t/install-apm-planner-2-0-20-on-ubuntu-14-04-2/8486/3?u=carpy

Seems as if the linux support it self doesn’t do the following as per google yet! :slight_smile:

Check what’s not supported yet

  • Speakers, microphones, cameras, and USB devices are not yet supported.
  • Android Studio is not yet supported, including Emulators and USB debugging.
  • Hardware acceleration is not yet supported, including GPU and video decode.
  • ChromeVox is supported for the default Terminal app, but not yet for other Linux apps.