Using USB to Serial Port Converter in Windows 7 and Ubuntu 12.04

This is an experiment to connect to a Cisco C3640 router from Windows 7 and Ubuntyu 12.04 OS’s running on a laptop with no regular COM port. Thus the main challenge had been to ensure that the USB to Serial port Converter would work effectively in both environments and thus Console access could be achieved.

 

Hardware:

Dell Inspiron 15R N5110, 2.4 GHz, 4GB DDR3

Unbranded USB2.0 to Serial Port Converter

Cisco Console Cable

Cisco C3640 Router

Operating System:

Windows 7 Ultimate 64 bit

Ubuntu 12.04 LTS, Live session from persistent USB boot drive

Softwares:

Putty SSH Client : Windows 7 and Ubuntu

Vista Prolific chip driver for serial adapter : Windows 7

 

Steps to be followed in Windows 7:

1. Connect a serial cable to the USB to RS232 adapter. It is not necessary to connect to a router just yet.

2. Connect the USB to Serial adapter to one particular USB port in the machine. The same port has to be used at all times for console access.

3. Download and install Vista Prolific Chip driver for serial adapters from this particular source. LINK .

4. Check Device Manager (Start > Run > devmgmt.msc ) and ensure that a new port has come up. Note the COM port number (eg: COM15)

5. Download and install Putty SSH Client from SGTatham

6. Select Connection type as Serial, and Serial line as COM15 in PuTTY Configuration.

7. Click on Default Settings and Click Save to save the Serial port settings.

8. Set speed as 9600

9. Connect to a Cisco C3640 router and press Open on the Putty Configuration to access the IOS terminal.

 

Steps to be followed in Ubuntu 12.04:

 

1. Connect a serial cable to the USB to RS232 adapter. It is not necessary to connect to a router just yet.

2. Connect the USB to Serial adapter to one particular USB port in the machine. The same port has to be used at all times for console access.

 3.  Raise the terminal by entering the below key combination in Ubuntu
Ctrl+Alt+T
4. Go to superuser mode by typing and entering ” su ” followed by your password
5. Enter the following command to list all the USB devices.
lsusb
6. Look for an entry looking like this in the result:
Bus 002 Device 002: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port
7. Attach the USB port to be used as a TeleType aka Serial port device by using the below command
modprobe usbserial vendor=0x067b product=0×2303
8. Ensure it has been properly attached as a tty device by using this command
dmesg
9. If something similar to the below field can be seen from the results of the command above, port has been successfully added as a tty device with name ” ttyUSB0 ” 
[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
10. Download and install PuTTY SSH Client by using the following command
apt-get install putty
11. Once installed raise the Putty Client by either entering ” putty ” in terminal or by entering the same in Dash Home
12. Select Connection type as ” Serial
13. Select Serial Line as ” /dev/ttyUSB0 
14. Set Speed as 9600 and save settings as default.
15. Connect the Console cable to Console port of the Cisco C3640 Router
16. Press Open on PuTTY Configuration Terminal to access the IOS Terminal
NOTE:
Just because the particular Vista Chip drivers worked for my laptop does not in any way guarantee that it may work in any Windows 7 Machine. The Prolific PL-2303 USB2.0 to RS232 chipset which is considered as the default chipset for most such connectors have very faulty drivers. I had tried through nearly a dozen different drivers from different sources before finally getting one which worked. The Prolific support website, Prolific, is unreliable and have no good drivers to offer. If all else fails search through multiple tech fora in a trial and error method to get a driver that matches your system’s requirement
On other other hand in Ubuntu 12.04 no drivers at all needed to be downloaded and the entire configuration from start to stop was achieved in less than 30 minutes. Several sites may suggest a different terminal emulation program, ” Minicom ” however personally I found it to be unreliable.
Sources:

9 comments for “Using USB to Serial Port Converter in Windows 7 and Ubuntu 12.04

  1. FP
    October 18, 2012 at 11:21 pm

    Hello, very usefull article !

    Just don’t forget to open putty as ROOT (via terminal => sudo putty) besause in user mode it doesn’t work !

  2. RAFAEL EPINOZA M.
    December 28, 2012 at 10:33 am

    aparecio en mi pc, pero nose ni como usarlo o si es bueno tenerlo instalado. podrian decirme si cale la pena tenerlo y por que? gracias.

    • December 28, 2012 at 1:37 pm

      I dont understand Espanola, brother!

  3. Fran
    January 27, 2013 at 4:20 am

    Working on ubuntu 10.04 x86_64. Nothing to install. I use pl2303 to connect to a embedded board. (ALIX.2D13)
    Good article. Concise. Thanks.

  4. vaishali
    February 11, 2013 at 12:56 pm

    hi gokul…ur tutorial is really helpful for me…..thank you ….

  5. Balaji R
    February 24, 2013 at 5:29 pm

    Hi Gokul, Thank you for this tutorial. We had trouble getting serial communication working with Minicom. You suggestion to use putty solved our problem in a jiffy!

  6. M.Dede
    April 29, 2013 at 10:26 am

    Thanks For this Tutorial Very Helpfully (now my Ubuntu box Connected Console HP Procurve Swithc)

  7. madjid
    May 29, 2013 at 12:23 am

    Verry good advice you guys, after “sudo putty”, it works perfectly for me and some other friends, thanks a lot.

  8. sa-kun
    June 9, 2013 at 9:49 pm

    Thank you for this Tutorial, is just what I need to test my USB to Serial converter with PL2303 chip. Do you know if could work for programming purposes? Itś for an old Motorola MC68HC908GP32 evaluation board. Thanks again.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.