Huzzah ESP8266 Wifi - Unable to Connect to Internet

Please tell us which board you are using.
For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
Ritgrad83
 
Posts: 24
Joined: Tue Aug 18, 2015 11:17 pm

Huzzah ESP8266 Wifi - Unable to Connect to Internet

Post by Ritgrad83 »

ESP8266_Support.pdf
The code does not reveal my SSID and Password
(308.7 KiB) Downloaded 3 times
I am trying to establish wifi connection using my Huzzah ESP8266 Feather using "Connecting via WiFi" example on this page - https://learn.adafruit.com/adafruit-fea ... rduino-ide. I believe the board is connected and able to upload the program but when I open the Serial Monitor to see the results - all I get are a series of dots. I checked my SSID and Password - but it didn't display a "Connection Failed" message or any message. I have attached screenshots and code information along with Arduino IDE board manager info

Code: Select all

/*
 *  Simple HTTP get webclient test
 */

#include <ESP8266WiFi.h>

const char* ssid     = "yourssid";
const char* password = "yourpassword";

const char* host = "wifitest.adafruit.com";

void setup() {
  Serial.begin(115200);
  delay(100);

  // We start by connecting to a WiFi network

  Serial.println();
  Serial.println();
  Serial.print("Connecting to ");
  Serial.println(ssid);
  
  WiFi.begin(ssid, password);
  
  while (WiFi.status() != WL_CONNECTED) {
    delay(500);
    Serial.print(".");
  }

  Serial.println("");
  Serial.println("WiFi connected");  
  Serial.println("IP address: ");
  Serial.println(WiFi.localIP());
}

int value = 0;

void loop() {
  delay(5000);
  ++value;

  Serial.print("connecting to ");
  Serial.println(host);
  
  // Use WiFiClient class to create TCP connections
  WiFiClient client;
  const int httpPort = 80;
  if (!client.connect(host, httpPort)) {
    Serial.println("connection failed");
    return;
  }
  
  // We now create a URI for the request
  String url = "/testwifi/index.html";
  Serial.print("Requesting URL: ");
  Serial.println(url);
  
  // This will send the request to the server
  client.print(String("GET ") + url + " HTTP/1.1\r\n" +
               "Host: " + host + "\r\n" + 
               "Connection: close\r\n\r\n");
  delay(500);
  
  // Read all the lines of the reply from server and print them to Serial
  while(client.available()){
    String line = client.readStringUntil('\r');
    Serial.print(line);
  }
  
  Serial.println();
  Serial.println("closing connection");
}
 

User avatar
Ritgrad83
 
Posts: 24
Joined: Tue Aug 18, 2015 11:17 pm

Re: Huzzah ESP8266 Wifi - Unable to Connect to Internet

Post by Ritgrad83 »

I finally figured it out - the SSID is case sensitive - so once I changed the SSID to match exactly was shown on the network listing - I got the printout that it connected and it is working

Locked
Please be positive and constructive with your questions and comments.

Return to “Feather - Adafruit's lightweight platform”