Half Mile Point-to-Point WiFi Link
2009/01/02 - Jason Harper <ptpwificomments@truedesign.org>
The challenge: get a reasonably fast network link between two
single-story homes. Both neighborhoods have HOAs and there are several
two-story houses and trees in the path. There is definitely not a 100%
clear line-of-sight, and probably not a 60% clear Fresnel zone. At least
the terrain is flat. Google
Earth calculates the path to be 0.52 miles, and provides handy maps to
assist in aiming.
Map from above:

View from site A to site B:
 |
|
View from site B to site A:
 |
One option was to use discrete antennas with short coax runs down to some
wifi radios. However, first I wanted to try a simpler solution. There are
many all-in-one devices available that incorporate radios and panel antennas
into one weatherproof package. Some are quite pricey, while a few are
fairly inexpensive. I figured I'd give one of the cheapest devices a shot
before spending money on something more expensive. I found a generic device
with a part number of CPE-2415-26 apparently made by www.aristar.com.tw. I
had a hard time finding someone willing to ship small quantities to an end
user, but finally stumbled across Geeks.com selling
it on sale for $69.99 each. So, about $150 later, i had two of
these:


Inside the plastic enclosure:

Panel antenna:

Radio itself. Looks like a PCB intended for a consumer broadband router
(complete with port activity LEDs in place),
modified slightly to accept power over one of the ethernet cables:

The radio board looks like it is probably a pretty standard Realtek
reference implementation based around a RTL8186 SoC. It runs Linux, but I
haven't been able to find an easy way to get direct access to the OS. I'd
love to be able to ssh or telnet in. The web interface does allow you to
view the system logs.
Hide log
0day 00:00:12 klogd started: BusyBox v1.00-pre8 (2004.12.03-02:38+0000)
0day 00:00:12 Linux version 2.4.18-MIPS-01.00 (root@localhost.localdomain) (gcc version 3.3.3) #67 Mon Dec 17 17:44:59 CST 200day 00:00:12 early printk enabled
0day 00:00:12 Determined physical RAM map:
0day 00:00:12 memory: 01000000 @ 00000000 (usable)
0day 00:00:12 Initial ramdisk at: 0x801de000 (6348800 bytes)
0day 00:00:12 On node 0 totalpages: 4096
0day 00:00:12 zone(0): 4096 pages.
0day 00:00:12 zone(1): 0 pages.
0day 00:00:12 zone(2): 0 pages.
0day 00:00:12 Kernel command line: root=/dev/ram console=0 ramdisk_start=0 single
0day 00:00:12 Calibrating delay loop... 178.99 BogoMIPS
0day 00:00:12 Memory: 7820k/16384k available (1741k kernel code, 8564k reserved, 6300k data, 56k init, 0k highmem)
0day 00:00:12 Dentry-cache hash table entries: 2048 (order: 2, 16384 bytes)
0day 00:00:12 Inode-cache hash table entries: 1024 (order: 1, 8192 bytes)
0day 00:00:12 Mount-cache hash table entries: 512 (order: 0, 4096 bytes)
0day 00:00:12 Buffer-cache hash table entries: 1024 (order: 0, 4096 bytes)
0day 00:00:12 Page-cache hash table entries: 4096 (order: 2, 16384 bytes)
0day 00:00:12 check_wait... unavailable.
0day 00:00:12 POSIX conformance testing by UNIFIX
0day 00:00:12 Linux NET4.0 for Linux 2.4
0day 00:00:12 Based upon Swansea University Computer Society NET3.039
0day 00:00:12 Initializing RT netlink socket
0day 00:00:12 Starting kswapd
0day 00:00:12 Serial driver version 6.02 (2003-03-12) with no serial options enabled
0day 00:00:12 ttyS00 at 0x00c3 (irq = 3) is a rtl_uart1
0day 00:00:12 state->flags=00000000
0day 00:00:12 Realtek GPIO Driver for Flash Reload Default
0day 00:00:12 block: 64 slots per queue, batch=16
0day 00:00:12 RAMDISK driver initialized: 16 RAM disks of 7500K size 1024 blocksize
0day 00:00:12 PPP generic driver version 2.4.1
0day 00:00:12 PPP MPPE Compression module registered
0day 00:00:12 RealTek Nor-Type Flash System Driver. (C) 2002 RealTek Corp.
0day 00:00:12 Found 1 x 2M Byte AMD AM29LV160DB
0day 00:00:12 flash: init complete (31), size 2048(KB) blks 1024 hs 512
0day 00:00:12 RTL8185 driver version 1.14 (2007-04-03)
0day 00:00:12 8186NIC Ethernet driver v0.0.8 (Jan 30, 2007)
0day 00:00:12 eth0: RTL8186-NIC at 0xbd200000, 00:01:02:03:04:05, IRQ 4
0day 00:00:12 eth1: RTL8186-NIC at 0xbd300000, 04:05:06:07:08:09, IRQ 5
0day 00:00:12 fast_nat v1.3f
0day 00:00:12 NET4: Linux TCP/IP 1.0 for NET4.0
0day 00:00:12 IP Protocols: ICMP, UDP, TCP
0day 00:00:12 IP: routing cache hash table of 512 buckets, 4Kbytes
0day 00:00:12 TCP: Hash tables configured (established 1024 bind 2048)
0day 00:00:12 rtl8186_crypto_init()...
0day 00:00:12 rtl8186_crypto: IPSec status(RTL8186_IPSCFR) = B
0day 00:00:12 rtl8186_crypto: IPSec status(RTL8186_IPSCTR) = 2027202
0day 00:00:12 ipsec_3des_init(alg_type=15 alg_id=3 name=3des): ret=0
0day 00:00:12 ipsec_aes_init(alg_type=15 alg_id=12 name=aes): ret=0
0day 00:00:12 ipsec_md5_init(alg_type=14 alg_id=2 name=md5): ret=0
0day 00:00:12 ipsec_null_init(alg_type=15 alg_id=11 name=null): ret=0
0day 00:00:12 ipsec_sha1_init(alg_type=14 alg_id=3 name=sha1): ret=0
0day 00:00:12 ip_conntrack version 2.1 (128 buckets, 1024 max) - 332 bytes per conntrack
0day 00:00:12 PPTP netfilter connection tracking: registered
0day 00:00:12 PPTP netfilter NAT helper: registered
0day 00:00:12 ip_tables: (C) 2000-2002 Netfilter core team
0day 00:00:12 NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
0day 00:00:12 NET4: Ethernet Bridge 008 for NET4.0
0day 00:00:12 RAMDISK: ext2 filesystem found at block 0
0day 00:00:12 RAMDISK: Loading 6200 blocks [1 disk] into ram disk... done.
0day 00:00:12 Freeing initrd memory: 6200k freed
0day 00:00:12 VFS: Mounted root (ext2 filesystem).
0day 00:00:12 Freeing unused kernel memory: 56k freed
0day 00:00:12 mount /proc file system ok!
0day 00:00:12 device eth0 entered promiscuous mode
0day 00:00:12 eth0:phy is 8305
0day 00:00:12 device eth1 entered promiscuous mode
0day 00:00:12 eth1:phy is 8305
0day 00:00:12 device wlan0 entered promiscuous mode
0day 00:00:12 device wlan0-wds0 entered promiscuous mode
0day 00:00:12 br0: port 4(wlan0-wds0) entering listening state
0day 00:00:12 br0: port 3(wlan0) entering listening state
0day 00:00:12 br0: port 4(wlan0-wds0) entering learning state
0day 00:00:12 br0: port 4(wlan0-wds0) entering forwarding state
0day 00:00:12 br0: topology change detected, propagating
0day 00:00:12 br0: port 2(eth1) entering listening state
0day 00:00:12 br0: port 3(wlan0) entering learning state
0day 00:00:12 br0: port 3(wlan0) entering forwarding state
0day 00:00:12 br0: topology change detected, propagating
0day 00:00:12 br0: port 1(eth0) entering listening state
0day 00:00:12 br0: port 2(eth1) entering learning state
0day 00:00:12 br0: port 2(eth1) entering forwarding state
0day 00:00:12 br0: topology change detected, propagating
0day 00:00:12 br0: port 1(eth0) entering learning state
0day 00:00:12 br0: port 1(eth0) entering forwarding state
0day 00:00:12 br0: topology change detected, propagating
0day 00:00:21 auth uses obsolete (PF_INET,SOCK_PACKET)
The units are very light, so I just mounted them on PVC pipe. Here is
site A:

And Site B:


Here is the view from the top of the unit at site B looking toward site
A:

Conclusion:
With the site A radio mounted, and the site B radio sitting on the pole
about 6 feet off the ground, I was able to get a pretty solid 802.11b link,
with usable bandwidth around 600-800kbps but a little bursty. Now that it
is mounted up above the roofline, I am able to get an 802.11g link that
hovers around 24-36mbps tx link speed with usable effective bandwidth in the
8-10mbps (megabits/second) range. It still has occasional minor pauses here and there
in the data flow, but they generally only last a second or so. Packet loss
(as measured by a ping flood) is near zero. Here's a ping -f that I left
running for 15 minutes with no other traffic on the link:
PING ptp2.lan.truedesign.com (10.10.7.3) 56(84) bytes of data.
.................................................................................................................................................................................................................
--- ptp2.lan.truedesign.com ping statistics ---
342274 packets transmitted, 342065 received, 0% packet loss, time 901167ms
rtt min/avg/max/mdev = 2.044/2.814/717.455/9.701 ms, pipe 47, ipg/ewma 2.632/2.515 ms
Both ends are running in WDS-only mode with WPA2/AES encryption. I've
experimented a little bit with various radio settings and so far seem to get
the most throughput when using G-only mode, auto data rate, and setting the
transmit level to the middle setting (20dbm). Since the effective
throughput isn't quite as good with the power cranked up to max (24dbm), I'm
guessing that these little radios might not be the best design? Or maybe I
just don't know enough about RF stuff. In any case, I'm happy with the link speed
I am getting!
I'm a little bit worried about how these will handle the 110+ degree (F)
heat here in the summer. The main cpu chip doesn't have a heatsink on it,
and the cases do get a bit warm at room temperature. I can't think of any
good way to add better (any?) cooling to the units without risking water
getting in. I'm also a little worried about moisture getting into the units
and keeping the humidity high. I think I'll buy one or two more of these
things just to have on hand as spares..
--Jason