3

I'm having a lot of difficulty getting the Arduino Tiny AVR Programmer, aka (PMG-11801) to work on my Ubuntu 18.04 laptop. This is an Arduino device that programs ATTiny85 chips in the Arduino IDE.

I have read several forum posts from various places and tried a solution that looks like it worked for many others but it hasn't worked for me. Here's what I've done.

mmachenry$ lsusb
... other devices ...
Bus 001 Device 013: ID 1781:0c9f Multiple Vendors USBtiny
... other devices ...

I note the 1781:0c9f for the vendor and product ID for the next step.

From various web pages I found, it seems like I need an entry in /etc/udev/rules.d to allow permission to use this device to non-root users. I added it and it looks like this:

mmachenry$ cat /etc/udev/rules.d/99-USBtiny.rules 
SUBSYSTEM=="usb", ATTR{idVendor}=="1781", ATTR{idProduct}=="0c9f", GROUP="adm", MODE="0666"

Also note that I'm in the proper group.

mmachenry$ groups
mmachenry adm dialout cdrom sudo dip plugdev docker lpadmin sambashare

In order to have this take effect, ran these immediately after creating that rules file.

sudo service udev restart
sudo udevadm control --reload-rules

As requested by Norbert's comment, I ran a sanity check on my user groups but there seems to be nothing wrong as there is no output.

mmachenry@mmachenry-laptop:~$ sudo update-passwd --sanity-check --verbose

But when I run avrdude, I get permission denied.

mmachenry$ hardware/tools/avr/bin/avrdude -C/home/mmachenry/Downloads/arduino-1.8.5-linux64/arduino-1.8.5/hardware/tools/avr/etc/avrdude.conf -vv -pattiny85 -cusbtiny

avrdude: Version 6.3, compiled on Jan 17 2017 at 11:00:16
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "/home/mmachenry/Downloads/arduino-1.8.5-linux64/arduino-1.8.5/hardware/tools/avr/etc/avrdude.conf"
         User configuration file is "/home/mmachenry/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : usb
         Using Programmer              : usbtiny
avrdude: usbdev_open(): Found USBtinyISP, bus:device: 001:013
avrdude: Warning: cannot open USB device: Permission denied
avrdude: Error: Could not find USBtiny device (0x1781/0xc9f)

avrdude done.  Thank you.

However, I get much different, positive output when running the command with sudo.

sudo hardware/tools/avr/bin/avrdude -C/home/mmachenry/Downloads/arduino-1.8.5-linux64/arduino-1.8.5/hardware/tools/avr/etc/avrdude.conf -vv -pattiny85 -cusbtiny

avrdude: Version 6.3, compiled on Jan 17 2017 at 11:00:16
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "/home/mmachenry/Downloads/arduino-1.8.5-linux64/arduino-1.8.5/hardware/tools/avr/etc/avrdude.conf"
         User configuration file is "/home/mmachenry/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : usb
         Using Programmer              : usbtiny
avrdude: usbdev_open(): Found USBtinyISP, bus:device: 001:013
         AVR Part                      : ATtiny85
         Chip Erase delay              : 400000 us
         PAGEL                         : P00
         BS2                           : P00
         RESET disposition             : possible i/o
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         ByteDelay                     : 0
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom        65    12     4    0 no        512    4      0  4000  4500 0xff 0xff
           flash         65     6    32    0 yes      8192   64    128 30000 30000 0xff 0xff
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00
           lock           0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           lfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           efuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00

         Programmer Type : USBtiny
         Description     : USBtiny simple USB programmer, http://www.ladyada.net/make/usbtinyisp/
avrdude: programmer operation not supported

avrdude: Using SCK period of 10 usec
CMD: [ac 53 00 00] [ac 52 53 00]
avrdude: AVR device initialized and ready to accept instructions

Reading |                                                    | 0% 0.00sCMD: [30 00 00 00] [00 30 00 1e]
CMD: [30 00 01 00] [00 30 00 93]
Reading | #################                                  | 33% 0.00sCMD: [30 00 02 00] [00 30 00 0b]
Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e930b (probably t85)
CMD: [50 00 00 00] [00 50 00 e2]
CMD: [50 00 00 00] [00 50 00 e2]
CMD: [50 00 00 00] [00 50 00 e2]
CMD: [58 08 00 00] [00 58 08 df]
CMD: [58 08 00 00] [00 58 08 df]
CMD: [58 08 00 00] [00 58 08 df]
avrdude: safemode: hfuse reads as DF
CMD: [50 08 00 00] [00 50 08 ff]
CMD: [50 08 00 00] [00 50 08 ff]
CMD: [50 08 00 00] [00 50 08 ff]
avrdude: safemode: efuse reads as FF

CMD: [50 00 00 00] [00 50 00 e2]
CMD: [50 00 00 00] [00 50 00 e2]
CMD: [50 00 00 00] [00 50 00 e2]
CMD: [58 08 00 00] [00 58 08 df]
CMD: [58 08 00 00] [00 58 08 df]
CMD: [58 08 00 00] [00 58 08 df]
avrdude: safemode: hfuse reads as DF
CMD: [50 08 00 00] [00 50 08 ff]
CMD: [50 08 00 00] [00 50 08 ff]
CMD: [50 08 00 00] [00 50 08 ff]
avrdude: safemode: efuse reads as FF
avrdude: safemode: Fuses OK (E:FF, H:DF, L:E2)

avrdude done.  Thank you.

Running this inside the Arduino IDE has the same effect. As a normal user, I get permission denied. When I run the IDE as root, it works fully and uploads my program to the Arduino. Note that this device is recognized as a USB device, since it's the usbtinyISP, and not as a serial device like some Arduinos.

Why is the permission for a regular user to access this device still denied?

Thank you.

  • 1
    Looks very strange. You should run sanity check (see details in /usr/share/doc/base-passwd/users-and-groups.html) of your passwd and groups files. Please run sudo update-passwd --sanity-check --verbose and add output (if any) to the question. – N0rbert Jun 22 '18 at 19:34
  • N0rbert, I did that. It doesn't seem to have any output which I think means my user-groups are in a sane situation. A good try though. – mmachenry Jun 23 '18 at 16:07
  • @mmachenry , probably udev rule actions are not applied for some reason. Would you check ls -la /dev/ if it had got correct group and permissions and add that line related USB serial to the question. Also for complete info udevadmi info -a /dev/.. – user.dz Oct 29 '18 at 13:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.