How to make Arduino (Snap) access serial port /dev/ttyUSB0 (or /dev/ttyACM0)?
2020 update
The arduino-mhall119
snap is outdated and should not be used anymore. Use the arduino
snap instead.
See this answer for up to date info on how to get serial working with the arduino
snap.
Old instructions
Install the snap in classic mode to allow access to ports
$ snap install arduino-mhall119 --classic
It's that simple. You should now have access to your serial ports! Happy Hacking!
Note: info below are needed for old Arduino 1.6.10.
Some interesting links that helped find the answer
Auto connected serial port interface
Lundamar says: Until the serial-port gadget/interface is improved to give access to all system serial devices you can get your snap working by simply installing it non-confined like so:
$ snap install tio --classic
It’s better than nothing but it surely would be best to run it confined with allowed access to serial tty devices.
Interfaces - serial-port
Interfaces reference:
serial-port
Can access serial ports. This is restricted because it provides privileged access to configure serial port hardware. Note that the slot is meant to be implemented by a gadget snap (this is not provided by the core snap).
Gadget providing serial-port slot
The arduino-mhall119
snap is outdated and should not be used anymore. Use the arduino
snap instead.:
snap install arduino
Using that snap, the only thing you need to do is add your own user to the dailout
group:
sudo usermod -a -G dialout $USER
After this, reboot your device and open Arduino IDE.