TP-Link WR703N – Small packets, lots of options

The WR703N is advertised as a mini 3G/WIFI travel router. You can get for about $23 on ebay. There are 2 similar models: WR702N and WR700N, both not as good; WR700N requires mains power, and the WR702N has half the flash, to point out just a few differences.

I’ve used OpenWRT in the last few posts and have been very happy with the package selection and setup options, so it was a pretty obvious choice and luckily it’s available for this device.

Interfaces: 1x ethernet (10/100Mb), 802.11N wireless (150Mb), USB host.

Features: Powered by 5v usb, 32MB RAM, 4MB flash, small foot print (5.7cm x 5.7cm x 1.5cm), CPU:Atheros AR9330 rev 1.

I used to use a Nokia N95, then an E63 to do passive war driving (collected about 8000 AP’s), which is what I’m going to use this WR703N for.

This particular WR703N was used as a test bed for testing ideas and prototyping so I wont give a full writeup in this post.

Setup

Flashed device with this OpenWRT snapshot, although it wasn’t the first I used, it was the last, so I’m not sure if you can flash directly from the original firmware to it.

Formatted a 8GB thumb drive – 500MB for swap (first primary partition) and the rest was formatted as ext4 (second primary partition). By using extroot (now incorporated in block-mount package) with the USB drive, the router now boots from the USB and there aren’t any special file system considerations when using it like described in this guide.

Installed GPSd, Kismet-server, Kismet-client, and the pl2303 kernal module (for the USB GPS device).

Basic /etc/rc.local:

# Put your custom commands here that should be executed once
# the system init finished. By default this file does nothing.

#setup swapfile
swapon /dev/sda1

#—setup GPSD—
gpsd /dev/ttyUSB0 -b -n -G

#—Setup Ath9k in monitor mode—
iw phy0 interface add wlan0 type monitor

#—kismet_server—
/usr/bin/kismet_server –daemonize

exit 0

To convert the netxml logs to Google Earth (KML) files, I used giskismet-0.02 and a small script on the server that it automatically uploads to when at home:

for file in ./*.netxml; do
giskismet -x $file |tee temp.txt
until [  `cat temp.txt | grep -c “AP added”` -lt 1 ]; do
giskismet -x $file |tee temp.txt
done
done

It runs giskismet using the netxml log files and loops them until the words “AP added” doesn’t appear in the output. The following exports to a KML format:

giskismet -q “select * from wireless” > filename.kml

 

First test run with un-powered hub resulted in about 400 AP’s.

Learning Time

The most trouble I had while prototying it was the damn USB hub. It was supposed to be powered although “seemed” to work fine without it. When on, it was fine for the USB thumb drive, but the bluetooth or GPS receiver failed to respond after 15-20 minutes. Dmesg would report: “unable to enumerate USB device on port #” … “Maybe the USB cable is bad?”. I replaced the hub with an un-powered hub and it’s been up for 1hr 25mins and still recording GPS info. During the testing I even decided to use udev, so I could just unplug the gps every couple of minutes and it would still create a symlink back to the appropriate /dev/ttyUSB# device (no longer needed):

root@OpenWrt:~# cat /etc/udev/rules.d/99-custom.rules
KERNEL==”ttyUSB[0-9]*”,ATTRS{manufacturer}==”Prolific Technology Inc.”,ATTRS{product}==”USB-Serial Controller”, SYMLINK=”gps”

#makes sure the GPS always maps back to /dev/gps

 

Future Possible Improvements

  • Use Bluetooth to output audio to my Garmin nuvi 1390 GPS in the car – should be able to use A2DP… Maybe. If not I should be able to use my hands free kit to do it.
  • UPDATE 3-9-10: Enable the 5GHz antenna. So far it only picks up 54G and not 802.11N networks Max is limited to  2484 MHz  (iw list)

References & Links

Cheers.

Leave a Reply

Your email address will not be published. Required fields are marked *

*