From 977cd261bcd6ad3fb45b47695a5ca0d7aa88bef4 Mon Sep 17 00:00:00 2001 From: Tarun Reddy Date: Sun, 17 Mar 2024 07:19:46 -0600 Subject: [PATCH] Fixed SA band aggregation Parsing failed with more than one band used in SA mode. This does not allow for more than 3 bands in NSA or 2 bands in SA. Relevant for better towers and better rm521 modems. --- simpleadmin/scripts/modemstatus_parse.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/simpleadmin/scripts/modemstatus_parse.sh b/simpleadmin/scripts/modemstatus_parse.sh index 8a06b8b..e6e5581 100644 --- a/simpleadmin/scripts/modemstatus_parse.sh +++ b/simpleadmin/scripts/modemstatus_parse.sh @@ -42,7 +42,7 @@ get_secondary_bands() { 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 @@ -516,4 +516,4 @@ MODEZ=$(echo $MODE | tr -d '"') } > /tmp/signal.txt # Pregenerate JSON File -/usrdata/simpleadmin/scripts/tojson.sh /tmp/signal.txt > /tmp/modemstatus.json \ No newline at end of file +/usrdata/simpleadmin/scripts/tojson.sh /tmp/signal.txt > /tmp/modemstatus.json