mirror of
https://github.com/kenzok8/small-package
synced 2025-01-07 07:06:58 +08:00
update-10.15
This commit is contained in:
parent
85cddafbfa
commit
b632f612d6
@ -5,8 +5,8 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
LUCI_TITLE:=LuCI Support for easymesh
|
||||
LUCI_DEPENDS:= +kmod-cfg80211 +batctl-default +kmod-batman-adv +wpad-openssl
|
||||
PKG_VERSION:=1.5
|
||||
LUCI_DEPENDS:= +kmod-cfg80211 +batctl-default +kmod-batman-adv +wpad-openssl +dawn
|
||||
PKG_VERSION:=1.7
|
||||
|
||||
include $(TOPDIR)/feeds/luci/luci.mk
|
||||
|
||||
|
@ -1,2 +1,10 @@
|
||||
# luci-app-easymesh
|
||||
水平有限写了基于kmod-batman-adv+802.11s 有线+无线回程的mesh luci设置插件。写的很烂暂时能用,我会个锤子shell
|
||||
水平有限写了基于kmod-batman-adv+802.11s 有线+无线回程的mesh luci设置插件。
|
||||
|
||||
新增ap设置让设置更加方便。
|
||||
|
||||
新增KVR设置并添加dawn依赖在ap之间切换延迟明显降低。
|
||||
|
||||
插件只对https://github.com/coolsnowwolf/lede lean版openwrt做了测试 其他源码出现问题请自行解决。
|
||||
|
||||
写的很烂暂时能用
|
||||
|
@ -67,6 +67,26 @@ o = s:option(Value, "key", translate("Key"))
|
||||
o.default = "easymesh"
|
||||
o:depends("encryption", 1)
|
||||
|
||||
---- kvr
|
||||
enable = s:option(Flag, "kvr", translate("K/V/R"), translate(""))
|
||||
enable.default = 1
|
||||
enable.rmempty = false
|
||||
|
||||
o = s:option(Value, "mobility_domain", translate("Mobility Domain"), translate("4-character hexadecimal ID"))
|
||||
o.default = "4f57"
|
||||
o.datatype = "and(hexstring,rangelength(4,4))"
|
||||
o:depends("kvr", 1)
|
||||
|
||||
o = s:option(Value, "rssi_val", translate("Threshold for an good RSSI"))
|
||||
o.default = "-60"
|
||||
o.atatype = "range(-1,-120)"
|
||||
o:depends("kvr", 1)
|
||||
|
||||
o = s:option(Value, "low_rssi_val", translate("Threshold for an bad RSSI"))
|
||||
o.default = "-88"
|
||||
o.atatype = "range(-1,-120)"
|
||||
o:depends("kvr", 1)
|
||||
|
||||
---- ap_mode
|
||||
enable = s:option(Flag, "ap_mode", translate("AP MODE Enable"), translate("Enable or disable AP MODE"))
|
||||
enable.default = 0
|
||||
|
@ -20,6 +20,10 @@ apRadio=$(uci get easymesh.config.apRadio 2>/dev/null)
|
||||
mesh0_apRadio=$(uci get wireless.mesh0.device 2>/dev/null)
|
||||
encryption=$(uci get easymesh.config.encryption 2>/dev/null)
|
||||
key=$(uci get easymesh.config.key 2>/dev/null)
|
||||
kvr=$(uci get easymesh.config.kvr 2>/dev/null)
|
||||
mobility_domain=$(uci get easymesh.config.mobility_domain 2>/dev/null)
|
||||
rssi_val=$(uci get easymesh.config.rssi_val 2>/dev/null)
|
||||
low_rssi_val=$(uci get easymesh.config.low_rssi_val 2>/dev/null)
|
||||
|
||||
ap_mode_stop(){
|
||||
if [ "$ap_gateway" = "$ap_gateway1" ]; then
|
||||
@ -38,6 +42,18 @@ ap_mode_stop(){
|
||||
fi
|
||||
}
|
||||
|
||||
kvr_stop(){
|
||||
for wifi-iface in $(uci -X show wireless | grep wifi-iface | awk -F'[=]' '{print $1}'); do
|
||||
if [ "${wifi-device}" != "wireless.mesh0" ]; then
|
||||
uci delete ${wifi-device}.ieee80211k
|
||||
uci delete ${wifi-device}.ieee80211v
|
||||
uci delete ${wifi-device}.ieee80211r
|
||||
uci commit network
|
||||
fi
|
||||
done
|
||||
/etc/init.d/dawn stop && /etc/init.d/dawn disable
|
||||
fi
|
||||
|
||||
start(){
|
||||
if [ "$enable" == 1 ]; then
|
||||
if [ "$mesh_bat0" != "interface" ]; then
|
||||
@ -98,6 +114,30 @@ start(){
|
||||
uci set wireless.mesh0.key=$key
|
||||
uci commit wireless
|
||||
fi
|
||||
|
||||
if [ "$kvr" = 1 ]; then
|
||||
for wifi-iface in $(uci -X show wireless | grep wifi-iface | awk -F'[=]' '{print $1}'); do
|
||||
if [ "${wifi-device}" != "wireless.mesh0" ]; then
|
||||
uci set ${wifi-device}.ieee80211k='1'
|
||||
uci set ${wifi-device}.rrm_neighbor_report='1'
|
||||
uci set ${wifi-device}.rrm_beacon_report='1'
|
||||
uci set ${wifi-device}.ieee80211v='1'
|
||||
uci set ${wifi-device}.bss_transition='1'
|
||||
uci set ${wifi-device}.ieee80211r='1'
|
||||
uci set ${wifi-device}.encryption='psk-mixed'
|
||||
uci set ${wifi-device}.mobility_domain=$mobility_domain
|
||||
uci set ${wifi-device}.ft_over_ds='1'
|
||||
uci commit network
|
||||
|
||||
uci set dawn.@metric[0].rssi_val=$rssi_val
|
||||
uci set dawn.@metric[0].low_rssi_val=$low_rssi_val
|
||||
uci commit dawn
|
||||
fi
|
||||
done
|
||||
/etc/init.d/dawn enable && /etc/init.d/dawn start
|
||||
else
|
||||
kvr_stop
|
||||
fi
|
||||
|
||||
if [ "$ap_mode" == 1 ]; then
|
||||
if [ "$ap_gateway" != "$gateway" ]; then
|
||||
@ -147,6 +187,8 @@ stop(){
|
||||
if [ "$mesh_mesh0" = "wifi-iface" ]; then
|
||||
uci delete wireless.mesh0
|
||||
uci commit wireless
|
||||
|
||||
kvr_stop
|
||||
fi
|
||||
|
||||
if [ "$ap_mode" == 1 ]; then
|
||||
|
Loading…
Reference in New Issue
Block a user