It's been a busy month since I wrote my last column, but I managed to make some time for Mandrake Linux. I spent it getting a modem connected to the Internet. Nowadays, connecting your Windows PC to the Internet isn't a particularly stellar achievement; but getting Linux to do it was tricky enough that it's worth describing.
Newer Isn't Better if It Won't Run
I discovered in my February column that my distribution of Linux didn't support my USB modem, nor any Winmodems; so the first step was to dig up an older modem. I used an old US Robotics 14400 external modem. The brand didn't matter too much; modems have been around for so long that most of their basic features are pretty compatible. But it was important to use an external model, not an internal card: I wanted to be able to see the indicator lights to be sure that the PC was talking to the modem, and I did not want to have to open up the PC, set jumpers and switches, and worry about interfering with other cards in my PC.
So first I temporarily connected the old modem to a serial port on a Windows system, and made sure that it worked. Then I booted up the Linux system, logged in as a normal user using KDE (the "K Desktop Environment," which is simply a more-or-less Windows-like GUI), and started looking for ways to get onto the Internet with the modem.
Too Many Knobs and Switches
Earlier, when I had changed the video display resolution, I discovered that there were several different apps that configured the system—and that they were not always compatible. For example, there was the "KDE Control Center" on the task bar, but there was also the "Mandrake Control Center," started via a desktop icon. I wanted to avoid the kind of headaches that I went through with the video settings, so I decided that I would do the proper thing: I would not run any applications until I had checked the online documentation to find out how to get the modem working. Specifically, I needed to learn how to add a modem to Linux, how to get the modem to dial my Internet Service Provider, and how to establish a PPP session so that I could surf the Web.
Read the Help... or the Manuals... or the Tips... or the HowTos... or...
Of course, I ran into difficulties immediately, because there were several different sets of documentation. There was an icon of a life preserver on the taskbar; it started up the "KDE Help Center," which was a set of HTML pages.
Unfortunately, as with so many HTML documents, it had no index, and the browser's "Find" command only searched the current page, making it pretty much useless for looking up topics. After browsing the pages for a while, I decided that they were mostly about managing the GUI. There was a section about the "KDE Control Center," but it had nothing about modems.
Next, I tried the "Documentation" icon on the desktop. That turned out to be online HTML versions of the Installation/User Guide and the Reference Manual.
I had already thumbed through the hard copies of those that came with this distribution, and was familiar with their contents, and their limitations. Just like the hard copies, the documents had no index; and being a simple browser, there was no way to search all of the pages. After a lot of browsing and referring to the hard copies, I gave up on these documents; they had nothing about adding or configuring modems after the initial Linux installation.
There was another place to look: the KDE start button led to a Documentation menu, which had four choices. Two led to the KDE Help and Mandrake Linux documentation that I just gave up on. Another launched a set of brief "Tips" that you could also see when the GUI started up. You know this kind of "Tip of the day" system: If you read one tip every time the system boots or the app starts, then in a few years you'll be a guru. I've usually found those kinds of Tip systems to be useful after you already know the basics of a system, not while you're trying to learn a new system. In any event, there was no way to search the tips, so I couldn't use them in this specific situation.
The fourth Documentation menu choice was for "Howtos English." This was a random collection of HTML documents telling how to do various things. The first page listed all of them, and had links to all of them. A quick glance found one called "ISP Hookup HOWTO."
This sounded good, but the opening section said that it assumed that the essential networking software modules had already been installed, and that you had set up which serial port will be used with the modem. I had my doubts about having met those requirements, but I continued reading. Right away, the "how to" information turned into technical speak about root privileges, typical configuration file entries, the physical devices represented by special files in the /dev directory, and so on. As a new Linux user, I saw that the information would be more confusing than useful—but as an old UNIX developer, I could follow most of it. It certainly was not a sequence of simple instructions to follow.
One thing that sounded promising was a reference to a program named "minicom."
I tried, and failed, to find it in any of the menus accessed from the Start button. Sigh.
But while looking in the menus for minicom, I stumbled upon a menu choice for "Networking | Remote access | Internet Dialer." I started that; it looked related to modems and the Internet. I clicked on its "?" button; it opened up "The kppp Handbook," which talked about "Getting online the easy way" using the "kppp" application. And it promised "You will no longer need an additional terminal program such as seyon or minicom to test and setup your connection."
Imagine that; Linux apps get to "diss" each other, without anybody getting sued!
What's more, the manual said that kppp came with a "clever little wizard that in many cases" could have me "up and running with an Internet connection in just a few minutes." I decided to jump in and give "kppp" a try. I plugged the modem into the serial port, applied power, and continued reading the instructions.
No Wizardry Involved...Just Lots of Experience
The first thing that I discovered after getting past the glowing introduction was that following the instructions did not pop up a clever little wizard. Instead, it popped up a set of very technical dialogs with many blanks to be filled in and decisions to be made.
I checked the illustrated instructions carefully; clearly, I was running the "dialog-based" setup process, not the wizard (I never did get the wizard to run). Most of the choices were explained at least a little bit in the online manual. I struggled through the dialogs as best I could.
Once again I had to rely on the experience that I picked up in many, many years of working with various operating systems, computers, and modems. (If you want a clue as to how many years that is: Search the Web for references to the "Pennywhistle modem." I actually built one of those by hand, because it was such an amazing bargain when its plans were published in an electronics hobbyist magazine. Parts of the modem were made from empty cans from canned tuna, and others were made from foam insulation for water pipes.)
I knew that the modem was physically connected to the second real serial port on the PC, and I knew that port was represented by the special Linux device called "/dev/ttyS1." I knew how to open up a console window as the "root" super–user and deliberately send characters out that serial port. I had a special "RS232 tester" device that I plugged into the cable between the serial port and the modem, and I knew how to use it to tell that the characters I sent were actually getting all the way to the modem. I also knew what special "Hayes command strings" to send to the modem to get it to do things such as initialize itself and dial a number.
With that knowledge, I knew enough to recognize a useful "terminal window" in one of the kppp dialogs. I used that window to control the modem "by hand," forcing it to dial my local ISP. When the ISP answered, I knew it, by watching the special messages sent by the modem back to the terminal window; and I knew enough to quickly send a single "carriage return" character back to the ISP at just the right time, thereby preventing it from shutting down the connection after a second or two. That carriage return told the ISP to send back instructions and prompts to start a PPP connection to the Internet; I was almost connected!
Armed with that knowledge, I was able to edit a custom kppp "script" that taught kppp how to automatically do all of the things that I had done by hand in the terminal window in order to get the ISP to start the PPP connection. When I finally had every little detail of the script correct, I was able to use kppp's buttons to run the script automatically. The modem made its beeps and whistles, the ISP grunted back, they sniffed each other like two strange dogs on the street, and then kppp gave a very brief message that said that it was "Logging onto the Network." After that, it minimized itself abruptly, leaving me with an empty desktop and a tiny display in the taskbar that showed elapsed time piling up. Apparently, I was on the Internet!
Of course, I wasn't sure what to do next, and paging quickly through the kppp online manual didn't help. The manual apparently assumed that you knew what to do after running kppp, if everything went well. In the end, I tried clicking on a desktop icon that seemed to be a link to Mandrake's Web site—and it worked! Where before I had always received a cryptic message about not being able to find the Mandrake Web site, this time the "Konquerer" browser fired up and took me to the site. I had done it!
Of course, I got off the Web right away, since I had no idea what security was set up on my system! I found that I could click on the elapsed time indicator in the taskbar in order to disconnect from the Internet; the handy lights on the external modem showed that it did indeed hang up.
Remembering the Settings
I wanted to make sure that kppp remembered all that I had taught it; I certainly didn't want to have to enter it again! So while it was all still fresh in my mind, I shut down Linux, then rebooted. In the end, I saw that kppp had remembered all of my settings somewhere (it certainly didn't prompt me to save them explicitly).
But even more interesting, I saw that Linux discovered the modem during the reboot process. I had left the modem connected and powered up, and the "Kudzu" startup process noticed it during the bootup. I told Kudzu to go ahead and set things up to use the modem (which it described as a generic modem).
After the reboot, I checked the few special files that I knew about to see what Kudzu had changed; but I couldn't see anything different. Whatever Linux learned about my modem, it's keeping to itself. But the kppp settings still worked, so I wasn't concerned.
Another Icon, Another Lesson (or Two)
Now confident that, if need be, I could do it all over again, I started playing with the various icons scattered around the default KDE desktop. One of them, marked simply "Internet," turned out to be a shortcut for launching kppp. So, if I had originally not done the proper thing by trying to read the manuals, and had instead merely started clicking icons, I probably would have found out about kppp a lot sooner! I find that a sad lesson, actually; I think that Mandrake could have done a better job, and guided the user into setting up an Internet connection. I shouldn't have had to stumble around until I discovered kppp.
Certainly, I should not have had to know as much technical, arcane knowledge to get the modem hooked up. It was possible to connect, but it was not something that a newcomer could get through without lots of help.
And that brings up the final lesson for this installment: It seems pretty clear to me that the best way to set up a modem connection to the Internet is to get some help from somebody that's done it before. A lot.
Ah, well; that's the way it was way back when DOS and PCs were new and exciting. Those difficult times led to the rapid growth of PC user groups, and that wasn't a bad thing; a lot of good folks met each other that way.
For next month's column, I'll try to install some applications and actually use Linux a little! Somehow, I've the feeling that that will lead to more adventures. We'll see.