welcome: please sign in
location: BattleMeshV3.1416 / NodeConfigBabelZScript

quick and very dirty configuration to babelz

set -a

HOSTNAME="@PARAM1@"
WIRED_IP="@PARAM2@"
WIRELESS_IP="@PARAM3@"
CHANNEL="@PARAM5@"
CELL="@PARAM6@"

# setting wireless config
DEVICE=`uci get wireless.@wifi-iface[0].device`
uci delete wireless.$DEVICE.disabled
uci delete wireless.@wifi-iface[0].network
uci delete wireless.@wifi-iface[0].rate

uci set wireless.$DEVICE.channel=$CHANNEL
uci set wireless.$DEVICE.hwmode=11g
uci set wireless.$DEVICE.txpower=1

uci set wireless.@wifi-iface[0].network=wlan
uci set wireless.@wifi-iface[0].ssid=wbm_babel
uci set wireless.@wifi-iface[0].encryption=none
uci set wireless.@wifi-iface[0].bssid=$CELL
uci set wireless.@wifi-iface[0].rate=1M
uci set wireless.@wifi-iface[0].bgscan=0
uci set wireless.@wifi-iface[0].mode=adhoc
uci set network.wlan=interface
uci set network.wlan.proto=static
uci set network.wlan.ipaddr=$WIRELESS_IP
uci set network.wlan.netmask=255.255.255.0
uci commit wireless && wifi

#we don't want bridged interface
uci delete network.lan.type   

uci commit network

#[edit] Configure the daemon
#
uci delete  babeld
uci commit babeld

cat << EOF > /etc/rc.local
ifconfig eth0 $WIRED_IP
ifconfig eth0:1 192.168.1.1
babeld -z 2,30 eth0 ath0 &
exit 0
EOF

# disabling services
/etc/init.d/dnsmasq stop
/etc/init.d/dnsmasq disable
/etc/init.d/firewall stop
/etc/init.d/firewall disable
/etc/init.d/httpd stop
/etc/init.d/httpd disable

reboot
exit

BattleMeshV3.1416/NodeConfigBabelZScript (last edited 2010-09-04 22:27:25 by 78-22-102-245)