Avrisp Mkii Doesn't Work with Avrdude on Linux

AVRISP MKII doesn't work with AVRDUDE on Linux

It turns out that Ubuntu will acknowledge that the object is there but not play nicely with it until you fix up some of your udev rules. Thanks to http://steve.kargs.net/bacnet/avr-isp-mkii-on-ubuntu-hardy/ which provided files that only needed a little updating.

Create new file /etc/udev/avrisp.rules

SUBSYSTEM!="usb", ACTION!="add", GOTO="avrisp_end"

# Atmel Corp. JTAG ICE mkII
ATTR{idVendor}=="03eb", ATTR{idProduct}=="2103", MODE="660", GROUP="dialout"
# Atmel Corp. AVRISP mkII
ATTR{idVendor}=="03eb", ATTR{idProduct}=="2104", MODE="660", GROUP="dialout"
# Atmel Corp. Dragon
ATTR{idVendor}=="03eb", ATTR{idProduct}=="2107", MODE="660", GROUP="dialout"

LABEL="avrisp_end"

Now create a virtual link to the file and give it a rule priority

cd /etc/udev/rules.d
sudo ln ../avrisp.rules 60-avrisp.rules

Check you're in the dialout group

groups

Restart udev

sudo service udev restart

Hooray!

Can't flash with avrisp mkII in avrdude Version 6.0.1

This bug was causing the problems. I simply reverted to the previous version of avrdude (5.11.1) and it worked. By now there is an even newer version of avrdude (6.3), this bug might no longer be a problem in latest version.

Here are some steps:

  1. Revert to an older version of avrdude either by using sudo apt-get install <package-name>=<package-version-number> OR sudo apt-get install <package-name>=<package-version-number>
  2. Check if it works: avrdude -p <your part name> -c <your programmer name (avrispmkII)>
  3. You might have to specify a port. Use something like ''watch ls /dev/tty*'' to find your device if you get an error like this one:

    (trusty)chandran@localhost:~$ avrdude -c avrispmkII -p t85

    avrdude: ser_open(): can't open device "/dev/ttyS0": No such file or directory

    avrdude done. Thank you.

Here is what it will look like when you get it right:

(trusty)chandran@localhost:~$ avrdude -c avrispmkII -p t85 -P usb -vv

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/chandran/.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 "No error"
avrdude: usbdev_open(): Found AVRISP mkII, serno: [unknown]
avrdude: usbdev_open(): using read endpoint 0x83
AVR Part : ATtiny85
Chip Erase delay : 4500 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 6 4 0 no 512 4 0 4000 4500 0xff 0xff
flash 65 6 32 0 yes 8192 64 128 4500 4500 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 2 0 0 0 0 0x00 0x00

Programmer Type : STK500V2
Description : Atmel AVR ISP mkII
Programmer Model: AVRISP mkII
Hardware Version: 0
Firmware Version Master : 1.255
Vtarget : 3.3 V
SCK period : 8.00 us

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e930b
avrdude: safemode: lfuse reads as 62
avrdude: safemode: hfuse reads as DF
avrdude: safemode: efuse reads as FF

avrdude: safemode: lfuse reads as 62
avrdude: safemode: hfuse reads as DF
avrdude: safemode: efuse reads as FF
avrdude: safemode: Fuses OK

avrdude done. Thank you.

If this doesn't fix your problem, you might want to look at some other solutions:
https://electronics.stackexchange.com/questions/78302/avrisp-mkii-not-reading-device-signature/189488

https://electronics.stackexchange.com/questions/67757/why-does-my-avrisp-mkii-programmer-not-work

AVRISP MKII doesn't work with AVRDUDE on Linux

https://electronics.stackexchange.com/questions/74298/how-does-avrdude-with-avr-isp-mkii-respond-when-no-target-board-is-connected

Good luck!

AVR ISP MKII, avrdude, Ubuntu 11.10

I had a really hard time getting mine to work as well. In the end, I tripped over http://wiki.dataflow.ws/Electronix/AvrIsp2OnOSX and found that I had actually missed a package. After installing uisp

sudo apt-get install uisp

I ran

sudo avrdude -c avrispmkII -p m168 -P usb: -B 8 -v -U lock:w:0x3f:m -U lfuse:w:0xff:m -U hfuse:w:0xdf:m -U efuse:w:0x0:m

And got a nice pretty green LED.

AVR ISP MKII, avrdude, Ubuntu 11.10

I had a really hard time getting mine to work as well. In the end, I tripped over http://wiki.dataflow.ws/Electronix/AvrIsp2OnOSX and found that I had actually missed a package. After installing uisp

sudo apt-get install uisp

I ran

sudo avrdude -c avrispmkII -p m168 -P usb: -B 8 -v -U lock:w:0x3f:m -U lfuse:w:0xff:m -U hfuse:w:0xdf:m -U efuse:w:0x0:m

And got a nice pretty green LED.

Cannot talk to atmega328p over AVRisp mkII

Problem resolved! Don't remember what was the reason exactly. I guess clock crystal didn't have proper connections on a breadboard. So, I would say:

  1. Check your wiring
  2. Check your wiring
  3. Check your wiring

Beyond Linux From Scratch: avrdude was compiled without usb support

Apparently, for full functionality you need both libusb-1.0 and libusb-0.1. The configure.ac script defines HAVE_LIBUSB_1_0 only for the former and HAVE_LIBUSB for the latter, while the *.c files containing your error message only check for HAVE_LIBUSB.

While current BLFS doesn't have instructions to build libusb-0.1, you can see them for libusb-0.1.12 in BLFS 6.3.



Related Topics



Leave a reply



Submit