Wireless hacks 2nd edition




















Chapters four and five cover the real hacks—hardware and software tweaks which will help you fully utilise your wireless equipment. An interesting hack Hack 62 listed in the fourth section is setting up Wi-fi in a toy remote-controlled car and controlling it through the PC.

Quite the stuff for geeks. It even includes the photos of assembling the wifi router in the car and the program used to control the car. Software hacks help in extending the functionality of your hardware. Among other things, section six shows you how to build your own Wi-fi antenna using household things. Build roof mounts for your antenna and drammatically increase the range of your wireless network. Ideal for a wireless LAN party in your neighbourhood and from the comfort of your homes.

Chapter seven takes the right approach to wireles snetwork design. You will wonder why you never thought of elevation profiles, line of sight, antenna polarization when you last set up your wireless network. It puts out mW and is a particularly sensitive radio. It comes in two versions, with and without an internal antenna. Remember that the best thing you can do to improve the range of any wireless device is to make its antenna as visible as possible to the access point you are trying to communicate with.

While an add-on card might not be as convenient as the built-in AirPort card, anything is better than hiding your antenna behind a suit of armor. Power your access point without a separate power cable by using free pairs on CAT5. A number of access point manufacturers Proxim, Symbol, and D-Link, to name just three are now offering Power over Ethernet PoE add-ons for their access points. PoE modules insert DC voltage into a standard Ethernet cable.

This works great in areas where you might not have power easily accessible, such as a roof. This also allows you to more easily place the AP closer to the antenna, thus reducing signal loss over antenna cabling. Ethernet signal travels well over CAT5 cable; a 2. Also, Ethernet cabling is much cheaper than antenna cable such as LMR This hack demonstrates how to build a simple PoE module pair. An end-span device is an Ethernet switch with embedded PoE technology.

If you have a device such as a VoIP phone or a Soekris PC that will accept Power over Ethernet without a secondary adapter, you will only need to build the power injector in steps 1—3. Solder one pair two wires twisted together to the inner-contact connection.

These will be the positive power wires. Solder another pair to the outer-contact connection. Notice that there are three connectors on this DC male power plug. One is for the center pin, one is for the outer surface, and one goes to the plug housing. You do not need to solder anything to the plug-housing connector.

Figure shows what it should look like when finished. Drill a hole in your two-port mount housing. Mount the male DC plug in the housing, as shown in Figure Plug in and test. Figure shows the completed modules. The DC resistance of CAT5 is about 3 ohms per feet per conductor, so a foot cable has at least 7 ohms resistance. Most of the time, an AP draws much less than 0. Use it to estimate how much power you need to provide at one end of your cable run in order to power your access point.

Put your AP where everyone can see it: on the ceiling. Back in May , some friends and I were hanging out at a really good coffee shop in Sebastopol, CA. This particular coffee shop is housed in an old wooden train station building, with high ceilings, old-style hanging industrial lamps, and even a couple old trains still on the tracks, serving as small businesses.

As we sat around drinking our high-octane beverages, we got to talking about the best way to provide coverage in such a huge space. While you could put an access point in one of the enclosed shops in the building, coverage in the open area would likely be spotty at best. You would want the AP to be located high up off the ground, where everyone could see it.

Almost simultaneously, we all looked up and noticed the lamps hanging from the wooden rafters. What if you could house an AP in a package the size of a large light bulb and install it in an existing light socket? This seemed like a good idea, but how would you get network access to it without running CAT5 to the socket? Easy: Powerline Ethernet. These devices are quite small, about the size of a standard wall wart, as shown in Figure They sport a Compact Flash wireless adapter that acts as the AP.

The brilliant bit is that the wireless network bridges directly to the AC power, so a standard Powerline Ethernet adapter anywhere on the same power circuit can provide Internet access to as many APs as you care to plug in.

One of our first concerns was practical rather than technical. That is, unless the AP can also provide light as well. After fooling with a couple of lighting ideas, we finally soldered some copper romex onto a fluorescent bulb as a prototype. The romex is rigid enough to hold the lamp steady, and easy to solder. The fluorescent bulb would obviously be dimmer than a Watt spot lamp, but it would be better than nothing.

This solved the light issue well enough for the moment, but how could we connect the whole thing to a standard light bulb socket? One trip to the hardware store later, we had a variety of Edison plugs, sockets, and adapters. We settled on a simple extender type of device, with a female socket on one side and a male plug on the other. Again, the contacts were copper, making it easy to solder on more romex, as shown in Figure We had the basic design together, but what could we possibly use for housing?

Tupperware, of course. Adam painted the inside of a Tupperware bowl white, and the entire device just managed to squeeze inside. Besides, keeping the original enclosure made us all feel a bit more relaxed about plugging the thing in.

The Edison plug poked through the bottom of the bowl, where we simply screwed on another connector to keep it tightly attached. So, with all of the technical considerations accounted for, all that was left was the all-important marketing phase of the project.

Some electrical tape and one vinyl sticker later, the NoCat Night Light was born! See it in all of its glory in Figure But how well would it actually work? We certainly thought so.

This was well above the rated capacity of the cable modem network we were using, so we were definitely satisfied with the results. One big improvement to the design would be to replace the fluorescent bulb with a bright LED array, or even a simple socket so you could use whatever low temperature light source you like. Adding more APs is as simple as screwing in a light bulb, as they bridge directly to the same AC Powerline segment, and terminate at the same Ethernet.

At the very least, it would be a good idea to insulate the bare contacts and find a better way of ventilating the fluorescent bulb or replacing it altogether with an LED array. Build it at your own risk, but by all means have fun while doing it. Significantly increase the range, sensitivity, and functionality of your WET For example, they are ideal for connecting to networked appliances such as the PlayStation 2 or Xbox to avoid having to run Ethernet cable to your television.

Linksys has manufactured the WET11 for several years. Its popularity can be gauged by looking at the Linksys web page and noting how many other As with all embedded hardware devices particularly those manufactured by Linksys , it is a good idea to keep up on firmware updates.

Updated firmware usually resolves most flaky behavior and occasionally even gives you a couple of new features. Previous firmware updates have fixed problems with DHCP. The WET11 even has a crossover switch for the Ethernet side, making it simple to install, regardless of whether you are using a straight-through or crossover cable.

Its tiny size and simplicity make it an ideal component for any situation where you need to get an Ethernet device to act as a client to an access point. Here are a couple of nifty hacks for this piece of hardware. The WET11 can easily accommodate an external antenna. This alone significantly improves the range of the WET11 and, when using a directional antenna, can help reject noise and cause less interference for nearby networks.

Possibly the greatest drawback to the WET11 is the cheap radio card installed at the factory. It ships with a low-end, 80mW radio with less-than-average sensitivity. Fortunately, the card is based on the Prism 2 reference design. Before you proceed, upgrade the replacement card with the latest firmware. Unplug the Ethernet and power from the WET Remove the rubber feet from the bottom of the WET11 and open the case.

Carefully unplug the antenna connector, unscrew the card from the brass stand-offs, and remove the internal card. Plug in the new card, and reconnect the antenna cable to it. This is the same side that was connected to the original card. Finally, reassemble the case and power it up. You should now be enjoying the benefits of a much more sensitive radio and a full mW of power.

Figure shows an open WET11 with a Senao mw radio card and pigtail. A number of people have reported success using the WET11 with a battery pack in the field.

Using four NiMH batteries in a series at approximately 1. The WET11 can accept voltages a bit higher than 5 volts some say as high as 12V , so you could even theoretically use four Alkaline batteries 4 x 1.

If you make your own battery pack, be sure to observe the proper polarity! Also note that operating time will likely be significantly shorter if you transmit a lot and use the mW card as described previously.

An external battery pack can be handy for generating a signal source when doing a site survey, or for hiding a signal source in a game of wireless hide-and-seek. SourcePortable be warned; the entire site is in French. Build yourself a motorized scanner that shows you all wireless networks in degrees.

This is especially true if you are working with highly directional antennas. Sometimes, you might not have another person with you to move the antenna and take signal measurements.

It will perform a degree scan for wireless networks and then give you the SSID, signal strength, noise, and best antenna position for all discovered networks. An AWS can be built inexpensively. For my prototype system, I used a number of components, many of which were scavenged from old computers or from second-hand electronics stores.

You will need:. Cantenna [Hack 86]. I disassembled an omni antenna with a magnetic base. Therefore, I constructed the cantenna with a male Reverse SMA connector, so that the cantenna easily screws onto the magnetic base. Once you have completed the cantenna, the next step is to build the base, which will house the motor, worm gear, cog-wheel, and ball bearings to drive the cantenna.

Figure shows an overview of the assembled base, turned upside down. I used a hard drive frame from an ATX computer case, but you could cut your own sheet metal as well. The Slideshow 1.

The Code Send SMS from Linux Installing PuppetMaster 1. Controlling Your PC 1. Hacking the Hack Setup 1. FMA Control Your Computer from Your Palm 1. Setting up OSXvnc on a Mac. Securing the connection. Setting up VPN. Set up PalmVNC Hardware 1. Detailed Instructions 1. Using NoviiRemote.

Using OmniRemote. Choose a Cellular Data Plan 1. Flavors of Cellular Data 1. Compare the Plans Blog from Your Mobile Phone 1. SMS Moblogging 1. Email Moblogging 1. Photo Moblogging to Any Blog Service 1. Smart client for Flickr. Hacking the Hack 1. Setting up WordPress. Email posting with WordPress. Setting up email automatic polling.

Share Your GPS 1. Connecting the GPS 1. See Also See Also 2. Network Discovery and Monitoring 2. Hacks 23— Introduction Find All Available Wireless Networks 2. Windows XP 2. Mac OS X 2. Linux Discover Networks with NetStumbler 2. Options 2. Network Discovery 2. Caveats Detect Networks with Handheld PCs 2. MiniStumbler 2.

WiFiFoFum 2. Other Handhelds Prerequisites 2. Building and Using AP Radar 2. Final Thoughts MacStumbler 2. Detect Networks with Kismet 2. Installation 2. Running Kismet 2. Cleaning Up 2. Monitor Wireless Links in Linux with Wavemon Analyze Traffic with Ethereal Track Watch Network Traffic The Code 2.

Running the Hack Estimate Network Performance Get Real-Time Network Stats Graph Your Wireless Performance Running the Hack 3. Wireless Security 3. Hacks 40— Introduction Visualize a Network 3.

EtherPEG 3. DriftNet Requirements 3. This feature allows the phone to have always-on access to data without using up airtime minutes. GPRS is known as 2. The data speed of 2. The EDGE network coverage is still limited. Only a handful of devices released since support the EDGE data bearer. It offers broadband data speeds of around Kbps. However, UMTS coverage is very limited. In the States, it is currently available in only a few selected cities. In addition, UMTS service plans can be very expensive.

Which data bearer is available to you depends on your wireless operator, your location, and your service plan. If your current service plan does not include any data service, you can call up your wireless operator and add it for an extra monthly fee. The data service is typically metered by the bandwidth you use in a billing period. This could be the hard part, but the good news is that you can just take a best guess.

Here are some considerations:. As such, you could get away with a metered data plan. If you plan to connect your laptop to your cell phone to get online, welcome to what some folks think is a gray area. However, anecdotes abound concerning people who claim to have received nastygrams from their cellular operator after using large amounts of data in this way. For example, every web browser transmits a User-Agent identifier every time you load a page; this is a dead giveaway.

Some providers will bill you differently based on your usage. All those guidelines aside, the best thing to do is choose an unlimited data plan, if one is available otherwise, pick the most generous metered plan.

If you plan to use your phone as a wireless modem for your laptop, you should definitely choose an unlimited plan that supports tethering. Table shows a few unlimited data plans that were current as of this writing. If you think Table looks very U.

In other parts of the world, metered data plans are more common. And the States has its share of those as well. Table shows some of these plans, from the low-end to the high-end offerings, and includes the range of charges you can expect if you go over the metered limit.

However, most providers will let you add or change your data plan at any time. But before you make a change, ask the all-important questions: will this require me to agree to a contract extension, and will I be charged a termination or activation fee to make this kind of change? One problem you might run into is a customer service rep that is unfamiliar with the plan you want. The best thing you can do is make sure you know the name of the service.

The data plans available to you might depend on what level of voice service you have. Although most providers will prorate the new plan after you change it, make sure you understand what exceptions are in place between the date you change the plan and the date your billing cycle resets. For example, suppose your billing cycle ends on the 28th of each month, and you are just shy of the 20MB limit on a metered plan when you switch to an unlimited plan on the 23rd of the month.

You might think that you can use as much data as you want between the 23rd and 28th, but be sure to ask—when it comes to cellular billing, nothing is as simple as it appears. Use a mobile blogging service to post blog entries with pictures from your mobile phone. Not long ago, bloggers could only update their blogs using a computer. Inspiration, however, does not always coincide with the presence of a bulky computer. At the turn of the century, some adventurous and creative bloggers started blogging from their mobile devices.

The word moblog was thus coined, referring to blogging from a mobile device mobile phones, PDAs, etc. If blogging without a computer is convenient, moblogging with a camera phone is exciting. In just a few clicks you can snap a quick shot and add a few punch lines, and minutes later the neatly formatted post on your personal blog can be shared with the entire world!

The dry spell between November and March? There are two major approaches to moblogging, regardless of the myriad phone models and their different capabilities: SMS moblogging and email moblogging. This hack introduces and compares these two methods, with an emphasis on the latter. Instead of email, you can also use MMS to post blog entries from your camera phone.

SMS moblogging works on any handset that can send SMS, which is virtually every mobile phone nowadays. You write the blog entry on the mobile phone and send it via SMS to a service phone number provided by a moblog service. The moblog service interprets the received SMS message and posts it to your blog. Txtsolutions can host your blog on its own site, or post your blog entries to your account in a list of supported third-party blog hosts.

If the SMS moblog service posts the blog entries to a third-party blog host on your behalf, it needs to know your login information on that third-party site. Despite the meager prerequisite of the handset, SMS moblogging has some major drawbacks. First is the nagging character limitation for SMS.

Second, even if you are laconic enough to squeeze each of your posts into fewer than characters not words , SMS moblogging is text-only. Third, you need to pay extra to the SMS moblog service provider. This charge is in addition to your regular SMS fee from your wireless operator and cost for the blog hosting service if it applies. You can post photos from a camera phone, adding richness to your post.

There is no extra charge besides what you pay for the wireless data and regular blog hosting service. Email moblogging works in much the same way as its SMS counterpart, except that you send email from the phone to a hopefully secret email address.

The email Inbox is polled by the moblog service at regular intervals e. When a new message is detected, the moblog service retrieves the message and parses the content. If the moblog service supports picture attachments most do , you can even have a mobile photo blog!

It is important that you keep the email address private. Any message sent to that email address will be automatically posted on your blog. The easiest way to set up an email-based moblog is to use a blog hosting service that supports email posting. It typically takes only a few minutes. After you open a regular blog account at the hosting service, there is usually a field under the user preferences screen where you can set the private email address.

All emails sent to this address will be posted to the blog you just opened. Most popular blog hosting providers now support email posting from mobile phones, either free of charge e. Table compares several providers that emphasize moblog support.

Moblogging feature available for all account types; 50MB storage and 1GB per month bandwidth for basic subscription. Cost includes desktop blog software and one year of hosting. Email attachment posting requires additional software; 40MB storage. Besides the major blog providers, some new providers specialize in moblog hosting. Both of them offer free accounts for users to blog directly from their mobile phones. The free accounts often come with the condition that the service provider can display advertisements on your blog pages.

The aforementioned photo moblogging solutions tie you into specific blog hosting services. But in many cases, you do not want this tie-in:. Your favorite blog host might not provide photo moblogging features.

Is there a service that is free and independent of your blog server? The one feature that makes Flickr really interesting from a moblog point of view is that it allows you to upload photos to Flickr by email and create a blog entry at your designated blog site.

The blog site can be any of the blog hosts mentioned in the previous section, or even your own web site running popular blog server software. The post includes the email content as its main body and an inline thumbnail, which is linked to the picture stored on Flickr. The thumbnail posting feature in Flickr is really cool and sets it apart from other services, especially if you have a camera phone that produces megapixel pictures.

Without resizing to thumbnails, megapixel pictures would clutter up your blog and mess up the web page layout e. The free account at Flickr allows you to upload up to 20MB of photos per month. Considering most mobile phone moblog attachments are smaller than KB, the free Flickr account is more than sufficient for even the most aggressive mobloggers. Combining the Flickr email posting service with a free blog hosting service or your own blog server , you can set up a powerful and free moblog with photo posting in no time!

Figure shows the information Flickr needs to post to your blog site on your behalf. Obviously, it needs to know your site address and account credentials. Figure shows the private posting email addresses Flickr provides to you when you open an account.

One address is for adding pictures to your Flickr account, and the other is for adding the pictures and then posting thumbnails to the designated blog. The default email application on many phones restricts the size of an attachment to a maximum of KB.

To get around this limitation and to provide a more integrated user experience, you can use a phone application that takes pictures and then automatically posts them to Flickr without having to switch applications and enter email addresses. Many power bloggers run their own blogging server so that they can have complete control over the content and presentation of their blog. If you want complete end-to-end control over your moblog, you can customize existing blog server software to make it support email posting with photo attachments from a mobile phone.

In this hack, you will learn how to set up the popular WordPress blog server to support photo moblog postings. Running your own server also gives you complete access to web site visitor statistics, the ability to back up the web site, and many other features. It is available free of charge from the WordPress web site. After creating a user account, you can start to post and publish blogs on your very own blog server now!

Out of the box, you can use Flickr to post photos to your freshly installed WordPress server. In the rest of this hack, I will discuss how to set up WordPress so that you can moblog with it without needing a third-party service.

WordPress supports email posting, albeit with two main drawbacks. First, it does not support email attachments. Anyone can send email to the email address and have their messages appear on your blog. Without sender-address filtering, your moblog can be easily flooded with spam messages. Applying the patch is straightforward. First, download the file wp-mail Unzip the archive to the WordPress root directory.

This adds the files PEAR. Now, create two directories, wp-photos and wp-filez , under the WordPress root directory to store images and other attachments, respectively. You can choose other directory names as long as you remember to modify the corresponding settings in the new wp-mail. If you want automatic picture resizing an important feature for megapixel camera phones , you need to install an additional hack provided by Hugo.

Simply replace the default wp-mail. Make sure you enter the correct server and login information. Nothing appears on your blog just yet. That is because the wp-mail. Of course, if you need to open a browser and load the wp-mail.

To automate the email polling and blog posting process in WordPress, you need to schedule a recurring task that loads the wp-mail. You can use a fully featured web browser, such as Firefox, to load the wp-mail.

But that is a huge waste of server resources. You should append one line to the bottom of the file, save it, and exit the editor. The preceding line in the cron control file schedules the system to run the curl command every five minutes in every year, month, week, and day. You now have a fully functional photo moblog server. If you do not want to use the default editor, you can always export the cron control file to a text file, edit it externally, and then import the edited file back to crontab.

See the crontab manual for more information. Turn your Java-enabled cell phone into a portable mapping appliance.

If you have a GSM phone from the last three years or so, you probably have a powerful mobile mapping appliance in your pocket. Mobile GMaps is a free program that lets you view Google Maps on your cell phone.

Then click on the Download link, and agree when it asks if you want to download and install the application. Click on the application, and then select Start from the Options menu. By default you will see a map of the United States fully zoomed out.

You can navigate with the 2, 4, 6, and 8 keys. Figure shows Mobile GMaps on a Nokia Satellite flips you to Satellite imagery. Zoom brings up a menu that lets you zoom in, zoom out, or select a zoom level from 0— Locations are like waypoints on a GPS. You can set latitude, longitude, zoom level, and map or satellite view, and then return to that view from the Location menu.

Search brings up a search screen that calls the Google search system. There are a number of tricks and hints on the GMaps web site.

Mobile GMaps was written by Cristian Streng. Caravanning with friends, but only one person has a GPS? Play nice and share.

Road trip caravans are more fun when the people in the two cars can communicate with each other. If you want to exchange data instead of voice over radio, you can set up a roving Wi-Fi network and then share a GPS between vehicles.

Connect a GPS to one computer and then set up a wireless network. Clients in other vehicles can connect to the GPS on the host machine. Normally, only one program at a time can access a serial port—connected GPS. This can quickly become a problem. You probably want to run gpsmap [Hack 22] to get maps, and then a program to log your position, and perhaps another program to let you create spatial annotations of your travels. That is way too many connections for a single-user serial port!

Fortunately, GPSd is available as a daemon that connects directly to the GPS and then acts as a server for position information. You can build and install GPSd in the standard way, as shown here, but do follow any current instructions from the web site replace x.

If you have problems getting GPSd to start, consult the documentation. Now you are connected to GPSD. The commands are single characters, and you can chain them together.

You will get the full GPS position, with your latitude and longitude, altitude, current date and time, and GPS status. You will get coordinates, the altitude, and current date at one-second intervals. Entertain yourself and passing wardrivers by abusing the beacon frame and MAC address. Have you ever wanted a lightweight protocol that would allow you to broadcast your current position? Perhaps the access point has a more powerful network card, or a better antenna, and is able to blast a signal out, but you are not able to get your signal back to the access point.

What to do? With a complete abuse of the These are about 50 bytes long and contain information that a client needs in order to associate with a wireless network. Wireless discovery programs such as NetStumbler [Hack 24] , iStumbler [Hack 27] , and Kismet [Hack 29] get all of their information from sniffing for these beacon frames.

So what happens if we change the SSID on the access point? What happens if we change it whenever we get a new GPS fix? For our purposes the SSID, at 32 bytes, provides enough room to encode the latitude and longitude of our current position to 5 digits of precision about 1 meter. We can also separate the coordinates with readable delimiters and still have 11 characters for a unique station ID.

Once you have your access point and GPSd functional, use the Perl script in Example to broadcast your current position by using the beacon frame. In this example, myid is the unique station ID that will preface the latitude and longitude in the SSID generated by the code. This is because the programs use the MAC address of the wireless card to uniquely identify the access point.

By design, this is the right thing to do, because MAC addresses are not supposed to change. Unless we want them to change. This is almost certainly a Bad Idea, but it does let you create amusing Stumbler logs like Figure for passing wardrivers. You could add a wireless card to the computer to serve MP3s in your art car and broadcast your position with GPS. Since the beacon frame drops down to 1MB and is sent relatively infrequently, you could have quite a few location-aware vehicles sharing a single Wi-Fi radio channel.

This hack lets you communicate your position or anything else you can convey bytes at a time to a client and there is no way for the server, or anyone listening in, to identify which clients are getting the position information.

More on Use these two powerful Linux tools to map out the locations of Wi-Fi networks. You can make it even more powerful by combining it with Kismet [Hack 29] , allowing you to physically map locations of wireless networks. In order to make this work, you will need to have both GPSd and Kismet installed and functioning with your Linux system. Consult the hacks on both pieces of software if you have setup questions. If you plan to do some network mapping with Kismet, keep the following in mind:.

Put the computer somewhere safe and out of the way. Forget that the computer is there while you are driving. If you have to fiddle with it, pull over first. If you can have a friend ride with you who can operate the computer, all the better. Do not let the computer distract you while you are driving. Make sure that the GPS gets a fix before you start driving. Put the GPS somewhere that it can easily pick up the satellite signals. Your best bet is to get a magnetized external antenna that can attach to your roof.

Be sure that there are no loose wires sticking out of your window. Above all, when you are driving a car, your first responsibility is to drive safely. Pay attention to the road and drive carefully.

Start GPSd, specifying the serial port with -p and the speed with -s :. When you shut Kismet down, it writes out logfiles. Check the logtemplate setting in kismet. Kismet writes several logfiles in the logtemplate directory in the following filenames, I starts at 1 and increments each time you run Kismet on a given day :. Kismet log in semicolon-separated fields, one line per entry.

The first entry contains the field names. Kismet log in a format designed to be read by the gpsmap utility, which is included with the Kismet distribution. To generate a map, run gpsmap on the.

See the gpsmap manpage for all the drawing and mapping options. If you choose to use a downloaded map the default , you must be online.

Figure shows a map generated by the following command:. Use -p to show power levels or -e to simply plot the locations of the hotspots on the map see the gpsmap manpage for more options.

Skip to main content. Start your free trial. Chapter 1.



0コメント

  • 1000 / 1000