Linux cdc-acm-driver

Manavendra Nath Manav mnm.kernel at gmail.com
Fri Mar 2 05:36:32 EST 2012


On Fri, Mar 2, 2012 at 2:50 PM, Stefan Dreyer
<stefan.dreyer at ddnetservice.net> wrote:
> Hi,
>
> Am 02.03.2012 10:05, schrieb Manavendra Nath Manav:
>
>> Hi Stefan
>>
>> On Thu, Mar 1, 2012 at 7:51 PM, Stefan Dreyer
>> <stefan.dreyer at ddnetservice.net>  wrote:
>>>
>>> Hi,
>>>
>>>
>>>
>>> Am 01.03.2012 14:57, schrieb Manavendra Nath Manav:
>>>
>>>> The Metrologic scanner is working perfectly in bi-directional serial
>>>> mode. But when I configure it as USB HID Keyboard mode as shown in the
>>>> link and keyboard layout as US-English, I am not getting any data from
>>>> Scanner. I have opened a terminal and scanned multiple barcodes but no
>>>> output on screen.
>>>>
>>>> [root at pe1800xs e518816]# dmesg
>>>> [98498.945783] input: Honeywell Scanning and Mobility Honeywell
>>>> Scanning and Mobility Scanner as
>>>> /devices/pci0000:00/0000:00:1d.1/usb7/7-2/7-2:1.0/input/input20
>>>> [98498.945850] generic-usb 0003:0C2E:0200.0011: input,hidraw2: USB HID
>>>> v1.11 Keyboard [Honeywell Scanning and Mobility Honeywell Scanning and
>>>> Mobility Scanner] on usb-0000:00:1d.1-2/input0
>>>>
>>>> [root at pe1800xs e518816]# lsusb -v
>>>> Bus 007 Device 020: ID 0c2e:0200 Metro Metrologic Scanner
>>>> [root at pe1800xs e518816]# cat /proc/bus/usb/devices
>>>> T:  Bus=07 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#= 20 Spd=1.5 MxCh= 0
>>>> D:  Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
>>>> P:  Vendor=0c2e ProdID=0200 Rev=58.88
>>>> S:  Manufacturer=Honeywell Scanning and Mobility
>>>> S:  Product=Honeywell Scanning and Mobility Scanner
>>>> C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=450mA
>>>> I:* If#= 0 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=01 Prot=01 Driver=usbhid
>>>> E:  Ad=81(I) Atr=03(Int.) MxPS=   8 Ivl=10ms
>>>>
>>>> Can you help me in getting data from Scanner in USB HID Keyboard
>>>> Emulation mode as this would reduce the burden of using an extra
>>>> driver and the application program can read directly from the
>>>> emulation keyboard instead of listening to serial device.
>>>
>>>
>>>
>>> For me, that looks good. But i never have any problems using the scanner
>>> in
>>> Keyboard-Mode. Are all the necessary drivers loaded
>>> (usbcore,hid,usbhid,...)
>>> What happens, if you plug a new USB-Keyboard in. Does it works? Did you
>>> try
>>> to recall factory-settings before? Maybe the Keyboard-mode is disabled
>>> somewhere else.
>>>
>>> you can test all the input-devices, in directory /dev/input there must be
>>> device-files named event0 ... eventN (You could identify it via
>>> directory:
>>> /dev/input/by-id, if you have it on fedora 14)
>>> you can test them via
>>> # cat /dev/input/event9 | hexdump
>>> If you scan codes, the hexdump of the keycodes is shown.
>>>
>>
>> I scanned all the required bar-codes to make Metrologic MS1690 work as
>> USB HID Keyboard, it is being detected and driver usbhid attached to
>> it, but I am not able to see any output on console. The output is fine
>> when it is configured in serial mode. However, hexdump shows keycodes.
>> I attached another standard USB Dell keyboard and it is working fine.
>>
>> [98498.945783] input: Honeywell Scanning and Mobility Honeywell
>> Scanning and Mobility Scanner as
>> /devices/pci0000:00/0000:00:1d.1/usb7/7-2/7-2:1.0/input/input20
>> [98498.945850] generic-usb 0003:0C2E:0200.0011: input,hidraw2: USB HID
>> v1.11 Keyboard [Honeywell Scanning and Mobility Honeywell Scanning and
>> Mobility Scanner] on usb-0000:00:1d.1-2/input0
>>
>> [root at pe1800xs input]# cat /proc/bus/usb/devices
>> T:  Bus=07 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#= 20 Spd=1.5 MxCh= 0
>> D:  Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
>> P:  Vendor=0c2e ProdID=0200 Rev=58.88
>> S:  Manufacturer=Honeywell Scanning and Mobility
>> S:  Product=Honeywell Scanning and Mobility Scanner
>> C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=450mA
>> I:* If#= 0 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=01 Prot=01 Driver=usbhid
>> E:  Ad=81(I) Atr=03(Int.) MxPS=   8 Ivl=10ms
>>
>> [root at pe1800xs ~]# ll /dev/input/by-id/
>> total 0
>> lrwxrwxrwx 1 root root 9 Feb 29 15:46
>> usb-Dell_Dell_QuietKey_Keyboard-event-kbd ->  ../event2
>> lrwxrwxrwx 1 root root 9 Feb 29 17:17
>> usb-Dell_Dell_USB_Entry_Keyboard-event-kbd ->  ../event5
>> lrwxrwxrwx 1 root root 9 Mar  1 19:10
>>
>> usb-Honeywell_Scanning_and_Mobility_Honeywell_Scanning_and_Mobility_Scanner-event-kbd
>> ->  ../event6
>>
>> [root at pe1800xs input]# cat event6 | hexdump
>> 0000000 8be0 4f50 ef90 0009 0004 0004 0027 0007
>> 0000010 8be0 4f50 ef97 0009 0001 000b 0001 0000
>> 0000020 8be0 4f50 ef98 0009 0000 0000 0000 0000
>> 0000030 8be0 4f50 0ecf 000a 0004 0004 0027 0007
>> 0000040 8be0 4f50 0ed4 000a 0001 000b 0000 0000
>> 0000050 8be0 4f50 0ed5 000a 0000 0000 0000 0000
>> *** snip ***
>>
>> I am getting hexdump after scanning bar-codes, but why it is not
>> coming on console as it should like a standard keyboard.
>
>
> If you get the hexdump, your scanner is configured and working correctly.
> There must be a problem with your console or your X-configuration.
>
>

Thanks Stefan, you are right that if I get hexdump then the scanner is
working properly. This test was failing before because I was trying to
get barcodes over Putty terminal emulation which is basically a SSH
session and will not display the keyboard inputs from the host
machine. When I checked on the host machine, it’s working properly.

Thanks a tonne !!!
Manavendra Nath Manav



More information about the Kernelnewbies mailing list