๐ŸŽ„โ›„โ„๏ธ๐ŸŽ It's beginning to look a lot like ADABOX-mas! The next ADABOX from Adafruit ships soon! Get yours now, or give as a gift! ๐ŸŽ„โ›„โ„๏ธ๐ŸŽ
0

ESP8266 Disconeected 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.
Please be positive and constructive with your questions and comments.

ESP8266 Disconeected from Adafruit IO

by bharwood on Mon Nov 04, 2019 1:36 am

Hello, I'm working on the Cloud Connected Power Meter guide found here: https://learn.adafruit.com/build-a-clou ... he-project

My circuit is the same and I'm using the code from the github. I was having this error originally when running the Github code. I did change 4 lines of code. I changed ssid to the SSID of my network and the password to the password for my network. I also added my AIO USERNAME and AIO_KEY from adafruit.io clicking on AIO KEY.

Connecting to MYSSID
.
WiFi connected
IP address:
10.0.0.91
Connecting to Adafruit IO...
Exception (3):
epc1=0x4020a940 epc2=0x00000000 epc3=0x00000000 excvaddr=0x4023dae1 depc=0x00000000

>>>stack>>>

ctx: cont
sp: 3ffffd60 end: 3fffffc0 offset: 01a0
3fffff00: 4023dae1 d47c0734 402085f0 d47c0734
3fffff10: 3ffee3ba 3ffee398 3ffee3fb 4020297a
3fffff20: 3ffe85f2 3ffee3ba 3ffee398 3ffee66c
3fffff30: 3ffe85f2 3ffee3ba 3ffee398 40202bca
3fffff40: 40105848 3ffee604 0000001c 40204953
3fffff50: 3ffedd40 3ffee740 3ffe8528 3ffee66c
3fffff60: 3ffe85f2 3ffee398 3ffee604 402013d8
3fffff70: 4020622a 000003e8 000003e8 3ffee66c
3fffff80: 3ffe85f2 3ffee4ac 3ffee330 40201512
3fffff90: 402085f0 5b00000a feefeffe feefeffe
3fffffa0: 3fffdad0 00000000 3ffee63c 402054bc
3fffffb0: feefeffe feefeffe 3ffe8528 40101099
<<<stack<<<

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

load 0x4010f000, len 1384, room 16
tail 8
chksum 0x2d
csum 0x2d
v8b899c12
~ld


Results from Exception Decoder:
Exception 3: LoadStoreError: Processor internal physical address or data error during load or store
PC: 0x4020a940
EXCVADDR: 0x4023dae1

Decoding stack results
0x4020297a: Adafruit_MQTT::connectPacket(unsigned char*) at D:\Users\Braden\Documents\Arduino\libraries\Adafruit_MQTT_Library\Adafruit_MQTT.cpp line 626
0x40202bca: Adafruit_MQTT::connect() at D:\Users\Braden\Documents\Arduino\libraries\Adafruit_MQTT_Library\Adafruit_MQTT.cpp line 155
0x40204953: HardwareSerial::write(unsigned char) at C:\Users\User\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.5.2\cores\esp8266/HardwareSerial.h line 154
0x402013d8: connect() at D:\Users\Braden\Documents\Arduino\adafruitio_00_publish\sketch_nov03a/sketch_nov03a.ino line 229
0x4020622a: delay(unsigned long) at C:\Users\User\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.5.2\cores\esp8266\core_esp8266_wiring.cpp line 57
0x40201512: setup() at D:\Users\Braden\Documents\Arduino\adafruitio_00_publish\sketch_nov03a/sketch_nov03a.ino line 105
0x402054bc: loop_wrapper() at C:\Users\User\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.5.2\cores\esp8266\core_esp8266_main.cpp line 122


It repeated loops this with the LED in the circuit flashing and then the OLED flashing Ready! back and forth. I found a temporary solution online which suggested removing PROGMEM from any line that it was in, in the code itself. This seemed to fix the above error. Now the error message I get is:

Code: Select all | TOGGLE FULL SIZE
Connecting to MYSSID
.
WiFi connected
IP address:
10.0.0.91
Connecting to Adafruit IO... Connection failed
Retrying connection...
Connection failed
Retrying connection...
Connection failed
Retrying connection...



I'm not sure what is causing the issue. I've also run the following sketch found here https://learn.adafruit.com/adafruit-io- ... e-sketches. The adafruit IO library example sketch adafruitio_00_publish and changed while loop to print out io.statusText instead of .'s. I also setup the config.h file with my SSID, password, AIO username, and AIO key.

The change:
while(io.status() < AIO_CONNECTED) {
//Serial.print(".");
Serial.println(io.statusText());
delay(500);
}


When I run this to see if I can even connect to Adafruit IO, I get these messages
Network disconnected.
Network disconnected.
Network disconnected.
Network disconnected.
Network disconnected.
Network disconnected.
Disconnected from Adafruit IO.
Disconnected from Adafruit IO.
Disconnected from Adafruit IO.


It appears that it takes a little bit and then connects to my network and then doesn't connect to Adafruit IO.




At this point, I'm not sure why I can't even get the example sketches to connect to Adafruit IO. Any ideas?

bharwood
 
Posts: 1
Joined: Sun Nov 03, 2019 10:55 pm

Re: ESP8266 Disconeected from Adafruit IO

by brubell on Fri Nov 08, 2019 5:39 pm

Hi bharwood,

Could you try running this sketch to see if you can connect to Adafruit IO?
https://github.com/adafruit/Adafruit_MQ ... sp8266.ino

It might be your WiFi Network, can you run this sketch below to test your network connectivity?
https://learn.adafruit.com/adafruit-fea ... -wifi-6-33

brubell
 
Posts: 609
Joined: Fri Jul 17, 2015 10:33 pm

Please be positive and constructive with your questions and comments.