BattleMeshV3/NodeConfigScript/Batman here.
opkg update
opkg install kmod-batman-adv-kernelland
set -a
HOSTNAME="@PARAM1@"
WIRED_IP="@PARAM2@"
WIRELESS_IP="@PARAM3@"
CHANNEL="@PARAM4@"
CELL="@PARAM5@"
# 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_batman
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].mode=ahdemo
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
uci commit network
#[edit] Configure the daemon
#
uci set network.batman=interface
uci set network.batman.ifname=bat0
uci set network.batman.proto=static
uci set network.batman.ipaddr=$WIRELESS_IP
uci set network.batman.netmask=255.255.255.0
#uci set network.batman.gateway=""
uci set batman-adv-kernelland.general.interface="$DEVICE"
## Enabling syslogging to remote target ##
#
#uci set system.@system[0].log_ip="$LOG_IP"
uci commit
#[edit] Enable daemon
#
[ -f /etc/init.d/batman-adv-kernelland ] && {
/etc/init.d/batman-adv-kernelland enable
/etc/init.d/batman-adv-kernelland start
} || {
echo "ERROR: couldn't find batman init scripts, exiting..."
exit 1
}
#[edit] Disable daemon
#
#[ -f /etc/init.d/batman-adv-kernelland ] && {
# /etc/init.d/batman-adv-kernelland stop
# /etc/init.d/batman-adv-kernelland disable
#}
#[edit] Enable batman-remote-logger
#
#[ -f /etc/init.d/batman-remote-logger.sh ] && {
# /etc/init.d/batman-remote-logger.sh enable
# /etc/init.d/batman-remote-logger.sh start
#}
#[edit] Disable batman-remote-logger
#
#[ -f /etc/init.d/batman-remote-logger.sh ] && {
# /etc/init.d/batman-remote-logger.sh stop
# /etc/init.d/batman-remote-logger.sh disable
#}
#[edit] Verbose BATMAN log-level
#
#[ -f /usr/sbin/batctl ] && {
# batctl ll 15
#}
#[edit] Quiet BATMAN log-level
#
#[ -f /usr/sbin/batctl ] && { batctl 0 }
reboot
exit