Battlemesh logo
  • Comments
  • Edit
  • Menu
    • Navigation
    • RecentChanges
    • FindPage
    • Local Site Map
    • Help
    • HelpContents
    • HelpOnMoinWikiSyntax
    • Display
    • Attachments
    • Info
    • Raw Text
    • Print View
    • Edit
    • Load
    • Save
    • Edit SideBar
  • Login

Navigation

  • RecentChanges
  • FindPage
  • PastEvents
  • ContactUs
  • HelpContents

Upload page content

You can upload content for the page named below. If you change the page name, you can also upload content for another page. If the page name is empty, we derive the page name from the file name.

File to load page content from
Page name
Comment
twö plüs tën minüs 1?

Revision 1 as of 2010-03-23 19:59:35
  • BattleMeshV3
  • NodeConfigScript
  • Batman

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
  • MoinMoin Powered
  • Python Powered
  • GPL licensed
  • Valid HTML 4.01