Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Startup behavior when no WiFi #4

Open
Defragster opened this issue Mar 25, 2016 · 2 comments
Open

Startup behavior when no WiFi #4

Defragster opened this issue Mar 25, 2016 · 2 comments

Comments

@Defragster
Copy link

I had my phone (w/serial terminal) and Teensy setup in my microwave and the ESP couldn't find my specified AP. After 20 seconds it defaulted to Soft AP mode.

Is there a way this .begin() behavior could be altered - perhaps with .begin() parameter(s) so it could just return on WiFi failure and allow me to try again later on the preferred AP and not go into the Soft AP mode? (and a non-broadcasting AP)

Ideally I might like to use this at two+ places where the AP is known but different - or in between where I don't need to have WiFi access until one is in range?

I haven't tested what happens when it starts with the preferred AP and then is it lost. Nor have I looked at the code to see if there was an existing way around - but that would be hacking your library work without a defined interface. Maybe it is defined and I just recognize I don't like Soft AP and periodically check for my preferred AP? But lesser timeout would need to be programmed as well as a awy to shutdown Soft AP and restart finding a known AP.

@nailbuster
Copy link
Owner

hmmm...I'd have to think about it. Need to have the Soft AP start so that you can change/set AP....Maybe have option when in SoftAP mode to periodically check for AP and if connect then restart ESP. Also thinking about network 'profiles' so that you can easily change the network config (ssid/pass) when moving between multiple networks.

@Defragster
Copy link
Author

Not trivial - and extra work may not satisfy everyone. To be honest I grabbed your code and it just worked so I didn't really see much other than how CLEAN and fully functional it was compared with samples from Arduino.

I've got some other PARTICLE.io based ESP8266's and they won't hit setup() until they talk to big brother - though there may be some workaround for that pending.

Since setup() starts before MyWebServer.begin(); is called - the sketch could make some determination perhaps if there was a way to influence .begin() with a parameter or changing the settings used based on how it last connected last.

With a 'Network Information' [info.html] scan of available local AP's the user code setup() could tell it what to do - does that require being active on the network?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants