ESP8266 Network disconnected. Disconnected from Adafruit IO.

Moderators: adafruit_support_bill, adafruit

Forum rules
If you're posting code, please make sure your code does not include your Adafruit IO Active Key or WiFi network credentials.
Locked
User avatar
Frasse
 
Posts: 7
Joined: Sun Mar 13, 2022 4:43 pm

ESP8266 Network disconnected. Disconnected from Adafruit IO.

Post by Frasse »

I'm a IO+ subscriber with 26 feeds and 15 dashboards all working fine.
I'm using the Wemos Lolin ESP8266 D1 mini board for these sketches. ESP8266 version 3.02.
Recently tried a new sketch with 1 new feed. Same network, same credentials (same config.h) and got the above errors when trying to io.connect(). (Network disconnected. Disconnected from Adafruit IO.)
Tried another Wemos Lolin ESP8266 D1 mini board - same error.
Tried Adafruit ESP8266 Feather Huzzah - same error.
Tried a copy of an already working feed (with a new feed name) - same outcome.
Tried the Adafruit example adafruitio_00_publish - with my config.h - same error, regardless of board.
I'm stuck right now. As the old sketches are working and the credentials are the same, the network is the same I can't figure why I suddenly can't connect.
How to further debug what is happening? Apart from the obvious printing the io.statusText().
Any problems on your side that hasn't been communicated?
Number of dashboards, feeds or devices exceeded shouldn't be a problem as I'm IO+ customer.
Please help as I'm out of ideas.
Thanks in advance!

User avatar
Frasse
 
Posts: 7
Joined: Sun Mar 13, 2022 4:43 pm

Re: ESP8266 Network disconnected. Disconnected from Adafruit IO.

Post by Frasse »

I've continued to try to narrow down the problem and tried the Simple HTTP Get Webclient Test and this works FINE which I think is proof of my network is in working order. This test was made on the ESP8266 Feather Huzzah board.

User avatar
Frasse
 
Posts: 7
Joined: Sun Mar 13, 2022 4:43 pm

Re: ESP8266 Network disconnected. Disconnected from Adafruit IO.

Post by Frasse »

Another test using the Adafruit MQTT Library ESP8266 Adafruit IO SSL/TLS example was made on the ESP8266 Feather Huzzah board.
This also works FINE.
So it's now only the original problem, connecting to Adafruit IO remaining.
Please, any suggestions are more than welcome.

User avatar
Frasse
 
Posts: 7
Joined: Sun Mar 13, 2022 4:43 pm

Re: ESP8266 Network disconnected. Disconnected from Adafruit IO.

Post by Frasse »

ESP8266 Feather Huzzah
Debug information:

18:22:36.402 -> connected with TrixinetM, channel 1
18:22:36.402 -> dhcp client start...
18:22:36.844 -> Network disconnected.
18:22:37.319 -> Network disconnected.
18:22:37.839 -> Network disconnected.
18:22:38.319 -> Network disconnected.
18:22:38.440 -> ip:192.168.68.102,mask:255.255.255.0,gw:192.168.68.1
18:22:38.960 -> BSSL:_connectSSL: start connection
18:22:39.160 -> BSSL:CERT: 30 82 06 79 30 82 05 61 a0 03 02 01 02 02 10 01 09 96 06 3d 3d 1e 1a 26 7e 0e 79 cd 66 76 5e 30 0d 06 09 2a 86 48 86 f7 0d 01 01 0b 05 00 30 5e 31 0b 30 09 06 03 55 04 06 13 02 55 53 31 15 30 13 06 03 55 04 0a 13 0c 44 69 67 69 43 65 72 74 20 49 6e 63 31 19 30 17 06 03 55 04 0b 13 10 77 77 77 2e 64 69 67 69 63 65 72 74 2e 63 6f 6d 31 1d 30 1b 06 03 55 04 03 13 14 47 65 6f 54 72 75 73 74 20 52 53 41 20 43 41 20 32 30 31 38 30 1e 17 0d 32 32 30 38 30 39 30 30 30 30 30 30 5a 17 0d 32 33 30 39 30 31 32 33 35 39 35 39 5a 30 6e 31 0b 30 09 06 03 55 04 06 13 02 55 53 31 11 30 0f 06 03 55 04 08 13 08 4e 65 77 20 59 6f 72 6b 31 11 30 0f 06 03 55 04 07 13 08 4e 65 77 20 59 6f 72 6b 31 20 30 1e 06 03 55 04 0a 13 17 41 64 61 66 72 75 69 74 20 49 6e 64 75 73 74 72 69 65
18:22:39.200 -> BSSL:CERT: 73 20 4c 4c 43 31 17 30 15 06 03 55 04 03 0c 0e 2a 2e 61 64 61 66 72 75 69 74 2e 63 6f 6d 30 82 01 22 30 0d 06 09 2a 86 48 86 f7 0d 01 01 01 05 00 03 82 01 0f 00 30 82 01 0a 02 82 01 01 00 b9 0e 74 f6 33 0b 35 98 8a b8 9c 18 70 ad 40 62 c5 62 d7 ed 7d f7 d4 1d 0f 3c 37 09 bf c1 7a 53 22 74 5a 24 d4 c1 bf 32 8a 6e 3f 99 c4 25 a9 bd 44 71 42 45 0e 9a f1 52 9c 5a 55 6a 96 15 5f 0d 93 2f 3d 1d 37 01 d2 a6 90 d8 67 6c 00 e4 63 f3 c6 52 c8 f0 7b 02 00 d0 5d 1a fd ef 35 af 3e e3 20 be 45 4a b7 1e 29 41 cd 0b 11 cd f3 46 11 52 b8 fe 6b ed ad ca 1c 12 bb e5 2a f6 95 24 f8 bc 34 c1 8f 9c 4e 57 2c 48 d5 e2 12 9c 95 ed 0f 03 d2 d4 89 70 14 bd b3 f8 fa 5a 96 98 8c 79 dd 10 26 cd 45 5a 1c 7f 10 cf ee ec 6a 86 76 52 3d cf 34 07 f9 37 71 de 03 dd 67 e8 eb 8c b0 3a b3 81 4b
18:22:39.320 -> BSSL:CERT: 6f 5b a5 4c 3c eb 4b 30 cb 9e c1 10 fa 96 90 6b fe 80 b7 5e 9b c5 f1 d4 56 3c 43 b4 0c 02 63 28 ea dc 32 22 a7 86 16 11 14 77 12 c6 4d 8a bf 1b 60 5b 13 08 e4 2d ee 31 88 d1 2d e1 3e 8e 7d 02 03 01 00 01 a3 82 03 21 30 82 03 1d 30 1f 06 03 55 1d 23 04 18 30 16 80 14 90 58 ff b0 9c 75 a8 51 54 77 b1 ed f2 a3 43 16 38 9e 6c c5 30 1d 06 03 55 1d 0e 04 16 04 14 49 76 de 1a 10 59 ee d7 94 3b 7a fb 32 44 c5 de d3 7a bb bb 30 27 06 03 55 1d 11 04 20 30 1e 82 0e 2a 2e 61 64 61 66 72 75 69 74 2e 63 6f 6d 82 0c 61 64 61 66 72 75 69 74 2e 63 6f 6d 30 0e 06 03 55 1d 0f 01 01 ff 04 04 03 02 05 a0 30 1d 06 03 55 1d 25 04 16 30 14 06 08 2b 06 01 05 05 07 03 01 06 08 2b 06 01 05 05 07 03 02 30 3e 06 03 55 1d 1f 04 37 30 35 30 33 a0 31 a0 2f 86 2d 68 74 74 70 3a 2f 2f 63 64
18:22:39.360 -> BSSL:CERT: 70 2e 67 65 6f 74 72 75 73 74 2e 63 6f 6d 2f 47 65 6f 54 72 75 73 74 52 53 41 43 41 32 30 31 38 2e 63 72 6c 30 3e 06 03 55 1d 20 04 37 30 35 30 33 06 06 67 81 0c 01 02 02 30 29 30 27 06 08 2b 06 01 05 05 07 02 01 16 1b 68 74 74 70 3a 2f 2f 77 77 77 2e 64 69 67 69 63 65 72 74 2e 63 6f 6d 2f 43 50 53 30 75 06 08 2b 06 01 05 05 07 01 01 04 69 30 67 30 26 06 08 2b 06 01 05 05 07 30 01 86 1a 68 74 74 70 3a 2f 2f 73 74 61 74 75 73 2e 67 65 6f 74 72 75 73 74 2e 63 6f 6d 30 3d 06 08 2b 06 01 05 05 07 30 02 86 31 68 74 74 70 3a 2f 2f 63 61 63 65 72 74 73 2e 67 65 6f 74 72 75 73 74 2e 63 6f 6d 2f 47 65 6f 54 72 75 73 74 52 53 41 43 41 32 30 31 38 2e 63 72 74 30 09 06 03 55 1d 13 04 02 30 00 30 82 01 7f 06 0a 2b 06 01 04 01 d6 79 02 04 02 04 82 01 6f 04 82 01 6b 01 69
18:22:39.440 -> BSSL:CERT: 00 77 00 e8 3e d0 da 3e f5 06 35 32 e7 57 28 bc 89 6b c9 03 d3 cb d1 11 6b ec eb 69 e1 77 7d 6d 06 bd 6e 00 00 01 82 83 b0 89 dc 00 00 04 03 00 48 30 46 02 21 00 d0 e9 18 72 b5 8f ff a5 80 dd a3 82 c7 c0 5b 54 f4 64 c5 b4 1c 46 3c 47 f0 27 dc 23 fd 19 3d 1b 02 21 00 8a 33 32 63 09 da a3 dd 59 90 08 2b 2b 00 23 96 c2 1b c9 cf 77 24 fa 47 fc 83 37 c4 9e 33 3c 86 00 75 00 35 cf 19 1b bf b1 6c 57 bf 0f ad 4c 6d 42 cb bb b6 27 20 26 51 ea 3f e1 2a ef a8 03 c3 3b d6 4c 00 00 01 82 83 b0 89 46 00 00 04 03 00 46 30 44 02 20 64 b9 ce d1 51 6b a2 79 f9 e5 22 fb c5 9a e5 03 24 26 12 be 24 b0 a4 cc 31 1e ef 36 8b 03 12 02 02 20 3a 85 b0 33 7d 31 51 00 d1 ca 1e 25 4d 71 dc 6e 94 72 02 e9 38 45 a0 7c e3 d2 c9 77 bb 35 47 d3 00 77 00 b3 73 77 07 e1 84 50 f8 63 86 d6 05 a9
18:22:39.480 -> BSSL:CERT: dc 11 09 4a 79 2d b1 67 0c 0b 87 dc f0 03 0e 79 36 a5 9a 00 00 01 82 83 b0 89 89 00 00 04 03 00 48 30 46 02 21 00 81 43 6a 7f 00 c8 4c dc c2 fc 90 c1 34 26 7c f3 cf 8d 70 76 5e 35 9a 66 67 16 a8 68 ba 7a 73 09 02 21 00 fd 0a d4 a9 76 37 fb 7a 66 2c 41 e1 db 27 97 a7 2c f8 3a 89 73 37 2a 80 56 90 82 b1 97 c6 45 7f 30 0d 06 09 2a 86 48 86 f7 0d 01 01 0b 05 00 03 82 01 01 00 3b d2 56 22 8a df 89 db ac 7d 52 5c 03 d6 d0 f5 db 3a ec 8f f6 1c a1 eb ac 19 57 9c 4c 7d 9e f6 d3 4f 68 af 36 62 54 d4 8d b1 b3 48 42 a2 1c 27 69 31 3f 87 6c 1f bd b6 5b 1c 0f a0 92 68 20 52 a0 12 60 88 da 96 3c ca 24 85 7a 13 fe ed 24 da 5b aa 03 7a 93 4e a8 95 f0 34 f4 c9 d9 f2 36 9d e4 b8 d0 7c 7f 8d 93 52 11 56 78 32 4d 55 d5 f4 b7 3f 82 a0 8e 76 74 6a ac bc c9 26 f9 53 14 f7 cc 62 31
18:22:39.560 -> BSSL:CERT: 15 70 42 fa 4e ff 0f 79 45 7b 02 bb 3d 23 92 4f a4 c4 d6 6a d3 04 8e 9f e1 ca 2c 38 da d2 ef 6a f1 0b c3 7d e3 6a 62 7b 3a 59 63 64 47 f6 ac 7d 61 e9 03 05 b0 bb 2a 58 dd b9 8c d7 e8 2a 51 11 2e 62 0d af 0f 9e a4 6c 4b bf 01 8e e0 f0 80 d1 b4 21 c2 4a 79 b1 0f 7f 7b 23 2a f8 4b d2 56 fe e7 80 9e c5 8e ac 35 4a b4 72 2e 8d 1d 72 14 86 79 d2 73 e0 6e 22 88 36 0f b0 15 0d ad
18:22:39.560 -> BSSL:insecure_end_chain: Received cert FP doesn't match
18:22:39.600 -> BSSL:insecure_end_chain: expected 59 3c 48 0a b1 8b 39 4e 0d 58 50 47 9a 13 55 60 cc a0 1d af
18:22:39.600 -> BSSL:insecure_end_chain: received 18 c0 c2 3d be dd 81 37 73 40 e7 e4 36 61 cb 0a df 96 ad 25
18:22:39.600 -> BSSL:_wait_for_handshake: failed
18:22:39.600 -> BSSL:Couldn't connect. Error = 'Chain could not be linked to a trust anchor.'
18:22:39.600 -> Disconnected from Adafruit IO.

This, to me, looks lika a SSL certificate problem.
How to update the SSL certificate?
Updated the library after the SSL incident during summer, causing all ESP8266 sketches using ESP.deepSleep(IO_LOOP_DELAY); to stop working.
How come the "older feeds" still work and can reconnect?

User avatar
Frasse
 
Posts: 7
Joined: Sun Mar 13, 2022 4:43 pm

Re: ESP8266 Network disconnected. Disconnected from Adafruit IO.

Post by Frasse »

Update:
Found the definition of the Adafruit SSL certificate in the AdafruitIO_Definitions.h and found it differed from the one expected.
Changing it in the library to a matching key allowed the sketch to connect.
This led me to think the library had been updated since my last working sketch.
And alas, a library update was found for AdafruitIO Arduino which incorporated the change of the Adafruit IO SSL certificate.
Now all is well and has taught me to regularly check for updates of the libraries.
Should have known since the August 11 SSL incident!
Thanks, case closed.

User avatar
giraldj1
 
Posts: 3
Joined: Sat Oct 29, 2022 7:01 pm

Re: ESP8266 Network disconnected. Disconnected from Adafruit IO.

Post by giraldj1 »

Hi Frasse. Can I ask you a favor. Can you post the exact change you made to the Definitions file. I am a noob but managed to narrow down same issue to SSL with same troubleshooting steps. However, I had installed the IO libraries in Arduino IDE on Oct 29th so not sure why it is still not working for me on my ESP8266 Huzzah. Ty.

User avatar
Frasse
 
Posts: 7
Joined: Sun Mar 13, 2022 4:43 pm

Re: ESP8266 Network disconnected. Disconnected from Adafruit IO.

Post by Frasse »

Hi Ty,
I changed the entry in AdafruitIO_Definitions.h

#define AIO_SSL_FINGERPRINT "old SSL certificate hex string"
to
#define AIO_SSL_FINGERPRINT "18 C0 C2 3D BE DD 81 37 73 40 E7 E4 36 61 CB 0A DF 96 AD 25"
which the debug window (using debug told me what was expected.)

Excerpts from the debug below:

18:22:39.560 -> BSSL:insecure_end_chain: Received cert FP doesn't match
18:22:39.600 -> BSSL:insecure_end_chain: expected 59 3c 48 0a b1 8b 39 4e 0d 58 50 47 9a 13 55 60 cc a0 1d af
18:22:39.600 -> BSSL:insecure_end_chain: received 18 c0 c2 3d be dd 81 37 73 40 e7 e4 36 61 cb 0a df 96 ad 25

Please check if the SSL fingerprint in your AdafruitIO_Definitions.h matches the one received.

Hope this helps.

/Frasse

User avatar
giraldj1
 
Posts: 3
Joined: Sat Oct 29, 2022 7:01 pm

Re: ESP8266 Network disconnected. Disconnected from Adafruit IO.

Post by giraldj1 »

Thank you for the prompt response, Frasse, and for confirming. And yes, I had gathered as much from the debug you posted. I only asked because at this point I am not confident if I am interpreting anything correctly.

Unfortunately, there must be something else going on I am not able to figure out. I've tried many example sketches (See attachment for reference). I've tried port forwarding just in case. I've even managed to connect with Homekit with another ESP8266 library.

For some reason, I just cannot connect to Adafruit IO with my Adafruit Huzzah ESP8266.

At any rate, thank you for the suggestion.
Attachments
sketch.PNG
sketch.PNG (254.27 KiB) Viewed 260 times

User avatar
Frasse
 
Posts: 7
Joined: Sun Mar 13, 2022 4:43 pm

Re: ESP8266 Network disconnected. Disconnected from Adafruit IO.

Post by Frasse »

Hi again,
I just tried the sketch you are trying to run which I assume is the example from
Adafruit MQTT Library/adafruitio_secure_esp8266.ino

without any changes except for your network info and AIO credentials.

It ran just fine on my Adafruit Huzzah ESP8266 board.
Output as below:

Connecting to myNetwork
.......
WiFi connected
IP address:
myIPAddress
Connecting to MQTT... MQTT Connected!

Sending val 0 to test feed...OK!

Sending val 1 to test feed...OK!

Do you have another ESP8266 board to try on?

User avatar
giraldj1
 
Posts: 3
Joined: Sat Oct 29, 2022 7:01 pm

Re: ESP8266 Network disconnected. Disconnected from Adafruit IO.

Post by giraldj1 »

Hi. No. I only have the one. I also thought of getting another one, but I thought maybe I should exhaust all possible root causes first in the true spirit of a maker. And exhausted I am now. lol.

The last thing I did was mess with flash mode because I found some obscure troubleshooting instructions. And recently I started thinking maybe this thing has a mac address that needs to be whitelisted.

So, yes, I think it is time to take a break. And, if I get another one it will most likely be an ESP32 instead fo sho.

Cheers.

Locked
Forum rules
If you're posting code, please make sure your code does not include your Adafruit IO Active Key or WiFi network credentials.

Return to “Internet of Things: Adafruit IO and Wippersnapper”