avrdude-dev
[Top][All Lists]
Advanced

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

Re: [avrdude-dev] USB


From: Russell Shaw
Subject: Re: [avrdude-dev] USB
Date: Mon, 16 Nov 2009 23:48:04 +1100
User-agent: Mozilla-Thunderbird 2.0.0.22 (X11/20090701)

Joerg Wunsch wrote:
As Russell Shaw wrote:

I just got a usb AVRISP. What permission should i fix?

You need read/write permission.

As these devices are created dynamically, you cannot do that with a
plain chmod, but you have to consult your systems dynamic device
facilitie's documentation.  Most Linux systems use udev for that
purpose, so you'd have to add another udev rule for the VID/PID pairs
you are interested in.

Hi,
Avrdude runs ok as root, but not as a normal user.

I traced in to libusb:

(gdb) bt
#0 usb_control_msg (dev=0x82437a8, requesttype=128, request=6, value=768, index=0, bytes=0xbfffd245 "\333", <incomplete sequence \373\267>, size=255, timeout=1000) at ../linux.c:143

#1 0xb7fbeaea in usb_get_string (dev=0x82437a8, index=0, langid=0, buf=0xbfffd245 "\333", <incomplete sequence \373\267>, buflen=255) at ../usb.c:226

#2 0xb7fbeb32 in usb_get_string_simple (dev=0x82437a8, index=3, buf=0xbfffd484 "\1", buflen=256) at ../usb.c:242

#3 0x08073d1d in usbdev_open (port=0xbffff985 "usb", baud=8452, fd=0x8099528) at usb_libusb.c:117

#4 0x0806d95a in stk500v2_open (pgm=0x8098468, port=0xbffff985 "usb") at stk500v2.c:1271

#5  0x0804b239 in main (argc=9, argv=0xbffff7c4) at main.c:778


usb.c:242

char tbuf[255];       /* Some devices choke on size > 255 */
...
ret = usb_get_string(dev, 0, 0, tbuf, sizeof(tbuf));


This returns -1 and i can't figure out why. The system hasn't
read anything out of /dev yet.

Just to make sure of things, i also tried:

# chown -R root:avrdude /dev/usb*
# chown -R root:avrdude /dev/bus/usb
# chmod -R 660 /dev/usb*
# chmod -R 660 /dev/bus/usb

and i'm in group avrdude. I have the avrisp plugged in.




reply via email to

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