Страница 1 из 1

RFID card rider+ubuntu

Добавлено: 2011-07-07 13:21:42
Demolitionman11
Всем привет! парюсь с проблемой уже 3-ю неделю, задавал вопрос на парочке форумов, ответа так и не дождался.
есть устройство RFID не знаю как называется названия нет, но собсно суть не в этом, подключается оно по usb.
проблема вот в чем, при подключении устройства оно работает, но карточки считывает не стабильно, само по себе перезгружается, выключается вообще, пищит в разные промежутки времени, это происходит до тех пор пока я не дам команду rmmod usbhid, после этого устройство работает прекрасно, поднесли карточку считал айдишник. без глюков, при этом отрубается мышь юсб)) а это как то не хорошо,
сделал вывод парочки команд и понял в чем дело
это когда модуль usbhid подключен
dmesg
[ 4003.140032] usb 7-2: new low speed USB device using uhci_hcd and address 42
[ 4003.297103] usb 7-2: config 1 has an invalid interface number: 1 but max is 0
[ 4003.297110] usb 7-2: config 1 has 2 interfaces, different from the descriptor's value: 1
[ 4003.315106] usb 7-2: string descriptor 0 read error: -32
[ 4003.318684] input: USB HIDBP Keyboard a88a:3005 as /devices/pci0000:00/0000:00:1d.2/usb7/7-2/7-2:1.0/input/input588
[ 4003.540341] input: HID a88a:3005 as /devices/pci0000:00/0000:00:1d.2/usb7/7-2/7-2:1.1/input/input589
[ 4003.540606] generic-usb 0003:A88A:3005.0020: input,hidraw2: USB HID v1.10 Keyboard [HID a88a:3005] on usb-0000:00:1d.2-2/input1
[ 4004.948035] usb 7-2: reset low speed USB device using uhci_hcd and address 42[/glow]

особое внимание строкам
[ 4003.318684] input: USB HIDBP Keyboard a88a:3005 as /devices/pci0000:00/0000:00:1d.2/usb7/7-2/7-2:1.0/input/input588
[ 4003.540341] input: HID a88a:3005 as /devices/pci0000:00/0000:00:1d.2/usb7/7-2/7-2:1.1/input/input589
почему два модуля?




dmesg | tail
[13335.820042] usb 7-2: device descriptor read/64, error -71
[13336.044053] usb 7-2: device descriptor read/64, error -71
[13336.260048] usb 7-2: new low speed USB device using uhci_hcd and address 70
[13336.380032] usb 7-2: device descriptor read/64, error -71
[13336.604053] usb 7-2: device descriptor read/64, error -71
[13336.820046] usb 7-2: new low speed USB device using uhci_hcd and address 71
[13337.228041] usb 7-2: device not accepting address 71, error -71
[13337.340044] usb 7-2: new low speed USB device using uhci_hcd and address 72
[13337.748044] usb 7-2: device not accepting address 72, error -71
[13337.748068] hub 7-0:1.0: unable to enumerate USB device on port 2

lsusb -t
/: Bus 08.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M
|__ Port 1: Dev 2, If 0, Class=HID, Driver=usbhid, 1.5M
/: Bus 07.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M
|__ Port 2: Dev 42, If 0, Class=HID, Driver=usbkbd, 1.5M
|__ Port 2: Dev 42, If 1, Class=HID, Driver=usbhid, 1.5M
/: Bus 06.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M
/: Bus 05.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M
|__ Port 2: Dev 2, If 0, Class=HID, Driver=usbhid, 1.5M
/: Bus 04.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M
/: Bus 03.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=ehci_hcd/8p, 480M
|__ Port 3: Dev 3, If 0, Class=print, Driver=usblp, 480M
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci_hcd/4p, 480M

тут опять же Dev 42 присутствуют оба драйвера hid И kbd

пришел к выводу что при подключении онного устройства используется модуль usbhid, соответственно если его вырубить rmmod usbhid, то устройство начинает работать через модуль usbkbd.
вопрос, как заставить его работать сразу с нужным модулем? не отрубая при этом usbhid

жду советов.)))

Re: RFID card rider+ubuntu

Добавлено: 2011-07-11 7:48:10
Demolitionman11
Проблема решилась всем спасибо!
When the USB device is bound to the usbhid driver, it should appear as a symlink in the usbhid sysfs directory. For example, my /sys/bus/usb/drivers/usbhid directory looks like this:


2-3:1.0 bind module new_id remove_id uevent unbind

In this case 2-3:1.0 is my mouse.

As root I can echo 2-3:1.0 > unbind and I lose my mouse. The 2-3:1.0 symlink disappears as it's no longer bound to the hid driver. Then I can echo 2-3:1.0 > bind and I get it back again.

I have an FTDI USB serial device which I communicate with using libusb, not through the usb-serial FTDI driver. I have to unbind this one device from the usb-serial driver in exactly the same way.

Подсмотрел тут: http://www.linuxquestions.org/questions ... er-850287/