WIFI_MODE_APSTA interface support for AP (BGN) and STA (LR)?
Posted: Tue Sep 07, 2021 3:40 pm
I would like to setup a network of ESP32S2's.
The design is:
a) master controller to serve as a WIFI AP (for connection to iphone) as well as WIFI STATION (for ESP_NOW traffic).
b) slave responders as WIFI STATIONS using ESP NOW and WIFI_PROTOCOL_LR.
I can get two ESP32S2's to communicate if both controller and responders are setup as:
esp_wifi_set_mode(WIFI_MODE_STA)
esp_wifi_set_protocol(ESP_IF_WIFI_STA, WIFI_PROTOCOL_LR)
However ... the following only partially works as it does not result in an access point being setup or available.
Controller setup:
esp_wifi_set_mode(WIFI_MODE_APSTA)
...
esp_wifi_set_protocol(ESP_IF_WIFI_AP, WIFI_PROTOCOL_11B|WIFI_PROTOCOL_11G|WIFI_PROTOCOL_11N)
...
esp_wifi_set_protocol(ESP_IF_WIFI_STA, WIFI_PROTOCOL_LR)
Responder setup:
esp_wifi_set_mode(WIFI_MODE_STA)
esp_wifi_set_protocol(ESP_IF_WIFI_STA, WIFI_PROTOCOL_LR)
My specific question is, can you setup the two interfaces on the controller (one ESP32S2 or any other Espressif chip) when in mode WIFI_MODE_APSTA; one acting as a WIFI AP supporting BGN and one acting as a WIFI STA supporting just the WIFI_PROTOCOL_LR (for ESP-NOW)? My IDF is v4.2.
The design is:
a) master controller to serve as a WIFI AP (for connection to iphone) as well as WIFI STATION (for ESP_NOW traffic).
b) slave responders as WIFI STATIONS using ESP NOW and WIFI_PROTOCOL_LR.
I can get two ESP32S2's to communicate if both controller and responders are setup as:
esp_wifi_set_mode(WIFI_MODE_STA)
esp_wifi_set_protocol(ESP_IF_WIFI_STA, WIFI_PROTOCOL_LR)
However ... the following only partially works as it does not result in an access point being setup or available.
Controller setup:
esp_wifi_set_mode(WIFI_MODE_APSTA)
...
esp_wifi_set_protocol(ESP_IF_WIFI_AP, WIFI_PROTOCOL_11B|WIFI_PROTOCOL_11G|WIFI_PROTOCOL_11N)
...
esp_wifi_set_protocol(ESP_IF_WIFI_STA, WIFI_PROTOCOL_LR)
Responder setup:
esp_wifi_set_mode(WIFI_MODE_STA)
esp_wifi_set_protocol(ESP_IF_WIFI_STA, WIFI_PROTOCOL_LR)
My specific question is, can you setup the two interfaces on the controller (one ESP32S2 or any other Espressif chip) when in mode WIFI_MODE_APSTA; one acting as a WIFI AP supporting BGN and one acting as a WIFI STA supporting just the WIFI_PROTOCOL_LR (for ESP-NOW)? My IDF is v4.2.