Re: USB / udev only work for root

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

 



Changing SYSFS -> ATTRS in 55-libsane.rules worked.  Thanks

For the record, the command sequence I use (in pyusb) is:

import usb        #sets up libusb
...
allBus=usb.busses()   #read in a list of available USB busses
...
bus=allBus[bIndex]       #focus on bus number bIndex
dev=bus.devices[dIndex]   #focus on device number dIndex on that bus
hand=dev.open()            #open that device and return the DeviceHandle
                #read the device serial number as a string
                #prepend 'USB' to distinguish this from RS-232 equipment
                #on the same system
thisSerNum='USB'+hand.getString(dev.iSerialNumber, USB_SHORT_BUFF)   
...

Ellipsis marks omitted code which sets up variables and is not directly related to the usb managment.  

The code fails at the hand.getString() call (with SYSFS in the .rules file).

This code is part of a device-identification loop, and so there is no claimInterface() command.  Device-descriptor queries like the above are necessary to determine which interfaces are available for claiming.

Thanks for your help.

-Sarah


--- On Sat, 1/3/09, Piter PUNK <piterpunk@xxxxxxxxxxxxxxx> wrote:

> From: Piter PUNK <piterpunk@xxxxxxxxxxxxxxx>
> Subject: Re: USB / udev only work for root
> To: "Sarah Messer" <ikustosu@xxxxxxxxx>
> Cc: "libusb-devel" <libusb-devel@xxxxxxxxxxxxxxxxxxxxx>, linux-hotplug@xxxxxxxxxxxxxxx
> Date: Saturday, January 3, 2009, 12:24 PM
> Sarah Messer wrote:
> > The problem is not present on an OpenSUSE 10.0 machine
> running identical code with straight libusb-0.1/pyusb
> > 
> > /etc/udev/rules.d/55-libsane.rules contains the
> following lines (among many others):
> > 
> > # ENV{DEVTYPE}=="usb_device",
> NAME="bus/usb/$env{BUSNUM}/$env{DEVNUM}",
> MODE="0664", OWNER="root",
> GROUP="root"
> > 
> > SUBSYSTEM=="usb",
> ACTION=="add|change",
> SYSFS{idVendor}=="0699",
> SYSFS{idProduct}=="0368", GROUP="usb",
> MODE="0664"
> 
> Change SYSFS to ATTRS.
> 
> Piter Punk


      
--
To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel]     [Linux DVB]     [Asterisk Internet PBX]     [DCCP]     [Netdev]     [X.org]     [Util Linux NG]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux