Skip to content

Commit

Permalink
Update to version 1.0.61-20240102
Browse files Browse the repository at this point in the history
  • Loading branch information
4IceG authored Jan 2, 2024
1 parent b258e40 commit 28acaf3
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 10 deletions.
4 changes: 2 additions & 2 deletions luci-app-3ginfo-lite/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright 2021-2023 Rafał Wabik - IceG - From eko.one.pl forum
# Copyright 2021-2024 Rafał Wabik - IceG - From eko.one.pl forum
#
# Licensed to the GNU General Public License v3.0.
#
Expand All @@ -12,7 +12,7 @@ MAINTAINER:=Rafał Wabik <[email protected]>
LUCI_DESCRIPTION:=LuCI JS interface for the 3ginfo-lite. The package allows you to view the parameters of the mobile internet connection.
LUCI_DEPENDS:=+sms-tool +comgt +kmod-usb-serial-option
LUCI_PKGARCH:=all
PKG_VERSION:=1.0.60-20231204
PKG_VERSION:=1.0.61-20240102

include $(TOPDIR)/feeds/luci/luci.mk

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
'require tools.widgets as widgets'

/*
Copyright 2021-2023 Rafał Wabik - IceG - From eko.one.pl forum
Copyright 2021-2024 Rafał Wabik - IceG - From eko.one.pl forum
Licensed to the GNU General Public License v3.0.
*/
Expand All @@ -16,7 +16,7 @@ return view.extend({
load: function() {
return fs.list('/dev').then(function(devs) {
return devs.filter(function(dev) {
return dev.name.match(/^ttyUSB/) || dev.name.match(/^cdc-wdm/) || dev.name.match(/^ttyACM/) || dev.name.match(/^mhi_/);
return dev.name.match(/^ttyUSB/) || dev.name.match(/^cdc-wdm/) || dev.name.match(/^ttyACM/) || dev.name.match(/^mhi_/) || dev.name.match(/^wwan/);
});
});
},
Expand All @@ -27,13 +27,23 @@ return view.extend({

s = m.section(form.TypedSection, '3ginfo', '', null);
s.anonymous = true;


/* Old config
o = s.option(widgets.DeviceSelect, 'network', _('Interface'),
_('Network interface for Internet access.')
);
o.noaliases = false;
o.default = 'wan';
o.rmempty = false;
*/

o = s.option(widgets.NetworkSelect, 'network', _('Interface'),
_('Network interface for Internet access.')
);
o.exclude = s.section;
o.nocreate = true;
o.rmempty = false;
o.default = 'wan';

o = s.option(form.Value, 'device',
_('IP adress / Port for communication with the modem'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
'require ui';

/*
Copyright 2021-2023 Rafał Wabik - IceG - From eko.one.pl forum
Copyright 2021-2024 Rafał Wabik - IceG - From eko.one.pl forum
Licensed to the GNU General Public License v3.0.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
'require tools.widgets as widgets';

/*
Copyright 2021-2023 Rafał Wabik - IceG - From eko.one.pl forum
Copyright 2021-2024 Rafał Wabik - IceG - From eko.one.pl forum
Licensed to the GNU General Public License v3.0.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ if [ "x$MODE_NUM" = "x7" ]; then
T=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $14}')
TAC_DEC=$(printf "%d" "0x$T")
TAC_HEX=$T
T=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $18}' | awk '{printf "%.1f\n", 0.2*$1*10 - 20}')
T=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $18}' | awk '{printf "%.0f\n", 0.2*$1*10 - 20}')
SINR=$T
T=$(echo "$O" | awk -F[,:] '/^\+QENG:/ {print $12}')
case $T in
Expand Down Expand Up @@ -197,7 +197,7 @@ if [ "x$MODE_NUM" = "x13" ]; then
TAC_DEC=$(printf "%d" "0x$T")
TAC_HEX=$T

T=$(echo "$LINE" | awk -F[,:] '/^\+QENG:/ {print $16}' | awk '{printf "%.1f\n", 0.2*$1*10 - 20}')
T=$(echo "$LINE" | awk -F[,:] '/^\+QENG:/ {print $16}' | awk '{printf "%.0f\n", 0.2*$1*10 - 20}')
SINR=$T
T=$(echo "$LINE" | awk -F[,:] '/^\+QENG:/ {print $10}')
case $T in
Expand Down Expand Up @@ -347,7 +347,7 @@ if [ -n "$T" ]; then
*) T4="";;
esac
T5=$(echo "$LINE" | awk -F[,:] '/^\+QCAINFO: "(scc|SCC)"/{print $3}')
[ -n "$T5" ] && addon $((POS + 4)) "(S${IDX}) EARFCN" "$T5"
[ -n "$T5" ] && #addon $((POS + 4)) "(S${IDX}) EARFCN" "$T5"

This comment has been minimized.

Copy link
@ptpt52

ptpt52 Jan 4, 2024

typo here?

This comment has been minimized.

Copy link
@4IceG

4IceG Jan 4, 2024

Author Owner

Not really a typo, my change deleted some value?

if [ "x$MODE_NUM" = "x11" ]; then
T5=$(echo "$LINE" | awk -F[,:] '/^\+QCAINFO: "(scc|SCC)"/{print $7}')
if [ -n "$T5" ] && [ "$T5" != "-" ]; then
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ if [ -n "$T" ]; then
else
S2BAND="$(band $T)"
fi
MODE="${MODE/LTE/LTE_A} / $(band $T)"
fi

T=$(echo "$O" | awk '/^SCC3 info:/ {print $5}')
Expand All @@ -64,6 +65,7 @@ if [ -n "$T" ]; then
else
S3BAND="$(band $T)"
fi
MODE="${MODE/LTE/LTE_A} / $(band $T)"
fi

T=$(echo "$O" | awk '/^SCC4 info:/ {print $5}')
Expand All @@ -76,6 +78,7 @@ if [ -n "$T" ]; then
else
S4BAND="$(band $T)"
fi
MODE="${MODE/LTE/LTE_A} / $(band $T)"
fi

MODE=$(echo $MODE | sed 's,/,+,' | sed 's,LTE_A,LTE-A | ,')
Expand Down

0 comments on commit 28acaf3

Please sign in to comment.