cheftroyrd
Posts: 1
Joined: Sat Feb 23, 2013 12:20 pm

Scanner detected on USB port, but not behind powered hub

Sat Feb 23, 2013 12:32 pm

I am trying to get a scanner working with the raspi (Mustek 1200 USB scanner) - works fine on my desktop, etc. Notably this scanner is powered by the usb port entirely. For this reason I want to use a powered hub.

I can detect the scanner it if I just plug it into the usb port on the raspi:

pi@raspberrypi ~ $ sudo scanimage -L
device `mustek_usb:libusb:001:020' is a Mustek 1200 UB flatbed scanner

but not when i plug it into the usb hub:
pi@raspberrypi ~ $ sudo scanimage -L

No scanners were identified. [...]


looking at dmesg, I get some funky errors when the scanner is plugged into the hub:

[ 919.342164] usb 1-1.3.2: new full-speed USB device number 25 using dwc_otg
[ 919.422028] usb 1-1.3.2: device descriptor read/64, error -71
[ 919.612043] usb 1-1.3.2: device descriptor read/64, error -71
[ 919.802067] usb 1-1.3.2: new full-speed USB device number 26 using dwc_otg
[ 919.882069] usb 1-1.3.2: device descriptor read/64, error -71
[ 920.072244] usb 1-1.3.2: device descriptor read/64, error -71
[ 920.262135] usb 1-1.3.2: new full-speed USB device number 27 using dwc_otg
[ 920.681875] usb 1-1.3.2: device not accepting address 27, error -71
[ 920.762076] usb 1-1.3.2: new full-speed USB device number 28 using dwc_otg
[ 921.181870] usb 1-1.3.2: device not accepting address 28, error -71
[ 921.182118] hub 1-1.3:1.0: unable to enumerate USB device on port 2



any thoughts?? This usb hub is known to work, it is a Bytecc BT-UH340. Notably it a usb3.0-compatable hub - the scanner itself is usb2.0 i believe (certianly not 3 at least). My ubuntu desktop is able to see the scanner behind the hub, so I'm thinking perhaps the raspi's usb drivers cant handle this hub?


Running raspbian image 2013-02-09 with all latest updates as of an hour ago.

Thanks for the read and any help!


PS: as suspected, running the scanner direct from the pi does not give the stepper motor enough "juice"

drgeoff
Posts: 10765
Joined: Wed Jan 25, 2012 6:39 pm

Re: Scanner detected on USB port, but not behind powered hub

Sat Feb 23, 2013 4:47 pm

Until someone else can come up with a proper solution, a workaround might be to perform some surgery on two USB cables such that the scanner has its data lines and ground connected to the RPi but the power and ground lines connected to the powered hub.

DBryant
Posts: 281
Joined: Sat Feb 02, 2013 12:41 pm
Location: Berkshire, UK

Re: Scanner detected on USB port, but not behind powered hub

Sun Feb 24, 2013 8:46 am

A quick Google (scanner not detected on hub) threw up http://forums.opensuse.org/english/get- ... b-hub.html, where the scanner does work when run as the superuser. If this the same in your case? The solution, which they say works, indicates a line of investigation into the world of udev.

Run

Code: Select all

lsusb
as a normal user and as the superuser. Are they the same? You could monitor the output of /var/log/messages while adding the scanner to the system.

Identify the udev rules that runs when you connect your scanner. It could be that the rule is too restrictive and fails to run when the hub is employed. Its fairly straight forward to modify (copy the orginal to another directory first). There is a tool called udevadm that can be used to monitor the udev daemon, for example the useful

Code: Select all

udevadm trigger
allows the rules to be re-run without actually disconnecting the device. You can update the rule, trigger (or pull the plug and re-connect) without restarting any daemon.

Hope this is helpful

Return to “Troubleshooting”