From 0ce9b05ef3b9a752ac1267af9e03af328634da41 Mon Sep 17 00:00:00 2001 From: dr-dolomite Date: Sun, 17 Mar 2024 21:40:09 +0800 Subject: [PATCH] fixed NR_BAND where it includes the PCC when 2 SA NRBANDS were detected --- simpleadmin/scripts/modemstatus_parse.sh | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/simpleadmin/scripts/modemstatus_parse.sh b/simpleadmin/scripts/modemstatus_parse.sh index 8a06b8b..e323006 100644 --- a/simpleadmin/scripts/modemstatus_parse.sh +++ b/simpleadmin/scripts/modemstatus_parse.sh @@ -36,13 +36,13 @@ nr_bw() { esac } -# Function to get the secondary LTE bands +# Function to get the secondary LTE & NR5G bands get_secondary_bands() { # Extract LTE BANDs from SCC lines SCC_BANDS=$(echo "$OX" | grep '+QCAINFO: "SCC"' | grep -o '"LTE BAND [0-9]\+"' | tr -d '"' | sed '1d') # Extract NR5G BANDs from SCC lines - NR_BAND=$(echo "$OX" | grep '+QCAINFO: "SCC"' | grep -o '"NR5G BAND [0-9]\+"' | tr -d '"') + NR_BAND=$(echo "$OX" | grep '+QCAINFO: "SCC"' | grep -o '"NR5G BAND [0-9]\+"' | tr -d '"' | sed '1d') # Check if both SCC and NR bands are non-empty if [ -n "$SCC_BANDS" ] && [ -n "$NR_BAND" ]; then @@ -52,9 +52,6 @@ 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