LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 01-02-2014, 08:46 AM   #1
onamatic
LQ Newbie
 
Registered: Mar 2008
Posts: 11

Rep: Reputation: 1
Rebinding usb hid devices to hid-generic driver fails


using kernel 3.8.0-34-generic (Mint 15)
If I plug in a usb mouse (mfr/vendor id: 03F0:8607) it works fine and is (by default) handled with hid-generic:
# tree /sys/bus/hid/drivers/hid-generic
/sys/bus/hid/drivers/hid-generic
├── 0003:03F0:8607.0007 -> ../../../../devices/pci0000:00/0000:00:12.2/usb1/1-2/1-2.1/1-2.1.2/1-2.1.2:1.0/0003:03F0:8607.0007
├── 0003:093A:2510.0001 -> ../../../../devices/pci0000:00/0000:00:13.0/usb5/5-1/5-1:1.0/0003:093A:2510.0001
├── bind
├── module -> ../../../../module/hid_generic
├── new_id
├── uevent
└── unbind

Now I unbind the device:
# echo -n 0003:03F0:8607.0007 > /sys/bus/hid/drivers/hid-generic/unbind
The binding has gone:
# tree /sys/bus/hid/drivers/hid-generic
/sys/bus/hid/drivers/hid-generic
├── 0003:093A:2510.0001 -> ../../../../devices/pci0000:00/0000:00:13.0/usb5/5-1/5-1:1.0/0003:093A:2510.0001
├── bind
├── module -> ../../../../module/hid_generic
├── new_id
├── uevent
└── unbind

and the mouse stops working - as expected.

But now I want to rebind it:
# echo -n 0003:03F0:8607.0007 > /sys/bus/hid/drivers/hid-generic/bind
The binding apparently succeeds:
# tree /sys/bus/hid/drivers/hid-generic
/sys/bus/hid/drivers/hid-generic
├── 0003:03F0:8607.0008 -> ../../../../devices/pci0000:00/0000:00:12.2/usb1/1-2/1-2.1/1-2.1.2/1-2.1.2:1.0/0003:03F0:8607.0008
├── 0003:093A:2510.0001 -> ../../../../devices/pci0000:00/0000:00:13.0/usb5/5-1/5-1:1.0/0003:093A:2510.0001
├── bind
├── module -> ../../../../module/hid_generic
├── new_id
├── uevent
└── unbind

but the mouse doesn't start working again. Why not? The only thing that has changed is the instance number (in bold).
Would you expect this to work or is the bind/unbind process a bit more complicated?

Last edited by onamatic; 01-02-2014 at 08:48 AM. Reason: clarity
 
Old 05-25-2014, 09:46 AM   #2
dometec
LQ Newbie
 
Registered: Dec 2009
Posts: 1

Rep: Reputation: 0
Test

Hi, I tried your procedure with a USB bar code scanner (viewed as a HID-generic device) and work as aspected.

Regards
Domenico
 
  


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-xover-USB cable -- emulate USB HID -- hardware/driver options? dizzy13 Linux - Hardware 4 04-24-2013 08:24 PM
[SOLVED] USB driver from HID to TTY jacquesdirac Linux - Hardware 2 09-22-2010 09:48 AM
USB HID mouse driver on 2.6 kernel macarthy Linux - Newbie 2 04-25-2010 05:27 AM
Read/write to/from USB HID devices jimspruell Linux - Newbie 0 05-04-2009 10:18 AM
Searching for code for USB HID Devices sirnoname Linux - Hardware 0 12-01-2004 05:27 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 03:57 AM.

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