Sunday, August 20, 2006

Serial Connection

My asterisk box (no monitor or keyboard) will need serial connection "just in case the network" goes down. I have another box next to it and connected through the serial. To allow this we need to change the inittab file as by default the serial connection is usually disabled.

As root vi /etc/inittab:
rbold:/etc# vi inittab
Check the file and you will find something like this:
# Example how to put a getty on a serial line (for a terminal)
T0:23:respawn:/sbin/getty -L ttyS0 9600 vt100
#T1:23:respawn:/sbin/getty -L ttyS1 9600 vt100

In my case I remove the coment from the fist line and it worked. I've seen on the web examples with s0 instead of T0, it makes more sense but maybe it is a Debian thing.

The options for this file are:
  • -L force line to be local line with no need for carrier detect (when you have no modem).
  • 9600 serial line rate in bps. Set this to your dumb terminal or terminal emulator line rate.
  • ttyS0 this is the serial port identifier.
  • vt100 is the terminal emulation.
Check the web for more otpions

No comments: