TP-Link TL-WA5210G
Ubiquiti NanoStation 2 hardware compatible, TL-WA5210G need hardware reflash in RedBoot for OpenWrt
Supported Versions
Hardware Highlights
Installation
Hardware
- Bootloader: vxWorks
- CPU: Atheros AR2315
- CPU Speed: 180 Mhz
- Flash size: 4 MB (TP-Link firmware use only 2MB)
- RAM: 16 MB
- Wireless: Atheros 802.11b/g (in CPU, 400mW)
- Ethernet: 1 port connected to the CPU
- Power: passive POE (pairs 4,5+; 7,8 return) 12 to 18 VDC (POE injector included in the package)
- The TL-WA5210G comes with a 12V power supply, the internal DC-Converter seems to be realized with a PWM Control Step-Down Converter. This can handle up to 18V. (tested)
- Serial: internal (HE-10 connector, 3.3V)
This device is an integrated wifi spot designed to be used outdoor. With TP-Link Firmware, actually, it can act as station, station WDS, client, client wds, bridge wds... There is a dual patch antenna system able to work in vertical or horizontal polarity, or to send RF to an external RP-SMA female or SMA female connector (depending of date of manufacturing) - This feature is software selectable.
Also, hardware partically compatibility with Ubiquiti NanoStation 2, diff in Ext_antenna GPIO=1 and LEDS GPIO=2,3,4,7 (NS2 ext_ant=7 and leds=0,1,3,4) in Ubiquiti classification, for 5210G make unused C0A2 hardware code for support hardware differences from march 2014.
vxWorks
Less than average performance.
There is a hidden menu: http://192.168.1.254/userRpm/NatDebugRpm26525557.htm
Serial
pin 1 - TX pin 2 - RX pin 3 - gnd pin 4 - vcc (38400 8n1 - TP-Link VxWorks, 9600 8n1 OpenWrt)
Serial Headers
Do note that the 4 pin header used for Serial have a hart-to-hart pin distance, 'pitch', of 2 mm. Not the common 1/10" / 2.54 mm.
Resold SPI chip and reflash on RedBoot
TP-Link vxWorks bootloader and firmware - taking up only 2MB space in 4MB SPI flash. For use OpenWrt, need reflash SPI chip on RedBoot, compatibly from OpenWrt, and use all 4MB ROM.
OpenWrt
TP-Link WA5210G are supported by the OpenWrt AtherosPort. It is available as a pre-built image and can be built through buildroot.
Installing
The OpenWrt buildroot generates images that can be directly flashed to the NanoStation, usually with a name like openwrt-atheros-ubnt2-squashfs.bin (for the NS2 and Loco2).
When flashing those images, the Ubiquiti web interface will show a warning about unsupported third-party firmware. This warning can be ignored.
Note: Anyone who can't understand how to install ( like me :) ) just watch http://www.youtube.com/watch?v=fpKYM292TLI and google that zip file. It seems imposible without install airOS firmware first :(
Upgrading
In order to upgrade from OpenWrt to a newer version, both the kernel mtd and filesystem mtd must be reflashed. The kernel is likely lzma compressed. If either mtd block isn't big enough, reflashing can not be completed through OpenWrt, but must be done through the RedBoot bootloader.
Recent versions of OpenWrt (8.09.2 and newer) support sysupgrade on this platform. To upgrade, put a combined firmware image into /tmp
on the device and flash it using the sysupgrade command as outlined below.
cd /tmp wget http://example.org/openwrt-atheros-combined.img sysupgrade openwrt-atheros-combined.img
Loading via tftp
This can also be used to upgrade a device if you don't mind loosing your old config.
Requirements
- Ethernet cable connection between PC and WA5210G. A switched connection or a bridged connection seems to work fine.
- Network settings of PC: 192.168.1.254/255.255.255.0
- TFTP client on PC
- NanoStation firmware file from Ubiquiti (not an OpenWrt image)
Procedure
- Turn off the device
- Press the reset button
- Turn on the device
- Release the reset button ~10 seconds (but not longer) after turning the device on. You will know it's ready when the LEDs change.
- Ping 192.168.1.20. If it works, you're ready to upload an image, if not, go back to step 1.
- tftp the image in binary mode to 192.168.1.20 as 'flash_update'.
tftp 192.168.1.20 tftp> bin tftp> put openwrt-atheros-ubnt2-squashfs.bin flash_update Sent 1965199 bytes in 28.8 seconds tftp> quit
or in Windows Dos prompt
tftp -i 192.168.1.20 put openwrt-atheros-ubnt2-squashfs.bin flash_update
7. Signal LEDs might be blinking during the upgrade. 7. Wait ~7 minutes before restarting or until the power lights stop their back and forth blinking. 7. Restart. The device should be back to its old configuration (OpenWrt doesn't overwrite or modify the NVRAM settings).
8. telnet to 192.168.1.1 and set a password with
passwd
Switching antenna
The two internal antennas work more or less automatically, using the driver's “diversity” setting to choose the correct one. Using an external antenna requires manually setting a few things:
For NanoStation2
sysctl set dev.wifi0.softled 0 gpioctl 7 0
For TopolStation 5210G diff hardware gpio 1 external antenna from NS2
sysctl set dev.wifi0.softled 0 gpioctl 1 0
These can be added to an init file in /etc/rc.d and /etc/init.d
How compile OpenWrt 10.03.1 backfire for TopolStation 5210G
svn co svn://svn.openwrt.org/openwrt/branches/backfire cd backfire nano ./feeds.conf.default # not needed ./scripts/feeds update -a ./scripts/feeds install -a -p luci # also ./scripts/feeds search search_word or ./scripts/feeds install name_package make menuconfig Target AR2315 * Luci make prereq # show required # place for patch, if need make
Patch for Switching antennas in OpenWrt 10.03.1 backfire
package/madwifi/patches/384-hwdetect.patch - patch file:
229c229 < @@ -181,12 +182,33 @@ exit_ath_wmac(u_int16_t wlanNum, struct --- > @@ -181,12 +182,32 @@ exit_ath_wmac(u_int16_t wlanNum, struct 245d244 < + { ubnt, "TopolStation 5210G", PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, 0xc0a2 }, /* TOPOL M peaceful launcher for nuclear rocket SS-27 */
package/madwifi/files/lib/wifi/madwifi.sh - patch file:
107d106 < "TopolStation 5210G") antgpio=1; invert=1;; 410,415d408 < option antenna auto # (auto|horizontal|vertical|external) < " < ;; < "TopolStation 5210G") < EXTRA_DEV=" < # Ubiquiti TopolStation 5210G features
In recent OpenWrt versions (8.09.1+) the antenna setting is covered by the wireless configuration.
The corresponding option is called antenna
and should be set within the wifi-iface
section.
uci set wireless.@wifi-iface[0].antenna=mode uci commit wireless wifi
Value (mode) | Description |
---|---|
vertical | Use internal antenna with vertical polarization |
horizontal | Use internal antenna with horizontal polarization |
external | Use external antenna port |