Though I’ve seen several threads on the ESP8266, I’ve been having quite the trouble getting all the libraries working with the ESP8266. I’m using the Adafruit Huzzah breakout version, but I doubt this is why I’ve been unable to get up and running with it and Cayenne. I’ve tried following @kreggly’s amazing guide on the subject, but I get a lot of error messages regarding undefined things in various libraries. Can anyone point me in the direction of some code or a guide for getting the ESP8266 online with Cayenne?
Thank you so much for any help, it’s been bothering me for quite a while so I thought I might as well reach out for some assistance.
After some troubleshooting, I no longer get any errors when uploading to the board. However, I still haven’t achieved base Cayenne connectivity yet.
Could it be on my Cayenne setup side? I don’t specify a model of Arduino (I do still enter the correct ssid, password, and token), so could that be a problem?
Take a look at your log in the Arduino IDE serial monitor and make sure you show Connected. If you are not getting anything, is GPIO15 still low, and GPIO0 floating? After programming, GPIO0 needs to go high again, and reset toggled. Also, is your CH_PD line high?
Some folks have really locked down routers and don’t allow outbound ports. Your device needs to get out to arduino.mydevices.com on port 8442. Most home routers allow all outbound ports, but most corporate networks lock stuff down pretty tightly.
In the Arduino IDE serial monitor, I get a constant stream of data (shown below), but no “Connected.” I can upload to the board without any issues by using the method Adafruit provides for toggling the bootloader and then resetting the board (a picture of the IDE console is below as well). Also, where can I find the CH_PD line?
I don’t think my router is blocking any outbound ports as I have an Arduino Uno connected to a RPi 3 over serial, which is running a script to connect it to Cayenne, and it works perfectly.
The ESP8266 package includes some modified version of libraries that are in the programfiles / Arduino / hardware folder … ( and these should be used )
I had a simulair problem with the DHT lib…
Under flash size, I’m not given 512K(64 SPIFFS) as an option. Perhaps because my version is new/has a larger flash storage? Also, I tried commenting out CAYENNE_DEBUG with no change in the output. I additionally experimented with both 115200 and 9600 baud rates with little difference. However, at 115200, every now and then the serial monitor pauses with this output:
You can try programming as a generic ESP8266 with the above flash and speed settings.
I’ve seen the reset like this due to running on battery power, running too fast, a bug in code using the wrong I/O. The ESP modules are pretty finicky.
You can try installing the add on to decode the exception stack dump, then copy and paste the stack from your serial monitor and see what it says. I’m stumped.