Re: How to save pin number and auto-connect on startup?



Hi Dan, hi Marcel

>> I went through all my 3G cards yesterday morning and built up a
>> spreadsheet of what identifying information we can get before the PIN is
>> unlocked.  Remember, the PIN is specific to the *SIM* itself, not to the
>> phone.
>>
>> The result is that no modem allows access to the IMSI (the SIM's unique
>> ID) before the PIN is entered, which is expected, though unfortunate.
>> Most modems allow access to the IMEI of the card with the exception of
>> some ZTE, Ericsson, and Huawei devices.
>>
>> With a combination of AT+GSN, ATI, AT+GMR, and AT+GMM, we should be able
>> to build up a "device identifier" in ModemManager that NM/nm-applet can
>> use to save the PIN, retrieve the PIN using that ID, and automatically
>> unlock the device when it's plugged in.
>>
>> The downside of this is that you'll need to re-enter your PIN if you
>> move the SIM card between devices, or if you flash the firmware of your
>> device.  But I think that's rare enough that it's acceptable.  Does that
>> sound like an acceptable approach?
> 
> I think this is the wrong approach. You mentioned yourself that the PIN
> is bound to the SIM. And unless you base this of the ICCID you should
> not be allowing storing of a PIN based on modem specific features. The
> only exception would be if the SIM card is physically integrated into
> the device. However this is only done for M2M devices anyway and not for
> normal desktop devices.
> 
> Keep in mind that if entering the PIN wrongly you potentially have to
> then also deal with the PUK. Not everybody has the PUK remembered or
> quickly available. So potentially you can render a modem broken. Even if
> it is might be for a limited period of time, it is still something you
> don't wanna burden the user with.
> 
> And the PIN is meant to be entered by the user. It is not meant to be
> entered automatically. If you want that, then disable the PIN all
> together.
> 
> Regards
> 
> Marcel

In my case the above approach would be working as I only use the build in modem
in my laptop with the same SIM card/same PIN. If I would switch the SIM to a
different device or flash firmware and would only have to enter the PIN the
first time after the switch this would be more than ok!

On the other side Marcel is right, if someone changes the PIN but NM tries
previous PIN for example. Or has two (equal) devices with different SIM/PIN, the
user would end up with at least one PIN try nearer to the blocked SIM.

So may there could be implemented two options:
1) User can select "Always ask me later" when he not use those features (signal
   strength, SMS, location-based services, etc.).
2) User can select "Always use this PIN / Save PIN" with a warning that this
   auto PIN feature can block the SIM when the saved PIN doesn't match the
   needed PIN. With this option user can use those features (signal strength
   etc.) but doesn't have to enter the PIN after each boot. This can be
   combined with the AT commands, if the device is the same, use the saved PIN.
   NM notices if the device changes and doesn't use the saved PIN in this case.
   There has to be a option in the settings to remove the saved PIN.

If user doesn't select one of the above two options will get asked for the PIN
like it is now.

As to those AT commands above:
The AT+GSN gives an ERROR, ATI and AT+GMM return F3507g and the AT+GMR returns
R1B/1.
I have an Ericsson F3507g build in into my Thinkpad T60. As this modem is not on
the white list of the T60 BIOS I have to use a hacked BIOS and a tapped pin 20
to use it. The tapped pin 20 prevents the BIOS to shutdown/disable the modem
which may breaks something in the device communication (for example it is never
set to S3) like serial number retrieval but I can use it to dialup (what I
want). This setup with hacked bios and/or tapped pin 20 is not that uncommon in
the thinkpad world. This only as a background info why the AT+GSN commands may
not work on my setup.

And saved PIN vs. disabled PIN:
I want to have a PIN on my SIM to have a bit of security when my laptop/SIM gets
stolen. In NM the PIN can be saved (like it is already in NM by saved
connection) and automatically entered. This is no problem as my laptop is locked
by a password. So I have a PIN locked SIM and PW locked laptop when it gets
stolen but a saved/auto PIN in NM for dialing on the other side.


best regards
Achim




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]