Gentoo Archives: gentoo-amd64

From: Frank Peters <frank.peters@×××××××.net>
To: gentoo-amd64@l.g.o
Subject: Re: [gentoo-amd64] Re: USB Scanner Problems with Newer Kernels/Libusb [Solved]
Date: Sun, 10 Nov 2013 04:26:36
Message-Id: 20131109232617.972ccb80d57935742bd71d13@comcast.net
In Reply to: Re: [gentoo-amd64] Re: USB Scanner Problems with Newer Kernels/Libusb [Solved] by Barry Schwartz
1 On Sat, 9 Nov 2013 19:53:02 -0600
2 Barry Schwartz <chemoelectric@×××××××××××××.org> wrote:
3
4 >
5 > I figured as much. Please let us know if you come up with a good
6 > technique that can be adapted to a MAKEDEV script or such. It is nice
7 > to know how to dump e?udev, just in case; and I also use a scanner.
8 >
9
10 There are some difficulties with my previous response, but now I have
11 found the final answer.
12
13 Here are the steps. Udev (or equivalent) is *not* necessary.
14
15 1) Plug in the scanner. Check kernel log. Mine shows this message:
16
17 kernal: usb 2-1.4 ...
18
19 2) Based on kernel message, check matching entry in the /sys tree.
20
21 /sys/bus/usb/devices/2-1.4/uevent
22
23 Mine shows this:
24
25 MAJOR=189
26 MINOR=130
27 DEVNAME=bus/usb/002/003
28 DEVTYPE=usb_device
29 DRIVER=usb
30 PRODUCT=4b8/110/110
31 TYPE=255/255/255
32 BUSNUM=002
33 DEVNUM=003
34
35 3) Based on this information, create the device node:
36
37 mknod --mode=0666 /dev/bus/usb/002/003 c 189 130
38
39
40 Now it works well. This is certainly the correct device node.
41 I can scan with SANE without problems.
42
43 Also, this can be scripted using bash to read the /sys file.
44 But there may be a much better way to get the kernel output
45 other than using the kernel log. I need to research this step.
46
47 Frank Peters