Modem PerformancePage 1
Modem Testing
15 September, 1995by Anthony Glenn
Sometimes people find that their modem seems to be completely dead, it gives no response to modem commands. No response to modem commands can be caused by a variety of possible problems: Check your modem manual under “TROUBLESHOOTING” towards the back of the manual.
The following tests may be used to try to find out what the trouble is.
Modem TestingPage 1
Quick Test for IBM-compatibles
1.Exit Windows completely. In Windows 95, enter DOS real mode. At the DOS prompt, issue the DOS command “ECHO AT&FA >COMx” where x is the COM port number (e.g. COM1). Then press “Enter”.
2.The modem should go off hook and start making noises. This proves your port is sending characters to the modem and your modem has processed some commands.
3.The cable is probably OK. DSR is connected. The modem is probably OK and there is likely to be some other reason why it is not answering commands.
4.Press F3 and the modem should hang up and the noises stop.
Port Test
This test checks the serial port on your computer; the software is also tested to some extent. The modem cannot be tested until the port works properly.
5.Start your communications software and set it so that there is no hardware or software flow control. Only one program should be running which might want to talk to the serial port. Having two programs trying to control the one serial port is a prime cause of communications problems. Make sure you are certain that the software is really talking to the serial port under test. Set the port to 300bit/s, 8 data bits, no parity, 1 stop bit. Get to a terminal screen where you can type on the keyboard and see responses from the modem. Your computer is then pretending to be a dumb terminal. Whatever you type is sent out of the port (to where the modem would normally be) and whatever comes back into the port will show up on the screen. Recheck the port setting, later tests rely on the port setting being correct. Sometimes, it can be difficult to start your software if it cannot talk to the modem. It might be trying to initialise the modem and just stopping at that point. Often there is a way to start the software so that it will not try to initialise the modem, for example, in Telix for DOS, use the command “TELIX O”.
6.Unplug the data cable from the back of the modem. Put the cable on the desk with the two rows of pins facing you and the row with more pins at the top. Pin 1 is at top left. Pin 2 (TXD) is in the same row next to pin 1. Pin 3 (RXD) is next along. The pin numbers are often written in tiny lettering on the connector next to the pins. Using a small metallic object, connect pin 2 to pin 3, this shorts TXD to RXD. The end of a ballpoint pen is useful. Make sure only pins 2 and 3 are shorted, with no unwanted connections to other pins or the metal surround.
7.Type “abcdefgh”, you should see the same thing echoed on the screen. Control-J gives a Line Feed character.
8.If no characters or garbled characters come back to the screen, you have a port problem. Go to “Resolving Port Problems”.
9.If the characters you typed are correctly echoed to the screen, TXD and RXD on your port are working. All of your port is probably working, but this little test is not a fully comprehensive port test.
10.Plug the data cable back into the modem.
Useful Test Equipment
Electronics suppliers (e.g. Dick Smith Electronics) sell an “RS-232 Mini Tester” for around $20. This device consists of a little plastic box with LEDs on it which shows you the status of some interesting serial port signals (e.g. TXD and RXD). With a Mini Tester, you can actually see the TXD LED flash when you send characters out of the port.
Also handy is a loop-back plug, which can be plugged in instead of the modem. It is simply a 25-pin female D connector with pins 2 & 3 shorted, and pins 4 & 5 shorted. This provides the TXD to RXD connection and an RTS to CTS connection so you can leave hardware flow control on when you do a port test.
Modem Command Test
This modem command test checks the computer side of the modem and verifies that the modem is processing some commands. The telephone side of the modem is not tested. The test applies to Maestro modems supporting data carrier speeds of 9600 and above.
11.Having done a successful port test, ensure that your modem is plugged in and powered up, ready to go. Start your communications software and set it so that there is no hardware or software flow control. Recheck the port settings (300,8,N,1).
12.Unplug the telephone line from the modem. Having the telephone line unplugged for a modem command test is not strictly necessary, but it does make sure that nothing can happen on the telephone line that could interfere with the test.
13.Send the command “AT&F” to the modem (by typing on the keyboard). Then press “Enter”. The modem should respond “OK”. The “Enter” on the keyboard sends a Carriage Return character to the modem, only then does the modem process the command. Always press “Enter” after every modem command. The “OK” response is the usual response to valid modem commands and will not be mentioned further, you should just expect it to occur. The “OK” response does not happen for a dial command, see the section in the manual about register S95 for examples of responses to a dial command.
14.If the “OK” response does not come back, try sending “AT&FS91=0” a few times.
15.If the “OK” response still does come back, type “aaaa” repeatedly and watch the DATA (or TXD) light on the modem, it should flash when you type a character. If it does not, the modem is faulty, have it repaired.
16.The “aaaa” you are typing should appear on the screen, if it does not at this stage, the modem is either faulty or it could be stuck in leased line mode. Contact Maestro for repair or detailed instructions on how to get out of leased line mode.
17.Send the command “AT”, the modem should respond “OK”. If it does, go to step 9.
18.Send the command “ATS0=2”, the AA light should come on. If it does, the modem is processing the command but is not echoing. If the AA light does not come on, the modem is not processing commands.
19.Either way, the modem needs repair. Send it back to Maestro.
20.Send “AT&V”, the modem should respond with a long display of internal settings. The DATA (or RXD) light will be on for a long time as this happens.
21.Change the port speed to 19200bit/s. Change your software flow control settings such that RTS/CTS hardware flow control is on (known as hardware handshaking in Macintosh parlance), and XON/XOFF software flow control is off.
22.Check that the RTS light on the modem is on, if it is not, your software is not using hardware flow control. Quit and restart your software, then resend the “AT&F” command.
23.Send “AT&V”, the same display should come up much faster this time.
24.Plug the telephone line back into the modem.
25.If everything in this test has happened normally, you can be reasonably confident that your computer, software, cable and modem (on the digital side) are all working properly
Modem Data Test
26.Check that you have done a successful modem command test.
27.Send “AT&FL3H1”, you should hear the dial tone on the modem’s internal speaker. If you do not, there may be a modem fault or there may be something wrong with the telephone line. The best way to test the telephone line is to plug the modem phone cable into an ordinary telephone (e.g. Touchfone 200). If the telephone works normally, the telephone line is good.
28.Send “ATH”, the modem will hang up and dial tone will stop.
29.Send the initialisation command “AT&F&C1&D2&R1%E2S95=45”. For Macintosh computers, leave out the &D2. For 144 speed modems and below, change %E2 to %E1. On some modems, &C1 and &R1 are factory default so you could leave them out.
30.Send the dial command “ATDT062919779”. This will tone dial the Maestro Support BBS in Canberra. Wait for the modem to dial and take note of the connection messages. If your software supports ANSI colour graphics, you may log in as “Guest 1”, password “guest”. Otherwise, log in as “Guest 2”. You may use any other BBS of your choice, just substitute the appropriate phone number in the dial command. For pulse dialling, change “DT” in the command to “DP”.
31.Get to the BBS main menu. You may press X there to get to the Maestro Support Area. You have file download privileges straight away from the Maestro Support Files Area.
32.Using the usual facilities of your software, hang up.
33.If all of this test worked fine, you can be reasonably confident that your computer, software, cable, modem and telephone line are all working properly.
Resolving Port Problems
Port problems can be caused by the data cable, the port hardware, the installation of the port hardware into the computer, or software.
The data cable is the least likely cause of problems. Cables are easily tested with an ohmmeter.
Port hardware can be tested by substitution. Try another port on the same computer. Try swapping the port hardware for equivalent hardware.
The installation of port hardware is a frequent cause of problems. Macintosh serial ports are correctly installed by Apple, so the installation problem goes away. IBM-compatible serial ports need 8 bytes in the I/O address space and an IRQ (Interrupt Request) line. IBM defined 4 common I/O base addresses for serial ports, (in Hex) 3F8, 2F8, 3E8, 2E8 (COM1 to COM4 respectively). A port uses one of those addresses plus the next 7 addresses. No other device must conflict with any address used by a port. No two ports may occupy the same address. Most other hardware manufacturers have been smart enough to stay away from the serial port I/O addresses. Alas, some video cards (especially S3-based, 8514A and ATI mach8) have an address conflict with COM4 (2E8). Owners of such a video card cannot use COM4. Some Soundblaster cards also seem to conflict with COM4.
IRQ conflicts often cause problems. An IRQ line is a physical connection from an IRQ output on an I/O device to an IRQ input on an interrupt controller. When the I/O device wants CPU service, it drives its IRQ true (i.e. puts +5V on it), soon after, the CPU executes an ISR (Interrupt Service Routine). The ISR provides whatever service the I/O device wants (e.g. read a byte from the receive data buffer) and the device drives its IRQ false. Then the CPU goes back to what it was doing before the interrupt. Two devices cannot simultaneously share the one IRQ, because you would then have two outputs trying to control the one input. Two devices can “sort of” share an IRQ by one device being completely idle, with its IRQ disabled, while the other device is enabled. Generally, each device has its IRQ enabled continuously, so in practice all devices must each have exclusive use of an IRQ. It is a good idea to make a list of all devices plugged into the expansion slots with what I/O address space used and what IRQ used. That way, it is much easier to spot conflicts between devices, and set them so that conflicts are avoided.
Many apparent port problems are caused by conflicts between software. If two items of software are trying to use the one serial port, that is guaranteed to cause trouble. For example, a fax program is loaded on start-up, then the user runs a communications program. Who owns the modem? The fax program or the comms program? Appletalk looks for a network on the serial port. Macintosh users should always disable Appletalk before running a fax or communications program. Even some screen savers look at the serial ports to see if there is any activity. Internet programs often start another comms program automatically. All programs other than the one you want to have control of the port must be closed down.
Further Information
There is another document called “Modem Performance” available from Maestro on request. It discusses maximising modem performance.