LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 06-28-2006, 11:13 AM   #1
hambuin
LQ Newbie
 
Registered: Jun 2006
Location: Hamburg, Germany
Distribution: Slackware 10.2
Posts: 5

Rep: Reputation: 0
/etc/hotplug/usb/libusbscanner and kernel 2.6


Hello everybody!

I'm having problems getting my USB-scanner (Epson Perfection 610) work properly under Slackware 10.2 (with kernel 2.6.16).

My user is in group "scanner".

When I plug in the device, /etc/hotplug/usb/libsane.usermap also detect the scanner. Then the libusbscanner script change the ownership and permissions on the "device node" used by libusb. XSane work (then) correctly, too.

After reboot hotplug shows an error message, that it cannot access

/proc/bus/usb/002/004 - No such file or directory

Xsane doesn't work no longer - until I remove the USB connection and plug the scanner in once again.

In /etc/hotplug/usb/libusbscanner there's following hint regarding /etc/hotplug/usb/libusbscanner and kernel 2.6.

Code:
# latest hotplug doesn't set DEVICE on 2.6.x kernels
if [ -z "$DEVICE" ] ; then
IF=`echo $DEVPATH | sed 's/\(bus\/usb\/devices\/\)\(.*\)-\(.*\)/\2/'`
DEV=$(cat /sys/${DEVPATH}/devnum)
DEVICE=`printf '/proc/bus/usb/%.03d/%.03d' $IF $DEV`
fi

if [ "$ACTION" = "add" -a "$TYPE" = "usb" ]; then
chown root:scanner "$DEVICE"
chmod 0660 "$DEVICE"
fi
But how should it work then - someone has a solution?
 
Old 06-28-2006, 12:26 PM   #2
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559

Rep: Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106
Try this tip: http://www.slackware.com/~alien/doku...er_and_hotplug and tell me if it works for you.

Eric
 
Old 06-28-2006, 02:16 PM   #3
hambuin
LQ Newbie
 
Registered: Jun 2006
Location: Hamburg, Germany
Distribution: Slackware 10.2
Posts: 5

Original Poster
Rep: Reputation: 0
Thank you for your help Eric - it was the accurate fix.

If somebody have the same problem:

Change the following line in /etc/hotplug/usb.rc

Code:
devbus=$( ( echo -n 000 ; cat $devlink/../../devnum ) | grep -o ...\$ )
to

Code:
devbus=$( ( echo -n 000`echo $devlink| sed 's/^.*usb\([0-9]\+\)\/.*$/\1/'` ) | grep -o ...\$ )
After reboot the scanner works properly.


Tobias
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
USB hotplug mp4-10 Linux - Hardware 2 03-08-2005 07:49 PM
Usb pen and hotplug, after Kernel 2.6.9 gatsu81 Linux - Hardware 0 12-23-2004 09:08 AM
USB: Need hotplug or not? Worstje Linux - Hardware 3 09-13-2004 06:27 PM
stop hotplug from detecting things connected to usb (but still noticing usb itself) TheOneAndOnlySM Linux - Hardware 5 10-18-2003 10:35 AM
USB Hotplug plehman Linux - Hardware 5 07-18-2003 07:37 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 09:44 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration