public inbox for gentoo-amd64@lists.gentoo.org
 help / color / mirror / Atom feed
From: Frank Peters <frank.peters@comcast.net>
To: gentoo-amd64@lists.gentoo.org
Subject: Re: [gentoo-amd64] Re: USB Scanner Problems with Newer Kernels/Libusb [Solved]
Date: Sat, 9 Nov 2013 20:30:50 -0500	[thread overview]
Message-ID: <20131109203050.a1754f19defbcfd9a514a48d@comcast.net> (raw)
In-Reply-To: <pan$4ef9f$38432b1f$1fec27b3$76672b85@cox.net>

On Sat, 9 Nov 2013 12:29:49 +0000 (UTC)
Duncan <1i5t5.duncan@cox.net> wrote:

>  
>  udev creates usb devices in /dev/bus/usb.  Each usb port is a (three-digit
> sequentially numbered) directory,
> Libusb, meanwhile, has been updated to work with the /dev/bus/usb/ tree, 
> so AFAIK that's what you need to create... somehow.
>

On Sat, 9 Nov 2013 16:11:48 -0600
Barry Schwartz <chemoelectric@chemoelectric.org> wrote:

> 
> Maybe you can run it once even as a non-daemon just to create the
> device, similarly to running rescan-scsi-bus.
> 

Well, it works!  That is, I can start udev as a daemon, plug in my
scanner, and udev will tell me what the major and minor numbers of the
scanner device node.  Then I can use my scanner with libusb and SANE.

I thought that udev would also create the device node, but for some
reason it does not.  However, I can create the device manually in the /dev
tree and then SANE is able to detect the scanner.

Thanks especially to Duncan for his info on the /dev/bus/usb/001 ...
location.  I can manually create, for example, /dev/bus/usb/001
using the major/minor numbers reported by udev.  Then I am in
business for scanning.

Actually, I can just create a whole series of nodes under /dev/bus/usb
with the same major number and an incremental minor number.  This
will eliminate the need to use udev entirely.  Whenever I plug in my
scanner one of those nodes will be relevant.

But the whole process illustrates that udev is not really necessary.
The scanner is accessed through a device node in the /dev tree
and there is no reason why udev must create this node.  As long
as the major/minor numbers are known (and the char or block characteristic)
then anything can create the node.  IOW, the kernel access is the
same as always.  Only these user space programs impose these node
constraints.

I wonder if I can determine the major/minor numbers in some other way.
Maybe the /sys tree has that information.  If so, then I could
completely script the process without using udev.

Thanks to all for the contribution.

Frank Peters


  parent reply	other threads:[~2013-11-10  1:31 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-09  3:25 [gentoo-amd64] USB Scanner Problems with Newer Kernels/Libusb Frank Peters
2013-11-09 12:29 ` [gentoo-amd64] " Duncan
2013-11-09 16:45   ` Frank Peters
2013-11-09 20:40     ` Barry Schwartz
2013-11-09 21:38       ` Frank Peters
2013-11-09 22:11         ` Barry Schwartz
2013-11-09 22:57           ` Mark Knecht
2013-11-09 23:10             ` Barry Schwartz
2013-11-10 16:54               ` Tanstaafl
2013-11-10 17:08                 ` Barry Schwartz
2013-11-09 23:25             ` Frank Peters
2013-11-09 23:57               ` Barry Schwartz
2013-11-10  1:30   ` Frank Peters [this message]
2013-11-10  1:53     ` [gentoo-amd64] Re: USB Scanner Problems with Newer Kernels/Libusb [Solved] Barry Schwartz
2013-11-10  2:36       ` Frank Peters
2013-11-10  4:26       ` Frank Peters
2013-11-12  0:03       ` Frank Peters
2013-11-12 23:18         ` [gentoo-amd64] " Jörg Schaible
2013-11-13  9:14           ` Paul Jewell

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=20131109203050.a1754f19defbcfd9a514a48d@comcast.net \
    --to=frank.peters@comcast.net \
    --cc=gentoo-amd64@lists.gentoo.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