MKR GSM 1400 - Arduino IoT Cloud LowPower freeze hangs

Dear all,
I'm working on a MKR 1400 coupled with Arduino_IoT_Cloud library.
Basically, the sketch created by the IoT Cloud interface from the web.

It works correctly, collecting data from sensor and updating the iot variables.
Now I wanted to put it in sleep for 1 minute.

Here my oversimplified code, but

#include <ArduinoLowPower.h>

const int RTC_INT = 5;
bool connected = false;

void setup() {
  LowPower.attachInterruptWakeup(RTC_INT, alarmEvent0, RISING);
  ArduinoCloud.addCallback(ArduinoIoTCloudEvent::CONNECT, &onConnect);

void loop() {
  air_temp = 10.0;
  if (connected) {

void onConnect() {
  connected = true;

void alarmEvent0() {

all my output is:

***** Arduino IoT Cloud - configuration info *****
Device ID: 6**************************************************4
Thing ID: c****************************************************e
MQTT Broker:
SIM card ok
GPRS.attachGPRS(): 4
.Sending PING to outer space... 303
Connected to GPRS Network
...Connected to Arduino IoT Cloud

It never wakes up, even if I put the pin 5 to VCC.
How to manage LowPower with this Arduino?

Thank you

Hi to manage sleep or deep sleep i use arduinolopower library , you can add it into library management
basically you can call LowPower.deepSleep((uint32_t)(SLEEP_MILLIS)); for deep sleep or LowPower.sleep((uint32_t)(SLEEP_MILLIS)); for sleep
i used in my script to put in deep slepp mkrgsm1400 for 2 hours

Dear tradexsrl,
thank you for you answer, but I think it's exactly the same library I'm trying to use.

I used it successfully in my MKR1310, so now I think it's a problem related to one of these two:

#include <ArduinoIoTCloud.h>
#include <Arduino_ConnectionHandler.h>

Someone who succeeded using ArduinoIoTCloud with LowPower?
If not I must think to abandon the Arduino IoT solution in favor of AWS or Google.

forgot to say: have you shutdown the gsm class - gsm sms class (if used) - gprs class before placing in deep sleep the mcu ?
in my project i do these before deep sleep and it i suspect with internet connection on with arduino cloud keeps mcu alive

Yep the problem is that using those libraries you don’t have access to the GSM class.
I’ve now setup a new sketch using GSM class and Blynk for the IOT and deep sleep works.

So the only solution is not using ArduinoIOTCloud...
If for the administrators of the forum and the management of Arduino this is an acceptable solution, please close the issue as Resolved.

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