SparkFun Forums 

Where electronics enthusiasts find answers.

For the discussion of Arduino related topics.
#199520
Hello everyone,

I'm having a lot of difficulty getting the Tiny AVR Programmer, aka (PMG-11801) to work on my Ubuntu 18.04 laptop. I have read several forum posts from various places and tried a solution that looks like it out to work but it has not. Here's what I've done.
Code: Select all
mmachenry$ lsusb
...
Bus 001 Device 013: ID 1781:0c9f Multiple Vendors USBtiny
...
I note the 1781:0c9f

From various web pages it seems like I need an entry in /etc/udev/rules.d to allow permission to use this device. 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.
Code: Select all
mmachenry$ groups
mmachenry adm dialout cdrom sudo dip plugdev docker lpadmin sambashare
I also ran these immediately after creating that rules file.
Code: Select all
sudo service udev restart
sudo udevadm control --reload-rules
But when I run avrdude, I get permission denied.
Code: Select all
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.
Code: Select all
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.
Why is the permission for a regular user to access this device still denied? By the way this works on my friend's Mac and another friend's Windows machine so I know that the programmer and the ATTiny85 in it are function just fine and not damaged.

Thank you.
-mike