feat(ap): Add support for DHCP Captive Portal (opt 114) #11412
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces functionality to enable a DHCP-based captive portal for WiFi access points, along with updates to simplify the setup process in the Captive Portal example. The most significant changes include adding the new
enableDhcpCaptivePortalmethod to theAPClass, modifying the example code to utilize this new feature, and updating theWiFiAP.hheader file to declare the new method.Enhancements to WiFi Access Point functionality:
enableDhcpCaptivePortalmethod toAPClass: This method enables a DHCP-based captive portal by configuring the DHCP server to redirect clients to a specific captive portal URI. It includes error handling for stopping and starting the DHCP server and checks if the access point is started before enabling the feature.enableDhcpCaptivePortalinWiFiAP.h: The new method is added to theAPClassinterface, making it accessible for users of the library.Updates to the Captive Portal example:
CaptivePortal.ino: Replaced the manual configuration of the access point with the newWiFi.AP.createandWiFi.AP.enableDhcpCaptivePortalmethods, streamlining the setup process for users.Closes #11399