-->
Page 8 of 19

Re: Storing and reading ssid/pass from eeprom, AP to config

PostPosted: Fri Jun 26, 2015 10:19 am
by reaper7
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

Re: Storing and reading ssid/pass from eeprom, AP to config

PostPosted: Fri Jun 26, 2015 11:16 am
by hendrixalive
Anyone could make this WiFiManager works on esp01? I have seen lot of codes trying to storing and reading ssid/pass but i can't make it work fine. Why it's so difficult to store/read information on eeprom? HELLPPPLEASSSEEE :cry:

Re: Storing and reading ssid/pass from eeprom, AP to config

PostPosted: Sun Jun 28, 2015 1:09 am
by alextu
@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.

Re: Storing and reading ssid/pass from eeprom, AP to config

PostPosted: Tue Jul 07, 2015 12:06 pm
by joshferg
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?