🌴 Sync 2026-03-05 23:51:42

This commit is contained in:
github-actions[bot] committed 2026-03-05 23:51:42 +08:00
1 parent 97c049ed0a
commit 0acff03804
14253 files changed
+3893239

No files matched your search

@@ -0,0 +1,6 @@
config modemband
option iface 'wan'
option wanrestart '0'
option modemrestart '0'
option notify '0'
@@ -0,0 +1,11 @@
#!/bin/sh
# Copyright 2022 Rafał Wabik (IceG) - From eko.one.pl forum
# MIT License
BANDZ=$(modemband.sh getbands)
WORKBANDZ=$(echo $BANDZ | tr " " ,)
if [ $WORKBANDZ != null ]; then
uci set modemband.@modemband[0].set_bands=$WORKBANDZ
uci commit modemband
fi
@@ -0,0 +1,9 @@
#!/bin/sh
# Copyright 2020-2023 Rafał Wabik (IceG) - From eko.one.pl forum
# MIT License
chmod +x /usr/bin/modemband.sh 2>&1 &
chmod +x /usr/bin/loaded.sh 2>&1 &
rm -rf /tmp/luci-indexcache 2>&1 &
rm -rf /tmp/luci-modulecache/ 2>&1 &
exit 0
+44
View File
@@ -0,0 +1,44 @@
#!/bin/sh
#
# Copyright 2022-2023 Rafał Wabik (IceG) - From eko.one.pl forum
#
# MIT License
#
RES="/usr/share/modemband"
# modem type
getmodem() {
MDM=$(uci -q get modemband.@modemband[0].modemid)
if [ "${MDM}" == "" ]; then
_DEVS=$(awk '/Vendor=/{gsub(/.*Vendor=| ProdID=| Rev.*/,"");print}' /sys/kernel/debug/usb/devices | sort -u)
for _DEV in $_DEVS; do
if [ -e "$RES/$_DEV" ]; then
echo "$_DEV"
break
fi
done
else
echo "$MDM"
fi
}
case $1 in
"json")
. /usr/share/libubox/jshn.sh
json_init
json_add_string modem "$(getmodem)"
json_add_array
json_close_array
json_dump
;;
esac
exit 0
@@ -0,0 +1,70 @@
{
"admin/modem": {
"title": "Modem",
"order": 30,
"action": {
"type": "firstchild",
"recurse": true
}
},
"admin/modem/luci-app-modemband": {
"title": "Preferred LTE/5G Bands",
"order": 10,
"action": {
"type": "alias",
"path": "admin/modem/luci-app-modemband/blte"
},
"depends": {
"acl": [ "luci-app-modemband" ],
"uci": { "modemband": true }
}
},
"admin/modem/luci-app-modemband/blte": {
"title": "Preferred LTE bands",
"order": 10,
"action": {
"type": "view",
"path": "modem/blte"
}
},
"admin/modem/luci-app-modemband/b5gsa": {
"title": "Preferred 5G SA bands",
"order": 20,
"action": {
"type": "view",
"path": "modem/b5gsa"
}
},
"admin/modem/luci-app-modemband/b5gnsa": {
"title": "Preferred 5G NSA bands",
"order": 30,
"action": {
"type": "view",
"path": "modem/b5gnsa"
}
},
"admin/modem/luci-app-modemband/blteconfig": {
"title": "Configuration",
"order": 40,
"action": {
"type": "view",
"path": "modem/blteconfig"
}
},
"admin/modem/luci-app-modemband/blteedit": {
"title": "Modem settings template",
"order": 50,
"action": {
"type": "view",
"path": "modem/blteedit"
}
}
}
@@ -0,0 +1,14 @@
let $d = $env("DEVICE")
if $d = "" goto timeout
open com $d
set com 115200n81
set senddelay 0.05
waitquiet 2 0.5
send "AT^m"
waitfor 2 "OK" "+CME ERROR"
if % = -1 goto timeout
exit 0
:timeout
exit 1
@@ -0,0 +1,25 @@
{
"luci-app-modemband": {
"description": "Grant access to LuCI app modemband",
"read": {
"cgi-io": [ "exec" ],
"file": {
"/usr/bin/modemband.sh": [ "exec" ],
"/usr/bin/loaded.sh": [ "exec" ],
"/usr/bin/sms_tool": [ "exec" ],
"/etc/modemband": [ "read" ],
"/usr/share/modemband": [ "read" ],
"/usr/share/modemband/*": [ "read" ]
},
"uci": [ "modemband", "luci-app-modemband" ]
},
"write": {
"file": {
"/etc/modemband": [ "write" ],
"/usr/share/modemband/*": [ "write" ]
},
"uci": [ "modemband", "luci-app-modemband" ]
}
}
}