avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-gcc-list] Avarice (CVS) USB problems under Linux


From: Gerard Marull Paretas
Subject: [avr-gcc-list] Avarice (CVS) USB problems under Linux
Date: Fri, 20 Jul 2007 00:34:15 +0200

Hello!

I've recently bought JTAGICEmkII, and I've been trying to get it working under linux + usb. Serial works fine, but needs external power supply so I'd like to be able to use USB.

First, I tried to use avarice-2.6, but I couldn't get it working with usb, so I decided to download CVS avarice version and compile from there. This version seems to work, I'm using this command: avarice -2 -j usb --erase. But there's a problem: I need to be root, if not says I haven't got permissions ( error setting configuration 1: could not set config 1: Operation not permitted USB device not found).

After that I decided to create an udev rule for jtagicemk2 to set permissions and a /dev/avrjtag entry for this device. I got the following information with udevinfo:

 looking at device '/devices/pci0000:00/0000:00: 02.0/usb1/1-4':
    KERNEL=="1-4"
    SUBSYSTEM=="usb"
    DRIVER=="usb"
    ATTR{serial}=="00B000002406"
    ATTR{product}=="JTAGICE mkII"
    ATTR{manufacturer}=="ATMEL"
    ATTR{maxchild}=="0"
    ATTR{version}==" 1.10"
    ATTR{devnum}=="21"
    ATTR{speed}=="12"
    ATTR{bMaxPacketSize0}=="16"
    ATTR{bNumConfigurations}=="1"
    ATTR{bDeviceProtocol}=="00"
    ATTR{bDeviceSubClass}=="00"
    ATTR{bDeviceClass}=="ff"
    ATTR{bcdDevice}=="0200"
    ATTR{idProduct}=="2103"
    ATTR{idVendor}=="03eb"
    ATTR{bMaxPower}=="500mA"
    ATTR{bmAttributes}=="80"
    ATTR{bConfigurationValue}=="1"
    ATTR{bNumInterfaces}==" 1"
    ATTR{configuration}==""

And according to these lines, I wrote the new rule:

SYSFS{idProduct}=="2103", SYSFS{idVendor}=="03eb", SYMLINK+="avrjtag", MODE="0666"

After that, when I turn on the device, /dev/avrjtag is created (but without r/w permissions for normal user). [what could be the reason? maybe because I have HAL? (I see some HAL messages in /var/log/debug, it seems to add a new device, and specified vendor and product id's are from jtagice]

The other bad thing is that if I try to use this device entry with avarice as root, I get the following error:

sudo avarice -2 -j /dev/avrjtag
...
JTAG ICE communication failed: Inappropriate ioctl for device

Even I get the same error if I try with the original entry located at /dev/bus/usb/001/00x


I hope to find a solution for that problem, since I'd like to start using jtagicemk2 with USB. I'd like to avoid having another power supply on my desk :)

Thanks! Gerard.


P.D. I used this guide for udev: http://www.reactivated.net/writing_udev_rules.html

reply via email to

[Prev in Thread] Current Thread [Next in Thread]