GSM1400 SIM/GPRS not Working Using Arduino SIM; IoT Cloud shows device as 'Offline"

I just received my MKR GSM1400 Cellular Kit 3 days ago, I registered the Arduino SIM online and after leaving it for ~36h to activate, I went through process as per the official Arduino guides to update the IDE, install the MKRGSM, ArduinoCloud, and 32-bit SAMD libraries as well as installing the MKR GSM 1400 Board and ArduinoCreateAgent, and I also tried giving external 3.8VDC power via Vin and GND. and if I'm missing something in that list, I promise I've tried everything (including an actual data microUSB cable which I've confirmed working & rebooting). I also tried another computer. (the antenna was plugged in, and reception in my room near the window was good according to my phone, and the SIM was in the correct orientation, CreateAgrent was also running in the background)

arduino_secrets.h was filled out using the following values:
SECRET_PIN: 0000 (I also tried 1234 but it didn't work)
APN: prepay.pelion
Login User: arduino
Login Pass: arduino

First, I tried using uploading the the "offline" IDE with the built in examples from the MKRGSM library, so I tried both GPRS Ping to 'www.google.com' and also the GSM web client example also to 'www.google.com'

The only thing that came up in the serial display was "Connecting to GSM Network" and the occasional "Not Connected"

Arduino IoT cloud managed to successfully add the device, and I made the 'led' variable with the little switch on my browser. But when I tried it out, it didn't blink the onboard LED, and Arduino Cloud was also showing the device as "Offline". I tried deleting the device and rebooting, restarted everything several times and it still doesn't work.

Here's The Code I'm Using:

/*
  Web client

 This sketch connects to a website through a MKR GSM 1400 board. Specifically,
 this example downloads the URL "http://www.example.org/" and
 prints it to the Serial monitor.

 Circuit:
 * MKR GSM 1400 board
 * Antenna
 * SIM card with a data plan

 created 8 Mar 2012
 by Tom Igoe
*/

// libraries
#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[]     = "0000";
// APN data
const char GPRS_APN[]      = "prepay.pelion"
const char GPRS_LOGIN[]    = "arduino";
const char GPRS_PASSWORD[] = "arduino";

// initialize the library instance
GSMClient client;
GPRS gprs;
GSM gsmAccess;

// URL, path and port (for example: example.org)
char server[] = "google.com";
char path[] = "/";
int port = 80; // port 80 is the default for HTTP

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("Starting Arduino web client.");
  // connection state
  bool connected = false;

  // After starting the modem with GSM.begin()
  // attach the shield to the GPRS network with the APN, login and password
  while (!connected) {
    if ((gsmAccess.begin(PINNUMBER) == GSM_READY) &&
        (gprs.attachGPRS(GPRS_APN, GPRS_LOGIN, GPRS_PASSWORD) == GPRS_READY)) {
      connected = true;
    } else {
      Serial.println("Not connected");
      delay(1000);
    }
  }

  Serial.println("connecting...");

  // if you get a connection, report back via serial:
  if (client.connect(server, port)) {
    Serial.println("connected");
    // Make a HTTP request:
    client.print("GET ");
    client.print(path);
    client.println(" HTTP/1.1");
    client.print("Host: ");
    client.println(server);
    client.println("Connection: close");
    client.println();
  } else {
    // if you didn't get a connection to the server:
    Serial.println("connection failed");
  }
}

void loop() {
  // if there are incoming bytes available
  // from the server, read them and print them:
  if (client.available()) {
    char c = client.read();
    Serial.print(c);
  }

  // if the server's disconnected, stop the client:
  if (!client.available() && !client.connected()) {
    Serial.println();
    Serial.println("disconnecting.");
    client.stop();

    // do nothing forevermore:
    for (;;)
      ;
  }
}

Any luck figuring out the issue here? I'm hitting all the same roadblocks trying to connect my MKR GSM 1400 to Arduino Cloud. @nikpourkeon02

Yes I actually did fix the issue. It seems the Arduino SIM doesn’t work at all with Arduino Cloud. My solution was getting a sim from an IoT provider called Hologram. I made a YouTube video on how to solve the problem.
Here’s the link, lots of people found it helpful I hope you do too.
https://youtu.be/gqtnQQNECY8?si=c8VGuw6cQ5CukG_q

1 Like

Appreciate the response! I was finally able to get my board to connect this evening! I'm using the MKR GSM 1400 with Arduino SIM and it connects up to the Arduino ioT cloud. Maybe they made some updates since you were last working with it that it now works correctly?

In any event, my issue was that I was copying in the APN value (i.e. prepay.pelion) but in doing so it was copying in a leading space. I'd recommend typing these values in manually to avoid this issue for any future readers on this forum.

Thanks for letting me know! I’ll be sure to try the Arduino SIM again to see if it works for me too! So it works for you now using the default “Arduino” for both “user” and “pass” values right?

Yea! I'm using the following in the Secret tab:

APN = prepay.pelion
PIN= 0000
Username = arduino
Password = arduino

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