TinyWifiDongle 0.1.0
Header-only USB WiFi dongle for Arduino
Loading...
Searching...
No Matches
twd::SetupPortal Class Reference

Captive portal in which the user picks a WiFi network and enters its password. More...

#include <SetupPortal.h>

Public Member Functions

 SetupPortal (const char *network, const char *password=nullptr)
 The access point is called network; password (at least 8 characters) protects it, nullptr leaves it open.
void run (String &ssid, String &password)
 Serves the form until a network is submitted and returns it. Blocks.

Detailed Description

Captive portal in which the user picks a WiFi network and enters its password.

run() scans for networks, opens an access point, answers every DNS query with the board's own address (so a phone or laptop that joins the access point opens the page by itself) and serves a small form until the user has submitted a network. Built from the web server, DNS server and WiFi classes that the ESP32 and the Raspberry Pi Pico cores both contain.

Definition at line 20 of file SetupPortal.h.

Constructor & Destructor Documentation

◆ SetupPortal()

twd::SetupPortal::SetupPortal ( const char * network,
const char * password = nullptr )
inlineexplicit

The access point is called network; password (at least 8 characters) protects it, nullptr leaves it open.

Definition at line 23 of file SetupPortal.h.

Member Function Documentation

◆ run()

void twd::SetupPortal::run ( String & ssid,
String & password )
inline

Serves the form until a network is submitted and returns it. Blocks.

Definition at line 27 of file SetupPortal.h.


The documentation for this class was generated from the following file: