You are not logged in.

#1 2016-01-30 23:48:10

C15
Member
Registered: 2015-10-06
Posts: 2

[Solved] Arduino - Giving the IDE permission to close the connection

Hi,

I'm having problems programming an arduino leonardo ethernet board.
I've installed the arduino package from the AUR and followed the wiki instructions about joining the uucp and lock groups. I'm capable of programming uno boards without a problem.
Trying to program the leonardo returns the following:

Arduino: 1.6.7 (Linux), Board: "Arduino Leonardo"

avrdude: Version 6.1, compiled on Dec  9 2015 at 13:04:00
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "/usr/share/arduino/hardware/tools/avr/etc/avrdude.conf"
         User configuration file is "/home/manuel/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : /dev/ttyACM0
         Using Programmer              : avr109
         Overriding Baud Rate          : 57600
avrdude: ser_open(): can't open device "/dev/ttyACM0": Permission denied

avrdude done.  Thank you.

While experimenting I've noted that running the IDE as root solves the problem. As far as I can tell this is caused by the different programming methods. According to this (Getting Started with the Arduino Leonardo and Micro), the process to program the leonardo is:

This works more or less the same way as with the Uno: the Arduino software initiates a reset of the board, launching the bootloader - which is responsible for receiving, storing, and starting the new sketch.
(...)
Note that the auto-reset is initiated when the computer opens the serial port at 1200 baud and then closes it

Since the leonardo doesn't have a dedicated usb controller, unlike the uno, the connection has to be closed by the programmer. This does not happen while programming the uno.

Does being in the uucp and lock groups grant the avrdude permission to close the connection?  If not, is there any way to give it without explicitly running the IDE as root?

Last edited by C15 (2016-02-04 03:22:45)

Offline

#2 2016-01-31 04:21:36

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,720

Re: [Solved] Arduino - Giving the IDE permission to close the connection

You may want to see this thread:
https://bbs.archlinux.org/viewtopic.php?id=122180
I cannot find the other thread -- I had posted in it --  but there is(was) a problem with the upstream release of AVR dude that needed a downgrade.  Try the stuff from that linked thread first, then we can look at the other


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#3 2016-01-31 17:56:18

C15
Member
Registered: 2015-10-06
Posts: 2

Re: [Solved] Arduino - Giving the IDE permission to close the connection

Found that topic while googling but dismissed it after reading the part that's about r/w permissions and the uucp/lock groups as pointed by Tribly. Should have already learnt to not stop reading halfway through.

This fix:

sudo chmod u+s /usr/bin/avrdude

does solve the problem, however I still have a question for you. In this post you say that everything works for you. Does this mean that you are able to program leonardo/micro boards and its variants just by being part of the uucp and lock groups?

ewaller wrote:

there is(was) a problem with the upstream release of AVR dude that needed a downgrade.

While checking the pacman log and repos for any upgrade that could've broken the install I verified that the avrdude package was downgraded at the repo, so anyone with a updated system should have version 6.1-1 and not 6.2-1.

Offline

Board footer

Powered by FluxBB