Skip to content

Commit

Permalink
Up to 1.0.69-20240427
Browse files Browse the repository at this point in the history
I updated huawei hilink script to the current look of the package
  • Loading branch information
4IceG authored Apr 27, 2024
1 parent 5b31626 commit 36793d5
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 17 deletions.
2 changes: 1 addition & 1 deletion luci-app-3ginfo-lite/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ MAINTAINER:=Rafał Wabik <4Rafal@gmail.com>
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.68-20240422
PKG_VERSION:=1.0.69-20240427

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -932,7 +932,7 @@ simDialog: baseclass.extend({
'class': 'ifacebadge',
'title': null,
'id': 'simv',
'style': 'visibility: hidden; max-width:3em; display: inline-block;',
'style': 'visibility: hidden; margin:0 auto; padding: 4px;',
'click': ui.createHandlerFn(this, function() {
return upSIMDialog.show();
}),
Expand All @@ -942,7 +942,7 @@ simDialog: baseclass.extend({
E('div', { 'class': 'cbi-tooltip-container' }, [
E('img', {
'src': L.resource('icons/sim1m.png'),
'style': 'width:24px; height:auto; padding: 0px',
'style': 'width:24px; height:auto; padding: 1%; margin:0 auto;',
'title': _(''),
'class': 'middle',
}),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,16 @@ PV=$(cat /sys/kernel/debug/usb/devices)
PVCUT=$(echo $PV | awk -F 'Vendor=12d1 ProdID=' '{print $2}' | cut -c-1108)
if echo "$PVCUT" | grep -q "Driver=qmi_wwan"
then
PROTO="QMI"
PROTO="qmi"
elif echo "$PVCUT" | grep -q "Driver=cdc_mbim"
then
PROTO="MBIM"
PROTO="mbim"
elif echo "$PVCUT" | grep -q "Driver=cdc_ether"
then
PROTO="ECM"
PROTO="ecm"
elif echo "$PVCUT" | grep -q "Driver=huawei_cdc_ncm"
then
PROTO="NCM"
PROTO="ncm"
fi

RSSI=$(getvalue device-signal rssi)
Expand Down Expand Up @@ -159,6 +159,16 @@ if [ -n "$FW" ]; then
FW="$rev / $FW"
fi

if [ -z "$FW" ]
then
FW='-'
fi

if [ -z "$TEMP" ]
then
TEMP='-'
fi

COPSA=$(getvaluen net-current-plmn Numeric)
COPSB=$(echo "${COPSA}" | cut -c1-3)
COPSC=$(echo -n $COPSA | tail -c 2)
Expand All @@ -167,9 +177,12 @@ COPS_MNC="$COPSC"

COPS=$(getvalue net-current-plmn ShortName)

if [[ -n "$COPS" ]]; then
COPS=$(awk -F[\;] '/^'$COPS';/ {print $3}' $RES/mccmnc.dat)
LOC=$(awk -F[\;] '/^'$COPS';/ {print $2}' $RES/mccmnc.dat)
if [[ $COPSA =~ ^[0-9]+$ ]]; then
if [ -z "$COPS" ]
then
COPS=$(awk -F[\;] '/^'$COPSA';/ {print $3}' $RES/mccmnc.dat | xargs)
fi
LOC=$(awk -F[\;] '/^'$COPSA';/ {print $2}' $RES/mccmnc.dat)
fi

# operator location from temporary config
Expand All @@ -179,15 +192,27 @@ if [ -e "$LOCATIONFILE" ]; then
LOC=$(cat $LOCATIONFILE)
if [ -n "$LOC" ]; then
LOC=$(cat $LOCATIONFILE)
else
echo "-" > /tmp/location
if [[ $LOC == "-" ]]; then
rm $LOCATIONFILE
LOC=$(awk -F[\;] '/^'$COPSA';/ {print $2}' $RES/mccmnc.dat)
if [ -n "$LOC" ]; then
echo "$LOC" > /tmp/location
fi
else
LOC=$(awk -F[\;] '/^'$COPSA';/ {print $2}' $RES/mccmnc.dat)
if [ -n "$LOC" ]; then
echo "$LOC" > /tmp/location
fi
fi
fi
else
LOC=$(awk -F[\;] '/^'$COPS_NUM';/ {print $2}' $RES/mccmnc.dat)
if [ -n "$LOC" ]; then
echo "$LOC" > /tmp/location
else
echo "-" > /tmp/location
if [[ "$COPS_MCC$COPS_MNC" =~ ^[0-9]+$ ]]; then
if [ -n "$LOC" ]; then
LOC=$(awk -F[\;] '/^'$COPS_MCC$COPS_MNC';/ {print $2}' $RES/mccmnc.dat)
echo "$LOC" > /tmp/location
else
echo "-" > /tmp/location
fi
fi
fi

Expand All @@ -213,6 +238,11 @@ then
CID_HEX='-'
fi

if [ -z "$CID_DEC" ]
then
[ -n "$CID_HEX" ] && CID_DEC=$(echo $((0x$CID_HEX)))
fi

rm $cookie
break

0 comments on commit 36793d5

Please # to comment.