View from the Climb up to Mittagflue

How to set up an Arduino Dev Environment in Qubes OS?

I recently asked myself what kind of challenges this could bring along – clearly, the USB forwarding via sys-usb to the dev VM could bring up some challenges. However, it worked like a charm for me – this is how I did it.

First of all, connect the Arduino board via the USB cable to your Qubes machine. You should get a notification in the right upper section of your screen telling you that a new device was attached: Device available – Device Arduino Yun available …

This means, your machine recognizes the Arduino – next step is to tell sys-usb to attach the device to your development VM. Let’s call this one: arduino-dev. I tried doing so via attaching GUI in the upper right bar, but that didn’t work out for me.

Instead, I went into dom0 and checked which USB devices are attached:

qvm-usb

The output was:
sys-usb:2-3 Arduino_LLC_Arduino_Yun

Next step is to simply attach the Arduino device to your RUNNING arduino-dev VM via dom0:

qvm-service usb attach arduino-dev sys-usb:2-3

Afterwards, go to your arduino-dev VM and verify that the device is recognized by the VM via lsusb. The output should be something like:

Bus 001 Device 003: ID 5123:3123 Arduino SA

Now, you can download the corresponding IDE in your VM and proceed with your development.

In case everything runs successfully, you will see the Port properly in your IDE.

Arduino Dev Environment with USB device on /dev/ttyACM0
Arduino Dev Environment with USB device on /dev/ttyACM0

In case you are not working with sys-usb, there is another walkthrough here which obviously worked for the involved persons – however it looks more complicated.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s