ESP8266 Feather Huzzah doesn't work with IoT Cloud

Hello, I'm trying to use my ESP8266 board (feather huzzah) with the IoT Cloud platform. It worked during a day and the next day, nothing. I just tried without code (just the code automatically generated). I just have "0�~?�4��" on the serial monitor. Usually, I have this message and then the messages about internet connection. Today, I just have "0�~?�4��" without any error message. I don't understand...

Hi @ayubowan. Do you have the Serial Monitor baud rate menu set to match the value in the Serial.begin() call in your Thing sketch?

Hi, thank you for your answer.

Yes, the serial baud rate is correctly set. I delete the thing and the board and I add them again and the empty sketch is working. I think it is a bit buggy because esp8266 is not perfectly supported.

Now, I added a bit of code but the esp8266 keeps crashing.

Here is the code:

#include "thingProperties.h"

#include "GxEPD2_BW.h"
#include "GxEPD2_display_selection_new_style.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(2);
  ArduinoCloud.printDebugInfo();
  
  display.init();
  // comment out next line to have no or minimal Adafruit_GFX code
  display.setTextColor(GxEPD_BLACK);
  display.firstPage();
  do
  {
    display.fillScreen(GxEPD_WHITE);
    // comment out next line to have no or minimal Adafruit_GFX code
    display.print(text);
  }
  while (display.nextPage());
}

void loop() {
  ArduinoCloud.update();
  // Your code here
}

Here is the crashing message:

0�n?�4�!����OSA2��***** Arduino IoT Cloud - configuration info *****
Device ID: b5a38c11-ef11-45d4-9bdf-a07f56abc779
Thing ID: 7402fc06-40a0-4597-a16e-f4f0c66f183a
MQTT Broker: mqtts-up.iot.arduino.cc:8884
WiFi status ESP: 3
Connected to "Livebox-AC14"

Abort called

stack>>>

ctx: cont
sp: 3fff3df0 end: 3fff40f0 offset: 01b0
3fff3fa0: 00000000 00000000 3fff2c94 402171f0
3fff3fb0: 3ffee9b0 3fff6c14 3fff2c94 40208a8f
3fff3fc0: 00000000 3fff4020 4020cb90 3fff30d0
3fff3fd0: 00000000 00000000 00000000 4020205f
3fff3fe0: 00000d50 3fff6eac 3fff2c94 40207901
3fff3ff0: 000022b4 0000054c 0000054c 3fff4040
3fff4000: 000022b4 3fff2c94 3fff6c14 3fff4040
3fff4010: 000022b4 3fff2c94 3fff6c14 40208c9e
3fff4020: 4020e050 d12bcd34 3fff2d6c 4020d3be
3fff4030: 3fff6c14 000022b4 3fff2d6c 40209fd5
3fff4040: 00000000 0000213b 3fff2af4 40209199
3fff4050: 000003e7 0000213b 3fff2af4 4020591b
3fff4060: 3fff4090 1a000000 38000000 fea9fea9
3fff4070: 97cb34e5 ce5421e2 00000000 3fff4128
3fff4080: 3fff2d6c 3fff6c14 000022b4 4020a1f8
3fff4090: 4020e050 00000000 3fff2d6c 4020d3be
3fff40a0: 3fffdad0 00000000 3fff2b30 40203f4e
3fff40b0: 3fffdad0 00000000 3fff2b30 402043fe
3fff40c0: 00000000 00000000 3fff40f8 402032b4
3fff40d0: 3fffdad0 00000000 3fff40f8 4020cc3c
3fff40e0: feefeffe feefeffe 3ffe8544 401008b1
<<<stack<<<

last failed alloc call: 40217220(16709)

Sorry for the coded stack trace. Here is the decoded result:

I downloaded the sketch from Arduino IoT Cloud and uploaded it with the Arduino IDE and now it's working. Very weird

Arduino Cloud is using a very outdated version of the ESP8266 boards platform (2.5.0). From your screenshot, it appears you have the latest version of the ESP8266 boards platform (3.0.2) installed on your local computer. I think that is the most likely explanation for the different results between the two.

It is also possible that you have different versions of libraries installed on your local system. Since Arduino Cloud always has the latest version of every Library Manager library available, and uses those versions by default, it would be more likely to go the other direction, where you have an older version on your computer. But since there are thousands of Arduino libraries, it could even be that you have a completely different variant of a library on your computer, similar enough to compile, but with some divergences in the code that cause different behavior.

Thank you very much for the explanation. I'm going to investigate on this and give you the result.

I tried to link my board to Arduino IoT Cloud platform using Arduino IDE from my house and now it is not working. It was working at my work.

I updated Wifi credentials and the monitor is displaying that the board is connected to my box. But right after that, I have this message:

ArduinoIoTCloudTCP::handle_ConnectMqttBroker could not connect to mqtts-up.iot.arduino.cc:8884

I tried deleting the thing, the sketch and re-create it. I tried to use 2.5.0 esp8266 package as well as 3.0.0 and 3.0.2.

Did you get the same crash like you reported at ESP8266 Feather Huzzah doesn't work with IoT Cloud - #3 by ayubowan after you uploaded the sketch to your ESP8266 board while using 2.5.0?

Here is the stack trace with the 2.5.0

I also tried the demo code from this page. It uses these files :
#include "DEV_Config.h"
#include "EPD.h"
#include "GUI_Paint.h"
#include "imagedata.h"
#include <stdlib.h>

The result are not the same. If I just include the libraries on my sketch on IoT Cloud, everything is ok. But as soon as I'm trying to display something on my epaper screen, it makes the esp8266 crashing.

I just want to display a text typed with IoT Cloud dashboard on my epaper display. I didn't find an IoT Cloud compatible library. Without IoT Cloud, my code is working and I can display what I want on the epaper screen.

I'm about to give up on Arduino IoT Cloud :sob:
I have been struggling for weeks with this project. Maybe thingsBoard ?

Do you have any idea ? I tried the Blynk app instead of IoT Cloud (to test another platform), then it makes the firmware of the ESP outputs an error.

I'm ok to use any library to control my Waveshare e-paper screen with IoT Cloud.