* Add support for newer mobile OS changes.
Took me quite a while to figure this out, but according to this issue (https://github.com/espressif/arduino-esp32/issues/1037), in order to get a captive notification to show or the popup to open, the DNS server must resolve to a public IP. It will not work with a pivate one (e.g. 192.168.4.1).
On Android, a notification ("Register with Network") is displayed in top left notification bar.
On IOS, the login popup is displayed.
* Add support for newer mobile OS changes.
Took me quite a while to figure this out, but according to this issue (espressif/arduino-esp32#1037), in order to get a captive notification to show or the popup to open, the DNS server must resolve to a public IP. It will not work with a pivate one (e.g. 192.168.4.1).
On Android, a notification ("Register with Network") is displayed in top left notification bar.
On IOS, the login popup is displayed.
Android refuses to show page with missing Content-Length header.
Prepare page data to String and send it with server.send
Moved respose strings to PROGMEM
* DNSServer: Handle examplewww.com correctly
Just replacing 'www.' with the empty string when we assign the
domainname will remove all occurrences of 'www.', not just those
at the start of the string.
Change this to a startsWith check so that only "www." at the
beginning of the string is removed.
* DNSServer: Rework request handling
Rewrite the request handling in the DNSServer code to address the
following issues:
Compatibility with EDNS #1:
RFC6891 says that
"Responders that choose not to implement the protocol
extensions defined in this document MUST respond with a
return code (RCODE) of FORMERR to messages containing an
OPT record in the additional section and MUST NOT include an
OPT record in the response"
If we have any additional records in the request, then we need
to return a FORMERR, and not whatever custom error code the user
may have set.
Compatibility with EDNS #2:
If we're returning an error, we need to explicitly zero all of
the record counters. In the existing code, if there is an
additional record present in the request, we return an ARCOUNT
of 1 in the response, despite including no additional records
in the payload.
Don't answer non-A requests
If we receive an AAAA request (or any other non-A record)
requests, we shouldn't respond to it with an A record.
Don't answer non-IN requests
If we receive a request for a non-IN type, don't answer it
(it's unlikely that we'd see this in the real world)
Don't read off the end of malformed packets
If a packet claims to have a query, but then doesn't include
one, or includes a query with malformed labels, don't read off
the end of the allocated data structure.
* DNSServer: Clarify and tidy writing the answer record
Modify the code used to write the answer record back to the server
so that it is clearer that we are writing network byte order
16-bit quantities, and to clarify what's happening with the pointer
used at the start of the answer.
* WIP compile examples on host with 'make examples'
* WIP bufferize tcp input
* WIP Makefile
* WIP network to rework, tcp/udp to factorize, udp addresses broken
* minor changes to the core
* WIP basic udp working
* WIP mdns
* WIP mcast receiving, not sending
* WIP mdns OK
* beta version
* SSL + doc
* update travis host test command
* licenses
* typo
* doc: arduino builder is not around: declare functions before calling them
* fix with latest SSL PR, compile in 32 bits mode
* fix make clean
* make -m32 optional
* 32bits compiler ability tester
* WIP
* WIP (fix 1 vtable error, still another one to hunt with using spiffs)
* example astyle
* fix os_printf_plus
* load / save mock spiffs
* fix style
* fix using spiffs/mock
* don't mess ram
* update doc
* remove leftover
* optimization -Os except for CI, rename ARCH32 to FORCE32
* revert useless cast (not even compiled)
* remove unused function
* use proper type for pointer arithmetics
* makefile: sketch object and cpp file moved to bin/ directories
easier to clean, and IDE don't like them
* changes for review
* make use of %zd
* less verbose makefile by default (option)
* update readme
Use platform.local.txt to add -Werror to GCC for the build of all
code. Any warnings on a submitted patch will cause an error.
Several examples and libraries had warnings/errors (missing returns
on functions, types, etc.). Clean those up with this commit as well.
This example serves a "hello world" on a WLAN and a SoftAP at the same
time.
The SoftAP allow you to configure WLAN parameters at run time. They are
not setup in the sketch but saved on EEPROM.
This is a captive portal because through the softAP it will redirect any
http request to http://192.168.4.1/, served by the ESP8266 itself