Arduino MKR no data

does anyone know how to make the Arduino MKR 1400 reconnecting automatically , when it lost connection to cayenne cloud?
moreover, I havent received any data yet…


This example shows how to connect to Cayenne using a GSM device and send/receive sample data.

The CayenneMQTT Library is required to run this sketch. If you have not already done so you can install it from the Arduino IDE Library Manager.


  1. Install the TinyGSM library ( from the Arduino Library Manager.
  2. Set the Cayenne authentication info to match the authentication info from the Dashboard.
  3. Uncomment the correct GSM modem type and set the GSM connection info, if needed.
  4. Compile and upload the sketch.
  5. A temporary widget will be automatically generated in the Cayenne Dashboard. To make the widget permanent click the plus sign on the widget.

#define CAYENNE_DEBUG // Uncomment to show debug messages
#define CAYENNE_PRINT Serial // Comment this out to disable prints and save space
// Uncomment your modem type:
//#define TINY_GSM_MODEM_SIM800
// #define TINY_GSM_MODEM_SIM808
// #define TINY_GSM_MODEM_SIM900
// #define TINY_GSM_MODEM_BG96
// #define TINY_GSM_MODEM_A6
// #define TINY_GSM_MODEM_A7
// #define TINY_GSM_MODEM_M590
// #define TINY_GSM_MODEM_ESP8266

#include <CayenneMQTTGSM.h>

// Increase RX buffer if needed
//#define TINY_GSM_RX_BUFFER 512

#include <TinyGsmClient.h>

// Uncomment this if you want to see all AT commands

// Set serial for debug console (to the Serial Monitor, default speed 115200)
#define SerialMon Serial

// Use Hardware Serial on MKR GSM
#define SerialAT SerialGSM

// GSM connection info.
char apn = “internet.telekom”; // Access point name. Leave empty if it is not needed.
char gprsLogin = “t-mobile”; // GPRS username. Leave empty if it is not needed.
char gprsPassword = “tm”; // GPRS password. Leave empty if it is not needed.
char pin = “9456”; // SIM pin number. Leave empty if it is not needed.

// Cayenne authentication info. This should be obtained from the Cayenne Dashboard.
char username = “26130510-75e6-11ea-883c-638d8ce4c23d”;
char password = “499e54d4279e0fbb6c9ff7c55b22cad02fd6934e”;
char clientID = “45d423c0-75e6-11ea-93bf-d33a96695544”;

#include <StreamDebugger.h>
StreamDebugger debugger(SerialAT, SerialMon);
TinyGsm modem(debugger);
TinyGsm modem(SerialAT);

TinyGsmClient client(modem);

void setup() {

// Set console baud rate
while (!SerialMon) {}

// Set GSM module baud rate

// reset / powerup the modem
digitalWrite(GSM_RESETN, HIGH);
digitalWrite(GSM_RESETN, LOW);

// Restart takes quite some time
// To skip it, call init() instead of restart()
SerialMon.println(F(“Initializing modem…”));

String modemInfo = modem.getModemInfo();
SerialMon.print(F("Modem: "));

// Auto-detect the GSM serial baud rate. You can manually set it instead if you want to save a bit of space.
Cayenne.begin(username, password, clientID, SerialGSM, apn, gprsLogin, gprsPassword, pin);


void loop() {

// Default function for sending sensor data at intervals to Cayenne.
// You can also use functions for specific channels, e.g CAYENNE_OUT(1) for sending channel 1 data.
// Read data from the sensor and send it to the virtual channel here.
// You can write data using virtualWrite or other Cayenne write functions.
// For example, to send a temperature in Celsius you can use the following:

@boeingmd11f i guess you have fixed this issue and dont create mutiple post on same issue.

I am sorry, if it it looks like i would have created multiple posts for the same problem. Sadly, that isn’t the case.
I am now able to connect to Cloud(Problem one fixed), but still can’t send any data to cloud or rather the cloud doesn’t show them.
Indeed the cloud says that I am connected and it has received data…:roll_eyes:

Thank you in advance.
I would really honor your help and I know that the MKR GSM is a very specific board with not a lot of unsers…

the mkr board seems to giving many issue for users with cayenne and we have stopped support for it.