memo for how to use usb - serial console cable in linux.
objectives
- personal memo
system
- Thinkpad X220
% cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.2 LTS"
procedure
1. check usb port before attaching cable.
% lsusb
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 147e:2016 Upek Biometric Touchchip/Touchstrip Fingerprint Sensor
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
% ls -l /dev/ttyUSB*
zsh: no matches found: /dev/ttyUSB*
2. attach usb - serial console cable.
% dmesg
(snip)
[1555060.547993] usb 2-1.2: new full-speed USB device number 15 using ehci-pci
[1555060.657895] usb 2-1.2: New USB device found, idVendor=067b, idProduct=2303
[1555060.657901] usb 2-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[1555060.657905] usb 2-1.2: Product: USB-Serial Controller
[1555060.657909] usb 2-1.2: Manufacturer: Prolific Technology Inc.
[1555060.658939] pl2303 2-1.2:1.0: pl2303 converter detected
[1555060.660738] usb 2-1.2: pl2303 converter now attached to ttyUSB0
% ls -l /dev/ttyUSB*
crw-rw---- 1 root dialout 188, 0 Feb 28 01:29 /dev/ttyUSB0
% lsusb
Bus 002 Device 016: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 147e:2016 Upek Biometric Touchchip/Touchstrip Fingerprint Sensor
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
% lsusb | grep -i --color PL2303
Bus 002 Device 016: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port
3. connect with screen command
% sudo screen /dev/ttyUSB0
c3750-1>sh ver
Cisco IOS Software, C3750E Software (C3750E-UNIVERSALK9-M), Version 15.0(1)SE2, RELEASE SOFTWARE (fc3)
(snip)