Arduino Library 2.17.0

And the ping result? Thanks!

I’m sorry. I didn’t understand.
Isn’t ping 25202 in the picture above?

Hi, I mean a ping from your computer terminal, to see where the domain is resolving, i.e.,

This wifi network (the one you are using), has security policies? Because I was thinking that maybe the device is behind a firewall or something that blocks the outbound connection to the cloud server port.

You may try sharing wifi from your cell phone, mobile carriers usually does not block and allows the connection without issues.

If the device connects from cell phone shared wifi and cannot by the local wifi network, the issue is with the local network.

Hope this helps.

OK, let me check. Thank you.

I have the same problem. I informed this post and attached images. . I can only establish a connection if I put “#define DISABLE_TLS

I ping two addresses:

OK! I am checking it. Can you please test by defining the following on top of the scketch?

#define THINGER_SERVER "iot.thinger.io"

Unsuccessfully:

I'm using Windows 10    

Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif8266/nodemcuv2.html
PLATFORM: Espressif 8266 (3.1.0) > NodeMCU 1.0 (ESP-12E Module)
HARDWARE: ESP8266 80MHz, 80KB RAM, 4MB Flash
PACKAGES: 
 - framework-arduinoespressif8266 3.30001.210627 (3.0.1)
 - tool-esptool 1.413.0 (4.13)
 - tool-esptoolpy 1.30000.201119 (3.0.0)
 - tool-mklittlefs 1.203.210628 (2.3)
 - tool-mkspiffs 1.200.0 (2.0)
 - toolchain-xtensa 2.100300.210717 (10.3.0)
LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 37 compatible libraries
Scanning dependencies...
Dependency Graph
|-- <thinger.io> 2.18.0+sha.13f8fd7
|   |-- <ESP8266WiFi> 1.0
Building in release mode
Compiling .pio\build\nodemcuv2\src\main.cpp.o
src\main.cpp: In function 'void loop()':
src\main.cpp:52:37: warning: comparison of integer expressions of different signedness: 
'long unsigned int' and 'long int' [-Wsign-compare]
   52 |   if(currentMillis - previousMillis > interval) {
      |      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
Linking .pio\build\nodemcuv2\firmware.elf
Retrieving maximum program size .pio\build\nodemcuv2\firmware.elf
Checking size .pio\build\nodemcuv2\firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM:   [====      ]  37.8% (used 30932 bytes from 81920 bytes)
Flash: [====      ]  37.9% (used 395445 bytes from 1044464 bytes)
Building .pio\build\nodemcuv2\firmware.bin
Creating BIN file ".pio\build\nodemcuv2\firmware.bin" using "C:\.platformio\packages\framework-arduinoespressif8266\bootloaders\eboot\eboot.elf" and ".pio\build\nodemcuv2\firmware.elf"

I tried WiFi on SmartPhone, but it didn’t work.

Settings:
Windows 10
Arduino IDE 1.8.15
ESP8266 Boards 3.0.2
thinger.io 2.17

Hi,

I will try to replicate your situation with an ESP8266 to see where could be the issue.

Regards,

1 Like

Hi @ega . Did you manage to replicate the error on ESP8266?
I still get the same error on ESP8266.

I did an initial test with ESP32 and the 2.18 library (using VS Code and Platformio) and managed to successfully connect to Thinger.io server.
But I still do more tests.

In my case, I really need the library bug fix for ESP8266, because my projects were developed with it. I will only be migrating to ESP32 for the next few months.

Hi,

Yes, I had the same issue, what you can do is downgrade to version 2.16 meanwhile they patch the library, thats how I get the uC connected.

Hope this helps.

Hi, can you please verify the issue is still there?

I saw a problem with the us-east server in the cluster. I cannot test it directly, as based on my location the server resolves to eu-central.

Still with the same problem.
[_SOCKET] Connecting to iot.thinger.io:25202
[_SOCKET] Using secure TLS/SSL connection: yes
[_SOCKET] Error while connecting!
[_SOCKET] Connecting to iot.thinger.io:25202
[_SOCKET] Using secure TLS/SSL connection: yes
[_SOCKET] Error while connecting!

   Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif8266/nodemcuv2.html
PLATFORM: Espressif 8266 (3.2.0) > NodeMCU 1.0 (ESP-12E Module)
HARDWARE: ESP8266 80MHz, 80KB RAM, 4MB Flash
PACKAGES:
 - framework-arduinoespressif8266 3.30002.0 (3.0.2)
 - tool-esptool 1.413.0 (4.13)
 - tool-esptoolpy 1.30000.201119 (3.0.0)
 - tool-mklittlefs 1.203.210628 (2.3)
 - tool-mkspiffs 1.200.0 (2.0)
 - toolchain-xtensa 2.100300.210717 (10.3.0)
LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 39 compatible libraries
Scanning dependencies...
Dependency Graph
|-- <thinger.io> 2.18.0
|   |-- <ESP8266WiFi> 1.0
|   |-- <DNSServer> 1.1.1
|   |   |-- <ESP8266WiFi> 1.0
|   |-- <ESP8266WebServer> 1.0
|   |   |-- <ESP8266WiFi> 1.0
|-- <DNSServer> 1.1.1
|   |-- <ESP8266WiFi> 1.0
|-- <ESP8266WebServer> 1.0
|   |-- <ESP8266WiFi> 1.0
Building in release mode

I did the test again today after verifying that the Thinger.io platform has updated to version 3.3.3. Even so, it still has an error.

Hi, it has been fixed in the library but not released yet. You can try it taking the source from github in the develop branch.

I did initial tests with the 2.2 library under development:
Some feedbacks:

  • ESP8266 successfully connected to Thinger.io; :clap: :clap: :clap: :clap: :clap: :partying_face: :partying_face:
  • OTA update worked correctly on ESP8266. After the update, the ESP8266 automatically reset and started the new Firmware. :clap: :clap: :clap: :clap: :clap: :partying_face: :partying_face:

NOTE: I will run tests with ESP8266 with WebConfig/WiFiManager to see if everything is ok. And I will try to perform OTA updates to check the device behavior.

General and library questions 2.2:

  • I use a JSON file to store the device credentials (USERNAME, DEVICE_ID, DEVICE_CREDENTIAL). Can I OTA the JSON file too? Or do I have to use the file “arduino_secrets.h” to be able to update this information via OTA, if necessary?

  • After updating a device via OTA, where can I store the information about the current Firmware version of the device? Would it be possible to inform the Firmware version in the Thinger.io extension of the VS Code?
    I believe this information would be important to prevent the developer from updating via OTA a device that already has the Firmware updated.

  • What would the example of updating over the air with ThingerWebConfig look like?

Thanks for the attention and for the library update!

Also regarding the 2.2 library under development:

I understand how important it is to update the codes of “ThingerTinyGSM.h” and “ThingerWebConfig.h” to accept OTA firmware upgrade and new functionality, as I believe these are very important approaches for commercial products. Companies use a lot of GSM chip in devices and the possibility for the user to indicate the SSID and password of the router to connect products to the internet.

NOTE: In our commercial products, we use “ThingerTinyGSM.h” and “ThingerWebConfig.h” .

Thank you (@alvarolb ) for the excellent work you are doing

Hi @George_Santiago,

The TinyGSM and ThingerWebConfig, should support OTA. Did you tried something like:

#define THINGER_SERIAL_DEBUG

// Requires WifiManager from Library Manager or https://github.com/tzapu/WiFiManager
#include <ThingerWebConfig.h>
#include <ThingerESP8266OTA.h>

ThingerWebConfig thing;
ThingerESP8266OTA ota(thing);

void setup() {
  // open serial for debugging
  Serial.begin(115200);

  pinMode(LED_BUILTIN, OUTPUT);

  // digital pin control example (i.e. turning on/off a light, a relay, configuring a parameter, etc)
  thing["led"] << digitalPin(LED_BUILTIN);

  // resource output example (i.e. reading a sensor value)
  thing["millis"] >> outputValue(millis());

  /*
    Steps for getting the ESP8266 WebConfig working:
    1. Connect to Thinger-Device WiFi with your computer or phone, using thinger.io as WiFi password
    2. Wait for the configuration window, or navigate to http://192.168.4.1 if it does not appear
    3. Configure the wifi where the ESP8266 will be connected, and your thinger.io device credentials
    4. Your device should be now connected to the platform.
    More details at http://docs.thinger.io/arduino/
  */
}

void loop() {
  thing.handle();
}

We will be improving OTA support in the next months. This is a first step where we can evaluate the functionality and performance. Later we will include OTA updates for a fleet of devices, so we will have to integrate other mechanishm for handling firmware version.

Hello,
I’m trying to connect my MKR1010 through this library but it doesn’t work. I don’t get any errors, but there is no connection in the device list in the platform. I don’t know what the problem is. I got the code from the library example(see below)
SSL certificate and firmware update are done.
would be very nice if you share your idea. Thanks