All of lore.kernel.org
 help / color / mirror / Atom feed
* Linux cdc-acm-driver
       [not found] ` <20120229145810.GB23624@localhost>
@ 2012-03-01  5:52   ` Manavendra Nath Manav
       [not found]     ` <4F4F32F2.40308@ddnetservice.net>
  0 siblings, 1 reply; 9+ messages in thread
From: Manavendra Nath Manav @ 2012-03-01  5:52 UTC (permalink / raw)
  To: kernelnewbies

Hi Johan

On Wed, Feb 29, 2012 at 8:28 PM, Johan Hovold <jhovold@gmail.com> wrote:
> On Sun, Feb 26, 2012 at 04:37:33PM +0100, Stefan Dreyer wrote:
>> Hello Johan,
>>
>> i hope, you can help me. I try to get a barcode-Scanner (Metrologic
>> Focus MS 1690) to work. If i take a look at the Windows driver, this
>> scanner should work in serial-mode as CDC ACM.
>> i have added the device:
>> ? ? ? { USB_DEVICE(0x0c2e, 0x0720), /*Metro Metrologic MS7120 Barcode Scanner
>> (bi-directional serial mode) ?*/
>> ? ? ? },
>>
>> and recompile the module. If i plug the device in, the module cdc-acm is
>> loaded. But no device ttyACM0 appears.
>
> What does lsusb -v say? If it is a cdc-acm device you should not need to
> add the pid/vid to the cdc-acm driver.
>
> What is written to the system logs?
>
>> Is there a possibility to debug the module? I would like to know, what
>> happens.
>
> If your recompiling the module you can enable debugging by changing the
> following "undef"
>
> ? ? ? ?#undef DEBUG
>
> to "define", or you can enable dynamic debugging (see
> Documentation/dynamic-debug-howto.txt).
>
> Thanks,
> Johan

Sorry for jumping in the middle of the thread, but I too have a
similar problem with Metrologic Focus MS1690 Barcode scanner.
Currently, I am getting the device as bi-directional serial mode but I
want to make it work as a USB HID Keyboard device. In the
manufacturer's manual there is a barcode to configure the device as
such. After this I can see from dmesg that first the device gets
registered as  USB HID v1.11 Keyboard, the I guess the scanner power
cycles disconnecting the USB  and again gets registered as a new
device.

*** dmesg snip ***
[69818.065741] input: Honeywell Scanning and Mobility Honeywell
Scanning and Mobility Scanner as
/devices/pci0000:00/0000:00:1d.1/usb7/7-1/7-1:1.0/input/input6
[69818.065810] generic-usb 0003:0C2E:0200.0003: input,hidraw2: USB HID
v1.11 Keyboard [Honeywell Scanning and Mobility Honeywell Scanning and
Mobility Scanner] on usb-0000:00:1d.1-1/input0
[69823.804854] usb 7-1: USB disconnect, address 2
[69827.180717] usb 7-1: new low speed USB device using uhci_hcd and address 3
[69827.355585] usb 7-1: New USB device found, idVendor=0c2e, idProduct=0720
[69827.355590] usb 7-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[69827.355593] usb 7-1: Product: Honeywell Scanning and Mobility Scanner
[69827.355596] usb 7-1: Manufacturer: Honeywell Scanning and Mobility

[root at pe1800xs ~]# lsusb -v
Bus 007 Device 003: ID 0c2e:0720 Metro Metrologic MS7120 Barcode
Scanner (bi-dir                                             ectional
serial mode)
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0         8
  idVendor           0x0c2e Metro
  idProduct          0x0720 Metrologic MS7120 Barcode Scanner
(bi-directional se                                             rial
mode)
  bcdDevice            1.00
  iManufacturer           1 Honeywell Scanning and Mobility
  iProduct                2 Honeywell Scanning and Mobility Scanner
  iSerial                 0
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           41
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          3 POS USB
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              450mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      0
      bInterfaceProtocol      0
      iInterface              0
      ** UNRECOGNIZED:  09 21 11 01 00 01 22 3f 00
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0008  1x 8 bytes
        bInterval              10
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0008  1x 8 bytes
        bInterval              10
Device Status:     0x0000
  (Bus Powered)

[root at pe1800xs ~]# cat /proc/bus/usb/devices
T:  Bus=07 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  3 Spd=1.5 MxCh= 0
D:  Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=0c2e ProdID=0720 Rev= 1.00
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= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=(none)
E:  Ad=02(O) Atr=03(Int.) MxPS=   8 Ivl=10ms
E:  Ad=81(I) Atr=03(Int.) MxPS=   8 Ivl=10ms

How to make this device work on Linux?

Please note this link http://forums.gentoo.org/viewtopic-t-852806.html
says that "They tracked it down to the scanner registering itself as a
keyboard and then power cycling and registering as a custom POS
device. I contacted the manufacturer and they sent me a barcode
(99940) which when scanned locked the device into USB keyboard mode.
It then worked fine as a standard keyboard."

-- 
Manavendra Nath Manav

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Linux cdc-acm-driver
       [not found]       ` <CAJKgH8DhgY2zQ_6YLLKmJ2sCe7N9q+NukQFaASe1XVRAP6un5g@mail.gmail.com>
@ 2012-03-01 10:18         ` Manavendra Nath Manav
  2012-03-02  0:29           ` Greg KH
  2012-03-01 12:18         ` Manavendra Nath Manav
  1 sibling, 1 reply; 9+ messages in thread
From: Manavendra Nath Manav @ 2012-03-01 10:18 UTC (permalink / raw)
  To: kernelnewbies

On Thu, Mar 1, 2012 at 1:57 PM, Stefan Dreyer
<stefan.dreyer@ddnetservice.net> wrote:
> Hi,
>
> allthough the answer is offtopic for cdc-acm-driver, i will answer, because
> maybe it helps other people in future.

> I can tell you exactly, what is going on. If the scanner switches to
> ProductId=0720 (0c2e:0720) the scanner is working in Serial-Mode. If you
> want the scanner let work as serial device, you have to use the driver
> metro-usb. The manufacturer has this driver, but that one is outdatet and
> doesn't compile on actual Linux kernel.
> I found an actual driver, which compiles even with kernel 3.2
> <https://gitorious.org/other/metro-usb/commits/master>

Thanks a lot for the prompt reply, this should adequately solve my
problem. I am able to download the driver source and compile. However,
I have run into a trivial module format error.

[root at pe1800xs serial]# modinfo metro-usb.ko
filename: ? ? ? metro-usb.ko
description: ? ?Metrologic Instruments Inc. - USB-POS driver
author: ? ? ? ? Aleksey Babahin <tamerlan311@gmail.com>
author: ? ? ? ? Philip Nicastro
license: ? ? ? ?GPL
srcversion: ? ? AF4C7DDE2804EBB1578A05F
alias: ? ? ? ? ?usb:v0C2Ep0710d*dc*dsc*dp*ic*isc*ip*
alias: ? ? ? ? ?usb:v0C2Ep0720d*dc*dsc*dp*ic*isc*ip*
depends: ? ? ? ?usbserial
vermagic: ? ? ? 2.6.35.6-45.fc14.i686 SMP mod_unload modversions 686
parm: ? ? ? ? ? debug:Print debug info (bool 1=on, 0=off) (bool)
parm: ? ? ? ? ? vendor:User specified vendor ID (ushort) (ushort)
parm: ? ? ? ? ? product:User specified product ID (ushort) (ushort)

[root at pe1800xs serial]# modprobe -f -v metro-usb
insmod /lib/modules/2.6.35.6-45.fc14.i686/kernel/drivers/usb/serial/metro-usb.ko
FATAL: Error inserting metro_usb
(/lib/modules/2.6.35.6-45.fc14.i686/kernel/drivers/usb/serial/metro-usb.ko):
Invalid module format

[root at pe1800xs serial]# uname -a
Linux pe1800xs 2.6.35.6-45.fc14.i686 #1 SMP Mon Oct 18 23:56:17 UTC
2010 i686 i686 i386 GNU/Linux

[root at pe1800xs serial]# dmesg
[84119.755750] metro_usb: version magic '2.6.35.6-45.fc14.i686 SMP
mod_unload modversions 686 ' should be '2.6.35.6-45.fc14.i686 SMP
mod_unload 686 '

I am running Fedora14 with "Force module loading option disabled". How
can I turn it ON without recompiling the kernel. Or, since I have the
souce files of the driver (attached), how can I modify the metro-usb.c
file to provide suitable "module version".

--
Manavendra Nath Manav
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Makefile
Type: application/octet-stream
Size: 836 bytes
Desc: not available
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20120301/53914940/attachment-0001.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: metro-usb.c
Type: text/x-csrc
Size: 19456 bytes
Desc: not available
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20120301/53914940/attachment-0002.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: metro-usb.h
Type: text/x-chdr
Size: 1808 bytes
Desc: not available
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20120301/53914940/attachment-0003.bin 

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Linux cdc-acm-driver
       [not found]       ` <CAJKgH8DhgY2zQ_6YLLKmJ2sCe7N9q+NukQFaASe1XVRAP6un5g@mail.gmail.com>
  2012-03-01 10:18         ` Manavendra Nath Manav
@ 2012-03-01 12:18         ` Manavendra Nath Manav
  2012-03-01 13:57           ` Manavendra Nath Manav
  1 sibling, 1 reply; 9+ messages in thread
From: Manavendra Nath Manav @ 2012-03-01 12:18 UTC (permalink / raw)
  To: kernelnewbies

On Thu, Mar 1, 2012 at 3:18 PM, Manavendra Nath Manav
<mnm.kernel@gmail.com> wrote:
> On Thu, Mar 1, 2012 at 1:57 PM, Stefan Dreyer
> <stefan.dreyer@ddnetservice.net> wrote:
>> Hi,
>>
>> allthough the answer is offtopic for cdc-acm-driver, i will answer, because
>> maybe it helps other people in future.
>
>> I can tell you exactly, what is going on. If the scanner switches to
>> ProductId=0720 (0c2e:0720) the scanner is working in Serial-Mode. If you
>> want the scanner let work as serial device, you have to use the driver
>> metro-usb. The manufacturer has this driver, but that one is outdatet and
>> doesn't compile on actual Linux kernel.
>> I found an actual driver, which compiles even with kernel 3.2
>> <https://gitorious.org/other/metro-usb/commits/master>
>
> Thanks a lot for the prompt reply, this should adequately solve my
> problem. I am able to download the driver source and compile. However,
> I have run into a trivial module format error.
>
> [root at pe1800xs serial]# modinfo metro-usb.ko
> filename: ? ? ? metro-usb.ko
> description: ? ?Metrologic Instruments Inc. - USB-POS driver
> author: ? ? ? ? Aleksey Babahin <tamerlan311@gmail.com>
> author: ? ? ? ? Philip Nicastro
> license: ? ? ? ?GPL
> srcversion: ? ? AF4C7DDE2804EBB1578A05F
> alias: ? ? ? ? ?usb:v0C2Ep0710d*dc*dsc*dp*ic*isc*ip*
> alias: ? ? ? ? ?usb:v0C2Ep0720d*dc*dsc*dp*ic*isc*ip*
> depends: ? ? ? ?usbserial
> vermagic: ? ? ? 2.6.35.6-45.fc14.i686 SMP mod_unload modversions 686
> parm: ? ? ? ? ? debug:Print debug info (bool 1=on, 0=off) (bool)
> parm: ? ? ? ? ? vendor:User specified vendor ID (ushort) (ushort)
> parm: ? ? ? ? ? product:User specified product ID (ushort) (ushort)
>
> [root at pe1800xs serial]# modprobe -f -v metro-usb
> insmod /lib/modules/2.6.35.6-45.fc14.i686/kernel/drivers/usb/serial/metro-usb.ko
> FATAL: Error inserting metro_usb
> (/lib/modules/2.6.35.6-45.fc14.i686/kernel/drivers/usb/serial/metro-usb.ko):
> Invalid module format
>
> [root at pe1800xs serial]# uname -a
> Linux pe1800xs 2.6.35.6-45.fc14.i686 #1 SMP Mon Oct 18 23:56:17 UTC
> 2010 i686 i686 i386 GNU/Linux
>
> [root at pe1800xs serial]# dmesg
> [84119.755750] metro_usb: version magic '2.6.35.6-45.fc14.i686 SMP
> mod_unload modversions 686 ' should be '2.6.35.6-45.fc14.i686 SMP
> mod_unload 686 '
>
> I am running Fedora14 with "Force module loading option disabled". How
> can I turn it ON without recompiling the kernel. Or, since I have the
> souce files of the driver (attached), how can I modify the metro-usb.c
> file to provide suitable "module version".
>

I am able to load the metro-usb.ko module now and the scanner works
perfectly.  I opened the serial console using
bash# serial /dev/ttyUSB0 9600
and can see the 1D and 2D scanned barcodes. Thanks :)

[89073.533413] metro-usb 7-1:1.0: Metrologic USB to serial converter.
converter detected
[89073.533489] usb 7-1: Metrologic USB to serial converter. converter
now attached to ttyUSB0

The workaround I did to remove "invalid module format" error is that I
modified the vermagic.h file.

[root at pe1800xs e518816]# diff
/usr/src/kernels/2.6.35.6-45.fc14.i686/include/linux/vermagic.h.old
/usr/src/kernels/2.6.35.6-45.fc14.i686/include/linux/vermagic.h.new
32,33c32
<       MODULE_VERMAGIC_MODULE_UNLOAD MODULE_VERMAGIC_MODVERSIONS       \
<       MODULE_ARCH_VERMAGIC
---
>       MODULE_VERMAGIC_MODULE_UNLOAD MODULE_ARCH_VERMAGIC

Is this the correct way to resolve the error, although it works for
me? I am sure there would be other better ways to resolve vermagic
conflict errors.

-- 
Manavendra Nath Manav

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Linux cdc-acm-driver
  2012-03-01 12:18         ` Manavendra Nath Manav
@ 2012-03-01 13:57           ` Manavendra Nath Manav
       [not found]             ` <4F4F85E9.3040606@ddnetservice.net>
  0 siblings, 1 reply; 9+ messages in thread
From: Manavendra Nath Manav @ 2012-03-01 13:57 UTC (permalink / raw)
  To: kernelnewbies

Hi Stefan

On Thu, Mar 1, 2012 at 5:48 PM, Manavendra Nath Manav
<mnm.kernel@gmail.com> wrote:
> On Thu, Mar 1, 2012 at 3:18 PM, Manavendra Nath Manav
> <mnm.kernel@gmail.com> wrote:
>> On Thu, Mar 1, 2012 at 1:57 PM, Stefan Dreyer
>> <stefan.dreyer@ddnetservice.net> wrote:
>>> Hi,
>>>
>>> allthough the answer is offtopic for cdc-acm-driver, i will answer, because
>>> maybe it helps other people in future.
>>
>>> I can tell you exactly, what is going on. If the scanner switches to
>>> ProductId=0720 (0c2e:0720) the scanner is working in Serial-Mode. If you
>>> want the scanner let work as serial device, you have to use the driver
>>> metro-usb. The manufacturer has this driver, but that one is outdatet and
>>> doesn't compile on actual Linux kernel.
>>> I found an actual driver, which compiles even with kernel 3.2
>>> <https://gitorious.org/other/metro-usb/commits/master>
>>
>> Thanks a lot for the prompt reply, this should adequately solve my
>> problem. I am able to download the driver source and compile. However,
>> I have run into a trivial module format error.
>>
>> [root at pe1800xs serial]# modinfo metro-usb.ko
>> filename: ? ? ? metro-usb.ko
>> description: ? ?Metrologic Instruments Inc. - USB-POS driver
>> author: ? ? ? ? Aleksey Babahin <tamerlan311@gmail.com>
>> author: ? ? ? ? Philip Nicastro
>> license: ? ? ? ?GPL
>> srcversion: ? ? AF4C7DDE2804EBB1578A05F
>> alias: ? ? ? ? ?usb:v0C2Ep0710d*dc*dsc*dp*ic*isc*ip*
>> alias: ? ? ? ? ?usb:v0C2Ep0720d*dc*dsc*dp*ic*isc*ip*
>> depends: ? ? ? ?usbserial
>> vermagic: ? ? ? 2.6.35.6-45.fc14.i686 SMP mod_unload modversions 686
>> parm: ? ? ? ? ? debug:Print debug info (bool 1=on, 0=off) (bool)
>> parm: ? ? ? ? ? vendor:User specified vendor ID (ushort) (ushort)
>> parm: ? ? ? ? ? product:User specified product ID (ushort) (ushort)
>>
>> [root at pe1800xs serial]# modprobe -f -v metro-usb
>> insmod /lib/modules/2.6.35.6-45.fc14.i686/kernel/drivers/usb/serial/metro-usb.ko
>> FATAL: Error inserting metro_usb
>> (/lib/modules/2.6.35.6-45.fc14.i686/kernel/drivers/usb/serial/metro-usb.ko):
>> Invalid module format
>>
>> [root at pe1800xs serial]# uname -a
>> Linux pe1800xs 2.6.35.6-45.fc14.i686 #1 SMP Mon Oct 18 23:56:17 UTC
>> 2010 i686 i686 i386 GNU/Linux
>>
>> [root at pe1800xs serial]# dmesg
>> [84119.755750] metro_usb: version magic '2.6.35.6-45.fc14.i686 SMP
>> mod_unload modversions 686 ' should be '2.6.35.6-45.fc14.i686 SMP
>> mod_unload 686 '
>>
>> I am running Fedora14 with "Force module loading option disabled". How
>> can I turn it ON without recompiling the kernel. Or, since I have the
>> souce files of the driver (attached), how can I modify the metro-usb.c
>> file to provide suitable "module version".
>>
>
> I am able to load the metro-usb.ko module now and the scanner works
> perfectly. ?I opened the serial console using
> bash# serial /dev/ttyUSB0 9600
> and can see the 1D and 2D scanned barcodes. Thanks :)
>
> [89073.533413] metro-usb 7-1:1.0: Metrologic USB to serial converter.
> converter detected
> [89073.533489] usb 7-1: Metrologic USB to serial converter. converter
> now attached to ttyUSB0
>
> The workaround I did to remove "invalid module format" error is that I
> modified the vermagic.h file.
>
> [root at pe1800xs e518816]# diff
> /usr/src/kernels/2.6.35.6-45.fc14.i686/include/linux/vermagic.h.old
> /usr/src/kernels/2.6.35.6-45.fc14.i686/include/linux/vermagic.h.new
> 32,33c32
> < ? ? ? MODULE_VERMAGIC_MODULE_UNLOAD MODULE_VERMAGIC_MODVERSIONS ? ? ? \
> < ? ? ? MODULE_ARCH_VERMAGIC
> ---
>> ? ? ? MODULE_VERMAGIC_MODULE_UNLOAD MODULE_ARCH_VERMAGIC
>
> Is this the correct way to resolve the error, although it works for
> me? I am sure there would be other better ways to resolve vermagic
> conflict errors.
>

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
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0         8
  idVendor           0x0c2e Metro
  idProduct          0x0200 Metrologic Scanner
  bcdDevice           58.88
  iManufacturer           1 Honeywell Scanning and Mobility
  iProduct                2 Honeywell Scanning and Mobility Scanner
  iSerial                 0
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           34
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          3 HID Keyboard
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              450mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      1 Boot Interface Subclass
      bInterfaceProtocol      1 Keyboard
      iInterface              0
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.11
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength      63
         Report Descriptors:
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0008  1x 8 bytes
        bInterval              10
Device Status:     0x0000
  (Bus Powered)

[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.

Thanks & Regards,
Manavendra Nath Manav

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Linux cdc-acm-driver
  2012-03-01 10:18         ` Manavendra Nath Manav
@ 2012-03-02  0:29           ` Greg KH
       [not found]             ` <CAKgFHEqCsBZEFxTMoCjwWoqpUicCxO722kanid21fNz=E0Kg7A@mail.gmail.com>
  0 siblings, 1 reply; 9+ messages in thread
From: Greg KH @ 2012-03-02  0:29 UTC (permalink / raw)
  To: kernelnewbies

On Thu, Mar 01, 2012 at 03:48:57PM +0530, Manavendra Nath Manav wrote:
> On Thu, Mar 1, 2012 at 1:57 PM, Stefan Dreyer
> <stefan.dreyer@ddnetservice.net> wrote:
> > Hi,
> >
> > allthough the answer is offtopic for cdc-acm-driver, i will answer, because
> > maybe it helps other people in future.
> 
> > I can tell you exactly, what is going on. If the scanner switches to
> > ProductId=0720 (0c2e:0720) the scanner is working in Serial-Mode. If you
> > want the scanner let work as serial device, you have to use the driver
> > metro-usb. The manufacturer has this driver, but that one is outdatet and
> > doesn't compile on actual Linux kernel.
> > I found an actual driver, which compiles even with kernel 3.2
> > <https://gitorious.org/other/metro-usb/commits/master>
> 
> Thanks a lot for the prompt reply, this should adequately solve my
> problem. I am able to download the driver source and compile. However,
> I have run into a trivial module format error.
> 
> [root at pe1800xs serial]# modinfo metro-usb.ko
> filename: ? ? ? metro-usb.ko
> description: ? ?Metrologic Instruments Inc. - USB-POS driver
> author: ? ? ? ? Aleksey Babahin <tamerlan311@gmail.com>
> author: ? ? ? ? Philip Nicastro
> license: ? ? ? ?GPL
> srcversion: ? ? AF4C7DDE2804EBB1578A05F
> alias: ? ? ? ? ?usb:v0C2Ep0710d*dc*dsc*dp*ic*isc*ip*
> alias: ? ? ? ? ?usb:v0C2Ep0720d*dc*dsc*dp*ic*isc*ip*
> depends: ? ? ? ?usbserial
> vermagic: ? ? ? 2.6.35.6-45.fc14.i686 SMP mod_unload modversions 686
> parm: ? ? ? ? ? debug:Print debug info (bool 1=on, 0=off) (bool)
> parm: ? ? ? ? ? vendor:User specified vendor ID (ushort) (ushort)
> parm: ? ? ? ? ? product:User specified product ID (ushort) (ushort)

Aleksey, any reason this driver hasn't been submitted upstream yet?  If
you don't mind, I'll be glad to forward port it and get it merged to the
main kernel.org tree.  Or is there some reason we can't do that?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Linux cdc-acm-driver
       [not found]             ` <4F4F85E9.3040606@ddnetservice.net>
@ 2012-03-02  9:05               ` Manavendra Nath Manav
       [not found]                 ` <4F5090F2.8070409@ddnetservice.net>
  0 siblings, 1 reply; 9+ messages in thread
From: Manavendra Nath Manav @ 2012-03-02  9:05 UTC (permalink / raw)
  To: kernelnewbies

Hi Stefan

On Thu, Mar 1, 2012 at 7:51 PM, Stefan Dreyer
<stefan.dreyer@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.

-- 
Manavendra Nath Manav

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Linux cdc-acm-driver
       [not found]                 ` <4F5090F2.8070409@ddnetservice.net>
@ 2012-03-02 10:36                   ` Manavendra Nath Manav
  0 siblings, 0 replies; 9+ messages in thread
From: Manavendra Nath Manav @ 2012-03-02 10:36 UTC (permalink / raw)
  To: kernelnewbies

On Fri, Mar 2, 2012 at 2:50 PM, Stefan Dreyer
<stefan.dreyer@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@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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Linux cdc-acm-driver
       [not found]             ` <CAKgFHEqCsBZEFxTMoCjwWoqpUicCxO722kanid21fNz=E0Kg7A@mail.gmail.com>
@ 2012-03-05 22:29               ` Greg KH
       [not found]                 ` <CAKgFHEr8f1OQdXO1RJpAChhRr4UU91RRWnWQKske99XXign7_A@mail.gmail.com>
  0 siblings, 1 reply; 9+ messages in thread
From: Greg KH @ 2012-03-05 22:29 UTC (permalink / raw)
  To: kernelnewbies

On Mon, Mar 05, 2012 at 03:24:17PM +0400, tamerlan311 wrote:
> This kernel module was completely stable.
> But i think that i should do some clean up code before upstream it.

There's no need to do that now, you can always send follow-on patches
doing that.

> Was planned for future developments:
> implement write to device support. (I do not know why, but this feature was
> implemented in original source)

How can a barcode scanner be written to?

> implement work in UNI-Directional mode (0c2e:0710)
> 
> I am busy working, but I'll try to finish in few week.

How about I take what you have now, that ensures we make the 3.4 kernel
release deadline, and then you send follow-on patches for the other
things as you work on them?  That way people can use the driver now,
which is what they want to do :)

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Linux cdc-acm-driver
       [not found]                 ` <CAKgFHEr8f1OQdXO1RJpAChhRr4UU91RRWnWQKske99XXign7_A@mail.gmail.com>
@ 2012-03-06 13:54                   ` Greg KH
  0 siblings, 0 replies; 9+ messages in thread
From: Greg KH @ 2012-03-06 13:54 UTC (permalink / raw)
  To: kernelnewbies

On Tue, Mar 06, 2012 at 11:30:33AM +0400, tamerlan311 wrote:
> 2012/3/6 Greg KH <gregkh@linuxfoundation.org>
> 
>     On Mon, Mar 05, 2012 at 03:24:17PM +0400, tamerlan311 wrote:
>     > This kernel module was completely stable.
>     > But i think that i should do some clean up code before upstream it.
> 
>     There's no need to do that now, you can always send follow-on patches
>     doing that.
> 
> Ok.
> ?
> 
> 
>     > Was planned for future developments:
>     > implement write to device support. (I do not know why, but this feature
>     was
>     > implemented in original source)
> 
>     How can a barcode scanner be written to?
> 
> Official service software can configure scanner via Bi-Directional port mode.
> Instead of special barcode for config.
> 
> 
> 
>     > implement work in UNI-Directional mode (0c2e:0710)
>     >
>     > I am busy working, but I'll try to finish in few week.
> 
>     How about I take what you have now, that ensures we make the 3.4 kernel
>     release deadline, and then you send follow-on patches for the other
>     things as you work on them? ?That way people can use the driver now,
>     which is what they want to do :)
> 
> 
> I do not mind, it's a great idea!
> still need some kind of reaction from me at now?

No, I can take the code as-is and create a patch and add it to the tree
if you don't want to do that.  I'll try to do it by the end of this week
and I'll cc: you on the patch.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2012-03-06 13:54 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <4F4A51BD.1010706@ddnetservice.net>
     [not found] ` <20120229145810.GB23624@localhost>
2012-03-01  5:52   ` Linux cdc-acm-driver Manavendra Nath Manav
     [not found]     ` <4F4F32F2.40308@ddnetservice.net>
     [not found]       ` <CAJKgH8DhgY2zQ_6YLLKmJ2sCe7N9q+NukQFaASe1XVRAP6un5g@mail.gmail.com>
2012-03-01 10:18         ` Manavendra Nath Manav
2012-03-02  0:29           ` Greg KH
     [not found]             ` <CAKgFHEqCsBZEFxTMoCjwWoqpUicCxO722kanid21fNz=E0Kg7A@mail.gmail.com>
2012-03-05 22:29               ` Greg KH
     [not found]                 ` <CAKgFHEr8f1OQdXO1RJpAChhRr4UU91RRWnWQKske99XXign7_A@mail.gmail.com>
2012-03-06 13:54                   ` Greg KH
2012-03-01 12:18         ` Manavendra Nath Manav
2012-03-01 13:57           ` Manavendra Nath Manav
     [not found]             ` <4F4F85E9.3040606@ddnetservice.net>
2012-03-02  9:05               ` Manavendra Nath Manav
     [not found]                 ` <4F5090F2.8070409@ddnetservice.net>
2012-03-02 10:36                   ` Manavendra Nath Manav

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.