|
network-provisioning-zephyr
Zephyr port of Espressif's network provisioning protocol (Wi-Fi over BLE / SoftAP / console)
|
#include <stddef.h>#include <stdint.h>#include <zephyr/net/wifi.h>#include <zephyr/net/wifi_mgmt.h>Go to the source code of this file.
Data Structures | |
| struct | fake_wifi_ap |
| A canned access point the fake backend reports from a scan. More... | |
Functions | |
| void | fake_wifi_set_scan_aps (const struct fake_wifi_ap *aps, size_t count) |
| Replace the canned AP list returned by subsequent NET_REQUEST_WIFI_SCAN requests. | |
| void | fake_wifi_set_next_connect_result (enum wifi_conn_status status) |
| Program the conn_status reported for the next NET_REQUEST_WIFI_CONNECT. | |
| void | fake_wifi_set_next_connect_sync_error (int errnum) |
Make the next NET_REQUEST_WIFI_CONNECT fail synchronously with -errnum (e.g. | |
| void | fake_wifi_set_expected_credentials (const char *ssid, const char *pass) |
| Switch the backend to credential-matching mode: the outcome of each connect is derived from the requested credentials rather than a pre-programmed status. | |
| void | fake_wifi_reset (void) |
| Reset all programmed state: empty scan list, connect succeeds, no sync error. | |
| void fake_wifi_reset | ( | void | ) |
Reset all programmed state: empty scan list, connect succeeds, no sync error.
| void fake_wifi_set_expected_credentials | ( | const char * | ssid, |
| const char * | pass | ||
| ) |
Switch the backend to credential-matching mode: the outcome of each connect is derived from the requested credentials rather than a pre-programmed status.
With ssid / pass configured as the one "real" network:
ssid to leave this mode. | void fake_wifi_set_next_connect_result | ( | enum wifi_conn_status | status | ) |
Program the conn_status reported for the next NET_REQUEST_WIFI_CONNECT.
Use WIFI_STATUS_CONN_SUCCESS, WIFI_STATUS_CONN_WRONG_PASSWORD, WIFI_STATUS_CONN_AP_NOT_FOUND, etc. The setting persists across attempts until changed (so the manager's retry loop sees a consistent failure).
| void fake_wifi_set_next_connect_sync_error | ( | int | errnum | ) |
Make the next NET_REQUEST_WIFI_CONNECT fail synchronously with -errnum (e.g.
EINVAL) instead of raising an async result, to exercise the config handler's synchronous-rejection path. One-shot: cleared after it fires.
| void fake_wifi_set_scan_aps | ( | const struct fake_wifi_ap * | aps, |
| size_t | count | ||
| ) |
Replace the canned AP list returned by subsequent NET_REQUEST_WIFI_SCAN requests.
aps is copied (up to CONFIG_NETWORK_PROV_FAKE_WIFI_MAX_AP).