Comments (17)
Finally I find the solution about how to turn the AP and STA at the same time so I can still reconfigure my ESP8266 anytime I want.
In AutoConnect.cpp :
bool AutoConnect::begin(const char* ssid, const char* passphrase, unsigned long timeout)
line 99, I just change the WiFi.mode from WIFI_STA to WIFI_AP_STA and add this line below.
WiFi.softAP(_apConfig.apid.c_str(), _apConfig.psk.c_str(), _apConfig.channel, _apConfig.hidden);
from autoconnect.
I can not understand your request well, but you can not do that an ESP8266 connected to some AP connects to another AP via a captive portal again. It is not an ESP8266 problem or an AutoConnect problem.
I can't find my ESP8266 AP WiFi Connection
What does this mean?
from autoconnect.
Sorry for my bad language. Let me explain what I mean. For example I have 2 WiFi connection called Wifi-A and Wifi-B. First I connect my ESP8266 to Wifi-A through my phone via captive portal. But the next day I want to change my ESP8266 connection to Wifi-B. How can I do this when my ESP8266 already connected to Wifi-A?
from autoconnect.
Go to the ipadres of this module when in wifi-a network and add /_ac to the ip adress
For a device in my network it looks like this
http://192.168.1.185/_ac
from autoconnect.
Go to the ipadres of this module when in wifi-a network and add /_ac to the ip adress
For a device in my network it looks like this
http://192.168.1.185/_ac
I understand what you mean. But to do that I need to connect to Wifi-A and know the IP Address first and it's hard to make it portable. What I'm looking for is how to configure it via my ESP8266 AP without need to connect to Wifi-A first as the first time I set my ESP8266. Is there any other way to keep my ESP8266 act as AP and STA even it's already connect to a WiFi Connection so I can connect to the AP anytime I want?
from autoconnect.
i don't think this is possible, maybe you could temporarly disable wifi-a, reboot your device.
it can't connect so it will go to AP mode, now you can connect to wifi-B
or you need to make a ap-mode button on your device. when hitting this button the device goes to AP mode, from there you could connect to its wifi and alter the wifi settings.
from autoconnect.
i don't think this is possible, maybe you could temporarly disable wifi-a, reboot your device.
it can't connect so it will go to AP mode, now you can connect to wifi-Bor you need to make a ap-mode button on your device. when hitting this button the device goes to AP mode, from there you could connect to its wifi and alter the wifi settings.
So the only way to set my ESP8266 to AP-mode is by let it timeout when trying to connecting to saved WiFi? Is that what u mean?
from autoconnect.
yes, that is what i mean, i don't think there is an easy different way.
from autoconnect.
yes, that is what i mean, i don't think there is an easy different way.
Okay, thank you very much for your response and help. I'll hope I can find another option for this case.
from autoconnect.
I think the method shown by @ageurtse is effective basically. I feel like what @lukiusnatanael wants is some gateway facility or the router. It needs to cross different networks, right?
from autoconnect.
I think the method shown by @ageurtse is effective basically. I feel like what @lukiusnatanael wants is some gateway facility or the router. It needs to cross different networks, right?
Yeah, maybe more like I'm trying to set the ESP8266 as AP and STA at the same time always. So it's still can connected to a router but it's also always act as AP so I can reconfigure it everytime I want.
from autoconnect.
Indeed, the method you have shown will expose the ESP8266's SSID at AP_STA. However, if your request is that ESP8266 will always stay at AP_STA, the following steps may be more appropriate:
-
Comment out the below line.
AutoConnect/src/AutoConnect.cpp
Line 127 in c2eeafe
-
Configure the immediateStart & the autoReconnect.
-
Performs AutoConnect::config with the above options.
-
Performs AutoConnect::begin.
This method may have some little difference with your request because it cannot still span different networks. But you can try this. If some problems occur, we can consult again.
from autoconnect.
Indeed, the method you have shown will expose the ESP8266's SSID at AP_STA. However, if your request is that ESP8266 will always stay at AP_STA, the following steps may be more appropriate:
Comment out the below line.
[AutoConnect/src/AutoConnect.cpp](https://github.com/Hieromon/AutoConnect/blob/c2eeafe759be409a5b80b1fc1cf00c9344df6990/src/AutoConnect.cpp#L127) Line 127 in [c2eeafe](/Hieromon/AutoConnect/commit/c2eeafe759be409a5b80b1fc1cf00c9344df6990) _apConfig.autoReconnect = false;
Configure the immediateStart & the autoReconnect.
Performs AutoConnect::config with the above options.
Performs AutoConnect::begin.
This method may have some little difference with your request because it cannot still span different networks. But you can try this. If some problems occur, we can consult again.
Okay I'll try it, I'll tell you the result later.
Thankyou very much for your help.
from autoconnect.
wifi.disconnect() to dissconnect and clear the saved WiFi credentials (By SDK not the library)
then
portal.begin() to start AutoConnect again and join another wifi SSID
from autoconnect.
@scropion86
That's right. It's simple.
from autoconnect.
Since there was no response even after one month passed, closed this issue.
When some reports are posted, reopen it.
from autoconnect.
Had the same issue.
Wanted to access my esp32 anytime, was it connected or not. The solution from lukiusnatanael Apr 20, worked.
from autoconnect.
Related Issues (20)
- AutoConnect on WiFi connection error shows too many redirects. HOT 2
- AutoConnectCore Not Working HOT 1
- Failing to store network HOT 2
- AutoConnect not longer runningh on ESP8266 HOT 2
- Use Autoconnect library with ESP now HOT 1
- Issue after updating libraries in my PIO project: enableCors() HOT 2
- Strange Issue
- WiFiClientSecure is not working with AutoConnect HOT 1
- how to use esp8266 with WiFiClientSecure
- AutoConnectPageImpl.hpp:1001:20: error: there are no arguments to 'spi_flash_get_chip_size' that depend on a template parameter, so a declaration of 'spi_flash_get_chip_size' must be available [-fpermissive] HOT 2
- Save data from Custom Page to flash HOT 2
- esp32: frozen loop() and kicked out of the WiFi connection at Configure new AP
- WPA2 Enterprise support
- Captive portal cause watchdog triggering
- Possibility to change pass for SoftAP from webui. HOT 1
- Fresh Install and even the simplest of code will not compile HOT 2
- Unable to select file in fw update page using ios device, android and desktop works.
- Wifi credencials
- Need update to SpiRamAllocatorST for ArduinoJson version 7
- Compatibility with Adafruit ESP32 Feather V2?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from autoconnect.