28#ifndef LIBRISHKA_DRIVERS_WIFI_H
29#define LIBRISHKA_DRIVERS_WIFI_H
76 WIFI_STATUS_NO_SHIELD = 0xff,
77 WIFI_STATUS_STOPPED = 0xfe,
78 WIFI_STATUS_IDLE_STATUS = 0x00,
79 WIFI_STATUS_NO_SSID_AVAIL = 0x01,
80 WIFI_STATUS_SCAN_COMPLETED = 0x02,
81 WIFI_STATUS_CONNECTED = 0x03,
82 WIFI_STATUS_CONNECT_FAILED = 0x04,
83 WIFI_STATUS_CONNECTION_LOST = 0x05,
84 WIFI_STATUS_DISCONNECTED = 0x06
211 static string ssid();
228 static string bssid();
Provides an interface for managing WiFi connections on the Rishka system.
Definition: wifi.h:94
static void set_scan_method(u8 scan_method)
Sets the WiFi scanning method.
Definition: librishka_drivers_wifi.cpp:57
static string bssid()
Retrieves the BSSID of the current WiFi access point.
Definition: librishka_drivers_wifi.cpp:77
static bool connect(string ssid, string passkey, i32 channel=0, u8 *bssid=nullptr)
Connects to a WiFi network.
Definition: librishka_drivers_wifi.cpp:21
static void set_sort_method(u8 sort_method)
Sets the method for sorting access points in the scan list.
Definition: librishka_drivers_wifi.cpp:61
static string psk()
Retrieves the Pre-Shared Key (PSK) of the current WiFi network.
Definition: librishka_drivers_wifi.cpp:73
static bool reconnect()
Reconnects to the last connected WiFi network.
Definition: librishka_drivers_wifi.cpp:25
static bool is_autoreconnect()
Checks if the auto-reconnect feature is enabled.
Definition: librishka_drivers_wifi.cpp:45
static string ssid()
Retrieves the SSID of the current WiFi network.
Definition: librishka_drivers_wifi.cpp:69
static bool set_autoreconnect(bool auto_recon)
Sets the auto-reconnect feature.
Definition: librishka_drivers_wifi.cpp:41
static i8 rssi()
Retrieves the Received Signal Strength Indicator (RSSI) of the current WiFi connection.
Definition: librishka_drivers_wifi.cpp:81
static void set_min_security(u8 auth_mode)
Sets the minimum security level for WiFi connections.
Definition: librishka_drivers_wifi.cpp:53
static bool is_connected()
Checks if the device is currently connected to a WiFi network.
Definition: librishka_drivers_wifi.cpp:37
static bool set_gateway_ip(string ip)
Sets the gateway IP address for the WiFi connection.
Definition: librishka_drivers_wifi.cpp:89
static u8 status()
Retrieves the current status of the WiFi module.
Definition: librishka_drivers_wifi.cpp:65
static u8 wait_for_result(u64 timeout)
Waits for a WiFi connection result within the specified timeout period.
Definition: librishka_drivers_wifi.cpp:49
static bool disconnect(bool wifi_off, bool erase_ap)
Disconnects from the current WiFi network.
Definition: librishka_drivers_wifi.cpp:29
static bool erase_ap()
Erases the saved access point data from memory.
Definition: librishka_drivers_wifi.cpp:33
static bool set_local_ip(string ip)
Sets the local IP address for the WiFi connection.
Definition: librishka_drivers_wifi.cpp:85
Main header file for the Rishka SDK.
Header file for common data types used in Rishka applications.
signed char i8
Alias for the signed 8-bit integer type.
Definition: types.h:46
signed int i32
Alias for the signed 32-bit integer type.
Definition: types.h:58
unsigned char u8
Alias for the unsigned 8-bit integer type.
Definition: types.h:70
unsigned long int u64
Alias for the unsigned 64-bit integer type.
Definition: types.h:88
WiFiAuthMode
Enumerates the supported WiFi authentication modes.
Definition: wifi.h:38
@ WIFI_AUTH_ENTERPRISE
Definition: wifi.h:44
@ WIFI_AUTH_WPA3_PSK
Definition: wifi.h:46
@ WIFI_AUTH_MAX
Definition: wifi.h:50
@ WIFI_AUTH_WPA2_PSK
Definition: wifi.h:42
@ WIFI_AUTH_WPA3_ENT_192
Definition: wifi.h:49
@ WIFI_AUTH_WPA_WPA2_PSK
Definition: wifi.h:43
@ WIFI_AUTH_WPA2_WPA3_PSK
Definition: wifi.h:47
@ WIFI_AUTH_WEP
Definition: wifi.h:40
@ WIFI_AUTH_WAPI_PSK
Definition: wifi.h:48
@ WIFI_AUTH_WPA2_ENTERPRISE
Definition: wifi.h:45
@ WIFI_AUTH_WPA_PSK
Definition: wifi.h:41
@ WIFI_AUTH_OPEN
Definition: wifi.h:39
WiFiSortMethod
Defines the methods for sorting access points in the scan list.
Definition: wifi.h:66
@ WIFI_CONNECT_AP_BY_SECURITY
Definition: wifi.h:68
@ WIFI_CONNECT_AP_BY_SIGNAL
Definition: wifi.h:67
WiFiScanMethod
Defines the methods used for scanning WiFi networks.
Definition: wifi.h:57
@ WIFI_ALL_CHANNEL_SCAN
Definition: wifi.h:59
@ WIFI_FAST_SCAN
Definition: wifi.h:58
WiFiStatus
Enumerates the possible states of the WiFi connection.
Definition: wifi.h:75