Configuring pppd in Linux, Part I
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).
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!
|Red Hat Enterprise Linux 7.1 beta available on IBM Power Platform||Jan 23, 2015|
|Designing with Linux||Jan 22, 2015|
|Wondershaper—QOS in a Pinch||Jan 21, 2015|
|Ideal Backups with zbackup||Jan 19, 2015|
|Non-Linux FOSS: Animation Made Easy||Jan 14, 2015|
|Internet of Things Blows Away CES, and it May Be Hunting for YOU Next||Jan 12, 2015|
- Designing with Linux
- Wondershaper—QOS in a Pinch
- Red Hat Enterprise Linux 7.1 beta available on IBM Power Platform
- Internet of Things Blows Away CES, and it May Be Hunting for YOU Next
- Ideal Backups with zbackup
- Slow System? iotop Is Your Friend
- New Products
- Hats Off to Mozilla
- 2014 Book Roundup
- January 2015 Issue of Linux Journal: Security
Editorial Advisory Panel
Thank you to our 2014 Editorial Advisors!
- Jeff Parent
- Brad Baillio
- Nick Baronian
- Steve Case
- Chadalavada Kalyana
- Caleb Cullen
- Keir Davis
- Michael Eager
- Nick Faltys
- Dennis Frey
- Philip Jacob
- Jay Kruizenga
- Steve Marquez
- Dave McAllister
- Craig Oda
- Mike Roberts
- Chris Stark
- Patrick Swartz
- David Lynch
- Alicia Gibb
- Thomas Quinlan
- Carson McDonald
- Kristen Shoemaker
- Charnell Luchich
- James Walker
- Victor Gregorio
- Hari Boukis
- Brian Conner
- David Lane