1

I'm new to Ubuntu. I recently bought a PL2303 USB to Serial connector and had placed its driver PL2303.C to my Ubuntu 17.10.

I put the command 'lsusb', and it showed:

Bus 001 Device 002: ID 8087:8000 Intel Corp. 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 002 Device 004: ID 8087:07dc Intel Corp. 
Bus 002 Device 003: ID 1bcf:28b4 Sunplus Innovation Technology Inc. 
Bus 002 Device 002: ID 138a:0011 Validity Sensors, Inc. VFS5011 Fingerprint Reader
**Bus 002 Device 005: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port**
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

and when I checked the 'dmesg' command ==> dmesg | grep tty it shows:

[    0.000000] console [tty0] enabled
[   19.113237] usb 2-3: pl2303 converter now attached to ttyUSB0
[   25.449300] ttyS3: LSR safety check engaged!
[   25.449943] ttyS3: LSR safety check engaged!

But when I plug that serial to the console port of my switch (i used the original dongle, so dongle must be not an issue), it won't appear. I suspect the com port. but i already check it with the command ==> setserial -g /dev/ttyS[0123456789], it shows :

/dev/ttyS0, UART: unknown, Port: 0x03f8, IRQ: 4
/dev/ttyS1, UART: unknown, Port: 0x02f8, IRQ: 3
/dev/ttyS2, UART: unknown, Port: 0x03e8, IRQ: 4
/dev/ttyS3: No such device
/dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0
/dev/ttyS5, UART: unknown, Port: 0x0000, IRQ: 0
/dev/ttyS6, UART: unknown, Port: 0x0000, IRQ: 0
/dev/ttyS7, UART: unknown, Port: 0x0000, IRQ: 0
/dev/ttyS8, UART: unknown, Port: 0x0000, IRQ: 0
/dev/ttyS9, UART: unknown, Port: 0x0000, IRQ: 0

how to set com port (/dev/ttyS0) in order to be able to connected to the switch? PLease advise

  • 1
    But your port is set to ttyUSB0. Why are you trying to set on ttyS*? – Terrance Jan 16 '18 at 05:43
  • how to revert it back ? – Rangga Handoyo Jan 16 '18 at 05:52
  • You don't. The port was detected at /dev/ttyUSB0 so that is what you use for the connection to the serial port. /dev/ttyS[0-9] are for the built on serial ports to the motherboard which you are not using. – Terrance Jan 16 '18 at 05:53
  • how to configure /dev/ttyUSB0 port so I can connect it to my switch's console port? – Rangga Handoyo Jan 16 '18 at 06:09
  • Use a program like putty to connect. See the answers in https://askubuntu.com/questions/592386/ubuntu-putty-and-serial-port – Terrance Jan 16 '18 at 06:16
  • I did, but didn't work.. My Ubuntu version is 17.10, I use Minicom instead, but still failed to connect – Rangga Handoyo Jan 16 '18 at 06:31
  • You really need to edit your question and put in all the steps you have done and all the error messages you are getting. BTW, I prefer putty for connections to serial. – Terrance Jan 16 '18 at 06:32
  • I tried to install putty, but after install it, it didn't work. there's a crash title below: " Putty crashed with SIGSEGV in XGetDefault", how to resolve this? – Rangga Handoyo Jan 16 '18 at 07:19
  • Oh yes, Ubuntu 17.10 now uses Wayland. So X apps might have an issue. Try logging into Ubuntu as XOrg https://askubuntu.com/questions/961304/how-do-you-switch-from-wayland-back-to-xorg-in-ubuntu-17-10 then try the putty again. Make sure you are also setting the correct speed for the serial connection. It may be 115200 or 19200 or 9600. – Terrance Jan 16 '18 at 16:03
  • You're very welcome! I wrote it up as a quick answer to help others as well. Glad it is working for you! =) – Terrance Jan 18 '18 at 14:15

1 Answers1

1

To use putty in Ubuntu 17.10, you need to launch Ubuntu in XOrg. Follow the following answer to launch XOrg: How do you switch from Wayland back to Xorg in Ubuntu 17.10?

Your USB Serial device is at /dev/ttyUSB0. Make sure that you are using that for your putty connection.

sudo putty /dev/ttyUSB0 -serial -sercfg 9600,8,n,1,N

Make sure that you set the speed correctly for the console connection to the switch. It might be 115200 or 19200 or 9600.

Hope this helps!

Terrance
  • 41,612
  • 7
  • 124
  • 183