Ubiquiti NanoStation
NanoStation2, NanoStation5, NanoStation Loco2 and NanoStation Loco5
The following devices are not NanoStations but these devices use the same image as well. They most probably require snapshot builds.
- LiteStation 2 - uses openwrt-atheros-ubnt2-squashfs.bin . Steps for flashing are the same as NanoStation2
Models of the Ubiquiti NanoStation family are quite similar to each other so the same images and instructions can be used for the listed devices.
Datasheets for all models are available from Ubiquiti.
Hardware
- Bootloader: RedBoot
- CPU: Atheros AR2315 according to the datasheet and cpuinfo, but chip is marked as AR2316A !!
- CPU Speed: 180 Mhz
- Flash size: 4 MB
- RAM: 16 MB
- Wireless:
- NanoStation2: Atheros 802.11b/g (in CPU, 400mW)
- NanoStation5: Atheros 802.11a (in CPU)
- 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)
- Serial: internal (HE-10 connector, 3.3V)
- JTAG: yes, internal (solder pads, 3.3V)
This device is an integrated wifi spot designed to be used outdoor. With Ubiquiti Firmware, AirOS 3 actually, it can act as station, station WDS, client, client 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 with AirOS.
http://ubnt.com/downloads/press_nano.jpg
The Nanostation comes with a 12V powersupply, the internal DC-Converter seems to be realized with a AP1510 PWM Control 3A Step-Down Converter. This can handle up to 23V. (untested)
Opening the case
There are two screws under the label on the back. The newer M2 and M5 versions have just one screw under the label and two plastic pins that can be lifted out of their holes by pushing a plastic cable tie end next to them. After removing these, the board can be removed.
Nano 2 Loco:
Nano 5 Loco:
Nano 5M Loco:
NanoStation 5:
Serial
pin 1 - vcc pin 3 - RX pin 7 - TX pin 9 - gnd (9600 8n1)
RedBoot> fconfig [...] Local IP address: 192.168.1.20 Local IP address mask: 255.255.255.0 [...]
$ echo -e "\0377\0364\0377\0375\0006" > break $ nc -vvv 192.168.1.20 9000 < break ; telnet 192.168.1.20 9000
OpenWrt
Both NanoStation2 and NanoStation5 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) or atheros-ubnt5-squashfs.bin (for the NS5 or Loco5).
When flashing those images, the Ubiquiti web interface will show a warning about unsupported third-party firmware. This warning can be ignored.
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 NanoStation. 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-ubnt5-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-ubnt5-squashfs.bin flash_update
7. Signal LEDs might be blinking during the upgrade. On a Nano5L, the power lights go back and forth. 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
Restore Original AirOS firmware on Nanostation
To restore original firmware back you can't use mtd or sysupgrade but you have to use tftp method.
First put Nanostation in recovery mode via reset button on power on, and then flash original flash image via tftp.
wifi failure, 632nd bit
If wireless does not work with eg. backfire 10.03.1 prebuilt firmware, and you get (in dmesg) "wifi%d: ath_attach failed: -22", then you may need to run the following script by Bill Moffitt. WARNING: This script might brick your router (but it worked for me, User:green, on a NanoStation Loco2).
#!/bin/sh # By Bill Moffitt - this script puts a zero in the 632nd byte of the appropriate device # date >>/etc/firstbootlog echo "Starting regdomain-script.sh" >>/etc/firstbootlog partn=`grep boardconfig /proc/mtd |awk '{print $1}' |cut -d: -f1` byte=$(hexdump -b /dev/$partn |grep 0000270 |awk '{print $9}') echo "Going to work on partition $partn where regdomain is $byte" if [ $byte == "000" ]; then echo "success" >/tmp/regdomain_success exit fi if [ $partn -a ! $byte == "000" ]; then echo "Setting up regdomain on partition /dev/$partn" >>/etc/firstbootlog dd if=/dev/$partn of=/tmp/mtdfile bs=1 count=631 && echo "got the first 631 bytes" >>/etc/firstbootlog dd if=/dev/zero bs=1 count=1 >>/tmp/mtdfile && echo "put in the zero" >>/etc/firstbootlog dd if=/dev/$partn bs=1 skip=632 >>/tmp/mtdfile && echo "got the rest of the file" >>/etc/firstbootlog mtd erase $partn && echo "erased the partition" >>/etc/firstbootlog dd if=/tmp/mtdfile of=/dev/$partn 2>>/etc/firstbootlog && echo "Finished flashing partition $partn" >>/etc/firstbootlog wait sync && echo "Sync succeeded" >>/etc/firstbootlog byte=$(hexdump -b /dev/$partn |grep 0000270 |awk '{print $9}') if [ $byte -eq "000" ]; then echo "regdomain is zero" >>/etc/firstbootlog sync && rm /tmp/mtdfile date >>/etc/firstbootlog echo "done with regdomain" >>/etc/firstbootlog echo "success" >/tmp/regdomain_success else echo "FAIL writing the file back to /dev/$partn - regdomain remains $byte" fi else echo "Could not find partition" >>/etc/firstbootlog fi
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:
sysctl set dev.wifi0.softled 0 gpioctl 7 0
These can be added to an init file in /etc/rc.d and /etc/init.d
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 |
Some photos on this page © Matt Westervelt and available for use under a Creative Commons license for non-commercial works.
Tags
For some Help with the Tags, please have a look here: tags
NanoStation2 and NanoStation Loco2:
NanoStation5 and NanoStation Loco5:
LiteStation2:
toh/ubiquiti/nanostation.txt · Last modified: 2013/06/15 19:04 by lorema
This text is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.






