PL2303 USB serial adapter
Sep. 24th, 2010 02:43 pmI bought a PL2303-based USB serial adapter.
Linux
Linux has built-in drivers. I plugged it into my Debian stable box and /dev/ttyUSB0 appeared. I connected as follows:
picocom -f x -b 115200 /dev/ttyUSB0
Use ^A^X to quit. See "man picocom" for more information.
OS X
For OS X you have to download and install a driver. There are several choices:
- http://www.prolific.com.tw/eng/downloads.asp?id=31
- md-PL2303_MacOS10.6_dms_v1.4.0.zip
- This is the vendor's driver
- It supports USB vendor ID 067B, product ID 2303 (which is what I've got; you can use System Profiler to check).
- The zipfile contains a DMG which contains an installer package, plus a readme.txt that tells you how to uninstall the kext.
- It insists on a restart though I'm not sure why, as the device file appears without.
- http://www.apple.com/downloads/macosx/drivers/pl2303usbtoserialdriver.html
- osx-pl2303-0.3.1-10.4-universal.dmg
- http://www.apple.com/downloads/macosx/drivers/prolificpl2303driverfor64bitmacosx.html
- osx-pl2303.kext.zip
I went with the vendor driver. This makes the serial port appears as /dev/tty.usbserial:
$ ls -l /dev/tty.* crw-rw-rw- 1 root wheel 11, 2 24 Sep 12:27 /dev/tty.Bluetooth-Modem crw-rw-rw- 1 root wheel 11, 0 24 Sep 12:26 /dev/tty.Bluetooth-PDA-Sync crw-rw-rw- 1 root wheel 11, 4 24 Sep 12:30 /dev/tty.usbserial
(When you plug it in, you will get a popup asking you if you want to set up a new network interface, Apple apparently believing that all serial devices are modems. Hit cancel.)
screen is a good way to access the serial port:
$ screen /dev/tty.usbserial 115200
Use ^A? to get help, or ^A^\ to quit. Send ^A^A if you just want a ^A. See "man screen" for more information.
Windows
Windows didn't have a driver when I plugged the device in the first time but it did manage to automatically find a link to something I could download and install. But it only came to life when I removed and reattached the adapter, at which point it announced it was COM7. (What happened to 1-6?)
PuTTY was able to connect.
(no subject)
Date: 2010-09-24 01:56 pm (UTC)(no subject)
Date: 2010-09-24 02:03 pm (UTC)(no subject)
Date: 2010-09-24 02:05 pm (UTC)(no subject)
Date: 2010-09-24 02:15 pm (UTC)I’d question why Apple feel the need to link to drivers if their OS supports it natively. Still, the question about what it enumerates as ought to be answerable, by someone who knows what to look for; this is what Linux makes of it:
[513699.120013] usb 1-2: new full speed USB device using uhci_hcd and address 3 [513699.359168] usb 1-2: configuration #1 chosen from 1 choice [513699.369230] pl2303 1-2:1.0: pl2303 converter detected [513699.409760] usb 1-2: pl2303 converter now attached to ttyUSB0 [513699.409921] usb 1-2: New USB device found, idVendor=067b, idProduct=2303 [513699.409925] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0 [513699.409927] usb 1-2: Product: USB-Serial Controller D [513699.409930] usb 1-2: Manufacturer: Prolific Technology Inc. $ lsusb -vs001:003 Bus 001 Device 003: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 1.10 bDeviceClass 0 (Defined at Interface level) bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 64 idVendor 0x067b Prolific Technology, Inc. idProduct 0x2303 PL2303 Serial Port bcdDevice 4.00 iManufacturer 1 Prolific Technology Inc. iProduct 2 USB-Serial Controller D iSerial 0 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 39 bNumInterfaces 1 bConfigurationValue 1 iConfiguration 0 bmAttributes 0x80 (Bus Powered) MaxPower 100mA Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 3 bInterfaceClass 255 Vendor Specific Class bInterfaceSubClass 0 bInterfaceProtocol 0 iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x000a 1x 10 bytes bInterval 1 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x02 EP 2 OUT bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes bInterval 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x83 EP 3 IN bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes bInterval 0 Device Status: 0x0000 (Bus Powered)(no subject)
Date: 2010-09-24 02:26 pm (UTC)bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 0
The correct values for a CDC-compliant USB serial device are:
Class:
02h Communications Device Class
Sub-classes:
01h Direct Line Control Model
02h Abstract Control Model
03h Telephone Control Model
04h Multi-Channel Control Model
05h CAPI Control Model
06h Ethernet Networking Control Model
07h ATM Networking Control Model
(this is from http://www.usb.org/developers/devclass_docs/usbcdc11.pdf ).
(no subject)
Date: 2010-09-24 07:00 pm (UTC)(no subject)
Date: 2010-09-25 08:07 am (UTC)Which makes the thing a bit useless for password recovery on Cisco devices...
(no subject)
Date: 2010-09-25 11:37 am (UTC)(no subject)
Date: 2010-09-25 01:12 pm (UTC)