echo "mbim[$$]" "Reading capabilities"
umbim $DBG -n -d $device caps || {
echo "mbim[$$]" "Failed to read modem caps"
+ tid=$((tid + 1))
+ umbim $DBG -t $tid -d "$device" disconnect
proto_notify_error "$interface" PIN_FAILED
return 1
}
echo "mbim[$$]" "Sending pin"
umbim $DBG -n -t $tid -d $device unlock "$pincode" || {
echo "mbim[$$]" "Unable to verify PIN"
+ tid=$((tid + 1))
+ umbim $DBG -t $tid -d "$device" disconnect
proto_notify_error "$interface" PIN_FAILED
proto_block_restart "$interface"
return 1
echo "mbim[$$]" "Checking pin"
umbim $DBG -n -t $tid -d $device pinstate || {
echo "mbim[$$]" "PIN required"
+ tid=$((tid + 1))
+ umbim $DBG -t $tid -d "$device" disconnect
proto_notify_error "$interface" PIN_FAILED
proto_block_restart "$interface"
return 1
echo "mbim[$$]" "Checking subscriber"
umbim $DBG -n -t $tid -d $device subscriber || {
echo "mbim[$$]" "Subscriber init failed"
+ tid=$((tid + 1))
+ umbim $DBG -t $tid -d "$device" disconnect
proto_notify_error "$interface" NO_SUBSCRIBER
return 1
}
echo "mbim[$$]" "Register with network"
umbim $DBG -n -t $tid -d $device registration || {
echo "mbim[$$]" "Subscriber registration failed"
+ tid=$((tid + 1))
+ umbim $DBG -t $tid -d "$device" disconnect
proto_notify_error "$interface" NO_REGISTRATION
return 1
}
echo "mbim[$$]" "Attach to network"
umbim $DBG -n -t $tid -d $device attach || {
echo "mbim[$$]" "Failed to attach to network"
+ tid=$((tid + 1))
+ umbim $DBG -t $tid -d "$device" disconnect
proto_notify_error "$interface" ATTACH_FAILED
return 1
}
echo "mbim[$$]" "Stopping network"
[ -n "$tid" ] && {
- umbim $DBG -t$tid -d "$device" disconnect
+ umbim $DBG -t $tid -d "$device" disconnect
uci_revert_state network $interface tid
}