AVRISPmkII in Kubuntu
AVRISPmkII in Kubuntu 12.04
AVRISPmkII is not working in Precise Pangolin (64bit)
Trying to find the programmer:
jarkko@i7kubuntu:~$ avrdude -c avrispmkii -p x128a3 -P usb -v
avrdude: Version 5.11.1, compiled on Oct 30 2011 at 10:37:28
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2009 Joerg Wunsch
System wide configuration file is "/etc/avrdude.conf"
User configuration file is "/home/jarkko/.avrduderc"
User configuration file does not exist or is not a regular file, skipping
Using Port : usb
Using Programmer : avrispmkii
avrdude: usb_open(): cannot read serial number "error sending control message: Operation not permitted"
avrdude: usb_open(): cannot read product name "error sending control message: Operation not permitted"
avrdude: usbdev_open(): Found [unnamed product], serno: [unknown]
avrdude: usbdev_open(): error setting configuration 1: could not set config 1: Operation not permitted
avrdude: usbdev_open(): did not find any USB device "usb"
But as a root everything works fine:
root@i7kubuntu:~# avrdude -c avrispmkii -p x128a3 -P usb -v
avrdude: Version 5.11.1, compiled on Oct 30 2011 at 10:37:28
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2009 Joerg Wunsch
System wide configuration file is "/etc/avrdude.conf"
User configuration file is "/root/.avrduderc"
User configuration file does not exist or is not a regular file, skipping
Using Port : usb
Using Programmer : avrispmkii
avrdude: usbdev_open(): Found AVRISP mkII, serno: 000200038672
AVR Part : ATXMEGA128A3
Chip Erase delay : 0 us
PAGEL : P00
BS2 : P00
RESET disposition : dedicated
RETRY pulse : SCK
serial program mode : yes
parallel program mode : yes
Timeout : 0
StabDelay : 0
CmdexeDelay : 0
SyncLoops : 0
ByteDelay : 0
PollIndex : 0
PollValue : 0x00
Memory Detail :
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
eeprom 0 0 0 0 no 2048 32 0 0 0 0x00 0x00
application 0 0 0 0 no 131072 256 0 0 0 0x00 0x00
apptable 0 0 0 0 no 8192 256 0 0 0 0x00 0x00
boot 0 0 0 0 no 8192 256 0 0 0 0x00 0x00
flash 0 0 0 0 no 139264 256 0 0 0 0x00 0x00
prodsig 0 0 0 0 no 512 256 0 0 0 0x00 0x00
usersig 0 0 0 0 no 512 256 0 0 0 0x00 0x00
signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00
fuse0 0 0 0 0 no 1 0 0 0 0 0x00 0x00
fuse1 0 0 0 0 no 1 0 0 0 0 0x00 0x00
fuse2 0 0 0 0 no 1 0 0 0 0 0x00 0x00
fuse4 0 0 0 0 no 1 0 0 0 0 0x00 0x00
fuse5 0 0 0 0 no 1 0 0 0 0 0x00 0x00
lock 0 0 0 0 no 1 0 0 0 0 0x00 0x00
Programmer Type : STK500V2
Description : Atmel avrispmkII
Programmer Model: AVRISP mkII
Hardware Version: 1
Firmware Version Master : 1.13
Vtarget : 3.4 V
SCK period : 154.37 us
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00s
avrdude: Device signature = 0x1e9742
avrdude done. Thank you.
There are many threads on various forums how to fix this, but seems that I'm not the only one who does not understand the inner workings of udev. Luckily I found one thread here that has the solution.
One must create a udev rule for the programmer, to allow users to use it.
Create a udev rule file /etc/udev/rules.d/60-avrisp.rules and put the following text in it.
SUBSYSTEM!="usb_device", ACTION!="add", GOTO="avrisp_end"
# Atmel AVR ISP mkII
ATTR{idVendor}=="03eb", ATTR{idProduct}=="2104", MODE="660", GROUP="dialout"
LABEL="avrisp_end"
Then create a link to it in folder /etc/udev, restart udev service and add your user to the dialout group. Or maybe the plugdev would be a better group?
root@i7kubuntu:~#ln /etc/udev/rules.d/60-avrisp.rules /etc/udev/avrisp.rules root@i7kubuntu:~#usermod -a -G dialout jarkko root@i7kubuntu:~#service udev restart
Now you may haveto unplug and plug in the programmer again to make it work. I think I allso had to logout to see the new group in that users konsole.
jarkko@i7kubuntu:~$ groups jarkko adm tty disk dialout cdrom sudo audio dip plugdev users lpadmin sambashare
If you know how to make this work easier, please share it in the comment section or email me so I can share it here.
