Re: Linux cdc-acm-driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Mar 1, 2012 at 3:18 PM, Manavendra Nath Manav
<mnm.kernel@xxxxxxxxx> wrote:
> On Thu, Mar 1, 2012 at 1:57 PM, Stefan Dreyer
> <stefan.dreyer@xxxxxxxxxxxxxxxx> 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@pe1800xs serial]# modinfo metro-usb.ko
> filename:       metro-usb.ko
> description:    Metrologic Instruments Inc. - USB-POS driver
> author:         Aleksey Babahin <tamerlan311@xxxxxxxxx>
> 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@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@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@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@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

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux