[EdCert previous] [EdCert next] [EdCert top]

Talking Serially: Modem Configuration in Linux

setserial

PC users have to worry more about certain hardware issues than Unix workstation users when it comes to serial ports and modem configuration. The following information is taken directly from optional reading, The Linux Serial HOWTO:

setserial is a program which allows you to look at and change various attributes of a serial device, including its port address, its interrupt, and other serial port options. It was initially written Rick Sladkey, and was heavily modified by Ted T'so tytso@mit.edu, who also maintains it. The newest version is 2.10, and can be found on the Linux FTP sites. You can find out what version you have by running setserial with no arguments.

When your Linux system boots, only ttyS{0-3} are configured, using the default IRQs of 4 and 3. So, if you have any other serial ports provided by other boards or if ttyS{0-3} have a non-standard IRQ, you must use this program in order to configure those serial ports. For the full listing of options, consult the man page.

Dial-In Configuration

Edit the /etc/inittab to include an appropriate entry to run a getty process on the modem port. A typical entry looks something like this:

d1:45:respawn:/sbin/agetty -mt60 38400,19200,9600,2400,1200 ttyS0 vt100

In the process field, the arguments to agetty are as follows:

After modifying the inittab, issue the command telinit q to activate it.

Dial-Out Configuration

For dial-out use only, configure the modem however you like. Most Linux distributions (including Slackware) come with a program called minicom. This is a good, simple communications program for dialing out via the modem. This program may or may not require the root user to be accessed. If so, it can be configured to allow other users.

Use of minicom is pretty straightforward. When first started it allows commands to be sent directly to the modem. Type the Control-a z key combination to get a list of key combinations that are available for configuration. One of the first things to do is choose the configure minicom option to set up the serial port and port configuration to use. Also look at the dialing directory option available with the Control-a d key combination that allows configuration of different phone numbers with different connection configurations.

Play with the different features of minicom to set up your dial-out connections, and refer to the manual page for complex minicom configuration issues.


Terms used: IRQ.



[EdCert previous] [EdCert next] [EdCert top]