From 8ba01af38480bc15bd99bf93bb907b414c2cfaed Mon Sep 17 00:00:00 2001 From: dr-dolomite Date: Sat, 16 Mar 2024 20:38:35 +0800 Subject: [PATCH] changed PCI to show both 4G and 5G when using NSA --- simpleadmin/scripts/modemstatus_parse.sh | 6 +++++- simpleadmin/www/index.html | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/simpleadmin/scripts/modemstatus_parse.sh b/simpleadmin/scripts/modemstatus_parse.sh index f458b88..8a06b8b 100644 --- a/simpleadmin/scripts/modemstatus_parse.sh +++ b/simpleadmin/scripts/modemstatus_parse.sh @@ -52,6 +52,9 @@ get_secondary_bands() { # Set SC_BANDS to the non-empty variable or empty if both are empty SC_BANDS="${SCC_BANDS}${NR_BAND}" fi + + # Get the PCI value. For example: 264 based on this +QCAINFO: "PCC",1775,75,"LTE BAND 3",1,264,-103,-13,-71,0 + MAIN_PCI=$(echo "$OX" | grep '+QCAINFO: "PCC"' | grep -o ',[0-9]\{1,5\},' | tr -d ',') } # Get the modem model from /tmp/modemmodel.txt and parse it @@ -219,7 +222,8 @@ case $RAT in echo "0" > /tmp/modnetwork if [ -n "$QENG5" ]; then QENG5=$QENG5",," - PCI=$(echo $QENG5 | cut -d, -f4) + # Append the initial PCI value rather than overwriting it + PCI="$PCI, "$(echo $QENG5 | cut -d, -f4) SCHV=$(echo $QENG5 | cut -d, -f8) SLBV=$(echo $QENG5 | cut -d, -f9) # Now correctly captures the NR band BW=$(echo $QENG5 | cut -d, -f10) # Now gets the correct BW diff --git a/simpleadmin/www/index.html b/simpleadmin/www/index.html index 701f9c9..0283347 100644 --- a/simpleadmin/www/index.html +++ b/simpleadmin/www/index.html @@ -204,7 +204,7 @@ - PCI + 4G PCI, 5G PCI