fixed NR_BAND where it includes the PCC when 2 SA NRBANDS were detected

This commit is contained in:
dr-dolomite
2024-03-17 21:40:09 +08:00
parent d8c1799789
commit 0ce9b05ef3

View File

@@ -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