WiFi-Settings in ESPEasy.ino

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
User avatar
Binder
Normal user
Posts: 10
Joined: 06 Jan 2017, 13:17
Location: Germany

WiFi-Settings in ESPEasy.ino

#1 Post by Binder » 09 Feb 2017, 17:06

Hi all,

in the ino-file you can setup these settings

Code: Select all

#define DEFAULT_SSID        "ssid"              // Enter your network SSID
#define DEFAULT_KEY         "wpakey"            // Enter your network WPA key
But whatever I try these settings are never used.
Do I have to configure something else?

Pete

mrwee
Normal user
Posts: 225
Joined: 31 Aug 2016, 12:52

Re: WiFi-Settings in ESPEasy.ino

#2 Post by mrwee » 09 Feb 2017, 21:47

If I read the code correctly, then if the SSID is changed to something else than 'ssid' then the settings should be used, but I'm no expert in Arduino code :|

mrwee
Normal user
Posts: 225
Joined: 31 Aug 2016, 12:52

Re: WiFi-Settings in ESPEasy.ino

#3 Post by mrwee » 09 Feb 2017, 23:09

Well I just tried it, and no it does not work off-the-shelf. According to the code, you must issue a 'reset' via serial for defaults to be loaded. I did not try that.

User avatar
Binder
Normal user
Posts: 10
Joined: 06 Jan 2017, 13:17
Location: Germany

Re: WiFi-Settings in ESPEasy.ino

#4 Post by Binder » 10 Feb 2017, 16:46

OK. Thanks for your try.

To go more in detail with my setting:
Currently I'm having lots of ESPs behind the wall. All of them are programmed with my own code using OTA.
I'd like to switch all of them to ESP-Easy. This is a much better piece of software than mine. :P

I am able to upload an ESP-Easy firmware with OTA to my self-programmed-ESP. It works with a precompiled version and with a self-compiled version. And in both cases I'm having this behaviour:
- After the update I see the ESP on my laptop in the SSID list
- I can connect to it via WIFI and see the startpage where to enter the Home-SSID and key.
- But I can't save it !!
So I'm having two problems:
- if I go then to ESP with IP-Address it got from DHCP-Server the ESP-webfrontend redirects immedeately to the 4.1 address. But this IP is not valid any longer, of course.
- if I power-off and power-on the device. It starts again with the part to enter SSID and key. And the ESP is back to 4.1 address

That's why I tried it with a precompiled version where the credentials are already in. But I got the same problem.

What works: I grab the ESP from wall and enter the keys via a FTDI. But this is not a good job for all the ESP.

Is there anything else I can try?

mrwee
Normal user
Posts: 225
Joined: 31 Aug 2016, 12:52

Re: WiFi-Settings in ESPEasy.ino

#5 Post by mrwee » 10 Feb 2017, 17:25

Maybe incompatibility between your SSID+PSK and ESP? Some symbols which ESP don't like?
For me it works by:
1) Flash ESP8266 with ESPeasy
2) Power on
3) Connect iPad to ESP_0 (PSK='configesp') on IP: 192.168.4.1
4) I select my SSID in the list and enter PSK and select connect.
5) ESP8266 connects to the correct SSID and get a DHCP assigned IP address from there (I'm checking for the address on my DHCP server)

I have seen that sometime when I try to connect after 5), that the browser tries to connect to 192.168.4.1, shortly after I can connect to the correct IP anyway (ARP cache or something on ESPeasy, I don't know)

But if you connect serial cable to the module you can check what's going on. (DON'T HAVE 230V connected to the module at the same time in case of e.g. Sonoff 230V relay modules)

User avatar
Binder
Normal user
Posts: 10
Joined: 06 Jan 2017, 13:17
Location: Germany

Re: WiFi-Settings in ESPEasy.ino

#6 Post by Binder » 10 Feb 2017, 17:50

The problem is the OTA-Upgrade.

If I do it with a cable it works as expected. This is not my problem. But I like to do the upgrade OverTheAir. And this doesn't work.

In the meantime I configured so many ESP with ESP-Easy that I ran into so many "circumstances" and I figured them all out. But this problem is really strange, and I haven't found a solution yet.
If the ESP is behind the wall I will let it normally be there. Than there is no chance to check it with a serial connection.

I hope someone can point me into the right direction.

mrwee
Normal user
Posts: 225
Joined: 31 Aug 2016, 12:52

Re: WiFi-Settings in ESPEasy.ino

#7 Post by mrwee » 10 Feb 2017, 19:44

Sorry, never had issues with OTA on any of my devices, so I can't help you there

User avatar
costo
Normal user
Posts: 500
Joined: 21 Nov 2015, 15:03
Location: NL, zw-NB

Re: WiFi-Settings in ESPEasy.ino

#8 Post by costo » 11 Feb 2017, 16:13

I experience troubles with OTA updates always after flashing a binfile that was compiled with different Size and/or SPIFFS settings.
I have to short RX with TX temporary and reset the ESP so that the SPIFFS area is completely overwritten with empty values.

It looks like you have to do that too. Not a nice option for ESP´s that are physically difficult to reach.

User avatar
Binder
Normal user
Posts: 10
Joined: 06 Jan 2017, 13:17
Location: Germany

Re: WiFi-Settings in ESPEasy.ino

#9 Post by Binder » 26 Mar 2017, 19:17

Just for info:
Today I upgraded all my "in-wall-esp" with the latest Mega-firmware. The problem doesn't exist anymore. Now you can create your own firmware with preconfigured WIFI-settings and it works like exptected.

I can't say what has changed with Mega, but with the versions up to R147 this didn't work.

(IMHO the mega firmware is a huge step forward)

Post Reply

Who is online

Users browsing this forum: Semrush [Bot] and 14 guests