--- /usr/bin/mbim-network 2017-03-30 22:11:52.000000000 +0200 +++ bin/mbim-network 2017-06-01 11:23:57.841229000 +0200 @@ -70,7 +70,11 @@ echo " in the profile:" echo " PROXY=yes" echo - echo " 7) Once the mbim-network script reports a successful connection" + echo " 7) If your SIM card is PIN locked, you can supply the pin" + echo " like this in the profile" + echo " PIN=1234" + echo + echo " 8) Once the mbim-network script reports a successful connection" echo " you still need to run a DHCP client on the associated WWAN network" echo " interface." echo @@ -191,6 +195,13 @@ else echo " mbim-proxy: no" fi + + if [ -n "$PIN" ]; then + echo " PIN: $PIN" + else + echo " PIN: unset" + fi + else echo "Profile at '$PROFILE_FILE' not found..." fi @@ -255,6 +266,13 @@ clear_state fi + if [ -n "$PIN" ]; then + UNLOCK_SIM_CMD="mbimcli -d $DEVICE --enter-pin=$PIN --no-close $PROXY_OPT" + echo "Unlocking SIM card with PIN code '$UNLOCK_SIM_CMD'..." + UNLOCK_SIM_OUT=`$UNLOCK_SIM_CMD` + echo $UNLOCK_SIM_OUT + fi + SUBSCRIBER_READY_CMD="mbimcli -d $DEVICE --query-subscriber-ready-status --no-close $PROXY_OPT" echo "Querying subscriber ready status '$SUBSCRIBER_READY_CMD'..."