uqmi: evaluate pin-status output in qmi_setup function
authorFlorian Eckert <fe@dev.tdt.de>
Tue, 10 Apr 2018 10:55:11 +0000 (12:55 +0200)
committerJo-Philipp Wich <jo@mein.io>
Tue, 18 Dec 2018 16:22:06 +0000 (17:22 +0100)
commit4f02bee9bbc77f65920f0a96afe429dc2e973b1d
treea031990c22a2c028c2051e16533f0260d2ab710e
parent5a3810b386040a6424ba2f16c7805eb492002fb8
uqmi: evaluate pin-status output in qmi_setup function

Load the json output from uqmi --get-pin-status command and evaluate the
"pin1_status" value.

The following uqmi "pin1_status" values are evaluated:

- disabled
  Do not verify PIN because SIM verification is disabled on this SIM

- blocked
  Stop qmi_setup because SIM is locked and a PUK is required

- not_verified
  SIM is not yet verified. Do a uqmi --verify-pin1 command if a SIM is
  specified

- verified:
  Do not verify the PIN because this was already done before

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
(backported from 4b80bd878d0fcb520f4811097900ebb5478a74fd)
package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh