From: Sarah Messer <ikustosu@yahoo.com>
To: linux-hotplug@vger.kernel.org
Subject: Re: USB / udev only work for root
Date: Mon, 05 Jan 2009 15:58:02 +0000 [thread overview]
Message-ID: <373471.19143.qm@web50702.mail.re2.yahoo.com> (raw)
In-Reply-To: <580562.39355.qm@web50706.mail.re2.yahoo.com>
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
handfiv.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@unitednerds.org> wrote:
> From: Piter PUNK <piterpunk@unitednerds.org>
> Subject: Re: USB / udev only work for root
> To: "Sarah Messer" <ikustosu@yahoo.com>
> Cc: "libusb-devel" <libusb-devel@lists.sourceforge.net>, linux-hotplug@vger.kernel.org
> 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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
prev parent reply other threads:[~2009-01-05 15:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-02 22:54 USB / udev only work for root Sarah Messer
2009-01-03 18:24 ` Piter PUNK
2009-01-05 15:58 ` Sarah Messer [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=373471.19143.qm@web50702.mail.re2.yahoo.com \
--to=ikustosu@yahoo.com \
--cc=linux-hotplug@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).