summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTil Kaiser2025-11-25 10:43:22 +0000
committerHauke Mehrtens2025-11-30 22:49:57 +0000
commit7ff854a197c765bd6922a93c3eada627e2dff987 (patch)
tree2bf833ac687511af8d6f3d1e60ed1de7b95eb601
parent902b25abf38c542cf305e244322bc07edd2ce69c (diff)
downloadopenwrt-7ff854a197c765bd6922a93c3eada627e2dff987.tar.gz
uqmi: skip registration state check if not supported
The Quectel RG255C modem used in the Teltonika RUT976 does not support the 'Get Serving System' QMI command, returning "Invalid QMI command". Without this change, the script would fail even though the connection could be established successfully. This patch skips the registration state check if the command is not supported and relies on subsequent checks instead. Signed-off-by: Til Kaiser <mail@tk154.de> Link: https://github.com/openwrt/openwrt/pull/20933 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
-rwxr-xr-xpackage/network/utils/uqmi/files/lib/netifd/proto/qmi.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh b/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh
index ebce281b80..8297e6b3f0 100755
--- a/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh
+++ b/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh
@@ -270,10 +270,13 @@ proto_qmi_setup() {
echo "Waiting for network registration"
sleep 5
local registration_timeout=0
+ local serving_system=""
local registration_state=""
while true; do
- registration_state=$(uqmi -s -d "$device" -t 1000 --get-serving-system 2>/dev/null | jsonfilter -e "@.registration" 2>/dev/null)
+ serving_system="$(uqmi -s -d "$device" -t 1000 --get-serving-system 2>/dev/null)"
+ registration_state=$(echo "$serving_system" | jsonfilter -e "@.registration" 2>/dev/null)
+ [ "$serving_system" = "\"Invalid QMI command\"" ] && break
[ "$registration_state" = "registered" ] && break
if [ "$registration_state" = "searching" ] || [ "$registration_state" = "not_registered" ]; then