mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Try to add signal from 3g proto
This commit is contained in:
parent
d2c9d4643b
commit
64ed54b14e
3 changed files with 20 additions and 0 deletions
10
luci-app-openmptcprouter/root/bin/omr-3g
Executable file
10
luci-app-openmptcprouter/root/bin/omr-3g
Executable file
|
@ -0,0 +1,10 @@
|
|||
#!/bin/sh
|
||||
MODEM_INTF=$1
|
||||
[ -z "$MODEM_INTF" ] && return
|
||||
SIGNAL_INFO=$(gcom info -d $MODEM_INTF)
|
||||
[ -z "$SIGNAL_INFO" ] && return
|
||||
RSSI=$(echo $SIGNAL_INFO | grep RSSI | awk -F: '{print $2}')
|
||||
[ -z "$RSSI" ] && return
|
||||
ASU=$(((RSSI + 113) / 2 ))
|
||||
PERCENT=$((((ASU - 0) * 100) / ( 91 - 0 )))
|
||||
echo $PERCENT
|
Loading…
Add table
Add a link
Reference in a new issue