Wizer is an advanced WiFi network diagnostics library for ESP32 and ESP8266 boards. It offers advanced tools to monitor signal strength, measure latency and jitter, detect captive portals, run HTTP diagnostics, scan nearby WiFi networks, and perform bandwidth testing.
- Latency and Jitter Measurement – Monitors real-time delay and signal stability.
- Signal Strength Analysis – Provides RSSI and a derived signal quality score.
- HTTP Diagnostics – Tests endpoints and provides response time, status code, and redirection info.
- Bandwidth Testing – Performs basic upload and download speed estimation.
- WiFi Scanning – Lists nearby WiFi networks with encryption type and signal info.
- Connection Monitoring – Logs disconnect events and timestamps.
- Captive Portal Detection – Useful for identifying login pages in public networks.
- Signal History – Tracks signal variations over time with optional JSON export.
Install the library from Arduino IDE or clone this library and move it inside Arduino/libraries.
WiFi.begin("YourSSID", "YourPassword");
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
}
Wizer wizer;
wizer.begin();
void loop() {
wizer.update();
delay(5000);
}
Initializes the Wizer engine.
- @param
host
– The hostname used for ping diagnostics (default:google.com
).
Runs the diagnostics cycle.
- Checks WiFi status (disconnect/reconnect events).
- Performs ping tests.
- Computes signal score.
- Records signal sample to history.
Injects an external WiFiClient
object if you want Wizer to reuse an existing client.
- @param
externalClient
– A pointer to an externally managedWiFiClient
.
Returns the average ping round-trip time (RTT) in milliseconds.
- @return Latency in ms, or -1 if all pings failed.
Calculates jitter based on variance between ping RTTs.
- @return Jitter value in ms.
Measures percentage of failed pings.
- @return Packet loss in %.
Returns a normalized signal quality score (0–100) derived from RSSI.
- @return Signal quality score.
Returns the last known RSSI value from the WiFi interface.
- @return Signal strength in dBm.
Tests connectivity to an HTTP server.
- @param
url
– Full URL to test (e.g.,http://example.com
). - @param
timeout
– Timeout for HTTP request (default 3000 ms). - @return Struct containing connection success, status code, response time, and redirection info.
Returns response time (ms) from last testConnection()
call.
- @return Time in ms.
Returns last received HTTP status code.
- @return Status code (e.g., 200, 301, 404).
Downloads a test file and estimates speed.
- @param
testUrl
– URL of the file to download. - @return Speed in KB/s. Returns 0.0 if failed.
Uploads dummy data to test server.
- @param
serverUrl
– Target URL to upload to (must accept POST). - @return Upload speed in KB/s. Returns 0.0 if failed.
Scans and returns a list of visible WiFi networks.
- @return Vector of
NetworkInfo
structs.
Returns the number of detected disconnections since boot.
- @return Count of disconnects.
Timestamp of the most recent disconnect (in ms).
- @return Millis since boot.
Returns the current IP address of the device.
- @return IPAddress object.
Detects presence of captive portals by checking for redirection or content mismatch.
- @param
url
– URL that normally returns 204 with no content. - @return True if captive portal is likely active.
Returns a history of recent signal samples.
- @return Vector of
SignalSample
.
Clears stored signal samples.
Manually records current signal values into history.
Exports the signal history as a JSON string.
- @return JSON-formatted array of signal samples.
Exports current diagnostic values as a JSON object.
- @return JSON string of latency, jitter, RSSI, etc.
Converts a ConnectionInfo
struct into a JSON string.
- @param
info
– Connection struct. - @return JSON string with full connection detail.
Called automatically when WiFi drops.
Called when WiFi reconnects after disconnect.
MIT License – use, modify, and distribute freely.
Saurav Sajeev