USB to Serial Adapter
My new laptop doesn't have a serial port. This is one of the great tragedies of modern laptops in my opinion. At least for situations where I want to connect to the serial port on a server or system with a serial port, I can use a USB to serial adapter like this adapter I bought at NewEgg. I tested it just now by connecting to the serial port on my old FreeBSD laptop.
First I enabled the serial port in /etc/ttys
Then I restarted init to activate it.
On my Ubuntu laptop I attached the USB to serial adapter to a null modem and a gender changer, then connected it to the FreeBSD laptop serial port.
I installed cu(1) on Ubuntu
then checked dmesg output to ensure I had a device to which I could connect.
Now that I saw /dev/ttyUSB0 was enabled, I connected to it.
That's it. If I needed to set a different speed I'd use the -s switch. For example, if 9600 above was 19200 in /etc/ttys, I'd use syntax like
Now I know I can rely on this USB to serial adapter when I visit servers in the data center.
First I enabled the serial port in /etc/ttys
#ttyd0 "/usr/libexec/getty std.9600" dialup off secure
ttyd0 "/usr/libexec/getty std.9600" dialup on secure
Then I restarted init to activate it.
# kill -HUP 1
On my Ubuntu laptop I attached the USB to serial adapter to a null modem and a gender changer, then connected it to the FreeBSD laptop serial port.
I installed cu(1) on Ubuntu
# apt-get install cu
then checked dmesg output to ensure I had a device to which I could connect.
[17213831.716000] usb 1-1: new full speed USB device using uhci_hcd and address 2
[17213831.876000] usb 1-1: configuration #1 chosen from 1 choice
[17213831.984000] usbcore: registered new driver usbserial
[17213831.984000] drivers/usb/serial/usb-serial.c: USB Serial support registered for generic
[17213831.984000] usbcore: registered new driver usbserial_generic
[17213831.984000] drivers/usb/serial/usb-serial.c: USB Serial Driver core
[17213831.988000] drivers/usb/serial/usb-serial.c: USB Serial support registered for pl2303
[17213831.992000] pl2303 1-1:1.0: pl2303 converter detected
[17213831.992000] usb 1-1: pl2303 converter now attached to ttyUSB0
[17213831.992000] usbcore: registered new driver pl2303
[17213831.992000] drivers/usb/serial/pl2303.c: Prolific PL2303 USB to serial adaptor driver
Now that I saw /dev/ttyUSB0 was enabled, I connected to it.
richard@neely:~$ cu -l /dev/ttyUSB0
Connected.
FreeBSD/i386 (orr.taosecurity.com) (ttyd0)
login: richard
Password:
Last login: Fri Mar 16 11:57:49 on ttyv1
Copyright (c) 1992-2006 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
The Regents of the University of California. All rights reserved.
FreeBSD 6.1-SECURITY (GENERIC) #0: Wed Feb 14 15:33:28 UTC 2007
Welcome to FreeBSD!
That's it. If I needed to set a different speed I'd use the -s switch. For example, if 9600 above was 19200 in /etc/ttys, I'd use syntax like
richard@neely:~$ cu -l /dev/ttyUSB0 -s 19200
Now I know I can rely on this USB to serial adapter when I visit servers in the data center.
Comments
By the way, is that off of a Thinkpad? I noticed a bunch of those at Eclipsecon that had Parallel ports, but no serial port. Strange that the Dells are the exact opposite.
The windows drivers are notoriously buggy, producing a blue screen if you use them for too long.
The IBM serial+parallel port thing seems to work better.
The device now works perfectly with minicom, cu, etc. I did however run into a problem using iWar in analog mode however. I would be interested to know if you get the same results with this adapter.
I blogged (in the link below) about iWar in VOIP mode and plan to write one about analog mode after resolving this issue.
http://www.digitalbond.com/index.php/2007/03/07/assessing-modems-with-iwar-voip-mode/
That said, some people seem to have zero problems, others endless headaches.
I certainly agree the lack of Serial ports is a major nuisance!
If you're doing a lot of work with serial I recommend using screen. It can auto-detect the speeds and settings you need.
-Pete
http://hackathology.blogspot.com/
root@cceng:~# cd /etc/ttys
bash: cd: /etc/ttys: No such file or directory
do you guys have any other idea how can i use my usb to rs232 converter. Actually i want to use the usb to rs232 converter connected to ts7200 single board computer.
I never would have guessed that this adapter would just work after plugging it in. After typing cu -l /dev/ttyUSB0 I was magically connected to my cisco router I had hooked up to it. Amazing. Thanks again.
pp@pp-laptop:~$ cu -l /dev/ttyUSB0
cu: Stale lock /var/lock/LCK..ttyUSB0 held by process 25339 created 2008-09-02 16:42:57
A - Serial Device : /dev/ttyUSB0
B - Lockfile Location : /var/lock
C - Callin Program :
D - Callout Program :
E - Bps/Par/Bits : 9600 8N1
F - Hardware Flow Control : Yes
G - Software Flow Control : No
http://www.prolific.com.tw/eng/downloads.asp?ID=31