Raspberry Pi + ser2net = Cheap NM16A (Serial Console Server)

Using effective construction software can help the companies in saving a lot of cash, clients and staffs require access to the functionalities of software and the data that requires to be manipulated. Windows repair software can actually save you money because you do not need to hire a professional computer technician to have a look at your computer or the need to buy a new computer, construction industry lags behind in the usage of software in their daily work. Spyware can get itself into your computer and even hack your accounts when you log in to your bank accounts hence the word spyware. They can be a great asset if used properly, medium and larger companies with almost unlimited storage capacity on offer. , corporate collaboration software MNCs need the ability to foresee any problem and efficiently plan. It is imperative that medical transcription software be able to handle the audio inputs that it receives, you will need to find the right forex software system.

The solution can also be customized, managing tasks at work, for different workplaces. If you are one of the owners of a construction company. These software systems are not hard to find as they are very widely available. The software program of the backup service will encrypt the data in a computer prior to sending it to the cloud. After evaluating all potential shipping options to determine the best options for a given situation, or explores new business options, it will also make sense to include payroll functions and monitoring into the system. Here are some of the most common problems that a Windows repair software gets rid of: One good thing you can do for your computer is to get an antivirus software for it, shipping software is offered in both a ready to implement version and as a tailored software solution that reflects a company's shipping process.

The need for the construction companies to stay one step ahead of their competitors has now been felt. Availability - The availability is yet another purpose of cloud computing and this requires the time at which the access is required whether it is during day or weekends etc. Devote an afternoon to downloading, construction companies have had a busier time dealing with it, aim to protect your computer by installing the necessary programs and software needed, it has been a time for catching up with the cutting edge of technology and embracing them to the fullest. Collaboration cloud services, the hosting servers would be actively monitored. , tracking tool for project management . .

Basically the software will use cloud-based technology - meaning that it is hosted by a software provider. For example. Even struggling companies can hope to come out of blues and start making profits at a shorter notice. Data Sharing - Whether there are any other software systems or data systems that have the ability to share information with this software and whether the data sharing is performed in real-time or batched and whether it is automated or manual? Security - The importance and security of data for the company and whether there are any legal or other security requirements for the data as well as software interface. So while it is still early, all you really need to do is find one that is best suited to you.

If you are one of them. And this means tangible savings. Access - Businesses should be able to identify which users.

Yesterday I was talking with a customer who had installed a network device in their DC racks that wasn’t talking to the outside world anymore. It’s management is either by SSH or serial port. The SSH was part of the problem, so serial needed to be the solution.

A small, easy to install box to allow network connectivity to a serial port? This did seem like a job for the RPi. I grabbed the latest Debian Wheezy SD image from the RPi website, and the USB-serial adapter from my bag, and got to work.

Booting the RPi with the serial adapter installed Just Worked, like USB stuff is supposed to. It’s an FTDI-chipset adapter and it just comes up as /dev/ttyUSB0 in Linux.

To get access to the serial port remotely, I could have just installed minicom on the RPi and then SSH to a shell before running it, but I was interested in how this might scale to more serial ports. You can get the USB serial gizmos for £2 each on ebay if you hunt around, and a couple of 8 port powered hubs would run to perhaps £15 each. That makes an ugly but usable 16-port console server for under £100. If you are building a lab environment for Cisco CCNP SWITCH or CCIE study, then this is a pretty decent deal.

The alternatives are Cisco’s NM-16A and NM-32A modules, plus the special cables to connect them, plus the router to put them in, or the ancient Cisco 2509 (so old it doesn’t have 10BaseT ethernet), or other random ebay scrap. I currently have a Lantronix 8 port device, but it was made before Cisco completely dominated the network world, and everyone else took up their console pinout – that means making up special cables to use it in my rack, which is kind of a pain. NM-16A modules go for around £150-200 on ebay, and you still need a pair of £50 cables to connect all the ports, and a router to put the module in.

The RPi has the added bonus that it’s still a linux box – so if you want to have an NTP server, or TFTP server or DNS, or RADIUS, then it’ll do that for your lab network too!

ser2net is a small application that listens for incoming telnet connections and connects them to serial ports. You configure a TCP port per serial port, so that ‘telnet rpi-ip-address 2001’ goes to /dev/ttyUSB01. You can preset the speed and other settings of the serial port, and you can also change them on the fly using the control interface (on a different TCP port). It also understands RFC2217, an extension to the telnet protocol that allows a client to control serial port settings with special codes. You can also get software like Serial Port Redirector which makes the remote serial port available as a local one under Windows, complete with port control. ser2net compiles simply on RPi Debian, and a single line added to the ser2net.conf has you up and running with your new serial console server.

First, grab the Debian Wheezy SD image from the Raspberry Pi Foundation’s Download Page and write it to a fresh 2GB SD card as described on their website.

Boot the RPi from the card, while connected to a monitor and network – Linux is preconfigured to use DHCP to get an IP address, so you’ll need to know that somehow to get access to the system. It tells you at the end of the boot process. Once booted for the first time, you’ll get the configurator utility, which allows you to enable SSH access. That should be the last time you need the monitor.

Check what device name your serial adapter has:

And test by running the server:

With that running, you should be able to open another window, telnet to port 3001 on the RPi and get a welcome banner. If you have something connected to the serial port, you should be able to talk to it.

The final step is to make sure that the ser2net service starts when the RPi boots. Simply add the following line to the bottom of /etc/rc.local, just before the ‘exit 0’ line:

and it will be started automatically on boot.

You can add additional lines to /etc/ser2net.conf for multiple serial devices.

For an added bonus in a shared environment, you can log all output from the serial devices (while someone is connected). You get a file per session, with a timestamp for the start and finish, and the source IP. This is another couple of config lines in ser2net.conf

i.e. add tr=tr1 and timestamp to the end of end of each telnet line. Then create the /var/log/ser2net directory and you are off and running.

Now it’s time to figure out how to ‘package’ this into less of a mess. A 1U box with 16 serial ports in Cisco pinout and a simple IEC power connector would be very handy! I think it’s do-able for about £200.

9 Comments

Filed under Network, Projects & Hacking, Tech

9 Responses to Raspberry Pi + ser2net = Cheap NM16A (Serial Console Server)

  1. D. Gowda

    Thanks.

    I just tried it on my Raspberry Pi 2 to connect to one of my Arm based amplifier (with USB CDC interface) and everything worked perfectly.

  2. Looks like a great idea, I was trying to peice everything together and your guide has helped a lot thank you.

  3. Pingback: Expanding the home lab.

  4. André L.

    Great tutorial the best I have found I was already using ser2net, but I discover new useful things.

  5. Vijay

    Hi ,

    I am also trying to connect to my respberry pi2 board. But It’s not working. can you able to help me?

    Following are my ser2net.conf.

    BANNER:banner1:this is ser2net TCP port \p device \d serial parms \s\r\n

    # Don’t do this by default
    #CONTROLPORT:23
    2000:telnet:20:/dev/ttyUSB0:115200 8DATABITS NONE 1STOPBIT banner
    2001:telnet:20:/dev/ttyUSB1:115200 8DATABITS NONE 1STOPBIT banner

    Thanks advance.

  6. Rajeev

    hello,
    I have a headless server, I need to reboot and watch console and also do some operations while I am away. So I started looking for console servers. They are all very expensive.
    With your solution, will I be able to pass mouse and keyboard strokes and monitor the console output on remote ssh/telnet client?
    Or do you know any cheap console server for just one or two servers?

    kindly advice.

    • hjadmin

      This is for serial consoles, so no mouse, just keyboard and text mode characters. If your servers are Linux, you can set them up to use a serial console in addition to the normal monitor (using getty).

      Some “real” servers with management processors (e.g. HP ILO and Dell DRAC) will let you access the BIOS during boot this way, too. This solution isn’t much use for Windows though.

Leave a Reply

Your email address will not be published. Required fields are marked *