welcome: please sign in
location: BattleMeshV3 / NodeConfigScript / Babel


* this script uses opkg to download and install packages, be sure it has a gateway etc configured (look at the Zlan and adapt it to your need)

opkg update
opkg install kmod-ipv6
opkg install babeld

set -a


# 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=20

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=54M
uci set wireless.@wifi-iface[0].bgscan=0
uci set wireless.@wifi-iface[0].bgscan=ahdemo

uci set network.wlan=interface
uci set network.wlan.proto=static
uci set network.wlan.ipaddr=$WIRELESS_IP
uci set network.wlan.netmask=
uci commit wireless && wifi
uci commit network

#[edit] Configure the daemon
uci delete  babeld.wlan.ignore
uci commit babeld

#[edit] Enable the daemon
[ -f /etc/init.d/babeld ] && {
  /etc/init.d/babeld enable
  /etc/init.d/babeld start
} || { 
  echo " ERROR: babeld init script not found" 
  exit 1

#[edit] Disable the daemon
#[ -f /etc/init.d/babel ] && {
#  /etc/init.d/babeld stop
#  /etc/init.d/babeld disable


The following should be put in /etc/babeld.conf. (Note that this could probably be done with uci -- merci Gabriel -- but I'm not sure how.)

redistribute local ip allow
redistribute local ip fdba:1943:e753::/64 allow
redistribute local deny

in ip allow
in ip fdba:1943:e753::/64 allow
in deny

BattleMeshV3/NodeConfigScript/Babel (last edited 2010-06-03 19:26:24 by 213)