|
From: | Russell Shaw |
Subject: | Re: [avrdude-dev] USB |
Date: | Tue, 17 Nov 2009 00:42:26 +1100 |
User-agent: | Mozilla-Thunderbird 2.0.0.22 (X11/20090701) |
Joerg Wunsch wrote:
As Russell Shaw wrote:Avrdude runs ok as root, but not as a normal user.Sure, device permission problems.This returns -1 and i can't figure out why.That's the way permission problems manifest under Linux: you can still open the USB device in libusb (apparently, this is done through something else than the actual device node), but it fails as soon as you try sending a message to it (which is needed in order to request a string descriptor entry from the device).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/usbDoesn't help. All these devices are created by your system dynamically. As soon as you say "Goodbye!" to the AVRISPmkII, it disconnects from and reconnects to the USB, and voila, you've got a new /dev/bus/usb/... entry -- again with the wrong permissions.
I did that temporarily while the device was plugged in to see what effect it had. If that didn't work (which it didn't), then no amount of udev rules will help either.
Why do you insist on ignoring the udev hints that have been given to you?
I tried that as well as my own, and various combinations, but it didn't work. I currently have a udev rule: SUBSYSTEMS=="usb", ATTRS{product}=="AVRISP mkII", GROUP="avrdude" ls -l /dev/usb* ... crw-rw---- 1 root avrdude 252, 17 2009-11-17 00:34 usbdev8.8_ep02 crw-rw---- 1 root avrdude 252, 18 2009-11-17 00:34 usbdev8.8_ep00 crw-rw---- 1 root avrdude 252, 16 2009-11-17 00:34 usbdev8.8_ep82 Works ok: sudo avrdude -p m8535 -c avrispmkII -P usb -U flash:w:proj.hex Doesn't work: avrdude -p m8535 -c avrispmkII -P usb -U flash:w:proj.hex 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(): error setting configuration 1: could not set config 1: Operation not permitted avrdude: usbdev_open(): did not find any USB device "usb"
[Prev in Thread] | Current Thread | [Next in Thread] |