3

I've installed Arduino IDE (1.8.5) with Flatpak (Kubuntu 18.04).

Attached my Wemos D1 Mini to the USB port, but can't upload a sketch:

An error occurred while uploading the sketch
error: cannot access /dev/ttyUSB0

Seems a bit silly that an IDE for a device in Flatpak can't access a device out of the box.

How do I fix that?

This question is about Flatpak.

What additional action is necessary to get the Flatpak version of Arduino IDE working with a device?

(IMHO Flatpak needs to provide additional info/help in some way, installing with Ubuntu Make umake seems easier.)

Janghou
  • 5,499
  • 6
  • 43
  • 59
  • what does ls -l /dev/ttyUSB0 tell us? you might need to be in the dialout group – Joshua Besneatte Sep 16 '18 at 16:50
  • 2
    Possible duplicate of [How to install latest Arduino IDE?](https://askubuntu.com/questions/1025753/how-to-install-latest-arduino-ide) (you need to execute `sudo usermod -a -G dialout $USER`). – N0rbert Sep 16 '18 at 17:06
  • @Joshua. I'm already a member of the dialout group `members dialout` shows my username. – Janghou Sep 16 '18 at 18:31
  • Thx. I got it working by installing the IDE with Ubuntu Make `umake ide arduino` and logout/login. – Janghou Sep 16 '18 at 18:39

1 Answers1

2

The problem is that the app starts with flatpak and that by default blocks devices. See Accessing Serial Ports with an Application Runs in Flatpak by adding --device=all you get it work, but see comments on link.


Most likely that's because Flatpak is blocking access to the serial device.

Unfortunately at the moment I don't think there is a way to give access specifically to the serial devices, so you'd need to give access to all:

flatpak run --device=all com.xamarin.MonoDevelop

What this does is essentially mount the host's /dev inside the sandbox, so the app has full access to it.