TP-Link TL-WR703N

From Hack Manhattan Wiki

Introduction

WR703N is a cheap ($15 to $25 on eBay) chinese "3G router". It is a router, but has no actual 3G support. Instead, you are supposed to plug in a 3G USB modem to the built-in USB port.

Features:

  • Atheros chipset (MIPS instruction set)
  • 32 MB DRAM (reflow upgradable)
  • 4 MB SPI flash (upgradable, probably without reflow)
  • Supports OpenWrt, a Linux distribution for embedded devices
  • Somewhat hackable, you can solder to UART and some GPIOs
  • Ethernet port
  • Wi-Fi built in
  • USB port
  • Powered by Micro USB (B)

Configuration

Flashing with OpenWrt

The steps are:

  1. Flash with OpenWrt
  2. The WR703N now acts as a router on the Ethernet port. Plug that into your computer and get an IP address with DHCP.
  3. Telnet to 192.168.1.1
  4. Important: Change the root password with passwd. If you forget this step, you may brick the WR703N and need to solder to the UART.
  5. SSH to root@192.168.1.1
  6. Configure the Wi-Fi adapter
  7. Disconnect Ethernet
  8. SSH to root@192.168.1.1 over Wi-Fi
  9. Install packages needed to move system to external USB flash drive
  10. Reboot
  11. Install any other packages you want

Wi-Fi client

The first thing you want is probably to configure the Wi-Fi adapter as a client on your local Wi-Fi network. Edit /etc/config/wireless so it looks roughly like this:

config wifi-device  radio0
	option type     mac80211
	option channel  auto
	option macaddr	ec:17:2f:94:b8:fc
	option hwmode	11ng
	option htmode	HT20
	list ht_capab	SHORT-GI-20
	list ht_capab	SHORT-GI-40
	list ht_capab	RX-STBC1
	list ht_capab	DSSS_CCK-40
	# REMOVE THIS LINE TO ENABLE WIFI:
	option disabled 0

config wifi-iface
	option device   radio0
	option network  wlan
	option mode     sta
	option ssid     NETWORKNAME
	option encryption psk
	option key	PASSWORD

The things to actually change relative to the factory configuration:

	option channel  auto

The default channel is 11. auto autodetects the channel based on the access point.

	option disabled 0

Change disabled to 0 to enable the network.

config wifi-iface
	option device   radio0
	option network  wlan
	option mode     sta
	option ssid     NETWORKNAME
	option encryption psk
	option key	PASSWORD

Set network to wlan to configure the Wi-Fi on a separate network from your wired Ethernet network. sta means a client on an infrastructure network with an access point. Use psk2 instead of psk if you use WPA2 Personal.

In /etc/config/network add this:

config interface 'wlan'
	option ifname 'wlan0'
	option proto 'dhcp'

Failsafe mode

In OpenWrt, you enter failsafe mode by pressing the Reset button about 10 seconds after powering up, after the LED initially starts blinking. In failsafe mode, the WR703N will continuously blink the LED at high speed (a couple of hertz).

In failsafe mode, the device has IP address 192.168.1.1, but does not act as DHCP server. You can set the IP address 192.168.1.2 and telnet to it. Use mount_root to mount the read/write overlay file system.

If you need to upgrade the firmware, you can make the image available on a local web server and download it with wget, like this:

cd /tmp
wget http://192.168.1.2/openwrt-image.bin
mtd -r write openwrt-image.bin firmware

Of course replace openwrt-image.bin with the actual filename of your image.