-
-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
169 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
106 changes: 106 additions & 0 deletions
106
luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/3ginfo-addon/11999071
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
# Sierra Wireless EM7455 | ||
|
||
O=$(sms_tool -d $DEVICE at "at!gstatus?") | ||
|
||
T=$(echo "$O" | awk '/^LTE band:/ {print $3}' | xargs) | ||
if [ -n "$T" ]; then | ||
case "$T" in | ||
*"B1") MODE=$(band 1 "LTE ");; | ||
*"B2") MODE=$(band 2 "LTE ");; | ||
*"B3") MODE=$(band 3 "LTE ");; | ||
*"B4") MODE=$(band 4 "LTE ");; | ||
*"B5") MODE=$(band 5 "LTE ");; | ||
*"B7") MODE=$(band 7 "LTE ");; | ||
*"B8") MODE=$(band 8 "LTE ");; | ||
*"B12") MODE=$(band 12 "LTE ");; | ||
*"B13") MODE=$(band 13 "LTE ");; | ||
*"B20") MODE=$(band 20 "LTE ");; | ||
*"B25") MODE=$(band 25 "LTE ");; | ||
*"B26") MODE=$(band 26 "LTE ");; | ||
*"B29") MODE=$(band 29 "LTE ");; | ||
*"B30") MODE=$(band 30 "LTE ");; | ||
*"B41") MODE=$(band 41 "LTE ");; | ||
*) MODE="$T";; | ||
esac | ||
fi | ||
|
||
T=$(echo "$O" | awk -F: '/^LTE CA state:.*ACTIVE/ {print $3}' | xargs) | ||
if [ -n "$T" ]; then | ||
case $T in | ||
*"B1") MODE=$(band 1 "LTE ");; | ||
*"B2") MODE=$(band 2 "LTE ");; | ||
*"B3") MODE=$(band 3 "LTE ");; | ||
*"B4") MODE=$(band 4 "LTE ");; | ||
*"B5") MODE=$(band 5 "LTE ");; | ||
*"B7") MODE=$(band 7 "LTE ");; | ||
*"B8") MODE=$(band 8 "LTE ");; | ||
*"B12") MODE=$(band 12 "LTE ");; | ||
*"B13") MODE=$(band 13 "LTE ");; | ||
*"B20") MODE=$(band 20 "LTE ");; | ||
*"B25") MODE=$(band 25 "LTE ");; | ||
*"B26") MODE=$(band 26 "LTE ");; | ||
*"B29") MODE=$(band 29 "LTE ");; | ||
*"B30") MODE=$(band 30 "LTE ");; | ||
*"B41") MODE=$(band 41 "LTE ");; | ||
*) MODE="$MODE / "${T:-$MODE};; | ||
esac | ||
|
||
SPACEOFF=$(echo $MODE | tr -d '"') | ||
MAIN=$(echo $SPACEOFF | cut -d "/" -f 1) | ||
PLUS=$(echo $SPACEOFF | cut -d "/" -f 2) | ||
MAINCUT=$(echo $MAIN | sed 's/LTE //g') | ||
PLUSCUT=$(echo $PLUS | sed 's/LTE //g') | ||
PLUSVIEW=$(echo $PLUSCUT | sed 's/[0-9] /&\/ /g') | ||
MODE="LTE-A | $MAINCUT + "$PLUSVIEW | ||
|
||
fi | ||
|
||
T=$(echo "$O" | awk '/^PCC.*RSSI/ {print $4}' | xargs) | ||
if [ -n "$T" ]; then | ||
RSSI="'${T// //}' dBm" | ||
[ -n "$ADDON" ] && ADDON="$ADDON," | ||
ADDON="$ADDON"'{"RSSI":"'${T// //}' dBm"}' | ||
fi | ||
T=$(echo "$O" | awk '/RSRP/ {print $7}' | xargs) | ||
if [ -n "$T" ]; then | ||
RSRP="'${T// //}' dBm" | ||
[ -n "$ADDON" ] && ADDON="$ADDON," | ||
ADDON="$ADDON"'{"RSRP":"'${T// //}' dBm"}' | ||
fi | ||
T=$(echo "$O" | awk '/^RSRQ/ {print $3}' | xargs) | ||
if [ -n "$T" ]; then | ||
RSRQ="'$T' dB" | ||
[ -n "$ADDON" ] && ADDON="$ADDON," | ||
ADDON="$ADDON"'{"RSRQ":"'$T' dB"}' | ||
fi | ||
T=$(echo "$O" | awk '/^SINR/ {print $3}' | xargs) | ||
if [ -n "$T" ]; then | ||
SINR="'$T' dB" | ||
[ -n "$ADDON" ] && ADDON="$ADDON," | ||
ADDON="$ADDON"'{"SINR":"'$T' dB"}' | ||
fi | ||
|
||
T=$(echo "$O" | awk -F: '/Temperature:/ {print $3}' | xargs) | ||
if [ -n "$T" ]; then | ||
TEMP="$T °C" | ||
[ -n "$ADDON" ] && ADDON="$ADDON," | ||
ADDON="$ADDON"'{"Temperatura":"'$T' °C"}' | ||
fi | ||
|
||
# Modem | ||
|
||
|
||
# Protocol | ||
# DRIVER=QMI_WWAN & DRIVER=CDC_MBIM & DRIVER=CDC_ETHER | ||
PV=$(cat /sys/kernel/debug/usb/devices) | ||
PVCUT=$(echo $PV | awk -F 'Vendor=1199 ProdID=9071' '{print $2}' | cut -c-1100) | ||
if echo "$PVCUT" | grep -q "Driver=qmi_wwan" | ||
then | ||
PROTO="QMI" | ||
elif echo "$PVCUT" | grep -q "Driver=cdc_mbim" | ||
then | ||
PROTO="MBIM" | ||
elif echo "$PVCUT" | grep -q "Driver=cdc_ether" | ||
then | ||
PROTO="ECM" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters