Skip to content

Commit

Permalink
Up to 1.0.8-2021-10-31
Browse files Browse the repository at this point in the history
  • Loading branch information
4IceG authored Oct 31, 2021
1 parent 45b4ef6 commit f4d28a1
Show file tree
Hide file tree
Showing 8 changed files with 169 additions and 56 deletions.
2 changes: 1 addition & 1 deletion luci-app-3ginfo-lite/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ PKG_NAME:=luci-app-3ginfo-lite
LUCI_TITLE:=LuCI panel for 3ginfo-lite
LUCI_PKGARCH:=all
LUCI_DEPENDS:=+sms-tool
PKG_VERSION:=1.0.7-27082021
PKG_VERSION:=1.0.8-2021-10-31
PKG_RELEASE:=1

include $(TOPDIR)/feeds/luci/luci.mk
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ return view.extend({
var m, s, o;
m = new form.Map('3ginfo', _('Configuration 3ginfo-lite'), _('Configuration panel for the 3ginfo-lite application.'));

s = m.section(form.TypedSection, '3ginfo', '<p>&nbsp;</p>', _(''));
s = m.section(form.TypedSection, '3ginfo', '', _(''));
s.anonymous = true;

o = s.option(form.Value, 'network', _('Network'));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ return view.extend({

return E([], [
E('h2', {}, [ _('3ginfo-lite') ]),
E('div', { class: 'cbi-section-descr' }, _('More information about the 3ginfo on the')+ ' <a href="https://eko.one.pl/?p=openwrt-3ginfo" target="_blank">' + _('eko.one.pl forum') + '</a>.'),
E('h4', {}, [ _('cat /sys/kernel/debug/usb/devices') ]),
E('div', { 'id': 'content_syslog' }, [
E('pre', {
Expand All @@ -33,13 +34,6 @@ return view.extend({
}, [ dlines.join('\n') ])
]),

E('div', { 'class': 'left',}, [
E('p', _('')),
E('div', { 'class': 'ifacebadge',}, [
E('a', { href: 'https://eko.one.pl/forum/viewtopic.php?pid=240837#p240837' },'e1')
])
])

]);
},

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ return view.extend({
});
return E([], [
E('h2', {}, [ _('3ginfo-lite') ]),
E('div', { class: 'cbi-section-descr' }, _('More information about the 3ginfo on the')+ ' <a href="https://eko.one.pl/?p=openwrt-3ginfo" target="_blank">' + _('eko.one.pl forum') + '</a>.'),
E('h4', {}, [ _('General Information') ]),
E('table', { 'class': 'table' }, [
E('tr', { 'class': 'tr' }, [
Expand Down Expand Up @@ -301,22 +302,12 @@ return view.extend({
E('div', { 'class': 'td left', 'width': '33%' }, [ _('CID: ')]),
E('div', { 'class': 'td left', 'id': 'cid' }, [ '-' ]),
]),
E('tr', { 'class': 'tr' }, [
E('div', { 'class': 'td left', 'width': '33%' }, [ _('')]),
E('div', { 'class': 'td left' }, ['']),
]),

]),

E('div', { 'class': 'left',}, [
E('div', { 'class': 'ifacebadge',}, [
E('a', { href: 'https://eko.one.pl/forum/viewtopic.php?pid=240837#p240837' },'e1')
])
])

]);
},
handleSaveApply: null,
handleSave: null,
handleReset: null
});
});
6 changes: 6 additions & 0 deletions luci-app-3ginfo-lite/po/pl/3ginfo.po
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ msgstr "Content-Type: text/plain; charset=UTF-8"
msgid "Information about 3G/4G connection"
msgstr "Informacja o statusie połączenia 3G/4G"

msgid "More information about the 3ginfo on the"
msgstr "Więcej informacji o 3ginfo na"

msgid "eko.one.pl forum"
msgstr "forum eko.one.pl"

msgid "Details"
msgstr "Szczegóły"

Expand Down
106 changes: 106 additions & 0 deletions luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/3ginfo-addon/11999071
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 &deg;C"
[ -n "$ADDON" ] && ADDON="$ADDON,"
ADDON="$ADDON"'{"Temperatura":"'$T' &deg;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
Original file line number Diff line number Diff line change
Expand Up @@ -10,30 +10,30 @@ if [ -n "$T" ]; then
fi
T=$(echo "$O" | awk -F[,:] '/^RSRP:/ {print $2}' | xargs)
if [ -n "$T" ]; then
RSRP='$T'
[ -n "$ADDON" ] && ADDON="$ADDON,"
ADDON="$ADDON"'{"RSRP":"'$T' dBm"}'
fi
T=$(echo "$O" | awk -F[,:] '/^RSRQ:/ {print $2}' | xargs)
if [ -n "$T" ]; then
RSRQ='$T'
[ -n "$ADDON" ] && ADDON="$ADDON,"
ADDON="$ADDON"'{"RSRQ":"'$T' dB"}'
fi
T=$(echo "$O" | awk -F[,:] '/^SINR:/ {print $2}' | xargs)
if [ -n "$T" ]; then
RINR='$T'
[ -n "$ADDON" ] && ADDON="$ADDON,"
ADDON="$ADDON"'{"SINR":"'$T' dB"}'
fi
T=$(echo "$O" | awk -F[,:] '/^ACTIVE BAND:/ {print $2}' | xargs)
if [ -n "$T" ]; then
case "$T" in
*"1") MODE=$(band 1 "LTE ");;
*"3") MODE=$(band 3 "LTE ");;
*"7") MODE=$(band 7 "LTE ");;
*"8") MODE=$(band 8 "LTE ");;
*"20") MODE=$(band 20 "LTE ");;
*) MODE="$T";;
esac

if [ "x$MODE" = "xLTE" ]; then
T=$(echo "$O" | awk -F[,:] '/^ACTIVE BAND:/ {print $2}' | xargs)
if [ -n "$T" ]; then
case "$T" in
*"1") MODE=$(band 1 "LTE ");;
*"3") MODE=$(band 3 "LTE ");;
*"7") MODE=$(band 7 "LTE ");;
*"8") MODE=$(band 8 "LTE ");;
*"20") MODE=$(band 20 "LTE ");;
*) MODE="$T";;
esac
fi
fi
Original file line number Diff line number Diff line change
Expand Up @@ -18,44 +18,60 @@ fi
T=$(echo "$O" | awk -F[,:] '/^\+CESQ/ {print $6}' | xargs)
if [ -n "$T" ]; then
if [ "$T" != "255" ]; then
RSRQ="-'$T' dB"
[ -n "$ADDON" ] && ADDON="$ADDON,"
ADDON="$ADDON"'{"RSRQ":"-'$T' dB"}'
fi
fi
T=$(echo "$O" | awk -F[,:] '/^\+CESQ/ {print $7}' | xargs)
if [ -n "$T" ]; then
if [ "$T" != "255" ]; then
RSRP="-'$T' dBm"
[ -n "$ADDON" ] && ADDON="$ADDON,"
ADDON="$ADDON"'{"RSRP":"-'$T' dBm"}'
fi
fi

T=$(echo "$O" | awk -F[,] '/^\+ZCAINFO: /{print $2}')
if [ -n "$T" ]; then
if [ "$T" != "0" ]; then
case $T in
*"1") MODE=$(band 1 "LTE ");;
*"3") MODE=$(band 3 "LTE ");;
*"7") MODE=$(band 7 "LTE ");;
*"8") MODE=$(band 8 "LTE ");;
*"20") MODE=$(band 20 "LTE ");;
*) MODE=${T:-$MODE};;
esac

T=$(echo "$O" | awk -F[,] '/^\+ZCAINFO: /{print $11}')
case "$MODE1" in
7*)
T=$(echo "$O" | awk -F[,] '/^\+ZCAINFO: /{print $2}')
if [ -n "$T" ]; then
if [ "$T" != "0" ]; then
case $T in
*"1") MODE="$MODE / "$(band 1 "");;
*"3") MODE="$MODE / "$(band 3 "");;
*"7") MODE="$MODE / "$(band 7 "");;
*"8") MODE="$MODE / "$(band 8 "");;
*"20") MODE="$MODE / "$(band 20 "");;
*) MODE="$MODE / "${T:-$MODE};;
*"1") MODE=$(band 1 "LTE ");;
*"3") MODE=$(band 3 "LTE ");;
*"7") MODE=$(band 7 "LTE ");;
*"8") MODE=$(band 8 "LTE ");;
*"20") MODE=$(band 20 "LTE ");;
*) MODE=${T:-$MODE};;
esac
fi
fi
fi
fi
;;
9*)
T=$(echo "$O" | awk -F[,] '/^\+ZCAINFO: /{print $2}')
if [ -n "$T" ]; then
if [ "$T" != "0" ]; then
case $T in
*"1") MODE=$(band 1 "LTE ");;
*"3") MODE=$(band 3 "LTE ");;
*"7") MODE=$(band 7 "LTE ");;
*"8") MODE=$(band 8 "LTE ");;
*"20") MODE=$(band 20 "LTE ");;
*) MODE=${T:-$MODE};;
esac
T=$(echo "$O" | awk -F[,] '/^\+ZCAINFO: /{print $11}')
if [ -n "$T" ]; then
if [ "$T" != "0" ]; then
case $T in
*"1") MODE="$MODE / "$(band 1 "");;
*"3") MODE="$MODE / "$(band 3 "");;
*"7") MODE="$MODE / "$(band 7 "");;
*"8") MODE="$MODE / "$(band 8 "");;
*"20") MODE="$MODE / "$(band 20 "");;
*) MODE="$MODE / "${T:-$MODE};;
esac
fi
fi
fi
fi
;;
esac

0 comments on commit f4d28a1

Please sign in to comment.