How to connect to a Cisco Device using USB Console
This article was written using instructions for Ubuntu, but was actually tested on a Raspberry Pi. Cool, eh?
https://www.youtube.com/watch?v=PRwHNd-u_cA
Install minicom
$ sudo apt-get install minicom
Find the device
$ dmesg | grep ttyUSB [ 5.494345] usb 1-1.2: Moschip 2 port adapter converter now attached to ttyUSB0
Note the device: In this case it is ttyUSB0
Configure Minicom
Run minicom in setup mode
$ sudo 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 | +--------------------------+
Configure the Serial Device
Select ‘Serial port setup’ and press [ Enter ]
+-----------------------------------------------------------------------+ | A - Serial Device : /dev/tty8 | | B - Lockfile Location : /var/lock | | C - Callin Program : | | D - Callout Program : | | E - Bps/Par/Bits : 115200 8N1 | | F - Hardware Flow Control : Yes | | G - Software Flow Control : No | | | | Change which setting? | +-----------------------------------------------------------------------+
At the ‘Change which setting?’ prompt, press [A]
There is no need to press [ Enter ], your cursor will be moved to the end of the Serial Device Path
Change the setting to match the setting found from the dmesg command.
In this example, we’ll change /dev/tty8
to /dev/ttyUSB0
.
After the setting has been changed, press [ Enter ] to return to the ‘Change which setting’ prompt.
+-----------------------------------------------------------------------+ | 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 : Yes | | G - Software Flow Control : No | | | | Change which setting? | +-----------------------------------------------------------------------+
Press [E] to edit the Bps/Par/Bits setting
+---------[Comm Parameters]----------+ | | | Current: 115200 8N1 | | Speed Parity Data | | A: <next> L: None S: 5 | | B: <prev> M: Even T: 6 | | C: 9600 N: Odd U: 7 | | D: 38400 O: Mark V: 8 | | E: 115200 P: Space | | | | Stopbits | | W: 1 Q: 8-N-1 | | X: 2 R: 7-E-1 | | | | | | Choice, or <Enter> to exit? | +------------------------------------+
Press [C], then [Q]
The ‘Current: ‘ setting at the top of the menu will change to ‘9600 8N1’
+---------[Comm Parameters]----------+ | | | Current: 9600 8N1 | | Speed Parity Data | ...
Press [ Enter ] to return to the Serial port settings menu.
You will see the new setting on the ‘Bps/Par/Bits’ section.
... | E - Bps/Par/Bits : 115200 8N1 | ...
Press [ Enter ] to return to the ‘configuration’ menu.
+-----[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 ‘Save setup as..’ then press [ Enter ]
... | Save setup as.. | ...
At the ‘Give name to this configuration?’ prompt, enter a short name for these settings then press [ Enter ].
For this example, I’m using ‘cisco’
+-----------------------------------------+ |Give name to save this configuration? | |> cisco | +-----------------------------------------+ After pressing [ Enter ] you'll see a brief pop-up letting you know the configuration was saved.
Select ‘Exit from Minicom’ and press [ Enter ]
Run Minicom
Back at the Linux command prompt, run minicom with the name of the configuration you saved.
$ sudo minicom cisco
Welcome to minicom 2.7.1 OPTIONS: I18n Compiled on Aug 13 2017, 15:25:34. Port /dev/ttyUSB0, 11:06:34 Press CTRL-A Z for help on special keys
Press [ Enter ] to see the prompt for the device you are now consoled into.
Router>