Ubiquiti Networks Router-Station
Vendor Information
Board Details
- CPU: Atheros AR71xx SoC (MIPS 32-bit big-endian)
- Memory: 64MB
- Storage: 16MB SPI FLASH (~12MB available)
- Network: 1 WAN and 2 LAN ports attached via Infineon ADM6996FC Ethernet switch PHY
- Peripherals:
- 3 MiniPCI Type IIIA slots (larger expands past edge of board)
- 1 Hi-Speed USB
- 1 UART
- Power: 12-24V DC, 3-7W draw; supply over unused Ethernet pins on WAN port
Getting Started
The Router-station, like other wireless-ISP-targeted boards, receives power over the WAN port. You will need a passive power injector to get power to the board as there is no barrel connector. Passive injectors are readily available from most WISP supply sites, such as Netgate. RJ45 pins 4 & 5 provide voltage and pins 7 & 8 are ground. Be aware that the Router-Station's voltage requirements are below the 802.3af PoE spec of 48V and connecting it to a 802.3af supply will damage the board.
In addition, the board does not have a RS-232 interface. The UART pins provide TTL level signals. You will need a TTL-RS232 adapter such as the ones sold at CompSys. These are commonly based off the Maxim MAX232 chip series. Be aware these adapters typically come in 5V and 3.3V variants. The Router-Station has a 3.3V pin in the UART bank but has a 5V pin in the USB bank if needed.
The Ethernet ports are wired switch-side, so you may need a crossover cable or a MDI/MDI-X switchable port to connect it to another switch.
Boot Process
The Router-Station uses RedBoot as its boot loader. In the default configuration (shipping as of December 2008), a basic Linux kernel and BusyBox userspace is loaded from flash. The RedBoot boot sequence can be interrupted and a kernel loaded via TFTP instead. A snapshot of a boot with the stock configuration is below.
RedBoot uses the WAN port for its network interface.
Once the system is booted, login with username/password ubnt to access the shell.
Booting FreeBSD
Press Ctrl-C on startup and run following command sequence:
ip -h ServerIP -l RStationIP load kernel exec
or configure these settings permanently using RedBoot fconfig command
Reference
Stock boot sequence
Looking for PHY for MAC unit 0 Eth ADM6996FC found. Looking for PHY for MAC unit 1 Eth ADM6996FC found. Ethernet eth0: MAC address 00:15:6d:c1:28:2f IP: 192.168.1.20/255.255.255.0, Gateway: 0.0.0.0 Default server: 192.168.1.42 RedBoot(tm) bootstrap and debug environment [ROMRAM] Ubiquiti Networks certified release, version 0.9.7.00 - built 18:07:09, Nov 18 2 008 Copyright (C) 2000, 2001, 2002, 2003, 2004 Red Hat, Inc. Board: Ubiquiti AR71xx-based board RAM: 0x80000000-0x84000000, [0x8003ae00-0x80fe1000] available FLASH: 0xbf000000 - 0xc0000000, 256 blocks of 0x00010000 bytes each. == Executing boot script in 1.000 seconds - enter ^C to abort RedBoot> cache off RedBoot> fis load -d -e kernel Trying LZMA decompression... Image loaded from 0x80060000-0x8027f086 Image is not ELF, skipping ELF parsing... RedBoot> go No wireless card found in slot 0 SIOCSIFADDR: No such device SIOCGIFFLAGS: No such device interface ath0 does not exist! SIOCSIFADDR: No such device SIOCGIFFLAGS: No such device SIOCGIFFLAGS: No such device Please press Enter to activate this console.
Linux iomem
00000000-03ffffff : System RAM 00060000-002060d7 : Kernel code 002060d8-0025e0bf : Kernel data 10000000-17ffffff : PCI memory space 18020000-18020fff : serial8250.0 1b000000-1bffffff : ar7100-ehci.0 1c000000-1cffffff : ar7100-ohci.0 b9000000-b9002000 : eth0_membase ba000000-ba002000 : eth1_membase
Linux dmesg
Linux version 2.6.15 (keba@keba-laptop) (gcc version 3.4.4) #5 Tue Nov 18 18:11: 52 EET 2008 CPU revision is: 00019374 Determined physical RAM map: memory: 04000000 @ 00000000 (usable) On node 0 totalpages: 16384 DMA zone: 16384 pages, LIFO batch:3 DMA32 zone: 0 pages, LIFO batch:0 Normal zone: 0 pages, LIFO batch:0 HighMem zone: 0 pages, LIFO batch:0 Built 1 zonelists Kernel command line: console=ttyS0,115200 init=/linuxrc quiet Primary instruction cache 64kB, physically tagged, 4-way, linesize 32 bytes. Primary data cache 32kB, 4-way, linesize 32 bytes. Synthesized TLB refill handler (20 instructions). Synthesized TLB load handler fastpath (32 instructions). Synthesized TLB store handler fastpath (32 instructions). Synthesized TLB modify handler fastpath (31 instructions). Cache parity protection disabled PID hash table entries: 512 (order: 9, 8192 bytes) Using 340.000 MHz high precision timer. Console: colour dummy device 80x25 Dentry cache hash table entries: 16384 (order: 4, 65536 bytes) Inode-cache hash table entries: 8192 (order: 3, 32768 bytes) Memory: 62208k/65536k available (1688k kernel code, 3288k reserved, 351k data, 1 32k init, 0k highmem) Calibrating delay loop... 451.58 BogoMIPS (lpj=225792) Mount-cache hash table entries: 512 Checking for 'wait' instruction... available. NET: Registered protocol family 16 calling simple_config callback.. SCSI subsystem initialized PCI: Scanning bus 0000:00 PCI: Fixups for bus 0000:00 PCI: Bus scan for 0000:00 returning with max=00 AR7100 GPIOC major 0 squashfs: version 3.3 (2007/10/31) Phillip Lougher Initializing Cryptographic API io scheduler noop registered io scheduler deadline registered Serial: 8250/16550 driver $Revision: #1 $ 1 ports, IRQ sharing disabled serial8250.0: ttyS0 at MMIO 0x0 (irq = 19) is a 16550A PPP generic driver version 2.4.2 PPP Deflate Compression module registered PPP BSD Compression module registered PPP MPPE Compression module registered NET: Registered protocol family 24 SPI Flash Manufacturer: 0xC2, Device: 0x2018 cmdlinepart partition parsing not available Searching for RedBoot partition table in ar7100-nor0 at offset 0xff0000 9 RedBoot partitions found on MTD device ar7100-nor0 Creating 9 MTD partitions on "ar7100-nor0": 0x00000000-0x00030000 : "RedBoot" 0x00030000-0x00040000 : "unallocated" 0x00040000-0x00140000 : "kernel" 0x00140000-0x00800000 : "rootfs" mtd: partition "rootfs" set to be root filesystem 0x00800000-0x00bd0000 : "unallocated" 0x00bd0000-0x00fd0000 : "data" 0x00fd0000-0x00ff0000 : "cfg" 0x00ff0000-0x01000000 : "FIS directory" 0x00fff000-0x01000000 : "RedBoot config" mtd: partition "RedBoot config" doesn't start on an erase block boundary -- forc e read-only Netfilter messages via NETLINK v0.30. NET: Registered protocol family 2 IP route cache hash table entries: 1024 (order: 0, 4096 bytes) TCP established hash table entries: 4096 (order: 2, 16384 bytes) TCP bind hash table entries: 4096 (order: 2, 16384 bytes) TCP: Hash tables configured (established 4096 bind 4096) TCP reno registered GRE over IPv4 tunneling driver TCP bic registered NET: Registered protocol family 1 NET: Registered protocol family 17 Ebtables v2.0 registered 802.1Q VLAN Support v1.8 Ben Greear <greearb@candelatech.com> All bugs added by David S. Miller <davem@redhat.com> VFS: Mounted root (squashfs filesystem) readonly. Freeing unused kernel memory: 132k freed Warning: unable to open an initial console. Algorithmics/MIPS FPU Emulator v1.5 ag7100_mod: module license 'unspecified' taints kernel. ar7100-gpio 1.0 initialised ath_hal: 0.9.17.1 (AR5212, AR5416, RF5413, REGOPS_FUNC, 11D) ath_dfs: Version 2.0.0 Copyright (c) 2005-2006 Atheros Communications, Inc. All Rights Reserved wlan: 0.8.4.2 (Atheros/multi-bss) wlan: mac acl policy registered ath_rate_atheros: Copyright (c) 2001-2005 Atheros Communications, Inc, All Right s Reserved ath_dev: Copyright (c) 2001-2007 Atheros Communications, Inc, All Rights Reserve d ath_pci: 0.9.4.5 (Atheros/multi-bss) rssi-leds 1.0 loaded ag7100: unit 0: phy not up carrier 1 device eth0 entered promiscuous mode
FreeBSD dmesg
platform frequency: 680000000
arguments:
a0 = 00000002
a1 = 80050028
a2 = 80050000
a3 = 0000001b
Cmd line: arg1 arg2 arg3
Environment:
memsize = 0x04000000
modetty0 = 0,n,8,1,hw
ethaddr = 00.15.6d.c1.28.2e
board = Ubiquiti AR71xx-based board
Cache info:
picache_stride = 4096
picache_loopcount = 16
pdcache_stride = 4096
pdcache_loopcount = 8
cpu0: MIPS Technologies processor v116.147
MMU: Standard TLB, 16 entries
L1 i-cache: 4 ways of 512 sets, 32 bytes per line
L1 d-cache: 4 ways of 256 sets, 32 bytes per line
Config1=0x9ee3519e<PerfCount,WatchRegs,MIPS16,EJTAG>
Config3=0x20
Va=0xc0000000 Ve=ffffc000
init kernel_segmap va >> = 768 nkpt:120
avail_start:0x48c4a0 avail_end:0x4000000
KDB: debugger backends: ddb
KDB: current backend: ddb
Copyright (c) 1992-2009 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 8.0-CURRENT #40: Tue Jun 16 17:11:56 PDT 2009
gonzo@figaro.bluezbox.com:/src/FreeBSD/obj/mips/mips/src/FreeBSD/mips/sys/AR71XX
real memory = 67108864 (65536K bytes)
Physical memory chunk(s):
0x0048d000 - 0x03ea5fff, 60919808 bytes (14873 pages)
avail memory = 60346368 (57MB)
wlan: <802.11 Link Layer>
random: <entropy source, Software, Yarrow>
mem: <memory>
nfslock: pseudo-device
null: <null device, zero device>
nexus0: <MIPS32 root nexus>
clock0: <Generic MIPS32 ticker> on nexus0
clock0: [FILTER]
apb0 at irq 4 on nexus0
apb0: [FILTER]
uart0: <16550 or compatible> on apb0
uart0: [FILTER]
uart0: fast interrupt
uart0: console (115200,n,8,1)
pcib0 at irq 0 on nexus0
pcib0: [FILTER]
pci0: <PCI bus> on pcib0
pci0: domain=0, physical bus=0
found-> vendor=0x0700, dev=0x1107, revid=0x01
domain=0, bus=0, slot=0, func=0
class=00-00-00, hdrtype=0x00, mfdev=0
cmdreg=0x0356, statreg=0x02b0, cachelnsz=0 (dwords)
lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns)
map[10]: type Prefetchable Memory, range 32, base 0, size 28, enabled
map[14]: type I/O Port, range 32, base 0, size 8, port disabled
found-> vendor=0x168c, dev=0x0013, revid=0x01
domain=0, bus=0, slot=17, func=0
class=02-00-00, hdrtype=0x00, mfdev=0
cmdreg=0x0000, statreg=0x0290, cachelnsz=0 (dwords)
lattimer=0x00 (0 ns), mingnt=0x0a (2500 ns), maxlat=0x1c (7000 ns)
intpin=a, irq=0
map[10]: type Memory, range 32, base 0, size 16, memory disabled
PIN 0:17:0 (1) -> ?
pci0: <old, non-VGA display device> at device 0.0 (no driver attached)
ath0: <Atheros 5212> irq 0 at device 17.0 on pci0
ath0: Lazy allocation of 0x10000 bytes rid 0x10 type 3 at 0x10000000
ath0: Reserved 0x10000 bytes for rid 0x10 type 3 at 0x10000000
ath0: [MPSAFE]
ath0: [ITHREAD]
assignPrivateChannels: 23 public, 11 private channels
ar5212GetRateTable: invalid mode 0x10000
ar5212GetRateTable: invalid mode 0x8000
ath0: 11b rates: 1Mbps 2Mbps 5.5Mbps 11Mbps
ath0: 11g rates: 1Mbps 2Mbps 5.5Mbps 11Mbps 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps
ath0: turboG rates: 1Mbps 2Mbps 5.5Mbps 11Mbps 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps
ath0: AR5212 mac 5.9 RF2112 phy 4.3
ath0: Use hw queue 1 for WME_AC_BE traffic
ath0: Use hw queue 0 for WME_AC_BK traffic
ath0: Use hw queue 2 for WME_AC_VI traffic
ath0: Use hw queue 3 for WME_AC_VO traffic
ath0: Use hw queue 8 for CAB traffic
ath0: Use hw queue 9 for beacons
arge0: <Atheros AR71xx built-in ethernet interface> at mem 0x19000000-0x19000fff irq 2 on nexus0
arge0: No PHY specified, using 4
miibus0: <MII bus> on arge0
ukphy0: <Generic IEEE 802.3u media interface> PHY 4 on miibus0
ukphy0: OUI 0x00c098, model 0x0007, rev. 1
ukphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
arge0: bpf attached
arge0: Ethernet address: 00:15:6d:c1:28:2e
arge0: [MPSAFE]
arge0: [FILTER+ITHREAD]
spi0: <AR71XX SPI> at mem 0x1f000000-0x1f00000f on nexus0
spibus0: <spibus bus> on spi0
mx25l0: <M25Pxx Flash Family> at cs 0 on spibus0
mx25l0: mx25ll128, sector 65536 bytes, 256 sectors
Device configuration finished.
Timecounter "MIPS32" frequency 340000000 Hz quality 800
Timecounters tick every 1.000 msec
lo0: bpf attached
bootpc_init: wired to interface 'arge0'
Implement me: SIOCSIFFLAGS
Implement me: SIOCDELMULTI
Sending DHCP Discover packet from interface arge0 (00:15:6d:c1:28:2e)
arge0: link state changed to DOWN
GEOM: new disk flash/spi0
arge0: link state changed to UP
Received DHCP Offer packet on arge0 from 0.0.0.0 (accepted) (no root path)
Sending DHCP Request packet from interface arge0 (00:15:6d:c1:28:2e)
Received DHCP Ack packet on arge0 from 0.0.0.0 (accepted) (got root path)
arge0 at 192.168.10.181 server 0.0.0.0
subnet mask 255.255.255.0 rootfs 192.168.10.1:/src/FreeBSD/tftproot/
Adjusted interface arge0
in_scrubprefix: deletion failed
Trying to mount root from nfs:
NFS ROOT: 192.168.10.1:/src/FreeBSD/tftproot/
warning: no time-of-day clock registered, system time will not be set accurately
warning: no time-of-day clock registered, system time will not be set accurately
start_init: trying /sbin/init
Documentation
Based on a number of sources of source code for Atheros MIPS parts, I've started the AtherosMIPS page to put it into an organized form.
Similar Boards for Data Mining
The DIR-615 revC1 has an Atheros AR9130 under the hood. This is very similar to the AR7160 that the RouterStation has in it. There's a GPL compliance tarball that's available from DLINK
There's also an openwrt port underway that is useful at their SVN Server