-
-
Notifications
You must be signed in to change notification settings - Fork 23
mmrs: sim pin/puk operations #404
Copy link
Copy link
Open
Labels
featureNew feature or requestNew feature or requestmmrsmodemmanager bindings cratemodemmanager bindings cratesimsim card and pin operationssim card and pin operations
Metadata
Metadata
Assignees
Labels
featureNew feature or requestNew feature or requestmmrsmodemmanager bindings cratemodemmanager bindings cratesimsim card and pin operationssim card and pin operations
implement sim card pin/puk unlock and management.
lock state detection
check
Modem.StateforLockedstate, then queryModem.UnlockRequiredto determine lock type:MM_MODEM_LOCK_SIM_PIN— needs pinMM_MODEM_LOCK_SIM_PUK— needs puk + new pinMM_MODEM_LOCK_SIM_PIN2,MM_MODEM_LOCK_SIM_PUK2— secondary pin/pukapi
error handling
map mm errors to typed variants:
ModemError::WrongPinModemError::PinRequiredModemError::PukRequiredModemError::NoSimretry tracking
Sim.UnlockRetriesproperty gives remaining attempts before lockout. surface this in error messages or as a query method.