Hi @capt-dogbeard.
Background
The "Arduino_ConnectionHandler" library is used by Arduino Cloud IoT Thing sketches to manage the board's connection to the network. When compiling a sketch for an ESP32-based board, this library uses the lower level "WiFi" library.
In some cases, multiple installed libraries might contain a header file matching the #include directive in the sketch program. This situation is especially common when using Cloud Editor since all the >6000 libraries of the Arduino Library Manager are pre-installed on the Arduino Cloud server. In the case where there are multiple library candidates, the Arduino sketch build system must pick one candidate to use when compiling the sketch. The build system uses a sophisticated algorithm to make this choice, so it usually picks the intended library, but not always.
Investigation
Fortunately the sketch build system prints an informational message whenever it has to choose from multiple candidate libraries so we can clearly see what happened:
Unfortunately this is a case where it picked a different library than was intended by the authors of the Arduino_ConnectionHandler library.
The "WiFi" library we wanted is this one:
Not used: /home/builder/.arduino15/packages/esp32/hardware/esp32/2.0.5/libraries/WiFi
But it chose this one instead:
Used: /mnt/create-efs/webide/6f/e5/6fe59c69dcd6722ba5155ccb737315c4:capt-dogbeard/libraries_v2/WiFiEspAT
The reason it chose that "WiFiEspAT" library is because this is a library you manually imported into your Arduino Cloud account. The library selection algorithm assumes that if you imported a library to your account, that is an indication that you want that library to be used, instead of one of the pre-installed libraries.
Resolution
The easiest solution will be to simply remove the imported copy of the WiFiEspAT library from your Arduino Cloud account.
This is a reasonable solution if you don't have any specific reason for the imported copy being in your account. The WiFiEspAT library is already pre-installed on the Arduino Cloud servers, so if you imported a standard release version of that library to Arduino Cloud then the imported copy is completely redundant. However, if you imported a modified or development version of the library to your account, and you need that non-standard version of the library for your projects then you would not want to remove the imported library and so my proposed solution will not be suitable. If so, just let me know and I'll provide an alternative solution.
Assuming the removal solution is suitable, I'll provide instructions you can follow to accomplish this:
-
If you are not already, log in to your Arduino account:
https://login.arduino.cc/login
-
Click the following link to open the list of your Arduino Cloud sketches in the web browser:
https://app.arduino.cc/sketches
-
Click on any sketch, or use the CREATE > New sketch button to create a new sketch.
The sketch will open in Arduino Cloud Editor.
-
Click the icon that looks like shelved books ("Libraries") in the bar on the left side of the Cloud Editor page.
The "Libraries" panel will open.
-
Select the "Custom" tab from the "Libraries" panel.
-
You will see text near the top of the panel:
Show libraries for:
<board name>
(where <board name> is the name of the board you have selected in Arduino Cloud Editor)
Click the board name in that text.
The text will now change to:
Show libraries for:
ALL DEVICES
-
Scroll down through the list of custom libraries until you find the entry for the "WiFiEspAT" library.
-
Click the ⋮ icon to the right of the library name.
A menu will open.
-
Select "Delete Library" from the menu.
A "Delete custom library" dialog will open.
-
Click the "YES, DELETE" button in the dialog.
Please let me know if you have any questions or problems while following those instructions.
The device "status" is indicating whether the device is communicating over the Internet to the Arduino Cloud server. So it is normal for the status to be "offline" if the board is connected to your computer with a USB cable, but any of the following conditions are present:
- The board is not running an IoT Thing sketch program that causes it to communicate with the Arduino Cloud server.
- The board was not able to connect to the Wi-Fi network.
- The Wi-Fi network doesn't have an Internet connection.
- The board was not able to connect to the Arduino Cloud server.
Since you weren't able to compile the IoT Thing sketch, which is a prerequisite for uploading the sketch program to the board, it is likely the board is not running an IoT Thing sketch program, and thus the "offline" status is entirely expected.