0

Esp8266 won't connect to IO
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Esp8266 won't connect to IO

by jmarsan on Mon Jun 24, 2019 10:42 am

Hi - I'm following the instructions - https://learn.adafruit.com/adafruit-io- ... o/overview
and can't get past "connecting to adafruit io........." when viewing serial monitor.

I triple checked everything, the sketch compiles and uploads fine. I tested my Feather Huzzah esp8266 board for wifi connection using the Adafruit wifi test sketch and was successful in connecting to the Adafruit web server.

I re-installed Arduino IDE 1.8.9 and deleted the Arduino15 folder prior to install on Windows 10.
I'm using the following re-installed libraries with the Adafruit io example publish.
Esp8266 Board manager 2.5.2
Adafruit mqtt 1.03
Adafruit io 3.2.0
Arduino http Client 0.4.0
Copied and pasted the wifi credentials and my user name/key in the config.h file

Also, I'm not sure if Adafruit io has geo restrictions ? I'm trying to connect from Europe. Thought about SSL credentials but not sure how to update it on this board.

Thank you in advance

jmarsan
 
Posts: 6
Joined: Thu Aug 16, 2018 4:36 pm

Re: Esp8266 won't connect to IO

by brubell on Tue Jun 25, 2019 10:02 am

Could you copy/paste your config.h file below?

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

Re: Esp8266 won't connect to IO

by jmarsan on Tue Jun 25, 2019 12:04 pm

brubell wrote:Could you copy/paste your config.h file below?


Thanks you, here is my config.h file

Also, I'm getting "Disconnected from Adafruit io" on serial monitor when I changed
Serial.println(.); to Serial.println(io.statusText()); in the sketch.

Code: Select all | TOGGLE FULL SIZE
/************************ Adafruit IO Config *******************************/

// visit io.adafruit.com if you need to create an account,
// or if you need your Adafruit IO key.

#define IO_USERNAME  "jmarsan"
#define IO_KEY       "My key from the IO portal"


/******************************* WIFI **************************************/

// the AdafruitIO_WiFi client will work with the following boards:
//   - HUZZAH ESP8266 Breakout -> https://www.adafruit.com/products/2471
//   - Feather HUZZAH ESP8266 -> https://www.adafruit.com/products/2821
//   - Feather HUZZAH ESP32 -> https://www.adafruit.com/product/3405
//   - Feather M0 WiFi -> https://www.adafruit.com/products/3010
//   - Feather WICED -> https://www.adafruit.com/products/3056
//   - Adafruit PyPortal -> https://www.adafruit.com/product/4116
//   - Adafruit Metro M4 Express AirLift Lite -> https://www.adafruit.com/product/4000
//   - Adafruit AirLift Breakout -> https://www.adafruit.com/product/4201

#define WIFI_SSID "Livebox-E1EE-2"
#define WIFI_PASS "My pass key"


// uncomment the following line if you are using airlift
// #define USE_AIRLIFT

// uncomment the following line if you are using winc1500
// #define USE_WINC1500

// comment out the following lines if you are using fona or ethernet
#include "AdafruitIO_WiFi.h"

#if defined(USE_AIRLIFT) || defined(ADAFRUIT_METRO_M4_AIRLIFT_LITE)
  // Configure the pins used for the ESP32 connection
  #if !defined(SPIWIFI_SS) // if the wifi definition isnt in the board variant
    // Don't change the names of these #define's! they match the variant ones
    #define SPIWIFI SPI
    #define SPIWIFI_SS 10  // Chip select pin
    #define SPIWIFI_ACK 9  // a.k.a BUSY or READY pin
    #define ESP32_RESETN 6 // Reset pin
    #define ESP32_GPIO0 -1 // Not connected
  #endif
  AdafruitIO_WiFi io(IO_USERNAME, IO_KEY, WIFI_SSID, WIFI_PASS, SPIWIFI_SS, SPIWIFI_ACK, ESP32_RESETN, ESP32_GPIO0, &SPIWIFI);
#else
  AdafruitIO_WiFi io(IO_USERNAME, IO_KEY, WIFI_SSID, WIFI_PASS);
#endif
/******************************* FONA **************************************/

// the AdafruitIO_FONA client will work with the following boards:
//   - Feather 32u4 FONA -> https://www.adafruit.com/product/3027

// uncomment the following two lines for 32u4 FONA,
// and comment out the AdafruitIO_WiFi client in the WIFI section
// #include "AdafruitIO_FONA.h"
// AdafruitIO_FONA io(IO_USERNAME, IO_KEY);

/**************************** ETHERNET ************************************/

// the AdafruitIO_Ethernet client will work with the following boards:
//   - Ethernet FeatherWing -> https://www.adafruit.com/products/3201

// uncomment the following two lines for ethernet,
// and comment out the AdafruitIO_WiFi client in the WIFI section
// #include "AdafruitIO_Ethernet.h"
// AdafruitIO_Ethernet io(IO_USERNAME, IO_KEY);

jmarsan
 
Posts: 6
Joined: Thu Aug 16, 2018 4:36 pm

Re: Esp8266 won't connect to IO

by jmarsan on Mon Jul 01, 2019 9:54 am

Brubell.....any hope on my issue ?

jmarsan
 
Posts: 6
Joined: Thu Aug 16, 2018 4:36 pm

Re: Esp8266 won't connect to IO

by brubell on Mon Jul 01, 2019 10:45 am

I can't replicate this issue from my end with an identical setup, either on a work network or my home network.

Possibly try re-installing the libraries (you can downgrade them then upgrade again):

* ESP8266 Board Support Package 2.5.1
* Adafruit IO Arduino Library v3.2
* Adafruit MQTT Library v1.0 (or above)

Let me know if that works for you.

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

Re: Esp8266 won't connect to IO

by jmarsan on Tue Jul 02, 2019 9:54 am

Thank you very much......All is good now.

It was a combination of bad board manager library and router firewall port rules.

jmarsan
 
Posts: 6
Joined: Thu Aug 16, 2018 4:36 pm

Please be positive and constructive with your questions and comments.