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ā€¦

Rene

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.

http://hintshop.ludvig.co.nz/show/persistent-names-usb-serial-devices/

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?

Rene

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ā€¦

Luke

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?
Thanks
Luke

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.
Cheers
Luke

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.

Thanks,

How do exit a ser2net console session?