fix~
0
luci-app-openmptcprouter/Makefile
Executable file → Normal file
0
luci-app-openmptcprouter/htdocs/luci-static/resources/openmptcprouter/css/wanstatus.css
Executable file → Normal file
0
luci-app-openmptcprouter/htdocs/luci-static/resources/openmptcprouter/images/status-doing.png
Executable file → Normal file
Before Width: | Height: | Size: 536 B After Width: | Height: | Size: 536 B |
0
luci-app-openmptcprouter/htdocs/luci-static/resources/openmptcprouter/images/status-done.png
Executable file → Normal file
Before Width: | Height: | Size: 607 B After Width: | Height: | Size: 607 B |
0
luci-app-openmptcprouter/htdocs/luci-static/resources/openmptcprouter/images/status-error.png
Executable file → Normal file
Before Width: | Height: | Size: 575 B After Width: | Height: | Size: 575 B |
0
luci-app-openmptcprouter/htdocs/luci-static/resources/openmptcprouter/images/status-todo.png
Executable file → Normal file
Before Width: | Height: | Size: 536 B After Width: | Height: | Size: 536 B |
0
luci-app-openmptcprouter/htdocs/luci-static/resources/openmptcprouter/images/status-warn.png
Executable file → Normal file
Before Width: | Height: | Size: 544 B After Width: | Height: | Size: 544 B |
0
luci-app-openmptcprouter/htdocs/luci-static/resources/openmptcprouter/images/statusError.png
Executable file → Normal file
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
0
luci-app-openmptcprouter/htdocs/luci-static/resources/openmptcprouter/images/statusOK.png
Executable file → Normal file
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
0
luci-app-openmptcprouter/htdocs/luci-static/resources/openmptcprouter/images/statusWarning.png
Executable file → Normal file
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
0
luci-app-openmptcprouter/htdocs/luci-static/resources/spinner.gif
Executable file → Normal file
Before Width: | Height: | Size: 5.4 KiB After Width: | Height: | Size: 5.4 KiB |
0
luci-app-openmptcprouter/luasrc/controller/openmptcprouter.lua
Executable file → Normal file
0
luci-app-openmptcprouter/luasrc/view/openmptcprouter/backup.htm
Executable file → Normal file
0
luci-app-openmptcprouter/luasrc/view/openmptcprouter/debug.htm
Executable file → Normal file
0
luci-app-openmptcprouter/luasrc/view/openmptcprouter/settings.htm
Executable file → Normal file
0
luci-app-openmptcprouter/luasrc/view/openmptcprouter/wanstatus.htm
Executable file → Normal file
0
luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm
Executable file → Normal file
0
luci-app-openmptcprouter/po/de/openmptcprouter.po
Executable file → Normal file
0
luci-app-openmptcprouter/po/de/openmptcprouter.po~
Executable file → Normal file
0
luci-app-openmptcprouter/po/fr/openmptcprouter.po
Executable file → Normal file
0
luci-app-openmptcprouter/po/fr/openmptcprouter.po~
Executable file → Normal file
0
luci-app-openmptcprouter/po/it/openmptcprouter.po
Executable file → Normal file
0
luci-app-openmptcprouter/po/it/openmptcprouter.po~
Executable file → Normal file
0
luci-app-openmptcprouter/po/oc/openmptcprouter.po
Executable file → Normal file
0
luci-app-openmptcprouter/po/oc/openmptcprouter.po~
Executable file → Normal file
0
luci-app-openmptcprouter/po/templates/openmptcprouter.pot
Executable file → Normal file
0
luci-app-openmptcprouter/po/zh_Hans/openmptcprouter.po
Executable file → Normal file
0
luci-app-openmptcprouter/po/zh_Hans/openmptcprouter.po~
Executable file → Normal file
|
@ -6,13 +6,11 @@ timeout 1 mmcli -L | while read MODEM; do
|
|||
MODEM_ID=$(echo $MODEM | awk -F' ' '{print $1}' | awk -F/ '{print $6}')
|
||||
MODEM_INFO="$(timeout 1 mmcli -m $MODEM_ID --output-keyvalue)"
|
||||
if [ -n "$MODEM_INFO" ] && [ "$(echo "$MODEM_INFO" | grep 'modem.generic.device ' | awk -F": " '{print $2}')" = "$MODEM_INTF" ]; then
|
||||
PERCENT=$(echo "$MODEM_INFO" | grep 'modem.generic.signal-quality.value ' | awk -F": " '{print $2}')
|
||||
[ -z "$PERCENT" ] && PERCENT=$(awk -v n="$(mmcli -m $MODEM_ID --command 'AT+CSQ')" 'BEGIN{ print int(n*10) }')
|
||||
OPERATOR=$(echo "$MODEM_INFO" | grep 'modem.3gpp.operator-name ' | awk -F": " '{print $2}')
|
||||
[ -z "$OPERATOR" ] && OPERATOR=$(mmcli -m $MODEM_ID --command 'AT+QSPN' | awk -F[\"\"] '{ print $2 }')
|
||||
NUMBER=$(echo "$MODEM_INFO" | grep 'modem.generic.own-numbders.value[1]' | awk -F": " '{print $2}')
|
||||
STATE=$(echo "$MODEM_INFO" | grep 'modem.generic.state ' | awk -F": " '{print $2}')
|
||||
TYPE=$(echo "$MODEM_INFO" | grep 'modem.generic.access-technologies.value\[1\]' | awk -F": " '{print $2}')
|
||||
PERCENT=$(echo "$MODEM_INFO" | grep -m 1 'modem.generic.signal-quality.value ' | awk -F": " '{print $2}')
|
||||
OPERATOR=$(echo "$MODEM_INFO" | grep -m 1 'modem.3gpp.operator-name ' | awk -F": " '{print $2}')
|
||||
NUMBER=$(echo "$MODEM_INFO" | grep -m 1 'modem.generic.own-numbders.value[1]' | awk -F": " '{print $2}')
|
||||
STATE=$(echo "$MODEM_INFO" | grep -m 1 'modem.generic.state ' | awk -F": " '{print $2}')
|
||||
TYPE=$(echo "$MODEM_INFO" | grep -m 1 'modem.generic.access-technologies.value\[1\]' | awk -F": " '{print $2}')
|
||||
[ -z "$INFO" ] && echo $PERCENT
|
||||
[ "$INFO" = "all" ] && echo "$PERCENT;$OPERATOR;$NUMBER;$STATE;$TYPE"
|
||||
exit
|
||||
|
|