====== Ubiquiti Networks PicoStation M2HP ======
===== Vendor Information =====
* Ubiquiti page on %%PicoStation%% M2HP
===== Board Details =====
* CPU: Atheros AR7241 V1 %%SoC%% 390 MHz (MIPS 32-bit big-endian)
* Memory: 32MB
* Storage: 8MB SPI FLASH
* Network: 1 WAN and 2 LAN ports attached via Atheros AR7240 Ethernet Switch
* Peripherals:
*
*
*
* Power:
===== Getting Started =====
The %%PicoStation%% M2HP receives power over the WAN port.
The UART pins provide TTL level signals. You will need a TTL-RS232 adapter such as http://www.adafruit.com/products/954
===== Boot Process =====
The %%PicoStation%% M2HP uses uboot as its boot loader.
Initial bootup log looks like this:
U-Boot 1.1.4.2-s564 (Jul 19 2012 - 10:41:56)
Board: Ubiquiti Networks XM board (rev 1.0 e302)
DRAM: 32 MB
Flash: 8 MB
PCIe WLAN Module found (#1).
Net: eth0, eth1
Hit any key to stop autoboot: 0
ar7240> printenv
bootdelay=1
baudrate=115200
ethaddr=00:15:6d:0d:00:00
mtdids=nor0=ar7240-nor0
partition=nor0,0
mtddevnum=0
mtddevname=u-boot
filesize=10000
fileaddr=81000000
serverip=192.168.1.254
ethact=eth0
mtdparts=mtdparts=ar7240-nor0:256k(u-boot),64k(u-boot-env),1024k(kernel),5760k(rootfs),256k(cfg),64k(EEPROM)
bootcmd=bootm 0x9f050000
bootargs=console=tty0 root=31:03 rootfstype=squashfs init=/init
ipaddr=192.168.1.20
stdin=serial
stdout=serial
stderr=serial
Environment size: 452/65532 bytes
===== Building FreeBSD image =====
(TBD)
===== Booting FreeBSD =====
A tftp server is needed to serve resulting image PICOSTATION_M2HP.initial.img. Connect the server and the device on the same network.
Looking at uboot printenv:
serverip=192.168.1.254
ipaddr=192.168.1.20
What this means is, uboot expects tftp server to be on "192.168.1.254"
On tftp server if you are using "em0" for example as your interface,
# ifconfig em0 inet 192.168.1.254 netmask 255.255.255.0 alias
To add needed IP as an alias. This way board can receive image from the tftp server.
On the other hand, put the board into "urescue" mode from dropping to uboot.
(urescue is one of many uboot commands) Once entering this mode, board will wait for someone (our tftp server) to send image it's way.
From tftp server, connect to board and sent the image:
# tftp 192.168.1.20
# binary
# put PICOSTATION_M2HP.initial.img
Now the board should receive the image and start booting.
Here is a sample bootup log:
U-Boot 1.1.4.2-s564 (Jul 19 2012 - 10:41:56)
Board: Ubiquiti Networks XM board (rev 1.0 e302)
DRAM: 32 MB
Flash: 8 MB
PCIe WLAN Module found (#1).
Net: eth0, eth1
Hit any key to stop autoboot: 0
## Booting image at 9f050000 ...
Image Name: FreeBSD
Created: 2013-08-30 13:03:43 UTC
Image Type: MIPS Linux Kernel Image (lzma compressed)
Data Size: 899503 Bytes = 878.4 kB
Load Address: 80050000
Entry Point: 80050100
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK
Starting kernel ...
CPU platform: Atheros AR7241 rev 1
CPU Frequency=390 MHz
CPU DDR Frequency=390 MHz
CPU AHB Frequency=195 MHz
platform frequency: 390000000
CPU reference clock: 5 MHz
arguments:
a0 = 00000006
a1 = a1f4ffb0
a2 = a1f50450
a3 = 00000000
Cmd line:argv is invalid
Environment:
envp is invalid
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
Config3=0x20
KDB: debugger backends: ddb
KDB: current backend: ddb
Copyright (c) 1992-2013 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 10.0-CURRENT #3 r255032M: Fri Aug 30 13:02:03 UTC 2013
hirenp@catchbone-l7.corp.yahoo.com:/usr/home/hirenp/work/freebsd/head/obj/mipseb/mips.mips/usr/home/hirenp/work/fr
eebsd/head/src/sys/PICOSTATION_M2HP mips
gcc version 4.2.1 20070831 patched [FreeBSD]
real memory = 33554432 (32768K bytes)
avail memory = 28438528 (27MB)
random device not loaded; using insecure entropy
nexus0:
clock0: on nexus0
Timecounter "MIPS32" frequency 195000000 Hz quality 800
Event timer "MIPS32" frequency 195000000 Hz quality 800
argemdio0: at mem 0x1a000000-0x1a000fff on nexus0
mdio0: on argemdio0
mdioproxy0: on mdio0
arswitch0: on mdio0
miibus0: on arswitch0
ukphy0: PHY 0 on miibus0
ukphy0: none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT-FDX, 1000baseT-FDX-master, auto
miibus1: on arswitch0
ukphy1: PHY 1 on miibus1
ukphy1: none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT-FDX, 1000baseT-FDX-master, auto
miibus2: on arswitch0
ukphy2: PHY 2 on miibus2
ukphy2: none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT-FDX, 1000baseT-FDX-master, auto
miibus3: on arswitch0
ukphy3: PHY 3 on miibus3
ukphy3: none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT-FDX, 1000baseT-FDX-master, auto
etherswitch0: on arswitch0
mdio1: on arswitch0
mdioproxy1: on mdio1
apb0 at irq 4 on nexus0
uart0: <16550 or compatible> on apb0
uart0: console (115200,n,8,1)
gpio0: on apb0
gpio0: [GIANT-LOCKED]
gpio0: gpio pinmask=0x1883
gpioc0: on gpio0
gpiobus0: on gpio0
gpioled0: at pin(s) 0 on gpiobus0
gpioled1: at pin(s) 1 on gpiobus0
gpioled2: at pin(s) 11 on gpiobus0
gpioled3: at pin(s) 7 on gpiobus0
pcib0 at irq 0 on nexus0
pcib0: found EEPROM at 0x1fff1000 on 0.0.0
pcib0: EEPROM firmware: 0x1fff1000 @ 4096 bytes
pcib0: device EEPROM 'pcib.0.bus.0.0.0.eeprom_firmware' registered
pci0: on pcib0
pci0: at device 0.0 (no driver attached)
arge0: at mem 0x19000000-0x19000fff irq 2 on nexus0
arge0: Overriding MAC from EEPROM
miiproxy0: on arge0
miiproxy0: attached to target mdio1
arge0: finishing attachment, phymask 0010, proxy set
miibus4: on miiproxy0
ukphy4: PHY 4 on miibus4
ukphy4: none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT-FDX, 1000baseT-FDX-master, auto
arge0: Ethernet address: dc:9f:db:55:b5:80
arge1: at mem 0x1a000000-0x1a000fff irq 3 on nexus0
arge1: finishing attachment, phymask 0000, proxy null
arge1: Ethernet address: dc:9f:db:55:b5:81
spi0: at mem 0x1f000000-0x1f00000f on nexus0
spibus0: on spi0
mx25l0: at cs 0 on spibus0
mx25l0: w25q64, sector 65536 bytes, 128 sectors
ar71xx_wdog0: on nexus0
ar71xx_wdog0: Previous reset was due to watchdog timeout
Timecounters tick every 1.000 msec
arswitch0port1: link state changed to DOWN
arswitch0port2: link state changed to DOWN
arswitch0port3: link state changed to DOWN
arswitch0port4: link state changed to DOWN
map/rootfs.uncompress: GEOM_ULZMA image found
map/rootfs.uncompress: 173 x 131072 blocks
Trying to mount root from ufs:/dev/map/rootfs.uncompress []...
warning: no time-of-day clock registered, system time will not be set accurately
Aug 30 13:02:55 init: login_getclass: unknown class 'daemon'
*** Populating /var ..
*** Loading configuration files ..
*** Restoring from /dev/map/cfg ..
gunzip: (stdin): trailing garbage ignored
etc/cfg/manifest
etc/master.passwd
etc/group
etc/cfg/rc.conf
etc/cfg/hostapd.wlan0.conf
8 blocks
*** Completed.
*** setting up hostname
*** Load kernel modules
ath0: at device 0.0 on pci0
ath0: ath_pci_attach: EEPROM firmware @ 0x80474000
[ath]: default pwr offset: -5 dBm != EEPROM pwr offset: 0 dBm; curves will be adjusted.
ath0: [HT] enabling HT modes
ath0: [HT] 1 stream STBC receive enabled
ath0: [HT] 1 RX streams; 1 TX streams
ath0: AR9280 mac 128.2 RF5133 phy 13.0
ath0: 2GHz radio: 0x0000; 5GHz radio: 0x00c0
random: initialized
*** bringing up loopback ..
*** Starting networking via /etc/rc.d/base/net
dev.ath.0.txq_mcastq_maxdepth: 512 -> 32
sysctl: unknown oid 'dev.ath.1.txq_mcastq_maxdepth': No such file or directory
*** Interface: arge0: start
arge0: link state changed to UP
*** Interface: arge0: done
*** Interface: wlan0: start
wlan0: Ethernet address: dc:9f:db:54:b5:80
ifconfig: unknown/undefined channel number 36 flags 0x0
*** Starting hostapd..
Configuration file: /etc/cfg/hostapd.wlan0.conf
Using interface wlan0 with hwaddr dc:9f:db:54:b5:80 and ssid "homepico1"
ar5416StopDmaReceive: dma failed to stop in 10ms
AR_CR=0x00000024
AR_DIAG_SW=0x42000020
ar5416StopDmaReceive: dma failed to stop in 10ms
AR_CR=0x00000024
AR_DIAG_SW=0x42000020
ar5416StopDmaReceive: dma failed to stop in 10ms
AR_CR=0x00000024
AR_DIAG_SW=0x42000020
ar5416StopDmaReceive: dma failed to stop in 10ms
AR_CR=0x00000024
AR_DIAG_SW=0x42000020
ar5416StopDmaReceive: dma failed to stop in 10ms
AR_CR=0x00000024
AR_DIAG_SW=0x42000020
*** Interface: wlan0: done
ar5416StopDmaReceive: dma failed to stop in 10ms
AR_CR=0x00000024
AR_DIAG_SW=0x42000020
ar5416StopDmaReceive: dma failed to stop in 10ms
AR_CR=0x00000024
AR_DIAG_SW=0x42000020
ar5416StopDmaReceive: dma failed to stop in 10ms
AR_CR=0x00000024
AR_DIAG_SW=0x42000020
*** Interface: bridge0: start
bridge0: Ethernet address: 4e:68:ee:ec:96:6c
arge0: promiscuous mode enabled
bridge0: link state changed to UP
ar5416StopDmaReceive: dma failed to stop in 10ms
AR_CR=0x00000024
AR_DIAG_SW=0x42000020
wlan0: promiscuous mode enabled
ar5416PerCalibrationN: NF calibration didn't finish; delaying CCA
*** Interface: bridge0: done
*** Default password/login databases ..
*** inetd
*** Done!
FreeBSD/mips (freebsd-wifi-build) (ttyu0)
login:
Login with root and network interfaces look like this for hostap mode:
# ifconfig
arge0: flags=8943 metric 0 mtu 1500
options=80000
ether dc:9f:db:55:b5:80
media: Ethernet autoselect (100baseTX )
status: active
arge1: flags=8802 metric 0 mtu 1500
ether dc:9f:db:55:b5:81
media: Ethernet 1000baseT
status: active
lo0: flags=8049 metric 0 mtu 16384
options=600003
inet 127.0.0.1 netmask 0xff000000
ath0: flags=8843 metric 0 mtu 2290
ether dc:9f:db:54:b5:80
media: IEEE 802.11 Wireless Ethernet autoselect mode 11ng
status: running
wlan0: flags=8943 metric 0 mtu 1500
ether dc:9f:db:54:b5:80
media: IEEE 802.11 Wireless Ethernet autoselect mode 11ng
status: running
ssid homepico1 channel 8 (2447 MHz 11g ht/40-) bssid dc:9f:db:54:b5:80
regdomain FCC3 country US indoor ecm authmode WPA1+WPA2/802.11i
privacy MIXED deftxkey 2 TKIP 2:128-bit txpower 30 scanvalid 60
protmode CTS ampdulimit 64k ampdudensity 8 shortgi wme burst
dtimperiod 1
bridge0: flags=8843 metric 0 mtu 1500
ether 4e:68:ee:ec:96:6c
inet 192.168.1.20 netmask 0xffffff00 broadcast 192.168.1.255
id 00:00:00:00:00:00 priority 32768 hellotime 2 fwddelay 15
maxage 20 holdcnt 6 proto rstp maxaddr 2000 timeout 1200
root id 00:00:00:00:00:00 priority 32768 ifcost 0 port 0
member: wlan0 flags=143
ifmaxaddr 0 port 9 priority 128 path cost 66666
member: arge0 flags=143
ifmaxaddr 0 port 5 priority 128 path cost 200000
#