Wireless on the Road
November 29th, 2004 by Akkana Peck in
Wireless Internet access has become easy to find in large cities. But I take vacations in more out-of-the-way places, where "the Internet" still is a new concept. Getting Internet access in most small towns isn't always a straightforward task. Here are some tips that might help you keep your Linux laptop connected on your next trip.
A few preparations before you leave home may help a lot down the road. Test your wireless card thoroughly. If you don't have a wireless network at home, work or school, try to find a local Internet cafe. You don't want to be diagnosing the problems of an unfamiliar network when you're not even sure if your card's driver works or if your hotplug setup is handling PCMCIA cards properly.
Add entries to /etc/hosts for important sites you need to contact, such as your mail server. Make a copy of your /etc/resolv.conf file while you're at home, along with the IP addresses of any other nameservers you trust. As we'll see, you can't always rely on getting accurate DNS information on the road.
The ideal situation is to find a hotel that offers Wi-Fi access, but this is harder than it sounds. Auto-club road guides are no help; they offer a symbol for data port, which means the telephone has an extra place to plug in a phone cable. Why anyone thinks this matters is beyond me. If you want modem access, simply unplug the phone from the wall.
Watch for hotel billboards as you drive in to a town; sometimes the snazzier hotels advertise "High-Speed Internet". If the billboards are no help, read the hotel signs and watch for banners on the hotels as you drive through town.
But beware! High-speed Internet does not mean "We have Wi-Fi that reaches your room". Sometimes it means, "We have one public Windows computer with a DSL connection in the hotel lobby, and you can use it if you don't mind typing your e-mail info and all your passwords into Internet Explorer or Outlook on a public terminal that a hundred guests will use right after you." Look for key phrases, such as "wireless Internet" or "in-room Internet".
If you see no billboards or banners, you may have to go from door to door and ask. Most hotel desk clerks do understand the question these days, and if they don't offer wireless, they may be able to direct you to a hotel that does.
Side note: many hotel clerks, when describing their wireless Internet services, start to hand you a card and a CD with Windows drivers. Assure them that you have your own laptop and wireless card, and they become much happier and stop scaring you with driver discs.
So, you've found a hotel with Wi-Fi access. You're using your own wireless card, which you tested before you left home. You're all set, right? Nope--there still are a lot of potential issues to work through.
The first issue is range. In my experience, fewer than half of the hotels that claim in-room Wi-Fi actually have a signal that can reach a typical PCMCIA card's antenna in most of the rooms. When you check in, be sure to tell them you care about Internet access, as they may give you a room closer to the access point. But don't count on it, even then. If you don't get a signal from the room, try the hotel lobby and see if it's any better from there.
An external antenna can help with reception, either a purchased antenna or a homemade cantenna--a wireless antenna made from a soup can. The trick is finding a way to connect an antenna to the wireless card. Many internal wireless cards already have an antenna connector; it may be as simple as unplugging the wire to the built-in antenna and replacing it with an external one, although you may have to make your own connector. If you use a PCMCIA wireless card, it's more difficult, as few of these cards offer an external antenna option. If you can't find such a card, all is not lost; it's sometimes possible to modify an existing card to add an antenna. Try a Web search on the model of your card plus the phrase "antenna modification". Obviously, don't try this with your only wireless card or with a card that's so expensive you can't risk destroying one or two.
Now you have a signal. Most hotel and cafe wireless access is set up as an open line (no WEP encryption) with dynamic addressing using DHCP, the dynamic host configuration protocol. So, you obviously should set up your machine for DHCP. But what if the server doesn't give you an address? Try running /sbin/ifconfig -a. You should see output something like this:
eth0 Link encap:Ethernet HWaddr 00:03:6D:00:83:CF
inet addr:192.168.1.100 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:47 errors:0 dropped:0 overruns:0 frame:0
TX packets:3 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:7112 (6.9 MiB) TX bytes:1522 (1.4 KiB)
Interrupt:11 Base address:0xd000
If the card is marked UP and there is no inet addr, then DHCP probably isn't working. In this case, you may be able to connect using a static address.
How do you choose a suitable address? That's tricky. Most public wireless networks use the 192.168.1.* address range, so you could choose an IP address between 192.168.1.1 and 192.168.1.254 and try it. That's somewhat unfriendly, but it may work. Alternatively, you can use a Net sniffer, such as Kismet or Airsnort, to snoop on the Net and see what sort of addressing scheme they're using. But in small-town hotels, you might find that no one else is on the Net, especially if it's not working correctly. In this case, guessing might be the only option.
A static address also may help with a flaky connection. If you're on the ragged edge of reception, constantly losing a connection and then getting a new one, as so often happens with hotel networks, not needing to make a new DHCP query every time can make the difference between a connection that is merely slow and one that doesn't work at all.
Much more common is to get a valid DHCP address but no nameserver, the service that maps domain names such as example.com to Internet addresses. If this is the case, your network will be up and you'll be able to get to IP addresses or hosts specified in /etc/hosts, but you'll hang any time you try to reference any other host by name.
On Linux, user cat /etc/resolv.conf to find out what DNS information you've been given. It may be wrong in some fairly obvious way. For instance, one hotel listed 0.0.0.2 as the nameserver, but DHCP had assigned our machines addresses of the form 10.0.0.18. After editing /etc/resolv.conf to change the nameserver's address to 10.0.0.2, everything worked fine.
If there's no obvious error in resolv.conf, try using the DNS server you use at home. Pull out the resolv.conf you copied at home and install it in /etc. It may help.
You also may find that you pick up a nearby pay access point instead of the free one you were hoping for. Most of the pay services serve you a DHCP address and correct DNS info, but you aren't able to make any mail or SSH connections. In a situation like this, fire up a browser and visit any Web page. Most of the pay wireless services intercept Web requests and serve up a page with information on subscribing. Once you see this, you know what's up and can choose to subscribe or not.
Another common problem is latency. Maybe you got a good DHCP address and DNS is working okay, but periodically the network simply disappears for a few seconds or minutes at a time. This situation, unfortunately, is common among public and hotel wireless setups, and you should be prepared to deal with it. If you can, handle your mail with batch processing: download it all with POP or off-line IMAP, read it locally and then synchronize your mailbox later. If you need to use SSH or a similar interactive protocol, be aware that the network may disappear at any time; save your work often.
What if you weren't able to book a room in a hotel that offers Wi-Fi? What are the options then? Many truck-stop chains offer paid wireless access, as do many airports, coffee shops and a few other stores. Usually these businesses offer access by intercepting browser requests and directing you to a subscription form, on which you can buy access for a day or for longer periods. If you fill out one of these forms over an open wireless link, consider checking that your browser shows you certificate information for each SSL site--you probably checked a "don't show me this again" box for that at some point. In this case, you want to make sure, before typing in credit card or other personal information, that the site requesting the information really is who it says it is. Aside from that, buying access should be a straightforward task.
Ask around town about Internet cafes. In the places I travel, people give me funny looks or else I end up finding a place that has a few Windows computers that people can use for $5/hr or something--not much help. But your luck might be better. Some Web sites are available too that try to list wireless access points (see Resources), but I haven't found them to be accurate for small rural towns.
If your wireless card supports it, you could try driving around town scanning for open wireless networks-- sometimes called wardriving. You might find an Internet cafe where you can sip a latte or a public library with a wireless connection open to everyone. Until the Yellow Pages adds a category for Internet, scanning is sometimes the only way to find such places. Try iwlist eth0 scan, replacing eth0 with the name of your wireless card, if different. Or use one of the Net sniffer programs listed in Resources.
Wireless Internet access is becoming increasingly common, even in rural areas. If you're prepared to deal with a few glitches, you probably can keep your Linux laptop connected while traveling without ever having to fuss with a telephone line. You even may find that it's easier to get a high-speed wireless connection than it is to find a local modem dial-up number.
Wi-Fi Locator Pages
Wiredfreespot - hotels that offer wired Internet access
Google - add "Wi-Fi" as a query keyword
Net Sniffer Tools
Special Magazine Offer -- Free Gift with Subscription
Receive a free digital copy of Linux Journal's System Administration Special Edition as well as instant online access to current and past issues. CLICK HERE for offer
Linux Journal: delivering readers the advice and inspiration they need to get the most out of their Linux systems since 1994.
Subscribe now!
The Latest
Newsletter
Tech Tip Videos
- Jul-01-09
- Jun-29-09
Recently Popular
From the Magazine
July 2009, #183
News Flash: Linux Kernel 3.0 to include an on-the-go Expresso machine interface! Ok, maybe not, but Linux is definitely going mobile, from phones to e-readers. Find out more inside about Android, the Kindle 2, the Western Digital MyBook II, The Bug, and Indamixx (a portable recording studio). And if you've gone mobile and you been wanting more Emacs in your life then check out Conkeror.
To compliment the mobile we've got the stationary: parsing command line options with getopt, checking your Ruby code with metric_fu, and building a secure Squid proxy. How is this stationary you ask? What can we say? It's not. We just wanted to see if anybody actually read this part of the page :) .
All this and more, and all you have to do is get your hot sweaty hands on the latest copy of Linux Journal.
Delicious
Digg
StumbleUpon
Reddit
Facebook








Can-free Cantenna
On December 3rd, 2004 Hal Stanton (not verified) says:
Check out http://www.a42.com/node/73 for a can-free alternative to the cantenna. It is made out of 4" PVC pipe. Thus, waterproof, rustproof and probably cheaper than having to buy a lot of canned fruit salad.
Cellular
On December 2nd, 2004 Anonymous (not verified) says:
any new ways too connect a cell card like verizion 555 data card to Linux
WiFi access while travelling: Try Starbucks
On December 1st, 2004 Michael Shiloh (not verified) says:
This is not meant to be an ad for Starbucks Coffee, but I've heard from a number of seasoned travellers that the most reliable public WiFi access was at Starbucks. In my limited experience I found this to be the case as well. In addition, you can find Starbucks most anywhere, and they are listed in the Yellow Pages so you can search for them before you have Internet access (Yellow Page Google? Let your fingers do the Googling? Manual Google?)
Starbucks
On December 2nd, 2004 Anonymous (not verified) says:
I agree. I've used this service a dozen times or so in several cities and it's solid and fast. The signup process is a little slow, but that's because they want you to buy a monthly plan or combined T-Mobile cell phone/Wi-Fi plan.
Beware of hotel phones
On December 1st, 2004 Nate Bargmann (not verified) says:
I've started carrying a wireless card (Atheros with the Madwifi driver) even though my primary 'Net access is via dial-up. The author mentions not understanding the need for a data port on the phone.
As someone who works on phone system, I caution anyone from just plugging into the wall jack. Not all of those jacks provide a POTS (Plain Old Telephone Service) line and many are a proprietary digital line that can damage your laptop's modem. If the data port is available, use it. Don't assume you can connect directly to the jack in the wall unless you have a line tester.
I know it's not real geeky to still rely on a dial-up ISP. In this part of the US I find that my current dial-up ISP still provides me with the best mobile flexibility and reliability. I can live without the ultimate speed and value a reliable connection highly.
The hotel's wireless may not always work so having a dial-up connection to fall back on was a good thing a few weeks back. I was staying at a motel in Wichita, KS that has open and free APs. The only problem was that their service died a couple of hours after I checked in. Two of us troubleshot our laptops the next evening and it was evident that the hotel had no route to the outside world. A call to the front desk only resulted in being given a phone number of the provider which wasn't answered. Get this, I as a paying guest was expected to report problems with their system to the provider.
This is my first and only experience with hotel WiFi and I hope the next improves. If nothing else, it allowed me to configure waproamd for the place.
Additional resource
On November 30th, 2004 brent baker (not verified) says:
One additional resource for consideration is PluggedInns.com. It's not wireless specific, but it's fairly comprehensive with more than 4500 US hotels offering high speed internet access of one type or another.
What I call this trick
On November 30th, 2004 Dan Allen (not verified) says:
I call this trick wireless grab-bagging. I actually blogged about it on my website.
I believe that the more the internet becomes an "open" resource in the sense that a connection is just out there waiting for you to pick it up (just like cellphones) the more upright humans will become again (recall the evolution poster of a man crunched over a computer). I have always said that the best superhuman power a person could possess is the ability to query google in one's head.
Soup can ain't gonna work wel
On November 29th, 2004 Jon (not verified) says:
Soup can ain't gonna work well. The can needs to be the correct diameter + length. A Pringles can comes close and has worked well for others. But save yourself the hassle of soldering your own connectors and just buy one from Cantenna.com for 20 bucks (last time I checked). They should also have the right cables you'll need. Use Netstumbler to check your signal gain! It's free on netstumbler.org--J.
See the Homebrew Antenna Shoo
On November 30th, 2004 Anonymous (not verified) says:
See the Homebrew Antenna Shootout for a test of different can sizes. I heard Foster's beer cans are good too.
You can also use the Poor Man
On November 29th, 2004 Anonymous (not verified) says:
You can also use the Poor Man's Theremin to find a good spot to connect. Just move the laptop around and listen to the pitch change.
use screen with ssh
On November 29th, 2004 Anonymous (not verified) says:
if you use ssh then screen will go a long way to help you not loose any work when the connection gets interrupted.
Post new comment