Lines 94-100
Link Here
|
94 |
PRODUCT="$(cat $devlink/../idVendor)/$(cat $devlink/../idProduct)/$(cat $devlink/../bcdDevice)" |
94 |
PRODUCT="$(cat $devlink/../idVendor)/$(cat $devlink/../idProduct)/$(cat $devlink/../bcdDevice)" |
95 |
if [ -f $devlink/../../devnum ] |
95 |
if [ -f $devlink/../../devnum ] |
96 |
then |
96 |
then |
97 |
devbus=$( ( echo -n 000 ; cat $devlink/../../devnum ) | grep -o ...\$ ) |
97 |
### On my system, devnum is always 1 and the scanner is on usb2 |
|
|
98 |
### devlink something like /sys/devices/pci0000:00/0000:00:02.0/usb2/2-3/devnum |
99 |
### Think you want to catch the '2' in 'usb2' and make it '002' |
100 |
devbus=$( ( echo -n 000 ; echo $devlink | cut -d/ -f6 | cut -b4- ) | grep -o ...\$ ) |
101 |
### devbus=$( ( echo -n 000 ; cat $devlink/../../devnum ) | grep -o ...\$ ) |
98 |
devdev=$( ( echo -n 000 ; cat $devlink/../devnum ) | grep -o ...\$ ) |
102 |
devdev=$( ( echo -n 000 ; cat $devlink/../devnum ) | grep -o ...\$ ) |
99 |
DEVICE="/proc/bus/usb/$devbus/$devdev" |
103 |
DEVICE="/proc/bus/usb/$devbus/$devdev" |
100 |
else |
104 |
else |