Skip to content

Commit

Permalink
Script update for EG18-EA & EM12-G
Browse files Browse the repository at this point in the history
  • Loading branch information
4IceG authored Oct 21, 2023
1 parent b0a687d commit 01f62d1
Show file tree
Hide file tree
Showing 4 changed files with 129 additions and 395 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.57-20231008
PKG_VERSION:=1.0.58-20231021

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

Expand Down
18 changes: 8 additions & 10 deletions luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/3ginfo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -246,23 +246,21 @@ else
fi

# COPS numeric
COPS=""
COPS_MCC=""
COPS_MNC=""
COPS_NUM=$(echo "$O" | awk -F[\"] '/^\+COPS: .,2/ {print $2}')
if [ "x$COPS_NUM" = "x" ]; then
COPS_NUM=""
COPS_MCC=""
COPS_MNC=""
else
if [ -n "$COPS_NUM" ]; then
COPS_MCC=${COPS_NUM:0:3}
COPS_MNC=${COPS_NUM:3:3}
COPS=$(awk -F[\;] '/'$COPS_NUM'/ {print $2}' $RES/mccmnc.dat)
fi
[ "x$COPS" = "x" ] && COPS=$COPS_NUM

if [ -z "$FORCE_PLMN" ]; then
# COPS alphanumeric
T=$(echo "$O" | awk -F[\"] '/^\+COPS: .,0/ {print $2}')
[ "x$T" != "x" ] && COPS="$T"
COPS=$(echo "$O" | awk -F[\"] '/^\+COPS: .,0/ {print $2}')
else
[ -n "$COPS_NUM" ] && COPS=$(awk -F[\;] '/^'$COPS_NUM';/ {print $2}' $RES/mccmnc.dat)
fi
[ -z "$COPS" ] && COPS=$COPS_NUM

COPZ=$(echo $COPS | sed ':s;s/\(\<\S*\>\)\(.*\)\<\1\>/\1\2/g;ts')
COPS=$(echo $COPZ | awk '{for(i=1;i<=NF;i++){ $i=toupper(substr($i,1,1)) substr($i,2) }}1')
Expand Down
16 changes: 8 additions & 8 deletions luci-app-3ginfo-lite/root/usr/share/3ginfo-lite/mccmnc.dat
Original file line number Diff line number Diff line change
Expand Up @@ -1117,19 +1117,19 @@
26009;Lycamobile
26016;Mobyland
26036;Mundio Mobile Sp. z o.o.
26007;Play/P4
26007;Play
26011;NORDISK Polska
26005;Orange;PTK Centertel;Orange PL
26003;Orange;PTK Centertel;Orange PL
26005;Orange
26003;Orange
26035;PKP Polskie Linie Kolejowe S.A.
26098;Play/P4
26006;Play/P4
26001;Polkomtel/Plus
26098;Play
26006;Play
26001;Plus
26014;Sferia
26013;Sferia
26010;Sferia
26034;T-Mobile/ERA
26002;T-Mobile/ERA
26034;T-Mobile
26002;T-Mobile
26004;Aero2
26015;Aero2
26045;Virgin Mobile
Expand Down
Loading

0 comments on commit 01f62d1

Please # to comment.