The problem

I use the computer and the internet quite a bit. Mostly I use them at night after the rest of my family is asleep, but lately I've been working more from home (now that both of my kids are school-aged) and my 6-year old also wants to use the internet, but he wants to do it at times that we are most likely to want the phone. So it's time for another solution.

Cable modems are available in some parts of Eugene, but not where we live. DSL is available where we live, but involves dealing with the dreaded Qwest (even if someone besides MSN is your ISP) and paying a minimum of about $50 a month, probably more. Since our (slow, by phone) internet access is free through my employer, that is a steep increase. And since I'm a cheapskate, I wanted something else.

My friend Bill lives a straight shot of about 1 kilometer from our house. Close to due east. We live on the side of an east-facing hill, and hence can almost see his house. To be precise, there are some trees in the way of most of the view, but there is a small patch of his roof that I can actually see if I get on a certain spot on my roof (a big if, since I have a mild fear of being on steep objects where a misstep will send me plummeting to a painful death - luckily Bill is a rock-climber). All irrelevant to my problem, but Bill has high-speed internet access, and doesn't use anything near his bandwidth, and is happy to share. Furthermore, he likes playing around with computers and related toys as much as I do.

View in direction of Bill's house from my deck. Eastern view

The solution

So, having read about Jim Meehan's experience on slashdot, Bill and I thought we would try a similar setup between our houses.

On June 14, I purchase two linksys WAP-11's from mwave.com for about $120 each. (Actually - a minor snafu - they quoted me that price, and then sent me one for $240 instead. When I phoned them, they recognized their mistake and made good immediately by sending me the second one.) Another attractive product they have that I didn't order (Bill already has a router that does DHCP serving and NAT) is the BEFW11S4. It wasn't clear to me that this would function as a bridge, though it probably could. It does a lot of things we don't need for our setup, but it is only about another $20).

With our two "radios" (WAP is really short for "wireless access point" and these guys are designed to give you a wireless network for a modest radius around the units, provided your computers have wireless network cards in them) in hand, I proceeded to Bill's house on June 21st, to make sure we could configure our WAPs to do what we wanted. I brought my laptop. We ran an ethernet cable from one WAP11 into Bill's router, and from the other WAP11 into my laptop.

Configuration

The WAP11s say you need a Windows box to set them up. This is not really the case, you just need a web browser, but the WAP11s came with a CD that has some windows setup software on it. I haven't looked at that since I have no windows machines. (I keep garlic hanging over the doors and windows, and never invite any guests I don't know into the house. Also, there is a crucifix near each Intel CPU.)

In order to configure a WAP11 with a web browser, you need to take some computer (equipped with an ethernet card and a web browser), connect it to the WAP11 with an ethernet cable, and configure the IP address on the ethernet port of your computer to be something in the 192.168.1.x range (but not 192.168.1.251). The WAP11's come defaulted to get their IP addresses automatically via DHCP, but if they don't find a DHCP server, they default to 192.168.1.251 I think. So then you type http://192.168.1.251 into your web browser, and get connected to the WAP11's configuration page. You need a password, which is in some documentation somewhere. Not, I think, in the paper documentation, but maybe in the .pdf file that comes on the aforementioned Linksys CD. I won't mention it here, but you better change it to something else once you get into the configuration page if you are doing this.

At Bill's house, I configured my laptop to ask for a DHCP address, and we configured the pair of WAP11's as a "wireless bridge." This involves telling each WAP11 the MAC address (that is, the hardware address) of the other WAP11's ethernet port. Confusingly the WAP11's have two MAC addresses - one for their wireless port and one for their ethernet port. And in this procedure you need to tell each WAP11 the MAC address for the other one's ethernet port. Go figure. If you set up wireless filtering (on a different configuration page) you use the wireless MAC addresses. Anyway, the nice thing about having them in "bridge" mode is that they are then only supposed to communicate with each other. I don't know how much security this really adds, since I assume one can spoof the MAC address.

Oh, also for reasons of (very modest) security, we changed the SSID to something other than the default, and set the machines not to broadcast the SSID. And we changed the names of the machines to something other than "Linksys WAP11."

Anyhow, once we got the configuration right (took a little bit of doing because our aging eyes had trouble reading the MAC addresses off the WAP11 cases, though it turns out we needn't have done this since they are displayed on the configuration page) each WAP11 and my laptop acquired IP addresses from Bill's router. And my laptop was connected to his router, and hence to the outside world:

LAPTOP<---ethernet--->WAP<--radio waves--->WAP<---ethernet--->ROUTER

Just like what we wanted except the WAPs were 4 feet apart instead of 3000 feet. And at 4 feet apart I was getting transfer speeds around 400-500Mbps instead of the 2000+Mbps Bill got on his side (without using the radio links)! We fiddled and fussed for a bit. Then Bill got a phone call, and I decided to take my laptop and the WAP it was connected to another room. Suddenly I was getting 2100Mbps! Strangely, the WAP11s don't seem to like being too close to each other. Probably too much echoing from the antennas or something.

Cantennae

OK, the next step was to build directional antennas and aim them at each other. For this, our primary inspiration has been Gregory Rehm's tin can antenna howto. There are a bunch of other make-your-own 2.4 GHz antennas on the web. Here are a few we've looked at. The tin can antennas seem easier to build than the Yagi's, so we set to work on that.

Cable assemblies

The biggest issue turns out to be cabling. Firstly, as many sites make clear, you want as short a cable as possible. You also want good quality cable (LMR-400 gets a high rating, but costs from $0.50 to $1 US per foot). Both of these are necessary to preserve signal strength. For a given cable, signal strength decays exponentially. E.g., if for the cable you use, you lose 1/2 your signal strength in 20 feet, you will lose 3/4 in 40 feet. Also, the greater the cross-sectional area of the core, the less signal loss there is. And the better the shielding, the less noise is introduced. I'm really making this up - I knew nothing about this beforehand, and have only learned bits and pieces on the web. Also, amusingly, the figures for cable loss (and other signal loss) are 10 times logarithms base 10 (of something) expressed in units called "decibels" and abbreviated "dB". Since log base 10 of 2 is about .3, loss of 3dB (same as gain of -3dB) corresponds to losing half your signal strength. OK, that is probably more than I should have said, and certainly more than you wanted to know, and probably inaccurate.

Secondly, you need the right kind of connectors. One standard is to make your antenna so that it has an "N"-type female connector on it. Then, in the best of all possible worlds, you would have a cable made with good materials that has a male "N"-type connector on one end and plugs into the Linksys WAP on the other.

On June 21, Bill and I went to our local electronics store with one of the linksys antennas in hand, and with some preliminary research on cable types. I think we were hoping to buy some acceptable cable, and find some connectors that would work and rig up a way to crimp them onto the cable. Note that if we had been successful in doing this, cable probably would have cost at least $.50 per foot, and connectors $2-$5 each. So the minimum cost of assembling cables would be at least $10. It seems like a lot given that the antennas are going to be practically free.

Anyhow, our local electronics store, Norvac, has many connectors, but it turns out the linksys has a non-standard connector. It is a "RP-TNC." A TNC is a standard type of connector for coaxial cable, but the "RP" means reversed polarity. Basically, the connector on the back of the linksys has a male core, and a female outside. That is, the threads are on the outside of the connector, but the connector has a pin in it. The usual convention is that the male connector has a pin in it, and also has the threads on the inside. (If it is less confusing, another way this has been described to me is that the connectors are the same, but the pin has been moved from the male to the female.) This store also didn't seem to have any of the kinds of cable we needed, but we didn't research this very hard since we were discouraged by the connector situation.

On the way back from our unsuccessful trip to the good electronics store, we decided to stop at Radio Shack. The thing about Radio Shack is that most of the employees there are so clueless, that I can't even bring myself to be rude. I end up feeling sorry for them, so when they approach with "can I help you?" (which they do practically before I'm in the store, unless I actually need help) all I can do is gently tell them what I'm looking for, and then politely say "thank you" when they look blankly at me and tell me that "you're in the right part of the store, but I don't know if we have anything like that." So they don't have anything we need, which isn't that surprising. They don't even have "N"-type connectors, which aren't that esoteric (the other store does have them). But we end up buying some parts, hoping to hammer, saw and hack things together to make a cable that we can at least test with.

We go to my house, where we saw, hammer, and hack away until we have a cantenna (with a chassis mount TNC connector instead of an N, which means we have to whittle down the wire that is going to function as our dipole. Someone who knows about these things could probably tell me how doomed we are already), and a cheap RG-58 cable with a rather poor attachment to the linksys. We spend another hour fooling around on my street with the one linksys and antenna, and with my ibook and its airport card (no external antenna). We get results that are maybe mildly better than the antenna that comes with the linksys device, but not much. Of course the airport card has no special antenna.

After this frustation, we open one of the linksys devices (thus voiding the warranty). It is clear that we could replace the antenna connector with something more standard if we wanted to. We would need the connector and some way to crimp it on.

Time for dinner. That night, Bill digs up some online suppliers of RP-TNC connectors and cables. Monday June 24, I order two 10 foot cables for $25 each from Hyperlinktech.com, part number CA-LS03, which have exactly the right connectors on the ends. We hope to try again the next weekend if the cables come. But in fact, I realize after ordering the cables and taking the default shipping (UPS ground) that Hyperlinktech is in Boca Raton - the opposite corner of the country from us! The cables don't arrive until July 3rd. More about these and other cables and Hyperlinktech anon.

Here is a fun calculator for LMR cable loss. The Hyperlinktech cables seem to be LMR195. So according to this calculator, 10 feet of cable will lose 35% of the signal. Or 1.9dB. Exercise: Check that 10 to the -.19 is about .65. I don't know how to determine how much loss one gets in the connections. Nor how much gain our antennas have. Nor do I understand how antennas can gain back signal that was lost in the cables. In fact the whole business about antenna gain seems like voodoo to me, but signal loss through cables does make some sense. OK, an update here. I think the "gain" of an antenna measures how much stronger (in the desired direction) the antenna is than some idealized abstract antenna.

Cantenna construction

In the meantime, I get several cans from our local supermarket, "Price-Chomper."
  • Chef Boyardee Ravioli, 40oz. The kids eat this, but my daughter pronounces the ravioli as "OK, but the sauce is nasty." This can is identical to the Nalley Beef Stew can that won Greg Rehm's cantenna shootout.
  • A 46 ounce can of "Western Family" pineapple juice. My six year old would have drunk the entire thing immediately if I let him.
  • A family sized can of Campbells Beef-Vegetable soup.
  • Corinthians Chocolate Cream Wafers. This can has the same diameter as the ravioli can, and is slightly longer. Also it has straight sides (no ridges) and a flatter bottom. And it is painted in pretty colors as opposed to being covered with a paper label. It would seem ideal, but the cookies weren't very good, so I can't bring myself to buy a second can. In fact, a serious problem with this whole approach to antennas is that it is difficult to find food that you want in cans that are the appropriate dimensions. For me, this rules out Pringles(tm) Yagi's as I don't know how to dispose of the Pringles. Even my son has become too picky to eat them.
I used the Java spreadsheet on Greg Rehm's howto to calculate the placement of the holes, and drilled an access hole and mounting holes on each of the cans. Also purchased some little screws and nuts for mounting the N connectors to the cans, and 1 foot of 12 gauge wire. (About $2 for all this, since I got some washers and so forth as well.)

I recommend drilling the holes, not punching them, but you may need to make a dimple first with a nail so that the drill bit won't slide around as you start the hole. For ease of drilling, I clamped a bit of PVC pipe to my workbench to rest the can on.

Friday night, June 28, after a bit too much wine, I cut bits of 12 gauge copper wire, and filed the ends to bluntness while Bill and Teresa soldered bits of 12 gauge copper wire into the N connectors to serve as dipoles. (I think these were technically J-poles since they are end-fed, not center fed. But I don't really know the terms.) I tried to cut the wire so that 1.21 inches of wire would be sticking into the can as in Greg Rehm's howto. I actually tried to make the wires marginally too long so I could file them down. After the solders were done, they were too short (I swear the heat shrunk the copper wires). I'm also short on equipment accurate enough to measure 1.21 inches. Update: I don't think I was trying to do the right thing. I think one wants something more like 1.21 inches from the side of the can, which is a little different. If this is correct, the J-poles I made were a bit too long.

Then we tested the solders with my new $9 multimeter, and had reported resistance of about .5 ohms. This is similar to what we got from a length of 12 gauge wire, so most of the resistance is presumably in the contacts, and not in the solder. It was an issue of contention which solder had less resistance, but I couldn't find a significant difference between the two. Then we bolted the connectors onto the most likely seeming cans (the ravioli can and the cookie can).

I'll note at this point that some of the advice I've read said to use cans with straight sides, and especially flat bottoms. The cookie can has straight sides, but none of the cans has a completely flat bottom. They all had some ridges. I've considered building "cans" out of a roll of sheet tin that is sitting in my garage (what it is doing there, I don't know). I could make the diameter exactly what I want, and have flat sides and bottom that way. On the other hand, Meehan and Rehm's cantennas had sides and bottoms like mine, which were not perfectly flat.

These pictures are of the completed cantenna with a metal cone of galvanized metal attached. See below for some cone construction details.

Finished cantenna with cone.

The n-connector.

Finished cantenna with cone, head on.

Finished cantenna with cone, inside.

Testing

This section is long and boring. I wrote it while things were working unreliably and it is an account of various bits of unsuccessful trouble shooting. You might want to skip to A reliable link.

We did one pre-antenna test. We set both units up in line-of-sight. One at my house, one at his. I connected my laptop to the one at my house and tried to ping the other unit. [This is after configuring them in "bridging mode" as mentioned above.] No dice, though I was able to ping the unit my laptop was wired to of course. This is using the provided omnidirectional antennas.

On July 3, my cables came from Hyperlinktech. Unfortunately, I had no time that day to do any testing, but I dropped off a cable at Bill's house. July 4th we were having a party (my son's birthday party, plus the usual fireworks viewing. I live on a hill overlooking a big annual fireworks display. The fact that we can see this from my house is related to the fact that I have line-of-sight to Bill's house), so there wasn't much time for testing then either. But sometime on July 4th, we found an hour to fool around a bit. I put my can on a ladder on my back porch, level with the bottom of my roof, and aimed it at Bill's house. He put his can in his bathroom window. We didn't get a real connection, but at some point, I got a couple dozen pings in from my laptop to the WAP at Bill's house. Also, my attempt to ping his router showed up on his firewall log. This wasn't much, but it gave us some hope.

We spent much of friday afternoon and some of saturday fooling around. To make a long story short, we eventually discovered (after testing everything else first) that one of our cables has a loose connection at the "N" connector end. This was after closing in Boca Raton, so we tried to jam it together hard enough to work. It seemed to work then at our test range (about 150 feet). After some more fooling around, we eventually got a reliable link at about 300Kbps. I fired off a few excited emails, and went to a movie friday night. The link was still up at 2am, but had mysteriously dissappeared on saturday morning.

We fiddled with things on Saturday without every getting a reliable connection (though Bill got sunburnt on his precipitously steep roof). Eventually I put a sleeve on the cantenna at my end, which seemed to help some. This was made out of a 7 inch wide strip of roofing tin, wrapped around the end of the antenna and secured with duct tape and some plastic wire ties. Then Bill pointed out that our dipole was supposed to be 1.21 inches from the edge of the can, and is probably longer, so we switched the WAPs to channel 1 (on the assumption that this is the slowest frequency hence longest wavelength). Suddenly I was no longer losing packets, and then even after my son jogged up and down the ladder (unaiming the antenna in the process) I was still getting better than 600Kbps! Of course the day was also cooling off, and the evening before was when I had a decent connection. So we don't know whether changing channels was important, or the temperature, or both (or something else, like just resetting the WAPs when we changed channels). The connection mysteriously died again. We've been getting very flakey performance. Sometimes fast (sometimes very fast so that my connection to the internet is only marginally slower than Bill's), sometimes slow and unreliable, and sometimes nothing. Our favorite culprits are:

Anyway, on Sunday we had a good connection for part of the day, and then for part of the evening (1300 Kbps, a record), but it died mysteriously and suddenly at 9:30pm, as I was using it.

Monday I called hyperlinktech, who graciously agreed to replace the defective cable. Of course this involves sending it back, having them inspect it, and then replace it. It is a long way from Oregon to Florida. Also spoke to "technical support" (I use both terms loosely) at Linksys. This was no more helpful than you might expect. On alt.internet.wireless I see that there are a number of reports of "sleep" problems with linksys units. Technical support at linksys has not only not heard of these, but is not willing to dispense the beta firmware update (1.0010) that is rumored to fix these problems. We put both units in bridging mode (we had one as an "access point" and the other as an "access point client" until now).

Tuesday. Monday night I had connectivity until 11:15. Then the link went down. Fooling with the antenna at my house and resetting the WAP11 had no effect. Ditto on Tuesday morning. But Tuesday after work (a hot day - there goes our temperature theory), I get home, plug my laptop into the WAP11 and am surfing on Bill's connection. Bill has done nothing at his house. Still going at 12:30 (6 hours of good connectivity seems like the best we've had. It is an extremely warm evening for Eugene. Maybe the temperature is related somehow.

Wednesday. Arms almost too sore to type from digging up old fuel tanks today. A connection with no problems since Tuesday afternoon (30 hours!). (Now Thursday at 1am). Mostly used by my 7 year old playing StarCraft on the internet with various foul-mouthed teenagers. Fortunately, he can't really read. Maybe putting the units in bridging mode was key, though I'd still like to understand what happened monday night and fixed itself spontaneously during the day on Tuesday. It may be our faulty cable. That would be a pleasant explanation. Or flakiness on the part of the WAPs.

Thursday. Connection down when I checked it in the morning at 7:30am. Back up at 10am when I next checked, and up all day. My current theory: the faulty connection on the cable is in the sun from sunrise until mid-morning. Maybe that affects it somehow.

I suppose I should insert my Hyperlink Technologies saga here. We got our cables July 3rd. On July 5th, we discovered that one of the was faulty; the connection was loose at the N-connector end. (This was after closing time in Boca Raton). The cable still worked, at least somewhat, at least for a while, if you shoved the cable into its end hard. So I called Hyperlink on monday, July 8, and they issued an RMA (return merchandise order) immediately by fax and told me they would replace the cable. But I didn't want to wait for the round trip to get my new cable. So I tried to find out by phone and email (phoning them is frustrating since you get voice mail, and then depending on what you want, they may not return your call) if I could

It took several days of email to figure out that they absolutely would not let me do that. I couldn't believe they found that unacceptable so I kept thinking (erroneously) that they had misunderstood my request. My choices were eventually spelled out as either I chose the second option since I was a bit pissed off by this time and I could in the meantime buy a cable elsewhere and be cable-less for less time.

Friday. Connection down when I woke up, making it easy to return my faulty cable (and order a cable from HD communications). So no experiments with the cans over the weekend. I've been playing with the WAPs though. With them both in my house, I get a consistent connection bettween them (at 5-6 Kbps) in bridging mode. The same if the one I've been keeping at my house is in AP mode and the other in AP-client mode. But if I put the one we've had at Bill's house in AP mode and the other one in AP-client mode, the one from Bill's house will just spontaneously stop broadcasting at all and receive no wireless connections for a period of time.

Monday: I call Linksys, who offer to email me the 1.010 firmware for my units (they came with 1.009 installed). Presumably they got my email address wrong, since it doesn't come, and I email Linksys support monday afternoon mentioning someone was supposed to send me the firmware upgrade. Someone responds to my email (unlike the last time I emailed Linksys support) and sends me the firmware. Unfortunately I have an interminable meeting on monday night, and don't get time to go to Bill's house (he has a PC, which is supposedly necessary for this operation) to flash the firmware of these units. Especially frustrating since I'm working at home on Tuesday, and my new cable, from HD communications came. It is part number HD19496-15, and is a 15 foot cable made of LMR-400, which is really thick stuff by comparison with the cables from hyperlinktech.com. It was also a bit more expensive of course. According to the same calculator mentioned above, this should lose 1 dB of signal, which is 21% loss. Another exercise: check that 10 raised to the power -.1 is about .79.


A reliable link

If you read through the testing section you'll see that we had a lot of potential culprits for the unreliability of our link. Here are the steps that finally led to a 24/7 connection.

We have a few remaining problems, none of which are related to the cantennas. Sometimes the link will get very slow (200 Kbps or less). When that happens, if I software reset the WAP11s, the connection becomes fast again. [This can be done by getting to their web configuration page, and hitting the "apply" button.] Also, once or twice, the ethernet port on Bill's router (a 2wire product) will die spontaneously. I can identify this because I can ping the WAP at his house, but not his router. The only way we've figured out to deal with this is to power cycle his router. Besides this, the link has been stable and reliable. And I'd like to try to put a cone on the cantenna at Bill's house to see if that makes the speed more stable.

Hal Sadofsky
Email: sadofsky@math.uoregon.edu .