Comments (9)
You want may be this:
https://hieromon.github.io/AutoConnect/advancedusage/index.html#disable-the-captive-portal
from autoconnect.
Hi, When i use :
acConfig.autoRise = false;
i look Net Wifi("esp32", in my case)
but when i use:
acConfig.autoRise = false;
i dont look Net Wifi("esp32", in my case)
and dont connect manually (cellphone) becasuse dont exist wifi. i use this code:
AutoConnectConfig Config("esp32", "passpass");
Config.apip = IPAddress(192,168,10,101); // Sets SoftAP IP address
Config.gateway = IPAddress(192,168,10,1); // Sets WLAN router IP address
Config.netmask = IPAddress(255,255,255,0); // Sets WLAN scope
Config.autoReconnect = true; // Enable auto-reconnect
Config.autoSave = AC_SAVECREDENTIAL_NEVER; // No save credential
Config.staip = IPAddress(192,168,10,10); // Sets static IP
Config.staGateway = IPAddress(192,168,10,1); // Sets WiFi router address
Config.staNetmask = IPAddress(255,255,255,0); // Sets WLAN scope
Config.dns1 = IPAddress(192,168,10,1); // Sets primary DNS address
portal.config(Config);
Config.autoRise = false;
portal.begin();
can you help me?
from autoconnect.
Config.autoRise = false;
must be placed before portal.config(Config);
. Otherwise, the AutoConnect::autoRise
value becomes undefined, and the SoftAP startup will be unstable.
Still the same problems you have?
Is it that esp32 has occurred as an access point even though acConfig.autoRise is false?
If so, Please set the debug level of the ESP32 core to Debug
with tool menu on Arduino-IDE and enable the #define AC_DEBUG
macro in AutoConnect.h and try again.
You will see the messages in the serial monitor for execution traces. If AutoConnectConfig::autoRise is false, you can collect logs like the following sequence (In the case of DHCP) :
[D][WiFiGeneric.cpp:345] _eventCallback(): Event: 0 - WIFI_READY
[D][WiFiGeneric.cpp:345] _eventCallback(): Event: 14 - AP_STOP
[D][WiFiGeneric.cpp:345] _eventCallback(): Event: 2 - STA_START
[AC] WiFi.config(IP=0.0.0.0, Gateway=0.0.0.0, Subnetmask=0.0.0.0, DNS1=0.0.0.0, DNS2=0.0.0.0)
[E][WiFiSTA.cpp:211] begin(): connect failed!
[AC] WiFi.begin()
[AC] Connecting...........................................................time out IP:0.0.0.0
[D][WiFiGeneric.cpp:345] _eventCallback(): Event: 1 - SCAN_DONE
[AC] 8 network(s) found
[AC] Past SSID:******** loaded
[AC] WiFi.begin(********,********)
[AC] Connecting.........[D][WiFiGeneric.cpp:345] _eventCallback(): Event: 5 - STA_DISCONNECTED
[W][WiFiGeneric.cpp:360] _eventCallback(): Reason: 201 - NO_AP_FOUND
[D][WiFiGeneric.cpp:345] _eventCallback(): Event: 0 - WIFI_READY
[D][WiFiGeneric.cpp:345] _eventCallback(): Event: 2 - STA_START
[D][WiFiGeneric.cpp:345] _eventCallback(): Event: 2 - STA_START
....[D][WiFiGeneric.cpp:345] _eventCallback(): Event: 4 - STA_CONNECTED
[D][WiFiGeneric.cpp:345] _eventCallback(): Event: 7 - STA_GOT_IP
[D][WiFiGeneric.cpp:389] _eventCallback(): STA IP: xxx.xxxx.xxx.xxx, MASK: xxx.xxxx.xxx.xxx, GW: xxx.xxxx.xxx.xxx
established IP:xxx.xxxx.xxx.xxx
[AC] WebServer allocated
[AC] http server started
If the AP_STOP is being executed but the SSID of esp32 is found in your cell phone, erase the flash of the esp32 with esptool once.
from autoconnect.
Hi,
this is my configuration:
AutoConnectConfig Config("esp32", "passpass");
Config.apip = IPAddress(192,168,10,101); // Sets SoftAP IP address
Config.gateway = IPAddress(192,168,10,1); // Sets WLAN router IP address
Config.netmask = IPAddress(255,255,255,0); // Sets WLAN scope
Config.autoReconnect = true; // Enable auto-reconnect
Config.autoSave = AC_SAVECREDENTIAL_NEVER; // No save credential
Config.staip = IPAddress(192,168,10,10); // Sets static IP
Config.staGateway = IPAddress(192,168,10,1); // Sets WiFi router address
Config.staNetmask = IPAddress(255,255,255,0); // Sets WLAN scope
Config.dns1 = IPAddress(192,168,10,1); // Sets primary DNS address
Config.autoRise = false;
portal.config(Config);
portal.begin();
Serial.println("Web server started:"+WiFi.localIP().toString());
and my log file:
11:07:09.356 -> [AC] WiFi.config(IP=192.168.10.10, Gateway=192.168.10.1, Subnetmask=255.255.255.0, DNS1=192.168.10.1, DNS2=0.0.0.0) [AC] WiFi.begin()
11:07:09.356 -> [AC] Connecting.....................................................................................................[AC] time out IP:192.168.10.10
11:07:42.843 -> [AC] 13 network(s) found
11:07:42.843 -> [AC] http server started
11:07:42.843 -> Web server started:192.168.10.10
in my celphone dont look network "esp32"
from autoconnect.
i'm working with v0.9.5 in arduino managenment library
from autoconnect.
how i can disable open browser automatily? because i will open browen in my internal mobile app.
If you do not want to use the captive portal automatically, you have to access the root of the AutoConnect menu manually. But it means ESP32 starting with STA mode only, AutoConnect does not support the SoftAP working without the captive portal.
In the first place, which you want to run ESP32WebServer instance with SotAP or STA?
from autoconnect.
According to your experience I would like you to recommend me, I'll explain my specific case:
1.- First of all I have a mobile APP that wants to configure the ESP32 Wifi using autoconnect.
2. I connect the ESP32 via USB to the Arduino and start Autoconnect with the configuration described above.
3. from the mobile APP I want to open the Wifi place the SSID and password (esp32ap, passpass). Everything in the background.
4. The ESP32 must be connected to the NETWORK which works well but the problem here is that Autoconnect automatically opens the portal to configure the NETWORK which you already do in step 3.
in conclusion my mobile APP connects and configures the ESP32 but the captive portal remains open, that's why I asked if there was a way to not start the captive portal automatically when you connect to esp32ap.
from autoconnect.
If you want to see the SSID of AutoConnect running ESP32 in your cell phone, it is a captive portal.
AutoConnect does not support the SoftAP working without the captive portal.
There is a possibility that you can implement it if you fork AutoConnect and modify the library. If you can try it, comment out the following code in AutoConnect.cpp. That will stop the captive portal.
AutoConnect/src/AutoConnect.cpp
Line 291 in c8de62d
But your requirement seems that it needs connectivity features like as AutoConnect in both SoftAP and STA. Also, it needs to incorporate two instances, or routing inside ESP32, I think.
from autoconnect.
Closing due to lack of response
from autoconnect.
Related Issues (20)
- ESP32 problem HOT 8
- Mqtt Example HOT 2
- Using "AutoConnectCore.h" header and running into errors HOT 2
- AutoConnect to offer captive portal for 5min even if ESP32 is WiFi-Connected HOT 1
- 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.
- Fresh Install and even the simplest of code will not compile HOT 2
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.