Results 1 to 6 of 6
I have a USB serial device which presents itself as:
Code:
Bus 002 Device 004: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port
This is a MSR505C magnetic stripe card ...
- 02-19-2010 #1Linux Newbie
- Join Date
- Jul 2007
- Posts
- 104
USB serial driver
I have a USB serial device which presents itself as:
This is a MSR505C magnetic stripe card reader.Code:Bus 002 Device 004: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port
I know this device is supposed to work as a character device in GNU/Linux because there is a library called "libmsr" to use it with.
However, the device will not map to any device on my /dev filesystem.
I have compiled the usbserial module, loaded it, created the special character files with mknod, then connected the physical USB device, which then presents the kernel system messages (by dmesg):
Even though the device is obviously detected, I cannot open any of the /dev/ttyUSB* devices to access it.Code:usb 2-2: new full speed USB device using uhci_hcd and address 4 usb 2-2: default language 0x0409 usb 2-2: New USB device found, idVendor=067b, idProduct=2303 usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0 usb 2-2: Product: USB-Serial Controller D usb 2-2: Manufacturer: Prolific Technology Inc. usb 2-2: uevent usb 2-2: usb_probe_device usb 2-2: configuration #1 chosen from 1 choice usb 2-2: adding 2-2:1.0 (config #1, interface 0) usb 2-2:1.0: uevent usbserial_generic 2-2:1.0: usb_probe_interface usbserial_generic 2-2:1.0: usb_probe_interface - got id drivers/usb/core/inode.c: creating file '004' hub 2-0:1.0: state 7 ports 2 chg 0000 evt 0004
I even tried accessing it using the libmsr utility on ALL 256 ttyUSB* devices as such:
However, all of them give the error:Code:for i in $(seq 0 255); do ./msr /dev/ttyUSB${i}; done
With the two last giving me:Code:msr: Serial open of /dev/ttyUSB253 failed: No such device
Code:msr: Serial open of /dev/ttyUSB254 failed: No such device or address msr: Serial open of /dev/ttyUSB255 failed: No such device or address
- 02-22-2010 #2Just Joined!
- Join Date
- Feb 2010
- Location
- Brazil
- Posts
- 7
Which kernel version are you using? Maybe an upgrade would help.
Maybe the driver created a different entry in /dev. I use the command:
ls -l /dev | wc -l
before and after plugging the device to see any changes in /dev.
- 02-23-2010 #3Linux Newbie
- Join Date
- Jul 2007
- Posts
- 104
Great tip, thanks!
I found four new devices that show up upon connecting the device; although, I still get:
My kernel version is 2.6.30, custom compiled by myself, USB works perfectly fine and I do have the USB serial module loaded which apparently detects something as per the dmesg output I posted at the start.Code:x86_1# ./msr /dev/usbdev2.3_ep00 msr: Serial open of /dev/usbdev2.3_ep00 failed: No such device or address x86_1# ./msr /dev/usbdev2.3_ep02 msr: Serial open of /dev/usbdev2.3_ep02 failed: No such device or address x86_1# ./msr /dev/usbdev2.3_ep81 msr: Serial open of /dev/usbdev2.3_ep81 failed: No such device or address x86_1# ./msr /dev/usbdev2.3_ep83 msr: Serial open of /dev/usbdev2.3_ep83 failed: No such device or address
- 02-23-2010 #4Just Joined!
- Join Date
- Feb 2010
- Location
- Brazil
- Posts
- 7
Well, since you configured and compiled your own kernel, did you remember to enable the option USB_SERIAL_PL2303? It seems that there is a specific kernel module for Prolific. The module name is pl2303. The module usbserial_generic should only be loaded when no specific module is found.
- 02-23-2010 #5Linux Newbie
- Join Date
- Jul 2007
- Posts
- 104
- 02-24-2010 #6Just Joined!
- Join Date
- Feb 2010
- Location
- Brazil
- Posts
- 7
Glad I could help.
One way to discover which module the kernel muse use is to use a default kernel from a large distribution (Slackware, Ubuntu) or to include almost everything in your custom kernel as a module (in the category Device Drivers). Let the kernel load the module and use lsmod to verify which one was loaded.


Reply With Quote
