Wireless on the Road

A few tips and tricks for finding Wi-Fi access on your next road trip.

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.

First Step: Making Preparations at Home

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.

Finding an Access Point

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.

Getting a Signal

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.

Assigning an Address

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.

______________________

Comments

Comment viewing options

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

Can-free Cantenna

Hal Stanton's picture

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

Anonymous's picture

any new ways too connect a cell card like verizion 555 data card to Linux

WiFi access while travelling: Try Starbucks

Michael Shiloh's picture

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

Anonymous's picture

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

Nate Bargmann's picture

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

brent baker's picture

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

Dan Allen's picture

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

Jon's picture

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

Anonymous's picture

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

Anonymous's picture

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

Anonymous's picture

if you use ssh then screen will go a long way to help you not loose any work when the connection gets interrupted.

White Paper
Linux Management with Red Hat Satellite: Measuring Business Impact and ROI

Linux has become a key foundation for supporting today's rapidly growing IT environments. Linux is being used to deploy business applications and databases, trading on its reputation as a low-cost operating environment. For many IT organizations, Linux is a mainstay for deploying Web servers and has evolved from handling basic file, print, and utility workloads to running mission-critical applications and databases, physically, virtually, and in the cloud. As Linux grows in importance in terms of value to the business, managing Linux environments to high standards of service quality — availability, security, and performance — becomes an essential requirement for business success.

Learn More

Sponsored by Red Hat

White Paper
Private PaaS for the Agile Enterprise

If you already use virtualized infrastructure, you are well on your way to leveraging the power of the cloud. Virtualization offers the promise of limitless resources, but how do you manage that scalability when your DevOps team doesn’t scale? In today’s hypercompetitive markets, fast results can make a difference between leading the pack vs. obsolescence. Organizations need more benefits from cloud computing than just raw resources. They need agility, flexibility, convenience, ROI, and control.

Stackato private Platform-as-a-Service technology from ActiveState extends your private cloud infrastructure by creating a private PaaS to provide on-demand availability, flexibility, control, and ultimately, faster time-to-market for your enterprise.

Learn More

Sponsored by ActiveState