Skip to content

How to set up USB serial cable on Ubuntu

02/05/2010

How to set up USB serial cable on Ubuntu

source: http://blog.mypapit.net/2008/05/how-to-use-usb-serial-port-converter-in-ubuntu.html

1.List & find the usb serial device
lsusb
jindroid@devcom:~$ lsusb
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 008 Device 002: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port
Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 005 Device 003: ID 0d62:2106 Darfon Electronics Corp.
Bus 005 Device 002: ID 046d:c063 Logitech, Inc.
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

2.Attach the device to tty
#sudo modprobe usbserial vendor=0x067b product=0x2303

3.Confirm it is attached.
#dmesg
[191526.757949] usbcore: registered new interface driver usbserial
[191526.757961] USB Serial support registered for generic
[191526.757985] usbcore: registered new interface driver usbserial_generic
[191526.757987] usbserial: USB Serial Driver core
[191526.778577] USB Serial support registered for pl2303
[191526.778606] pl2303 8-2:1.0: pl2303 converter detected
[191526.790285] usb 8-2: pl2303 converter now attached to ttyUSB0
[191526.790297] usbcore: registered new interface driver pl2303
[191526.790299] pl2303: Prolific PL2303 USB to serial adaptor driver

The node is ttypUSB0

4.Set up seral port
#minicom -s
+—–[configuration]——+
| Filenames and paths |
| File transfer protocols |
| Serial port setup |
| Modem and dialing |
| Screen and keyboard |
| Save setup as dfl |
| Save setup as.. |
| Exit |
| Exit from Minicom |
+————————–+

Select Serial port setup

+———————————————————————–+
| A – Serial Device : /dev/ttyUSB0 |
| B – Lockfile Location : /var/lock |
| C – Callin Program : |
| D – Callout Program : |
| E – Bps/Par/Bits : 115200 8N1 |
| F – Hardware Flow Control : No |
| G – Software Flow Control : No |
| |
| Change which setting? |
+———————————————————————–+
type a & put node name “/dev/ttyUSB0″ which came from step 3

Once it is done, you’ll get a shell from the device through serial connection.

Now you’re all set.

If you want to quit minicom, press CTRL+”a”, and press “x”, and select “yes” in the dialog.
You’ll be back to your original shell.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: