ESPHome  1.15.2
Data Structures | Typedefs | Enumerations | Functions | Variables
esphome::wifi Namespace Reference

Data Structures

struct  EAPAuth
 
struct  ManualIP
 Struct for setting static IPs in WiFiComponent. More...
 
class  WiFiAP
 
class  WiFiComponent
 This component is responsible for managing the ESP WiFi interface. More...
 
class  WiFiConnectedCondition
 
class  WiFiScanResult
 
struct  WiFiSTAPriority
 

Typedefs

using bssid_t = std::array< uint8_t, 6 >
 

Enumerations

enum  WiFiComponentState {
  WIFI_COMPONENT_STATE_OFF = 0, WIFI_COMPONENT_STATE_COOLDOWN, WIFI_COMPONENT_STATE_STA_SCANNING, WIFI_COMPONENT_STATE_STA_CONNECTING,
  WIFI_COMPONENT_STATE_STA_CONNECTING_2, WIFI_COMPONENT_STATE_STA_CONNECTED, WIFI_COMPONENT_STATE_AP
}
 
enum  WiFiPowerSaveMode { WIFI_POWER_SAVE_NONE = 0, WIFI_POWER_SAVE_LIGHT, WIFI_POWER_SAVE_HIGH }
 

Functions

void print_signal_bars (int8_t rssi, char *buf)
 
const char * get_auth_mode_str (uint8_t mode)
 
std::string format_ip4_addr (const ip4_addr_t &ip)
 
const char * get_op_mode_str (uint8_t mode)
 
const char * get_disconnect_reason_str (uint8_t reason)
 
struct netif * eagle_lwip_getif (int netif_index)
 
void netif_set_addr (struct netif *netif, const ip4_addr_t *ip, const ip4_addr_t *netmask, const ip4_addr_t *gw)
 
std::string format_ip_addr (struct ipv4_addr ip)
 
std::string format_ip_addr (struct ip_addr ip)
 

Variables

WiFiComponentglobal_wifi_component
 

Typedef Documentation

◆ bssid_t

using esphome::wifi::bssid_t = typedef std::array<uint8_t, 6>

Definition at line 72 of file wifi_component.h.

Enumeration Type Documentation

◆ WiFiComponentState

Enumerator
WIFI_COMPONENT_STATE_OFF 

Nothing has been initialized yet.

Internal AP, if configured, is disabled at this point.

WIFI_COMPONENT_STATE_COOLDOWN 

WiFi is in cooldown mode because something went wrong, scanning will begin after a short period of time.

WIFI_COMPONENT_STATE_STA_SCANNING 

WiFi is in STA-only mode and currently scanning for APs.

WIFI_COMPONENT_STATE_STA_CONNECTING 

WiFi is in STA(+AP) mode and currently connecting to an AP.

WIFI_COMPONENT_STATE_STA_CONNECTING_2 

WiFi is in STA(+AP) mode and currently connecting to an AP a second time.

This is required because for some reason ESPs don't like to connect to WiFi APs directly after a scan.

WIFI_COMPONENT_STATE_STA_CONNECTED 

WiFi is in STA(+AP) mode and successfully connected.

WIFI_COMPONENT_STATE_AP 

WiFi is in AP-only mode and internal AP is already enabled.

Definition at line 30 of file wifi_component.h.

◆ WiFiPowerSaveMode

Enumerator
WIFI_POWER_SAVE_NONE 
WIFI_POWER_SAVE_LIGHT 
WIFI_POWER_SAVE_HIGH 

Definition at line 145 of file wifi_component.h.

Function Documentation

◆ eagle_lwip_getif()

struct netif* esphome::wifi::eagle_lwip_getif ( int  netif_index)

◆ format_ip4_addr()

std::string esphome::wifi::format_ip4_addr ( const ip4_addr_t &  ip)

Definition at line 268 of file wifi_component_esp32.cpp.

◆ format_ip_addr() [1/2]

std::string esphome::wifi::format_ip_addr ( struct ipv4_addr  ip)

Definition at line 285 of file wifi_component_esp8266.cpp.

◆ format_ip_addr() [2/2]

std::string esphome::wifi::format_ip_addr ( struct ip_addr  ip)

Definition at line 292 of file wifi_component_esp8266.cpp.

◆ get_auth_mode_str()

const char * esphome::wifi::get_auth_mode_str ( uint8_t  mode)

Definition at line 250 of file wifi_component_esp32.cpp.

◆ get_disconnect_reason_str()

const char * esphome::wifi::get_disconnect_reason_str ( uint8_t  reason)

Definition at line 288 of file wifi_component_esp32.cpp.

◆ get_op_mode_str()

const char * esphome::wifi::get_op_mode_str ( uint8_t  mode)

Definition at line 274 of file wifi_component_esp32.cpp.

◆ netif_set_addr()

void esphome::wifi::netif_set_addr ( struct netif *  netif,
const ip4_addr_t *  ip,
const ip4_addr_t *  netmask,
const ip4_addr_t *  gw 
)

◆ print_signal_bars()

void esphome::wifi::print_signal_bars ( int8_t  rssi,
char *  buf 
)

Definition at line 254 of file wifi_component.cpp.

Variable Documentation

◆ global_wifi_component

WiFiComponent * esphome::wifi::global_wifi_component

Definition at line 636 of file wifi_component.cpp.