Skip to main content
added more info to code
Source Link
gillesC
  • 111
  • 5

Problem:

I'm working with a GPRS module (the same as in the Arduino GSMShield). In some cases the PUK code is requested, and the PIN is thus locked. For this I wrote some code (which can be seen under "Software"). This code is based on the documentation of "GSM PIN Management". The only problem is that the module is telling us that both the PIN & PUK code is locked. The tutorials, however, does not provide an example how we should resolve this issue from the Arduino itself.

EDIT: When the SIM card is inserted in a smartphone. The PUK code is requested. When the PUK code is provided (and a new PIN) the SIM card is back to normal. But adding the PUK code via the GSM lib. doesn't really work, in contrast to using a smartphone to unlock the PIN code.

Question:

  • Does anybody have an idea how to resolve this issue? And if it can be done?

Hardware:

  • Atmega328p
  • Quectel M95 (as GPRS module)

Software:

PINManager.begin();
int pin_query = PINManager.isPIN();
Serial.print(F("Pin Query is: ")); //output: -2
Serial.println(pin_query);
if(pin_query == -1)
{
  #ifdef DEBUG
    Serial.println(F("PUK is requested"));
  #endif 

  if(PINManager.checkPUK(PUK_NUMBER, PIN_NUMBER_CORRECT) == 0)
  {
    PINManager.setPINUsed(true); // I also think this must by "false". Both things were tested, none of them worked.

  }
}

Problem:

I'm working with a GPRS module (the same as in the Arduino GSMShield). In some cases the PUK code is requested, and the PIN is thus locked. For this I wrote some code (which can be seen under "Software"). This code is based on the documentation of "GSM PIN Management". The only problem is that the module is telling us that both the PIN & PUK code is locked. The tutorials, however, does not provide an example how we should resolve this issue from the Arduino itself.

Question:

  • Does anybody have an idea how to resolve this issue? And if it can be done?

Hardware:

  • Atmega328p
  • Quectel M95 (as GPRS module)

Software:

PINManager.begin();
int pin_query = PINManager.isPIN();
Serial.print(F("Pin Query is: ")); //output: -2
Serial.println(pin_query);
if(pin_query == -1)
{
  #ifdef DEBUG
    Serial.println(F("PUK is requested"));
  #endif 

  if(PINManager.checkPUK(PUK_NUMBER, PIN_NUMBER_CORRECT) == 0)
  {
    PINManager.setPINUsed(true);
  }
}

Problem:

I'm working with a GPRS module (the same as in the Arduino GSMShield). In some cases the PUK code is requested, and the PIN is thus locked. For this I wrote some code (which can be seen under "Software"). This code is based on the documentation of "GSM PIN Management". The only problem is that the module is telling us that both the PIN & PUK code is locked. The tutorials, however, does not provide an example how we should resolve this issue from the Arduino itself.

EDIT: When the SIM card is inserted in a smartphone. The PUK code is requested. When the PUK code is provided (and a new PIN) the SIM card is back to normal. But adding the PUK code via the GSM lib. doesn't really work, in contrast to using a smartphone to unlock the PIN code.

Question:

  • Does anybody have an idea how to resolve this issue? And if it can be done?

Hardware:

  • Atmega328p
  • Quectel M95 (as GPRS module)

Software:

PINManager.begin();
int pin_query = PINManager.isPIN();
Serial.print(F("Pin Query is: ")); //output: -2
Serial.println(pin_query);
if(pin_query == -1)
{
  #ifdef DEBUG
    Serial.println(F("PUK is requested"));
  #endif 

  if(PINManager.checkPUK(PUK_NUMBER, PIN_NUMBER_CORRECT) == 0)
  {
    PINManager.setPINUsed(true); // I also think this must by "false". Both things were tested, none of them worked.

  }
}
Source Link
gillesC
  • 111
  • 5

Input PUK code, when requested

Problem:

I'm working with a GPRS module (the same as in the Arduino GSMShield). In some cases the PUK code is requested, and the PIN is thus locked. For this I wrote some code (which can be seen under "Software"). This code is based on the documentation of "GSM PIN Management". The only problem is that the module is telling us that both the PIN & PUK code is locked. The tutorials, however, does not provide an example how we should resolve this issue from the Arduino itself.

Question:

  • Does anybody have an idea how to resolve this issue? And if it can be done?

Hardware:

  • Atmega328p
  • Quectel M95 (as GPRS module)

Software:

PINManager.begin();
int pin_query = PINManager.isPIN();
Serial.print(F("Pin Query is: ")); //output: -2
Serial.println(pin_query);
if(pin_query == -1)
{
  #ifdef DEBUG
    Serial.println(F("PUK is requested"));
  #endif 

  if(PINManager.checkPUK(PUK_NUMBER, PIN_NUMBER_CORRECT) == 0)
  {
    PINManager.setPINUsed(true);
  }
}