Wednesday, December 14, 2011

Legacy networking.

Was thinking the other day on how to use older equipment with linux. Once very simple idea was to connect to the serial ports (aka rs232) using an old fashioned modem or terminal program. Granted there will not be the gui (graphical user interface). There are some very fine programs for use with the command line. I have mentioned these before, but it will not hurt to mention them again.
We have already talked about networking with xrdp and ltsp. Now, this is a very good way to use older equipment. Especially in an emergency. Knowledge of using the command line is required. Mouse jockeys need not apply. I say that with affection. Most Unix/Linux are set up to connect to the serial ports automatically. Some versions of linux prefer you use a usb to serial connector for communication though. Actually you could do this with a Microsoft based system also. (different application software such as old dos programs would have to be used.
Note: Experience at cable making is needed for this project if you can not find readily available parts.

There is lots of good software available for the non-gui (graphical user interface). This is sometimes called using the command line.
Small sample of software available:
Links2 – internet
Bashpodder – audio podcast collector
Alpine – email client
Irssi – inter relay chat
Centerim – instant messaging client
Oleo or Sc – spreadsheet
Vim, emacs, nani, joe, or a dozen other programs – word processing
Antiword – deals with office based documents
Putty – secure accessing too
Screen -multiple session tool
Ledger – accounting (seems to be based on gnucash)
gpm, mc, synaptic, sed, awk, sort, ncurses, bash ,ssh, wget, curl, or other command line tools.
Sqllite, mysql, psql, plus man other – databases
Hnb – outliner to organize ideas
freebasic, gcc, python, pgp, php, php-cli, perl and many others – computer programming language tools.
Too many to list here – games.
Moc, aplay, mplayer, cmis and may others – music players
Espeak or Festival – voice synthesizer.
Nget and may others – news readers.
Cdrecord – cd buring program.
wyrd – nice calendar tool.

The network is what traditionally is known as a star network. You will basically have one server with a few terminals (aka clients) connected. Since terminal programs have been out for many years, you have a variety of systems that can connect. There are basically two ways to connect either modem to modem or via rs232 (serial port) using a what is known as a null modem interface to make sure the right wires connect. The next two panels show the wiring for these connections.
Note: You have to be careful some rs232 interfaces use different voltage levels anywhere from 3 to 12 volts. Not matching the corrent voltages will damage equipment. This is especiallt true with the old 8 bit computers such as the Commodore 64 unless you use a special interface. Check the specs for sure. (i.e. ttl not equal to rs232.)

RS232 to RS232.
You can get null modem adapters readily made so you do not have to make one. I have left the specifications in case you want to make your own or you do have access to the parts, but not the ready make adapters. A null modem is a way to interface two serial ports so that they can talk to each other. This sometimes known as a hard wired connnection, See also
Note: if you are unsure about the connections, then get a professional to help. I will not be responsible for any issues.

Modem to modem.
How to connect two modems directly together. You can either do it with a simple battery or use a wallwart to supply power. All the parts should be readily available from most real electronic stores.
Note: if you are unsure about the connections, then get a professional to help. I will not be responsible for any issues.
Note that the resistor value depends on the actual voltage used. For 24V about 1K Ohms max will give at most 24mA (12V @ 500 Ohms, 9V @ 380 Ohms); the resistance of the modem circuit will reduce this slightly (you may need to reduce the resistor value, but if it works with the values mentioned, leave it at that; I’m using 380 Ohms with a voltage input of 14V). The telephone company guarantees about 20mA minimum in an actual phone line, and we want to be about the same minimum. Note also that the battery shown can be replaced by a “wall wart” power supply; most of these are un-regulated (my “9V @ 130mA” plug in DC supply gives about 14V on this circuit when connected to a telepone for testing) and consequently will need an electrolytic capacitor of about 2200 uF across the power supply + and – terminals to reduce the “ripple” voltage (i.e., AC “noise”); be sure to match the polarity of the Electrolytic to the polarity of the power supply.

If you have not already done so you will want to add users for your system. You can do it via the gui interface or you can do it via the command line via the “useadd” or “adduser” commands.
ggarron@debian:~/tmp$ sudo adduser test
Adding user `test’ …
Adding new group `test’ (1004) …
Adding new user `test’ (1003) with group `test’ …
Creating home directory `/home/test’ …
Copying files from `/etc/skel’ …
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
Changing the user information for test
Enter the new value, or press ENTER for the default
Full Name []: gasf
Room Number []: asdg
Work Phone []: asdf
Home Phone []: asdf
Other []: asdf
Is the information correct? [Y/n] y
With useradd you have to add parameters.
$ sudo useradd test1
Note: Would not hurt to do the following for reference:
$ man useradd > useradd.txt
$ man adduser > adduser.txt

One last thing you will need to do is set the terminal specifications usually but not always 9600 8n1 (9600 baud, 8 data bits, no parity and 1 stop bit.) For modems, you have to use a lower speed depending on it’s capabilities. Most modem programs make it very easy to change these settings. In any case, both the server and the clients have to have the same specifications for each connection. The connections as a whole do not have to be the same.
You should be able to just plug in the parts and the terminal prompt for the login will automatically come up. (on some systems you might have to hit c or enter to get the attention of the server.
What is really neat is you can use the old pda’s that have serial ports on them. this is great for connecting to servers when a monitor is not readily available for use. In fact, all our servers do not have monitors available on the servers. either you connect via rs232 using a terminal or you use the network via ssh.
Have fun and good luck.

No comments:

Post a Comment