On Sat, 9 Nov 2013 19:53:02 -0600
Barry Schwartz <chemoelect...@chemoelectric.org> wrote:

> 
> I figured as much. Please let us know if you come up with a good
> technique that can be adapted to a MAKEDEV script or such. It is nice
> to know how to dump e?udev, just in case; and I also use a scanner.
> 

There are some difficulties with my previous response, but now I have
found the final answer.

Here are the steps.  Udev (or equivalent) is *not* necessary.

1) Plug in the scanner.  Check kernel log.  Mine shows this message:

kernal: usb 2-1.4 ...

2) Based on kernel message, check matching entry in the /sys tree.

/sys/bus/usb/devices/2-1.4/uevent

Mine shows this:

MAJOR=189
MINOR=130
DEVNAME=bus/usb/002/003
DEVTYPE=usb_device
DRIVER=usb
PRODUCT=4b8/110/110
TYPE=255/255/255
BUSNUM=002
DEVNUM=003

3) Based on this information, create the device node:

mknod --mode=0666 /dev/bus/usb/002/003 c 189 130


Now it works well.  This is certainly the correct device node.
I can scan with SANE without problems.

Also, this can be scripted using bash to read the /sys file.
But there may be a much better way to get the kernel output
other than using the kernel log. I need to research this step.

Frank Peters


Reply via email to