openwrt/package/network/utils
Thomas Richard 2eda042d55 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-08 12:29:24 +02:00
..
adb-enablemodem Move enablemodem from ramips to new package adb-enablemodem and make it used also by TL-MR6400 2017-05-27 07:54:40 +02:00
arptables treewide: switch git.netfilter.org to HTTPS 2017-10-08 21:10:36 +03:00
bpftools bpftools: update to v5.11.16, simplify make 2021-04-24 12:21:40 +01:00
comgt comgt: add new script to send ussd request and get the answer 2020-07-08 16:07:05 +02:00
dante dante: Fix compile with glibc 2020-04-18 21:06:45 +02:00
ebtables ebtables: update to latest git 2018-06-27 2018-07-02 17:33:55 +02:00
ethtool ethtool: update to version 5.10 2020-12-26 20:39:25 +01:00
iproute2 iproute2: avoid unneeded compiles to speed building 2021-04-22 15:11:36 +01:00
ipset build: reorder more BuildPackages lines to deal with ABI_VERSION 2021-02-16 11:29:38 +01:00
iptables build: reorder more BuildPackages lines to deal with ABI_VERSION 2021-02-16 11:29:38 +01:00
iw mac80211: backport upstream patches for driver disconnect 2021-03-15 14:05:43 +01:00
iwcap iwcap: fix handling kill signal during dump 2017-03-14 13:29:03 +01:00
iwinfo iwinfo: update to latest Git HEAD 2021-05-02 02:40:20 +02:00
layerscape/restool layerscape: make restool depend on TARGET_layerscape_armv8_64b 2020-11-12 17:18:26 +01:00
linux-atm linux-atm: Include linux/sockios.h for SIOCGSTAMP 2020-04-09 00:12:46 +02:00
ltq-dsl-base ltq-dsl-base: Make package nonshared to fix image builder 2021-05-04 22:25:47 +02:00
nftables nftables: Activate link time optimization (LTO) 2020-09-06 20:30:18 +02:00
resolveip network/utils/resolveip: drop Build/Prepare rule in favor of default one 2016-10-15 11:36:52 +02:00
rssileds rssileds: use new application led trigger backend 2021-03-05 00:10:06 -10:00
tcpdump tcpdump: fix pcap-config issues 2020-12-22 18:59:10 +01:00
umbim umbim: move package to 'WWAN' submenu 2020-02-24 23:27:50 +01:00
uqmi uqmi: fix network registration loop 2021-05-08 12:29:24 +02:00
wireguard-tools wireguard-tools: depend on kmod-wireguard 2021-02-26 20:41:01 +01:00
wireless-tools build: reorder more BuildPackages lines to deal with ABI_VERSION 2021-02-16 11:29:38 +01:00
wpan-tools wpan-tools: clean up Makefile 2019-04-06 19:14:06 +02:00
wwan wwan: replace backticks by $(...) 2020-05-13 19:01:23 +02:00