Chapter 12. Configuring your modem and serial port

Table of Contents
12.1. A note about serial ports and speed capabilities
12.2. Serial Port Names
12.3. Configuring your modem
12.4. Note on Serial Flow Control
12.5. Testing your modem for dial out

You should make sure that your modem is correctly set up and that you know which serial port it is connected to.

Remember...

It is also worth remembering that if you have 4 serial ports, the standard PC set up is to have com1 and com3 share IRQ4 and com2 and com4 share IRQ3.

If you have devices on standard serial ports that share an IRQ with your modem you are going to have problems. You need to make sure that your modem serial port is on its own, unique IRQ. Many modern serial cards (and better quality motherboard serial ports) allow you to move the IRQ of the serial ports around.

If you are running Linux kernel 2, you can check the in-use IRQs using cat /proc/interrupts, which will produce output like

 0:    6766283   timer
 1:      91545   keyboard
 2:          0   cascade
 4:     156944 + serial
 7:     101764   WD8013
10:     134365 + BusLogic BT-958
13:          1   math error
15:    3671702 + serial

This shows a serial port on IRQ4 (a mouse) and a serial port on IRQ15 (the permanent modem based PPP link to the Internet. (There is also a serial port on com2, IRQ3 and com4 is on IRQ14, but as they are not in use, they do not show up).

Be warned - you need to know what you are doing if you are going to play with your IRQs! Not only do you have to open up you computer, pull out cards and play with jumpers, but you need to know what is on which IRQ. In my case, this is a totally SCSI based PC, and so I can disable the "on motherboard" IDE interfaces that normally use IRQ14 and 15!

You should also remember that if your PC boots other operating systems, moving IRQs around may well mean that OS cannot boot properly - or at all!

If you do move your serial ports to non-standard IRQs, then you need to tell Linux which IRQ each port is using. This is done using " setserial" and is best done as part of the boot process in rc.local or rc.serial which is called from rc.local or as part of the SysV initialization. For the machine illustrated above, the commands used are...

/bin/setserial -b /dev/ttyS2 IRQ 11
/bin/setserial -b /dev/ttyS3 IRQ 15

However, if you are using serial modules dynamically loaded, when required by the kerneld process, you cannot set and forget the IRQs, (etc.) once at boot time. This is because if the serial module is unloaded, Linux forgets the special settings.

So, if you are loading the serial module on demand, you will need to reconfigure the IRQs, (etc.) each time the module is loaded.