Nothing is working after the update to 3.7.0

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.
User avatar
robotgrrl
 
Posts: 38
Joined: Sat Apr 05, 2008 5:28 pm

Re: Nothing is working after the update to 3.7.0

Post by robotgrrl »

Also experiencing not having Adafruit IO connect. Updated the Adafruit IO and Adafruit MQTT libraries as per viewtopic.php?f=56&t=167114. Still not connecting. The adafruitio_00_publish example shows "Connecting to Adafruit IO" then dots. All the information in config.h is the same and double checked it. Using an Adafruit Feather SAMD21 with WINC1500 - this one https://www.adafruit.com/product/3010.

User avatar
robotgrrl
 
Posts: 38
Joined: Sat Apr 05, 2008 5:28 pm

Re: Nothing is working after the update to 3.7.0

Post by robotgrrl »

Update: The solution that worked here was to read the fabulous manual - https://learn.adafruit.com/adafruit-fea ... rtificates
Completed that, and it works again :) Thanks!

User avatar
john87
 
Posts: 36
Joined: Sun Jul 21, 2019 11:20 pm

Re: Nothing is working after the update to 3.7.0

Post by john87 »

@robotgrrl

I'm glad you found a solution. I'm not using any WINC1500 parts so I'll keep looking.

I am still wondering about the long term utility of these parts. Is there a plan for a seamless, no effort required transition.

(Maybe it's not possible; I had to deal with three Siemens PLCs around the world which quit working on the same day for a similar reason.)

User avatar
john87
 
Posts: 36
Joined: Sun Jul 21, 2019 11:20 pm

Re: Nothing is working after the update to 3.7.0

Post by john87 »

@brent
After a few trials, I got the right portion of the stack dump pasted so that it parsed. That gave

Decoding stack results
0x402011d8: loop() at C:\Users\john\Documents\Arduino\Adafruit_io_testHuzzah_not_secure/Adafruit_io_testHuzzah_not_secure.ino line 92
0x40203c6c: loop_wrapper() at C:\Users\john\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.6.3\cores\esp8266\core_esp8266_main.cpp line 180

line 92 is while ((subscription = mqtt.readSubscription(5000))) {
the last line in the ino is 143

User avatar
mandreko
 
Posts: 16
Joined: Sun Feb 24, 2019 12:39 pm

Re: Nothing is working after the update to 3.7.0

Post by mandreko »

The example MQTT sketch still doesn't work for me. I turned on all the debugging I could see, and I get this:

ets Jan 8 2013,rst cause:2, boot mode:(3,6)

load 0x4010f000, len 3664, room 16
tail 0
chksum 0xee
csum 0xee
v39c79d9b
~ld

SDK:2.2.2-dev(38a443e)/Core:2.7.2=20702000/lwIP:STABLE-2_1_2_RELEASE/glue:1.2-30-g92add50/BearSSL:5c771be
wifi evt: 2
Adafruit IO MQTTS (SSL/TLS) Example


Connecting to IoT
scandone
state: 0 -> 2 (b0)
state: 2 -> 3 (0)
.scandone
state: 3 -> 2 (b0)
..state: 2 -> 0 (2)
reconnect
wifi evt: 1
STA disconnect: 2
......scandone
state: 0 -> 2 (b0)
state: 2 -> 3 (0)
state: 3 -> 5 (10)
add 0
aid 2
cnt

connected with IoT, channel 6
dhcp client start...
wifi evt: 0
ip:172.16.69.118,mask:255.255.255.0,gw:172.16.69.1
wifi evt: 3
.
WiFi connected
IP address:
172.16.69.118
Connecting to MQTT... [hostByName] request IP for: io.adafruit.com
[hostByName] Host: io.adafruit.com IP: 52.7.124.212
:ref 1
BSSL:_connectSSL: start connection
:wr 220 0
:wrc 220 220 0
:er -14 0x00000000
BSSL:_wait_for_handshake: failed
BSSL:Couldn't connect. Error = 'Unknown error code.'
Connection failed
Retrying MQTT connection in 5 seconds...
[hostByName] request IP for: io.adafruit.com
[hostByName] Host: io.adafruit.com IP: 52.7.124.212
:ur 1
:dsrcv 0
:del
:ref 1
BSSL:_connectSSL: start connection
:wr 220 0
:wrc 220 220 0
:er -14 0x00000000
BSSL:_wait_for_handshake: failed
BSSL:Couldn't connect. Error = 'Unknown error code.'
Connection failed
Retrying MQTT connection in 5 seconds...
pm open,type:2 0
[hostByName] request IP for: io.adafruit.com
[hostByName] Host: io.adafruit.com IP: 52.7.124.212
:ur 1
:dsrcv 0
:del
:ref 1
BSSL:_connectSSL: start connection
:wr 220 0
:wrc 220 220 0
:er -14 0x00000000
BSSL:_wait_for_handshake: failed
BSSL:Couldn't connect. Error = 'Unknown error code.'
Connection failed
Retrying MQTT connection in 5 seconds...

--------------- CUT HERE FOR EXCEPTION DECODER ---------------

Soft WDT reset

>>>stack>>>

ctx: cont
sp: 3ffffde0 end: 3fffffc0 offset: 01a0
3fffff80: 00000001 3ffee710 3ffee910 4020119e
3fffff90: 3fffdad0 00000000 3ffee95c 402011ec
3fffffa0: 3fffdad0 00000000 3ffee95c 40207280
3fffffb0: feefeffe feefeffe 3ffe84f4 40101231
<<<stack<<<

User avatar
john87
 
Posts: 36
Joined: Sun Jul 21, 2019 11:20 pm

Re: Nothing is working after the update to 3.7.0

Post by john87 »

I was offered an update to the ESP8266 board package, which I installed, going from 2.63 to 2.72. The results are pretty much the same, it's run a while but is still failing. The stack decode is:


Decoding stack results
0x40201182: MQTT_connect() at C:\Users\john\Documents\Arduino\Adafruit_io_testHuzzah_not_secure/Adafruit_io_testHuzzah_not_secure.ino line 137
0x402011d8: loop() at C:\Users\john\Documents\Arduino\Adafruit_io_testHuzzah_not_secure/Adafruit_io_testHuzzah_not_secure.ino line 92
0x40203cf4: loop_wrapper() at C:\Users\john\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.7.2\cores\esp8266\core_esp8266_main.cpp line 197

I see now that the large line number, 197, is not in my code but in the core.
John

User avatar
The_Bucho
 
Posts: 5
Joined: Thu Dec 20, 2018 6:14 pm

Re: Nothing is working after the update to 3.7.0

Post by The_Bucho »

I'm having a similar problem, though only when I use the Ethernet wing.

My Huzzah32 is able to connect to io just fine through wifi, but the project will be installed in some locations where wifi is unavailable, so I'm adding a version of the sketch to enable an ethernet wing.

When the wing is used, the serial monitor will print "Connecting to Adafruit IO" and stay there. In fact, the while loop doesn't seem to be running so I'm not sure that io.connect() is even executing. I'm not seeing "." printed on the monitor to indicate that the function ran at all.

Getting this ethernet wing to work has been very difficult. I was working on it three months ago, quit, and came back to it yesterday. Still no luck.

User avatar
mandreko
 
Posts: 16
Joined: Sun Feb 24, 2019 12:39 pm

Re: Nothing is working after the update to 3.7.0

Post by mandreko »

I've basically given up on it. I can get ThingSpeak, MyDevices, and HomeAssistant/ESPHome to work on the same ESP8266 device, but IO just fails unless I use my phone's WiFi.

User avatar
The_Bucho
 
Posts: 5
Joined: Thu Dec 20, 2018 6:14 pm

Re: Nothing is working after the update to 3.7.0

Post by The_Bucho »

The_Bucho wrote:I'm having a similar problem, though only when I use the Ethernet wing.

My Huzzah32 is able to connect to io just fine through wifi, but the project will be installed in some locations where wifi is unavailable, so I'm adding a version of the sketch to enable an ethernet wing.

When the wing is used, the serial monitor will print "Connecting to Adafruit IO" and stay there. In fact, the while loop doesn't seem to be running so I'm not sure that io.connect() is even executing. I'm not seeing "." printed on the monitor to indicate that the function ran at all.

Getting this ethernet wing to work has been very difficult. I was working on it three months ago, quit, and came back to it yesterday. Still no luck.
Forgot to mention that I can see that my feather wing on my Huzzah32 is indeed getting an ip address from my router (eero pro), verifying that the ethernet is working...there's just no one home at adafruit.io and the io.connect() function is hung up somehow...

From reading around, I suppose this is possibly from the SSL update and the fingerprint of the cert is not updated in the ethernet library....but there's no suggestion here in the forum of that problem applying to the ethernet feather...only to wifi and WINC1500.

User avatar
brubell
Learn User Page
 
Posts: 2010
Joined: Fri Jul 17, 2015 10:33 pm

Re: Nothing is working after the update to 3.7.0

Post by brubell »

From reading around, I suppose this is possibly from the SSL update and the fingerprint of the cert is not updated in the ethernet library....but there's no suggestion here in the forum of that problem applying to the ethernet feather...only to wifi and WINC1500.
Does the Adafruit MQTT Ethernet example work for you? https://github.com/adafruit/Adafruit_MQ ... t_ethernet

This example uses the insecure SSL port (1883) to connect to Adafruit IO

User avatar
digitalBrad
 
Posts: 1
Joined: Mon Jan 30, 2017 1:38 am

Re: Nothing is working after the update to 3.7.0

Post by digitalBrad »

I ran into the same issue. The sample code is great if you only want to focus on non-SSL connections. If you are using a generic ESP8266 and you want to use SSL/TLS, you'll need manually set the SHA-1 fingerprint.

Your code should look something like:

Code: Select all

#define AIO_SERVER      "io.adafruit.com"
#define AIO_SERVERPORT  8883
// Adafruit IO Account Configuration
#define AIO_USERNAME    "username"
#define AIO_KEY         "your key"

// WiFiFlientSecure for SSL/TLS support
WiFiClientSecure client;

// Setup the MQTT client class by passing in the WiFi client and MQTT server and login details.
Adafruit_MQTT_Client mqtt(&client, AIO_SERVER, AIO_SERVERPORT, AIO_USERNAME, AIO_KEY);

// io.adafruit.com SHA1 fingerprint
static const char *fingerprint PROGMEM = "59 3C 48 0A B1 8B 39 4E 0D 58 50 47 9A 13 55 60 CC A0 1D AF";

Adafruit_MQTT_Subscribe myTopic = Adafruit_MQTT_Subscribe(&mqtt, AIO_USERNAME "/feeds/myTopic", MQTT_QOS_1);

void MQTT_connect();

void setup () {
  // check the fingerprint of io.adafruit.com's SSL cert. Pay attention!!! This is where the magic happens.
  client.setFingerprint(fingerprint);
  // Initialize MQTT Client
  mqtt.subscribe(&myTopic);
  MQTT_connect();
}
Obviously, there are a lot of parts missing in the snippet. You can't copy/paste and expect it to work. The key things to note are:

[*]You must manually capture the fingerprint. Don't trust my code - use your browser to verify the SSL cert and get the fingerprint yourself.
[*]You must tell the MQTT client about it in the setup routine.

User avatar
cjlardy
 
Posts: 1
Joined: Wed Jan 22, 2020 2:48 am

Re: Nothing is working after the update to 3.7.0

Post by cjlardy »

I recommend anyone having problems try unplugging ALL your Adafruit IO devices for a while. That seemed to work for me.

I've been having similar problems since the update. I'm not an advanced user at all, but prior to the update I had been successfully using Adafruit IO for several months, with zero issues. I have 4 NodeMcu ESP8266 boards that I use constantly (they are driving smart home devices, and are subscribed to different feeds).

In July (I think it was July 11), all 4 NodeMCU boards stopped connecting to MQTT. I checked my feeds on the Adafruit site and saw the message about the certificate update. I unplugged the boards and immediately plugged them back in, and that solved the problem.

Then today, August 6, all 4 boards stopped working again. They were connected to the network (they had IPs, and my router reported they were connected). I unplugged them and immediately plugged them back in again, but that didn't work this time. I started troubleshooting on a spare WeMos D1 Mini ESP8266 board, and it had the exact same problem (it connected to wireless, but not MQTT).

I updated the Adafruit IO and MQTT libraries, and uploaded my software again to the WeMos board, but that didn't help. Even the example mqtt_esp8266 didn't work. It connected to wireless and got an IP, but couldn't connect to MQTT.

MQTT Dash stopped working, too. It would not connect anymore. It too had been working fine for several months. The only thing that was still working was the IFTTT interface I use for publishing. It was working fine, publishing data. But nothing else could connect.

Adafruit IO Monitor said my account had no errors. I publish several times a day, but nowhere near the rate limit.

I unplugged all 4 boards and closed MQTT Dash. I left them all unplugged for over an hour. I forgot I had the WeMos board still running, looping and continuously trying to connect. I left everything and came back over an hour later, and the WeMos board had connected! I had left Arduino Serial Monitor running, and it showed it had connected shortly after I unplugged all my other devices.

I checked MQTT Dash, and it was working again. I plugged all 4 NodeMCU boards back in, and they are all working again. I didn't make any changes to anything. It was all the same software, same libraries. The only thing I changed was switching MQTT Dash to a secure connection as part of my troubleshooting, but it still had not been able to connect when I tried that.

I'm really confused, but I'm glad it's working, for now. I hope this helps someone, and please let me know if anyone has any ideas on what might be going on. Maybe it's not related to the update at all.

User avatar
john87
 
Posts: 36
Joined: Sun Jul 21, 2019 11:20 pm

Re: Nothing is working after the update to 3.7.0

Post by john87 »

@mandreko, et. al.

My various 8266 devices are now reporting to io.adafruit.com. I haven't paid too much attention but it seemed there were several days where the two under test would connect after some time (hours) then run for hours and go offline. I recompiled my old programs for two devices and they are working as before. One of them was unpowered for weeks, the other was powered but not connected.

It's all rather frustrating; I wish I knew what kept them from working with the 3.7.0 update.

Good luck to all!

User avatar
Pisob
 
Posts: 1
Joined: Thu Sep 17, 2020 4:55 am

Re: Nothing is working after the update to 3.7.0

Post by Pisob »

I found this topic while searching for solution to my issues with connecting ESP8266 to the Adafruit IO. I tried to use two WiFi networks which my university has without luck. On the other hand when I tried to use WiFi network hosted by my phone I was able to connect and send data (same sketch). Something seems broken.

User avatar
oesterle
 
Posts: 806
Joined: Tue Sep 17, 2013 11:32 pm

Re: Nothing is working after the update to 3.7.0

Post by oesterle »

Hi, Pisob!

Welcome to the Forums!

You'll get attention to your issue if you start a new topic. This is an older thread; and also, we like to solve different issues in separate threads to avoid confusing the original poster.

Cheers,

Eric

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”