Trouble accessing SIM card with MRK GSM 1400

Hello.

I received yesterday my brand new Arduino MKR GSM 1400 and started playing around with today.

However, I'm having trouble stablishing the connection with the SIM card. I'm using the "ReceiveSMS" example from the MKRGSM library (code below), but the execution is getting stuck at the gsmAccess.begin(PINNUMBER) command.

Using AT commands and the debug mode, I got the following description for the error message:

AT+CPIN?
+CME ERROR: SIM not inserted

I have tried connecting with 3 different SIM cards, all tested beforehand with a smartphone and confirmed to be functional. I have tried removing the PIN, but still got the same error.

Here are some pictures displaying how I'm handling the SIM card insertion.

pic1 pic2
pic4 pic3

Does anybody have any idea on what could be going wrong?

Thanks in advance

Code:

// include the GSM library
#include <MKRGSM.h>

#include "arduino_secrets.h" 
// Please enter your sensitive data in the Secret tab or arduino_secrets.h
// PIN Number
const char PINNUMBER[] = SECRET_PINNUMBER;

// initialize the library instances
GSM gsmAccess;
GSM_SMS sms;

// Array to hold the number a SMS is retreived from
char senderNumber[20];

void setup() {
  // initialize serial communications and wait for port to open:
  Serial.begin(9600);
  while (!Serial) {
    ; // wait for serial port to connect. Needed for native USB port only
  }

  Serial.println("SMS Messages Receiver");

  // connection state
  bool connected = false;

  // Start GSM connection
  while (!connected) {
    if (gsmAccess.begin(PINNUMBER) == GSM_READY) {
      connected = true;
    } else {
      Serial.println("Not connected");
      delay(1000);
    }
  }

  Serial.println("GSM initialized");
  Serial.println("Waiting for messages");
}

The insertion is correct. Strange. Can you post the whole AT console log?

Insert your sim card and run the

  1. GsmScanNetworks and
  2. TestModem
    sketches in the IDE for your board. These will show if your board connects to the carrier networks around you and also show if your board's modem is functional.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.