Hi
I finaly got my MKR 1400 and started testing it with the basic examples. TestMode, TestGPRS, GPRSPing.
The first problem I got was the power issue. I forgot to power it with more juice.
Its now powered from 4 li-ion 18650 batteris in parallel. The voltage is 3.98 and dont drop. I connected a capacitor to make everything even more stable, just in case.
First I tried connecting my data SIM and nothing worked except the TestModem sketch. But that sketch dont need a SIM card. When I connect my "normal" phone SIM card for calling and data usage, everything works great and I get a ping from google with the GPRSPing sketch. It looks like there is an issue with the data SIM I have.
I though first the data SIM was not working. So I testes the SIM card in my phone and got no issues there. I could surf the web and download files. I did remove the stock PIN and changed it to 0000. But it did not help. The reason I was testing with my datasim was because I have one for free in my tele subscription.
So my question is. Does the Arduino MKR 1400 only support SIM card you can call with?
Would appreciate to get some answers, thanks.
My setup is
MKR 1400
Battery power (Should be around 4-6A in total)
SIM card from Telia in Norway
GprsPing code from the example
/*
This uses an MKR GSM 1400 to continuously pings given host specified by IP Address or name.
Circuit:
* MKR GSM 1400 board
* Antenna
* SIM card with a data plan
created 06 Dec 2017
by Arturo Guadalupi
*/
#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;
// APN data
const char GPRS_APN[] = SECRET_GPRS_APN;
const char GPRS_LOGIN[] = SECRET_GPRS_LOGIN;
const char GPRS_PASSWORD[] = SECRET_GPRS_PASSWORD;
// initialize the library instance
GSMSSLClient client;
GPRS gprs;
GSM gsmAccess;
// Specify IP address or hostname
String hostName = "www.google.com";
int pingResult;
void setup() {
// Initialize serial and wait for port to open:
Serial.begin(9600);
while (!Serial) {
; // wait for serial port to connect. Needed for native USB port only
}
MODEM.debug();
Serial.println("Starting Arduino GPRS ping.");
// 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);
}
}
}
void loop() {
Serial.print("Pinging ");
Serial.print(hostName);
Serial.print(": ");
pingResult = gprs.ping(hostName);
if (pingResult >= 0) {
Serial.print("SUCCESS! RTT = ");
Serial.print(pingResult);
Serial.println(" ms");
} else {
Serial.print("FAILED! Error code: ");
Serial.println(pingResult);
}
delay(5000);
}
Debug message in console from the modem with the data SIM attached
Starting Arduino GPRS ping.
⸮AT
OK
AT+IPR=921600
OK
AT
OK
AT+UPSV=3
OK
AT+CPIN?
ERROR
AT+CPIN?
+CPIN: SIM PIN
OK
AT+CPIN="0000"
OK
AT+CMGF=1
OK
AT+UDCONF=1,1
OK
AT+CTZU=1
OK
AT+UDTMFD=1,2
OK
AT+CREG?
+CREG: 0,0
OK
AT+CREG?
+CREG: 0,0
OK
AT+CREG?
+CREG: 0,0
OK
AT+CREG?
+CREG: 0,0
OK
AT+CREG?
+CREG: 0,0
OK
AT+CREG?
+CREG: 0,0
OK
AT+CREG?
+CREG: 0,0
OK
AT+CREG?
+CREG: 0,0
OK
AT+CREG?
+CREG: 0,0
OK
+UMWI: 0,1
+UMWI: 0,2
+UMWI: 0,3
+UMWI: 0,4
+UMWI: 0,5
AT+CREG?
+CREG: 0,0
OK
AT+CREG?
+CREG: 0,0
OK
AT+CREG?
+CREG: 0,0
OK
AT+CREG?
+CREG: 0,0
OK
AT+CREG?
+CREG: 0,0
OK
AT+CREG?
+CREG: 0,0
OK
AT+CREG?
+CREG: 0,0
OK
AT+CREG?
+CREG: 0,0
OK
AT+CREG?
+CREG: 0,0
OK
AT+CREG?
+CREG: 0,0
OK
AT+CREG?
+CREG: 0,0
OK
AT+CREG?
+CREG: 0,0
OK
AT+CREG?
+CREG: 0,0
OK
AT+CREG?
+CREG: 0,0
OK
AT+CREG?
+CREG: 0,0
OK
AT+CREG?
+CREG: 0,0
OK
AT+CREG?
+CREG: 0,0
OK
AT+CREG?
+CREG: 0,0
OK
AT+CREG?
+CREG: 0,0
OK
AT+CREG?
+CREG: 0,0
OK
AT+CREG?
+CREG: 0,0
OK
AT+CREG?
+CREG: 0,0
OK
AT+CREG?
+CREG: 0,0
OK
AT+CREG?
+CREG: 0,0
OK
AT+CREG?
+CREG: 0,0
OK
AT+CREG?
+CREG: 0,0
OK
AT+CREG?
+CREG: 0,0
OK