Skip to content

Latest commit

 

History

History
65 lines (42 loc) · 1.76 KB

esp_wifi.rst

File metadata and controls

65 lines (42 loc) · 1.76 KB

esp_wifi --- Espressif WiFi

esp_wifi

This module is a wrapper for the Espressif WiFi interface.

Configure the WiFi as a Station and an Access Point at the same time. The application tries to connect to a Wifi with SSID ssid and will accept connections to the SSID Simba.

esp_wifi_set_op_mode(esp_wifi_op_mode_station_softap_t);
esp_wifi_softap_init("Simba", NULL);
esp_wifi_station_init("ssid", "password", NULL, NULL);

Configure the WiFi as an Access Point. The application will accept connections to the SSID Simba.

esp_wifi_set_op_mode(esp_wifi_op_mode_softap_t);
esp_wifi_softap_init("Simba", NULL);

Configure the WiFi as a Station. The application tries to connect to a Wifi with SSID ssid.

esp_wifi_set_op_mode(esp_wifi_op_mode_station_t);
esp_wifi_station_init("ssid", "password", NULL, NULL);

Configure the WiFi as a Station specifying the MAC address of the access point. The application tries to connect to a Wifi with a MAC of c8:d7:19:0f:04:66 and SSID ssid.

esp_wifi_set_op_mode(esp_wifi_op_mode_station_t);
esp_wifi_station_init("ssid",
                      "password",
                      (uint8_t[]){0xc8, 0xd7, 0x19, 0x0f, 0x04, 0x66},
                      NULL);

Submodules:

esp_wifi/*


Source code: src/drivers/esp_wifi.h, src/drivers/esp_wifi.c

Test code: tst/drivers/esp_wifi/main.c


drivers/esp_wifi.h