immortalwrt/package
Thomas Richard 942f1d2aed uqmi: fix network registration loop
With some debug in qmi.sh using following patch, some errors are visible
in the registration step
@@ -29,6 +29,7 @@ proto_qmi_init_config() {
 }

 proto_qmi_setup() {
+       set -x
        local interface="$1"
        local dataformat connstat plmn_mode mcc mnc
        local device apn auth username password pincode delay modes pdptype
@@ -224,6 +225,8 @@ proto_qmi_setup() {
                fi
        done

+       registration=$(uqmi -s -d "$device" --get-serving-system)
+
        [ -n "$modes" ] && uqmi -s -d "$device" --set-network-modes "$modes" > /dev/null 2>&1

        echo "Starting network $interface"

During the boot of the system, modem could not start automatically its
network registration.
netifd: wan (9235): + echo 'Waiting for network registration'
netifd: wan (9235): Waiting for network registration
netifd: wan (9235): + local 'registration_timeout=0'
netifd: wan (9235): + uqmi -s -d /dev/cdc-wdm1 --get-serving-system
netifd: wan (9235): + grep '"searching"'
netifd: wan (9235): + uqmi -s -d /dev/cdc-wdm1 --get-serving-system
netifd: wan (9235): + registration='{"registration":"not_registered","plmn_mcc":208,"plmn_mnc":20,"plmn_description":"","roaming":true}'
netifd: wan (9235): + '[' -n  ]
netifd: wan (9235): + echo 'Starting network wan'

As the while loop checks only "searching" pattern, uqmi.sh script quits
searching loop and continues whereas the modem is not registered

Other issue, after X seconds modem stops searching.
netifd: wan (9213): + uqmi -s -d /dev/cdc-wdm0 --get-serving-system
netifd: wan (9213): + grep '"searching"'
netifd: wan (9213): + '[' -e /dev/cdc-wdm0 ]
netifd: wan (9213): + '[' 3 -lt 0 -o 0 '=' 0 ]
netifd: wan (9213): + let registration_timeout++
netifd: wan (9213): + sleep 1
netifd: wan (9213): + uqmi -s -d /dev/cdc-wdm0 --get-serving-system
netifd: wan (9213): + grep '"searching"'
netifd: wan (9213): + uqmi -s -d /dev/cdc-wdm0 --get-serving-system
netifd: wan (9213): + registration='{"registration":"not_registered"}'
netifd: wan (9213): + '[' -n  ]
netifd: wan (9213): + echo 'Starting network wan'
netifd: wan (9213): Starting network wan

If registration_timeout is not expired, registration can be restarted

Signed-off-by: Thomas Richard <thomas.richard@kontron.com>
Tested-by: Florian Eckert <fe@dev.tdt.de>
2021-05-09 00:37:14 +08:00
..
base-files base-files: fix status display command 2021-04-04 12:10:30 +08:00
boot sunxi: nanopi-r1s-h5: remove non-existent usb node 2021-05-02 23:22:02 +08:00
ctcgfw phicomm-k3screenctrl: move to packages feed 2021-03-31 23:56:27 +08:00
devel valgrind: Fix compile problem with MIPS soft float 2021-04-12 20:21:28 +08:00
firmware cypress-firmware:remove outdate firmwares 2021-04-25 23:18:21 +08:00
kernel Revert "kernel: video: add multimedia-input driver" 2021-05-09 00:33:56 +08:00
lean luci-app-ssr-plus: add vless gRPC support 2021-05-07 17:32:48 +08:00
libs libsemanage: fix pkgconfig paths 2021-04-15 23:18:53 +08:00
network uqmi: fix network registration loop 2021-05-09 00:37:14 +08:00
system zram-swap: bail out early if the kernel doesn't support swap 2021-04-04 12:18:54 +08:00
utils busybox: backport fix for CVE-2021-28831 2021-05-05 12:00:30 +08:00
Makefile build: store SourceDateEpoch in manifest 2020-09-01 17:31:29 +08:00