umbim: explicitly check for PIN1 state
authorMartin Schiller <ms@dev.tdt.de>
Fri, 7 Feb 2020 11:41:59 +0000 (12:41 +0100)
committerChristian Lamparter <chunkeey@gmail.com>
Mon, 27 Dec 2021 12:51:41 +0000 (13:51 +0100)
PIN2 is used only to restrict changing of fixed dialling feature,
does not affect network registration. Therefore explicitly check for
PIN1 state during connection setup, which is required for network
registration.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
[Updated commit description]
Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
package/network/utils/umbim/files/lib/netifd/proto/mbim.sh

index db716c3dbf0b38283b191c1f480158cd17e4b263..a33759cd6d93092e3724c0e9448181d7900d4ce5 100755 (executable)
@@ -86,7 +86,8 @@ _proto_mbim_setup() {
        tid=$((tid + 1))
 
        echo "mbim[$$]" "Checking pin"
-       umbim $DBG -n -t $tid -d $device pinstate || {
+       umbim $DBG -n -t $tid -d $device pinstate
+       [ $? -eq 2 ] && {
                echo "mbim[$$]" "PIN required"
                tid=$((tid + 1))
                umbim $DBG -t $tid -d "$device" disconnect