Please note: Friday June 18 is a holiday celebrating Juneteenth, please allow extra time for your order to arrive and plan accordingly.
0

Unlocking SIM with PIN always fails, but works on test Examp
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Unlocking SIM with PIN always fails, but works on test Examp

by hulehule20 on Tue Jan 05, 2021 9:48 am

Hello!
I am building a project with the FONA 808 board connected to the Pro Trinket. I have been able to wire it correctly and connect to the FONA, and I can see that the FONA starts up and connects correctly to the Trinket because I am connecting a USB console cable from my PC to the Trinket's Tx and Rx to get some "feedback" from the microcontroller.

The issue is that I am not able to unlock the SIM using the PIN code that the carrier provided me. I am using the library function provided as used in other examples, like this:
Code: Select all | TOGGLE FULL SIZE
if (! fona.unlockSIM("0473")) {
      Serial.println(F("La SIM no s'ha pogut desbloquejar correctament :("));
      configError();
} else {
      Serial.println(F("El PIN és correcte!"));
}

It always falls to the error case. However, when loading the FONAtest example to the trinket and unlocking it with the commands provided, typing the PIN code on the Serial interface it works! This is so strange and I don't have any idea where the problem could be, as the code used in one case and the other is almost the same, the only difference being that in one case the PIN code is read from the Serial and the other is hardcoded as a char[].

Do you have any hints on where the problem could be?

hulehule20
 
Posts: 1
Joined: Mon Apr 29, 2013 12:09 pm

Please be positive and constructive with your questions and comments.