uci delete wireless.@wifi-iface[]
uci delete wireless.@wifi-iface[]
uci delete wireless.@wifi-iface[]
uci delete wireless.@wifi-iface[]
uci delete wireless.@wifi-iface[]
uci delete wireless.@wifi-iface[]
uci delete wireless.@wifi-iface[]
uci delete wireless.@wifi-iface[]
uci delete wireless.@wifi-iface[]
uci delete wireless.@wifi-iface[]
uci add wireless wifi-iface >/dev/null
uci add wireless wifi-iface >/dev/null
uci add wireless wifi-iface >/dev/null
uci add wireless wifi-iface >/dev/null
uci import -m batman-adv </dev/null
uci set dhcp.lan.ignore=1
uci set dhcp.@dnsmasq[0].local=/sants-montjuic.guifi.net/
uci set dhcp.@dnsmasq[0].domain=sants-montjuic.guifi.net
uci set system.@system[0].timezone=CET-1CEST,M3.5.0,M10.5.0/3
uci set dropbear.@dropbear[0]=dropbear
uci set firewall.@defaults[0]=defaults
uci set batman-adv.bat0=mesh
uci set batman-adv.bat0.interfaces="mesh0 mesh1"
## Cambiar a "server" si se tratará de un nodo con enlace a otra red (como internet)
## Esto se debería cambiar solo (¿lo hace?)
## http://www.open-mesh.org/projects/batman-adv/wiki/Gateways
uci set batman-adv.bat0.gw_mode=client
uci set network.lan.proto=dhcp
uci set network.lan.ipaddr=
uci set network.lan.netmask=
uci set network.lan.dns=
uci set network.lan.gateway=
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 network.mesh1=interface
uci set network.mesh1.ifname=wlan1
uci set network.mesh1.proto=none
uci set network.mesh1.mtu=1528
## Radio 0, canal 11 (radio primaria o interna)
uci set wireless.radio0=wifi-device
uci set wireless.radio0.channel=11
uci set wireless.radio0.disabled=0
uci set wireless.radio0.phy=phy0
uci set wireless.radio0.macaddr=
## Radio 1, canal 1 (radio secundaria o USB externa)
uci set wireless.radio1=wifi-device
uci set wireless.radio1.type=mac80211
uci set wireless.radio1.hwmode=11ng
uci set wireless.radio1.htmode=HT20
uci set wireless.radio1.beacon_int=58594
uci set wireless.radio1.channel=1
uci set wireless.radio1.disabled=0
uci set wireless.radio1.phy=phy1
uci set wireless.radio1.macaddr=
## Radio 0:
## AP abierto con ssid de subzona local
## AP WPA para gestión del nodo
## MANET 0 de la nube grande
uci set wireless.@wifi-iface[0].device=radio0
uci set wireless.@wifi-iface[0].encryption=none
uci set wireless.@wifi-iface[0].network=lan
uci set wireless.@wifi-iface[0].mode=ap
uci set wireless.@wifi-iface[0].ssid=jardibotanic.guifi.net
uci set wireless.@wifi-iface[1].device=radio0
uci set wireless.@wifi-iface[1].encryption=psk2
uci set wireless.@wifi-iface[1].key="24PGJb0eYPdfE"
uci set wireless.@wifi-iface[1].mode=ap
## El essid del AP en WPA para gestión del nodo
## se puede setear aquí, de no hacerlo tendrá
## la mac.wpa por defecto
#uci set wireless.@wifi-iface[1].ssid=90f652c34a42.gfi
uci set wireless.@wifi-iface[2].device=radio0
uci set wireless.@wifi-iface[2].encryption=none
uci set wireless.@wifi-iface[2].network=mesh0
uci set wireless.@wifi-iface[2].mode=adhoc
uci set wireless.@wifi-iface[2].bssid=BE:FA:C0:BE:FA:C0
uci set wireless.@wifi-iface[2].ssid=ch11.manet.sants-montjuic.gfi
uci set wireless.@wifi-iface[2].mcast_rate=11000
## Radio 1, sólo MANET 1 de la nube grande
uci set wireless.@wifi-iface[3].device=radio1
uci set wireless.@wifi-iface[3].encryption=none
uci set wireless.@wifi-iface[3].network=mesh1
uci set wireless.@wifi-iface[3].mode=adhoc
uci set wireless.@wifi-iface[3].bssid=BE:FA:C0:BE:FA:C1
uci set wireless.@wifi-iface[3].ssid=ch1.manet.sants-montjuic.gfi
uci set wireless.@wifi-iface[3].mcast_rate=11000
uci commit