Raspberry Pi as Cisco Console Server

This topic is to discuss the following lesson:

1 Like

Where did you purchase your Konig usb to serial adapter?

Hi Rowell,

I purchased it from some Dutch webshop a couple of years ago, it seems Konig doesn’t sell them anymore (too bad). Best to google for “4 Port USB RS-232” , I’m sure some other vendors still sell them…


Got things working. Thanks! Great tutorial.

Thanks for this great write-up; I just put together a very similar setup. I used a StarTech 4-port serial “hub” I bought off Amazon (http://www.amazon.com/dp/B000YB0NQG/), since the one mentioned in this write-up I could not find in the U.S.; it appears to use the same FTDI chip-set.

One caveat I did run into is UDEV re-assigning what ports were mapped to /dev/ttyUSB*. I found this out the hard way trying to remotely configure a router and the port no longer worked. Turns out it moved. I found the article below to add UDEV rules to manually map a device symlink to the actual TTY based on the port 'serialID. This has worked well for me so far to keep device symlink the same while “following” what the kernel and UDEV decide to assign it.


For US readers:
You may buy the quad serial to USB from Amazon, using this link:

In case the link changes, here is the name of the item:
GearMo® 36inch Quad Port FTDI USB to Serial Cable for MA PC Linux with Windows Certified Drivers
Model # USA-FTDI4X

As of this post, it costs $48.29.

There’s no need to compile ser2net yourself… just install from the Debian/Raspbian repository:
$ sudo apt-cache search ser2net
ser2net - Allows network connections to serial ports
$ sudo apt-get install ser2net

Hey great write up! I’m using ATEN adapter, using PL2303 driver.
It’s working to the point I can telnet to the port and it opens the console on a Cisco switch, but when I press the ‘enter’ key it seems to send the keystroke twice.
If I press ‘ctrl - enter’ it seems to send one ‘enter’ to the device.
This is a problem when entering the username as it enters a blank password and the behaviour can be seen in the enable prompt.
Any ideas?

2000:telnet:600:/dev/ttyUSB0:9600 8DATABITS NONE 1STOPBIT banner

Just adding to my last post… when activating the trace file, the enter key by itself adds a “M” at the end, but when pressing “ctrl + enter” it doesn’t add anything. I’m guessing it’s some sort of special character?

The ser2net version in the repositories right now is version 2.6-1. The latest version is 2.9-1.

The problem with the 2.6-1 version is that logging doesn’t work, so that’s why I compiled it myself. If you don’t care about logging you save yourself the hassle and just apt-get install it.

Hi Luke,

Hmm not sure what is wrong. If you use it with putty you have no issues? Or if you use another usb-to-serial device with ser2net?


I have two ATENs and they both have the same problem.
The adapters work perfectly directly connected to a laptop with Putty or Secure CRT.

Is there a way to re-map the key strokes -> serial output?

I’ve ordered another USB-Serial adapter with a different chipset to see if it exhibits the same behaviour…


Is there an easy way to test a Serial terminal directly from the Pi without using Ser2Net?

Screen works fine with a direct connection from the Pi. Haven’t figured out why Ser2Net has this problem, tried version 2.6 and 2.9. Any ideas?

Completely restarted from a fresh copy of raspbian, installed screen and ser2net… If I ssh to the raspberry and use screen or ser2net (by “telnet localhost 2000”) it works fine…
Problem seems to occur when using telnet from a Windows 8 machine to ser2net across the network. Can anyone else confirm the same behavior?

Putty works OK… must be a windows telnet issue, but also occurs with Secure CRT in RAW mode.

Hi Rene,
I have a question regarding automatic startup of ser2net versus dnsmasq/hostapd.
ser2net you added to /etc/rc.local, however for the other two services you used “update-rc.d dnsmasq enable”. Curious, why the difference?

Hey Rene,
Please delete most of my posts - I feel like I’ve taken over your page and since I’ve narrowed down the issue, most of them aren’t needed.

Hi All,
Am using ser2net in my linux device, on telnet session everything works fine,except the arrow keys, and in vi mode i am not able to edit the files. Could you please let me know is this ser2net problem or supporing vt100 or vt102 term code needs to be integrate with ser2net. Am little worrying event vi file edit wont happening for me on telnet session by using ser2net.


How do exit a ser2net console session?