GPRS Failure

I have 2 MKR GSM 1400 with arduino sims. They where working and where connectint to the cloud. I upgraded to the maker plan now I can not get either one to work. one SIM is telling me incorrect code the other says:
SIM card ok
GPRS.attachGPRS(): 0
GPRS attach failed

/* 
  Sketch generated by the Arduino IoT Cloud Thing "Untitled"
  https://create.arduino.cc/cloud/things/e98e4604-5724-400c-9ade-f555b34a6d73 

  Arduino IoT Cloud Variables description

  The following variables are automatically generated and updated when changes are made to the Thing

  CloudSwitch rlight;

  Variables which are marked as READ/WRITE in the Cloud Thing will also have functions
  which are called when their values are changed from the Dashboard.
  These functions are generated with the Thing and added at the end of this sketch.
*/

#include "thingProperties.h"

void setup() {
  // Initialize serial and wait for port to open:
  Serial.begin(9600);
  // This delay gives the chance to wait for a Serial Monitor without blocking if none is found
  delay(1500); 

  // Defined in thingProperties.h
  initProperties();

  // Connect to Arduino IoT Cloud
  ArduinoCloud.begin(ArduinoIoTPreferredConnection);
  
  /*
     The following function allows you to obtain more information
     related to the state of network and IoT Cloud connection and errors
     the higher number the more granular information you’ll get.
     The default is 0 (only errors).
     Maximum is 4
 */
  setDebugMessageLevel(4);
  ArduinoCloud.printDebugInfo();
  pinMode(6, OUTPUT);
}

void loop() {
  ArduinoCloud.update();
  // Your code here 
  Serial.print("help...     ");
  digitalWrite(6, HIGH);
  delay(5000);
  
}

APN: prepay.pelion
Default PIN: 0000
Username: arduino
Password: arduino

I have uninstalled and reinstalled everything. I have check usage hardly anything used on one sim the other nothing. I even had a webhook working with ITFFF but that was constantly sending SMS without doing anything. I was suppose to only send when pressing a button but it was sending every few seconds no matter what I tried, so I had to delete that.

Hello,
We have done made new patches that will help solve the Arduino SIM Card connection issue with the IoT cloud.
Please follow the steps below to test your Arduino SIM card:

  1. download and install the latest "Arduino create Agent" from Arduino Cloud - Getting started

  2. add a new device "MKRGSM1400"

  3. create a new thing called "IoT Cloud Test"

  4. Create an integer variable "analog_value" to read A1 pin

  5. In the void loop() and under // Your code here, add the line below
    analog_value = analogRead(A1);

  6. For the device network configuration use:
    PINNUMBER : 0000
    APN: prepay.pelion
    USERNAME: arduino
    PASSWORD arduino

  7. Upload the sketch to your board and check the Serial Monitor to see if
    it connects as it should.

I cannot get my MKRGSM 1400 board to connect either. I've checked and double checked everything. Just keep getting ping failed in the serial monitor.

1 Like

Try and run the GsmWebServer sketch attached here to see if your Arduino SIM connected to the GPRS network. Post the result here.

arduino_secrets.h (258 Bytes)
GsmWebServer.ino (3.0 KB)

Here are my results, which appear to be success. Using MKR GSM 1400 with the above two files, arduino_secrets.h and GSMWebServer.ino:

21:45:57.747 -> ⸮AT

21:45:57.947 -> OK
21:45:57.980 -> AT+IPR=921600

21:45:57.980 -> OK
21:45:58.080 -> AT

21:45:58.080 -> OK
21:45:58.080 -> AT+UPSV=3

21:45:58.080 -> OK
21:45:58.213 -> AT+CPIN?

21:45:58.213 -> ERROR
21:45:58.414 -> AT+CPIN?

21:45:58.414 -> +CPIN: READY
21:45:58.414 -> 
21:45:58.414 -> OK
21:45:58.613 -> AT+CMGF=1

21:45:58.613 -> OK
21:45:58.814 -> AT+UDCONF=1,1

21:45:58.814 -> OK
21:45:59.013 -> AT+CTZU=1

21:45:59.013 -> OK
21:45:59.214 -> AT+UDTMFD=1,2

21:45:59.214 -> OK
21:45:59.413 -> AT+CREG?

21:45:59.413 -> +CREG: 0,0
21:45:59.413 -> 
21:45:59.413 -> OK
21:45:59.613 -> AT+CREG?

21:45:59.613 -> +CREG: 0,0
21:45:59.613 -> 
21:45:59.613 -> OK
21:45:59.813 -> AT+CREG?

21:45:59.813 -> +CREG: 0,0
21:45:59.813 -> 
21:45:59.813 -> OK
21:46:00.014 -> AT+CREG?

21:46:00.014 -> +CREG: 0,0
21:46:00.014 -> 
21:46:00.014 -> OK
21:46:00.213 -> AT+CREG?

21:46:00.213 -> +CREG: 0,0
21:46:00.213 -> 
21:46:00.213 -> OK
21:46:00.413 -> AT+CREG?

21:46:00.413 -> +CREG: 0,0
21:46:00.413 -> 
21:46:00.413 -> OK
21:46:00.612 -> AT+CREG?

21:46:00.612 -> +CREG: 0,0
21:46:00.612 -> 
21:46:00.612 -> OK
21:46:00.712 -> 
21:46:00.712 -> +UMWI: 0,1
21:46:00.745 -> 
21:46:00.745 -> +UMWI: 0,2
21:46:00.745 -> 
21:46:00.745 -> +UMWI: 0,3
21:46:00.745 -> 
21:46:00.745 -> +UMWI: 0,4
21:46:00.844 -> AT+CREG?

21:46:00.844 -> +CREG: 0,0
21:46:00.844 -> 
21:46:00.844 -> OK
21:46:01.052 -> AT+CREG?

21:46:01.052 -> +CREG: 0,0
21:46:01.052 -> 
21:46:01.052 -> OK
21:46:01.251 -> AT+CREG?

21:46:01.251 -> +CREG: 0,0
21:46:01.251 -> 
21:46:01.251 -> OK
21:46:01.451 -> AT+CREG?

21:46:01.451 -> +CREG: 0,0
21:46:01.451 -> 
21:46:01.451 -> OK
21:46:01.650 -> AT+CREG?

21:46:01.650 -> +CREG: 0,0
21:46:01.650 -> 
21:46:01.650 -> OK
21:46:01.849 -> AT+CREG?

21:46:01.849 -> +CREG: 0,0
21:46:01.849 -> 
21:46:01.849 -> OK
21:46:02.049 -> AT+CREG?

21:46:02.049 -> +CREG: 0,0
21:46:02.049 -> 
21:46:02.049 -> OK
21:46:02.249 -> AT+CREG?

21:46:02.249 -> +CREG: 0,0
21:46:02.249 -> 
21:46:02.249 -> OK
21:46:02.450 -> AT+CREG?

21:46:02.450 -> +CREG: 0,0
21:46:02.450 -> 
21:46:02.450 -> OK
21:46:02.650 -> AT+CREG?

21:46:02.650 -> +CREG: 0,0
21:46:02.650 -> 
21:46:02.650 -> OK
21:46:02.850 -> AT+CREG?

21:46:02.850 -> +CREG: 0,0
21:46:02.850 -> 
21:46:02.850 -> OK
21:46:03.049 -> AT+CREG?

21:46:03.082 -> +CREG: 0,0
21:46:03.082 -> 
21:46:03.082 -> OK
21:46:03.282 -> AT+CREG?

21:46:03.282 -> +CREG: 0,0
21:46:03.282 -> 
21:46:03.282 -> OK
21:46:03.482 -> AT+CREG?

21:46:03.482 -> +CREG: 0,0
21:46:03.482 -> 
21:46:03.482 -> OK
21:46:03.682 -> AT+CREG?

21:46:03.682 -> +CREG: 0,0
21:46:03.682 -> 
21:46:03.682 -> OK
21:46:03.883 -> AT+CREG?

21:46:03.883 -> +CREG: 0,0
21:46:03.883 -> 
21:46:03.883 -> OK
21:46:04.083 -> AT+CREG?

21:46:04.083 -> +CREG: 0,0
21:46:04.083 -> 
21:46:04.083 -> OK
21:46:04.283 -> AT+CREG?

21:46:04.283 -> +CREG: 0,0
21:46:04.283 -> 
21:46:04.283 -> OK
21:46:04.483 -> AT+CREG?

21:46:04.483 -> +CREG: 0,0
21:46:04.483 -> 
21:46:04.483 -> OK
21:46:04.683 -> AT+CREG?

21:46:04.683 -> +CREG: 0,0
21:46:04.683 -> 
21:46:04.683 -> OK
21:46:04.883 -> AT+CREG?

21:46:04.883 -> +CREG: 0,0
21:46:04.883 -> 
21:46:04.883 -> OK
21:46:05.083 -> AT+CREG?

21:46:05.083 -> +CREG: 0,0
21:46:05.083 -> 
21:46:05.083 -> OK
21:46:05.282 -> AT+CREG?

21:46:05.282 -> +CREG: 0,0
21:46:05.282 -> 
21:46:05.282 -> OK
21:46:05.482 -> AT+CREG?

21:46:05.482 -> +CREG: 0,0
21:46:05.482 -> 
21:46:05.482 -> OK
21:46:05.682 -> AT+CREG?

21:46:05.682 -> +CREG: 0,0
21:46:05.682 -> 
21:46:05.682 -> OK
21:46:05.883 -> AT+CREG?

21:46:05.883 -> +CREG: 0,5
21:46:05.883 -> 
21:46:05.883 -> OK
21:46:06.083 -> AT+UCALLSTAT=1

21:46:06.083 -> OK
21:46:06.216 -> AT+CGATT=1

21:46:06.216 -> OK
21:46:06.416 -> AT+UPSD=0,1,"prepay.pelion"

21:46:06.416 -> OK
21:46:06.616 -> AT+UPSD=0,6,3

21:46:06.616 -> OK
21:46:06.816 -> AT+UPSD=0,2,"arduino"

21:46:06.816 -> OK
21:46:07.016 -> AT+UPSD=0,3,"arduino"

21:46:07.016 -> OK
21:46:07.216 -> AT+UPSD=0,7,"0.0.0.0"

21:46:07.216 -> OK
21:46:07.416 -> AT+UPSDA=0,3

21:46:43.428 -> OK
21:46:43.627 -> AT+UPSND=0,8

21:46:43.627 -> +UPSND: 0,8,1
21:46:43.627 -> 
21:46:43.627 -> OK
21:46:43.627 -> Connected to GPRS network
21:46:43.661 -> AT+USOCR=6

21:46:43.661 -> +USOCR: 0
21:46:43.661 -> 
21:46:43.661 -> OK
21:46:43.661 -> AT+USOLI=0,80

21:46:43.661 -> OK
21:46:43.694 -> AT+UPSND=0,0

21:46:43.694 -> +UPSND: 0,0,"10.66.34.171"
21:46:43.694 -> 
21:46:43.694 -> OK
21:46:43.694 -> Server IP address=
21:46:43.694 -> 10.66.34.171

@johnedstone Good to hear that the issue is now solved. Please do not forget to indicate the solution here for the benefit of others who might need assistance regarding this.

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