Programming arduino controller


I’m trying to upload any program to an arduino controller (mega2560 or uno does not matter) but I get Error messages as following:

Sketch uses 6654 bytes (2%) of program storage space. Maximum is 253952 bytes.
Global variables use 291 bytes (3%) of dynamic memory, leaving 7901 bytes for local variables. Maximum is 8192 bytes.
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout

somtimes interrupted by
avrdude: stk500v2_recv(): checksum error

I assigned the complete USB card to the vm and the usb port is found and access rights are given within vm. Everything looks fine. My webcam would run on this vm.

Within the arduino IDE I can use Tools–>Board Info and that works perfect.
Are there specific settings for Qubes to allow programming of arduino type controllers/timeouts?

When whiping the complete disk and install archlinux programming works without troubles. Same hardware, same program, same port, same cable, same arduino.

Thank you for any hint.


are you sure the right device is being used and the right permissions are assigned to the device?

eg what is ls -l /dev/ttyACM* show? it might be owned by group dialout, which you will need to riun sudo usermod -a -G dialout user to add the generic user user to the dialout group (in your template otherwise will get lost when appvm dies).

from what i can tell, get board info only matches board info by usb vendorid:productid, its not really talking to the board/bootloader

Hello and thank you for your feedback,

the user is in dialout group:

[user@programming ~]$ id
uid=1000(user) gid=1000(user) groups=1000(user),5(tty),18(dialout),54(lock),98(qubes)

and I tried to modify access right already but the problem persists:

[user@programming ~]$ sudo chmod a+rw /dev/ttyACM1

[user@programming ~]$ ls -la /dev/ttyACM1
crw-rw-rw- 1 root dialout 166, 1 Aug 29 19:04 /dev/ttyACM1

By the way I’m using a standalone vm because I thought it would be easier than switching to the template back and forward.

If board info is not related to bootloader that explains why it still not works after all.

BN: Arduino/Genuino Mega or Mega 2560
VID: 2341
PID: 0042
SN: 7573530383135140A090

Just for information:

I connected an unpowered USB-Hub between my computer and the arduino and the problems disappeared.
Can’t explain that but I can live with it.

Thanks #qubesnewb

thats odd but if it works it works

There is a problem with Qubes. It was quite a while ago for me and the only note I have is in the script that runs avrdude that says power cycle the target if it gets stuck this way. I ended up using a spare uno as an ISP programmer interface and leaving it connected to the USB port all the time. Needed so I can program nanos, lock bits and bootloaders into virgin chips.