Barcode reader COM-emulation

Good day!

I’m using Metrologic 5145 barcode reader with USB connection. It can work in USB-to-COM emulation. In WinXP I just install the driver and it works great.
Metrologic doesn’t support Linux at all, but I found a Linux driver on their ftp. I follows the intsructions and make a module metro_usb.ko. I install it with “insmod metro_usb.ko”, but first I insert “usbserial.ko”. Usbserial.ko came with linux and was in “/lib/modules/(shell ‘uname –r’)/kernel/drivers/usb/serial”.
Now instrucion said, that when I plug the reader, /dev/ttyUSB0 will appear. I plug it, but nothing happens, no /dev/ttyUSB0 =( I can see my reader in hwinfo, but can’t use it.
Driver is ftp://ftp.metrologic.com/pub/download/Software/Metro-USB_Linux.zip

Where I can read the logs? What should I do?
Sorry for my bad English.

dmesg should give you lots of info

Andy

lsusb might give some useful info as well.

Thanks you for useful commands! But I think that my problem comes from compilation of the kernel module. It uses “config.h” header, but as I know “config.h” is “autoconf.h” now. I have made the changes in the driver source file and compilation have passed with some warnings. Here is output of “make”:


tolive@linux-xzka:~/OperaDownloads/Metro-USB_Linux/Metro-USB> make
make -C /lib/modules/2.6.25.5-1.1-pae/build M=/home/tolive/OperaDownloads/Metro-         USB_Linux/Metro-USB modules
make[1]: Entering directory `/usr/src/linux-2.6.25.5-1.1-obj/i386/pae'
make -C /usr/src/linux-2.6.25.5-1.1 O=/usr/src/linux-2.6.25.5-1.1-obj/i386/pae/.          modules
  CC [M]  /home/tolive/OperaDownloads/Metro-USB_Linux/Metro-USB/metro-usb.o
/home/tolive/OperaDownloads/Metro-USB_Linux/Metro-USB/metro-usb.c: In function ‘         metrousb_open’:
/home/tolive/OperaDownloads/Metro-USB_Linux/Metro-USB/metro-usb.c:272: warning:          passing argument 6 of ‘usb_fill_int_urb’ from incompatible pointer type
/home/tolive/OperaDownloads/Metro-USB_Linux/Metro-USB/metro-usb.c: In function ‘         metrousb_read_int_callback’:
/home/tolive/OperaDownloads/Metro-USB_Linux/Metro-USB/metro-usb.c:351: warning:          passing argument 6 of ‘usb_fill_int_urb’ from incompatible pointer type 
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /home/tolive/OperaDownloads/Metro-USB_Linux/Metro-USB/metro-usb.mod.o
  LD [M]  /home/tolive/OperaDownloads/Metro-USB_Linux/Metro-USB/metro-usb.ko
make[1]: Leaving directory `/usr/src/linux-2.6.25.5-1.1-obj/i386/pae'
tolive@linux-xzka:~/OperaDownloads/Metro-USB_Linux/Metro-USB>

I have tried to contact with driver author, but nothing…
Maybe somebody can help me to change the source file? Driver can be downloaded in my first post (17 KB)
This is my “uname -a” output:

Linux linux-xzka 2.6.25.5-1.1-pae #1 SMP 2008-06-07 01:55:22 +0200 i686 athlon i386 GNU/Linux

Disregarding the warnings for the moment, have you tried loading the kernel module you compiled?

modprobe metro-usb

Yes, I have done that. Here is some dmesg logs.
After inserting the modules and pluging-in the barcod reader:


linux-xzka:/home/tolive/OperaDownloads/Metro-USB # modprobe usbserial
linux-xzka:/home/tolive/OperaDownloads/Metro-USB # insmod metro-usb.ko
linux-xzka:/home/tolive/OperaDownloads/Metro-USB # dmesg
usbcore: registered new interface driver usbserial
drivers/usb/serial/usb-serial.c: USB Serial support registered for generic
usbcore: registered new interface driver usbserial_generic
drivers/usb/serial/usb-serial.c: USB Serial Driver core
drivers/usb/serial/usb-serial.c: USB Serial support registered for Metrologic USB to serial converter.
usbcore: registered new interface driver metro-usb
/home/tolive/OperaDownloads/Metro-USB/metro-usb.c: Metrologic Instruments Inc. - USB-POS driver : v1.0.0.0
hub 2-0:1.0: unable to enumerate USB device on port 8
usb 1-8: new low speed USB device using ohci_hcd and address 5
usb 1-8: configuration #1 chosen from 1 choice
input: Metrologic Metrologic Scanner as /devices/pci0000:00/0000:00:0b.0/usb1/1-8/1-8:1.0/input/input7
input,hidraw2: USB HID v1.11 Keyboard [Metrologic Metrologic Scanner] on usb-0000:00:0b.0-8
usb 1-8: New USB device found, idVendor=0c2e, idProduct=0200
usb 1-8: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 1-8: Product: Metrologic Scanner
usb 1-8: Manufacturer: Metrologic
usb 1-8: USB disconnect, address 5
hub 2-0:1.0: unable to enumerate USB device on port 8
usb 1-8: new low speed USB device using ohci_hcd and address 6
usb 1-8: configuration #1 chosen from 1 choice
usb 1-8: New USB device found, idVendor=0c2e, idProduct=0700
usb 1-8: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 1-8: Product: Metrologic Scanner
usb 1-8: Manufacturer: Metrologic
linux-xzka:/home/tolive/OperaDownloads/Metro-USB #                 

Driver doesn’t recognize my barcode scanner…

Now I remove all modules and insert them again with vendor and product specification:


linux-xzka:/home/tolive/OperaDownloads/Metro-USB # rmmod metro-usb
linux-xzka:/home/tolive/OperaDownloads/Metro-USB # rmmod usbserial
linux-xzka:/home/tolive/OperaDownloads/Metro-USB # modprobe usbserial
linux-xzka:/home/tolive/OperaDownloads/Metro-USB # insmod metro-usb.ko vendor=0xc2e product=0x0700
linux-xzka:/home/tolive/OperaDownloads/Metro-USB # dmesg  
usbcore: registered new interface driver usbserial
drivers/usb/serial/usb-serial.c: USB Serial support registered for generic
usbcore: registered new interface driver usbserial_generic
drivers/usb/serial/usb-serial.c: USB Serial Driver core
/home/tolive/OperaDownloads/Metro-USB/metro-usb.c: Metro USB-POS support added for unknown device: vendor=0xc2e - product=0x700
drivers/usb/serial/usb-serial.c: USB Serial support registered for Metrologic USB to serial converter.
usbcore: registered new interface driver metro-usb
/home/tolive/OperaDownloads/Metro-USB/metro-usb.c: Metrologic Instruments Inc. - USB-POS driver : v1.0.0.0
hub 2-0:1.0: unable to enumerate USB device on port 8
usb 1-8: new low speed USB device using ohci_hcd and address 7
usb 1-8: configuration #1 chosen from 1 choice
input: Metrologic Metrologic Scanner as /devices/pci0000:00/0000:00:0b.0/usb1/1-8/1-8:1.0/input/input8
input,hidraw2: USB HID v1.11 Keyboard [Metrologic Metrologic Scanner] on usb-0000:00:0b.0-8
usb 1-8: New USB device found, idVendor=0c2e, idProduct=0200
usb 1-8: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 1-8: Product: Metrologic Scanner
usb 1-8: Manufacturer: Metrologic
usb 1-8: USB disconnect, address 7
hub 2-0:1.0: unable to enumerate USB device on port 8
usb 1-8: new low speed USB device using ohci_hcd and address 8
usb 1-8: configuration #1 chosen from 1 choice
metro-usb 1-8:1.0: Metrologic USB to serial converter. converter detected
metro-usb 1-8:1.0: No more free serial devices
metro-usb: probe of 1-8:1.0 failed with error -5
usb 1-8: New USB device found, idVendor=0c2e, idProduct=0700
usb 1-8: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 1-8: Product: Metrologic Scanner
usb 1-8: Manufacturer: Metrologic

And fail again…

This looks like a problem:

metro-usb 1-8:1.0: No more free serial devices
metro-usb: probe of 1-8:1.0 failed with error -5

As this relates to a kernel driver, I can only suggest posting in this forum. (To give you a better chance of getting the help you need).

Out of my league… :\