Example sketches for the new Arduino IDE for ESP8266

Moderator: igrr

User avatar
By reaper7
#21769 1.6.5 + 1.6.4-835-g77d77e8 (and on my own compilation the same issue)
code:
Code: Select all#include <WiFiClient.h>
#include <EEPROM.h>
#include <ESP8266mDNS.h>
#include <WiFiManager.h>

WiFiManager wifi(0);

void setup() {
  Serial.begin(115200);
  delay(10);
  Serial.println();
  Serial.println("INIT");

  wifi.autoConnect("AP_FOR_CONF");

  Serial.println("DONE");
}

void loop() {
}
and log:
Code: Select allINIT

AutoConnect
Reading EEPROM SSID
SSID:
[00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00]
Reading EEPROM Password
Password:
[00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00][00]
Waiting for Wifi to connect
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

Could not connect to WiFi
Started Soft Access Point

WiFi connected
0.0.0.0
192.168.4.1
mDNS responder started
Server started
New client
Request:
/
scan done
HERE A LIST OF APs (12psc)
Sending config page
Done with client
so, between "/" and "scan done" I got on android device webbrowser TIMEOUT (but this happens 2-3sec after starting page viewing):
Image

HelloServer example (in AP mode) works well without any timeout
Last edited by reaper7 on Sat Jun 27, 2015 2:50 am, edited 1 time in total.
User avatar
By alextu
#21886 @reaper7
i ve just update to the latest staging release from
http://arduino.esp8266.com/staging/pack ... index.json
rebuilt, and it seems to work fine from me, here s my debug:

```
AutoConnect
Reading EEPROM SSID
SSID:
Go
Reading EEPROM Password
Password:
re
Waiting for Wifi to connect
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

Could not connect to WiFi
Started Soft Access Point

WiFi connected
0.0.0.0
192.168.4.1
mDNS responder started
Server started
New client
Request:
/
scan done
Ae
-78
HP-Print-EA-Deskjet 3520 series
-89
Tia Network 2
-88
HUGO
-86
GEGE
-84
NFS2014
-84
RomTelecom-WEP-E783
-90
Sending config page
Done with client
New client
Request:
/s?ssid=Ae&pass=re
Ae

re

Wrote:
A
Wrote:
e

u
Wrote:
n
Wrote:

Wrote:
r
Wrote:
e


Saved WiFiConfig...restarting.
Setup done
```
it takes a bit after pressing enter in the browser on http://192.168.4.1 , about 5 seconds, before showing anything.

@hendrixalive it seems there might be a problem with the eeprom on esp01, i can t test until next week but there s an issue opened on github for it.
User avatar
By joshferg
#22699 Thanks for the code, its working great on my ESP8266!

I'm now trying to port the network connection over to my Arduino Mega (Serial port 1). Before my Arduino sketch was using the ethernet shield. Now I'd like to swap for Wifi through the ESP8266.

Is this possible? How can my Arduino Mega access the data connection?