APLawrence.com -  Resources for Unix and Linux Systems, Bloggers and the self-employed

Do-It-Yourself Linux

Bill Mohrhardt

I was probably one of the last people in the free world to STILL be on dial-up, and finally said okay to Cox Communications, since I already send them a boatload of money monthly. The net difference was very small, and I got high speed Internet.

I am a do-it-yourself kind of guy (I just did not realize how much I would have to be...), so I picked up my own cable modem and install kit. We had friends visiting from Canada at the time, and my friend Mike had complained about the low quality Internet connection at our Bed & Breakfast. Low quality implying connecting to the neighbor's Linksys router, but hey, if you stood in the upstairs hallway near the window, it was fine.

I went to Best Buy, and procured a Linksys WRT54G wireless router and 2 WUSB54GC wireless USB adapters. Knowing that I wanted the connection to work with both a Win 2k machine downstairs and my Red Hat Enterprise Linux 5 machine upstairs (which also dual-boots to Win 2k), I surmised that USB would be the easiest connection method. I also bought an APC battery backup unit, to protect the router and cable modem.

I upgraded the splitter that Cox had included in the kit, as theirs only was rated up to 1 Ghz. I got one at Radio Shack that claimed to go as far as 2.15 Ghz. I routed the cable connection through the APC surge protection, then to a splitter, then to the modem and a television. I installed the USB adapter in the Win 2k machine and it saw the router immediately (it is only about 15 feet away), but it could not get out to the Internet. After checking all of my settings, I called Cox, and as it turns out, they had to do some "provisioning" of the cable modem. Once that was done, we were surfing at high speed! I downloaded the McAffee security suite that is included (for up to 3 computers) in the monthly fee.

My friend Mike then went about testing the range. He travels with a Vista laptop that he uses to login to his company's server. Since I had set-up the router with only a secured (128-bit WEP) connection, we had to type in the hex key, but then away he went! Upstairs and downstairs he was able to see the router with no problems. This was amazing to me, since the router is on a shelf behind a glass door inside a wall unit, and our finished basement was done with metal studs. The wireless technology has certainly come a long way.

Of course I could not find a native driver for Red Hat, so I started to do some research, but determined that it was going to take a while, so I decided to wait until our guests had returned home to attack the Linux setup. I did install the wireless USB card, and set it up on the Win 2k side of my dual-boot machine, and it worked like a charm. At least at this point I know that the hardware works, the USB port works, and the Win 2k / Win Xp driver from the Linksys CD works.

Now, here is where the fun starts. I tried of course, just creating a new wireless connection and selecting various drivers from the RHEL5 list of adapters in the Network window. That, of course, did not work. The Hardware Browser "saw" the Linksys USB card, but seemed to just think it was a mass storage device. I used yum to update various rpm's, concentrating on the ones that I thought might help : kudzu, system-config-network, wireless-tools, NetworkManager, and so on. Still no go.

Through Googling (yes, that has to be a verb now) around, I figured that I would have to use an ndiswrapper, which is basically a piece of software that "wraps around" the Windoze driver and allows Linux to use it. The first one that I tried was called "driverloader". I forget the actual URL, but it did not compile correctly on RHEL5 anyway. Then, through searching Red Hat's site, I got pointed to ndiswrapper version 1.53 on ndiswrapper.sourceforge.net. The instructions were excellent, and the software compiled with a minimum of complaints from the RHEL5 box. I inserted the command /sbin/modprobe ndiswrapper in the /etc/rc.d/rc.local so that it would say hello to the wrapped-up driver, and I checked dmesg to see that it had indeed created wlan0. Since I had already rpm'med NetworkManager, I decided to have that load at boot time as well, and I clicked on the little icon that said that there was no network connection.

Well, I was very pleased to see the little graphical display that showed my router with excellent signal strength, as well as 3 other routers in the neighborhood with weaker signals. I thought, well I am home free! I clicked on Firefox, and got the "cannot find www.google.com" message. Hmmm... I had clicked on my router, and I had keyed in the WEP key with the 0x prefix for hex, so why couldn't I get out to the internet? I tried every combination from the little dialog window (Restricted vs. Open Encryption, etc.), but always the same result. The wireless USB card was clearly seeing the router, but it was not associating with it. Back to Google....

I found an entry that had commands using /sbin/iwconfig and /sbin/iwlist. Every time I would use these commands, they showed correct information, but still no internet. I thought that I would have to somehow create a symlink or some other means of linking my ndiswrapper to the device wlan0. Then I found the article with the answer : it needed an alias! Of all the articles that I had found, the one on www.linuxelectrons.com gave me the one little line that I needed : alias wlan0 ndiswrapper, which had to be inserted into /etc/modprobe.conf.

Now, I could actually see the ndiswrapper (wlan0) entry when I went into Network Configuration.

I again put in the WEP key, and then clicked Activate. It then told me that it could not start it, as another process had already done so. I went to a terminal window and did a ps -ef | grep wlan0 and sure enough, there was the "other" process, obviously the failed attempt at activating wlan0 via Network Manager. I killed that, then clicked Activate again, and I was connected! I removed the Network Manager, and clicked the check-box to Activate Device when computer starts for wlan0. Web access and email was instantaneous! I quickly forgot my old dial-up connection...



Got something to add? Send me email.





(OLDER)    <- More Stuff -> (NEWER)    (NEWEST)   

Printer Friendly Version

-> -> Setting up Linksys WRT54G wireless router and WUSB54GC wireless USB adapters


7 comments



Increase ad revenue 50-250% with Ezoic


More Articles by © Bill Mohrhardt







Sun Sep 7 19:39:48 2008: 4535   JonR


Congratulations on accomplishing your wireless setup! I acquired a Linksys router in early spring of this year, and use it (Linux only, no Windows) for connecting to the Internet via ADSL, and for accessing my desktop computer files (as well as the Internet) from a remote ultra-mini-laptop (an Asus EeePC). Getting the Internet part right was not terribly hard, but I estimate it took me at least seventy hours of frustrating work, including literally hundreds of Google searches, to piece together what I needed to know in order to establish my LAN connection. It amazes me still that there is, so far as I can determine, no central source of information for this seemingly simple task which undoubtedly thousands of computer users are attempting to carry out each day. I found the answers I needed, finally, in the most obscure postings, some of them old, some newer, on forums I'd never heard of and in publications that were new to me. Virtually no useful information was available on the "big" sites including my own distro's forums.

Please excuse me if I'm wrong, but I get the impression from your posting that you are using WEP encryption on your own setup, though you did put WPA in place for your guest on his laptop. If that's so, I'd urge you to use WPA instead. I obtained a pseudo-random 63-character hex key at grc.com and it was simply a matter of cutting-and-pasting. The router itself changes the key every six minutes. That interval can be set either longer or shorter, also. Chances of an intruder latching onto your network are very greatly reduced using this method, compared to WEP.

As for dial-up -- I still keep it handy! It is useful when DSL fails, as it does from time to time (and heaven help the user who has to convince the provider, in an incident call, that yes, Linux can be used to connect).

And I was happy to read about the APC power supply. I consider mine one of the very best investments I've made in my life. It has saved me from crashes in several storms, as well as smoothing out voltage peaks and drops on a daily basis. In typical locking-the-door after the horse has escaped fashion, I bought mine after losing both my Ethernet card and my DSL modem to a lightning strike.






Mon Sep 8 16:47:40 2008: 4538   TonyLawrence

gravatar
I saw this today: (link)



Tue Sep 9 03:57:43 2008: 4540   JonR


Thanks for the link, Tony. That looks like a potentially useful tool. I tried something similar on the advice of a computer tech friend, when I was beating my head against various walls setting up my wireless LAN -- but I don't think it was that one.

I saved the page, in case I might need to use it someday.






Thu Sep 11 03:48:42 2008: 4542   sledge


I tried wicd and had no joy, however it looks like a great program. I use Wireless Assistant ( (link) and love it. I will keep trying wicd because I like it's features.



Wed Sep 17 12:09:00 2008: 4555   TonyLawrence

gravatar
Yet another article on this subject: (link)







Fri Sep 19 11:56:31 2008: 4573   Peter


Another vote for APC supplies. I have three. Got them for free from work, when the batteries died.

The batteries last 4-5 years. After that, you need to order a new one. They are standard size, and Digikey (among many others) usually carries them for about $25 each. Very simple to replace. Please don't forget to recycle the old one.



Tue Oct 28 00:14:32 2008: 4696   goldenguras


The last time I tried getting my wireless router to pickup the wireless internet gave me a headache. I gave it up ultimately. I wish you would have written down the commands and steps to issue when installing one. I would love to install linux on my laptop and try the wireless internet on it.

------------------------
Kerio Samepage


Have you tried Searching this site?

Unix/Linux/Mac OS X support by phone, email or on-site: Support Rates

This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more.

Contact us





We are questioning more than the philosophy behind our dependence upon limited and limiting systems. We question the power structures that have grown up around such systems (Frank Herbert).

Java is the most distressing thing to hit computing since MS-DOS. (Alan Kay)












This post tagged: