[HELP] ESP8266 Can't Connect To Thinger.io

here is with TLS disabled, everything works:
[NETWORK] Starting connection…
[NETWORK] Connecting to network nikwest
[NETWORK] Connected to WiFi!
[NETWORK] Getting IP Address…
[NETWORK] Got IP Address: 10.0.1.129
[NETWORK] Connected!
[_SOCKET] Connecting to [removed otherwise I cannot post]…
[_SOCKET] Using secure TLS/SSL connection: no
[_SOCKET] Connected!
[THINGER] Authenticating. User: nikwest Device: sensor_node
[THINGER] Writing bytes: 43 [OK]
[THINGER] Authenticated
[THINGER] Writing bytes: 31 [OK]

and here is with TLS:

[NETWORK] Starting connection…
[NETWORK] Connecting to network nikwest
[NETWORK] Connected to WiFi!
[NETWORK] Getting IP Address…
[NETWORK] Got IP Address: 10.0.1.129
[NETWORK] Connected!
[_SOCKET] Connecting to [removed otherwise I cannot post]…
[_SOCKET] Using secure TLS/SSL connection: yes
[_SOCKET] Connected!
[THINGER] Authenticating. User: nikwest Device: sensor_node
[THINGER] Writing bytes: 43 [OK]
[_SOCKET] Cannot read from socket!
[THINGER] Auth Failed! Check username, device id, or device credentials.
[_SOCKET] Is now closed!
[THINGER] Writing bytes: 31 [FAIL]
[THINGER] Expected:31
[THINGER] Wrote:0
[_SOCKET] Connecting to [removed otherwise I cannot post]…
[_SOCKET] Using secure TLS/SSL connection: yes
[_SOCKET] Connected!
[THINGER] Authenticating. User: nikwest Device: sensor_node
[THINGER] Writing bytes: 43 [OK]
[_SOCKET] Cannot read from socket!
[THINGER] Auth Failed! Check username, device id, or device credentials.
[_SOCKET] Is now closed!
[THINGER] Writing bytes: 31 [FAIL]
[THINGER] Expected:31
[THINGER] Wrote:0

What is the port while using https connection?

Port number for TLS connection is 25202

[_SOCKET] Connecting to iot.thinger.io:25202

Do you have the ESP8266 board library updated to the latest version? I cannot reproduce the issue!

yes, I am using platformio and everything is up to date.

Do I see it correctly, that the previous version (2.7.2) did not support TLS or it wasn’t enabled by default on ESP8266?

If that’s the case then TLS does not seem to work in my environment. I don’t understand why, but that helps to narrow down the problem.

After several tests, we cannot reproduce this issue. TLS was enabled also by default in previous library versions.
Tested with NodeMCU, Thinger.io Libraries (2.9.1), ESP8266 (2.4.1). Are you using the ESP8266 via AT commands, or just as a standalone microcontroller?

Hey!

i have the same Problem! i testet for some days. I have already the newest library 2.9.1 testet to 2.5.x and nothing happen…
watch my Picture…

the ports are open and the credentials are correct!

Hi! the headers for ESP8266 should be:

#include <ESP8266WiFi.h>
#include <ThingerESP8266.h>

and use ThingerESP8266 instead of ThingerWifi when declaring the thing instance.

In the other side, if you want to disable TLS, you must set #define _DISABLE_TLS_ on top of file, like the _DEBUG_ definition. Hope it helps! :wink:

Best.

1 Like

Thank you for Your fast reply.
I do anything, but nothing works… what i am doing wrong?
The TLS does not disable… why?

I Am using Unbuntu in VM. But i check the Ports…

please help me :slight_smile:

Just to clarify… You are using your own server, or just the cloud server? If you are using your own server (in a VM, i.e.,), yo need to point the ESP8266 to your own server. Check the manual.

The TLS is not disabled as it is _DISABLE_TLS_. Test with that! Hope it helps.

Hey alvarolb!

i was very stupid! :smiley: now i understand! Its perfect. I just add the Line
#define THINGER_SERVER "192.168.1.94"
and get the access to my Unbuntu server.
at the weekend i testet it successfully and now bought your RASPBERRY Image to use the Server on RASPI

Thank you for all :slight_smile:

1 Like

Hi
i have the same problem! my esp8266 never Connect to Thinger.io
my device id and username and device credentials is correct.
here is my device DEBUG output

Are you working with cloud server or local server?

I recommend you to delete the device and create it again, taking care of the uppercase and/or lowercase of device and credential fields, and test with the example sketch just modifying this fields with previous established.

Thank u for your reply.
I’m working with cloud server.
I deleted the device and create it again & testet with the example but didn’t work.

Hi,
Make sure that your username, device id, and credentials on firmware you are written is the same as in the cloud.

I was having the same issue and I was only able to authenticate by disabling TLS: https://thinger.io/securing-the-internet-of-things-adding-ssltls-support-for-the-esp8266/

#define _DISABLE_TLS_

I wonder was there a change in how code is configured to talk to the endpoint?

1 Like

Hi, is the issue “Auth Failed” fixed? (I get the same error message)?

Hey guys, I am currenly working on using ESP8266AT to connect to Thinger. Currently met with errors which prohibit me from connecting to Thinger. May I know the SDK and AT version that anyone has tested which is able to connect to Thinger? There are so many different versions of firmware out there, not sure which one works with Thinger platform. Its so annoying!

@JorgeTrincado Please, can you give me the solution if found it !!

ME too.
I tested removing the TSL and the connection to thing.io worked.