Configuring pppd in Linux, Part I

Connecting to the Internet may be easier than you think; Tony begins this two-part series with how to configure your modem.
Talking to the Modem

It is interesting to notice that minicom itself doesn't have any idea about the at command or the OK response. In fact, minicom's main tasks are very simple: to display the characters that come from the serial port and to send the characters the user keys in through the keyboard to the serial port.

In a sense, the modem is like a robot that talks to the computer using the serial port. That is why using minicom allows you to, in a sense, have your own private conversation with the modem. In the previous section, for example, you sent the modem the string at<Enter>, and the modem responded with the string OK<Enter>.

What kind of conversation can you have with the modem? As a matter of fact, every modem understands the Hayes command set that is based on the at command set. Some manufacturers also offer some very interesting extensions. If you want to find out what they are, all you have to do is look up the commands available for your modem in your modem manual. For example, the commands ATL-1, ATL-2 and ATL-3 are common to every modem; they set the speaker volume to low, medium or high.

Even though you don't need to know many of these commands to use the modem effectively, you might want to try out a few commands to understand a bit more about how your modem works. Remember that it is always possible to type the commands at&f and at&w to reset the modem to the manufacturer's configuration in case you send the modem a few unsafe commands that compromise its configuration and prevent it from connecting.

The command ATDT93355100 is used to dial a number, in this case 93355100. DT stands for dial tone, as opposed to DP, which stands for dial pulse. You might have to use the latter if you live in a rural area and are connected to an analog telephone exchange. Try to send the modem the command ATDT, followed by the number of your internet service provider, to see what happens.

In my case, the connection looks like the one in Figure 3. As you can see, after the hardware handshake (with a lot of whistling on both sides), the modem responds with a nice CONNECT 52500 message, which means the connection was established without any trouble. Of course, there are other messages you may get as a response: NO DIALTONE (there is no phone line attached to the modem), BUSY (the line is engaged), NO ANSWER (there was no answer) and so on (see Figure 4).

Figure 3. My screen after I have established a successful connection to my ISP.

Figure 4. My screen after dialing two numbers. The first one was engaged, and the other one didn't answer.

In my case, the connection was established successfully and my ISP sent me the cryptic string as soon as I connected (the one that starts with ~}#.!}!±} }4}``}&} }*} } }%). In fact, my ISP is expecting to have a conversation with my PPP dæmon, whereas I am only running minicom, which will show exactly what my ISP would have sent to my PPP dæmon.

It is very important to remember that from now on the modem is going to stop responding to any at commands; all the information sent to the serial port will be modulated and sent to the other side of the line. At the same time, all the information coming from the other side of the line will be demodulated and sent to the serial port (hence, the word modem). The computer (or, better, the serial port) is not aware of all this. It runs exactly as if there was a serial cable running from your computer to the computer on the other side. In fact, if you have two PCs at home, you can network them together quite easily using pppd and connecting their serial ports with a serial cable (you have to make sure it's an inverted cable so that the send pin of the first computer is connected to the receive pin of the second computer, and vice versa).


Next month I'll talk about configuring your computer so that you can connect to the Internet without using any advanced tools. Stay tuned!

Tony Mobily ( is the technical editor of Login, an Italian computer magazine. He is a Linux Certification Instructor (, a system administrator and is training as a dancer. He knows how to use English, Italian, C, Perl and a few other languages.



Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Hi Tony,I'm running a small

Anonymous's picture

Hi Tony,

I'm running a small linux distro without minicom - is there any other way I can send AT commands directly to my modem (dev/ttyS0)?



You rock man!!! terrific page

Q Hasan's picture

You rock man!!! terrific page..just what i was looking for.

pity no documentation on configuring linux is readily available on the net for rookies like us.

Thanks again :)