Jump to: navigation, search

Picostation M2 as node on SECN (batman-adv) network

Instructions, courtesy of Bob Hunt, on setting up an Ubiquiti Picostation M2 as a node on an SECN (batman-adv) network.

This information is superseded to an extent in that SECN firmware for the PicoStation M is available.

The Bullet M firmware from the VT Downloads page (or from OpenWrt Downloads) will operate on the PicoStation M devices.


Flash correct Openwrt Backfire version onto M2 device (PicoM2 uses BulletM2 firmware)
Set device password
telnet 192.169.1.1 
passwd && exit
Download and copy kmod-batman-adv_2.6.32.27+2011.2.0-1_ar71xx.ipk to device and login
wget http://downloads.openwrt.org/backfire/10.03.1-rc6/ar71xx/packages/kmod-batman-adv_2.6.32.27+2011.2.0-1_ar71xx.ipk
sudo scp kmod-batman-adv_2.6.32.27+2011.2.0-1_ar71xx.ipk [email protected]:/tmp
ssh [email protected]
cd /tmp
Install batman-adv
opkg install /tmp/kmod-batman-adv_2.6.32.27+2011.2.0-1_ar71xx.ipk
/etc/init.d/batman-adv enable
Run uci commands
uci delete [email protected][]
uci delete [email protected][]                   #only 2 seem to be set up by Openwrt 
uci delete [email protected][]
uci add wireless wifi-iface >/dev/null
uci add wireless wifi-iface >/dev/null        #3 wireless interfaces to be set up??
uci add wireless wifi-iface >/dev/null
uci import -m batman-adv </dev/null
uci set batman-adv.bat0=mesh
uci set batman-adv.bat0.interfaces=mesh0
uci set batman-adv.bat0.gw_mode=client 
uci set network.lan.ipaddr=10.130.1.XX         ##unique to device
uci set network.lan.gateway=10.130.1.1        ##your gateway
uci set network.lan.dns=10.130.1.1                ##your DNS
uci set dhcp.lan.dhcp_option='3,10.130.1.1 6,10.130.1.1,8.8.8.8' #3, is gateway 6, is DNS
uci set network.lan.ifname="eth0 wlan0 wlan0-1 bat0"
uci set network.lan.macaddr=
uci set network.bat0=interface
uci set network.bat0.ifname=bat0
uci set network.bat0.proto=none
uci set network.bat0.mtu=1500
uci set network.mesh0=interface
uci set network.mesh0.ifname=wlan0-2
uci set network.mesh0.proto=none
uci set network.mesh0.mtu=1528
uci set wireless.radio0=wifi-device
uci set wireless.radio0.channel=WIRELESS_CHANNEL        ##must be consistent across mesh
uci set wireless.radio0.disabled=0
uci set wireless.radio0.phy=phy0
uci set [email protected][0].device=radio0
uci set [email protected][0].encryption=none
uci set [email protected][0].network=lan
uci set [email protected][0].mode=ap
uci set [email protected][0].ssid=PUBLIC_SSID         ##your public ssid
uci set [email protected][1].device=radio0
uci set [email protected][1].encryption=psk2
uci set [email protected][1].key=PRIVATE_KEY          ##your private encryption key
uci set [email protected][1].mode=ap
uci set [email protected][1].ssid=PRIVATE_SSID        ##your private ssid
uci set [email protected][1].network=lan
uci set [email protected][2].device=radio0 
uci set [email protected][2].encryption=none
uci set [email protected][2].network=mesh0
uci set [email protected][2].mode=adhoc 
uci set [email protected][2].bssid=02:CA:FF:EE:BA:BE   ##must be consistent across mesh
uci set [email protected][2].ssid=MESH_SSID            ##must be consistent across mesh
uci commit
Reboot && exit
Shell script

Bob has created a shell script that will do the above for you. Click here to see the script and cut and paste it into an editor and save as an executable file. Here it is.

secnM2.sh