Hi,
I just pulled the latest development build of WiFiManager (as well as the latest version of the Arduino-ESP32 core which includes the latest DNSServer library (as suggested in https://github.com/espressif/arduino-esp32/issues/1186), however when running The AutoConnect Example (and others) I do not get a captive portal on any device. On Windows 10 and macOS (both latest) I am able to navigate to 192.168.4.1 or another non https page and it resolves to the ESP32, however no captive portal pops up on load. On android (8.1.0, latest) the issue seems to be more problematic, the device does not see any internet connection so it defaults to LTE and does not allow navigation to the ESP32 (even though it stays connected to the AP).
Are there some configuration steps I might be missing?
Thanks! - FC
WiFimanager Branch/Release: Development
Hardware: espressif ESP32 DevKitC
Core Version: latest
Dnsserver is no longer required, use the one in core
Hey @tablatronix, thanks for the reply! I am using the DNSServer library from the core, I am using the latest version of the core and am having the results stated above.
confirmed, captiveportal in ondemand config portal works, autoconnect does not.
Should be something dumb, will fix
nope nevermind, I had the configportal timeout to short
cant reproduce, windows 10 and IOS, both redirect to captive portal.
What do your logs show ?
Hi @tablatronix, thanks for your reply. I realized that the issue on my mac and pc was due to my antivirus blocking captive portals. (Sorry about that!) However there still seems to be an issue with android devices finding the captive portal. I've tried on both a Google Pixel and a Galaxy S8.
The Debug output simply states the following on connect:
*WM: NUM CLIENTS: 0
*WM: NUM CLIENTS: 1
The devices do seem to be getting the dns information properly however (see examples from pixel at end of this post). When attempting to navigate to a non https page (using chrome), or even directly via 192.168.4.1, the phones don't seem to even be making requests to the ESP. I have tested the devices on other captive portal systems (such as the guest wifi functionality on my home router, and both android phones pick up those portals fine).
If there is any more information I may be able to give you to help determine the problem please let me know!



I do not have an android device to test unfortunately. I will try to obtain one.
When I had that problem it was a dns issue or firewall issue, Ill take a look at wireshark and see if everything looks ok, but its working for me everytime.
I've also been experiencing this trouble for some time. I have plenty of extra systems, wifi adapters, etc. around as well as multiple android and other devices. (no iOS but I can gain access to some if needed). I've been needing a pop-up style portal for over a year and have been searching and/or posting occasionally to try to find a solution.
I see the 'help wanted' and 'Needs Feedback'. I've only tinkered with wireshark a little, but if you can give me an idea what you want to see, I will do anything I can to get you data.
On android only works if you try to open a http page (not https). And is not automatic as in ios or a pc.
I've been researching about this, and it seems the problem is that android dont like that captive portal ip is in the same network. i've tested with a functional captive portal that dns resolves correctly (for android captive https://www.gstatic.com/generate_204 as an external ip) but it seems there is some kind of http redirection of the request to the captive portal.
dns service should give an external ip and then do some kind of http redirection (that i havent been able to do it with esp8266). Do you know if there is a way of intercepting http packet to an external ip and deliver a 302 redirection to the captive portal?
Yeah I will keep tracking this here https://github.com/espressif/arduino-esp32/issues/1037#issuecomment-377962531
no need to continue posting here, as this is clearly not a wm issue.
I will keep it open in case we can find a workaround or solution for us, then update the captiveportal examples and vice versa.
I don't understand why this stuff is hard to come by, there should just be a developer whitepaper on this for andoid that clearly specifies what the deal is and how to get captive portals working.
Got it working on android by setting AP IP host to 172.217.28.1 (like if it was a wan ip) and network mask to 255.255.255.0.
I got the popup woking on android 7 (Samsung S7), Iphone 7 and OSX.
@nicogon How did you exactly do it? I have been struggling with this problem for about two months.
I think the gist of it is that whatever the device will reject local IP dns responses for addresses it knows - or at least rejects local ips it knows for something it knows should be on the internet at large.
I've been trying to find either a code example or even a written explanation of just what things like OpenWRT do to make them work. My suspicion is that they don't simply redirect DNS like the arduino/esp code used to do but instead it actually intercepts internet traffic going to any other address than it's own and answers it as though it were the address in question.
Part of the problem on things like OpenWRT is that the people programming it aren't even 100% sure of the whole process because they rely on other people's tools such as IPTables to do some of the dirty work for them such as re-routing the packets. All they need to do then is answer them.
The ESP code core has lwip in with it to handle the IP stack. If I could find a good code example somewhere, I might be able to stab blindly around in the dark with my limited knowledge of C++ to try to do something similar until a given client was properly re-directed.
Anyone figure anything new out?
On your Android device, go to Advanced wifi options and disable the option to "Switch to mobile data - Switch to mobile data whenever your Wi-Fi internet connection is slow or unstable."
P
I got this working by setting ip to 8.8.8.8 ot 8.8.4.4 and using port 53
Workaround
In file WiFiManager.cpp, in function void WiFiManager::handleNotFound() replacing the 400 response code to 200 at Line 738 i.e.
replacing server->send ( 404, "text/plain", message );
with server->send ( 200, "text/plain", message );
solves the issue of pop-up not appearing on my _Windows 10_ device. I tested this on the AutoConnect example in Sloeber IDE on NodeMCU 1.0 board.
I don't know why it worked but it did, and if someone can explain kindly do.
Whereas for my _Android P_ & _Windows 10_ devices,
CaptivePortal.ino sketch works and brings up the pop-up captive portal.
Thats interesting indeed, all requests should return the portal if its active..
Do you have or can you obtain serial logs of this ?
That handler should never be reached.
Thats interesting indeed, all requests should return the portal if its active..
Do you have or can you obtain serial logs of this ?That handler should never be reached.
On building the project in the previously mentioned environment -
10:33:20 **** Incremental Build of configuration Release for project tzapu ****
"C:\\Sloeber\\arduinoPlugin\\tools\\make\\make" all
'Do all objcopy commands'
"C:\Sloeber\arduinoPlugin\packages\esp8266\tools\python3\3.7.2-post1/python3" "C:\Sloeber\/arduinoPlugin/packages/esp8266/hardware/esp8266/2.6.1/tools/elf2bin.py" --eboot "C:\Sloeber\/arduinoPlugin/packages/esp8266/hardware/esp8266/2.6.1/bootloaders/eboot/eboot.elf" --app "C:\Users\nabeel\Documents\sloeber-wrkspc\tzapu/Release/tzapu.elf" --flash_mode dio --flash_freq 40 --flash_size 4M --path "C:\Sloeber\arduinoPlugin\packages\esp8266\tools\xtensa-lx106-elf-gcc\2.5.0-4-b40a506/bin" --out "C:\Users\nabeel\Documents\sloeber-wrkspc\tzapu/Release/tzapu.bin"
Creating BIN file "C:\Users\nabeel\Documents\sloeber-wrkspc\tzapu/Release/tzapu.bin" using "C:\Users\nabeel\Documents\sloeber-wrkspc\tzapu/Release/tzapu.elf"
"C:\Sloeber\arduinoPlugin\packages\esp8266\tools\python3\3.7.2-post1/python3" "C:\Sloeber\/arduinoPlugin/packages/esp8266/hardware/esp8266/2.6.1/tools/signing.py" --mode sign --privatekey "/private.key" --bin "C:\Users\nabeel\Documents\sloeber-wrkspc\tzapu/Release/tzapu.bin" --out "C:\Users\nabeel\Documents\sloeber-wrkspc\tzapu/Release/tzapu.bin.signed" --legacy "C:\Users\nabeel\Documents\sloeber-wrkspc\tzapu/Release/tzapu.bin.legacy_sig"
"C:\Sloeber\arduinoPlugin\packages\esp8266\tools\python3\3.7.2-post1/python3" "C:\Sloeber\/arduinoPlugin/packages/esp8266/hardware/esp8266/2.6.1/tools/sizes.py" --elf "C:\Users\nabeel\Documents\sloeber-wrkspc\tzapu/Release/tzapu.elf" --path "C:\Sloeber\arduinoPlugin\packages\esp8266\tools\xtensa-lx106-elf-gcc\2.5.0-4-b40a506/bin"
Executable segment sizes:
IROM : 276360 - code in flash (default or ICACHE_FLASH_ATTR)
IRAM : 26716 / 32768 - code in IRAM (ICACHE_RAM_ATTR, ISRs...)
DATA : 1244 ) - initialized variables (global, static) in RAM/HEAP
RODATA : 2068 ) / 81920 - constants (global, static) in RAM/HEAP
BSS : 29360 ) - zeroed variables (global, static) in RAM/HEAP
'Finished building: tzapu.hex'
' '
'Building target: tzapu'
'Printing size:'
"C:\Sloeber\arduinoPlugin\packages\esp8266\tools\xtensa-lx106-elf-gcc\2.5.0-4-b40a506/bin/xtensa-lx106-elf-size" -A "C:/Users/nabeel/Documents/sloeber-wrkspc/tzapu/Release/tzapu.elf"
C:/Users/nabeel/Documents/sloeber-wrkspc/tzapu/Release/tzapu.elf :
section size addr
.data 1244 1073643520
.noinit 4 1073644764
.text 252 1074790400
.irom0.text 276360 1075843088
.text1 26464 1074790652
.rodata 2068 1073644768
.bss 29360 1073646840
.debug_frame 47664 0
.debug_info 1152832 0
.debug_abbrev 121376 0
.debug_aranges 13344 0
.debug_ranges 30688 0
.debug_line 276298 0
.debug_str 232529 0
.comment 4680 0
.xtensa.info 56 0
.xt.lit._ZN16esp8266webserver14RequestHandlerI10WiFiServerED2Ev 8 0
.xt.lit._ZN16esp8266webserver14RequestHandlerI10WiFiServerED0Ev 0 0
.xt.lit._ZN16esp8266webserver22FunctionRequestHandlerI10WiFiServerE9canUploadE6String 0 0
.xt.lit._ZN16esp8266webserver22FunctionRequestHandlerI10WiFiServerE9canHandleE10HTTPMethod6String 0 0
.xt.lit._ZNSt14_Function_base13_Base_managerISt5_BindIFSt7_Mem_fnIM11WiFiManagerFvvEEPS3_EEE10_M_managerERSt9_Any_dataRKSB_St18_Manager_operation 0 0
.xt.lit._ZNSt14_Function_base13_Base_managerISt5_BindIFSt7_Mem_fnIM11WiFiManagerFvbEEPS3_bEEE10_M_managerERSt9_Any_dataRKSB_St18_Manager_operation 0 0
.xt.lit._ZNSt14_Function_base13_Base_managerIN16esp8266webserver14nullArgHandlerEE10_M_managerERSt9_Any_dataRKS4_St18_Manager_operation 0 0
.xt.lit._ZNSt14_Function_base13_Base_managerIN16esp8266webserver15storeArgHandlerI10WiFiServerEEE10_M_managerERSt9_Any_dataRKS6_St18_Manager_operation 0 0
.xt.lit._ZNK6String10startsWithEPK19__FlashStringHelper 0 0
.xt.lit._ZNK6String9substringEj 0 0
.xt.lit._ZN6String7replaceEPKcRKS_ 0 0
.xt.lit._ZN6String7replaceEPKcS1_ 0 0
.xt.lit._ZNK6String6lengthEv 0 0
.xt.lit._ZN16esp8266webserver22FunctionRequestHandlerI10WiFiServerED2Ev 8 0
.xt.lit._ZN16esp8266webserver22FunctionRequestHandlerI10WiFiServerED0Ev 0 0
.xt.lit._ZNSt8functionIFvvEEC2ISt5_BindIFSt7_Mem_fnIM11WiFiManagerFvvEEPS5_EEvEET_ 8 0
.xt.lit._ZNSt8functionIFvvEEC2ISt5_BindIFSt7_Mem_fnIM11WiFiManagerFvbEEPS5_bEEvEET_ 8 0
.xt.lit._ZN16esp8266webserver24ESP8266WebServerTemplateI10WiFiServerE10sendHeaderERK6StringS5_b 8 0
.xt.lit._ZNK16esp8266webserver24ESP8266WebServerTemplateI10WiFiServerE3argERK6String 8 0
.xt.lit._ZN16esp8266webserver24ESP8266WebServerTemplateI10WiFiServerE2onERK6StringSt8functionIFvvEE 0 0
.xt.lit._ZN16esp8266webserver24ESP8266WebServerTemplateI10WiFiServerE15RequestArgumentD2Ev 0 0
.xt.lit._ZN16esp8266webserver24ESP8266WebServerTemplateI10WiFiServerE15RequestArgumentC2Ev 0 0
.xt.lit._ZN16esp8266webserver24ESP8266WebServerTemplateI10WiFiServerE14_collectHeaderEPKcS4_ 0 0
.xt.lit._ZNKSt8functionIFvvEEclEv 8 0
.xt.lit._ZN16esp8266webserver22FunctionRequestHandlerI10WiFiServerE6handleERNS_24ESP8266WebServerTemplateIS1_EE10HTTPMethod6String 8 0
.xt.lit._ZN16esp8266webserver22FunctionRequestHandlerI10WiFiServerE6uploadERNS_24ESP8266WebServerTemplateIS1_EE6StringR10HTTPUpload 0 0
.xt.lit._ZN16esp8266webserver24ESP8266WebServerTemplateI10WiFiServerE20responseCodeToStringEi 8 0
.xt.lit._ZN16esp8266webserver24ESP8266WebServerTemplateI10WiFiServerE14_prepareHeaderER6StringiPKcj 8 0
.xt.lit._ZN16esp8266webserver24ESP8266WebServerTemplateI10WiFiServerE22_parseArgumentsPrivateERK6StringSt8functionIFvRS3_S7_S5_iiiiEE 0 0
.xt.lit._ZN16esp8266webserver24ESP8266WebServerTemplateI10WiFiServerE15_parseArgumentsERK6String 8 0
.xt.lit._ZN16esp8266webserver24ESP8266WebServerTemplateI10WiFiServerE15_uploadReadByteER10WiFiClient 0 0
.xt.lit._ZN16esp8266webserver24ESP8266WebServerTemplateI10WiFiServerE23_parseFormUploadAbortedEv 0 0
.xt.lit._ZN16esp8266webserver24ESP8266WebServerTemplateI10WiFiServerE16_uploadWriteByteEh 8 0
.xt.lit._ZN16esp8266webserver24ESP8266WebServerTemplateI10WiFiServerE10_parseFormER10WiFiClientRK6Stringj 8 0
.xt.lit._ZN16esp8266webserver24ESP8266WebServerTemplateI10WiFiServerE13_parseRequestER10WiFiClient 8 0
.xt.lit._ZN16esp8266webserver24ESP8266WebServerTemplateI10WiFiServerE9urlDecodeERK6String 8 0
.xt.lit._ZNSt17_Function_handlerIFvR6StringS1_RKS0_iiiiEN16esp8266webserver15storeArgHandlerI10WiFiServerEEE9_M_invokeERKSt9_Any_dataS1_S1_S3_iiii 0 0
.xt.lit._ZN16esp8266webserver24ESP8266WebServerTemplateI10WiFiServerED2Ev 8 0
.xt.lit._ZN16esp8266webserver24ESP8266WebServerTemplateI10WiFiServerE11sendContentERK6String 8 0
.xt.lit._ZN16esp8266webserver24ESP8266WebServerTemplateI10WiFiServerE4sendEiPKcRK6String 0 0
.xt.lit._ZN16esp8266webserver24ESP8266WebServerTemplateI10WiFiServerE14_handleRequestEv 8 0
.xt.lit._ZN16esp8266webserver24ESP8266WebServerTemplateI10WiFiServerE12handleClientEv 8 0
.xt.prop._ZN16esp8266webserver14RequestHandlerI10WiFiServerE9canHandleE10HTTPMethod6String 36 0
.xt.prop._ZN16esp8266webserver14RequestHandlerI10WiFiServerE6handleERNS_24ESP8266WebServerTemplateIS1_EE10HTTPMethod6String 36 0
.xt.prop._ZN16esp8266webserver14RequestHandlerI10WiFiServerED2Ev 48 0
.xt.prop._ZN16esp8266webserver14RequestHandlerI10WiFiServerE9canUploadE6String 36 0
.xt.prop._ZN16esp8266webserver14RequestHandlerI10WiFiServerE6uploadERNS_24ESP8266WebServerTemplateIS1_EE6StringR10HTTPUpload 36 0
.xt.prop._ZNSt17_Function_handlerIFvR6StringS1_RKS0_iiiiEN16esp8266webserver14nullArgHandlerEE9_M_invokeERKSt9_Any_dataS1_S1_S3_iiii 36 0
.xt.prop._ZN16esp8266webserver14RequestHandlerI10WiFiServerED0Ev 48 0
.xt.prop._ZN16esp8266webserver22FunctionRequestHandlerI10WiFiServerE9canUploadE6String 60 0
.xt.prop._ZN16esp8266webserver22FunctionRequestHandlerI10WiFiServerE9canHandleE10HTTPMethod6String 48 0
.xt.prop._ZNSt14_Function_base13_Base_managerISt5_BindIFSt7_Mem_fnIM11WiFiManagerFvvEEPS3_EEE10_M_managerERSt9_Any_dataRKSB_St18_Manager_operation 96 0
.xt.prop._ZNSt14_Function_base13_Base_managerISt5_BindIFSt7_Mem_fnIM11WiFiManagerFvbEEPS3_bEEE10_M_managerERSt9_Any_dataRKSB_St18_Manager_operation 96 0
.xt.prop._ZNSt14_Function_base13_Base_managerIN16esp8266webserver14nullArgHandlerEE10_M_managerERSt9_Any_dataRKS4_St18_Manager_operation 96 0
.xt.prop._ZNSt14_Function_base13_Base_managerIN16esp8266webserver15storeArgHandlerI10WiFiServerEEE10_M_managerERSt9_Any_dataRKS6_St18_Manager_operation 96 0
.xt.prop._ZNSt17_Function_handlerIFvvESt5_BindIFSt7_Mem_fnIM11WiFiManagerFvvEEPS3_EEE9_M_invokeERKSt9_Any_data 48 0
.xt.prop._ZNSt17_Function_handlerIFvvESt5_BindIFSt7_Mem_fnIM11WiFiManagerFvbEEPS3_bEEE9_M_invokeERKSt9_Any_data 36 0
.xt.prop._ZNK6String10startsWithEPK19__FlashStringHelper 48 0
.xt.prop._ZNK6String9substringEj 72 0
.xt.prop._ZN6String7replaceEPKcRKS_ 48 0
.xt.prop._ZN6String7replaceEPKcS1_ 48 0
.xt.prop._ZNK6String6bufferEv 48 0
.xt.prop._ZNK6String6lengthEv 72 0
.xt.prop._ZNSt14_Function_baseD2Ev 36 0
.xt.prop._ZN16esp8266webserver22FunctionRequestHandlerI10WiFiServerED2Ev 48 0
.xt.prop._ZN16esp8266webserver22FunctionRequestHandlerI10WiFiServerED0Ev 48 0
.xt.prop._ZNSt8functionIFvvEEC2ISt5_BindIFSt7_Mem_fnIM11WiFiManagerFvvEEPS5_EEvEET_ 48 0
.xt.prop._ZNSt8functionIFvvEEC2ISt5_BindIFSt7_Mem_fnIM11WiFiManagerFvbEEPS5_bEEvEET_ 48 0
.xt.prop._ZN16esp8266webserver24ESP8266WebServerTemplateI10WiFiServerE10sendHeaderERK6StringS5_b 72 0
.xt.prop._ZNK16esp8266webserver24ESP8266WebServerTemplateI10WiFiServerE3argERK6String 144 0
.xt.prop._ZNSt8functionIFvvEEC2ERKS1_ 36 0
.xt.prop._ZN16esp8266webserver24ESP8266WebServerTemplateI10WiFiServerE2onERK6StringSt8functionIFvvEE 72 0
.xt.prop._ZN16esp8266webserver24ESP8266WebServerTemplateI10WiFiServerE15RequestArgumentD2Ev 48 0
.xt.prop._ZN16esp8266webserver24ESP8266WebServerTemplateI10WiFiServerE15RequestArgumentC2Ev 48 0
.xt.prop._ZN16esp8266webserver24ESP8266WebServerTemplateI10WiFiServerE14_collectHeaderEPKcS4_ 96 0
.xt.prop._ZNKSt8functionIFvvEEclEv 60 0
.xt.prop._ZN16esp8266webserver22FunctionRequestHandlerI10WiFiServerE6handleERNS_24ESP8266WebServerTemplateIS1_EE10HTTPMethod6String 60 0
.xt.prop._ZN16esp8266webserver22FunctionRequestHandlerI10WiFiServerE6uploadERNS_24ESP8266WebServerTemplateIS1_EE6StringR10HTTPUpload 60 0
.xt.prop._ZN16esp8266webserver24ESP8266WebServerTemplateI10WiFiServerE20responseCodeToStringEi 1296 0
.xt.prop._ZN16esp8266webserver24ESP8266WebServerTemplateI10WiFiServerE14_prepareHeaderER6StringiPKcj 96 0
.xt.prop._ZN16esp8266webserver24ESP8266WebServerTemplateI10WiFiServerE22_parseArgumentsPrivateERK6StringSt8functionIFvRS3_S7_S5_iiiiEE 204 0
.xt.prop._ZN16esp8266webserver24ESP8266WebServerTemplateI10WiFiServerE15_parseArgumentsERK6String 108 0
.xt.prop._ZN16esp8266webserver24ESP8266WebServerTemplateI10WiFiServerE15_uploadReadByteER10WiFiClient 144 0
.xt.prop._ZN16esp8266webserver24ESP8266WebServerTemplateI10WiFiServerE23_parseFormUploadAbortedEv 48 0
.xt.prop._ZN16esp8266webserver24ESP8266WebServerTemplateI10WiFiServerE16_uploadWriteByteEh 48 0
.xt.prop._ZN16esp8266webserver24ESP8266WebServerTemplateI10WiFiServerE10_parseFormER10WiFiClientRK6Stringj 852 0
.xt.prop._ZN16esp8266webserver24ESP8266WebServerTemplateI10WiFiServerE13_parseRequestER10WiFiClient 576 0
.xt.prop._ZN16esp8266webserver24ESP8266WebServerTemplateI10WiFiServerE9urlDecodeERK6String 96 0
.xt.prop._ZNSt17_Function_handlerIFvR6StringS1_RKS0_iiiiEN16esp8266webserver15storeArgHandlerI10WiFiServerEEE9_M_invokeERKSt9_Any_dataS1_S1_S3_iiii 60 0
.xt.prop._ZN16esp8266webserver24ESP8266WebServerTemplateI10WiFiServerED2Ev 120 0
.xt.prop._ZN16esp8266webserver24ESP8266WebServerTemplateI10WiFiServerE11sendContentERK6String 48 0
.xt.prop._ZN16esp8266webserver24ESP8266WebServerTemplateI10WiFiServerE4sendEiPKcRK6String 60 0
.xt.prop._ZN16esp8266webserver24ESP8266WebServerTemplateI10WiFiServerE14_handleRequestEv 108 0
.xt.prop._ZN16esp8266webserver24ESP8266WebServerTemplateI10WiFiServerE12handleClientEv 252 0
.xt.prop._ZTVN16esp8266webserver14RequestHandlerI10WiFiServerEE 12 0
.xt.prop._ZTVN16esp8266webserver22FunctionRequestHandlerI10WiFiServerEE 12 0
.xt.prop._ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE0EED2Ev 36 0
.xt.lit._ZNSt10_List_baseISt10shared_ptrI22WiFiEventHandlerOpaqueESaIS2_EE8_M_clearEv 0 0
.xt.prop._ZNSt10_List_baseISt10shared_ptrI22WiFiEventHandlerOpaqueESaIS2_EE8_M_clearEv 72 0
.xt.prop._ZSt4swapISt9_Any_dataEvRT_S2_ 36 0
.xt.lit._ZN10DataSourceD2Ev 8 0
.xt.lit._ZN16BufferDataSourceD2Ev 0 0
.xt.lit._ZN10DataSourceD0Ev 0 0
.xt.lit._ZN16BufferDataSourceD0Ev 0 0
.xt.lit._ZN16BufferDataSource10get_bufferEj 8 0
.xt.lit._ZN16BufferDataSource14release_bufferEPKhj 8 0
.xt.lit._ZN13ClientContext7_s_pollEPvP7tcp_pcb 0 0
.xt.lit._ZN13ClientContext7_s_recvEPvP7tcp_pcbP4pbufl 0 0
.xt.lit._ZN13ClientContext12_s_connectedEPvP7tcp_pcbl 8 0
.xt.lit._ZN24BufferedStreamDataSourceI13ProgmemStreamE14release_bufferEPKhj 8 0
.xt.lit._ZN24BufferedStreamDataSourceI13ProgmemStreamE10get_bufferEj 8 0
.xt.lit._ZN13ClientContext8_s_errorEPvl 0 0
.xt.lit._ZN13ClientContext8_s_ackedEPvP7tcp_pcbt 0 0
.xt.lit._ZN13ClientContext5unrefEv 0 0
.xt.lit._ZN13ClientContext15wait_until_sentEi 0 0
.xt.lit._ZN13ClientContext11_write_someEv 0 0
.xt.lit._ZN13ClientContext18_write_from_sourceEP10DataSource 8 0
.xt.lit._ZN13ClientContext8_consumeEj 0 0
.xt.lit._ZN10WiFiClient5flushEv 0 0
.xt.lit._ZN10WiFiClient4stopEv 0 0
.xt.lit._ZNSt10unique_ptrIA_hSt14default_deleteIS0_EED2Ev 0 0
.xt.lit._ZN24BufferedStreamDataSourceI13ProgmemStreamED2Ev 0 0
.xt.lit._ZN24BufferedStreamDataSourceI13ProgmemStreamED0Ev 0 0
.xt.prop._ZN6Stream9readBytesEPhj 36 0
.xt.prop._ZN10DataSourceD2Ev 48 0
.xt.prop._ZN16BufferDataSource9availableEv 36 0
.xt.prop._ZN16BufferDataSourceD2Ev 48 0
.xt.prop._ZN24BufferedStreamDataSourceI13ProgmemStreamE9availableEv 36 0
.xt.prop._ZN10DataSourceD0Ev 48 0
.xt.prop._ZN16BufferDataSourceD0Ev 48 0
.xt.prop._ZN16BufferDataSource10get_bufferEj 48 0
.xt.prop._ZN16BufferDataSource14release_bufferEPKhj 48 0
.xt.prop._ZN13ClientContext7_s_pollEPvP7tcp_pcb 48 0
.xt.prop._ZN13ClientContext7_s_recvEPvP7tcp_pcbP4pbufl 108 0
.xt.prop._ZN13ClientContext12_s_connectedEPvP7tcp_pcbl 60 0
.xt.prop._ZN24BufferedStreamDataSourceI13ProgmemStreamE14release_bufferEPKhj 72 0
.xt.prop._ZN24BufferedStreamDataSourceI13ProgmemStreamE10get_bufferEj 120 0
.xt.prop._ZN13ClientContext8_s_errorEPvl 60 0
.xt.prop._ZN13ClientContext8_s_ackedEPvP7tcp_pcbt 48 0
.xt.prop._ZN13ClientContext5unrefEv 72 0
.xt.prop._ZN13ClientContext15wait_until_sentEi 120 0
.xt.prop._ZN13ClientContext11_write_someEv 180 0
.xt.prop._ZN13ClientContext18_write_from_sourceEP10DataSource 252 0
.xt.prop._ZN13ClientContext8_consumeEj 96 0
.xt.prop._ZN10WiFiClient5flushEv 48 0
.xt.prop._ZN10WiFiClient4stopEv 48 0
.xt.prop._ZNSt10unique_ptrIA_hSt14default_deleteIS0_EED2Ev 48 0
.xt.prop._ZN24BufferedStreamDataSourceI13ProgmemStreamED2Ev 48 0
.xt.prop._ZN24BufferedStreamDataSourceI13ProgmemStreamED0Ev 48 0
.xt.prop._ZTV10DataSource 12 0
.xt.prop._ZTV16BufferDataSource 12 0
.xt.prop._ZTV24BufferedStreamDataSourceI13ProgmemStreamE 12 0
.xt.prop._ZTV10WiFiClient 12 0
.xt.lit._ZN10WiFiServerD2Ev 0 0
.xt.lit._ZN10WiFiServerD0Ev 0 0
.xt.prop._ZN5Print5flushEv 36 0
.xt.prop._ZN10WiFiServerD2Ev 48 0
.xt.prop._ZN10WiFiServerD0Ev 48 0
.xt.prop._ZTV10WiFiServer 12 0
.xt.lit._ZN3UDPD2Ev 8 0
.xt.lit._ZN3UDPD0Ev 0 0
.xt.lit._ZN10UdpContext7_s_recvEPvP7udp_pcbP4pbufPK8ip4_addrt 8 0
.xt.lit._ZN10UdpContextC2Ev 0 0
.xt.lit._ZN10UdpContext5unrefEv 0 0
.xt.prop._ZN3UDPD2Ev 48 0
.xt.prop._ZN7WiFiUDP4readEPcj 36 0
.xt.prop._ZN3UDPD0Ev 48 0
.xt.prop._ZN10UdpContext7_s_recvEPvP7udp_pcbP4pbufPK8ip4_addrt 96 0
.xt.prop._ZN10UdpContextC2Ev 48 0
.xt.prop._ZN10UdpContext5unrefEv 60 0
.xt.prop._ZTV3UDP 12 0
.xt.prop._ZTV7WiFiUDP 12 0
.xt.lit._ZN14HardwareSerialD2Ev 8 0
.xt.lit._ZN14HardwareSerialD0Ev 0 0
.xt.lit._ZN14HardwareSerial4peekEv 0 0
.xt.lit._ZN14HardwareSerial4readEv 0 0
.xt.lit._ZN14HardwareSerial5writeEh 0 0
.xt.lit._ZN14HardwareSerial5writeEPKhj 0 0
.xt.prop._ZN14HardwareSerialD2Ev 48 0
.xt.prop._ZN14HardwareSerial9readBytesEPhj 36 0
.xt.prop._ZN14HardwareSerialD0Ev 48 0
.xt.prop._ZN14HardwareSerial4peekEv 48 0
.xt.prop._ZN14HardwareSerial4readEv 48 0
.xt.prop._ZN14HardwareSerial5writeEh 48 0
.xt.prop._ZN14HardwareSerial5writeEPKhj 48 0
.xt.prop.6 72 0
.xt.prop._ZTV14HardwareSerial 12 0
.xt.prop._ZTV9IPAddress 12 0
.xt.lit._ZN5Print5writeEPKc 8 0
.xt.prop._ZN5Print5writeEPKc 60 0
.xt.prop._ZN5Print5writeEc 36 0
.xt.prop._ZTV6Stream 12 0
.xt.prop._ZTV12StreamString 12 0
.xt.lit._ZN6String4initEv 0 0
.xt.prop._ZNK6String3lenEv 60 0
.xt.prop._ZN6String6setLenEi 60 0
.xt.prop._ZNK6String7wbufferEv 48 0
.xt.prop._ZN6String4initEv 48 0
.xt.lit.0 8 0
.xt.lit.uart_rx_available_unsafe 8 0
.xt.lit.1 8 0
.xt.lit.uart_tx_fifo_available 0 0
.xt.prop.0 48 0
.xt.prop.uart_rx_buffer_available_unsafe 48 0
.xt.prop.uart_rx_available_unsafe 48 0
.xt.prop.1 96 0
.xt.prop.uart_tx_fifo_available 48 0
.xt.lit._ZNKSt8functionIFbvEEclEv 0 0
.xt.lit.5 8 0
.xt.prop._ZNKSt8functionIFbvEEclEv 60 0
.xt.prop.5 96 0
.debug_loc 293058 0
Total 2518569
'Finished building target: tzapu'
' '
10:33:21 Build Finished. 0 errors, 0 warnings. (took 889ms)
==============================================================
On connecting to WiFi on Android Pie mobile device -
*WM: AutoConnect
*WM: Connecting as wifi client...
*WM: No saved credentials
*WM: Connection result:
*WM: 0
*WM:
*WM: Configuring access point...
*WM: AutoConnectAP
*WM: AP IP address:
*WM: 192.168.4.1
*WM: HTTP server started
*WM: Handle root
*WM: Request redirected to captive portal
*WM: Request redirected to captive portal
*WM: Request redirected to captive portal
*WM: Request redirected to captive portal
*WM: Request redirected to captive portal
*WM: Request redirected to captive portal
*WM: Request redirected to captive portal
*WM: Handle root
*WM: Request redirected to captive portal
*WM: Handle root
*WM: Request redirected to captive portal
*WM: Handle root
*WM: Request redirected to captive portal
*WM: Handle root
*WM: Handle root
*WM: Handle root
No pop-up appears, so I open Google Chrome
*WM: Handle root
*WM: Handle root
*WM: Handle root
Then I open https://www.debian.org and also https://www.debian.org/
_Nothing in the serial output in both cases and Google Chrome shows ERR_CONNECTION_REFUSED_
Then I open 192.168.4.1
*WM: Handle root
and it takes me to the captive portal.
When my Android Device is idle, this randomly appears multiple times -
*WM: Request redirected to captive portal
Now I open http://www.debian.org and also http://www.debian.org/
*WM: Handle root
*WM: Request redirected to captive portal
and it successfully redirects me to the captive portal in both the cases.
==============================================================
I turn off and turn on my NodeMCU and on connecting to WiFi on Windows 10 laptop -
*WM: AutoConnect
*WM: Connecting as wifi client...
*WM: No saved credentials
*WM: Connection result:
*WM: 0
*WM:
*WM: Configuring access point...
*WM: AutoConnectAP
*WM: AP IP address:
*WM: 192.168.4.1
*WM: HTTP server started
*WM: Request redirected to captive portal
*WM: Request redirected to captive portal
*WM: Request redirected to captive portal
My default browser opens automatically and -
*WM: Handle root
*WM: Request redirected to captive portal
*WM: Handle root
*WM: Request redirected to captive portal
*WM: Request redirected to captive portal
*WM: Handle root
*WM: Request redirected to captive portal
it redirects to the captive portal.
On opening HTTPS and HTTP links, it is the same story as with the Android Pie device.
Most helpful comment
Got it working on android by setting AP IP host to 172.217.28.1 (like if it was a wan ip) and network mask to 255.255.255.0.
I got the popup woking on android 7 (Samsung S7), Iphone 7 and OSX.