From a9ee733090fd23b10454b70ea3ab7f8a35e9e37d Mon Sep 17 00:00:00 2001 From: Jason Hawks Date: Mon, 13 Nov 2023 19:58:00 -0500 Subject: [PATCH 1/2] New Bat Test --- root/easymesh/easymesh.sh | 40 ++++++++++++++++++++++++--------------- 1 file changed, 25 insertions(+), 15 deletions(-) diff --git a/root/easymesh/easymesh.sh b/root/easymesh/easymesh.sh index ece9d54..2199da1 100644 --- a/root/easymesh/easymesh.sh +++ b/root/easymesh/easymesh.sh @@ -73,9 +73,19 @@ create_bat0() { echo "Old bat0 interface deleted from lan network." fi - # Add 'bat0' to the list of ports for 'br-lan' - uci add_list network.@device[0].ports='bat0' - echo "bat0 has been added to the lan network." + # # Add 'bat0' to the list of ports for 'br-lan' + # uci add_list network.@device[0].ports='bat0' + # echo "bat0 has been added to the lan network." + + # Get the LAN bridge name + LAN_NAME=$(uci -q get network.@device[0].name) + + # Setup our Private Router Batman Interface + uci set network.private_router_batman=interface + uci set network.private_router_batman.proto='batadv_hardif' + uci set network.private_router_batman.master='bat0' + uci set network.private_router_batman.device="$LAN_NAME" + uci set network.private_router_batman.mtu='1536' uci commit network fi @@ -126,18 +136,18 @@ setup_mesh_radio() { # Commit changes to wireless uci commit wireless - uci set network.nwi_mesh_$CURRENT_RADIO=interface - uci set network.nwi_mesh_$CURRENT_RADIO.proto='batadv_hardif' - uci set network.nwi_mesh_$CURRENT_RADIO.master='bat0' - uci set network.nwi_mesh_$CURRENT_RADIO.device='bat0' - uci set network.nwi_mesh_$CURRENT_RADIO.mtu='1536' + # uci set network.nwi_mesh_$CURRENT_RADIO=interface + # uci set network.nwi_mesh_$CURRENT_RADIO.proto='batadv_hardif' + # uci set network.nwi_mesh_$CURRENT_RADIO.master='bat0' + # uci set network.nwi_mesh_$CURRENT_RADIO.device='bat0' + # uci set network.nwi_mesh_$CURRENT_RADIO.mtu='1536' - uci set wireless.mesh_$CURRENT_RADIO=wifi-iface - uci set wireless.mesh_$CURRENT_RADIO.device=$CURRENT_RADIO - uci set wireless.mesh_$CURRENT_RADIO.ifname=mesh_$CURRENT_RADIO - uci set wireless.mesh_$CURRENT_RADIO.network=nwi_mesh_$CURRENT_RADIO + uci set wireless.mesh_$CURRENT_RADIO='wifi-iface' + uci set wireless.mesh_$CURRENT_RADIO.device="$CURRENT_RADIO" + uci set wireless.mesh_$CURRENT_RADIO.ifname="mesh_$CURRENT_RADIO" + uci set wireless.mesh_$CURRENT_RADIO.network='private_router_batman' uci set wireless.mesh_$CURRENT_RADIO.mode='mesh' - uci set wireless.mesh_$CURRENT_RADIO.mesh_id=$MESH_NAME + uci set wireless.mesh_$CURRENT_RADIO.mesh_id="$MESH_NAME" uci set wireless.mesh_$CURRENT_RADIO.mesh_fwding='0' uci set wireless.mesh_$CURRENT_RADIO.mesh_rssi_threshold='0' uci set wireless.mesh_$CURRENT_RADIO.mesh_ttl='1' @@ -288,8 +298,8 @@ disable_easymesh() { # Loop through all the radios and delete the network interfaces for CURRENT_RADIO in $WIFI_RADIOS; do echo "Handling removal of mesh networks for: $CURRENT_RADIO" - if [ "$(uci -q get network.nwi_mesh_$CURRENT_RADIO)" = "interface" ]; then - uci del network.nwi_mesh_$CURRENT_RADIO + if [ "$(uci -q get network.private_router_batman)" = "interface" ]; then + uci del network.private_router_batman uci commit network fi done From ed801e2a371784ee2a6f3169a4422b7f3691f764 Mon Sep 17 00:00:00 2001 From: Jason Hawks Date: Mon, 13 Nov 2023 19:58:40 -0500 Subject: [PATCH 2/2] Makefile bump --- Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Makefile b/Makefile index d9686b4..e4c6658 100755 --- a/Makefile +++ b/Makefile @@ -7,8 +7,7 @@ include $(TOPDIR)/rules.mk LUCI_TITLE:=LuCI Support for easymesh LUCI_DEPENDS:= +kmod-cfg80211 +batctl-default +kmod-batman-adv +dawn +bash -PKG_VERSION:=2.8.5 -PKG_RELEASE:=1 +PKG_VERSION:=2.8.6 include $(TOPDIR)/feeds/luci/luci.mk