initial commit

This commit is contained in:
valentineautos
2025-12-05 09:22:55 +00:00
parent 46949642a2
commit 16ffc2ab10
4033 changed files with 980542 additions and 0 deletions

View File

@@ -0,0 +1 @@
cb5d6fe638e2a1363bbae086c3b65ac6d4704151f982872989f0020e43aa84a8

View File

@@ -0,0 +1,8 @@
---
commitizen:
bump_message: 'bump(wifi_remote): $current_version -> $new_version'
pre_bump_hooks: python ../../ci/changelog.py esp_wifi_remote
tag_format: wifi_remote-v$version
version: 0.12.1
version_files:
- idf_component.yml

View File

@@ -0,0 +1,302 @@
# Changelog
## [0.12.1](https://github.com/espressif/esp-wifi-remote/commits/wifi_remote-v0.12.1)
### Bug Fixes
- Update per v6.0 espressif/esp-idf@15c336bf493f ([9cf4623](https://github.com/espressif/esp-wifi-remote/commit/9cf4623))
## [0.12.0](https://github.com/espressif/esp-wifi-remote/commits/wifi_remote-v0.12.0)
### Features
- Add initial support for native + remote coexistence ([049c832](https://github.com/espressif/esp-wifi-remote/commit/049c832))
## [0.11.3](https://github.com/espressif/esp-wifi-remote/commits/wifi_remote-v0.11.3)
### Bug Fixes
- Update per v6.0 removal of C61 ([4478fdf](https://github.com/espressif/esp-wifi-remote/commit/4478fdf))
## [0.11.2](https://github.com/espressif/esp-wifi-remote/commits/wifi_remote-v0.11.2)
### Bug Fixes
- Update per v5.4 espressif/esp-idf@5fb9c3a84950 ([cdb9a94](https://github.com/espressif/esp-wifi-remote/commit/cdb9a94))
- Add generate-all script + ignore temp files ([d6a0bec](https://github.com/espressif/esp-wifi-remote/commit/d6a0bec))
- Update per v6.0 espressif/esp-idf@6d7593c1be11 ([ab8364d](https://github.com/espressif/esp-wifi-remote/commit/ab8364d))
## [0.11.1](https://github.com/espressif/esp-wifi-remote/commits/wifi_remote-v0.11.1)
### Bug Fixes
- Prefix slave deps with WIFI_RMT_ ([e92e946](https://github.com/espressif/esp-wifi-remote/commit/e92e946))
## [0.11.0](https://github.com/espressif/esp-wifi-remote/commits/wifi_remote-v0.11.0)
### Features
- Make C6 slave default for P4 targets ([d3eefe0](https://github.com/espressif/esp-wifi-remote/commit/d3eefe0))
### Bug Fixes
- Update per v5.0 espressif/esp-idf@269f1d110d3e ([53721af](https://github.com/espressif/esp-wifi-remote/commit/53721af))
- Update per v6.0 espressif/esp-idf@4fae51e3c16d ([71aeaee](https://github.com/espressif/esp-wifi-remote/commit/71aeaee))
## [0.10.2](https://github.com/espressif/esp-wifi-remote/commits/wifi_remote-v0.10.2)
### Bug Fixes
- Update per v5.5 branch off ([d75aeea](https://github.com/espressif/esp-wifi-remote/commit/d75aeea))
## [0.10.1](https://github.com/espressif/esp-wifi-remote/commits/wifi_remote-v0.10.1)
### Bug Fixes
- Inject wifi headers only if no wifi/wifi-host ([f13a99a](https://github.com/espressif/esp-wifi-remote/commit/f13a99a))
## [0.10.0](https://github.com/espressif/esp-wifi-remote/commits/wifi_remote-v0.10.0)
### Features
- Support for IDF v6.0 ([4ac5dba](https://github.com/espressif/esp-wifi-remote/commit/4ac5dba))
### Bug Fixes
- Update per v5.3 espressif/esp-idf@3f27399ef46 ([0cf6a98](https://github.com/espressif/esp-wifi-remote/commit/0cf6a98))
- Update per v5.5 espressif/esp-idf@3035667e69f3 ([5de79b7](https://github.com/espressif/esp-wifi-remote/commit/5de79b7))
## [0.9.2](https://github.com/espressif/esp-wifi-remote/commits/wifi_remote-v0.9.2)
### Bug Fixes
- Update per v5.5 espressif/esp-idf@dd9f8bfcbcc1 ([49fdd4a](https://github.com/espressif/esp-wifi-remote/commit/49fdd4a))
## [0.9.1](https://github.com/espressif/esp-wifi-remote/commits/wifi_remote-v0.9.1)
### Bug Fixes
- Update per v5.4 espressif/esp-idf@c9cc85b68c15 ([4040eac](https://github.com/espressif/esp-wifi-remote/commit/4040eac))
- Update per v5.3 espressif/esp-idf@1c63e3e70c18 ([188d87b](https://github.com/espressif/esp-wifi-remote/commit/188d87b))
## [0.9.0](https://github.com/espressif/esp-wifi-remote/commits/wifi_remote-v0.9.0)
### Features
- Add release v5.4.1 ([b3ca515](https://github.com/espressif/esp-wifi-remote/commit/b3ca515))
- Add release v5.3.3 ([06367d2](https://github.com/espressif/esp-wifi-remote/commit/06367d2))
### Bug Fixes
- Update per v5.3 espressif/esp-idf@04a0e6304b2f ([d1f85ce](https://github.com/espressif/esp-wifi-remote/commit/d1f85ce))
- Update per v5.5 espressif/esp-idf@c00d092bdb4e ([8598951](https://github.com/espressif/esp-wifi-remote/commit/8598951))
- Update per v5.4 espressif/esp-idf@90c008fe8c4a ([d8f4109](https://github.com/espressif/esp-wifi-remote/commit/d8f4109))
- Update per v5.5 espressif/esp-idf@07540f3253d ([245379e](https://github.com/espressif/esp-wifi-remote/commit/245379e))
- Update per v5.4 espressif/esp-idf@f8b1c0976aeb ([c17cb8f](https://github.com/espressif/esp-wifi-remote/commit/c17cb8f))
## [0.8.5](https://github.com/espressif/esp-wifi-remote/commits/wifi_remote-v0.8.5)
### Bug Fixes
- Update per v5.5 espressif/esp-idf@4355fc8fbc6b ([215d007](https://github.com/espressif/esp-wifi-remote/commit/215d007))
- Add esp_now.h to injected headers ([09ffacc](https://github.com/espressif/esp-wifi-remote/commit/09ffacc))
## [0.8.4](https://github.com/espressif/esp-wifi-remote/commits/wifi_remote-v0.8.4)
### Bug Fixes
- Update per v5.4 espressif/esp-idf@e72c3b4ee437 ([cfc3e3f](https://github.com/espressif/esp-wifi-remote/commit/cfc3e3f))
- Update per v5.5 espressif/esp-idf@895e897ee789 ([ea26450](https://github.com/espressif/esp-wifi-remote/commit/ea26450))
## [0.8.3](https://github.com/espressif/esp-wifi-remote/commits/wifi_remote-v0.8.3)
### Bug Fixes
- Fix to propagate remote wifi settings to esp_wifi ([4ea96e1](https://github.com/espressif/esp-wifi-remote/commit/4ea96e1))
## [0.8.2](https://github.com/espressif/esp-wifi-remote/commits/wifi_remote-v0.8.2)
### Bug Fixes
- Inject also esp_mesh headers ([4ac7fbd](https://github.com/espressif/esp-wifi-remote/commit/4ac7fbd))
## [0.8.1](https://github.com/espressif/esp-wifi-remote/commits/wifi_remote-v0.8.1)
### Bug Fixes
- Update per v5.3 espressif/esp-idf@91622962fcd ([8c4f00d](https://github.com/espressif/esp-wifi-remote/commit/8c4f00d))
## [0.8.0](https://github.com/espressif/esp-wifi-remote/commits/wifi_remote-v0.8.0)
### Features
- Copy additional wifi headers to prepend-dir ([a936924](https://github.com/espressif/esp-wifi-remote/commit/a936924))
- Add injected headers with slave/remote configs ([485d261](https://github.com/espressif/esp-wifi-remote/commit/485d261))
- use WIFI_RMT_ prefix for remote wifi configs ([e1a9d6b](https://github.com/espressif/esp-wifi-remote/commit/e1a9d6b))
### Bug Fixes
- Update per v5.5 espressif/esp-idf@c0580480852 ([8ab3732](https://github.com/espressif/esp-wifi-remote/commit/8ab3732))
- Update headers and configs on supported versions ([1279776](https://github.com/espressif/esp-wifi-remote/commit/1279776))
- Preprocess injected headers ([6e981ff](https://github.com/espressif/esp-wifi-remote/commit/6e981ff))
## [0.7.2](https://github.com/espressif/esp-wifi-remote/commits/wifi_remote-v0.7.2)
### Bug Fixes
- Add specific versions for v5.3.2, v5.3.1 ([ccebced](https://github.com/espressif/esp-wifi-remote/commit/ccebced))
- Update per v5.3 espressif/esp-idf4724d7c5e79 ([9d76715](https://github.com/espressif/esp-wifi-remote/commit/9d76715))
- Add specific version for v5.4 tag ([076d80b](https://github.com/espressif/esp-wifi-remote/commit/076d80b))
## [0.7.1](https://github.com/espressif/esp-wifi-remote/commits/wifi_remote-v0.7.1)
### Bug Fixes
- Update per v5.4 espressif/esp-idf@597cfcb4 ([006309e](https://github.com/espressif/esp-wifi-remote/commit/006309e))
## [0.7.0](https://github.com/espressif/esp-wifi-remote/commits/wifi_remote-v0.7.0)
### Features
- Support for esp32h4 ([3666134](https://github.com/espressif/esp-wifi-remote/commit/3666134))
### Bug Fixes
- Fixed ignore tag for multiple definitions ([3c4bc4a](https://github.com/espressif/esp-wifi-remote/commit/3c4bc4a))
## [0.6.2](https://github.com/espressif/esp-wifi-remote/commits/wifi_remote-v0.6.2)
### Bug Fixes
- Allow global configs to be defined multiple times ([deb6d4c](https://github.com/espressif/esp-wifi-remote/commit/deb6d4c))
- Account for global target configs in slave select ([0ffdd63](https://github.com/espressif/esp-wifi-remote/commit/0ffdd63))
## [0.6.1](https://github.com/espressif/esp-wifi-remote/commits/wifi_remote-v0.6.1)
### Bug Fixes
- Ignore potential duplicate of Kconfg symbols ([14e0339](https://github.com/espressif/esp-wifi-remote/commit/14e0339))
## [0.6.0](https://github.com/espressif/esp-wifi-remote/commits/wifi_remote-v0.6.0)
### Features
- Add static config headers ([b419fd6](https://github.com/espressif/esp-wifi-remote/commit/b419fd6))
- Generate static default config header ([a0e98bc](https://github.com/espressif/esp-wifi-remote/commit/a0e98bc), [#13](https://github.com/espressif/esp-wifi-remote/issues/13))
## [0.5.5](https://github.com/espressif/esp-wifi-remote/commits/wifi_remote-v0.5.5)
### Bug Fixes
- Update per v5.4 espressif/esp-idf@318ad17991f ([1ae9f08](https://github.com/espressif/esp-wifi-remote/commit/1ae9f08))
## [0.5.4](https://github.com/espressif/esp-wifi-remote/commits/wifi_remote-v0.5.4)
### Bug Fixes
- Update per v5.3 espressif/esp-idf@20cda6424 ([cad6646](https://github.com/espressif/esp-wifi-remote/commit/cad6646))
## [0.5.3](https://github.com/espressif/esp-wifi-remote/commits/wifi_remote-v0.5.3)
### Bug Fixes
- Update per v5.5 espressif/esp-idf@a1631199dc8 ([b4d934d](https://github.com/espressif/esp-wifi-remote/commit/b4d934d))
- Update per v5.3 espressif/esp-idf@da39fcebc48 ([a01226f](https://github.com/espressif/esp-wifi-remote/commit/a01226f))
- Update per IDF-v5.5 espressif/esp-idf@53e65c845b ([a8d1057](https://github.com/espressif/esp-wifi-remote/commit/a8d1057))
## [0.5.2](https://github.com/espressif/esp-wifi-remote/commits/wifi_remote-v0.5.2)
### Features
- Add wifi-remote target test ([f413031](https://github.com/espressif/esp-wifi-remote/commit/f413031))
- Make UART port number configurable ([c088f44](https://github.com/espressif/esp-wifi-remote/commit/c088f44))
### Bug Fixes
- Fix script to skip preview targets missing config.caps ([469dbaf](https://github.com/espressif/esp-wifi-remote/commit/469dbaf))
- Update v5.4 per espressif/esp-idf@e65acc95109 ([c2110d6](https://github.com/espressif/esp-wifi-remote/commit/c2110d6))
## [0.5.1](https://github.com/espressif/esp-wifi-remote/commits/wifi_remote-v0.5.1)
### Bug Fixes
- Update per IDF-v5.5 espressif/esp-idf@e65acc9510 ([cb6bf06](https://github.com/espressif/esp-wifi-remote/commit/cb6bf06))
- Update per espressif/esp-idf@87bb09d746 ([2dfc63c](https://github.com/espressif/esp-wifi-remote/commit/2dfc63c))
## [0.5.0](https://github.com/espressif/esp-wifi-remote/commits/wifi_remote-v0.5.0)
### Features
- Add support for IDF-v5.5 ([1e03fb8](https://github.com/espressif/esp-wifi-remote/commit/1e03fb8))
## [0.4.1](https://github.com/espressif/esp-wifi-remote/commits/wifi_remote-v0.4.1)
### Bug Fixes
- Remove unused Kconfig from scripts ([3c5d58f](https://github.com/espressif/esp-wifi-remote/commit/3c5d58f))
- Disable WiFi remote impl if ESP_HOST_WIFI_ENABLED=y ([1f6fe16](https://github.com/espressif/esp-wifi-remote/commit/1f6fe16))
## [0.4.0](https://github.com/espressif/esp-protocols/commits/wifi_remote-v0.4.0)
### Features
- Make esp_hosted default RPC library ([1b62adbd](https://github.com/espressif/esp-protocols/commit/1b62adbd))
- Add build test for current IDF examples ([50c113e4](https://github.com/espressif/esp-protocols/commit/50c113e4))
- Support for IDF v5.3 in a separate directory ([bde97203](https://github.com/espressif/esp-protocols/commit/bde97203))
- Support for IDF v5.4 via a separate dir ([e9ac41e1](https://github.com/espressif/esp-protocols/commit/e9ac41e1))
- Add slave selection and peview targets ([345c4577](https://github.com/espressif/esp-protocols/commit/345c4577))
### Bug Fixes
- Fix CMake to use inherent IDF build vars ([c454ec09](https://github.com/espressif/esp-protocols/commit/c454ec09))
- Update per v5.4 espressif/esp-idf@97e42349 ([ff5dac70](https://github.com/espressif/esp-protocols/commit/ff5dac70))
- Fix CI builds to generate configs per slave selection ([8795d164](https://github.com/espressif/esp-protocols/commit/8795d164))
- Depend on esp_hosted only on targets with no WiFi ([7ca5ed1d](https://github.com/espressif/esp-protocols/commit/7ca5ed1d))
- Update per espressif/esp-idf@27f61966 ([2e53b81f](https://github.com/espressif/esp-protocols/commit/2e53b81f))
- Fix checking API compat against reference dir ([1a57a878](https://github.com/espressif/esp-protocols/commit/1a57a878))
## [0.3.0](https://github.com/espressif/esp-protocols/commits/wifi_remote-v0.3.0)
### Features
- add esp_wifi_internal_tx_by_ref ([ba35d14e](https://github.com/espressif/esp-protocols/commit/ba35d14e))
- Make wifi_remote depend on esp_hosted ([ac9972aa](https://github.com/espressif/esp-protocols/commit/ac9972aa))
## [0.2.3](https://github.com/espressif/esp-protocols/commits/wifi_remote-v0.2.3)
### Bug Fixes
- Fix server event/command race condtion using eventfd ([732b1d5](https://github.com/espressif/esp-protocols/commit/732b1d5))
- Lock server before marshalling events ([9e13870](https://github.com/espressif/esp-protocols/commit/9e13870))
## [0.2.2](https://github.com/espressif/esp-protocols/commits/wifi_remote-v0.2.2)
### Bug Fixes
- Added more netif options for eppp connection ([24ce867](https://github.com/espressif/esp-protocols/commit/24ce867))
- Do not restrict EPPP config to RSA keys only ([f05c765](https://github.com/espressif/esp-protocols/commit/f05c765), [#570](https://github.com/espressif/esp-protocols/issues/570))
## [0.2.1](https://github.com/espressif/esp-protocols/commits/wifi_remote-v0.2.1)
### Bug Fixes
- Added misc wifi API in eppp impl ([93256d1](https://github.com/espressif/esp-protocols/commit/93256d1))
- Updated eppp dependency not to use fixed version ([3a48c06](https://github.com/espressif/esp-protocols/commit/3a48c06))
## [0.2.0](https://github.com/espressif/esp-protocols/commits/wifi_remote-v0.2.0)
### Features
- Add support for simple eppp based RPC ([fd168d8](https://github.com/espressif/esp-protocols/commit/fd168d8))
### Bug Fixes
- Make services restartable, code cleanup ([6c82ce2](https://github.com/espressif/esp-protocols/commit/6c82ce2))
- Add examples to CI ([d2b7c55](https://github.com/espressif/esp-protocols/commit/d2b7c55))
## [0.1.12](https://github.com/espressif/esp-protocols/commits/wifi_remote-v0.1.12)
### Features
- Added generation step for wifi_remote based on IDF ([dfb00358](https://github.com/espressif/esp-protocols/commit/dfb00358))
- Move to esp-protocols ([edc3c2d](https://github.com/espressif/esp-protocols/commit/edc3c2d))

View File

@@ -0,0 +1,61 @@
if(NOT CONFIG_ESP_WIFI_ENABLED AND NOT CONFIG_ESP_HOST_WIFI_ENABLED)
set(src_wifi_is_remote esp_wifi_remote.c esp_wifi_remote_net.c)
endif()
if(CONFIG_ESP_WIFI_REMOTE_LIBRARY_EPPP)
set(src_wifi_remote_eppp eppp/wifi_remote_rpc_client.cpp eppp/wifi_remote_rpc_server.cpp eppp/eppp_init.c)
endif()
idf_component_register(INCLUDE_DIRS include
SRCS ${src_wifi_is_remote}
${src_wifi_remote_eppp}
PRIV_INCLUDE_DIRS eppp
REQUIRES esp_event esp_netif
PRIV_REQUIRES esp_wifi esp-tls vfs)
set(IDF_VER_DIR "${CMAKE_CURRENT_SOURCE_DIR}/idf_v${IDF_VERSION_MAJOR}.${IDF_VERSION_MINOR}")
# Check if we're on tagged version of ESP-IDF and if we need to supply specific version
string(REGEX MATCH "^v[0-9]+\\.[0-9]+(\\.[0-9]+)?(-dirty)?$" IDF_VER_TAG "${IDF_VER}")
if (IDF_VER_TAG)
string(REGEX REPLACE "-dirty$" "" IDF_VER_TAG "${IDF_VER_TAG}")
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/idf_tag_${IDF_VER_TAG}")
set(IDF_VER_DIR "${CMAKE_CURRENT_SOURCE_DIR}/idf_tag_${IDF_VER_TAG}")
endif()
endif()
idf_component_get_property(wifi esp_wifi COMPONENT_LIB)
set(TARGET_INCLUDE_TYPE "INTERFACE")
set(TARGET_SOURCE_TYPE "INTERFACE")
if(NOT CONFIG_ESP_WIFI_ENABLED AND NOT CONFIG_ESP_HOST_WIFI_ENABLED)
set(src_wifi_with_remote ${IDF_VER_DIR}/esp_wifi_with_remote.c)
# We need to build wifi sources with wifi-remote properties, so the injected wifi headers are used
get_target_property(wifi_sources ${wifi} SOURCES)
set_target_properties(${wifi} PROPERTIES SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/dummy_src.c")
set(TARGET_INCLUDE_TYPE "PUBLIC")
set(TARGET_SOURCE_TYPE "PRIVATE")
endif()
if(CONFIG_ESP_WIFI_REMOTE_LIBRARY_EPPP)
set(TARGET_INCLUDE_TYPE "PUBLIC")
set(TARGET_SOURCE_TYPE "PRIVATE")
else()
set(src_wifi_remote_weak ${IDF_VER_DIR}/esp_wifi_remote_weak.c)
endif()
target_include_directories(${COMPONENT_LIB} ${TARGET_INCLUDE_TYPE} ${IDF_VER_DIR}/include)
target_sources(${COMPONENT_LIB} ${TARGET_SOURCE_TYPE} ${src_wifi_remote_weak}
${src_wifi_with_remote}
${wifi_sources})
if(NOT CONFIG_ESP_WIFI_ENABLED AND NOT CONFIG_ESP_HOST_WIFI_ENABLED)
# Update wifi include directories to prepend the injected dir with modified headers supporting SLAVE capability
get_target_property(original_wifi_dirs ${wifi} INTERFACE_INCLUDE_DIRECTORIES)
set(updated_wifi_dirs "${IDF_VER_DIR}/include/injected" ${original_wifi_dirs})
set_target_properties(${wifi} PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${updated_wifi_dirs}")
endif()
target_link_libraries(${wifi} PUBLIC ${COMPONENT_LIB})

View File

@@ -0,0 +1,34 @@
menu "Wi-Fi Remote"
config ESP_WIFI_REMOTE_ENABLED
bool
default y if !ESP_HOST_WIFI_ENABLED
default n if ESP_HOST_WIFI_ENABLED
if ESP_WIFI_REMOTE_ENABLED
orsource "./idf_v$ESP_IDF_VERSION/Kconfig.slave_select.in"
orsource "./idf_v$ESP_IDF_VERSION/Kconfig.soc_wifi_caps.in"
orsource "./Kconfig.rpc.in"
menu "Wi-Fi configuration"
orsource "./idf_v$ESP_IDF_VERSION/Kconfig.wifi.in"
endmenu
endif
if !ESP_WIFI_REMOTE_ENABLED
# This helper variables is only used to indicate that Wi-Fi remote if OFF
# and explains why
config ESP_WIFI_REMOTE_IS_DISABLED
bool "Wi-Fi Remote is disabled (Host Wi-Fi is ON)"
default y
help
Wi-Fi Remote is disabled because ESP_HOST_WIFI_ENABLED is ON.
These options are mutually exclusive.
Disable ESP_HOST_WIFI_ENABLED to use ESP_WIFI_REMOTE.
config ESP_WIFI_REMOTE_FORCE_DISABLED
bool
default y
select ESP_WIFI_REMOTE_IS_DISABLED
endif
endmenu # Wi-Fi Remote

View File

@@ -0,0 +1,137 @@
choice ESP_WIFI_REMOTE_LIBRARY
prompt "Choose WiFi-remote implementation"
default ESP_WIFI_REMOTE_LIBRARY_HOSTED
help
Select type of WiFi Remote implementation
ESP-HOSTED is the default and most versatile option.
It's also possible to use EPPP, which uses PPPoS link between micros and NAPT, so it's slower
and less universal.
config ESP_WIFI_REMOTE_LIBRARY_HOSTED
bool "ESP-HOSTED"
config ESP_WIFI_REMOTE_LIBRARY_EPPP
bool "EPPP"
endchoice
if ESP_WIFI_REMOTE_LIBRARY_EPPP
if EPPP_LINK_DEVICE_UART
config ESP_WIFI_REMOTE_EPPP_UART_PORT
int "UART port number"
default 1
range 0 3
help
UART Port number.
config ESP_WIFI_REMOTE_EPPP_UART_TX_PIN
int "TXD Pin Number"
default 10
range 0 54
help
Pin number of UART TX.
config ESP_WIFI_REMOTE_EPPP_UART_RX_PIN
int "RXD Pin Number"
default 11
range 0 54
help
Pin number of UART RX.
endif
if EPPP_LINK_DEVICE_SPI
config ESP_WIFI_REMOTE_EPPP_SPI_HOST
int "SPI host number"
default 1
range 0 3
help
SPI host number.
config ESP_WIFI_REMOTE_EPPP_SPI_MOSI_PIN
int "MOSI Pin Number"
default 23
range 0 54
help
Pin number of SPI MOSI.
config ESP_WIFI_REMOTE_EPPP_SPI_MISO_PIN
int "MISO Pin Number"
default 19
range 0 54
help
Pin number of SPI MISO.
config ESP_WIFI_REMOTE_EPPP_SPI_SCLK_PIN
int "SCLK Pin Number"
default 18
range 0 54
help
Pin number of SPI SCLK.
config ESP_WIFI_REMOTE_EPPP_SPI_CS_PIN
int "CS Pin Number"
default 5
range 0 54
help
Pin number of SPI CS.
config ESP_WIFI_REMOTE_EPPP_SPI_INTR_PIN
int "Interrupt Pin Number"
default 17
range 0 54
help
Pin number of SPI interrupt.
config ESP_WIFI_REMOTE_EPPP_SPI_FREQ
int "SPI frequency"
default 4000000
range 1000000 20000000
help
SPI frequency in Hz.
endif
config ESP_WIFI_REMOTE_EPPP_NETIF_PRIORITY
int "Routing priority of eppp netif"
default 100
range 0 256
help
Set the priority of the wifi-remote netif.
The bigger the number the higher the priority.
The interface which is up and with the highest priority will act as a default GW.
config ESP_WIFI_REMOTE_EPPP_NETIF_DESCRIPTION
string "eppp network interface description"
default "example_netif_sta"
help
Textual description of the wifi remote network interface.
By default it is set to "example_netif_sta" to be used in IDF protocol example
as default wifi station substitution.
config ESP_WIFI_REMOTE_EPPP_SERVER_CA
string "Servers CA certificate"
default "--- Please copy content of the CA certificate ---"
config ESP_WIFI_REMOTE_EPPP_CLIENT_CRT
string "Client certificate"
default "--- Please copy content of the Client certificate ---"
config ESP_WIFI_REMOTE_EPPP_CLIENT_KEY
string "Client key"
default "--- Please copy content of the Client key ---"
config ESP_WIFI_REMOTE_EPPP_CLIENT_CA
string "Clients CA certificate"
default "--- Please copy content of the CA certificate ---"
config ESP_WIFI_REMOTE_EPPP_SERVER_CRT
string "Server certificate"
default "--- Please copy content of the Client certificate ---"
config ESP_WIFI_REMOTE_EPPP_SERVER_KEY
string "Server key"
default "--- Please copy content of the Client key ---"
endif

View File

@@ -0,0 +1,202 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

View File

@@ -0,0 +1,26 @@
# esp_wifi_remote
[![Component Registry](https://components.espressif.com/components/espressif/esp_wifi_remote/badge.svg)](https://components.espressif.com/components/espressif/esp_wifi_remote)
The `esp_wifi_remote` component is designed to extend WiFi functionality to ESP chipsets that lack native WiFi support. By simply adding a dependency to this component from your project, you gain access to WiFi capabilities via the WiFi-remote menuconfig and standard `esp_wifi` interface.
Moreover, `esp_wifi_remote` can be utilized on ESP chipsets that do support native WiFi, providing an additional WiFi interface through the `esp_wifi_remote` API.
To employ this component, a slave device -- capable of WiFi connectivity -- must be connected to your target device in a specified manner, as defined by the transport layer of [`esp_hosted`](https://github.com/espressif/esp-hosted).
Functionally, `esp_wifi_remote` wraps the public API of `esp_wifi`, offering a set of function call namespaces prefixed with esp_wifi_remote. These calls are translated into Remote Procedure Calls (RPC) to another target device (referred to as the "slave" device), which then executes the appropriate `esp_wifi` APIs.
Notably, `esp_wifi_remote` heavily relies on a specific version of the `esp_wifi` component. Consequently, the majority of its headers, sources, and configuration files are pre-generated based on the actual version of `esp_wifi`.
It's important to highlight that `esp_wifi_remote` does not directly implement the RPC calls; rather, it relies on dependencies for this functionality. Presently, only esp_hosted is supported to provide the RPC functionality required by esp_wifi_remote.
## Dependencies on `esp_wifi`
Public API needs to correspond exactly to the `esp_wifi` API. Some of the internal types depend on the actual wifi target, as well as some default configuration values. Therefore it's easier to maintain consistency between this component and the exact version of `esp_wifi` automatically in CI:
* We extract function prototypes from `esp_wifi.h` and use them to generate `esp_wifi_remote` function declarations.
* We process the local `esp_wifi_types_native.h` and replace `CONFIG_IDF_TARGET` to `CONFIG_SLAVE_IDF_TARGET` and `CONFIG_SOC_WIFI_...` to `CONFIG_SLAVE_....`
* Similarly we process `esp_wifi`'s Kconfig, so the dependencies are on the slave target and slave SOC capabilities.
Please check the [README.md](./scripts/README.md) for more details on the generation step and testing consistency.

View File

@@ -0,0 +1,39 @@
/*
* SPDX-FileCopyrightText: 2024-2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#include "esp_log.h"
#include "esp_wifi.h"
#include "eppp_link.h"
__attribute__((weak)) esp_netif_t *wifi_remote_eppp_init(eppp_type_t role)
{
uint32_t our_ip = role == EPPP_SERVER ? EPPP_DEFAULT_SERVER_IP() : EPPP_DEFAULT_CLIENT_IP();
uint32_t their_ip = role == EPPP_SERVER ? EPPP_DEFAULT_CLIENT_IP() : EPPP_DEFAULT_SERVER_IP();
eppp_config_t config = EPPP_DEFAULT_CONFIG(our_ip, their_ip);
// We currently support only UART and SPI transport
#ifdef CONFIG_EPPP_LINK_DEVICE_UART
config.transport = EPPP_TRANSPORT_UART;
config.uart.tx_io = CONFIG_ESP_WIFI_REMOTE_EPPP_UART_TX_PIN;
config.uart.rx_io = CONFIG_ESP_WIFI_REMOTE_EPPP_UART_RX_PIN;
config.uart.port = CONFIG_ESP_WIFI_REMOTE_EPPP_UART_PORT;
config.ppp.netif_description = CONFIG_ESP_WIFI_REMOTE_EPPP_NETIF_DESCRIPTION;
config.ppp.netif_prio = CONFIG_ESP_WIFI_REMOTE_EPPP_NETIF_PRIORITY;
return eppp_open(role, &config, portMAX_DELAY);
#elif CONFIG_EPPP_LINK_DEVICE_SPI
config.transport = EPPP_TRANSPORT_SPI;
config.spi.host = CONFIG_ESP_WIFI_REMOTE_EPPP_SPI_HOST;
config.spi.mosi = CONFIG_ESP_WIFI_REMOTE_EPPP_SPI_MOSI_PIN;
config.spi.miso = CONFIG_ESP_WIFI_REMOTE_EPPP_SPI_MISO_PIN;
config.spi.sclk = CONFIG_ESP_WIFI_REMOTE_EPPP_SPI_SCLK_PIN;
config.spi.cs = CONFIG_ESP_WIFI_REMOTE_EPPP_SPI_CS_PIN;
config.spi.intr = CONFIG_ESP_WIFI_REMOTE_EPPP_SPI_INTR_PIN;
config.spi.freq = CONFIG_ESP_WIFI_REMOTE_EPPP_SPI_FREQ;
config.ppp.netif_description = CONFIG_ESP_WIFI_REMOTE_EPPP_NETIF_DESCRIPTION;
config.ppp.netif_prio = CONFIG_ESP_WIFI_REMOTE_EPPP_NETIF_PRIORITY;
return eppp_open(role, &config, portMAX_DELAY);
#else
return ESP_ERR_INVALID_STATE;
#endif
}

View File

@@ -0,0 +1,324 @@
/*
* SPDX-FileCopyrightText: 2024-2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <netdb.h>
#include <memory>
#include <cinttypes>
#include "esp_log.h"
#include "esp_tls.h"
#include "esp_wifi.h"
#include "esp_check.h"
#include "wifi_remote_rpc_impl.hpp"
#include "eppp_link.h"
#include "freertos/FreeRTOS.h"
#include "freertos/event_groups.h"
#include "wifi_remote_rpc_params.h"
extern "C" esp_netif_t *wifi_remote_eppp_init(eppp_type_t role);
#if defined(CONFIG_ESP_WIFI_ENABLED)
extern "C" ESP_EVENT_DEFINE_BASE(WIFI_REMOTE_EVENT);
#else
#define WIFI_REMOTE_EVENT WIFI_EVENT
#endif
namespace eppp_rpc {
namespace client {
const char *TAG = "rpc_client";
const unsigned char ca_crt[] = "-----BEGIN CERTIFICATE-----\n" CONFIG_ESP_WIFI_REMOTE_EPPP_SERVER_CA "\n-----END CERTIFICATE-----";
const unsigned char crt[] = "-----BEGIN CERTIFICATE-----\n" CONFIG_ESP_WIFI_REMOTE_EPPP_CLIENT_CRT "\n-----END CERTIFICATE-----";
const unsigned char key[] = "-----BEGIN PRIVATE KEY-----\n" CONFIG_ESP_WIFI_REMOTE_EPPP_CLIENT_KEY "\n-----END PRIVATE KEY-----";
// TODO: Add option to supply keys and certs via a global symbol (file)
}
using namespace client;
class Sync {
friend class RpcInstance;
public:
void lock()
{
xSemaphoreTake(mutex, portMAX_DELAY);
}
void unlock()
{
xSemaphoreGive(mutex);
}
esp_err_t init()
{
mutex = xSemaphoreCreateMutex();
events = xEventGroupCreate();
return mutex == nullptr || events == nullptr ? ESP_ERR_NO_MEM : ESP_OK;
}
esp_err_t wait_for(EventBits_t bits, uint32_t timeout = portMAX_DELAY)
{
return (xEventGroupWaitBits(events, bits, pdTRUE, pdTRUE, timeout) & bits) == bits ? ESP_OK : ESP_FAIL;
}
esp_err_t notify(EventBits_t bits)
{
xEventGroupSetBits(events, bits);
return ESP_OK;
}
~Sync()
{
if (mutex) {
vSemaphoreDelete(mutex);
}
if (events) {
vEventGroupDelete(events);
}
}
private:
SemaphoreHandle_t mutex{nullptr};
EventGroupHandle_t events{nullptr};
const int request = 1;
const int resp_header = 2;
const int resp_payload = 4;
const int restart = 8;
};
class RpcInstance {
friend class Sync;
public:
template<typename T>
esp_err_t send(api_id id, T *t)
{
pending_resp = id;
ESP_RETURN_ON_ERROR(sync.notify(sync.request), TAG, "failed to notify req");
ESP_RETURN_ON_ERROR(rpc.send<T>(id, t), TAG, "Failed to send request");
return ESP_OK;
}
// overload of the templated method (used for functions with no arguments)
esp_err_t send(api_id id)
{
pending_resp = id;
ESP_RETURN_ON_ERROR(sync.notify(sync.request), TAG, "failed to notify req");
ESP_RETURN_ON_ERROR(rpc.send(id), TAG, "Failed to send request");
return ESP_OK;
}
template<typename T>
T get_resp(api_id id)
{
sync.wait_for(sync.resp_header);
auto ret = rpc.template get_payload<T>(id, pending_header);
sync.notify(sync.resp_payload);
return ret;
}
esp_err_t init()
{
ESP_RETURN_ON_FALSE(netif = wifi_remote_eppp_init(EPPP_CLIENT), ESP_FAIL, TAG, "Failed to connect to EPPP server");
ESP_RETURN_ON_ERROR(esp_event_handler_register(IP_EVENT, IP_EVENT_PPP_GOT_IP, got_ip, this), TAG, "Failed to register event");
ESP_RETURN_ON_ERROR(sync.init(), TAG, "Failed to init sync primitives");
ESP_RETURN_ON_ERROR(rpc.init(), TAG, "Failed to init RPC engine");
return xTaskCreate(task, "client", 8192, this, 5, nullptr) == pdTRUE ? ESP_OK : ESP_FAIL;
}
RpcEngine rpc{eppp_rpc::role::CLIENT};
Sync sync;
private:
api_id pending_resp{api_id::UNDEF};
RpcHeader pending_header{};
esp_err_t process_ip_event(RpcHeader &header)
{
auto event = rpc.get_payload<esp_wifi_remote_eppp_ip_event>(api_id::IP_EVENT, header);
// Now bypass network layers with EPPP interface
ESP_RETURN_ON_ERROR(esp_netif_set_dns_info(netif, ESP_NETIF_DNS_MAIN, &event.dns), TAG, "Failed to set DNS info");
ESP_RETURN_ON_ERROR(esp_netif_set_default_netif(netif), TAG, "Failed to set default netif to EPPP");
ip_event_got_ip_t evt = {
.esp_netif = netif,
.ip_info = {},
.ip_changed = true,
};
esp_netif_get_ip_info(netif, &evt.ip_info);
ESP_RETURN_ON_ERROR(esp_event_post(IP_EVENT, IP_EVENT_STA_GOT_IP, &evt, sizeof(evt), 0), TAG, "Failed to post IP event");
ESP_LOGI(TAG, "Main DNS:" IPSTR, IP2STR(&event.dns.ip.u_addr.ip4));
ESP_LOGI(TAG, "EPPP IP:" IPSTR, IP2STR(&event.ppp_ip.ip));
ESP_LOGI(TAG, "WIFI IP:" IPSTR, IP2STR(&event.wifi_ip.ip));
ESP_LOGI(TAG, "WIFI GW:" IPSTR, IP2STR(&event.wifi_ip.gw));
ESP_LOGI(TAG, "WIFI mask:" IPSTR, IP2STR(&event.wifi_ip.netmask));
return ESP_OK;
}
esp_err_t process_wifi_event(RpcHeader &header)
{
auto event_id = rpc.get_payload<int32_t>(api_id::WIFI_EVENT, header);
ESP_RETURN_ON_ERROR(esp_event_post(WIFI_REMOTE_EVENT, event_id, nullptr, 0, 0), TAG, "Failed to post WiFi event");
return ESP_OK;
}
esp_err_t perform()
{
auto header = rpc.get_header();
if (api_id(header.id) == api_id::ERROR) { // network error
return ESP_FAIL;
}
if (api_id(header.id) == api_id::UNDEF) { // network timeout
return ESP_OK;
}
if (api_id(header.id) == api_id::IP_EVENT) {
return process_ip_event(header);
}
if (api_id(header.id) == api_id::WIFI_EVENT) {
return process_wifi_event(header);
}
if (sync.wait_for(sync.request, 0) == ESP_OK && api_id(header.id) == pending_resp) {
pending_header = header;
pending_resp = api_id::UNDEF;
sync.notify(sync.resp_header);
sync.wait_for(sync.resp_payload);
return ESP_OK;
}
ESP_LOGE(TAG, "Unexpected header %" PRIi32, static_cast<uint32_t>(header.id));
return ESP_FAIL;
}
static void task(void *ctx)
{
auto instance = static_cast<RpcInstance *>(ctx);
do {
while (instance->perform() == ESP_OK) {}
} while (instance->restart() == ESP_OK);
vTaskDelete(nullptr);
}
esp_err_t restart()
{
rpc.deinit();
ESP_RETURN_ON_ERROR(sync.wait_for(sync.restart, pdMS_TO_TICKS(10000)), TAG, "Didn't receive EPPP address in time");
return rpc.init();
}
static void got_ip(void *ctx, esp_event_base_t base, int32_t id, void *data)
{
auto instance = static_cast<RpcInstance *>(ctx);
instance->sync.notify(instance->sync.restart);
}
esp_netif_t *netif{nullptr};
};
namespace client {
constinit RpcInstance instance;
} // namespace client
RpcInstance *RpcEngine::init_client()
{
char host[4 * 4 + 1] = {}; // IPv4: 4 x (3 numbers + '.') + \0
esp_ip4_addr_t ip = { .addr = EPPP_DEFAULT_SERVER_IP() };
if (esp_ip4addr_ntoa(&ip, host, sizeof(host)) == nullptr) {
return nullptr;
}
esp_tls_cfg_t cfg = {};
cfg.cacert_buf = client::ca_crt;
cfg.cacert_bytes = sizeof(client::ca_crt);
cfg.clientcert_buf = client::crt;
cfg.clientcert_bytes = sizeof(client::crt);
cfg.clientkey_buf = client::key;
cfg.clientkey_bytes = sizeof(client::key);
cfg.common_name = "espressif.local";
ESP_RETURN_ON_FALSE(tls_ = esp_tls_init(), nullptr, TAG, "Failed to create ESP-TLS instance");
int retries = 0;
while (esp_tls_conn_new_sync(host, strlen(host), rpc_port, &cfg, tls_) <= 0) {
esp_tls_conn_destroy(tls_);
tls_ = nullptr;
ESP_RETURN_ON_FALSE(retries++ < 3, nullptr, TAG, "Failed to open connection to %s", host);
ESP_LOGW(TAG, "Connection to RPC server failed! Will retry in %d second(s)", retries);
vTaskDelay(pdMS_TO_TICKS(1000 * retries));
ESP_RETURN_ON_FALSE(tls_ = esp_tls_init(), nullptr, TAG, "Failed to create ESP-TLS instance");
}
return &client::instance;
}
} // namespace eppp_rpc
//
// esp_wifi_remote API implementation
//
using namespace eppp_rpc;
using namespace client;
extern "C" esp_err_t esp_wifi_remote_init(const wifi_init_config_t *config)
{
// Here we initialize this client's RPC
ESP_RETURN_ON_ERROR(instance.init(), TAG, "Failed to initialize eppp-rpc");
std::lock_guard<Sync> lock(instance.sync);
ESP_RETURN_ON_ERROR(instance.send(api_id::INIT, config), TAG, "Failed to send request");
return instance.get_resp<esp_err_t>(api_id::INIT);
}
extern "C" esp_err_t esp_wifi_remote_set_config(wifi_interface_t interface, wifi_config_t *conf)
{
esp_wifi_remote_config params = { .interface = interface, .conf = {} };
memcpy(&params.conf, conf, sizeof(wifi_config_t));
std::lock_guard<Sync> lock(instance.sync);
ESP_RETURN_ON_ERROR(instance.send(api_id::SET_CONFIG, &params), TAG, "Failed to send request");
return instance.get_resp<esp_err_t>(api_id::SET_CONFIG);
}
extern "C" esp_err_t esp_wifi_remote_start(void)
{
std::lock_guard<Sync> lock(instance.sync);
ESP_RETURN_ON_ERROR(instance.send(api_id::START), TAG, "Failed to send request");
return instance.get_resp<esp_err_t>(api_id::START);
}
extern "C" esp_err_t esp_wifi_remote_stop(void)
{
std::lock_guard<Sync> lock(instance.sync);
ESP_RETURN_ON_ERROR(instance.send(api_id::STOP), TAG, "Failed to send request");
return instance.get_resp<esp_err_t>(api_id::STOP);
}
extern "C" esp_err_t esp_wifi_remote_connect(void)
{
std::lock_guard<Sync> lock(instance.sync);
ESP_RETURN_ON_ERROR(instance.send(api_id::CONNECT), TAG, "Failed to send request");
return instance.get_resp<esp_err_t>(api_id::CONNECT);
}
extern "C" esp_err_t esp_wifi_remote_get_mac(wifi_interface_t ifx, uint8_t mac[6])
{
std::lock_guard<Sync> lock(instance.sync);
ESP_RETURN_ON_ERROR(instance.send(api_id::GET_MAC, &ifx), TAG, "Failed to send request");
auto ret = instance.get_resp<esp_wifi_remote_mac_t>(api_id::GET_MAC);
ESP_LOG_BUFFER_HEXDUMP("MAC", ret.mac, 6, ESP_LOG_DEBUG);
memcpy(mac, ret.mac, 6);
return ret.err;
}
extern "C" esp_err_t esp_wifi_remote_set_mode(wifi_mode_t mode)
{
std::lock_guard<Sync> lock(instance.sync);
ESP_RETURN_ON_ERROR(instance.send(api_id::SET_MODE, &mode), TAG, "Failed to send request");
return instance.get_resp<esp_err_t>(api_id::SET_MODE);
}
extern "C" esp_err_t esp_wifi_remote_deinit(void)
{
std::lock_guard<Sync> lock(instance.sync);
ESP_RETURN_ON_ERROR(instance.send(api_id::DEINIT), TAG, "Failed to send request");
return instance.get_resp<esp_err_t>(api_id::DEINIT);
}
extern "C" esp_err_t esp_wifi_remote_disconnect(void)
{
std::lock_guard<Sync> lock(instance.sync);
ESP_RETURN_ON_ERROR(instance.send(api_id::DISCONNECT), TAG, "Failed to send request");
return instance.get_resp<esp_err_t>(api_id::DISCONNECT);
}
extern "C" esp_err_t esp_wifi_remote_set_storage(wifi_storage_t storage)
{
std::lock_guard<Sync> lock(instance.sync);
ESP_RETURN_ON_ERROR(instance.send(api_id::SET_STORAGE, &storage), TAG, "Failed to send request");
return instance.get_resp<esp_err_t>(api_id::SET_STORAGE);
}

View File

@@ -0,0 +1,179 @@
/*
* SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#pragma once
#include <cstring>
#include <cerrno>
namespace eppp_rpc {
static constexpr int rpc_port = 3333;
/**
* @brief Currently supported RPC commands/events
*/
enum class api_id : uint32_t {
ERROR,
UNDEF,
INIT,
DEINIT,
SET_MODE,
SET_CONFIG,
START,
STOP,
CONNECT,
DISCONNECT,
GET_MAC,
SET_STORAGE,
WIFI_EVENT,
IP_EVENT,
};
enum class role {
SERVER,
CLIENT,
};
struct RpcHeader {
api_id id;
uint32_t size;
} __attribute((__packed__));
/**
* @brief Structure holding the outgoing or incoming parameter
*/
template<typename T>
struct RpcData {
RpcHeader head;
T value_{};
explicit RpcData(api_id id) : head{id, sizeof(T)} {}
uint8_t *value()
{
return (uint8_t *) &value_;
}
uint8_t *marshall(T *t, size_t &size)
{
size = head.size + sizeof(RpcHeader);
memcpy(value(), t, sizeof(T));
return (uint8_t *) this;
}
} __attribute((__packed__));
/**
* @brief Singleton holding the static data for either the client or server side
*/
class RpcInstance;
/**
* @brief Engine that implements a simple RPC mechanism
*/
class RpcEngine {
public:
constexpr explicit RpcEngine(role r) : tls_(nullptr), role_(r) {}
esp_err_t init()
{
if (tls_ != nullptr) {
return ESP_OK;
}
if (role_ == role::CLIENT) {
instance = init_client();
}
if (role_ == role::SERVER) {
instance = init_server();
}
return instance == nullptr ? ESP_FAIL : ESP_OK;
}
void deinit()
{
if (tls_ == nullptr) {
return;
}
if (role_ == role::CLIENT) {
esp_tls_conn_destroy(tls_);
} else if (role_ == role::SERVER) {
esp_tls_server_session_delete(tls_);
}
tls_ = nullptr;
}
template<typename T>
esp_err_t send(api_id id, T *t)
{
RpcData<T> req(id);
size_t size;
auto buf = req.marshall(t, size);
ESP_LOGD("rpc", "Sending API id:%d", (int) id);
ESP_LOG_BUFFER_HEXDUMP("rpc", buf, size, ESP_LOG_VERBOSE);
int len = esp_tls_conn_write(tls_, buf, size);
if (len <= 0) {
ESP_LOGE("rpc", "Failed to write data to the connection");
return ESP_FAIL;
}
return ESP_OK;
}
esp_err_t send(api_id id) // overload for (void)
{
RpcHeader head = {.id = id, .size = 0};
int len = esp_tls_conn_write(tls_, &head, sizeof(head));
if (len <= 0) {
ESP_LOGE("rpc", "Failed to write data to the connection");
return ESP_FAIL;
}
return ESP_OK;
}
int get_socket_fd()
{
int sock;
if (esp_tls_get_conn_sockfd(tls_, &sock) != ESP_OK) {
return -1;
}
return sock;
}
RpcHeader get_header()
{
RpcHeader header{};
int len = esp_tls_conn_read(tls_, (char *) &header, sizeof(header));
if (len <= 0) {
if (len < 0 && errno != EAGAIN) {
ESP_LOGE("rpc", "Failed to read header data from the connection %d %s", errno, strerror(errno));
return {.id = api_id::ERROR, .size = 0};
}
return {.id = api_id::UNDEF, .size = 0};
}
return header;
}
template<typename T>
T get_payload(api_id id, RpcHeader &head)
{
RpcData<T> resp(id);
if (head.id != id || head.size != resp.head.size) {
ESP_LOGE("rpc", "unexpected header %d %d or sizes %" PRIu32 " %" PRIu32, (int)head.id, (int)id, head.size, resp.head.size);
return {};
}
int len = esp_tls_conn_read(tls_, (char *) resp.value(), resp.head.size);
if (len <= 0) {
ESP_LOGE("rpc", "Failed to read data from the connection");
return {};
}
return resp.value_;
}
private:
RpcInstance *init_server();
RpcInstance *init_client();
esp_tls_t *tls_;
role role_;
RpcInstance *instance{nullptr};
};
};

View File

@@ -0,0 +1,23 @@
/*
* SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#pragma once
struct esp_wifi_remote_config {
wifi_interface_t interface;
wifi_config_t conf;
};
struct esp_wifi_remote_mac_t {
esp_err_t err;
uint8_t mac[6];
};
struct esp_wifi_remote_eppp_ip_event {
int32_t id;
esp_netif_ip_info_t wifi_ip;
esp_netif_ip_info_t ppp_ip;
esp_netif_dns_info_t dns;
};

View File

@@ -0,0 +1,383 @@
/*
* SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <netdb.h>
#include <memory>
#include <cerrno>
#include <sys/socket.h>
#include "esp_log.h"
#include "esp_check.h"
#include "esp_tls.h"
#include "esp_wifi.h"
#include "wifi_remote_rpc_impl.hpp"
#include "eppp_link.h"
#include "wifi_remote_rpc_params.h"
#include "lwip/apps/snmp.h"
#include "esp_vfs.h"
#include "esp_vfs_eventfd.h"
extern "C" esp_netif_t *wifi_remote_eppp_init(eppp_type_t role);
namespace eppp_rpc {
namespace server {
const char *TAG = "rpc_server";
const unsigned char ca_crt[] = "-----BEGIN CERTIFICATE-----\n" CONFIG_ESP_WIFI_REMOTE_EPPP_CLIENT_CA "\n-----END CERTIFICATE-----";
const unsigned char crt[] = "-----BEGIN CERTIFICATE-----\n" CONFIG_ESP_WIFI_REMOTE_EPPP_SERVER_CRT "\n-----END CERTIFICATE-----";
const unsigned char key[] = "-----BEGIN PRIVATE KEY-----\n" CONFIG_ESP_WIFI_REMOTE_EPPP_SERVER_KEY "\n-----END PRIVATE KEY-----";
// TODO: Add option to supply keys and certs via a global symbol (file)
}
using namespace server;
struct Events {
api_id type;
int32_t id;
esp_wifi_remote_eppp_ip_event *ip_data{nullptr};
bool clean_ip_data{true};
esp_err_t create_ip_data()
{
ip_data = new (std::nothrow) esp_wifi_remote_eppp_ip_event;
return ip_data ? ESP_OK : ESP_ERR_NO_MEM;
}
~Events()
{
if (clean_ip_data) {
delete ip_data;
}
}
};
class Sync {
friend class RpcInstance;
public:
esp_err_t put(Events &ev)
{
ESP_RETURN_ON_FALSE(xQueueSend(queue, &ev, pdMS_TO_TICKS(queue_timeout)), ESP_FAIL, TAG, "Failed to queue event %" PRIi32, ev.id);
ev.clean_ip_data = false; // IP data were successfully sent to the queue, will free manually after receiving from it
uint64_t event_queued = 1;
write(fd, &event_queued, sizeof(event_queued)); // trigger the wait loop that
return ESP_OK;
}
Events get()
{
Events ev{};
if (!xQueueReceive(queue, &ev, 0)) {
ev.type = api_id::ERROR;
}
return ev;
}
esp_err_t init()
{
queue = xQueueCreate(max_items, sizeof(Events));
esp_vfs_eventfd_config_t config = ESP_VFS_EVENTD_CONFIG_DEFAULT();
esp_vfs_eventfd_register(&config);
fd = eventfd(0, EFD_SUPPORT_ISR);
return queue == nullptr || fd < 0 ? ESP_ERR_NO_MEM : ESP_OK;
}
~Sync()
{
if (queue) {
vQueueDelete(queue);
}
if (fd >= 0) {
close(fd);
}
}
int fd{-1};
// Used to trigger task by either an internal event or rpc command
static const int NONE = 0;
static const int ERROR = 1;
static const int EVENT = 2;
static const int RPC = 4;
private:
QueueHandle_t queue{nullptr};
const int max_items = 15;
const int queue_timeout = 200;
};
class RpcInstance {
friend class Sync;
public:
RpcEngine rpc{role::SERVER};
int sock{-1};
esp_err_t init()
{
ESP_RETURN_ON_FALSE(netif = wifi_remote_eppp_init(EPPP_SERVER), ESP_FAIL, TAG, "Failed to init EPPP connection");
ESP_RETURN_ON_ERROR(start_server(), TAG, "Failed to start RPC server");
ESP_RETURN_ON_ERROR(rpc.init(), TAG, "Failed to init RPC engine");
ESP_RETURN_ON_ERROR(esp_netif_napt_enable(netif), TAG, "Failed to enable NAPT");
ESP_RETURN_ON_ERROR(sync.init(), TAG, "Failed to init event queue");
ESP_RETURN_ON_ERROR(esp_event_handler_register(WIFI_EVENT, ESP_EVENT_ANY_ID, handler, this), TAG, "Failed to register event");
ESP_RETURN_ON_ERROR(esp_event_handler_register(IP_EVENT, ESP_EVENT_ANY_ID, handler, this), TAG, "Failed to register event");
return xTaskCreate(task, "server", 8192, this, 5, nullptr) == pdTRUE ? ESP_OK : ESP_FAIL;
}
Sync sync;
private:
esp_netif_t *netif{nullptr};
static void task(void *ctx)
{
auto instance = static_cast<RpcInstance *>(ctx);
while (instance->perform() == ESP_OK) {}
esp_restart();
}
esp_err_t start_server()
{
struct sockaddr_in dest_addr = {};
int ret;
int opt = 1;
dest_addr.sin_addr.s_addr = htonl(INADDR_ANY);
dest_addr.sin_family = AF_INET;
dest_addr.sin_port = htons(rpc_port);
int listen_sock = socket(AF_INET, SOCK_STREAM, IPPROTO_IP);
ESP_RETURN_ON_FALSE(listen_sock >= 0, ESP_FAIL, TAG, "Failed to create listening socket");
setsockopt(listen_sock, SOL_SOCKET, SO_REUSEADDR, &opt, sizeof(opt));
ret = bind(listen_sock, (struct sockaddr *) &dest_addr, sizeof(dest_addr));
ESP_RETURN_ON_FALSE(ret == 0, ESP_FAIL, TAG, "Failed to bind the listening socket");
ret = listen(listen_sock, 1);
ESP_RETURN_ON_FALSE(ret == 0, ESP_FAIL, TAG, "Failed to start listening");
struct sockaddr_storage source_addr {};
socklen_t addr_len = sizeof(source_addr);
sock = accept(listen_sock, (struct sockaddr *) &source_addr, &addr_len);
ESP_RETURN_ON_FALSE(sock >= 0, ESP_FAIL, TAG, "Failed to accept connections: errno %d", errno);
ESP_LOGI(TAG, "Socket accepted on: %s", inet_ntoa(((struct sockaddr_in *) &source_addr)->sin_addr));
return ESP_OK;
}
esp_err_t wifi_event(int32_t id)
{
ESP_LOGI(TAG, "Received WIFI event %" PRIi32, id);
Events ev{api_id::WIFI_EVENT, id, nullptr};
ESP_RETURN_ON_ERROR(sync.put(ev), TAG, "Failed to queue WiFi event");
return ESP_OK;
}
esp_err_t ip_event(int32_t id, ip_event_got_ip_t *ip_data)
{
ESP_LOGI(TAG, "Received IP event %" PRIi32, id);
Events ev{api_id::IP_EVENT, id, nullptr};
if (ip_data->esp_netif) {
ESP_RETURN_ON_ERROR(ev.create_ip_data(), TAG, "Failed to allocate event data");
ev.ip_data->id = id;
ESP_RETURN_ON_ERROR(esp_netif_get_dns_info(ip_data->esp_netif, ESP_NETIF_DNS_MAIN, &ev.ip_data->dns), TAG, "Failed to get DNS info");
ESP_LOGI(TAG, "Main DNS:" IPSTR, IP2STR(&ev.ip_data->dns.ip.u_addr.ip4));
memcpy(&ev.ip_data->wifi_ip, &ip_data->ip_info, sizeof(ev.ip_data->wifi_ip));
ESP_RETURN_ON_ERROR(esp_netif_get_ip_info(netif, &ev.ip_data->ppp_ip), TAG, "Failed to get IP info");
ESP_LOGI(TAG, "IP address:" IPSTR, IP2STR(&ip_data->ip_info.ip));
}
ESP_RETURN_ON_ERROR(sync.put(ev), TAG, "Failed to queue IP event");
return ESP_OK;
}
static void handler(void *ctx, esp_event_base_t base, int32_t id, void *data)
{
auto instance = static_cast<RpcInstance *>(ctx);
if (base == WIFI_EVENT) {
instance->wifi_event(id);
} else if (base == IP_EVENT) {
auto *ip_data = (ip_event_got_ip_t *)data;
instance->ip_event(id, ip_data);
}
}
int select()
{
struct timeval timeout = { .tv_sec = 1, .tv_usec = 0};
int rpc_sock = rpc.get_socket_fd();
ESP_RETURN_ON_FALSE(rpc_sock != -1, Sync::ERROR, TAG, "failed ot get rpc socket");
fd_set readset;
fd_set errset;
FD_ZERO(&readset);
FD_ZERO(&errset);
FD_SET(rpc_sock, &readset);
FD_SET(sync.fd, &readset);
FD_SET(rpc_sock, &errset);
int ret = ::select(std::max(rpc_sock, 5) + 1, &readset, nullptr, &errset, &timeout);
if (ret == 0) {
ESP_LOGV(TAG, "poll_read: select - Timeout before any socket was ready!");
return Sync::NONE;
}
if (ret < 0) {
ESP_LOGE(TAG, "select error: %d", errno);
return Sync::ERROR;
}
if (FD_ISSET(rpc_sock, &errset)) {
int sock_errno = 0;
uint32_t optlen = sizeof(sock_errno);
getsockopt(rpc_sock, SOL_SOCKET, SO_ERROR, &sock_errno, &optlen);
ESP_LOGE(TAG, "select failed, socket errno = %d", sock_errno);
return Sync::ERROR;
}
int result = Sync::NONE;
if (FD_ISSET(rpc_sock, &readset)) {
result |= Sync::RPC;
}
if (FD_ISSET(sync.fd, &readset)) {
result |= Sync::EVENT;
}
return result;
}
esp_err_t marshall_events()
{
api_id type;
do {
Events ev = sync.get();
type = ev.type;
if (ev.type == api_id::WIFI_EVENT) {
ESP_RETURN_ON_ERROR(rpc.send(api_id::WIFI_EVENT, &ev.id), TAG, "Failed to marshall WiFi event");
} else if (ev.type == api_id::IP_EVENT && ev.ip_data) {
ESP_RETURN_ON_ERROR(rpc.send(api_id::IP_EVENT, ev.ip_data), TAG, "Failed to marshal IP event");
}
} while (type != api_id::ERROR);
return ESP_OK;
}
esp_err_t perform()
{
auto res = select();
if (res == Sync::ERROR) {
return ESP_FAIL;
}
if (res & Sync::EVENT) {
uint64_t data;
read(sync.fd, &data, sizeof(data));
if (marshall_events() != ESP_OK) {
return ESP_FAIL;
}
}
if (res & Sync::RPC) {
if (handle_commands() != ESP_OK) {
return ESP_FAIL;
}
}
return ESP_OK;
}
esp_err_t handle_commands()
{
auto header = rpc.get_header();
ESP_LOGI(TAG, "Received header id %d", (int) header.id);
switch (header.id) {
case api_id::SET_MODE: {
auto req = rpc.get_payload<wifi_mode_t>(api_id::SET_MODE, header);
auto ret = esp_wifi_set_mode(req);
if (rpc.send(api_id::SET_MODE, &ret) != ESP_OK) {
return ESP_FAIL;
}
break;
}
case api_id::INIT: {
auto req = rpc.get_payload<wifi_init_config_t>(api_id::INIT, header);
req.osi_funcs = &g_wifi_osi_funcs;
req.wpa_crypto_funcs = g_wifi_default_wpa_crypto_funcs;
auto ret = esp_wifi_init(&req);
if (rpc.send(api_id::INIT, &ret) != ESP_OK) {
return ESP_FAIL;
}
break;
}
case api_id::SET_CONFIG: {
auto req = rpc.get_payload<esp_wifi_remote_config>(api_id::SET_CONFIG, header);
auto ret = esp_wifi_set_config(req.interface, &req.conf);
if (rpc.send(api_id::SET_CONFIG, &ret) != ESP_OK) {
return ESP_FAIL;
}
break;
}
case api_id::START: {
if (header.size != 0) {
return ESP_FAIL;
}
auto ret = esp_wifi_start();
if (rpc.send(api_id::START, &ret) != ESP_OK) {
return ESP_FAIL;
}
break;
}
case api_id::CONNECT: {
if (header.size != 0) {
return ESP_FAIL;
}
auto ret = esp_wifi_connect();
if (rpc.send(api_id::CONNECT, &ret) != ESP_OK) {
return ESP_FAIL;
}
break;
}
case api_id::DISCONNECT: {
if (header.size != 0) {
return ESP_FAIL;
}
auto ret = esp_wifi_disconnect();
if (rpc.send(api_id::DISCONNECT, &ret) != ESP_OK) {
return ESP_FAIL;
}
break;
}
case api_id::DEINIT: {
if (header.size != 0) {
return ESP_FAIL;
}
auto ret = esp_wifi_deinit();
if (rpc.send(api_id::DEINIT, &ret) != ESP_OK) {
return ESP_FAIL;
}
break;
}
case api_id::SET_STORAGE: {
auto req = rpc.get_payload<wifi_storage_t>(api_id::SET_STORAGE, header);
auto ret = esp_wifi_set_storage(req);
if (rpc.send(api_id::SET_STORAGE, &ret) != ESP_OK) {
return ESP_FAIL;
}
break;
}
case api_id::GET_MAC: {
auto req = rpc.get_payload<wifi_interface_t>(api_id::GET_MAC, header);
esp_wifi_remote_mac_t resp = {};
resp.err = esp_wifi_get_mac(req, resp.mac);
if (rpc.send(api_id::GET_MAC, &resp) != ESP_OK) {
return ESP_FAIL;
}
break;
}
default:
return ESP_FAIL;
}
return ESP_OK;
}
};
namespace server {
constinit RpcInstance instance;
}
RpcInstance *RpcEngine::init_server()
{
esp_tls_cfg_server_t cfg = {};
cfg.cacert_buf = server::ca_crt;
cfg.cacert_bytes = sizeof(server::ca_crt);
cfg.servercert_buf = server::crt;
cfg.servercert_bytes = sizeof(server::crt);
cfg.serverkey_buf = server::key;
cfg.serverkey_bytes = sizeof(server::key);
ESP_RETURN_ON_FALSE(tls_ = esp_tls_init(), nullptr, TAG, "Failed to create ESP-TLS instance");
ESP_RETURN_ON_FALSE(esp_tls_server_session_create(&cfg, server::instance.sock, tls_) == ESP_OK, nullptr, TAG, "Failed to create TLS session");
return &server::instance;
}
} // namespace eppp_rpc
using namespace eppp_rpc;
extern "C" esp_err_t server_init(void)
{
return server::instance.init();
}

View File

@@ -0,0 +1,34 @@
/*
* SPDX-FileCopyrightText: 2023-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#include "esp_wifi.h"
#include "esp_log.h"
#include "esp_wifi_remote.h"
#define WEAK __attribute__((weak))
WEAK ESP_EVENT_DEFINE_BASE(WIFI_EVENT);
#if !CONFIG_SOC_WIFI_SUPPORTED
struct wifi_osi_funcs_t { };
#endif
WEAK wifi_osi_funcs_t g_wifi_osi_funcs;
WEAK const wpa_crypto_funcs_t g_wifi_default_wpa_crypto_funcs;
WEAK uint64_t g_wifi_feature_caps =
#if CONFIG_ESP_WIFI_ENABLE_WPA3_SAE
CONFIG_FEATURE_WPA3_SAE_BIT |
#endif
#if CONFIG_SPIRAM
CONFIG_FEATURE_CACHE_TX_BUF_BIT |
#endif
#if CONFIG_ESP_WIFI_FTM_INITIATOR_SUPPORT
CONFIG_FEATURE_FTM_INITIATOR_BIT |
#endif
#if CONFIG_ESP_WIFI_FTM_RESPONDER_SUPPORT
CONFIG_FEATURE_FTM_RESPONDER_BIT |
#endif
0;

View File

@@ -0,0 +1,94 @@
/*
* SPDX-FileCopyrightText: 2023-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <esp_private/wifi.h>
#include "esp_err.h"
#include "esp_wifi_remote.h"
#include "esp_log.h"
#define CHANNELS 2
#define WEAK __attribute__((weak))
static esp_remote_channel_tx_fn_t s_tx_cb[CHANNELS];
static esp_remote_channel_t s_channel[CHANNELS];
static wifi_rxcb_t s_rx_fn[CHANNELS];
WEAK esp_err_t esp_wifi_remote_channel_rx(void *h, void *buffer, void *buff_to_free, size_t len)
{
assert(h);
if (h == s_channel[0] && s_rx_fn[0]) {
return s_rx_fn[0](buffer, len, buff_to_free);
}
if (h == s_channel[1] && s_rx_fn[1]) {
return s_rx_fn[1](buffer, len, buff_to_free);
}
return ESP_FAIL;
}
WEAK esp_err_t esp_wifi_remote_channel_set(wifi_interface_t ifx, void *h, esp_remote_channel_tx_fn_t tx_cb)
{
if (ifx == WIFI_IF_STA) {
s_channel[0] = h;
s_tx_cb[0] = tx_cb;
return ESP_OK;
}
if (ifx == WIFI_IF_AP) {
s_channel[1] = h;
s_tx_cb[1] = tx_cb;
return ESP_OK;
}
return ESP_FAIL;
}
WEAK esp_err_t esp_wifi_internal_set_sta_ip(void)
{
// TODO: Pass this information to the slave target
// Note that this function is called from the default event loop, so we shouldn't block here
return ESP_OK;
}
WEAK esp_err_t esp_wifi_internal_reg_netstack_buf_cb(wifi_netstack_buf_ref_cb_t ref, wifi_netstack_buf_free_cb_t free)
{
return ESP_OK;
}
WEAK void esp_wifi_internal_free_rx_buffer(void *buffer)
{
free(buffer);
}
WEAK esp_err_t esp_wifi_internal_tx_by_ref(wifi_interface_t ifx, void *buffer, size_t len, void *netstack_buf)
{
return esp_wifi_internal_tx(ifx, buffer, (uint16_t)len);
}
WEAK int esp_wifi_internal_tx(wifi_interface_t ifx, void *buffer, uint16_t len)
{
if (ifx == WIFI_IF_STA && s_tx_cb[0]) {
/* TODO: If not needed, remove arg3 */
return s_tx_cb[0](s_channel[0], buffer, len);
}
if (ifx == WIFI_IF_AP && s_tx_cb[1]) {
return s_tx_cb[1](s_channel[1], buffer, len);
}
return -1;
}
WEAK esp_err_t esp_wifi_internal_reg_rxcb(wifi_interface_t ifx, wifi_rxcb_t fn)
{
if (ifx == WIFI_IF_STA) {
ESP_LOGI("esp_wifi_remote", "%s: sta: %p", __func__, fn);
s_rx_fn[0] = fn;
return ESP_OK;
}
if (ifx == WIFI_IF_AP) {
s_rx_fn[1] = fn;
return ESP_OK;
}
return ESP_FAIL;
}

View File

@@ -0,0 +1,5 @@
# This project serves as a demo to enable using esp-mqtt on ESP platform targets as well as on linux
cmake_minimum_required(VERSION 3.16)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(esp_mqtt_demo)

View File

@@ -0,0 +1,31 @@
# MQTT application running on WiFi station
This is a simple mqtt demo, that connects to WiFi AP first. This application has a dependency to `esp_wifi_remote`, so that if it's build and executed on a chipset without WiFI capabilities it redirects all wifi calls the remote target.
## Overview
When running this example on a target that doesn't natively support WiFi, please make sure that the remote target (slave application) is connected to your chipset via the configured transport interface.
Connection to the slave device also depends on RPC library used. It is recommended to use [`esp_hosted`](https://github.com/espressif/esp-hosted). Alternatively you can use [`eppp_link`](https://components.espressif.com/components/espressif/eppp_link).
Please note, that `esp_hosted` as a component is currently WIP, so the `wifi_remote` defaults to `eppp`, for now.
## HW connection
We currently support only `UART` transport, so the connection is very simple. You only need to connect Rx, Tx and GND with the remote target.
You need to configure these fields according to your connection:
* CONFIG_ESP_WIFI_REMOTE_EPPP_UART_TX_PIN
* CONFIG_ESP_WIFI_REMOTE_EPPP_UART_RX_PIN
## SW configuration
The RPC mechanism between the host and the slave micro uses TLS with mutual authentication, so you would have to configure certificates and keys for both parties. This application -- host target -- is considered RPC client, so it needs client's certificate and key, as well as the CA certificate to validate the server (slave application).
If self-signed certificates are acceptable, you can use [generate_test_certs](../test_certs/generate_test_certs.sh) script to generate both the CA and the keys itself and convert them to the PEM format that's accepted by the EPPP RPC engine.
You will have to configure these options:
* CONFIG_ESP_WIFI_REMOTE_EPPP_SERVER_CA
* CONFIG_ESP_WIFI_REMOTE_EPPP_CLIENT_CRT
* CONFIG_ESP_WIFI_REMOTE_EPPP_CLIENT_KEY
## Setting up slave device
You need to set up the connection and configuration in a similar way on the slave part (connection pins + certificates and keys). Please refer to the [slave_application](../server/README.md) README for more information.

View File

@@ -0,0 +1,4 @@
idf_component_register(SRCS "app_main.c"
INCLUDE_DIRS ".")
target_compile_options(${COMPONENT_LIB} PRIVATE "-Wno-format")

View File

@@ -0,0 +1,21 @@
menu "Example Configuration"
config BROKER_URL
string "Broker URL"
default "mqtt://mqtt.eclipseprojects.io"
help
URL of the broker to connect to
config ESP_WIFI_SSID
string "WiFi SSID"
default "myssid"
help
SSID (network name) for the example to connect to.
config ESP_WIFI_PASSWORD
string "WiFi Password"
default "mypassword"
help
WiFi password (WPA or WPA2) for the example to use.
endmenu

View File

@@ -0,0 +1,204 @@
/*
* SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Unlicense OR CC0-1.0
*/
#include <stdio.h>
#include <stdint.h>
#include <stddef.h>
#include <string.h>
#include "esp_system.h"
#include "nvs_flash.h"
#include "esp_event.h"
#include "esp_netif.h"
#include "esp_netif.h"
#include "esp_system.h"
#include "freertos/FreeRTOS.h"
#include "freertos/event_groups.h"
#include "esp_system.h"
#include "esp_wifi.h"
#include "esp_log.h"
#include "mqtt_client.h"
static const char *TAG = "esp_mqtt_demo";
static EventGroupHandle_t s_wifi_event_group;
static int s_retry_num = 0;
#define WIFI_CONNECTED_BIT BIT0
#define WIFI_FAIL_BIT BIT1
#define EXAMPLE_ESP_WIFI_SSID CONFIG_ESP_WIFI_SSID
#define EXAMPLE_ESP_WIFI_PASS CONFIG_ESP_WIFI_PASSWORD
#define EXAMPLE_ESP_MAXIMUM_RETRY 5
static void mqtt_event_handler(void *handler_args, esp_event_base_t base, int32_t event_id, void *event_data)
{
ESP_LOGD(TAG, "Event dispatched from event loop base=%s, event_id=%d", base, event_id);
esp_mqtt_event_handle_t event = (esp_mqtt_event_handle_t)event_data;
esp_mqtt_client_handle_t client = event->client;
int msg_id;
switch ((esp_mqtt_event_id_t)event_id) {
case MQTT_EVENT_CONNECTED:
ESP_LOGI(TAG, "MQTT_EVENT_CONNECTED");
msg_id = esp_mqtt_client_publish(client, "/topic/qos1", "data_3", 0, 1, 0);
ESP_LOGI(TAG, "sent publish successful, msg_id=%d", msg_id);
msg_id = esp_mqtt_client_subscribe(client, "/topic/qos0", 0);
ESP_LOGI(TAG, "sent subscribe successful, msg_id=%d", msg_id);
msg_id = esp_mqtt_client_subscribe(client, "/topic/qos1", 1);
ESP_LOGI(TAG, "sent subscribe successful, msg_id=%d", msg_id);
msg_id = esp_mqtt_client_unsubscribe(client, "/topic/qos1");
ESP_LOGI(TAG, "sent unsubscribe successful, msg_id=%d", msg_id);
break;
case MQTT_EVENT_DISCONNECTED:
ESP_LOGI(TAG, "MQTT_EVENT_DISCONNECTED");
break;
case MQTT_EVENT_SUBSCRIBED:
ESP_LOGI(TAG, "MQTT_EVENT_SUBSCRIBED, msg_id=%d", event->msg_id);
msg_id = esp_mqtt_client_publish(client, "/topic/qos0", "data", 0, 0, 0);
ESP_LOGI(TAG, "sent publish successful, msg_id=%d", msg_id);
break;
case MQTT_EVENT_UNSUBSCRIBED:
ESP_LOGI(TAG, "MQTT_EVENT_UNSUBSCRIBED, msg_id=%d", event->msg_id);
break;
case MQTT_EVENT_PUBLISHED:
ESP_LOGI(TAG, "MQTT_EVENT_PUBLISHED, msg_id=%d", event->msg_id);
break;
case MQTT_EVENT_DATA:
ESP_LOGI(TAG, "MQTT_EVENT_DATA");
printf("TOPIC=%.*s\r\n", event->topic_len, event->topic);
printf("DATA=%.*s\r\n", event->data_len, event->data);
break;
case MQTT_EVENT_ERROR:
ESP_LOGI(TAG, "MQTT_EVENT_ERROR");
break;
default:
ESP_LOGI(TAG, "Other event id:%d", event->event_id);
break;
}
}
static void mqtt_app_start(void)
{
esp_mqtt_client_config_t mqtt_cfg = {};
mqtt_cfg.broker.address.uri = CONFIG_BROKER_URL;
mqtt_cfg.credentials.client_id = "idf_on_linux_client";
esp_mqtt_client_handle_t client = esp_mqtt_client_init(&mqtt_cfg);
/* The last argument may be used to pass data to the event handler, in this example mqtt_event_handler */
esp_mqtt_client_register_event(client, (esp_mqtt_event_id_t)ESP_EVENT_ANY_ID, mqtt_event_handler, NULL);
esp_mqtt_client_start(client);
}
static void event_handler(void *arg, esp_event_base_t event_base,
int32_t event_id, void *event_data)
{
ESP_LOGI(TAG, "EVENT type %s id %d", event_base, (int)event_id);
if (event_base == WIFI_EVENT && event_id == WIFI_EVENT_STA_START) {
esp_wifi_connect();
} else if (event_base == WIFI_EVENT && event_id == WIFI_EVENT_STA_DISCONNECTED) {
if (s_retry_num < EXAMPLE_ESP_MAXIMUM_RETRY) {
esp_wifi_connect();
s_retry_num++;
ESP_LOGI(TAG, "retry to connect to the AP");
} else {
xEventGroupSetBits(s_wifi_event_group, WIFI_FAIL_BIT);
}
ESP_LOGI(TAG, "connect to the AP fail");
} else if (event_base == IP_EVENT && event_id == IP_EVENT_STA_GOT_IP) {
ip_event_got_ip_t *event = (ip_event_got_ip_t *) event_data;
ESP_LOGI(TAG, "got ip:" IPSTR, IP2STR(&event->ip_info.ip));
s_retry_num = 0;
xEventGroupSetBits(s_wifi_event_group, WIFI_CONNECTED_BIT);
}
}
static void wifi_init_sta()
{
s_wifi_event_group = xEventGroupCreate();
ESP_ERROR_CHECK(esp_netif_init());
ESP_ERROR_CHECK(esp_event_loop_create_default());
esp_netif_create_default_wifi_sta();
wifi_init_config_t cfg = WIFI_INIT_CONFIG_DEFAULT();
ESP_ERROR_CHECK(esp_wifi_init(&cfg));
esp_event_handler_instance_t instance_any_id;
esp_event_handler_instance_t instance_got_ip;
ESP_ERROR_CHECK(esp_event_handler_instance_register(WIFI_EVENT,
ESP_EVENT_ANY_ID,
&event_handler,
NULL,
&instance_any_id));
ESP_ERROR_CHECK(esp_event_handler_instance_register(IP_EVENT,
IP_EVENT_STA_GOT_IP,
&event_handler,
NULL,
&instance_got_ip));
wifi_config_t wifi_config = {
.sta = {
.ssid = EXAMPLE_ESP_WIFI_SSID,
.password = EXAMPLE_ESP_WIFI_PASS,
},
};
ESP_ERROR_CHECK(esp_wifi_set_mode(WIFI_MODE_STA) );
ESP_ERROR_CHECK(esp_wifi_set_config(WIFI_IF_STA, &wifi_config) );
ESP_ERROR_CHECK(esp_wifi_start() );
ESP_LOGI(TAG, "wifi_init_sta finished.");
/* Waiting until either the connection is established (WIFI_CONNECTED_BIT) or connection failed for the maximum
* number of re-tries (WIFI_FAIL_BIT). The bits are set by event_handler() (see above) */
EventBits_t bits = xEventGroupWaitBits(s_wifi_event_group,
WIFI_CONNECTED_BIT | WIFI_FAIL_BIT,
pdFALSE,
pdFALSE,
portMAX_DELAY);
/* xEventGroupWaitBits() returns the bits before the call returned, hence we can test which event actually
* happened. */
if (bits & WIFI_CONNECTED_BIT) {
ESP_LOGI(TAG, "connected to ap SSID:%s password:%s",
EXAMPLE_ESP_WIFI_SSID, EXAMPLE_ESP_WIFI_PASS);
} else if (bits & WIFI_FAIL_BIT) {
ESP_LOGI(TAG, "Failed to connect to SSID:%s, password:%s",
EXAMPLE_ESP_WIFI_SSID, EXAMPLE_ESP_WIFI_PASS);
} else {
ESP_LOGE(TAG, "UNEXPECTED EVENT");
}
}
void app_main(void)
{
ESP_LOGI(TAG, "[APP] Startup..");
ESP_LOGI(TAG, "[APP] Free memory: %d bytes", esp_get_free_heap_size());
ESP_LOGI(TAG, "[APP] IDF version: %s", esp_get_idf_version());
esp_log_level_set("*", ESP_LOG_INFO);
esp_log_level_set("mqtt_client", ESP_LOG_VERBOSE);
esp_log_level_set("esp_mqtt_demo", ESP_LOG_VERBOSE);
esp_log_level_set("transport_base", ESP_LOG_VERBOSE);
esp_log_level_set("esp-tls", ESP_LOG_VERBOSE);
esp_log_level_set("transport", ESP_LOG_VERBOSE);
esp_log_level_set("outbox", ESP_LOG_VERBOSE);
//Initialize NVS
esp_err_t ret = nvs_flash_init();
if (ret == ESP_ERR_NVS_NO_FREE_PAGES || ret == ESP_ERR_NVS_NEW_VERSION_FOUND) {
ESP_ERROR_CHECK(nvs_flash_erase());
ret = nvs_flash_init();
}
ESP_ERROR_CHECK(ret);
ESP_LOGI(TAG, "ESP_WIFI_MODE_STA");
wifi_init_sta();
mqtt_app_start();
}

View File

@@ -0,0 +1,3 @@
dependencies:
esp_wifi_remote:
version: '*'

View File

@@ -0,0 +1,11 @@
CONFIG_IDF_TARGET="esp32p4"
CONFIG_ESP_WIFI_SSID="local_mosquitto"
CONFIG_ESP_WIFI_PASSWORD="local_mosquitto_password"
CONFIG_ESP_WIFI_REMOTE_EPPP_UART_TX_PIN=47
CONFIG_ESP_WIFI_REMOTE_EPPP_UART_RX_PIN=48
CONFIG_ESP_WIFI_REMOTE_EPPP_SERVER_CA="MIIDIzCCAgugAwIBAgIUL4dO91g+lJLA9mHo+2wIfgr+VL8wDQYJKoZIhvcNAQELBQAwITELMAkGA1UEBhMCQ1oxEjAQBgNVBAMMCUVzcHJlc3NpZjAeFw0yNDEwMzAwOTM1NDVaFw0yNTEwMzAwOTM1NDVaMCExCzAJBgNVBAYTAkNaMRIwEAYDVQQDDAlFc3ByZXNzaWYwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCWm4sq9DdpDYUxRJD/Xauc8w2y7Zh0XQuRZ5qtkZclkpK3sz2nOQR9HAs0FWU4mUgZJeUwKNa1jzgtm89oAYtMrRypiTNQSkFWFiwJXXN/xGO93I2COQ857iGOvKyQpfxCsuy6THPIsSYYcYV6Lk/DlLix9CGXax+mcFvxcHQxm33//YHscWJEo5RyNHdfOFYhAzINqoHVX5KOQQxjmpHiMmVhT1HH9PqTOg3ukvNEJVphRHjv6n4KB2wHSMGmNVaUQWB9gILAQ6Ixkxxhf/U9DtftTvXNbzlX56kvSSt1I3gcmHHpwrDRrg0aQBbuL0yeDaza1wLMIaP/Saphl7x/AgMBAAGjUzBRMB0GA1UdDgQWBBS/+vNjHlnmn0N8ixDGpWq0WV1TtTAfBgNVHSMEGDAWgBS/+vNjHlnmn0N8ixDGpWq0WV1TtTAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQACJQuUz5LHHtfOc9s13lbfaWW5HukFI55/B7xOIVtIMcDpvzpVCQz1TT0N1DoFwEbXGLG8A8nBye+y9A/e2V/B3DEQ5Yq7rq/KxXGBtgyUGJT08kRASWsOoQOMI15xCH5Al2JifbOCaY9glupccctY5ypfucrM2Z9KGoT7lKw7L2cx9yrXY3UO/3bQibKNLSmHR4zvlcXEdWFdMmsBUvbUmVYTPZIK0iMARzXtBNJL1dbT+shp/VM2Um09L0cakyD2jwjFvRjbnUdgJt8j7pf38vEHtcVfbmCrdRjgmWXuwnqS5UTgfYyHCGZvEITr8JVAro7SkLywjL5IeKnqxtv6"
CONFIG_ESP_WIFI_REMOTE_EPPP_CLIENT_CRT="MIICvDCCAaQCFAbrhsFoIjFDqI9LzRog2HUQcz0vMA0GCSqGSIb3DQEBCwUAMCExCzAJBgNVBAYTAkNaMRIwEAYDVQQDDAlFc3ByZXNzaWYwHhcNMjQxMDMwMDkzNTQ1WhcNMjUxMDMwMDkzNTQ1WjAUMRIwEAYDVQQDDAljbGllbnRfY24wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDGPubh3BQadEIOR3QLXyF7REI6CHC8PcJ55ndHYEAboh8WuzYbqKjgz1Jf5Ya4yUUC+aJk6rYX/oSX2MSyXCbBQ+tBR+mSRt7M7smnHYLUUqbN4f594TI4K0KRDCPPuJmhPo/yn+M51T9p3BUNRq3g3cyUKKQaomX1cUr0uKyPel5WyLmzgB7o8Afw6uOyWU3YO3QgilSC3W+3n/KQ6c2jJFimgLk7LBGKY3e/F8InWQgfCG7kb66JXhFL6DSlCryrh0SbidGUNGAGJC86OTd6/XLb5qr3KIfvdTi7Rqcw7OverZ0V7/g5HzdTYMJRbF0dqYAWVaGFxDCPOmc1HzEjAgMBAAEwDQYJKoZIhvcNAQELBQADggEBAD6yAUXqueOFXybINofP/jhXNuxQCJXIONmgnB+LYfl/VPc9bdi5l5wEnBneZnrDbXaGHCKgxhW8nT9KZRKJF7eWnjmsGHEgVov6DTEERbO3sGGBbP0Gdwjhj58QMMGoBFDdCr/1t58q1eHwukmfhHM3mMynoduFSMuGcpSEM9QcE2h2ePPdNv/CvjcNt/3L3sF4DU4Jf/ncTRiFVkXaNeyNhRdr8UUV0siek035ho1GD8oiYFYi86eAa7AuNA9Rjjs9v64Df32tbeq3hfefm7hMJdDdz31eE/0xVLJmpYVE4DKYejenvsz2dreZt+CKiX4wVWfTNxVdOSjQJqxMEgM="
CONFIG_ESP_WIFI_REMOTE_EPPP_CLIENT_KEY="MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDGPubh3BQadEIOR3QLXyF7REI6CHC8PcJ55ndHYEAboh8WuzYbqKjgz1Jf5Ya4yUUC+aJk6rYX/oSX2MSyXCbBQ+tBR+mSRt7M7smnHYLUUqbN4f594TI4K0KRDCPPuJmhPo/yn+M51T9p3BUNRq3g3cyUKKQaomX1cUr0uKyPel5WyLmzgB7o8Afw6uOyWU3YO3QgilSC3W+3n/KQ6c2jJFimgLk7LBGKY3e/F8InWQgfCG7kb66JXhFL6DSlCryrh0SbidGUNGAGJC86OTd6/XLb5qr3KIfvdTi7Rqcw7OverZ0V7/g5HzdTYMJRbF0dqYAWVaGFxDCPOmc1HzEjAgMBAAECggEAJdniuWMMz5Q8/H72ECnEucVpo6zy4W4lUKMJSS5+bwhASVXLWfKU8/+Bqd+oHmYHcC77q6sIw4IMDPYNcESZ/bKbG2bAmPZBGf3JsMe4sBNr18l7jstNjF3uIsWfnMyRQLEySM/wUZ1+sxabSmKhVlri8bLkylURhJByEFGmWOpc+rsrVUhhQVhvNQhL6c7W1hfnj2TOrMBGnpvOtYUMlbaQuSbV1Djqgg8NU6DR4g6fZS7JGbWdaeu39RK0MjJdiZuHflF2Sx9nUDwpLSdl1fVZAAxYuSFIvgRQCd3KTt+5eaqov/DHBfKghPn0a6S3OxlboPAt4wps7yHT0L0ccQKBgQD1euhKGdNH0yWXs5iuQ/eJcJWxFEc5cIEx1h/2oTP2++JU0gCMG6fXxDDZL70TXQxQeAnuLz8Aj+/qIKI+t3uOu4yK2s1LA/yjlrA6fMVeK/OaQuuKikFshUd28IFQvrG6oAxs1MJ5fcRhSE9MDW9lfcUF3woaoZlfCz22d2RImwKBgQDOvcyhbbHcrQxoESPz4RlZwUMTfEldXfTQtyl/pJdAJLUrDiRWYx4KNUwvVRrxgjaXnjF1q58NR9NNrTasJ+Vl30Nklhnyt3a4NTKACXxhX1cemWdL7m1B7rBSzMJD6uAqE3q8790swmZYRWgjMOB9xrYKq0JNuaCPEx8FbbzuGQKBgE4QRNhzt/2qRtUkNtSMJqbdV60VXsUEYwFfL5D1mJndZg9FLQlhLhHugP5AMSd8OpNIaRgGjEl4fHn+4LmDDdbJC5uIkypc3TWEkQw4a2dUIMaYq2DGMKH7DEvllaoAynInvWvKiQGrngy1uwnbZ+ZlhYclc4gehbB02a4x74ErAoGAWxApCVXrCRvEIjaiknKtGubQp82P9ytCgYicI9gYsy04C53wDYkdGzv8scCX3JcRetk4Se9tYIkpnsZUFaKBHc0ovy6KgWmkRmFQPCtxeOZo1laVtFFyGJ+NVPtR+l6DnKT15DD3SBbcw7bWtuF5kI0tdCeZTekcusieWmLK3EkCgYEA0RumiuR2jgPnljGrLZu2QAg1gieS6kGKwXJarSOLFG5B4dftdwBKy8QEqbNAL5xKfa6tlNg6Pa9ULfC38qOOSB0BKv+gAvjra7uk4Pr8avhMGDUr2PZFNQJt4crWutNmEJ8yIsqMP8HC2UYD8Hv80jrwAd8mNsWSTEO7UDmd/YU="
CONFIG_ESP_WIFI_REMOTE_EPPP_CLIENT_CA="MIIDIzCCAgugAwIBAgIUL4dO91g+lJLA9mHo+2wIfgr+VL8wDQYJKoZIhvcNAQELBQAwITELMAkGA1UEBhMCQ1oxEjAQBgNVBAMMCUVzcHJlc3NpZjAeFw0yNDEwMzAwOTM1NDVaFw0yNTEwMzAwOTM1NDVaMCExCzAJBgNVBAYTAkNaMRIwEAYDVQQDDAlFc3ByZXNzaWYwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCWm4sq9DdpDYUxRJD/Xauc8w2y7Zh0XQuRZ5qtkZclkpK3sz2nOQR9HAs0FWU4mUgZJeUwKNa1jzgtm89oAYtMrRypiTNQSkFWFiwJXXN/xGO93I2COQ857iGOvKyQpfxCsuy6THPIsSYYcYV6Lk/DlLix9CGXax+mcFvxcHQxm33//YHscWJEo5RyNHdfOFYhAzINqoHVX5KOQQxjmpHiMmVhT1HH9PqTOg3ukvNEJVphRHjv6n4KB2wHSMGmNVaUQWB9gILAQ6Ixkxxhf/U9DtftTvXNbzlX56kvSSt1I3gcmHHpwrDRrg0aQBbuL0yeDaza1wLMIaP/Saphl7x/AgMBAAGjUzBRMB0GA1UdDgQWBBS/+vNjHlnmn0N8ixDGpWq0WV1TtTAfBgNVHSMEGDAWgBS/+vNjHlnmn0N8ixDGpWq0WV1TtTAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQACJQuUz5LHHtfOc9s13lbfaWW5HukFI55/B7xOIVtIMcDpvzpVCQz1TT0N1DoFwEbXGLG8A8nBye+y9A/e2V/B3DEQ5Yq7rq/KxXGBtgyUGJT08kRASWsOoQOMI15xCH5Al2JifbOCaY9glupccctY5ypfucrM2Z9KGoT7lKw7L2cx9yrXY3UO/3bQibKNLSmHR4zvlcXEdWFdMmsBUvbUmVYTPZIK0iMARzXtBNJL1dbT+shp/VM2Um09L0cakyD2jwjFvRjbnUdgJt8j7pf38vEHtcVfbmCrdRjgmWXuwnqS5UTgfYyHCGZvEITr8JVAro7SkLywjL5IeKnqxtv6"
CONFIG_ESP_WIFI_REMOTE_EPPP_SERVER_CRT="MIICwjCCAaoCFAbrhsFoIjFDqI9LzRog2HUQcz0uMA0GCSqGSIb3DQEBCwUAMCExCzAJBgNVBAYTAkNaMRIwEAYDVQQDDAlFc3ByZXNzaWYwHhcNMjQxMDMwMDkzNTQ1WhcNMjUxMDMwMDkzNTQ1WjAaMRgwFgYDVQQDDA9lc3ByZXNzaWYubG9jYWwwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDXxawk5bs7vCfWHEFK9IuKqs/sByWVrNWfAYg4ZVaDRD+9yGoPHPfkLPnJ6ec3zB2HtfZy1SlOv7RcASMYygGfBeNFT1enlrcZr34SWit0larCtLKrU5xZBGzbMhwt/Td9c5z3i8yTp6MxoFbFck2VECSiul+ZUqI2t7DCyExwvCr+75IEPkc12mwys3QXn2wJDMLMK/ECRzZxfi1XUsmlR2Ds2XVx7S6+miExO/zj2bjQpOVfodFLSDSyhmurMvYVwI/yecvM80k/FE+1RkvsXIWYuj6lZ8UuxVwK0+l1yzXM8pMOC8dGRnYuF5PnU4Z8w+VQxHWUWBikoopn/+uhAgMBAAEwDQYJKoZIhvcNAQELBQADggEBAFwtlQktabaq0/Yvo57KFxTzFSKJLsPD0+ICVXxydvIPZecUuNLCcodPCeI2TnFzxp2kX5nF0+gUtHFZfl4mgjoOdmXdaCHBnpqxwDKODEPYdQU/PSLOSu0rLmBBvuZawOmIaijgtF4WWrZtJJTtzRN4kYJ28dLmhRu8NBDZYKeUKLNies2R7vrsq8VRitXyDWh20vSmnSyH0cepbJKnfUmv3Q9Ai3JWMHxgLljkn5qcF34XSyhH/Q/O8aRV+AEzG7dHNvqTIP/8u1DQJyjyBUC4WZHohe/uGBkbEfcysnp+XiTL8ZrcTItaKPN98LhXaTL3ReN2n9I/tult0FawELM="
CONFIG_ESP_WIFI_REMOTE_EPPP_SERVER_KEY="MIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQDXxawk5bs7vCfWHEFK9IuKqs/sByWVrNWfAYg4ZVaDRD+9yGoPHPfkLPnJ6ec3zB2HtfZy1SlOv7RcASMYygGfBeNFT1enlrcZr34SWit0larCtLKrU5xZBGzbMhwt/Td9c5z3i8yTp6MxoFbFck2VECSiul+ZUqI2t7DCyExwvCr+75IEPkc12mwys3QXn2wJDMLMK/ECRzZxfi1XUsmlR2Ds2XVx7S6+miExO/zj2bjQpOVfodFLSDSyhmurMvYVwI/yecvM80k/FE+1RkvsXIWYuj6lZ8UuxVwK0+l1yzXM8pMOC8dGRnYuF5PnU4Z8w+VQxHWUWBikoopn/+uhAgMBAAECggEBAJY/VC5hNe5Th53FEQYjoONPK/dbxqUhs6LEC1nR3tsK9COv4YJilo7xboJV+KZW4J02bMTrf5cRUILcW9cQGu7jx6zkodHV1evx0qTu2uGUslJgRyWb0/v8Y9yCWTMA5tnZXozVcP/ENJQC5UkZ3cIVep1Bj/4Ql1nosRIBLZE1fiW6YBxKM05Qni/UJJWIxc/7clBYiy8L/atvhErkqKvx/pACh/SgVPd9JMzTBdbE13bB1O3nx/7n3gJmkBkKtlWL6vA294qdlHa3RMokV+lTwRx+b5VzxoKZHv6grHPNMulx3R/gHcWgz1dAo8Ume8LgR6zTqPVEy1uB95hX7I0CgYEA9/u/5IjDQQJ9qTkvJey6FNsvl68JcYRtP2+3WKXPRaUJLPv6M20ZmjpuVk4NpkEBWzJ4fhQ6D9TL8F7+WsjLfa58gMs1juu3uAEk4H5AgPi3vqkdw/Kgo4uU3QCa/6R5dXzpndWqllSBAsx+0s/uwbI6bLodqcVOlIE7vLusoYcCgYEA3r9Zt8cwDt1h6JXdHcNVKEcPt01XB7h3bQtiliSDcfToV9fYuQXUOkBK76Xt6w3L5NqWrQwigRCdDmYBuhql/RgvIGcOKVC/cL+sSetNP8xzSozQsyfBalCk826X7MV065OtqXZZVux48gVBSvfuzs1xTo3e1TpV+pd1nj27c5cCgYEAy70WR1jlsn+tZl8JEYuQxpneXCz/ATjf2QKcDEUOKhYRl9feFGpKYqAnDtlJ9ZHq31Z0EIHlwiP++hnRuBzIsxWsTNSnyCh55L9r4NVZgZzWudqQDfFFcZi4UWqx7d7fu1tJRNfLM39yDy6b8+/KJXGc9r9ip5znlrMmtUUr6/kCgYAlp8V7+vFV4fj2P7d0m5vexjyS6UEoLfgKeB0/cobCEfvhNb0OcjzRaCMC5lMVJGzukEFemamPlgZm87mhA3ZCFf+Jg8JyG5NxdQWkLWIOwfpPhQSW9MaOuXlZKb4HKc49MObvufEab7l2eIr0KHu3fCWGeRdNhqIYTdh1WsxAmwKBgQCE50V7GAyG+tsMwZyimAAykcBL2x0NSKT2LY59sM6+FEtRH9d1dyacIFQ2GVHPNXjeRxtqIawsU/5yJ5Ivh38nDJzQLLM3oDXi5VHtWP6ExfUi9ZFb1CLiALg5dBoyAP/3Xvtq8JpIp6PwFRVPCKE7/GgBmEQ23eIfViFhfPIrfQ=="

View File

@@ -0,0 +1,4 @@
CONFIG_ESP_WIFI_REMOTE_LIBRARY_EPPP=y
CONFIG_LWIP_PPP_SUPPORT=y
CONFIG_LWIP_PPP_SERVER_SUPPORT=y
CONFIG_LWIP_PPP_VJ_HEADER_COMPRESSION=n

View File

@@ -0,0 +1,22 @@
# SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: CC0-1.0
import os.path
from typing import Tuple
import pytest
from pytest_embedded_idf.dut import IdfDut
@pytest.mark.parametrize(
'count, app_path, target', [
(2,
f'{os.path.join(os.path.dirname(__file__), "mqtt")}|{os.path.join(os.path.dirname(__file__), "server")}',
'esp32p4|esp32c6'),
], indirect=True
)
def test_wifi_remote_eppp(dut: Tuple[IdfDut, IdfDut]) -> None:
client = dut[0]
server = dut[1]
server.expect('rpc_server: Received IP event', timeout=100)
client.expect('MQTT_EVENT_CONNECTED', timeout=100)

View File

@@ -0,0 +1,6 @@
# The following five lines of boilerplate have to be in your project's
# CMakeLists in this exact order for cmake to work correctly
cmake_minimum_required(VERSION 3.16)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(pppos_slave)

View File

@@ -0,0 +1,21 @@
# WiFi remote EPPP RPC server
This is a standalone application serving as the slave device for `esp_wifi_remote` users (with `eppp` RPC).
## Overview
You need to configure and connect a slave device to the `esp_wifi_remote` host and run this application. Please fallow carefully these guidelines on HW connection and configuration of the slave device, based on the host device.
## HW connection
We currently support only `UART` transport you just need to connect Rx, Tx and GND and configure these fields accordingly:
* CONFIG_ESP_WIFI_REMOTE_EPPP_UART_TX_PIN
* CONFIG_ESP_WIFI_REMOTE_EPPP_UART_RX_PIN
## SW configuration
You will have to install server side certificates and keys, as well as the CA which should verify the client side.
Please configure these options:
* CONFIG_ESP_WIFI_REMOTE_EPPP_CLIENT_CA
* CONFIG_ESP_WIFI_REMOTE_EPPP_SERVER_CRT
* CONFIG_ESP_WIFI_REMOTE_EPPP_SERVER_KEY

View File

@@ -0,0 +1,2 @@
idf_component_register(SRCS "station_example_main.c"
INCLUDE_DIRS ".")

View File

@@ -0,0 +1,3 @@
dependencies:
esp_wifi_remote:
version: '*'

View File

@@ -0,0 +1,36 @@
/*
* SPDX-FileCopyrightText: 2023-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Unlicense OR CC0-1.0
*/
#include <string.h>
#include <esp_private/wifi.h>
#include "freertos/FreeRTOS.h"
#include "freertos/event_groups.h"
#include "esp_system.h"
#include "esp_wifi.h"
#include "esp_event.h"
#include "esp_log.h"
#include "nvs_flash.h"
#include "eppp_link.h"
#include "esp_wifi_remote.h"
esp_err_t server_init(void);
void app_main(void)
{
//Initialize NVS
esp_err_t ret = nvs_flash_init();
if (ret == ESP_ERR_NVS_NO_FREE_PAGES || ret == ESP_ERR_NVS_NEW_VERSION_FOUND) {
ESP_ERROR_CHECK(nvs_flash_erase());
ret = nvs_flash_init();
}
ESP_ERROR_CHECK(ret);
ESP_ERROR_CHECK(esp_netif_init());
ESP_ERROR_CHECK(esp_event_loop_create_default());
esp_netif_create_default_wifi_sta();
server_init();
}

View File

@@ -0,0 +1,10 @@
CONFIG_IDF_TARGET="esp32c6"
CONFIG_ESP_WIFI_REMOTE_EPPP_UART_TX_PIN=22
CONFIG_ESP_WIFI_REMOTE_EPPP_UART_RX_PIN=23
CONFIG_ESP_WIFI_REMOTE_EPPP_SERVER_CA="MIIDIzCCAgugAwIBAgIUL4dO91g+lJLA9mHo+2wIfgr+VL8wDQYJKoZIhvcNAQELBQAwITELMAkGA1UEBhMCQ1oxEjAQBgNVBAMMCUVzcHJlc3NpZjAeFw0yNDEwMzAwOTM1NDVaFw0yNTEwMzAwOTM1NDVaMCExCzAJBgNVBAYTAkNaMRIwEAYDVQQDDAlFc3ByZXNzaWYwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCWm4sq9DdpDYUxRJD/Xauc8w2y7Zh0XQuRZ5qtkZclkpK3sz2nOQR9HAs0FWU4mUgZJeUwKNa1jzgtm89oAYtMrRypiTNQSkFWFiwJXXN/xGO93I2COQ857iGOvKyQpfxCsuy6THPIsSYYcYV6Lk/DlLix9CGXax+mcFvxcHQxm33//YHscWJEo5RyNHdfOFYhAzINqoHVX5KOQQxjmpHiMmVhT1HH9PqTOg3ukvNEJVphRHjv6n4KB2wHSMGmNVaUQWB9gILAQ6Ixkxxhf/U9DtftTvXNbzlX56kvSSt1I3gcmHHpwrDRrg0aQBbuL0yeDaza1wLMIaP/Saphl7x/AgMBAAGjUzBRMB0GA1UdDgQWBBS/+vNjHlnmn0N8ixDGpWq0WV1TtTAfBgNVHSMEGDAWgBS/+vNjHlnmn0N8ixDGpWq0WV1TtTAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQACJQuUz5LHHtfOc9s13lbfaWW5HukFI55/B7xOIVtIMcDpvzpVCQz1TT0N1DoFwEbXGLG8A8nBye+y9A/e2V/B3DEQ5Yq7rq/KxXGBtgyUGJT08kRASWsOoQOMI15xCH5Al2JifbOCaY9glupccctY5ypfucrM2Z9KGoT7lKw7L2cx9yrXY3UO/3bQibKNLSmHR4zvlcXEdWFdMmsBUvbUmVYTPZIK0iMARzXtBNJL1dbT+shp/VM2Um09L0cakyD2jwjFvRjbnUdgJt8j7pf38vEHtcVfbmCrdRjgmWXuwnqS5UTgfYyHCGZvEITr8JVAro7SkLywjL5IeKnqxtv6"
CONFIG_ESP_WIFI_REMOTE_EPPP_CLIENT_CRT="MIICvDCCAaQCFAbrhsFoIjFDqI9LzRog2HUQcz0vMA0GCSqGSIb3DQEBCwUAMCExCzAJBgNVBAYTAkNaMRIwEAYDVQQDDAlFc3ByZXNzaWYwHhcNMjQxMDMwMDkzNTQ1WhcNMjUxMDMwMDkzNTQ1WjAUMRIwEAYDVQQDDAljbGllbnRfY24wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDGPubh3BQadEIOR3QLXyF7REI6CHC8PcJ55ndHYEAboh8WuzYbqKjgz1Jf5Ya4yUUC+aJk6rYX/oSX2MSyXCbBQ+tBR+mSRt7M7smnHYLUUqbN4f594TI4K0KRDCPPuJmhPo/yn+M51T9p3BUNRq3g3cyUKKQaomX1cUr0uKyPel5WyLmzgB7o8Afw6uOyWU3YO3QgilSC3W+3n/KQ6c2jJFimgLk7LBGKY3e/F8InWQgfCG7kb66JXhFL6DSlCryrh0SbidGUNGAGJC86OTd6/XLb5qr3KIfvdTi7Rqcw7OverZ0V7/g5HzdTYMJRbF0dqYAWVaGFxDCPOmc1HzEjAgMBAAEwDQYJKoZIhvcNAQELBQADggEBAD6yAUXqueOFXybINofP/jhXNuxQCJXIONmgnB+LYfl/VPc9bdi5l5wEnBneZnrDbXaGHCKgxhW8nT9KZRKJF7eWnjmsGHEgVov6DTEERbO3sGGBbP0Gdwjhj58QMMGoBFDdCr/1t58q1eHwukmfhHM3mMynoduFSMuGcpSEM9QcE2h2ePPdNv/CvjcNt/3L3sF4DU4Jf/ncTRiFVkXaNeyNhRdr8UUV0siek035ho1GD8oiYFYi86eAa7AuNA9Rjjs9v64Df32tbeq3hfefm7hMJdDdz31eE/0xVLJmpYVE4DKYejenvsz2dreZt+CKiX4wVWfTNxVdOSjQJqxMEgM="
CONFIG_ESP_WIFI_REMOTE_EPPP_CLIENT_KEY="MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDGPubh3BQadEIOR3QLXyF7REI6CHC8PcJ55ndHYEAboh8WuzYbqKjgz1Jf5Ya4yUUC+aJk6rYX/oSX2MSyXCbBQ+tBR+mSRt7M7smnHYLUUqbN4f594TI4K0KRDCPPuJmhPo/yn+M51T9p3BUNRq3g3cyUKKQaomX1cUr0uKyPel5WyLmzgB7o8Afw6uOyWU3YO3QgilSC3W+3n/KQ6c2jJFimgLk7LBGKY3e/F8InWQgfCG7kb66JXhFL6DSlCryrh0SbidGUNGAGJC86OTd6/XLb5qr3KIfvdTi7Rqcw7OverZ0V7/g5HzdTYMJRbF0dqYAWVaGFxDCPOmc1HzEjAgMBAAECggEAJdniuWMMz5Q8/H72ECnEucVpo6zy4W4lUKMJSS5+bwhASVXLWfKU8/+Bqd+oHmYHcC77q6sIw4IMDPYNcESZ/bKbG2bAmPZBGf3JsMe4sBNr18l7jstNjF3uIsWfnMyRQLEySM/wUZ1+sxabSmKhVlri8bLkylURhJByEFGmWOpc+rsrVUhhQVhvNQhL6c7W1hfnj2TOrMBGnpvOtYUMlbaQuSbV1Djqgg8NU6DR4g6fZS7JGbWdaeu39RK0MjJdiZuHflF2Sx9nUDwpLSdl1fVZAAxYuSFIvgRQCd3KTt+5eaqov/DHBfKghPn0a6S3OxlboPAt4wps7yHT0L0ccQKBgQD1euhKGdNH0yWXs5iuQ/eJcJWxFEc5cIEx1h/2oTP2++JU0gCMG6fXxDDZL70TXQxQeAnuLz8Aj+/qIKI+t3uOu4yK2s1LA/yjlrA6fMVeK/OaQuuKikFshUd28IFQvrG6oAxs1MJ5fcRhSE9MDW9lfcUF3woaoZlfCz22d2RImwKBgQDOvcyhbbHcrQxoESPz4RlZwUMTfEldXfTQtyl/pJdAJLUrDiRWYx4KNUwvVRrxgjaXnjF1q58NR9NNrTasJ+Vl30Nklhnyt3a4NTKACXxhX1cemWdL7m1B7rBSzMJD6uAqE3q8790swmZYRWgjMOB9xrYKq0JNuaCPEx8FbbzuGQKBgE4QRNhzt/2qRtUkNtSMJqbdV60VXsUEYwFfL5D1mJndZg9FLQlhLhHugP5AMSd8OpNIaRgGjEl4fHn+4LmDDdbJC5uIkypc3TWEkQw4a2dUIMaYq2DGMKH7DEvllaoAynInvWvKiQGrngy1uwnbZ+ZlhYclc4gehbB02a4x74ErAoGAWxApCVXrCRvEIjaiknKtGubQp82P9ytCgYicI9gYsy04C53wDYkdGzv8scCX3JcRetk4Se9tYIkpnsZUFaKBHc0ovy6KgWmkRmFQPCtxeOZo1laVtFFyGJ+NVPtR+l6DnKT15DD3SBbcw7bWtuF5kI0tdCeZTekcusieWmLK3EkCgYEA0RumiuR2jgPnljGrLZu2QAg1gieS6kGKwXJarSOLFG5B4dftdwBKy8QEqbNAL5xKfa6tlNg6Pa9ULfC38qOOSB0BKv+gAvjra7uk4Pr8avhMGDUr2PZFNQJt4crWutNmEJ8yIsqMP8HC2UYD8Hv80jrwAd8mNsWSTEO7UDmd/YU="
CONFIG_ESP_WIFI_REMOTE_EPPP_CLIENT_CA="MIIDIzCCAgugAwIBAgIUL4dO91g+lJLA9mHo+2wIfgr+VL8wDQYJKoZIhvcNAQELBQAwITELMAkGA1UEBhMCQ1oxEjAQBgNVBAMMCUVzcHJlc3NpZjAeFw0yNDEwMzAwOTM1NDVaFw0yNTEwMzAwOTM1NDVaMCExCzAJBgNVBAYTAkNaMRIwEAYDVQQDDAlFc3ByZXNzaWYwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCWm4sq9DdpDYUxRJD/Xauc8w2y7Zh0XQuRZ5qtkZclkpK3sz2nOQR9HAs0FWU4mUgZJeUwKNa1jzgtm89oAYtMrRypiTNQSkFWFiwJXXN/xGO93I2COQ857iGOvKyQpfxCsuy6THPIsSYYcYV6Lk/DlLix9CGXax+mcFvxcHQxm33//YHscWJEo5RyNHdfOFYhAzINqoHVX5KOQQxjmpHiMmVhT1HH9PqTOg3ukvNEJVphRHjv6n4KB2wHSMGmNVaUQWB9gILAQ6Ixkxxhf/U9DtftTvXNbzlX56kvSSt1I3gcmHHpwrDRrg0aQBbuL0yeDaza1wLMIaP/Saphl7x/AgMBAAGjUzBRMB0GA1UdDgQWBBS/+vNjHlnmn0N8ixDGpWq0WV1TtTAfBgNVHSMEGDAWgBS/+vNjHlnmn0N8ixDGpWq0WV1TtTAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQACJQuUz5LHHtfOc9s13lbfaWW5HukFI55/B7xOIVtIMcDpvzpVCQz1TT0N1DoFwEbXGLG8A8nBye+y9A/e2V/B3DEQ5Yq7rq/KxXGBtgyUGJT08kRASWsOoQOMI15xCH5Al2JifbOCaY9glupccctY5ypfucrM2Z9KGoT7lKw7L2cx9yrXY3UO/3bQibKNLSmHR4zvlcXEdWFdMmsBUvbUmVYTPZIK0iMARzXtBNJL1dbT+shp/VM2Um09L0cakyD2jwjFvRjbnUdgJt8j7pf38vEHtcVfbmCrdRjgmWXuwnqS5UTgfYyHCGZvEITr8JVAro7SkLywjL5IeKnqxtv6"
CONFIG_ESP_WIFI_REMOTE_EPPP_SERVER_CRT="MIICwjCCAaoCFAbrhsFoIjFDqI9LzRog2HUQcz0uMA0GCSqGSIb3DQEBCwUAMCExCzAJBgNVBAYTAkNaMRIwEAYDVQQDDAlFc3ByZXNzaWYwHhcNMjQxMDMwMDkzNTQ1WhcNMjUxMDMwMDkzNTQ1WjAaMRgwFgYDVQQDDA9lc3ByZXNzaWYubG9jYWwwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDXxawk5bs7vCfWHEFK9IuKqs/sByWVrNWfAYg4ZVaDRD+9yGoPHPfkLPnJ6ec3zB2HtfZy1SlOv7RcASMYygGfBeNFT1enlrcZr34SWit0larCtLKrU5xZBGzbMhwt/Td9c5z3i8yTp6MxoFbFck2VECSiul+ZUqI2t7DCyExwvCr+75IEPkc12mwys3QXn2wJDMLMK/ECRzZxfi1XUsmlR2Ds2XVx7S6+miExO/zj2bjQpOVfodFLSDSyhmurMvYVwI/yecvM80k/FE+1RkvsXIWYuj6lZ8UuxVwK0+l1yzXM8pMOC8dGRnYuF5PnU4Z8w+VQxHWUWBikoopn/+uhAgMBAAEwDQYJKoZIhvcNAQELBQADggEBAFwtlQktabaq0/Yvo57KFxTzFSKJLsPD0+ICVXxydvIPZecUuNLCcodPCeI2TnFzxp2kX5nF0+gUtHFZfl4mgjoOdmXdaCHBnpqxwDKODEPYdQU/PSLOSu0rLmBBvuZawOmIaijgtF4WWrZtJJTtzRN4kYJ28dLmhRu8NBDZYKeUKLNies2R7vrsq8VRitXyDWh20vSmnSyH0cepbJKnfUmv3Q9Ai3JWMHxgLljkn5qcF34XSyhH/Q/O8aRV+AEzG7dHNvqTIP/8u1DQJyjyBUC4WZHohe/uGBkbEfcysnp+XiTL8ZrcTItaKPN98LhXaTL3ReN2n9I/tult0FawELM="
CONFIG_ESP_WIFI_REMOTE_EPPP_SERVER_KEY="MIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQDXxawk5bs7vCfWHEFK9IuKqs/sByWVrNWfAYg4ZVaDRD+9yGoPHPfkLPnJ6ec3zB2HtfZy1SlOv7RcASMYygGfBeNFT1enlrcZr34SWit0larCtLKrU5xZBGzbMhwt/Td9c5z3i8yTp6MxoFbFck2VECSiul+ZUqI2t7DCyExwvCr+75IEPkc12mwys3QXn2wJDMLMK/ECRzZxfi1XUsmlR2Ds2XVx7S6+miExO/zj2bjQpOVfodFLSDSyhmurMvYVwI/yecvM80k/FE+1RkvsXIWYuj6lZ8UuxVwK0+l1yzXM8pMOC8dGRnYuF5PnU4Z8w+VQxHWUWBikoopn/+uhAgMBAAECggEBAJY/VC5hNe5Th53FEQYjoONPK/dbxqUhs6LEC1nR3tsK9COv4YJilo7xboJV+KZW4J02bMTrf5cRUILcW9cQGu7jx6zkodHV1evx0qTu2uGUslJgRyWb0/v8Y9yCWTMA5tnZXozVcP/ENJQC5UkZ3cIVep1Bj/4Ql1nosRIBLZE1fiW6YBxKM05Qni/UJJWIxc/7clBYiy8L/atvhErkqKvx/pACh/SgVPd9JMzTBdbE13bB1O3nx/7n3gJmkBkKtlWL6vA294qdlHa3RMokV+lTwRx+b5VzxoKZHv6grHPNMulx3R/gHcWgz1dAo8Ume8LgR6zTqPVEy1uB95hX7I0CgYEA9/u/5IjDQQJ9qTkvJey6FNsvl68JcYRtP2+3WKXPRaUJLPv6M20ZmjpuVk4NpkEBWzJ4fhQ6D9TL8F7+WsjLfa58gMs1juu3uAEk4H5AgPi3vqkdw/Kgo4uU3QCa/6R5dXzpndWqllSBAsx+0s/uwbI6bLodqcVOlIE7vLusoYcCgYEA3r9Zt8cwDt1h6JXdHcNVKEcPt01XB7h3bQtiliSDcfToV9fYuQXUOkBK76Xt6w3L5NqWrQwigRCdDmYBuhql/RgvIGcOKVC/cL+sSetNP8xzSozQsyfBalCk826X7MV065OtqXZZVux48gVBSvfuzs1xTo3e1TpV+pd1nj27c5cCgYEAy70WR1jlsn+tZl8JEYuQxpneXCz/ATjf2QKcDEUOKhYRl9feFGpKYqAnDtlJ9ZHq31Z0EIHlwiP++hnRuBzIsxWsTNSnyCh55L9r4NVZgZzWudqQDfFFcZi4UWqx7d7fu1tJRNfLM39yDy6b8+/KJXGc9r9ip5znlrMmtUUr6/kCgYAlp8V7+vFV4fj2P7d0m5vexjyS6UEoLfgKeB0/cobCEfvhNb0OcjzRaCMC5lMVJGzukEFemamPlgZm87mhA3ZCFf+Jg8JyG5NxdQWkLWIOwfpPhQSW9MaOuXlZKb4HKc49MObvufEab7l2eIr0KHu3fCWGeRdNhqIYTdh1WsxAmwKBgQCE50V7GAyG+tsMwZyimAAykcBL2x0NSKT2LY59sM6+FEtRH9d1dyacIFQ2GVHPNXjeRxtqIawsU/5yJ5Ivh38nDJzQLLM3oDXi5VHtWP6ExfUi9ZFb1CLiALg5dBoyAP/3Xvtq8JpIp6PwFRVPCKE7/GgBmEQ23eIfViFhfPIrfQ=="
CONFIG_PARTITION_TABLE_SINGLE_APP_LARGE=y

View File

@@ -0,0 +1,7 @@
CONFIG_ESP_WIFI_REMOTE_LIBRARY_EPPP=y
CONFIG_LWIP_IP_FORWARD=y
CONFIG_LWIP_IPV4_NAPT=y
CONFIG_LWIP_TCPIP_TASK_STACK_SIZE=4096
CONFIG_LWIP_PPP_SUPPORT=y
CONFIG_LWIP_PPP_SERVER_SUPPORT=y
CONFIG_LWIP_PPP_VJ_HEADER_COMPRESSION=n

View File

@@ -0,0 +1,52 @@
#!/usr/bin/env bash
function gen_pkey { # Params: [KEY_FILE]
openssl genpkey -algorithm RSA -pkeyopt rsa_keygen_bits:2048 | openssl pkcs8 -topk8 -outform PEM -nocrypt -out $1
}
function sign_with_ca { # Params: [KEY_FILE] [CN] [CRT_FILE]
openssl req -out request.csr -key $1 -subj "/CN=$2" -new -sha256
openssl x509 -req -in request.csr -CA ca.crt -CAkey ca.key -CAcreateserial -out $3 -days 365 -sha256
}
function export_config { # Params: [FILE/CONFIG_NAME]
content=`cat $1 | sed '/---/d' | tr -d '\n'`
echo "CONFIG_ESP_WIFI_REMOTE_EPPP_$1=\"${content}\""
}
if [ -z "$1" ]; then
echo "Usage $0 <SERVER_CN> [CLIENT_CN]"
exit 1;
fi
SERVER_CN=$1
CLIENT_CN="${2-client_cn}"
echo "Server's CN: $SERVER_CN"
echo "Client's CN: $CLIENT_CN"
## First create our own CA
gen_pkey ca.key
openssl req -new -x509 -subj "/C=CZ/CN=Espressif" -days 365 -key ca.key -out ca.crt
# will use the same CA for both server and client side
cp ca.crt SERVER_CA
cp ca.crt CLIENT_CA
# Server side
gen_pkey SERVER_KEY
sign_with_ca SERVER_KEY $SERVER_CN SERVER_CRT
# Client side
gen_pkey CLIENT_KEY
sign_with_ca CLIENT_KEY $CLIENT_CN CLIENT_CRT
## Generate config options
echo -e "\n# Client side: need own cert and key and ca-cert for server validation"
for f in SERVER_CA CLIENT_CRT CLIENT_KEY; do
export_config $f
done
echo -e "\n# Server side: need own cert and key and ca-cert for client validation"
for f in CLIENT_CA SERVER_CRT SERVER_KEY; do
export_config $f
done

View File

@@ -0,0 +1,6 @@
# The following five lines of boilerplate have to be in your project's
# CMakeLists in this exact order for cmake to work correctly
cmake_minimum_required(VERSION 3.16)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(two_stations)

View File

@@ -0,0 +1,59 @@
# Simple example demonstrating Wi-Fi and Wi-Fi remote on the same chip
## How to use this example
* Run `server` example as the slave project (communication coprocessor)
* Configure both the server and the client with mutual keys/certs as described in [mqtt example](../mqtt/README.md)
* Configure SSID and Password for two access points
- one for local Wi-Fi (using the Wi-Fi library on the chip itself)
- the second one for remote Wi-Fi (using the network offloading -- communication coprocessor)
* Build and run the example
## Note
This example supports EPPP RPC library with both UART and SPI transport options. Configure the transport method and pins using `idf.py menuconfig` under "WiFi Remote" settings.
## Example output
```
I (591) wifi:enable tsf
I (591) two wifi stations: Wi-Fi local events: WIFI_EVENT (43)
I (601) two wifi stations: Wi-Fi local events: WIFI_EVENT (2)
I (601) two wifi stations: wifi_init_sta finished.
I (611) wifi:new:<11,0>, old:<1,0>, ap:<255,255>, sta:<11,0>, prof:1, snd_ch_cfg:0x0
I (611) wifi:state: init -> auth (0xb0)
I (621) two wifi stations: Wi-Fi local events: WIFI_EVENT (43)
I (621) wifi:state: auth -> assoc (0x0)
I (641) wifi:state: assoc -> run (0x10)
I (671) wifi:security: WPA2-PSK, phy: bgn, rssi: -62
I (681) wifi:pm start, type: 1
I (681) wifi:dp: 1, bi: 102400, li: 3, scale listen interval from 307200 us to 307200 us
I (681) wifi:set rx beacon pti, rx_bcn_pti: 0, bcn_timeout: 25000, mt_pti: 0, mt_time: 10000
I (691) two wifi stations: Wi-Fi local events: WIFI_EVENT (4)
I (1061) wifi:AP's beacon interval = 102400 us, DTIM period = 1
I (2691) esp_netif_handlers: sta ip: 192.168.32.221, mask: 255.255.254.0, gw: 192.168.32.3
I (2691) two wifi stations: Wi-Fi local events: IP_EVENT (0)
I (2691) two wifi stations: got ip:192.168.32.221
I (2701) two wifi stations: connected to ap SSID:EspressifSystems
I (2701) uart: queue free spaces: 16
I (2711) eppp_link: Waiting for IP address 0
I (2941) esp-netif_lwip-ppp: Connected
I (2951) eppp_link: Got IPv4 event: Interface "example_netif_sta(EPPP0)" address: 192.168.11.2
I (2951) esp-netif_lwip-ppp: Connected
I (2951) eppp_link: Connected! 0
I (5151) two wifi stations: wifi_init_remote_sta finished.
I (5211) two wifi stations: Wi-Fi remote events: WIFI_REMOTE_EVENT (43)
I (5211) two wifi stations: Wi-Fi remote events: WIFI_REMOTE_EVENT (2)
I (5461) two wifi stations: Wi-Fi remote events: WIFI_REMOTE_EVENT (4)
I (7341) esp_netif_handlers: sta ip: 192.168.11.2, mask: 255.255.255.255, gw: 192.168.11.1
I (7341) two wifi stations: Wi-Fi local events: IP_EVENT (0)
I (7341) two wifi stations: got ip:192.168.11.2
I (7351) two wifi stations: Wi-Fi remote events: IP_EVENT (0)
I (7361) two wifi stations: got ip:192.168.11.2
I (7361) rpc_client: Main DNS:192.168.32.3
I (7371) rpc_client: EPPP IP:192.168.11.1
I (7371) rpc_client: WIFI IP:192.168.33.131
I (7381) rpc_client: WIFI GW:192.168.32.3
I (7381) rpc_client: WIFI mask:255.255.254.0
I (7381) two wifi stations: connected to ap SSID:EspressifSystems
I (7391) main_task: Returned from app_main()

View File

@@ -0,0 +1,2 @@
idf_component_register(SRCS "two_stations.c"
INCLUDE_DIRS ".")

View File

@@ -0,0 +1,33 @@
menu "Example Configuration"
config ESP_WIFI_LOCAL_SSID
string "Local WiFi SSID"
default "myssid"
help
SSID (network name) for the example to connect to.
config ESP_WIFI_LOCAL_PASSWORD
string "Local WiFi Password"
default "mypassword"
help
WiFi password (WPA or WPA2) for the example to use.
config ESP_WIFI_REMOTE_SSID
string "Remote WiFi SSID"
default "myssid"
help
SSID (network name) for the example to connect to.
config ESP_WIFI_REMOTE_PASSWORD
string "Remote WiFi Password"
default "mypassword"
help
WiFi password (WPA or WPA2) for the example to use.
config ESP_MAXIMUM_RETRY
int "Maximum retry"
default 5
help
Set the Maximum retry to avoid station reconnecting to the AP unlimited when the AP is really inexistent.
endmenu

View File

@@ -0,0 +1,3 @@
dependencies:
esp_wifi_remote:
version: '*'

View File

@@ -0,0 +1,185 @@
/*
* SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Unlicense OR CC0-1.0
*/
/* WiFi station Example
This example code is in the Public Domain (or CC0 licensed, at your option.)
Unless required by applicable law or agreed to in writing, this
software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
CONDITIONS OF ANY KIND, either express or implied.
*/
#include <string.h>
#include "freertos/FreeRTOS.h"
#include "freertos/event_groups.h"
#include "esp_system.h"
#include "esp_wifi.h"
#include "esp_event.h"
#include "esp_log.h"
#include "nvs_flash.h"
#include "esp_wifi_remote.h"
/* The examples use WiFi configuration that you can set via project configuration menu
If you'd rather not, just change the below entries to strings with
the config you want - ie #define EXAMPLE_WIFI_SSID "mywifissid"
*/
#define EXAMPLE_ESP_MAXIMUM_RETRY CONFIG_ESP_MAXIMUM_RETRY
/* FreeRTOS event group to signal when we are connected*/
static EventGroupHandle_t s_wifi_event_group;
/* The event group allows multiple bits for each event, but we only care about two events:
* - we are connected to the AP with an IP
* - we failed to connect after the maximum amount of retries */
#define WIFI_CONNECTED_BIT BIT0
#define WIFI_FAIL_BIT BIT1
#define WIFI_BITS (WIFI_CONNECTED_BIT | WIFI_FAIL_BIT)
#define WIFI_REMOTE_CONNECTED_BIT BIT2
#define WIFI_REMOTE_FAIL_BIT BIT3
#define WIFI_REMOTE_BITS (WIFI_REMOTE_CONNECTED_BIT | WIFI_REMOTE_FAIL_BIT)
static const char *TAG_local = "two_stations_local";
static const char *TAG_remote = "two_stations_remote";
static int s_retry_num = 0;
static void event_handler(void* arg, esp_event_base_t event_base,
int32_t event_id, void* event_data)
{
if (event_base == WIFI_EVENT && event_id == WIFI_EVENT_STA_START) {
esp_wifi_connect();
} else if (event_base == WIFI_EVENT && event_id == WIFI_EVENT_STA_DISCONNECTED) {
if (s_retry_num < EXAMPLE_ESP_MAXIMUM_RETRY) {
esp_wifi_connect();
s_retry_num++;
ESP_LOGI(TAG_local, "retry to connect to the AP");
} else {
xEventGroupSetBits(s_wifi_event_group, WIFI_FAIL_BIT);
}
ESP_LOGI(TAG_local,"connect to the AP fail");
} else if (event_base == IP_EVENT && event_id == IP_EVENT_STA_GOT_IP) {
ip_event_got_ip_t* event = (ip_event_got_ip_t*) event_data;
if (event->esp_netif != esp_netif_get_handle_from_ifkey("WIFI_STA_DEF")) {
// Ignore this event (not the local Wi-Fi interface), probably remote Wi-Fi
return;
}
ESP_LOGI(TAG_local, "Local Wi-Fi got IP:" IPSTR, IP2STR(&event->ip_info.ip));
s_retry_num = 0;
xEventGroupSetBits(s_wifi_event_group, WIFI_CONNECTED_BIT);
}
}
static void event_handler_remote(void* arg, esp_event_base_t event_base,
int32_t event_id, void* event_data)
{
if (event_base == WIFI_REMOTE_EVENT && event_id == WIFI_EVENT_STA_START) {
esp_wifi_remote_connect();
} else if (event_base == WIFI_REMOTE_EVENT && event_id == WIFI_EVENT_STA_DISCONNECTED) {
if (s_retry_num < EXAMPLE_ESP_MAXIMUM_RETRY) {
esp_wifi_remote_connect();
s_retry_num++;
ESP_LOGI(TAG_remote, "retry to connect to the AP");
} else {
xEventGroupSetBits(s_wifi_event_group, WIFI_REMOTE_FAIL_BIT);
}
ESP_LOGI(TAG_remote,"connect to the AP fail");
} else if (event_base == IP_EVENT && event_id == IP_EVENT_STA_GOT_IP) {
ip_event_got_ip_t* event = (ip_event_got_ip_t*) event_data;
ESP_LOGI(TAG_remote, "Remote Wi-Fi got IP:" IPSTR, IP2STR(&event->ip_info.ip));
s_retry_num = 0;
xEventGroupSetBits(s_wifi_event_group, WIFI_REMOTE_CONNECTED_BIT);
}
}
static void init_system_components(void)
{
s_wifi_event_group = xEventGroupCreate();
ESP_ERROR_CHECK(esp_netif_init());
ESP_ERROR_CHECK(esp_event_loop_create_default());
}
static void wifi_init_sta(void)
{
esp_netif_create_default_wifi_sta();
wifi_init_config_t cfg = WIFI_INIT_CONFIG_DEFAULT();
ESP_ERROR_CHECK(esp_wifi_init(&cfg));
ESP_ERROR_CHECK(esp_event_handler_register(WIFI_EVENT, ESP_EVENT_ANY_ID, event_handler, NULL));
ESP_ERROR_CHECK(esp_event_handler_register(IP_EVENT, IP_EVENT_STA_GOT_IP, event_handler, NULL));
wifi_config_t wifi_config = {
.sta = {
.ssid = CONFIG_ESP_WIFI_LOCAL_SSID,
.password = CONFIG_ESP_WIFI_LOCAL_PASSWORD,
},
};
ESP_ERROR_CHECK(esp_wifi_set_mode(WIFI_MODE_STA) );
ESP_ERROR_CHECK(esp_wifi_set_config(WIFI_IF_STA, &wifi_config) );
ESP_ERROR_CHECK(esp_wifi_start() );
ESP_LOGI(TAG_local, "wifi_init_sta finished.");
/* Waiting until either the connection is established (WIFI_CONNECTED_BIT) or connection failed for the maximum
* number of re-tries (WIFI_FAIL_BIT). The bits are set by event_handler() (see above) */
EventBits_t bits = xEventGroupWaitBits(s_wifi_event_group, WIFI_BITS, pdFALSE, pdFALSE, portMAX_DELAY);
if (bits & WIFI_CONNECTED_BIT) {
ESP_LOGI(TAG_local, "connected to ap SSID:%s ", CONFIG_ESP_WIFI_LOCAL_SSID);
} else if (bits & WIFI_FAIL_BIT) {
ESP_LOGW(TAG_local, "Failed to connect to SSID:%s", CONFIG_ESP_WIFI_LOCAL_SSID);
} else {
ESP_LOGE(TAG_local, "UNEXPECTED EVENT");
}
}
static void wifi_init_remote_sta(void)
{
wifi_init_config_t cfg = WIFI_INIT_CONFIG_DEFAULT();
ESP_ERROR_CHECK(esp_wifi_remote_init(&cfg));
ESP_ERROR_CHECK(esp_event_handler_register(WIFI_REMOTE_EVENT, ESP_EVENT_ANY_ID, event_handler_remote, NULL));
ESP_ERROR_CHECK(esp_event_handler_register(IP_EVENT, IP_EVENT_STA_GOT_IP, event_handler_remote, NULL));
wifi_config_t wifi_config = {
.sta = {
.ssid = CONFIG_ESP_WIFI_REMOTE_SSID,
.password = CONFIG_ESP_WIFI_REMOTE_PASSWORD,
},
};
ESP_ERROR_CHECK(esp_wifi_remote_set_mode(WIFI_MODE_STA));
ESP_ERROR_CHECK(esp_wifi_remote_set_config(WIFI_IF_STA, &wifi_config));
ESP_ERROR_CHECK(esp_wifi_remote_start());
ESP_LOGI(TAG_remote, "wifi_init_remote_sta finished.");
/* Waiting until either the connection is established the same way for REMOTE wifi */
EventBits_t bits = xEventGroupWaitBits(s_wifi_event_group, WIFI_REMOTE_BITS, pdFALSE, pdFALSE, portMAX_DELAY);
if (bits & WIFI_REMOTE_CONNECTED_BIT) {
ESP_LOGI(TAG_remote, "connected to ap SSID:%s", CONFIG_ESP_WIFI_REMOTE_SSID);
} else if (bits & WIFI_REMOTE_FAIL_BIT) {
ESP_LOGW(TAG_remote, "Failed to connect to SSID:%s", CONFIG_ESP_WIFI_REMOTE_SSID);
} else {
ESP_LOGE(TAG_remote, "UNEXPECTED EVENT");
}
}
void app_main(void)
{
//Initialize NVS
esp_err_t ret = nvs_flash_init();
if (ret == ESP_ERR_NVS_NO_FREE_PAGES || ret == ESP_ERR_NVS_NEW_VERSION_FOUND) {
ESP_ERROR_CHECK(nvs_flash_erase());
ret = nvs_flash_init();
}
ESP_ERROR_CHECK(ret);
init_system_components();
wifi_init_sta();
wifi_init_remote_sta();
}

View File

@@ -0,0 +1 @@
CONFIG_IDF_TARGET="esp32s3"

View File

@@ -0,0 +1 @@
CONFIG_ESP_WIFI_REMOTE_LIBRARY_EPPP=y

View File

@@ -0,0 +1,16 @@
dependencies:
espressif/eppp_link:
version: '>=0.1'
espressif/esp_hosted:
rules:
- if: target in [esp32h2, esp32p4]
version: '>=0.0.6'
idf:
version: '>=5.3'
description: Utility wrapper for esp_wifi functionality on remote targets
repository: git://github.com/espressif/esp-wifi-remote.git
repository_info:
commit_sha: a2e11562a1debbde8effd4b2d0c323ec53c9fd8a
path: components/esp_wifi_remote
url: https://github.com/espressif/esp-wifi-remote
version: 0.12.1

View File

@@ -0,0 +1,19 @@
# This file is auto-generated
choice SLAVE_IDF_TARGET
prompt "choose slave target"
default SLAVE_IDF_TARGET_ESP32C6 if IDF_TARGET_ESP32P4 # To support common use-cases
default SLAVE_IDF_TARGET_ESP32
config SLAVE_IDF_TARGET_ESP32
bool "esp32"
config SLAVE_IDF_TARGET_ESP32S2
bool "esp32s2"
config SLAVE_IDF_TARGET_ESP32C3
bool "esp32c3"
config SLAVE_IDF_TARGET_ESP32S3
bool "esp32s3"
config SLAVE_IDF_TARGET_ESP32C2
bool "esp32c2"
config SLAVE_IDF_TARGET_ESP32C6
bool "esp32c6"
endchoice

View File

@@ -0,0 +1,265 @@
# This file is auto-generated
if SLAVE_IDF_TARGET_ESP32
config SLAVE_SOC_WIFI_SUPPORTED # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_WAPI_SUPPORT # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_CSI_SUPPORT # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_MESH_SUPPORT # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_SUPPORT_VARIABLE_BEACON_WINDOW # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_NAN_SUPPORT # ignore: multiple-definition
bool
default y
config SLAVE_IDF_TARGET_ARCH_XTENSA # ignore: multiple-definition
bool
default y
endif # ESP32
if SLAVE_IDF_TARGET_ESP32S2
config SLAVE_SOC_WIFI_SUPPORTED # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_LIGHT_SLEEP_CLK_WIDTH # ignore: multiple-definition
int
default 12
config SLAVE_SOC_WIFI_HW_TSF # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_FTM_SUPPORT # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_WAPI_SUPPORT # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_CSI_SUPPORT # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_MESH_SUPPORT # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_SUPPORT_VARIABLE_BEACON_WINDOW # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_NAN_SUPPORT # ignore: multiple-definition
bool
default y
config SLAVE_FREERTOS_UNICORE # ignore: multiple-definition
bool
default y
config SLAVE_IDF_TARGET_ARCH_XTENSA # ignore: multiple-definition
bool
default y
endif # ESP32S2
if SLAVE_IDF_TARGET_ESP32C3
config SLAVE_SOC_WIFI_SUPPORTED # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_LIGHT_SLEEP_CLK_WIDTH # ignore: multiple-definition
int
default 12
config SLAVE_SOC_WIFI_HW_TSF # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_FTM_SUPPORT # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_GCMP_SUPPORT # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_WAPI_SUPPORT # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_CSI_SUPPORT # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_MESH_SUPPORT # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_SUPPORT_VARIABLE_BEACON_WINDOW # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_PHY_NEEDS_USB_WORKAROUND # ignore: multiple-definition
bool
default y
config SLAVE_FREERTOS_UNICORE # ignore: multiple-definition
bool
default y
config SLAVE_IDF_TARGET_ARCH_RISCV # ignore: multiple-definition
bool
default y
endif # ESP32C3
if SLAVE_IDF_TARGET_ESP32S3
config SLAVE_SOC_WIFI_SUPPORTED # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_LIGHT_SLEEP_CLK_WIDTH # ignore: multiple-definition
int
default 12
config SLAVE_SOC_WIFI_HW_TSF # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_FTM_SUPPORT # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_GCMP_SUPPORT # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_WAPI_SUPPORT # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_CSI_SUPPORT # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_MESH_SUPPORT # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_SUPPORT_VARIABLE_BEACON_WINDOW # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_PHY_NEEDS_USB_WORKAROUND # ignore: multiple-definition
bool
default y
config SLAVE_IDF_TARGET_ARCH_XTENSA # ignore: multiple-definition
bool
default y
endif # ESP32S3
if SLAVE_IDF_TARGET_ESP32C2
config SLAVE_SOC_WIFI_SUPPORTED # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_LIGHT_SLEEP_CLK_WIDTH # ignore: multiple-definition
int
default 12
config SLAVE_SOC_WIFI_HW_TSF # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_FTM_SUPPORT # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_SUPPORT_VARIABLE_BEACON_WINDOW # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_PHY_NEEDS_USB_WORKAROUND # ignore: multiple-definition
bool
default y
config SLAVE_FREERTOS_UNICORE # ignore: multiple-definition
bool
default y
config SLAVE_IDF_TARGET_ARCH_RISCV # ignore: multiple-definition
bool
default y
endif # ESP32C2
if SLAVE_IDF_TARGET_ESP32C6
config SLAVE_SOC_WIFI_SUPPORTED # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_LIGHT_SLEEP_CLK_WIDTH # ignore: multiple-definition
int
default 12
config SLAVE_SOC_WIFI_HW_TSF # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_FTM_SUPPORT # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_GCMP_SUPPORT # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_WAPI_SUPPORT # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_CSI_SUPPORT # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_MESH_SUPPORT # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_HE_SUPPORT # ignore: multiple-definition
bool
default y
config SLAVE_FREERTOS_UNICORE # ignore: multiple-definition
bool
default y
config SLAVE_IDF_TARGET_ARCH_RISCV # ignore: multiple-definition
bool
default y
endif # ESP32C6

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,392 @@
/*
* SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
// This file is auto-generated
#include "esp_wifi_remote.h"
#include "esp_log.h"
#define WEAK __attribute__((weak))
#define LOG_UNSUPPORTED_AND_RETURN(ret) ESP_LOGW("esp_wifi_remote_weak", "%s unsupported", __func__); \
return ret;
WEAK esp_err_t esp_wifi_remote_init(const wifi_init_config_t *config)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_deinit(void)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_set_mode(wifi_mode_t mode)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_get_mode(wifi_mode_t *mode)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_start(void)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_stop(void)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_restore(void)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_connect(void)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_disconnect(void)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_clear_fast_connect(void)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_deauth_sta(uint16_t aid)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_scan_start(const wifi_scan_config_t *config, _Bool block)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_set_scan_parameters(const wifi_scan_default_params_t *config)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_get_scan_parameters(wifi_scan_default_params_t *config)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_scan_stop(void)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_scan_get_ap_num(uint16_t *number)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_scan_get_ap_records(uint16_t *number, wifi_ap_record_t *ap_records)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_scan_get_ap_record(wifi_ap_record_t *ap_record)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_clear_ap_list(void)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_sta_get_ap_info(wifi_ap_record_t *ap_info)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_set_ps(wifi_ps_type_t type)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_get_ps(wifi_ps_type_t *type)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_set_protocol(wifi_interface_t ifx, uint8_t protocol_bitmap)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_get_protocol(wifi_interface_t ifx, uint8_t *protocol_bitmap)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_set_bandwidth(wifi_interface_t ifx, wifi_bandwidth_t bw)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_get_bandwidth(wifi_interface_t ifx, wifi_bandwidth_t *bw)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_set_channel(uint8_t primary, wifi_second_chan_t second)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_get_channel(uint8_t *primary, wifi_second_chan_t *second)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_set_country(const wifi_country_t *country)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_get_country(wifi_country_t *country)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_set_mac(wifi_interface_t ifx, const uint8_t mac[6])
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_get_mac(wifi_interface_t ifx, uint8_t mac[6])
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_set_promiscuous_rx_cb(wifi_promiscuous_cb_t cb)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_set_promiscuous(_Bool en)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_get_promiscuous(_Bool *en)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_set_promiscuous_filter(const wifi_promiscuous_filter_t *filter)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_get_promiscuous_filter(wifi_promiscuous_filter_t *filter)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_set_promiscuous_ctrl_filter(const wifi_promiscuous_filter_t *filter)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_get_promiscuous_ctrl_filter(wifi_promiscuous_filter_t *filter)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_set_config(wifi_interface_t interface, wifi_config_t *conf)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_get_config(wifi_interface_t interface, wifi_config_t *conf)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_ap_get_sta_list(wifi_sta_list_t *sta)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_ap_get_sta_aid(const uint8_t mac[6], uint16_t *aid)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_set_storage(wifi_storage_t storage)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_set_vendor_ie(_Bool enable, wifi_vendor_ie_type_t type, wifi_vendor_ie_id_t idx, const void *vnd_ie)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_set_vendor_ie_cb(esp_vendor_ie_cb_t cb, void *ctx)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_set_max_tx_power(int8_t power)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_get_max_tx_power(int8_t *power)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_set_event_mask(uint32_t mask)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_get_event_mask(uint32_t *mask)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_80211_tx(wifi_interface_t ifx, const void *buffer, int len, _Bool en_sys_seq)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_set_csi_rx_cb(wifi_csi_cb_t cb, void *ctx)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_set_csi_config(const wifi_csi_config_t *config)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_get_csi_config(wifi_csi_config_t *config)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_set_csi(_Bool en)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK int64_t esp_wifi_remote_get_tsf_time(wifi_interface_t interface)
{
LOG_UNSUPPORTED_AND_RETURN(-1);
}
WEAK esp_err_t esp_wifi_remote_set_inactive_time(wifi_interface_t ifx, uint16_t sec)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_get_inactive_time(wifi_interface_t ifx, uint16_t *sec)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_statis_dump(uint32_t modules)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_set_rssi_threshold(int32_t rssi)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_ftm_initiate_session(wifi_ftm_initiator_cfg_t *cfg)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_ftm_end_session(void)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_ftm_resp_set_offset(int16_t offset_cm)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_ftm_get_report(wifi_ftm_report_entry_t *report, uint8_t num_entries)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_config_11b_rate(wifi_interface_t ifx, _Bool disable)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_connectionless_module_set_wake_interval(uint16_t wake_interval)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_force_wakeup_acquire(void)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_force_wakeup_release(void)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_set_country_code(const char *country, _Bool ieee80211d_enabled)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_get_country_code(char *country)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_config_80211_tx_rate(wifi_interface_t ifx, wifi_phy_rate_t rate)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_disable_pmf_config(wifi_interface_t ifx)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_sta_get_aid(uint16_t *aid)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_sta_get_negotiated_phymode(wifi_phy_mode_t *phymode)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_set_dynamic_cs(_Bool enabled)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_sta_get_rssi(int *rssi)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}

View File

@@ -0,0 +1,388 @@
/*
* SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
// This file is auto-generated
#include "esp_wifi.h"
#include "esp_wifi_remote.h"
esp_err_t esp_wifi_init(const wifi_init_config_t *config)
{
return esp_wifi_remote_init(config);
}
esp_err_t esp_wifi_deinit(void)
{
return esp_wifi_remote_deinit();
}
esp_err_t esp_wifi_set_mode(wifi_mode_t mode)
{
return esp_wifi_remote_set_mode(mode);
}
esp_err_t esp_wifi_get_mode(wifi_mode_t *mode)
{
return esp_wifi_remote_get_mode(mode);
}
esp_err_t esp_wifi_start(void)
{
return esp_wifi_remote_start();
}
esp_err_t esp_wifi_stop(void)
{
return esp_wifi_remote_stop();
}
esp_err_t esp_wifi_restore(void)
{
return esp_wifi_remote_restore();
}
esp_err_t esp_wifi_connect(void)
{
return esp_wifi_remote_connect();
}
esp_err_t esp_wifi_disconnect(void)
{
return esp_wifi_remote_disconnect();
}
esp_err_t esp_wifi_clear_fast_connect(void)
{
return esp_wifi_remote_clear_fast_connect();
}
esp_err_t esp_wifi_deauth_sta(uint16_t aid)
{
return esp_wifi_remote_deauth_sta(aid);
}
esp_err_t esp_wifi_scan_start(const wifi_scan_config_t *config, _Bool block)
{
return esp_wifi_remote_scan_start(config, block);
}
esp_err_t esp_wifi_set_scan_parameters(const wifi_scan_default_params_t *config)
{
return esp_wifi_remote_set_scan_parameters(config);
}
esp_err_t esp_wifi_get_scan_parameters(wifi_scan_default_params_t *config)
{
return esp_wifi_remote_get_scan_parameters(config);
}
esp_err_t esp_wifi_scan_stop(void)
{
return esp_wifi_remote_scan_stop();
}
esp_err_t esp_wifi_scan_get_ap_num(uint16_t *number)
{
return esp_wifi_remote_scan_get_ap_num(number);
}
esp_err_t esp_wifi_scan_get_ap_records(uint16_t *number, wifi_ap_record_t *ap_records)
{
return esp_wifi_remote_scan_get_ap_records(number, ap_records);
}
esp_err_t esp_wifi_scan_get_ap_record(wifi_ap_record_t *ap_record)
{
return esp_wifi_remote_scan_get_ap_record(ap_record);
}
esp_err_t esp_wifi_clear_ap_list(void)
{
return esp_wifi_remote_clear_ap_list();
}
esp_err_t esp_wifi_sta_get_ap_info(wifi_ap_record_t *ap_info)
{
return esp_wifi_remote_sta_get_ap_info(ap_info);
}
esp_err_t esp_wifi_set_ps(wifi_ps_type_t type)
{
return esp_wifi_remote_set_ps(type);
}
esp_err_t esp_wifi_get_ps(wifi_ps_type_t *type)
{
return esp_wifi_remote_get_ps(type);
}
esp_err_t esp_wifi_set_protocol(wifi_interface_t ifx, uint8_t protocol_bitmap)
{
return esp_wifi_remote_set_protocol(ifx, protocol_bitmap);
}
esp_err_t esp_wifi_get_protocol(wifi_interface_t ifx, uint8_t *protocol_bitmap)
{
return esp_wifi_remote_get_protocol(ifx, protocol_bitmap);
}
esp_err_t esp_wifi_set_bandwidth(wifi_interface_t ifx, wifi_bandwidth_t bw)
{
return esp_wifi_remote_set_bandwidth(ifx, bw);
}
esp_err_t esp_wifi_get_bandwidth(wifi_interface_t ifx, wifi_bandwidth_t *bw)
{
return esp_wifi_remote_get_bandwidth(ifx, bw);
}
esp_err_t esp_wifi_set_channel(uint8_t primary, wifi_second_chan_t second)
{
return esp_wifi_remote_set_channel(primary, second);
}
esp_err_t esp_wifi_get_channel(uint8_t *primary, wifi_second_chan_t *second)
{
return esp_wifi_remote_get_channel(primary, second);
}
esp_err_t esp_wifi_set_country(const wifi_country_t *country)
{
return esp_wifi_remote_set_country(country);
}
esp_err_t esp_wifi_get_country(wifi_country_t *country)
{
return esp_wifi_remote_get_country(country);
}
esp_err_t esp_wifi_set_mac(wifi_interface_t ifx, const uint8_t mac[6])
{
return esp_wifi_remote_set_mac(ifx, mac);
}
esp_err_t esp_wifi_get_mac(wifi_interface_t ifx, uint8_t mac[6])
{
return esp_wifi_remote_get_mac(ifx, mac);
}
esp_err_t esp_wifi_set_promiscuous_rx_cb(wifi_promiscuous_cb_t cb)
{
return esp_wifi_remote_set_promiscuous_rx_cb(cb);
}
esp_err_t esp_wifi_set_promiscuous(_Bool en)
{
return esp_wifi_remote_set_promiscuous(en);
}
esp_err_t esp_wifi_get_promiscuous(_Bool *en)
{
return esp_wifi_remote_get_promiscuous(en);
}
esp_err_t esp_wifi_set_promiscuous_filter(const wifi_promiscuous_filter_t *filter)
{
return esp_wifi_remote_set_promiscuous_filter(filter);
}
esp_err_t esp_wifi_get_promiscuous_filter(wifi_promiscuous_filter_t *filter)
{
return esp_wifi_remote_get_promiscuous_filter(filter);
}
esp_err_t esp_wifi_set_promiscuous_ctrl_filter(const wifi_promiscuous_filter_t *filter)
{
return esp_wifi_remote_set_promiscuous_ctrl_filter(filter);
}
esp_err_t esp_wifi_get_promiscuous_ctrl_filter(wifi_promiscuous_filter_t *filter)
{
return esp_wifi_remote_get_promiscuous_ctrl_filter(filter);
}
esp_err_t esp_wifi_set_config(wifi_interface_t interface, wifi_config_t *conf)
{
return esp_wifi_remote_set_config(interface, conf);
}
esp_err_t esp_wifi_get_config(wifi_interface_t interface, wifi_config_t *conf)
{
return esp_wifi_remote_get_config(interface, conf);
}
esp_err_t esp_wifi_ap_get_sta_list(wifi_sta_list_t *sta)
{
return esp_wifi_remote_ap_get_sta_list(sta);
}
esp_err_t esp_wifi_ap_get_sta_aid(const uint8_t mac[6], uint16_t *aid)
{
return esp_wifi_remote_ap_get_sta_aid(mac, aid);
}
esp_err_t esp_wifi_set_storage(wifi_storage_t storage)
{
return esp_wifi_remote_set_storage(storage);
}
esp_err_t esp_wifi_set_vendor_ie(_Bool enable, wifi_vendor_ie_type_t type, wifi_vendor_ie_id_t idx, const void *vnd_ie)
{
return esp_wifi_remote_set_vendor_ie(enable, type, idx, vnd_ie);
}
esp_err_t esp_wifi_set_vendor_ie_cb(esp_vendor_ie_cb_t cb, void *ctx)
{
return esp_wifi_remote_set_vendor_ie_cb(cb, ctx);
}
esp_err_t esp_wifi_set_max_tx_power(int8_t power)
{
return esp_wifi_remote_set_max_tx_power(power);
}
esp_err_t esp_wifi_get_max_tx_power(int8_t *power)
{
return esp_wifi_remote_get_max_tx_power(power);
}
esp_err_t esp_wifi_set_event_mask(uint32_t mask)
{
return esp_wifi_remote_set_event_mask(mask);
}
esp_err_t esp_wifi_get_event_mask(uint32_t *mask)
{
return esp_wifi_remote_get_event_mask(mask);
}
esp_err_t esp_wifi_80211_tx(wifi_interface_t ifx, const void *buffer, int len, _Bool en_sys_seq)
{
return esp_wifi_remote_80211_tx(ifx, buffer, len, en_sys_seq);
}
esp_err_t esp_wifi_set_csi_rx_cb(wifi_csi_cb_t cb, void *ctx)
{
return esp_wifi_remote_set_csi_rx_cb(cb, ctx);
}
esp_err_t esp_wifi_set_csi_config(const wifi_csi_config_t *config)
{
return esp_wifi_remote_set_csi_config(config);
}
esp_err_t esp_wifi_get_csi_config(wifi_csi_config_t *config)
{
return esp_wifi_remote_get_csi_config(config);
}
esp_err_t esp_wifi_set_csi(_Bool en)
{
return esp_wifi_remote_set_csi(en);
}
int64_t esp_wifi_get_tsf_time(wifi_interface_t interface)
{
return esp_wifi_remote_get_tsf_time(interface);
}
esp_err_t esp_wifi_set_inactive_time(wifi_interface_t ifx, uint16_t sec)
{
return esp_wifi_remote_set_inactive_time(ifx, sec);
}
esp_err_t esp_wifi_get_inactive_time(wifi_interface_t ifx, uint16_t *sec)
{
return esp_wifi_remote_get_inactive_time(ifx, sec);
}
esp_err_t esp_wifi_statis_dump(uint32_t modules)
{
return esp_wifi_remote_statis_dump(modules);
}
esp_err_t esp_wifi_set_rssi_threshold(int32_t rssi)
{
return esp_wifi_remote_set_rssi_threshold(rssi);
}
esp_err_t esp_wifi_ftm_initiate_session(wifi_ftm_initiator_cfg_t *cfg)
{
return esp_wifi_remote_ftm_initiate_session(cfg);
}
esp_err_t esp_wifi_ftm_end_session(void)
{
return esp_wifi_remote_ftm_end_session();
}
esp_err_t esp_wifi_ftm_resp_set_offset(int16_t offset_cm)
{
return esp_wifi_remote_ftm_resp_set_offset(offset_cm);
}
esp_err_t esp_wifi_ftm_get_report(wifi_ftm_report_entry_t *report, uint8_t num_entries)
{
return esp_wifi_remote_ftm_get_report(report, num_entries);
}
esp_err_t esp_wifi_config_11b_rate(wifi_interface_t ifx, _Bool disable)
{
return esp_wifi_remote_config_11b_rate(ifx, disable);
}
esp_err_t esp_wifi_connectionless_module_set_wake_interval(uint16_t wake_interval)
{
return esp_wifi_remote_connectionless_module_set_wake_interval(wake_interval);
}
esp_err_t esp_wifi_force_wakeup_acquire(void)
{
return esp_wifi_remote_force_wakeup_acquire();
}
esp_err_t esp_wifi_force_wakeup_release(void)
{
return esp_wifi_remote_force_wakeup_release();
}
esp_err_t esp_wifi_set_country_code(const char *country, _Bool ieee80211d_enabled)
{
return esp_wifi_remote_set_country_code(country, ieee80211d_enabled);
}
esp_err_t esp_wifi_get_country_code(char *country)
{
return esp_wifi_remote_get_country_code(country);
}
esp_err_t esp_wifi_config_80211_tx_rate(wifi_interface_t ifx, wifi_phy_rate_t rate)
{
return esp_wifi_remote_config_80211_tx_rate(ifx, rate);
}
esp_err_t esp_wifi_disable_pmf_config(wifi_interface_t ifx)
{
return esp_wifi_remote_disable_pmf_config(ifx);
}
esp_err_t esp_wifi_sta_get_aid(uint16_t *aid)
{
return esp_wifi_remote_sta_get_aid(aid);
}
esp_err_t esp_wifi_sta_get_negotiated_phymode(wifi_phy_mode_t *phymode)
{
return esp_wifi_remote_sta_get_negotiated_phymode(phymode);
}
esp_err_t esp_wifi_set_dynamic_cs(_Bool enabled)
{
return esp_wifi_remote_set_dynamic_cs(enabled);
}
esp_err_t esp_wifi_sta_get_rssi(int *rssi)
{
return esp_wifi_remote_sta_get_rssi(rssi);
}

View File

@@ -0,0 +1,769 @@
/*
* SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
// This file is auto-generated
#pragma once
#if CONFIG_SLAVE_IDF_TARGET_ESP32
#define CONFIG_ESP_WIFI_REMOTE_ENABLED 1
#define CONFIG_SLAVE_IDF_TARGET_ESP32 1
#define CONFIG_SLAVE_SOC_WIFI_SUPPORTED 1
#define CONFIG_SLAVE_SOC_WIFI_WAPI_SUPPORT 1
#define CONFIG_SLAVE_SOC_WIFI_CSI_SUPPORT 1
#define CONFIG_SLAVE_SOC_WIFI_MESH_SUPPORT 1
#define CONFIG_SLAVE_SOC_WIFI_SUPPORT_VARIABLE_BEACON_WINDOW 1
#define CONFIG_SLAVE_SOC_WIFI_NAN_SUPPORT 1
#define CONFIG_SLAVE_IDF_TARGET_ARCH_XTENSA 1
#define CONFIG_ESP_WIFI_REMOTE_LIBRARY_HOSTED 1
#define CONFIG_WIFI_RMT_STATIC_RX_BUFFER_NUM 10
#define CONFIG_WIFI_RMT_DYNAMIC_RX_BUFFER_NUM 32
#define CONFIG_WIFI_RMT_DYNAMIC_TX_BUFFER 1
#define CONFIG_WIFI_RMT_TX_BUFFER_TYPE 1
#define CONFIG_WIFI_RMT_DYNAMIC_TX_BUFFER_NUM 32
#define CONFIG_WIFI_RMT_STATIC_RX_MGMT_BUFFER 1
#define CONFIG_WIFI_RMT_DYNAMIC_RX_MGMT_BUF 0
#define CONFIG_WIFI_RMT_RX_MGMT_BUF_NUM_DEF 5
#define CONFIG_WIFI_RMT_AMPDU_TX_ENABLED 1
#define CONFIG_WIFI_RMT_TX_BA_WIN 6
#define CONFIG_WIFI_RMT_AMPDU_RX_ENABLED 1
#define CONFIG_WIFI_RMT_RX_BA_WIN 6
#define CONFIG_WIFI_RMT_NVS_ENABLED 1
#define CONFIG_WIFI_RMT_TASK_PINNED_TO_CORE_0 1
#define CONFIG_WIFI_RMT_SOFTAP_BEACON_MAX_LEN 752
#define CONFIG_WIFI_RMT_MGMT_SBUF_NUM 32
#define CONFIG_WIFI_RMT_IRAM_OPT 1
#define CONFIG_WIFI_RMT_RX_IRAM_OPT 1
#define CONFIG_WIFI_RMT_ENABLE_WPA3_SAE 1
#define CONFIG_WIFI_RMT_ENABLE_SAE_PK 1
#define CONFIG_WIFI_RMT_SOFTAP_SAE_SUPPORT 1
#define CONFIG_WIFI_RMT_ENABLE_WPA3_OWE_STA 1
#define CONFIG_WIFI_RMT_SLP_DEFAULT_MIN_ACTIVE_TIME 50
#define CONFIG_WIFI_RMT_SLP_DEFAULT_MAX_ACTIVE_TIME 10
#define CONFIG_WIFI_RMT_SLP_DEFAULT_WAIT_BROADCAST_DATA_TIME 15
#define CONFIG_WIFI_RMT_STA_DISCONNECTED_PM_ENABLE 1
#define CONFIG_WIFI_RMT_GMAC_SUPPORT 1
#define CONFIG_WIFI_RMT_SOFTAP_SUPPORT 1
#define CONFIG_WIFI_RMT_ESPNOW_MAX_ENCRYPT_NUM 7
#define CONFIG_WIFI_RMT_MBEDTLS_CRYPTO 1
#define CONFIG_WIFI_RMT_MBEDTLS_TLS_CLIENT 1
#define CONFIG_WIFI_RMT_ENTERPRISE_SUPPORT 1
#define CONFIG_ESP_WIFI_STATIC_RX_BUFFER_NUM 10
#define CONFIG_ESP_WIFI_DYNAMIC_RX_BUFFER_NUM 32
#define CONFIG_ESP_WIFI_TX_BUFFER_TYPE 1
#define CONFIG_ESP_WIFI_DYNAMIC_TX_BUFFER_NUM 32
#define CONFIG_ESP_WIFI_DYNAMIC_RX_MGMT_BUF 0
#define CONFIG_ESP_WIFI_RX_MGMT_BUF_NUM_DEF 5
#define CONFIG_ESP_WIFI_AMPDU_TX_ENABLED 1
#define CONFIG_ESP_WIFI_TX_BA_WIN 6
#define CONFIG_ESP_WIFI_AMPDU_RX_ENABLED 1
#define CONFIG_ESP_WIFI_RX_BA_WIN 6
#define CONFIG_ESP_WIFI_NVS_ENABLED 1
#define CONFIG_ESP_WIFI_SOFTAP_BEACON_MAX_LEN 752
#define CONFIG_ESP_WIFI_MGMT_SBUF_NUM 32
#define CONFIG_ESP_WIFI_IRAM_OPT 1
#define CONFIG_ESP_WIFI_RX_IRAM_OPT 1
#define CONFIG_ESP_WIFI_ENABLE_WPA3_SAE 1
#define CONFIG_ESP_WIFI_ENABLE_SAE_PK 1
#define CONFIG_ESP_WIFI_SOFTAP_SAE_SUPPORT 1
#define CONFIG_ESP_WIFI_ENABLE_WPA3_OWE_STA 1
#define CONFIG_ESP_WIFI_SLP_DEFAULT_MIN_ACTIVE_TIME 50
#define CONFIG_ESP_WIFI_SLP_DEFAULT_MAX_ACTIVE_TIME 10
#define CONFIG_ESP_WIFI_SLP_DEFAULT_WAIT_BROADCAST_DATA_TIME 15
#define CONFIG_ESP_WIFI_STA_DISCONNECTED_PM_ENABLE 1
#define CONFIG_ESP_WIFI_GMAC_SUPPORT 1
#define CONFIG_ESP_WIFI_SOFTAP_SUPPORT 1
#define CONFIG_ESP_WIFI_ESPNOW_MAX_ENCRYPT_NUM 7
#define CONFIG_ESP_WIFI_MBEDTLS_CRYPTO 1
#define CONFIG_ESP_WIFI_MBEDTLS_TLS_CLIENT 1
#define CONFIG_ESP_WIFI_ENTERPRISE_SUPPORT 1
#endif // CONFIG_SLAVE_IDF_TARGET_ESP32
#if CONFIG_SLAVE_IDF_TARGET_ESP32S2
#define CONFIG_ESP_WIFI_REMOTE_ENABLED 1
#define CONFIG_SLAVE_IDF_TARGET_ESP32S2 1
#define CONFIG_SLAVE_SOC_WIFI_SUPPORTED 1
#define CONFIG_SLAVE_SOC_WIFI_WAPI_SUPPORT 1
#define CONFIG_SLAVE_SOC_WIFI_CSI_SUPPORT 1
#define CONFIG_SLAVE_SOC_WIFI_MESH_SUPPORT 1
#define CONFIG_SLAVE_SOC_WIFI_SUPPORT_VARIABLE_BEACON_WINDOW 1
#define CONFIG_SLAVE_SOC_WIFI_NAN_SUPPORT 1
#define CONFIG_SLAVE_IDF_TARGET_ARCH_XTENSA 1
#define CONFIG_SLAVE_SOC_WIFI_LIGHT_SLEEP_CLK_WIDTH 12
#define CONFIG_SLAVE_SOC_WIFI_HW_TSF 1
#define CONFIG_SLAVE_SOC_WIFI_FTM_SUPPORT 1
#define CONFIG_SLAVE_FREERTOS_UNICORE 1
#define CONFIG_ESP_WIFI_REMOTE_LIBRARY_HOSTED 1
#define CONFIG_WIFI_RMT_STATIC_RX_BUFFER_NUM 10
#define CONFIG_WIFI_RMT_DYNAMIC_RX_BUFFER_NUM 32
#define CONFIG_WIFI_RMT_DYNAMIC_TX_BUFFER 1
#define CONFIG_WIFI_RMT_TX_BUFFER_TYPE 1
#define CONFIG_WIFI_RMT_DYNAMIC_TX_BUFFER_NUM 32
#define CONFIG_WIFI_RMT_STATIC_RX_MGMT_BUFFER 1
#define CONFIG_WIFI_RMT_DYNAMIC_RX_MGMT_BUF 0
#define CONFIG_WIFI_RMT_RX_MGMT_BUF_NUM_DEF 5
#define CONFIG_WIFI_RMT_AMPDU_TX_ENABLED 1
#define CONFIG_WIFI_RMT_TX_BA_WIN 6
#define CONFIG_WIFI_RMT_AMPDU_RX_ENABLED 1
#define CONFIG_WIFI_RMT_RX_BA_WIN 6
#define CONFIG_WIFI_RMT_NVS_ENABLED 1
#define CONFIG_WIFI_RMT_SOFTAP_BEACON_MAX_LEN 752
#define CONFIG_WIFI_RMT_MGMT_SBUF_NUM 32
#define CONFIG_WIFI_RMT_IRAM_OPT 1
#define CONFIG_WIFI_RMT_RX_IRAM_OPT 1
#define CONFIG_WIFI_RMT_ENABLE_WPA3_SAE 1
#define CONFIG_WIFI_RMT_ENABLE_SAE_PK 1
#define CONFIG_WIFI_RMT_SOFTAP_SAE_SUPPORT 1
#define CONFIG_WIFI_RMT_ENABLE_WPA3_OWE_STA 1
#define CONFIG_WIFI_RMT_SLP_DEFAULT_MIN_ACTIVE_TIME 50
#define CONFIG_WIFI_RMT_SLP_DEFAULT_MAX_ACTIVE_TIME 10
#define CONFIG_WIFI_RMT_SLP_DEFAULT_WAIT_BROADCAST_DATA_TIME 15
#define CONFIG_WIFI_RMT_STA_DISCONNECTED_PM_ENABLE 1
#define CONFIG_WIFI_RMT_GMAC_SUPPORT 1
#define CONFIG_WIFI_RMT_SOFTAP_SUPPORT 1
#define CONFIG_WIFI_RMT_ESPNOW_MAX_ENCRYPT_NUM 7
#define CONFIG_WIFI_RMT_MBEDTLS_CRYPTO 1
#define CONFIG_WIFI_RMT_MBEDTLS_TLS_CLIENT 1
#define CONFIG_WIFI_RMT_ENTERPRISE_SUPPORT 1
#define CONFIG_ESP_WIFI_STATIC_RX_BUFFER_NUM 10
#define CONFIG_ESP_WIFI_DYNAMIC_RX_BUFFER_NUM 32
#define CONFIG_ESP_WIFI_TX_BUFFER_TYPE 1
#define CONFIG_ESP_WIFI_DYNAMIC_TX_BUFFER_NUM 32
#define CONFIG_ESP_WIFI_DYNAMIC_RX_MGMT_BUF 0
#define CONFIG_ESP_WIFI_RX_MGMT_BUF_NUM_DEF 5
#define CONFIG_ESP_WIFI_AMPDU_TX_ENABLED 1
#define CONFIG_ESP_WIFI_TX_BA_WIN 6
#define CONFIG_ESP_WIFI_AMPDU_RX_ENABLED 1
#define CONFIG_ESP_WIFI_RX_BA_WIN 6
#define CONFIG_ESP_WIFI_NVS_ENABLED 1
#define CONFIG_ESP_WIFI_SOFTAP_BEACON_MAX_LEN 752
#define CONFIG_ESP_WIFI_MGMT_SBUF_NUM 32
#define CONFIG_ESP_WIFI_IRAM_OPT 1
#define CONFIG_ESP_WIFI_RX_IRAM_OPT 1
#define CONFIG_ESP_WIFI_ENABLE_WPA3_SAE 1
#define CONFIG_ESP_WIFI_ENABLE_SAE_PK 1
#define CONFIG_ESP_WIFI_SOFTAP_SAE_SUPPORT 1
#define CONFIG_ESP_WIFI_ENABLE_WPA3_OWE_STA 1
#define CONFIG_ESP_WIFI_SLP_DEFAULT_MIN_ACTIVE_TIME 50
#define CONFIG_ESP_WIFI_SLP_DEFAULT_MAX_ACTIVE_TIME 10
#define CONFIG_ESP_WIFI_SLP_DEFAULT_WAIT_BROADCAST_DATA_TIME 15
#define CONFIG_ESP_WIFI_STA_DISCONNECTED_PM_ENABLE 1
#define CONFIG_ESP_WIFI_GMAC_SUPPORT 1
#define CONFIG_ESP_WIFI_SOFTAP_SUPPORT 1
#define CONFIG_ESP_WIFI_ESPNOW_MAX_ENCRYPT_NUM 7
#define CONFIG_ESP_WIFI_MBEDTLS_CRYPTO 1
#define CONFIG_ESP_WIFI_MBEDTLS_TLS_CLIENT 1
#define CONFIG_ESP_WIFI_ENTERPRISE_SUPPORT 1
#endif // CONFIG_SLAVE_IDF_TARGET_ESP32S2
#if CONFIG_SLAVE_IDF_TARGET_ESP32C3
#define CONFIG_ESP_WIFI_REMOTE_ENABLED 1
#define CONFIG_SLAVE_IDF_TARGET_ESP32C3 1
#define CONFIG_SLAVE_SOC_WIFI_SUPPORTED 1
#define CONFIG_SLAVE_SOC_WIFI_WAPI_SUPPORT 1
#define CONFIG_SLAVE_SOC_WIFI_CSI_SUPPORT 1
#define CONFIG_SLAVE_SOC_WIFI_MESH_SUPPORT 1
#define CONFIG_SLAVE_SOC_WIFI_SUPPORT_VARIABLE_BEACON_WINDOW 1
#define CONFIG_SLAVE_SOC_WIFI_LIGHT_SLEEP_CLK_WIDTH 12
#define CONFIG_SLAVE_SOC_WIFI_HW_TSF 1
#define CONFIG_SLAVE_SOC_WIFI_FTM_SUPPORT 1
#define CONFIG_SLAVE_FREERTOS_UNICORE 1
#define CONFIG_SLAVE_SOC_WIFI_GCMP_SUPPORT 1
#define CONFIG_SLAVE_SOC_WIFI_PHY_NEEDS_USB_WORKAROUND 1
#define CONFIG_SLAVE_IDF_TARGET_ARCH_RISCV 1
#define CONFIG_ESP_WIFI_REMOTE_LIBRARY_HOSTED 1
#define CONFIG_WIFI_RMT_STATIC_RX_BUFFER_NUM 10
#define CONFIG_WIFI_RMT_DYNAMIC_RX_BUFFER_NUM 32
#define CONFIG_WIFI_RMT_DYNAMIC_TX_BUFFER 1
#define CONFIG_WIFI_RMT_TX_BUFFER_TYPE 1
#define CONFIG_WIFI_RMT_DYNAMIC_TX_BUFFER_NUM 32
#define CONFIG_WIFI_RMT_STATIC_RX_MGMT_BUFFER 1
#define CONFIG_WIFI_RMT_DYNAMIC_RX_MGMT_BUF 0
#define CONFIG_WIFI_RMT_RX_MGMT_BUF_NUM_DEF 5
#define CONFIG_WIFI_RMT_AMPDU_TX_ENABLED 1
#define CONFIG_WIFI_RMT_TX_BA_WIN 6
#define CONFIG_WIFI_RMT_AMPDU_RX_ENABLED 1
#define CONFIG_WIFI_RMT_RX_BA_WIN 6
#define CONFIG_WIFI_RMT_NVS_ENABLED 1
#define CONFIG_WIFI_RMT_SOFTAP_BEACON_MAX_LEN 752
#define CONFIG_WIFI_RMT_MGMT_SBUF_NUM 32
#define CONFIG_WIFI_RMT_IRAM_OPT 1
#define CONFIG_WIFI_RMT_RX_IRAM_OPT 1
#define CONFIG_WIFI_RMT_ENABLE_WPA3_SAE 1
#define CONFIG_WIFI_RMT_ENABLE_SAE_PK 1
#define CONFIG_WIFI_RMT_SOFTAP_SAE_SUPPORT 1
#define CONFIG_WIFI_RMT_ENABLE_WPA3_OWE_STA 1
#define CONFIG_WIFI_RMT_SLP_DEFAULT_MIN_ACTIVE_TIME 50
#define CONFIG_WIFI_RMT_SLP_DEFAULT_MAX_ACTIVE_TIME 10
#define CONFIG_WIFI_RMT_SLP_DEFAULT_WAIT_BROADCAST_DATA_TIME 15
#define CONFIG_WIFI_RMT_STA_DISCONNECTED_PM_ENABLE 1
#define CONFIG_WIFI_RMT_GMAC_SUPPORT 1
#define CONFIG_WIFI_RMT_SOFTAP_SUPPORT 1
#define CONFIG_WIFI_RMT_ESPNOW_MAX_ENCRYPT_NUM 7
#define CONFIG_WIFI_RMT_MBEDTLS_CRYPTO 1
#define CONFIG_WIFI_RMT_MBEDTLS_TLS_CLIENT 1
#define CONFIG_WIFI_RMT_ENTERPRISE_SUPPORT 1
#define CONFIG_ESP_WIFI_STATIC_RX_BUFFER_NUM 10
#define CONFIG_ESP_WIFI_DYNAMIC_RX_BUFFER_NUM 32
#define CONFIG_ESP_WIFI_TX_BUFFER_TYPE 1
#define CONFIG_ESP_WIFI_DYNAMIC_TX_BUFFER_NUM 32
#define CONFIG_ESP_WIFI_DYNAMIC_RX_MGMT_BUF 0
#define CONFIG_ESP_WIFI_RX_MGMT_BUF_NUM_DEF 5
#define CONFIG_ESP_WIFI_AMPDU_TX_ENABLED 1
#define CONFIG_ESP_WIFI_TX_BA_WIN 6
#define CONFIG_ESP_WIFI_AMPDU_RX_ENABLED 1
#define CONFIG_ESP_WIFI_RX_BA_WIN 6
#define CONFIG_ESP_WIFI_NVS_ENABLED 1
#define CONFIG_ESP_WIFI_SOFTAP_BEACON_MAX_LEN 752
#define CONFIG_ESP_WIFI_MGMT_SBUF_NUM 32
#define CONFIG_ESP_WIFI_IRAM_OPT 1
#define CONFIG_ESP_WIFI_RX_IRAM_OPT 1
#define CONFIG_ESP_WIFI_ENABLE_WPA3_SAE 1
#define CONFIG_ESP_WIFI_ENABLE_SAE_PK 1
#define CONFIG_ESP_WIFI_SOFTAP_SAE_SUPPORT 1
#define CONFIG_ESP_WIFI_ENABLE_WPA3_OWE_STA 1
#define CONFIG_ESP_WIFI_SLP_DEFAULT_MIN_ACTIVE_TIME 50
#define CONFIG_ESP_WIFI_SLP_DEFAULT_MAX_ACTIVE_TIME 10
#define CONFIG_ESP_WIFI_SLP_DEFAULT_WAIT_BROADCAST_DATA_TIME 15
#define CONFIG_ESP_WIFI_STA_DISCONNECTED_PM_ENABLE 1
#define CONFIG_ESP_WIFI_GMAC_SUPPORT 1
#define CONFIG_ESP_WIFI_SOFTAP_SUPPORT 1
#define CONFIG_ESP_WIFI_ESPNOW_MAX_ENCRYPT_NUM 7
#define CONFIG_ESP_WIFI_MBEDTLS_CRYPTO 1
#define CONFIG_ESP_WIFI_MBEDTLS_TLS_CLIENT 1
#define CONFIG_ESP_WIFI_ENTERPRISE_SUPPORT 1
#endif // CONFIG_SLAVE_IDF_TARGET_ESP32C3
#if CONFIG_SLAVE_IDF_TARGET_ESP32S3
#define CONFIG_ESP_WIFI_REMOTE_ENABLED 1
#define CONFIG_SLAVE_IDF_TARGET_ESP32S3 1
#define CONFIG_SLAVE_SOC_WIFI_SUPPORTED 1
#define CONFIG_SLAVE_SOC_WIFI_WAPI_SUPPORT 1
#define CONFIG_SLAVE_SOC_WIFI_CSI_SUPPORT 1
#define CONFIG_SLAVE_SOC_WIFI_MESH_SUPPORT 1
#define CONFIG_SLAVE_SOC_WIFI_SUPPORT_VARIABLE_BEACON_WINDOW 1
#define CONFIG_SLAVE_IDF_TARGET_ARCH_XTENSA 1
#define CONFIG_SLAVE_SOC_WIFI_LIGHT_SLEEP_CLK_WIDTH 12
#define CONFIG_SLAVE_SOC_WIFI_HW_TSF 1
#define CONFIG_SLAVE_SOC_WIFI_FTM_SUPPORT 1
#define CONFIG_SLAVE_SOC_WIFI_GCMP_SUPPORT 1
#define CONFIG_SLAVE_SOC_WIFI_PHY_NEEDS_USB_WORKAROUND 1
#define CONFIG_ESP_WIFI_REMOTE_LIBRARY_HOSTED 1
#define CONFIG_WIFI_RMT_STATIC_RX_BUFFER_NUM 10
#define CONFIG_WIFI_RMT_DYNAMIC_RX_BUFFER_NUM 32
#define CONFIG_WIFI_RMT_DYNAMIC_TX_BUFFER 1
#define CONFIG_WIFI_RMT_TX_BUFFER_TYPE 1
#define CONFIG_WIFI_RMT_DYNAMIC_TX_BUFFER_NUM 32
#define CONFIG_WIFI_RMT_STATIC_RX_MGMT_BUFFER 1
#define CONFIG_WIFI_RMT_DYNAMIC_RX_MGMT_BUF 0
#define CONFIG_WIFI_RMT_RX_MGMT_BUF_NUM_DEF 5
#define CONFIG_WIFI_RMT_AMPDU_TX_ENABLED 1
#define CONFIG_WIFI_RMT_TX_BA_WIN 6
#define CONFIG_WIFI_RMT_AMPDU_RX_ENABLED 1
#define CONFIG_WIFI_RMT_RX_BA_WIN 6
#define CONFIG_WIFI_RMT_NVS_ENABLED 1
#define CONFIG_WIFI_RMT_TASK_PINNED_TO_CORE_0 1
#define CONFIG_WIFI_RMT_SOFTAP_BEACON_MAX_LEN 752
#define CONFIG_WIFI_RMT_MGMT_SBUF_NUM 32
#define CONFIG_WIFI_RMT_IRAM_OPT 1
#define CONFIG_WIFI_RMT_RX_IRAM_OPT 1
#define CONFIG_WIFI_RMT_ENABLE_WPA3_SAE 1
#define CONFIG_WIFI_RMT_ENABLE_SAE_PK 1
#define CONFIG_WIFI_RMT_SOFTAP_SAE_SUPPORT 1
#define CONFIG_WIFI_RMT_ENABLE_WPA3_OWE_STA 1
#define CONFIG_WIFI_RMT_SLP_DEFAULT_MIN_ACTIVE_TIME 50
#define CONFIG_WIFI_RMT_SLP_DEFAULT_MAX_ACTIVE_TIME 10
#define CONFIG_WIFI_RMT_SLP_DEFAULT_WAIT_BROADCAST_DATA_TIME 15
#define CONFIG_WIFI_RMT_STA_DISCONNECTED_PM_ENABLE 1
#define CONFIG_WIFI_RMT_GMAC_SUPPORT 1
#define CONFIG_WIFI_RMT_SOFTAP_SUPPORT 1
#define CONFIG_WIFI_RMT_ESPNOW_MAX_ENCRYPT_NUM 7
#define CONFIG_WIFI_RMT_MBEDTLS_CRYPTO 1
#define CONFIG_WIFI_RMT_MBEDTLS_TLS_CLIENT 1
#define CONFIG_WIFI_RMT_ENTERPRISE_SUPPORT 1
#define CONFIG_ESP_WIFI_STATIC_RX_BUFFER_NUM 10
#define CONFIG_ESP_WIFI_DYNAMIC_RX_BUFFER_NUM 32
#define CONFIG_ESP_WIFI_TX_BUFFER_TYPE 1
#define CONFIG_ESP_WIFI_DYNAMIC_TX_BUFFER_NUM 32
#define CONFIG_ESP_WIFI_DYNAMIC_RX_MGMT_BUF 0
#define CONFIG_ESP_WIFI_RX_MGMT_BUF_NUM_DEF 5
#define CONFIG_ESP_WIFI_AMPDU_TX_ENABLED 1
#define CONFIG_ESP_WIFI_TX_BA_WIN 6
#define CONFIG_ESP_WIFI_AMPDU_RX_ENABLED 1
#define CONFIG_ESP_WIFI_RX_BA_WIN 6
#define CONFIG_ESP_WIFI_NVS_ENABLED 1
#define CONFIG_ESP_WIFI_SOFTAP_BEACON_MAX_LEN 752
#define CONFIG_ESP_WIFI_MGMT_SBUF_NUM 32
#define CONFIG_ESP_WIFI_IRAM_OPT 1
#define CONFIG_ESP_WIFI_RX_IRAM_OPT 1
#define CONFIG_ESP_WIFI_ENABLE_WPA3_SAE 1
#define CONFIG_ESP_WIFI_ENABLE_SAE_PK 1
#define CONFIG_ESP_WIFI_SOFTAP_SAE_SUPPORT 1
#define CONFIG_ESP_WIFI_ENABLE_WPA3_OWE_STA 1
#define CONFIG_ESP_WIFI_SLP_DEFAULT_MIN_ACTIVE_TIME 50
#define CONFIG_ESP_WIFI_SLP_DEFAULT_MAX_ACTIVE_TIME 10
#define CONFIG_ESP_WIFI_SLP_DEFAULT_WAIT_BROADCAST_DATA_TIME 15
#define CONFIG_ESP_WIFI_STA_DISCONNECTED_PM_ENABLE 1
#define CONFIG_ESP_WIFI_GMAC_SUPPORT 1
#define CONFIG_ESP_WIFI_SOFTAP_SUPPORT 1
#define CONFIG_ESP_WIFI_ESPNOW_MAX_ENCRYPT_NUM 7
#define CONFIG_ESP_WIFI_MBEDTLS_CRYPTO 1
#define CONFIG_ESP_WIFI_MBEDTLS_TLS_CLIENT 1
#define CONFIG_ESP_WIFI_ENTERPRISE_SUPPORT 1
#endif // CONFIG_SLAVE_IDF_TARGET_ESP32S3
#if CONFIG_SLAVE_IDF_TARGET_ESP32C2
#define CONFIG_ESP_WIFI_REMOTE_ENABLED 1
#define CONFIG_SLAVE_IDF_TARGET_ESP32C2 1
#define CONFIG_SLAVE_SOC_WIFI_SUPPORTED 1
#define CONFIG_SLAVE_SOC_WIFI_SUPPORT_VARIABLE_BEACON_WINDOW 1
#define CONFIG_SLAVE_SOC_WIFI_LIGHT_SLEEP_CLK_WIDTH 12
#define CONFIG_SLAVE_SOC_WIFI_HW_TSF 1
#define CONFIG_SLAVE_SOC_WIFI_FTM_SUPPORT 1
#define CONFIG_SLAVE_FREERTOS_UNICORE 1
#define CONFIG_SLAVE_SOC_WIFI_PHY_NEEDS_USB_WORKAROUND 1
#define CONFIG_SLAVE_IDF_TARGET_ARCH_RISCV 1
#define CONFIG_ESP_WIFI_REMOTE_LIBRARY_HOSTED 1
#define CONFIG_WIFI_RMT_STATIC_RX_BUFFER_NUM 10
#define CONFIG_WIFI_RMT_DYNAMIC_RX_BUFFER_NUM 32
#define CONFIG_WIFI_RMT_DYNAMIC_TX_BUFFER 1
#define CONFIG_WIFI_RMT_TX_BUFFER_TYPE 1
#define CONFIG_WIFI_RMT_DYNAMIC_TX_BUFFER_NUM 32
#define CONFIG_WIFI_RMT_STATIC_RX_MGMT_BUFFER 1
#define CONFIG_WIFI_RMT_DYNAMIC_RX_MGMT_BUF 0
#define CONFIG_WIFI_RMT_RX_MGMT_BUF_NUM_DEF 5
#define CONFIG_WIFI_RMT_AMPDU_TX_ENABLED 1
#define CONFIG_WIFI_RMT_TX_BA_WIN 6
#define CONFIG_WIFI_RMT_AMPDU_RX_ENABLED 1
#define CONFIG_WIFI_RMT_RX_BA_WIN 6
#define CONFIG_WIFI_RMT_NVS_ENABLED 1
#define CONFIG_WIFI_RMT_SOFTAP_BEACON_MAX_LEN 752
#define CONFIG_WIFI_RMT_MGMT_SBUF_NUM 32
#define CONFIG_WIFI_RMT_IRAM_OPT 1
#define CONFIG_WIFI_RMT_RX_IRAM_OPT 1
#define CONFIG_WIFI_RMT_ENABLE_WPA3_SAE 1
#define CONFIG_WIFI_RMT_ENABLE_SAE_PK 1
#define CONFIG_WIFI_RMT_SOFTAP_SAE_SUPPORT 1
#define CONFIG_WIFI_RMT_ENABLE_WPA3_OWE_STA 1
#define CONFIG_WIFI_RMT_SLP_DEFAULT_MIN_ACTIVE_TIME 50
#define CONFIG_WIFI_RMT_SLP_DEFAULT_MAX_ACTIVE_TIME 10
#define CONFIG_WIFI_RMT_SLP_DEFAULT_WAIT_BROADCAST_DATA_TIME 15
#define CONFIG_WIFI_RMT_STA_DISCONNECTED_PM_ENABLE 1
#define CONFIG_WIFI_RMT_GMAC_SUPPORT 1
#define CONFIG_WIFI_RMT_SOFTAP_SUPPORT 1
#define CONFIG_WIFI_RMT_ESPNOW_MAX_ENCRYPT_NUM 2
#define CONFIG_WIFI_RMT_MBEDTLS_CRYPTO 1
#define CONFIG_WIFI_RMT_MBEDTLS_TLS_CLIENT 1
#define CONFIG_WIFI_RMT_ENTERPRISE_SUPPORT 1
#define CONFIG_WIFI_RMT_ENT_FREE_DYNAMIC_BUFFER 1
#define CONFIG_ESP_WIFI_STATIC_RX_BUFFER_NUM 10
#define CONFIG_ESP_WIFI_DYNAMIC_RX_BUFFER_NUM 32
#define CONFIG_ESP_WIFI_TX_BUFFER_TYPE 1
#define CONFIG_ESP_WIFI_DYNAMIC_TX_BUFFER_NUM 32
#define CONFIG_ESP_WIFI_DYNAMIC_RX_MGMT_BUF 0
#define CONFIG_ESP_WIFI_RX_MGMT_BUF_NUM_DEF 5
#define CONFIG_ESP_WIFI_AMPDU_TX_ENABLED 1
#define CONFIG_ESP_WIFI_TX_BA_WIN 6
#define CONFIG_ESP_WIFI_AMPDU_RX_ENABLED 1
#define CONFIG_ESP_WIFI_RX_BA_WIN 6
#define CONFIG_ESP_WIFI_NVS_ENABLED 1
#define CONFIG_ESP_WIFI_SOFTAP_BEACON_MAX_LEN 752
#define CONFIG_ESP_WIFI_MGMT_SBUF_NUM 32
#define CONFIG_ESP_WIFI_IRAM_OPT 1
#define CONFIG_ESP_WIFI_RX_IRAM_OPT 1
#define CONFIG_ESP_WIFI_ENABLE_WPA3_SAE 1
#define CONFIG_ESP_WIFI_ENABLE_SAE_PK 1
#define CONFIG_ESP_WIFI_SOFTAP_SAE_SUPPORT 1
#define CONFIG_ESP_WIFI_ENABLE_WPA3_OWE_STA 1
#define CONFIG_ESP_WIFI_SLP_DEFAULT_MIN_ACTIVE_TIME 50
#define CONFIG_ESP_WIFI_SLP_DEFAULT_MAX_ACTIVE_TIME 10
#define CONFIG_ESP_WIFI_SLP_DEFAULT_WAIT_BROADCAST_DATA_TIME 15
#define CONFIG_ESP_WIFI_STA_DISCONNECTED_PM_ENABLE 1
#define CONFIG_ESP_WIFI_GMAC_SUPPORT 1
#define CONFIG_ESP_WIFI_SOFTAP_SUPPORT 1
#define CONFIG_ESP_WIFI_ESPNOW_MAX_ENCRYPT_NUM 2
#define CONFIG_ESP_WIFI_MBEDTLS_CRYPTO 1
#define CONFIG_ESP_WIFI_MBEDTLS_TLS_CLIENT 1
#define CONFIG_ESP_WIFI_ENTERPRISE_SUPPORT 1
#define CONFIG_ESP_WIFI_ENT_FREE_DYNAMIC_BUFFER 1
#endif // CONFIG_SLAVE_IDF_TARGET_ESP32C2
#if CONFIG_SLAVE_IDF_TARGET_ESP32C6
#define CONFIG_ESP_WIFI_REMOTE_ENABLED 1
#define CONFIG_SLAVE_IDF_TARGET_ESP32C6 1
#define CONFIG_SLAVE_SOC_WIFI_SUPPORTED 1
#define CONFIG_SLAVE_SOC_WIFI_WAPI_SUPPORT 1
#define CONFIG_SLAVE_SOC_WIFI_CSI_SUPPORT 1
#define CONFIG_SLAVE_SOC_WIFI_MESH_SUPPORT 1
#define CONFIG_SLAVE_SOC_WIFI_LIGHT_SLEEP_CLK_WIDTH 12
#define CONFIG_SLAVE_SOC_WIFI_HW_TSF 1
#define CONFIG_SLAVE_SOC_WIFI_FTM_SUPPORT 1
#define CONFIG_SLAVE_FREERTOS_UNICORE 1
#define CONFIG_SLAVE_SOC_WIFI_GCMP_SUPPORT 1
#define CONFIG_SLAVE_IDF_TARGET_ARCH_RISCV 1
#define CONFIG_SLAVE_SOC_WIFI_HE_SUPPORT 1
#define CONFIG_ESP_WIFI_REMOTE_LIBRARY_HOSTED 1
#define CONFIG_WIFI_RMT_STATIC_RX_BUFFER_NUM 10
#define CONFIG_WIFI_RMT_DYNAMIC_RX_BUFFER_NUM 32
#define CONFIG_WIFI_RMT_DYNAMIC_TX_BUFFER 1
#define CONFIG_WIFI_RMT_TX_BUFFER_TYPE 1
#define CONFIG_WIFI_RMT_DYNAMIC_TX_BUFFER_NUM 32
#define CONFIG_WIFI_RMT_STATIC_RX_MGMT_BUFFER 1
#define CONFIG_WIFI_RMT_DYNAMIC_RX_MGMT_BUF 0
#define CONFIG_WIFI_RMT_RX_MGMT_BUF_NUM_DEF 5
#define CONFIG_WIFI_RMT_AMPDU_TX_ENABLED 1
#define CONFIG_WIFI_RMT_TX_BA_WIN 6
#define CONFIG_WIFI_RMT_AMPDU_RX_ENABLED 1
#define CONFIG_WIFI_RMT_RX_BA_WIN 6
#define CONFIG_WIFI_RMT_NVS_ENABLED 1
#define CONFIG_WIFI_RMT_SOFTAP_BEACON_MAX_LEN 752
#define CONFIG_WIFI_RMT_MGMT_SBUF_NUM 32
#define CONFIG_WIFI_RMT_IRAM_OPT 1
#define CONFIG_WIFI_RMT_EXTRA_IRAM_OPT 1
#define CONFIG_WIFI_RMT_RX_IRAM_OPT 1
#define CONFIG_WIFI_RMT_ENABLE_WPA3_SAE 1
#define CONFIG_WIFI_RMT_ENABLE_SAE_PK 1
#define CONFIG_WIFI_RMT_SOFTAP_SAE_SUPPORT 1
#define CONFIG_WIFI_RMT_ENABLE_WPA3_OWE_STA 1
#define CONFIG_WIFI_RMT_SLP_IRAM_OPT 1
#define CONFIG_WIFI_RMT_SLP_DEFAULT_MIN_ACTIVE_TIME 50
#define CONFIG_WIFI_RMT_SLP_DEFAULT_MAX_ACTIVE_TIME 10
#define CONFIG_WIFI_RMT_SLP_DEFAULT_WAIT_BROADCAST_DATA_TIME 15
#define CONFIG_WIFI_RMT_STA_DISCONNECTED_PM_ENABLE 1
#define CONFIG_WIFI_RMT_GMAC_SUPPORT 1
#define CONFIG_WIFI_RMT_SOFTAP_SUPPORT 1
#define CONFIG_WIFI_RMT_ESPNOW_MAX_ENCRYPT_NUM 7
#define CONFIG_WIFI_RMT_MBEDTLS_CRYPTO 1
#define CONFIG_WIFI_RMT_MBEDTLS_TLS_CLIENT 1
#define CONFIG_WIFI_RMT_TX_HETB_QUEUE_NUM 3
#define CONFIG_WIFI_RMT_ENTERPRISE_SUPPORT 1
#define CONFIG_ESP_WIFI_STATIC_RX_BUFFER_NUM 10
#define CONFIG_ESP_WIFI_DYNAMIC_RX_BUFFER_NUM 32
#define CONFIG_ESP_WIFI_TX_BUFFER_TYPE 1
#define CONFIG_ESP_WIFI_DYNAMIC_TX_BUFFER_NUM 32
#define CONFIG_ESP_WIFI_DYNAMIC_RX_MGMT_BUF 0
#define CONFIG_ESP_WIFI_RX_MGMT_BUF_NUM_DEF 5
#define CONFIG_ESP_WIFI_AMPDU_TX_ENABLED 1
#define CONFIG_ESP_WIFI_TX_BA_WIN 6
#define CONFIG_ESP_WIFI_AMPDU_RX_ENABLED 1
#define CONFIG_ESP_WIFI_RX_BA_WIN 6
#define CONFIG_ESP_WIFI_NVS_ENABLED 1
#define CONFIG_ESP_WIFI_SOFTAP_BEACON_MAX_LEN 752
#define CONFIG_ESP_WIFI_MGMT_SBUF_NUM 32
#define CONFIG_ESP_WIFI_IRAM_OPT 1
#define CONFIG_ESP_WIFI_EXTRA_IRAM_OPT 1
#define CONFIG_ESP_WIFI_RX_IRAM_OPT 1
#define CONFIG_ESP_WIFI_ENABLE_WPA3_SAE 1
#define CONFIG_ESP_WIFI_ENABLE_SAE_PK 1
#define CONFIG_ESP_WIFI_SOFTAP_SAE_SUPPORT 1
#define CONFIG_ESP_WIFI_ENABLE_WPA3_OWE_STA 1
#define CONFIG_ESP_WIFI_SLP_IRAM_OPT 1
#define CONFIG_ESP_WIFI_SLP_DEFAULT_MIN_ACTIVE_TIME 50
#define CONFIG_ESP_WIFI_SLP_DEFAULT_MAX_ACTIVE_TIME 10
#define CONFIG_ESP_WIFI_SLP_DEFAULT_WAIT_BROADCAST_DATA_TIME 15
#define CONFIG_ESP_WIFI_STA_DISCONNECTED_PM_ENABLE 1
#define CONFIG_ESP_WIFI_GMAC_SUPPORT 1
#define CONFIG_ESP_WIFI_SOFTAP_SUPPORT 1
#define CONFIG_ESP_WIFI_ESPNOW_MAX_ENCRYPT_NUM 7
#define CONFIG_ESP_WIFI_MBEDTLS_CRYPTO 1
#define CONFIG_ESP_WIFI_MBEDTLS_TLS_CLIENT 1
#define CONFIG_ESP_WIFI_TX_HETB_QUEUE_NUM 3
#define CONFIG_ESP_WIFI_ENTERPRISE_SUPPORT 1
#endif // CONFIG_SLAVE_IDF_TARGET_ESP32C6
#if CONFIG_SLAVE_IDF_TARGET_ESP32H2
#define CONFIG_ESP_WIFI_REMOTE_ENABLED 1
#define CONFIG_SLAVE_IDF_TARGET_ESP32 1
#define CONFIG_SLAVE_SOC_WIFI_SUPPORTED 1
#define CONFIG_SLAVE_SOC_WIFI_WAPI_SUPPORT 1
#define CONFIG_SLAVE_SOC_WIFI_CSI_SUPPORT 1
#define CONFIG_SLAVE_SOC_WIFI_MESH_SUPPORT 1
#define CONFIG_SLAVE_SOC_WIFI_SUPPORT_VARIABLE_BEACON_WINDOW 1
#define CONFIG_SLAVE_SOC_WIFI_NAN_SUPPORT 1
#define CONFIG_SLAVE_IDF_TARGET_ARCH_XTENSA 1
#define CONFIG_ESP_WIFI_REMOTE_LIBRARY_HOSTED 1
#define CONFIG_WIFI_RMT_STATIC_RX_BUFFER_NUM 10
#define CONFIG_WIFI_RMT_DYNAMIC_RX_BUFFER_NUM 32
#define CONFIG_WIFI_RMT_DYNAMIC_TX_BUFFER 1
#define CONFIG_WIFI_RMT_TX_BUFFER_TYPE 1
#define CONFIG_WIFI_RMT_DYNAMIC_TX_BUFFER_NUM 32
#define CONFIG_WIFI_RMT_STATIC_RX_MGMT_BUFFER 1
#define CONFIG_WIFI_RMT_DYNAMIC_RX_MGMT_BUF 0
#define CONFIG_WIFI_RMT_RX_MGMT_BUF_NUM_DEF 5
#define CONFIG_WIFI_RMT_AMPDU_TX_ENABLED 1
#define CONFIG_WIFI_RMT_TX_BA_WIN 6
#define CONFIG_WIFI_RMT_AMPDU_RX_ENABLED 1
#define CONFIG_WIFI_RMT_RX_BA_WIN 6
#define CONFIG_WIFI_RMT_NVS_ENABLED 1
#define CONFIG_WIFI_RMT_TASK_PINNED_TO_CORE_0 1
#define CONFIG_WIFI_RMT_SOFTAP_BEACON_MAX_LEN 752
#define CONFIG_WIFI_RMT_MGMT_SBUF_NUM 32
#define CONFIG_WIFI_RMT_IRAM_OPT 1
#define CONFIG_WIFI_RMT_RX_IRAM_OPT 1
#define CONFIG_WIFI_RMT_ENABLE_WPA3_SAE 1
#define CONFIG_WIFI_RMT_ENABLE_SAE_PK 1
#define CONFIG_WIFI_RMT_SOFTAP_SAE_SUPPORT 1
#define CONFIG_WIFI_RMT_ENABLE_WPA3_OWE_STA 1
#define CONFIG_WIFI_RMT_SLP_DEFAULT_MIN_ACTIVE_TIME 50
#define CONFIG_WIFI_RMT_SLP_DEFAULT_MAX_ACTIVE_TIME 10
#define CONFIG_WIFI_RMT_SLP_DEFAULT_WAIT_BROADCAST_DATA_TIME 15
#define CONFIG_WIFI_RMT_STA_DISCONNECTED_PM_ENABLE 1
#define CONFIG_WIFI_RMT_GMAC_SUPPORT 1
#define CONFIG_WIFI_RMT_SOFTAP_SUPPORT 1
#define CONFIG_WIFI_RMT_ESPNOW_MAX_ENCRYPT_NUM 7
#define CONFIG_WIFI_RMT_MBEDTLS_CRYPTO 1
#define CONFIG_WIFI_RMT_MBEDTLS_TLS_CLIENT 1
#define CONFIG_WIFI_RMT_ENTERPRISE_SUPPORT 1
#define CONFIG_ESP_WIFI_STATIC_RX_BUFFER_NUM 10
#define CONFIG_ESP_WIFI_DYNAMIC_RX_BUFFER_NUM 32
#define CONFIG_ESP_WIFI_TX_BUFFER_TYPE 1
#define CONFIG_ESP_WIFI_DYNAMIC_TX_BUFFER_NUM 32
#define CONFIG_ESP_WIFI_DYNAMIC_RX_MGMT_BUF 0
#define CONFIG_ESP_WIFI_RX_MGMT_BUF_NUM_DEF 5
#define CONFIG_ESP_WIFI_AMPDU_TX_ENABLED 1
#define CONFIG_ESP_WIFI_TX_BA_WIN 6
#define CONFIG_ESP_WIFI_AMPDU_RX_ENABLED 1
#define CONFIG_ESP_WIFI_RX_BA_WIN 6
#define CONFIG_ESP_WIFI_NVS_ENABLED 1
#define CONFIG_ESP_WIFI_SOFTAP_BEACON_MAX_LEN 752
#define CONFIG_ESP_WIFI_MGMT_SBUF_NUM 32
#define CONFIG_ESP_WIFI_IRAM_OPT 1
#define CONFIG_ESP_WIFI_RX_IRAM_OPT 1
#define CONFIG_ESP_WIFI_ENABLE_WPA3_SAE 1
#define CONFIG_ESP_WIFI_ENABLE_SAE_PK 1
#define CONFIG_ESP_WIFI_SOFTAP_SAE_SUPPORT 1
#define CONFIG_ESP_WIFI_ENABLE_WPA3_OWE_STA 1
#define CONFIG_ESP_WIFI_SLP_DEFAULT_MIN_ACTIVE_TIME 50
#define CONFIG_ESP_WIFI_SLP_DEFAULT_MAX_ACTIVE_TIME 10
#define CONFIG_ESP_WIFI_SLP_DEFAULT_WAIT_BROADCAST_DATA_TIME 15
#define CONFIG_ESP_WIFI_STA_DISCONNECTED_PM_ENABLE 1
#define CONFIG_ESP_WIFI_GMAC_SUPPORT 1
#define CONFIG_ESP_WIFI_SOFTAP_SUPPORT 1
#define CONFIG_ESP_WIFI_ESPNOW_MAX_ENCRYPT_NUM 7
#define CONFIG_ESP_WIFI_MBEDTLS_CRYPTO 1
#define CONFIG_ESP_WIFI_MBEDTLS_TLS_CLIENT 1
#define CONFIG_ESP_WIFI_ENTERPRISE_SUPPORT 1
#endif // CONFIG_SLAVE_IDF_TARGET_ESP32H2
#if CONFIG_SLAVE_IDF_TARGET_ESP32P4
#define CONFIG_ESP_WIFI_REMOTE_ENABLED 1
#define CONFIG_SLAVE_IDF_TARGET_ESP32 1
#define CONFIG_SLAVE_SOC_WIFI_SUPPORTED 1
#define CONFIG_SLAVE_SOC_WIFI_WAPI_SUPPORT 1
#define CONFIG_SLAVE_SOC_WIFI_CSI_SUPPORT 1
#define CONFIG_SLAVE_SOC_WIFI_MESH_SUPPORT 1
#define CONFIG_SLAVE_SOC_WIFI_SUPPORT_VARIABLE_BEACON_WINDOW 1
#define CONFIG_SLAVE_SOC_WIFI_NAN_SUPPORT 1
#define CONFIG_SLAVE_IDF_TARGET_ARCH_XTENSA 1
#define CONFIG_ESP_WIFI_REMOTE_LIBRARY_HOSTED 1
#define CONFIG_WIFI_RMT_STATIC_RX_BUFFER_NUM 10
#define CONFIG_WIFI_RMT_DYNAMIC_RX_BUFFER_NUM 32
#define CONFIG_WIFI_RMT_DYNAMIC_TX_BUFFER 1
#define CONFIG_WIFI_RMT_TX_BUFFER_TYPE 1
#define CONFIG_WIFI_RMT_DYNAMIC_TX_BUFFER_NUM 32
#define CONFIG_WIFI_RMT_STATIC_RX_MGMT_BUFFER 1
#define CONFIG_WIFI_RMT_DYNAMIC_RX_MGMT_BUF 0
#define CONFIG_WIFI_RMT_RX_MGMT_BUF_NUM_DEF 5
#define CONFIG_WIFI_RMT_AMPDU_TX_ENABLED 1
#define CONFIG_WIFI_RMT_TX_BA_WIN 6
#define CONFIG_WIFI_RMT_AMPDU_RX_ENABLED 1
#define CONFIG_WIFI_RMT_RX_BA_WIN 6
#define CONFIG_WIFI_RMT_NVS_ENABLED 1
#define CONFIG_WIFI_RMT_TASK_PINNED_TO_CORE_0 1
#define CONFIG_WIFI_RMT_SOFTAP_BEACON_MAX_LEN 752
#define CONFIG_WIFI_RMT_MGMT_SBUF_NUM 32
#define CONFIG_WIFI_RMT_IRAM_OPT 1
#define CONFIG_WIFI_RMT_RX_IRAM_OPT 1
#define CONFIG_WIFI_RMT_ENABLE_WPA3_SAE 1
#define CONFIG_WIFI_RMT_ENABLE_SAE_PK 1
#define CONFIG_WIFI_RMT_SOFTAP_SAE_SUPPORT 1
#define CONFIG_WIFI_RMT_ENABLE_WPA3_OWE_STA 1
#define CONFIG_WIFI_RMT_SLP_DEFAULT_MIN_ACTIVE_TIME 50
#define CONFIG_WIFI_RMT_SLP_DEFAULT_MAX_ACTIVE_TIME 10
#define CONFIG_WIFI_RMT_SLP_DEFAULT_WAIT_BROADCAST_DATA_TIME 15
#define CONFIG_WIFI_RMT_STA_DISCONNECTED_PM_ENABLE 1
#define CONFIG_WIFI_RMT_GMAC_SUPPORT 1
#define CONFIG_WIFI_RMT_SOFTAP_SUPPORT 1
#define CONFIG_WIFI_RMT_ESPNOW_MAX_ENCRYPT_NUM 7
#define CONFIG_WIFI_RMT_MBEDTLS_CRYPTO 1
#define CONFIG_WIFI_RMT_MBEDTLS_TLS_CLIENT 1
#define CONFIG_WIFI_RMT_ENTERPRISE_SUPPORT 1
#define CONFIG_ESP_WIFI_STATIC_RX_BUFFER_NUM 10
#define CONFIG_ESP_WIFI_DYNAMIC_RX_BUFFER_NUM 32
#define CONFIG_ESP_WIFI_TX_BUFFER_TYPE 1
#define CONFIG_ESP_WIFI_DYNAMIC_TX_BUFFER_NUM 32
#define CONFIG_ESP_WIFI_DYNAMIC_RX_MGMT_BUF 0
#define CONFIG_ESP_WIFI_RX_MGMT_BUF_NUM_DEF 5
#define CONFIG_ESP_WIFI_AMPDU_TX_ENABLED 1
#define CONFIG_ESP_WIFI_TX_BA_WIN 6
#define CONFIG_ESP_WIFI_AMPDU_RX_ENABLED 1
#define CONFIG_ESP_WIFI_RX_BA_WIN 6
#define CONFIG_ESP_WIFI_NVS_ENABLED 1
#define CONFIG_ESP_WIFI_SOFTAP_BEACON_MAX_LEN 752
#define CONFIG_ESP_WIFI_MGMT_SBUF_NUM 32
#define CONFIG_ESP_WIFI_IRAM_OPT 1
#define CONFIG_ESP_WIFI_RX_IRAM_OPT 1
#define CONFIG_ESP_WIFI_ENABLE_WPA3_SAE 1
#define CONFIG_ESP_WIFI_ENABLE_SAE_PK 1
#define CONFIG_ESP_WIFI_SOFTAP_SAE_SUPPORT 1
#define CONFIG_ESP_WIFI_ENABLE_WPA3_OWE_STA 1
#define CONFIG_ESP_WIFI_SLP_DEFAULT_MIN_ACTIVE_TIME 50
#define CONFIG_ESP_WIFI_SLP_DEFAULT_MAX_ACTIVE_TIME 10
#define CONFIG_ESP_WIFI_SLP_DEFAULT_WAIT_BROADCAST_DATA_TIME 15
#define CONFIG_ESP_WIFI_STA_DISCONNECTED_PM_ENABLE 1
#define CONFIG_ESP_WIFI_GMAC_SUPPORT 1
#define CONFIG_ESP_WIFI_SOFTAP_SUPPORT 1
#define CONFIG_ESP_WIFI_ESPNOW_MAX_ENCRYPT_NUM 7
#define CONFIG_ESP_WIFI_MBEDTLS_CRYPTO 1
#define CONFIG_ESP_WIFI_MBEDTLS_TLS_CLIENT 1
#define CONFIG_ESP_WIFI_ENTERPRISE_SUPPORT 1
#endif // CONFIG_SLAVE_IDF_TARGET_ESP32P4
#if CONFIG_SLAVE_IDF_TARGET_ESP32C5
#define CONFIG_ESP_WIFI_REMOTE_ENABLED 1
#define CONFIG_SLAVE_IDF_TARGET_ESP32 1
#define CONFIG_SLAVE_SOC_WIFI_SUPPORTED 1
#define CONFIG_SLAVE_SOC_WIFI_WAPI_SUPPORT 1
#define CONFIG_SLAVE_SOC_WIFI_CSI_SUPPORT 1
#define CONFIG_SLAVE_SOC_WIFI_MESH_SUPPORT 1
#define CONFIG_SLAVE_SOC_WIFI_SUPPORT_VARIABLE_BEACON_WINDOW 1
#define CONFIG_SLAVE_SOC_WIFI_NAN_SUPPORT 1
#define CONFIG_SLAVE_IDF_TARGET_ARCH_XTENSA 1
#define CONFIG_ESP_WIFI_REMOTE_LIBRARY_HOSTED 1
#define CONFIG_WIFI_RMT_STATIC_RX_BUFFER_NUM 10
#define CONFIG_WIFI_RMT_DYNAMIC_RX_BUFFER_NUM 32
#define CONFIG_WIFI_RMT_DYNAMIC_TX_BUFFER 1
#define CONFIG_WIFI_RMT_TX_BUFFER_TYPE 1
#define CONFIG_WIFI_RMT_DYNAMIC_TX_BUFFER_NUM 32
#define CONFIG_WIFI_RMT_STATIC_RX_MGMT_BUFFER 1
#define CONFIG_WIFI_RMT_DYNAMIC_RX_MGMT_BUF 0
#define CONFIG_WIFI_RMT_RX_MGMT_BUF_NUM_DEF 5
#define CONFIG_WIFI_RMT_AMPDU_TX_ENABLED 1
#define CONFIG_WIFI_RMT_TX_BA_WIN 6
#define CONFIG_WIFI_RMT_AMPDU_RX_ENABLED 1
#define CONFIG_WIFI_RMT_RX_BA_WIN 6
#define CONFIG_WIFI_RMT_NVS_ENABLED 1
#define CONFIG_WIFI_RMT_TASK_PINNED_TO_CORE_0 1
#define CONFIG_WIFI_RMT_SOFTAP_BEACON_MAX_LEN 752
#define CONFIG_WIFI_RMT_MGMT_SBUF_NUM 32
#define CONFIG_WIFI_RMT_IRAM_OPT 1
#define CONFIG_WIFI_RMT_RX_IRAM_OPT 1
#define CONFIG_WIFI_RMT_ENABLE_WPA3_SAE 1
#define CONFIG_WIFI_RMT_ENABLE_SAE_PK 1
#define CONFIG_WIFI_RMT_SOFTAP_SAE_SUPPORT 1
#define CONFIG_WIFI_RMT_ENABLE_WPA3_OWE_STA 1
#define CONFIG_WIFI_RMT_SLP_DEFAULT_MIN_ACTIVE_TIME 50
#define CONFIG_WIFI_RMT_SLP_DEFAULT_MAX_ACTIVE_TIME 10
#define CONFIG_WIFI_RMT_SLP_DEFAULT_WAIT_BROADCAST_DATA_TIME 15
#define CONFIG_WIFI_RMT_STA_DISCONNECTED_PM_ENABLE 1
#define CONFIG_WIFI_RMT_GMAC_SUPPORT 1
#define CONFIG_WIFI_RMT_SOFTAP_SUPPORT 1
#define CONFIG_WIFI_RMT_ESPNOW_MAX_ENCRYPT_NUM 7
#define CONFIG_WIFI_RMT_MBEDTLS_CRYPTO 1
#define CONFIG_WIFI_RMT_MBEDTLS_TLS_CLIENT 1
#define CONFIG_WIFI_RMT_ENTERPRISE_SUPPORT 1
#define CONFIG_ESP_WIFI_STATIC_RX_BUFFER_NUM 10
#define CONFIG_ESP_WIFI_DYNAMIC_RX_BUFFER_NUM 32
#define CONFIG_ESP_WIFI_TX_BUFFER_TYPE 1
#define CONFIG_ESP_WIFI_DYNAMIC_TX_BUFFER_NUM 32
#define CONFIG_ESP_WIFI_DYNAMIC_RX_MGMT_BUF 0
#define CONFIG_ESP_WIFI_RX_MGMT_BUF_NUM_DEF 5
#define CONFIG_ESP_WIFI_AMPDU_TX_ENABLED 1
#define CONFIG_ESP_WIFI_TX_BA_WIN 6
#define CONFIG_ESP_WIFI_AMPDU_RX_ENABLED 1
#define CONFIG_ESP_WIFI_RX_BA_WIN 6
#define CONFIG_ESP_WIFI_NVS_ENABLED 1
#define CONFIG_ESP_WIFI_SOFTAP_BEACON_MAX_LEN 752
#define CONFIG_ESP_WIFI_MGMT_SBUF_NUM 32
#define CONFIG_ESP_WIFI_IRAM_OPT 1
#define CONFIG_ESP_WIFI_RX_IRAM_OPT 1
#define CONFIG_ESP_WIFI_ENABLE_WPA3_SAE 1
#define CONFIG_ESP_WIFI_ENABLE_SAE_PK 1
#define CONFIG_ESP_WIFI_SOFTAP_SAE_SUPPORT 1
#define CONFIG_ESP_WIFI_ENABLE_WPA3_OWE_STA 1
#define CONFIG_ESP_WIFI_SLP_DEFAULT_MIN_ACTIVE_TIME 50
#define CONFIG_ESP_WIFI_SLP_DEFAULT_MAX_ACTIVE_TIME 10
#define CONFIG_ESP_WIFI_SLP_DEFAULT_WAIT_BROADCAST_DATA_TIME 15
#define CONFIG_ESP_WIFI_STA_DISCONNECTED_PM_ENABLE 1
#define CONFIG_ESP_WIFI_GMAC_SUPPORT 1
#define CONFIG_ESP_WIFI_SOFTAP_SUPPORT 1
#define CONFIG_ESP_WIFI_ESPNOW_MAX_ENCRYPT_NUM 7
#define CONFIG_ESP_WIFI_MBEDTLS_CRYPTO 1
#define CONFIG_ESP_WIFI_MBEDTLS_TLS_CLIENT 1
#define CONFIG_ESP_WIFI_ENTERPRISE_SUPPORT 1
#endif // CONFIG_SLAVE_IDF_TARGET_ESP32C5
#if CONFIG_SLAVE_IDF_TARGET_ESP32C61
#define CONFIG_ESP_WIFI_REMOTE_ENABLED 1
#define CONFIG_SLAVE_IDF_TARGET_ESP32 1
#define CONFIG_SLAVE_SOC_WIFI_SUPPORTED 1
#define CONFIG_SLAVE_SOC_WIFI_WAPI_SUPPORT 1
#define CONFIG_SLAVE_SOC_WIFI_CSI_SUPPORT 1
#define CONFIG_SLAVE_SOC_WIFI_MESH_SUPPORT 1
#define CONFIG_SLAVE_SOC_WIFI_SUPPORT_VARIABLE_BEACON_WINDOW 1
#define CONFIG_SLAVE_SOC_WIFI_NAN_SUPPORT 1
#define CONFIG_SLAVE_IDF_TARGET_ARCH_XTENSA 1
#define CONFIG_ESP_WIFI_REMOTE_LIBRARY_HOSTED 1
#define CONFIG_WIFI_RMT_STATIC_RX_BUFFER_NUM 10
#define CONFIG_WIFI_RMT_DYNAMIC_RX_BUFFER_NUM 32
#define CONFIG_WIFI_RMT_DYNAMIC_TX_BUFFER 1
#define CONFIG_WIFI_RMT_TX_BUFFER_TYPE 1
#define CONFIG_WIFI_RMT_DYNAMIC_TX_BUFFER_NUM 32
#define CONFIG_WIFI_RMT_STATIC_RX_MGMT_BUFFER 1
#define CONFIG_WIFI_RMT_DYNAMIC_RX_MGMT_BUF 0
#define CONFIG_WIFI_RMT_RX_MGMT_BUF_NUM_DEF 5
#define CONFIG_WIFI_RMT_AMPDU_TX_ENABLED 1
#define CONFIG_WIFI_RMT_TX_BA_WIN 6
#define CONFIG_WIFI_RMT_AMPDU_RX_ENABLED 1
#define CONFIG_WIFI_RMT_RX_BA_WIN 6
#define CONFIG_WIFI_RMT_NVS_ENABLED 1
#define CONFIG_WIFI_RMT_TASK_PINNED_TO_CORE_0 1
#define CONFIG_WIFI_RMT_SOFTAP_BEACON_MAX_LEN 752
#define CONFIG_WIFI_RMT_MGMT_SBUF_NUM 32
#define CONFIG_WIFI_RMT_IRAM_OPT 1
#define CONFIG_WIFI_RMT_RX_IRAM_OPT 1
#define CONFIG_WIFI_RMT_ENABLE_WPA3_SAE 1
#define CONFIG_WIFI_RMT_ENABLE_SAE_PK 1
#define CONFIG_WIFI_RMT_SOFTAP_SAE_SUPPORT 1
#define CONFIG_WIFI_RMT_ENABLE_WPA3_OWE_STA 1
#define CONFIG_WIFI_RMT_SLP_DEFAULT_MIN_ACTIVE_TIME 50
#define CONFIG_WIFI_RMT_SLP_DEFAULT_MAX_ACTIVE_TIME 10
#define CONFIG_WIFI_RMT_SLP_DEFAULT_WAIT_BROADCAST_DATA_TIME 15
#define CONFIG_WIFI_RMT_STA_DISCONNECTED_PM_ENABLE 1
#define CONFIG_WIFI_RMT_GMAC_SUPPORT 1
#define CONFIG_WIFI_RMT_SOFTAP_SUPPORT 1
#define CONFIG_WIFI_RMT_ESPNOW_MAX_ENCRYPT_NUM 7
#define CONFIG_WIFI_RMT_MBEDTLS_CRYPTO 1
#define CONFIG_WIFI_RMT_MBEDTLS_TLS_CLIENT 1
#define CONFIG_WIFI_RMT_ENTERPRISE_SUPPORT 1
#define CONFIG_ESP_WIFI_STATIC_RX_BUFFER_NUM 10
#define CONFIG_ESP_WIFI_DYNAMIC_RX_BUFFER_NUM 32
#define CONFIG_ESP_WIFI_TX_BUFFER_TYPE 1
#define CONFIG_ESP_WIFI_DYNAMIC_TX_BUFFER_NUM 32
#define CONFIG_ESP_WIFI_DYNAMIC_RX_MGMT_BUF 0
#define CONFIG_ESP_WIFI_RX_MGMT_BUF_NUM_DEF 5
#define CONFIG_ESP_WIFI_AMPDU_TX_ENABLED 1
#define CONFIG_ESP_WIFI_TX_BA_WIN 6
#define CONFIG_ESP_WIFI_AMPDU_RX_ENABLED 1
#define CONFIG_ESP_WIFI_RX_BA_WIN 6
#define CONFIG_ESP_WIFI_NVS_ENABLED 1
#define CONFIG_ESP_WIFI_SOFTAP_BEACON_MAX_LEN 752
#define CONFIG_ESP_WIFI_MGMT_SBUF_NUM 32
#define CONFIG_ESP_WIFI_IRAM_OPT 1
#define CONFIG_ESP_WIFI_RX_IRAM_OPT 1
#define CONFIG_ESP_WIFI_ENABLE_WPA3_SAE 1
#define CONFIG_ESP_WIFI_ENABLE_SAE_PK 1
#define CONFIG_ESP_WIFI_SOFTAP_SAE_SUPPORT 1
#define CONFIG_ESP_WIFI_ENABLE_WPA3_OWE_STA 1
#define CONFIG_ESP_WIFI_SLP_DEFAULT_MIN_ACTIVE_TIME 50
#define CONFIG_ESP_WIFI_SLP_DEFAULT_MAX_ACTIVE_TIME 10
#define CONFIG_ESP_WIFI_SLP_DEFAULT_WAIT_BROADCAST_DATA_TIME 15
#define CONFIG_ESP_WIFI_STA_DISCONNECTED_PM_ENABLE 1
#define CONFIG_ESP_WIFI_GMAC_SUPPORT 1
#define CONFIG_ESP_WIFI_SOFTAP_SUPPORT 1
#define CONFIG_ESP_WIFI_ESPNOW_MAX_ENCRYPT_NUM 7
#define CONFIG_ESP_WIFI_MBEDTLS_CRYPTO 1
#define CONFIG_ESP_WIFI_MBEDTLS_TLS_CLIENT 1
#define CONFIG_ESP_WIFI_ENTERPRISE_SUPPORT 1
#endif // CONFIG_SLAVE_IDF_TARGET_ESP32C61

View File

@@ -0,0 +1,83 @@
/*
* SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
// This file is auto-generated
#pragma once
esp_err_t esp_wifi_remote_init(const wifi_init_config_t *config);
esp_err_t esp_wifi_remote_deinit(void);
esp_err_t esp_wifi_remote_set_mode(wifi_mode_t mode);
esp_err_t esp_wifi_remote_get_mode(wifi_mode_t *mode);
esp_err_t esp_wifi_remote_start(void);
esp_err_t esp_wifi_remote_stop(void);
esp_err_t esp_wifi_remote_restore(void);
esp_err_t esp_wifi_remote_connect(void);
esp_err_t esp_wifi_remote_disconnect(void);
esp_err_t esp_wifi_remote_clear_fast_connect(void);
esp_err_t esp_wifi_remote_deauth_sta(uint16_t aid);
esp_err_t esp_wifi_remote_scan_start(const wifi_scan_config_t *config, _Bool block);
esp_err_t esp_wifi_remote_set_scan_parameters(const wifi_scan_default_params_t *config);
esp_err_t esp_wifi_remote_get_scan_parameters(wifi_scan_default_params_t *config);
esp_err_t esp_wifi_remote_scan_stop(void);
esp_err_t esp_wifi_remote_scan_get_ap_num(uint16_t *number);
esp_err_t esp_wifi_remote_scan_get_ap_records(uint16_t *number, wifi_ap_record_t *ap_records);
esp_err_t esp_wifi_remote_scan_get_ap_record(wifi_ap_record_t *ap_record);
esp_err_t esp_wifi_remote_clear_ap_list(void);
esp_err_t esp_wifi_remote_sta_get_ap_info(wifi_ap_record_t *ap_info);
esp_err_t esp_wifi_remote_set_ps(wifi_ps_type_t type);
esp_err_t esp_wifi_remote_get_ps(wifi_ps_type_t *type);
esp_err_t esp_wifi_remote_set_protocol(wifi_interface_t ifx, uint8_t protocol_bitmap);
esp_err_t esp_wifi_remote_get_protocol(wifi_interface_t ifx, uint8_t *protocol_bitmap);
esp_err_t esp_wifi_remote_set_bandwidth(wifi_interface_t ifx, wifi_bandwidth_t bw);
esp_err_t esp_wifi_remote_get_bandwidth(wifi_interface_t ifx, wifi_bandwidth_t *bw);
esp_err_t esp_wifi_remote_set_channel(uint8_t primary, wifi_second_chan_t second);
esp_err_t esp_wifi_remote_get_channel(uint8_t *primary, wifi_second_chan_t *second);
esp_err_t esp_wifi_remote_set_country(const wifi_country_t *country);
esp_err_t esp_wifi_remote_get_country(wifi_country_t *country);
esp_err_t esp_wifi_remote_set_mac(wifi_interface_t ifx, const uint8_t mac[6]);
esp_err_t esp_wifi_remote_get_mac(wifi_interface_t ifx, uint8_t mac[6]);
esp_err_t esp_wifi_remote_set_promiscuous_rx_cb(wifi_promiscuous_cb_t cb);
esp_err_t esp_wifi_remote_set_promiscuous(_Bool en);
esp_err_t esp_wifi_remote_get_promiscuous(_Bool *en);
esp_err_t esp_wifi_remote_set_promiscuous_filter(const wifi_promiscuous_filter_t *filter);
esp_err_t esp_wifi_remote_get_promiscuous_filter(wifi_promiscuous_filter_t *filter);
esp_err_t esp_wifi_remote_set_promiscuous_ctrl_filter(const wifi_promiscuous_filter_t *filter);
esp_err_t esp_wifi_remote_get_promiscuous_ctrl_filter(wifi_promiscuous_filter_t *filter);
esp_err_t esp_wifi_remote_set_config(wifi_interface_t interface, wifi_config_t *conf);
esp_err_t esp_wifi_remote_get_config(wifi_interface_t interface, wifi_config_t *conf);
esp_err_t esp_wifi_remote_ap_get_sta_list(wifi_sta_list_t *sta);
esp_err_t esp_wifi_remote_ap_get_sta_aid(const uint8_t mac[6], uint16_t *aid);
esp_err_t esp_wifi_remote_set_storage(wifi_storage_t storage);
esp_err_t esp_wifi_remote_set_vendor_ie(_Bool enable, wifi_vendor_ie_type_t type, wifi_vendor_ie_id_t idx, const void *vnd_ie);
esp_err_t esp_wifi_remote_set_vendor_ie_cb(esp_vendor_ie_cb_t cb, void *ctx);
esp_err_t esp_wifi_remote_set_max_tx_power(int8_t power);
esp_err_t esp_wifi_remote_get_max_tx_power(int8_t *power);
esp_err_t esp_wifi_remote_set_event_mask(uint32_t mask);
esp_err_t esp_wifi_remote_get_event_mask(uint32_t *mask);
esp_err_t esp_wifi_remote_80211_tx(wifi_interface_t ifx, const void *buffer, int len, _Bool en_sys_seq);
esp_err_t esp_wifi_remote_set_csi_rx_cb(wifi_csi_cb_t cb, void *ctx);
esp_err_t esp_wifi_remote_set_csi_config(const wifi_csi_config_t *config);
esp_err_t esp_wifi_remote_get_csi_config(wifi_csi_config_t *config);
esp_err_t esp_wifi_remote_set_csi(_Bool en);
int64_t esp_wifi_remote_get_tsf_time(wifi_interface_t interface);
esp_err_t esp_wifi_remote_set_inactive_time(wifi_interface_t ifx, uint16_t sec);
esp_err_t esp_wifi_remote_get_inactive_time(wifi_interface_t ifx, uint16_t *sec);
esp_err_t esp_wifi_remote_statis_dump(uint32_t modules);
esp_err_t esp_wifi_remote_set_rssi_threshold(int32_t rssi);
esp_err_t esp_wifi_remote_ftm_initiate_session(wifi_ftm_initiator_cfg_t *cfg);
esp_err_t esp_wifi_remote_ftm_end_session(void);
esp_err_t esp_wifi_remote_ftm_resp_set_offset(int16_t offset_cm);
esp_err_t esp_wifi_remote_ftm_get_report(wifi_ftm_report_entry_t *report, uint8_t num_entries);
esp_err_t esp_wifi_remote_config_11b_rate(wifi_interface_t ifx, _Bool disable);
esp_err_t esp_wifi_remote_connectionless_module_set_wake_interval(uint16_t wake_interval);
esp_err_t esp_wifi_remote_force_wakeup_acquire(void);
esp_err_t esp_wifi_remote_force_wakeup_release(void);
esp_err_t esp_wifi_remote_set_country_code(const char *country, _Bool ieee80211d_enabled);
esp_err_t esp_wifi_remote_get_country_code(char *country);
esp_err_t esp_wifi_remote_config_80211_tx_rate(wifi_interface_t ifx, wifi_phy_rate_t rate);
esp_err_t esp_wifi_remote_disable_pmf_config(wifi_interface_t ifx);
esp_err_t esp_wifi_remote_sta_get_aid(uint16_t *aid);
esp_err_t esp_wifi_remote_sta_get_negotiated_phymode(wifi_phy_mode_t *phymode);
esp_err_t esp_wifi_remote_set_dynamic_cs(_Bool enabled);
esp_err_t esp_wifi_remote_sta_get_rssi(int *rssi);

View File

@@ -0,0 +1,324 @@
/*
* SPDX-FileCopyrightText: 2017-2023 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef __ESP_MESH_INTERNAL_H__
#define __ESP_MESH_INTERNAL_H__
#include "esp_err.h"
#include "esp_mesh.h"
#include "esp_wifi.h"
#include "esp_wifi_types.h"
#include "esp_private/wifi.h"
#include "esp_wifi_crypto_types.h"
#ifdef __cplusplus
extern "C" {
#endif
/*******************************************************
* Constants
*******************************************************/
/*******************************************************
* Structures
*******************************************************/
/**
* @brief Mesh attempts
*/
typedef struct {
int scan; /**< minimum scan times before being a root, default:10 */
int vote; /**< max vote times in self-healing, default:1000 */
int fail; /**< parent selection fail times, if the scan times reach this value,
device will disconnect with associated children and join self-healing. default:60 */
int monitor_ie; /**< acceptable times of parent networking IE change before update its own networking IE. default:3 */
} mesh_attempts_t;
/**
* @brief Mesh switch parent
*/
typedef struct {
int duration_ms; /**< parent weak RSSI monitor duration, if the RSSI continues to be weak during this duration_ms,
device will search for a new parent. */
int cnx_rssi; /**< RSSI threshold for keeping a good connection with parent.
If set a value greater than -120 dBm, a timer will be armed to monitor parent RSSI at a period time of duration_ms. */
int select_rssi; /**< RSSI threshold for parent selection. It should be a value greater than switch_rssi. */
int switch_rssi; /**< Disassociate with current parent and switch to a new parent when the RSSI is greater than this set threshold. */
int backoff_rssi; /**< RSSI threshold for connecting to the root */
} mesh_switch_parent_t;
/**
* @brief Mesh RSSI threshold
*/
typedef struct {
int high; /**< high RSSI threshold, used to determine whether the new parent and the current parent are in the same RSSI range */
int medium; /**< medium RSSI threshold, used to determine whether the new parent and the current parent are in the same RSSI range */
int low; /**< low RSSI threshold. If the parent's RSSI is lower than low for a period time of duration_ms,
then the mesh node will post MESH_WEAK_RSSI event.
Also used to determine whether the new parent and the current parent are in the same RSSI range */
} mesh_rssi_threshold_t;
/**
* @brief Mesh networking IE
*/
typedef struct {
/**< mesh networking IE head */
uint8_t eid; /**< element ID, vendor specific, 221 */
uint8_t len; /**< element length, the length after this member */
uint8_t oui[3]; /**< organization identifier, 0x18fe34 */
uint8_t type; /**< ESP defined IE type, include Assoc IE, SSID IE, Ext Assoc IE, Roots IE, etc. */
uint8_t encrypted : 1; /**< whether mesh networking IE is encrypted */
uint8_t version : 7; /**< mesh networking IE version, equal to 2 if mesh PS is enabled, equal to 1 otherwise */
/**< content */
uint8_t mesh_type; /**< mesh device type, include idle, root, node, etc, refer to mesh_type_t */
uint8_t mesh_id[6]; /**< mesh ID, only the same mesh id can form a unified mesh network */
uint8_t layer_cap; /**< layer_cap = max_layer - layer, indicates the number of remaining available layers of the mesh network */
uint8_t layer; /**< the current layer of this node */
uint8_t assoc_cap; /**< the maximum connections of this mesh AP */
uint8_t assoc; /**< current connections of this mesh AP */
uint8_t leaf_cap; /**< the maximum number of leaves in the mesh network */
uint8_t leaf_assoc; /**< the number of current connected leaves */
uint16_t root_cap; /**< the capacity of the root, equal to the total child numbers plus 1, root node updates root_cap and self_cap */
uint16_t self_cap; /**< the capacity of myself, total child numbers plus 1, all nodes update this member */
uint16_t layer2_cap; /**< the capacity of layer2 node, total child numbers plus 1, layer2 node updates layer2_cap and self_cap, root sets this to 0 */
uint16_t scan_ap_num; /**< the number of mesh APs around */
int8_t rssi; /**< RSSI of the connected parent, default value is -120, root node will not update this */
int8_t router_rssi; /**< RSSI of the router, default value is -120 */
uint8_t flag; /**< flag of networking, indicates the status of the network, refer to MESH_ASSOC_FLAG_XXX */
/**< vote related */
uint8_t rc_addr[6]; /**< the address of the root candidate, i.e. the voted addesss before connection, root node will update this with self address */
int8_t rc_rssi; /**< the router RSSI of the root candidate */
uint8_t vote_addr[6]; /**< the voted address after connection */
int8_t vote_rssi; /**< the router RSSI of the voted address */
uint8_t vote_ttl; /**< vote ttl, indicate the voting is from myself or from other nodes */
uint16_t votes; /**< the number of all voting nodes */
uint16_t my_votes; /**< the number of nodes that voted for me */
uint8_t reason; /**< the reason why the voting happens, root initiated or child initiated, refer to mesh_vote_reason_t */
uint8_t child[6]; /**< child address, not used currently */
uint8_t toDS; /**< state represents whether the root is able to access external IP network */
} __attribute__((packed)) mesh_assoc_t;
/**
* @brief Mesh chain layer
*/
typedef struct {
uint16_t layer_cap; /**< max layer of the network */
uint16_t layer; /**< current layer of this node */
} mesh_chain_layer_t;
/**
* @brief Mesh chain assoc
*/
typedef struct {
mesh_assoc_t tree; /**< tree top, mesh_assoc IE */
mesh_chain_layer_t chain; /**< chain top, mesh_assoc IE */
} __attribute__((packed)) mesh_chain_assoc_t;
/* mesh max connections */
#define MESH_MAX_CONNECTIONS (10)
/**
* @brief Mesh power save duties
*/
typedef struct {
uint8_t device; /**< device power save duty*/
uint8_t parent; /**< parent power save duty*/
struct {
bool used; /**< whether the child is joined */
uint8_t duty; /**< power save duty of the child */
uint8_t mac[6]; /**< mac address of the child */
} child[MESH_MAX_CONNECTIONS]; /**< child */
} esp_mesh_ps_duties_t;
/*******************************************************
* Function Definitions
*******************************************************/
/**
* @brief Set mesh softAP beacon interval
*
* @param[in] interval_ms beacon interval (msecs) (100 msecs ~ 60000 msecs)
*
* @return
* - ESP_OK
* - ESP_FAIL
* - ESP_ERR_INVALID_ARG
*/
esp_err_t esp_mesh_set_beacon_interval(int interval_ms);
/**
* @brief Get mesh softAP beacon interval
*
* @param[out] interval_ms beacon interval (msecs)
*
* @return
* - ESP_OK
*/
esp_err_t esp_mesh_get_beacon_interval(int *interval_ms);
/**
* @brief Set attempts for mesh self-organized networking
*
* @param[in] attempts
*
* @return
* - ESP_OK
* - ESP_FAIL
*/
esp_err_t esp_mesh_set_attempts(mesh_attempts_t *attempts);
/**
* @brief Get attempts for mesh self-organized networking
*
* @param[out] attempts
*
* @return
* - ESP_OK
* - ESP_ERR_MESH_ARGUMENT
*/
esp_err_t esp_mesh_get_attempts(mesh_attempts_t *attempts);
/**
* @brief Set parameters for parent switch
*
* @param[in] paras parameters for parent switch
*
* @return
* - ESP_OK
* - ESP_ERR_MESH_ARGUMENT
*/
esp_err_t esp_mesh_set_switch_parent_paras(mesh_switch_parent_t *paras);
/**
* @brief Get parameters for parent switch
*
* @param[out] paras parameters for parent switch
*
* @return
* - ESP_OK
* - ESP_ERR_MESH_ARGUMENT
*/
esp_err_t esp_mesh_get_switch_parent_paras(mesh_switch_parent_t *paras);
/**
* @brief Set RSSI threshold of current parent
* - The default high RSSI threshold value is -78 dBm.
* - The default medium RSSI threshold value is -82 dBm.
* - The default low RSSI threshold value is -85 dBm.
*
* @param[in] threshold RSSI threshold
*
* @return
* - ESP_OK
* - ESP_ERR_MESH_ARGUMENT
*/
esp_err_t esp_mesh_set_rssi_threshold(const mesh_rssi_threshold_t *threshold);
/**
* @brief Get RSSI threshold of current parent
*
* @param[out] threshold RSSI threshold
*
* @return
* - ESP_OK
* - ESP_ERR_MESH_ARGUMENT
*/
esp_err_t esp_mesh_get_rssi_threshold(mesh_rssi_threshold_t *threshold);
/**
* @brief Enable the minimum rate to 6 Mbps
*
* @attention This API shall be called before Wi-Fi is started.
*
* @param[in] is_6m enable or not
*
* @return
* - ESP_OK
*/
esp_err_t esp_mesh_set_6m_rate(bool is_6m);
/**
* @brief Print the number of txQ waiting
*
* @return
* - ESP_OK
* - ESP_FAIL
*/
esp_err_t esp_mesh_print_txQ_waiting(void);
/**
* @brief Print the number of rxQ waiting
*
* @return
* - ESP_OK
* - ESP_FAIL
*/
esp_err_t esp_mesh_print_rxQ_waiting(void);
/**
* @brief Set passive scan time
*
* @param[in] time_ms passive scan time (msecs)
*
* @return
* - ESP_OK
* - ESP_FAIL
* - ESP_ERR_ARGUMENT
*/
esp_err_t esp_mesh_set_passive_scan_time(int time_ms);
/**
* @brief Get passive scan time
*
* @return interval_ms passive scan time (msecs)
*/
int esp_mesh_get_passive_scan_time(void);
/**
* @brief Set announce interval
* - The default short interval is 500 milliseconds.
* - The default long interval is 3000 milliseconds.
*
* @param[in] short_ms shall be greater than the default value
* @param[in] long_ms shall be greater than the default value
*
* @return
* - ESP_OK
*/
esp_err_t esp_mesh_set_announce_interval(int short_ms, int long_ms);
/**
* @brief Get announce interval
*
* @param[out] short_ms short interval
* @param[out] long_ms long interval
*
* @return
* - ESP_OK
*/
esp_err_t esp_mesh_get_announce_interval(int *short_ms, int *long_ms);
/**
* @brief Get the running duties of device, parent and children
*
* @param[out] ps_duties ps duties
*
* @return
* - ESP_OK
*/
esp_err_t esp_mesh_ps_get_duties(esp_mesh_ps_duties_t* ps_duties);
/**
* @brief Enable mesh print scan result
*
* @param[in] enable enable or not
*
* @return
* - ESP_OK
*/
esp_err_t esp_mesh_print_scan_result(bool enable);
#ifdef __cplusplus
}
#endif
#endif /* __ESP_MESH_INTERNAL_H__ */

View File

@@ -0,0 +1,382 @@
/*
* SPDX-FileCopyrightText: 2019-2023 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef __ESP_NOW_H__
#define __ESP_NOW_H__
#include <stdbool.h>
#include "esp_err.h"
#include "esp_wifi_types.h"
#ifdef __cplusplus
extern "C" {
#endif
/** \defgroup WiFi_APIs WiFi Related APIs
* @brief WiFi APIs
*/
/** @addtogroup WiFi_APIs
* @{
*/
/** \defgroup ESPNOW_APIs ESPNOW APIs
* @brief ESP32 ESPNOW APIs
*
*/
/** @addtogroup ESPNOW_APIs
* @{
*/
#define ESP_ERR_ESPNOW_BASE (ESP_ERR_WIFI_BASE + 100) /*!< ESPNOW error number base. */
#define ESP_ERR_ESPNOW_NOT_INIT (ESP_ERR_ESPNOW_BASE + 1) /*!< ESPNOW is not initialized. */
#define ESP_ERR_ESPNOW_ARG (ESP_ERR_ESPNOW_BASE + 2) /*!< Invalid argument */
#define ESP_ERR_ESPNOW_NO_MEM (ESP_ERR_ESPNOW_BASE + 3) /*!< Out of memory */
#define ESP_ERR_ESPNOW_FULL (ESP_ERR_ESPNOW_BASE + 4) /*!< ESPNOW peer list is full */
#define ESP_ERR_ESPNOW_NOT_FOUND (ESP_ERR_ESPNOW_BASE + 5) /*!< ESPNOW peer is not found */
#define ESP_ERR_ESPNOW_INTERNAL (ESP_ERR_ESPNOW_BASE + 6) /*!< Internal error */
#define ESP_ERR_ESPNOW_EXIST (ESP_ERR_ESPNOW_BASE + 7) /*!< ESPNOW peer has existed */
#define ESP_ERR_ESPNOW_IF (ESP_ERR_ESPNOW_BASE + 8) /*!< Interface error */
#define ESP_ERR_ESPNOW_CHAN (ESP_ERR_ESPNOW_BASE + 9) /*!< Channel error */
#define ESP_NOW_ETH_ALEN 6 /*!< Length of ESPNOW peer MAC address */
#define ESP_NOW_KEY_LEN 16 /*!< Length of ESPNOW peer local master key */
#define ESP_NOW_MAX_TOTAL_PEER_NUM 20 /*!< Maximum number of ESPNOW total peers */
#define ESP_NOW_MAX_ENCRYPT_PEER_NUM 6 /*!< Maximum number of ESPNOW encrypted peers */
#define ESP_NOW_MAX_DATA_LEN 250 /*!< Maximum length of ESPNOW data which is sent very time */
/**
* @brief Status of sending ESPNOW data .
*/
typedef enum {
ESP_NOW_SEND_SUCCESS = 0, /**< Send ESPNOW data successfully */
ESP_NOW_SEND_FAIL, /**< Send ESPNOW data fail */
} esp_now_send_status_t;
/**
* @brief ESPNOW peer information parameters.
*/
typedef struct esp_now_peer_info {
uint8_t peer_addr[ESP_NOW_ETH_ALEN]; /**< ESPNOW peer MAC address that is also the MAC address of station or softap */
uint8_t lmk[ESP_NOW_KEY_LEN]; /**< ESPNOW peer local master key that is used to encrypt data */
uint8_t channel; /**< Wi-Fi channel that peer uses to send/receive ESPNOW data. If the value is 0,
use the current channel which station or softap is on. Otherwise, it must be
set as the channel that station or softap is on. */
wifi_interface_t ifidx; /**< Wi-Fi interface that peer uses to send/receive ESPNOW data */
bool encrypt; /**< ESPNOW data that this peer sends/receives is encrypted or not */
void *priv; /**< ESPNOW peer private data */
} esp_now_peer_info_t;
/**
* @brief Number of ESPNOW peers which exist currently.
*/
typedef struct esp_now_peer_num {
int total_num; /**< Total number of ESPNOW peers, maximum value is ESP_NOW_MAX_TOTAL_PEER_NUM */
int encrypt_num; /**< Number of encrypted ESPNOW peers, maximum value is ESP_NOW_MAX_ENCRYPT_PEER_NUM */
} esp_now_peer_num_t;
/**
* @brief ESPNOW packet information
*/
typedef struct esp_now_recv_info {
uint8_t * src_addr; /**< Source address of ESPNOW packet */
uint8_t * des_addr; /**< Destination address of ESPNOW packet */
wifi_pkt_rx_ctrl_t * rx_ctrl; /**< Rx control info of ESPNOW packet */
} esp_now_recv_info_t;
/**
* @brief ESPNOW rate config
*
*/
typedef struct esp_now_rate_config {
wifi_phy_mode_t phymode; /**< ESPNOW phymode of specified interface */
wifi_phy_rate_t rate; /**< ESPNOW rate of specified interface*/
bool ersu; /**< ESPNOW using ersu send frame*/
bool dcm; /**< ESPNOW using dcm rate to send frame*/
} esp_now_rate_config_t;
/**
* @brief Callback function of receiving ESPNOW data
* @param esp_now_info received ESPNOW packet information
* @param data received data
* @param data_len length of received data
* @attention esp_now_info is a local variableit can only be used in the callback.
*/
typedef void (*esp_now_recv_cb_t)(const esp_now_recv_info_t * esp_now_info, const uint8_t *data, int data_len);
/**
* @brief Callback function of sending ESPNOW data
* @param mac_addr peer MAC address
* @param status status of sending ESPNOW data (succeed or fail)
*/
typedef void (*esp_now_send_cb_t)(const uint8_t *mac_addr, esp_now_send_status_t status);
/**
* @brief Initialize ESPNOW function
*
* @return
* - ESP_OK : succeed
* - ESP_ERR_ESPNOW_INTERNAL : Internal error
*/
esp_err_t esp_now_init(void);
/**
* @brief De-initialize ESPNOW function
*
* @return
* - ESP_OK : succeed
*/
esp_err_t esp_now_deinit(void);
/**
* @brief Get the version of ESPNOW
*
* @param version ESPNOW version
*
* @return
* - ESP_OK : succeed
* - ESP_ERR_ESPNOW_ARG : invalid argument
*/
esp_err_t esp_now_get_version(uint32_t *version);
/**
* @brief Register callback function of receiving ESPNOW data
*
* @param cb callback function of receiving ESPNOW data
*
* @return
* - ESP_OK : succeed
* - ESP_ERR_ESPNOW_NOT_INIT : ESPNOW is not initialized
* - ESP_ERR_ESPNOW_INTERNAL : internal error
*/
esp_err_t esp_now_register_recv_cb(esp_now_recv_cb_t cb);
/**
* @brief Unregister callback function of receiving ESPNOW data
*
* @return
* - ESP_OK : succeed
* - ESP_ERR_ESPNOW_NOT_INIT : ESPNOW is not initialized
*/
esp_err_t esp_now_unregister_recv_cb(void);
/**
* @brief Register callback function of sending ESPNOW data
*
* @param cb callback function of sending ESPNOW data
*
* @return
* - ESP_OK : succeed
* - ESP_ERR_ESPNOW_NOT_INIT : ESPNOW is not initialized
* - ESP_ERR_ESPNOW_INTERNAL : internal error
*/
esp_err_t esp_now_register_send_cb(esp_now_send_cb_t cb);
/**
* @brief Unregister callback function of sending ESPNOW data
*
* @return
* - ESP_OK : succeed
* - ESP_ERR_ESPNOW_NOT_INIT : ESPNOW is not initialized
*/
esp_err_t esp_now_unregister_send_cb(void);
/**
* @brief Send ESPNOW data
*
* @attention 1. If peer_addr is not NULL, send data to the peer whose MAC address matches peer_addr
* @attention 2. If peer_addr is NULL, send data to all of the peers that are added to the peer list
* @attention 3. The maximum length of data must be less than ESP_NOW_MAX_DATA_LEN
* @attention 4. The buffer pointed to by data argument does not need to be valid after esp_now_send returns
*
* @param peer_addr peer MAC address
* @param data data to send
* @param len length of data
*
* @return
* - ESP_OK : succeed
* - ESP_ERR_ESPNOW_NOT_INIT : ESPNOW is not initialized
* - ESP_ERR_ESPNOW_ARG : invalid argument
* - ESP_ERR_ESPNOW_INTERNAL : internal error
* - ESP_ERR_ESPNOW_NO_MEM : out of memory, when this happens, you can delay a while before sending the next data
* - ESP_ERR_ESPNOW_NOT_FOUND : peer is not found
* - ESP_ERR_ESPNOW_IF : current Wi-Fi interface doesn't match that of peer
* - ESP_ERR_ESPNOW_CHAN: current Wi-Fi channel doesn't match that of peer
*/
esp_err_t esp_now_send(const uint8_t *peer_addr, const uint8_t *data, size_t len);
/**
* @brief Add a peer to peer list
*
* @param peer peer information
*
* @return
* - ESP_OK : succeed
* - ESP_ERR_ESPNOW_NOT_INIT : ESPNOW is not initialized
* - ESP_ERR_ESPNOW_ARG : invalid argument
* - ESP_ERR_ESPNOW_FULL : peer list is full
* - ESP_ERR_ESPNOW_NO_MEM : out of memory
* - ESP_ERR_ESPNOW_EXIST : peer has existed
*/
esp_err_t esp_now_add_peer(const esp_now_peer_info_t *peer);
/**
* @brief Delete a peer from peer list
*
* @param peer_addr peer MAC address
*
* @return
* - ESP_OK : succeed
* - ESP_ERR_ESPNOW_NOT_INIT : ESPNOW is not initialized
* - ESP_ERR_ESPNOW_ARG : invalid argument
* - ESP_ERR_ESPNOW_NOT_FOUND : peer is not found
*/
esp_err_t esp_now_del_peer(const uint8_t *peer_addr);
/**
* @brief Modify a peer
*
* @param peer peer information
*
* @return
* - ESP_OK : succeed
* - ESP_ERR_ESPNOW_NOT_INIT : ESPNOW is not initialized
* - ESP_ERR_ESPNOW_ARG : invalid argument
* - ESP_ERR_ESPNOW_FULL : peer list is full
*/
esp_err_t esp_now_mod_peer(const esp_now_peer_info_t *peer);
/**
* @brief Config ESPNOW rate of specified interface
*
* @deprecated please use esp_now_set_peer_rate_config() instead.
*
* @attention 1. This API should be called after esp_wifi_start().
* @attention 2. This API only work when not use Wi-Fi 6 and esp_now_set_peer_rate_config() not called.
*
* @param ifx Interface to be configured.
* @param rate Phy rate to be configured.
*
* @return
* - ESP_OK: succeed
* - others: failed
*/
esp_err_t esp_wifi_config_espnow_rate(wifi_interface_t ifx, wifi_phy_rate_t rate)
__attribute__((deprecated("This API can be only used when rate is non-HE rate, \
please use esp_now_set_peer_rate_config if you want full support of the rate.")));
/**
* @brief Set ESPNOW rate config for each peer
*
* @attention 1. This API should be called after esp_wifi_start() and esp_now_init().
*
* @param peer_addr peer MAC address
* @param config rate config to be configured.
*
* @return
* - ESP_OK : succeed
* - ESP_ERR_ESPNOW_NOT_INIT : ESPNOW is not initialized
* - ESP_ERR_ESPNOW_ARG : invalid argument
* - ESP_ERR_ESPNOW_INTERNAL : internal error
*/
esp_err_t esp_now_set_peer_rate_config(const uint8_t *peer_addr, esp_now_rate_config_t *config);
/**
* @brief Get a peer whose MAC address matches peer_addr from peer list
*
* @param peer_addr peer MAC address
* @param peer peer information
*
* @return
* - ESP_OK : succeed
* - ESP_ERR_ESPNOW_NOT_INIT : ESPNOW is not initialized
* - ESP_ERR_ESPNOW_ARG : invalid argument
* - ESP_ERR_ESPNOW_NOT_FOUND : peer is not found
*/
esp_err_t esp_now_get_peer(const uint8_t *peer_addr, esp_now_peer_info_t *peer);
/**
* @brief Fetch a peer from peer list. Only return the peer which address is unicast, for the multicast/broadcast address, the function will ignore and try to find the next in the peer list.
*
* @param from_head fetch from head of list or not
* @param peer peer information
*
* @return
* - ESP_OK : succeed
* - ESP_ERR_ESPNOW_NOT_INIT : ESPNOW is not initialized
* - ESP_ERR_ESPNOW_ARG : invalid argument
* - ESP_ERR_ESPNOW_NOT_FOUND : peer is not found
*/
esp_err_t esp_now_fetch_peer(bool from_head, esp_now_peer_info_t *peer);
/**
* @brief Peer exists or not
*
* @param peer_addr peer MAC address
*
* @return
* - true : peer exists
* - false : peer not exists
*/
bool esp_now_is_peer_exist(const uint8_t *peer_addr);
/**
* @brief Get the number of peers
*
* @param num number of peers
*
* @return
* - ESP_OK : succeed
* - ESP_ERR_ESPNOW_NOT_INIT : ESPNOW is not initialized
* - ESP_ERR_ESPNOW_ARG : invalid argument
*/
esp_err_t esp_now_get_peer_num(esp_now_peer_num_t *num);
/**
* @brief Set the primary master key
*
* @param pmk primary master key
*
* @attention 1. primary master key is used to encrypt local master key
*
* @return
* - ESP_OK : succeed
* - ESP_ERR_ESPNOW_NOT_INIT : ESPNOW is not initialized
* - ESP_ERR_ESPNOW_ARG : invalid argument
*/
esp_err_t esp_now_set_pmk(const uint8_t *pmk);
/**
* @brief Set wake window for esp_now to wake up in interval unit
*
* @param window Milliseconds would the chip keep waked each interval, from 0 to 65535.
*
* @attention 1. This configuration could work at connected status.
* When ESP_WIFI_STA_DISCONNECTED_PM_ENABLE is enabled, this configuration could work at disconnected status.
* @attention 2. Default value is the maximum.
*
* @return
* - ESP_OK : succeed
* - ESP_ERR_ESPNOW_NOT_INIT : ESPNOW is not initialized
*/
esp_err_t esp_now_set_wake_window(uint16_t window);
/**
* @}
*/
/**
* @}
*/
#ifdef __cplusplus
}
#endif
#endif /* __ESP_NOW_H__ */

View File

@@ -0,0 +1,55 @@
/*
* SPDX-FileCopyrightText: 2019-2023 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#pragma once
#include "esp_netif_types.h"
#include "esp_wifi_types.h"
#ifdef __cplusplus
extern "C" {
#endif
#ifndef ESP_WIFI_MAX_CONN_NUM
// Number of maximum wifi connection may be undefined if we have no native wifi support on this target
// and at the same time there's no native interface injected by the wifi_remote component.
// In this case, we just let the header compilable, since no wifi API could be used (let's make a sanity check)
#if !CONFIG_SOC_WIFI_SUPPORTED && !CONFIG_ESP_WIFI_REMOTE_ENABLED
#define ESP_WIFI_MAX_CONN_NUM (15)
typedef struct wifi_sta_list_t wifi_sta_list_t;
#else
#error WiFi header mismatch! Please make sure you use the correct version of WiFi API
#endif
#endif // ESP_WIFI_MAX_CONN_NUM
/**
* @brief station list structure
*/
typedef struct {
int num; /**< Number of connected stations */
esp_netif_pair_mac_ip_t sta[ESP_WIFI_MAX_CONN_NUM]; /**< Connected stations */
} wifi_sta_mac_ip_list_t;
/**
* @brief Get IP information for stations connected to the Wi-Fi AP interface
*
* @note If `CONFIG_LWIP_DHCPS` is disabled then `ip` address field will not be populated in sta list
*
* @warning This API works only for the default Wi-Fi AP interface, i.e. esp-netif with key="WIFI_AP_DEF"
*
* @param[in] wifi_sta_list Wi-Fi station info list, returned from esp_wifi_ap_get_sta_list()
* @param[out] wifi_sta_ip_mac_list IP layer station info list, corresponding to MAC addresses provided in wifi_sta_list
*
* @return
* - ESP_OK
* - ESP_ERR_ESP_NETIF_NO_MEM
* - ESP_ERR_ESP_NETIF_INVALID_PARAMS
*/
esp_err_t esp_wifi_ap_get_sta_list_with_ip(const wifi_sta_list_t *wifi_sta_list, wifi_sta_mac_ip_list_t *wifi_sta_ip_mac_list);
#ifdef __cplusplus
}
#endif

View File

@@ -0,0 +1,440 @@
/*
* SPDX-FileCopyrightText: 2017-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef __ESP_WIFI_CRYPTO_TYPES_H__
#define __ESP_WIFI_CRYPTO_TYPES_H__
/* This is an internal API header for configuring the implementation used for WiFi cryptographic
operations.
During normal operation, you don't need to use any of these types or functions in this header.
See esp_wifi.h & esp_wifi_types.h instead.
*/
#include <stdint.h>
#include <stddef.h>
#include <stdbool.h>
#ifdef __cplusplus
extern "C" {
#endif
#define ESP_WIFI_CRYPTO_VERSION 0x00000001
/*
* Enumeration for hash operations.
* When WPA2 is connecting, this enum is used to
* request a hash algorithm via crypto_hash_xxx functions.
*/
typedef enum {
ESP_CRYPTO_HASH_ALG_MD5, ESP_CRYPTO_HASH_ALG_SHA1,
ESP_CRYPTO_HASH_ALG_HMAC_MD5, ESP_CRYPTO_HASH_ALG_HMAC_SHA1,
ESP_CRYPTO_HASH_ALG_SHA256, ESP_CRYPTO_HASH_ALG_HMAC_SHA256
} esp_crypto_hash_alg_t;
/*
* Enumeration for block cipher operations.
* When WPA2 is connecting, this enum is used to request a block
* cipher algorithm via crypto_cipher_xxx functions.
*/
typedef enum {
ESP_CRYPTO_CIPHER_NULL, ESP_CRYPTO_CIPHER_ALG_AES, ESP_CRYPTO_CIPHER_ALG_3DES,
ESP_CRYPTO_CIPHER_ALG_DES, ESP_CRYPTO_CIPHER_ALG_RC2, ESP_CRYPTO_CIPHER_ALG_RC4
} esp_crypto_cipher_alg_t;
/*
* This structure is about the algorithm when do crypto_hash operation, for detail,
* please reference to the structure crypto_hash.
*/
typedef struct crypto_hash esp_crypto_hash_t;
/*
* This structure is about the algorithm when do crypto_cipher operation, for detail,
* please reference to the structure crypto_cipher.
*/
typedef struct crypto_cipher esp_crypto_cipher_t;
/**
* @brief The AES 128 encrypt callback function used by esp_wifi.
*
* @param key Encryption key.
* @param iv Encryption IV for CBC mode (16 bytes).
* @param data Data to encrypt in-place.
* @param data_len Length of data in bytes (must be divisible by 16)
*/
typedef int (*esp_aes_128_encrypt_t)(const unsigned char *key, const unsigned char *iv, unsigned char *data, int data_len);
/**
* @brief The AES 128 decrypt callback function used by esp_wifi.
*
* @param key Decryption key.
* @param iv Decryption IV for CBC mode (16 bytes).
* @param data Data to decrypt in-place.
* @param data_len Length of data in bytes (must be divisible by 16)
*
*/
typedef int (*esp_aes_128_decrypt_t)(const unsigned char *key, const unsigned char *iv, unsigned char *data, int data_len);
/**
* @brief The AES wrap callback function used by esp_wifi.
*
* @param kek 16-octet Key encryption key (KEK).
* @param n Length of the plaintext key in 64-bit units;
* @param plain Plaintext key to be wrapped, n * 64 bits
* @param cipher Wrapped key, (n + 1) * 64 bits
*
*/
typedef int (*esp_aes_wrap_t)(const unsigned char *kek, int n, const unsigned char *plain, unsigned char *cipher);
/**
* @brief The AES unwrap callback function used by esp_wifi.
*
* @param kek 16-octet Key decryption key (KEK).
* @param n Length of the plaintext key in 64-bit units;
* @param cipher Wrapped key to be unwrapped, (n + 1) * 64 bits
* @param plain Plaintext key, n * 64 bits
*
*/
typedef int (*esp_aes_unwrap_t)(const unsigned char *kek, int n, const unsigned char *cipher, unsigned char *plain);
/**
* @brief The SHA256 callback function used by esp_wifi.
*
* @param key Key for HMAC operations.
* @param key_len Length of the key in bytes.
* @param num_elem Number of elements in the data vector.
* @param addr Pointers to the data areas.
* @param len Lengths of the data blocks.
* @param mac Buffer for the hash (32 bytes).
*
*/
typedef int (*esp_hmac_sha256_vector_t)(const unsigned char *key, int key_len, int num_elem,
const unsigned char *addr[], const int *len, unsigned char *mac);
/**
* @brief The SHA256 PRF callback function used by esp_wifi.
*
* @param key Key for PRF.
* @param key_len Length of the key in bytes.
* @param label A unique label for each purpose of the PRF.
* @param data Extra data to bind into the key.
* @param data_len Length of the data.
* @param buf Buffer for the generated pseudo-random key.
* @param buf_len Number of bytes of key to generate.
*
*/
typedef int (*esp_sha256_prf_t)(const unsigned char *key, int key_len, const char *label,
const unsigned char *data, int data_len, unsigned char *buf, int buf_len);
/**
* @brief HMAC-MD5 callback function over data buffer (RFC 2104)'
*
* @param key Key for HMAC operations
* @param key_len Length of the key in bytes
* @param data Pointers to the data area
* @param data_len Length of the data area
* @param mac Buffer for the hash (16 bytes)
* Returns: 0 on success, -1 on failure
*/
typedef int (*esp_hmac_md5_t)(const unsigned char *key, unsigned int key_len, const unsigned char *data,
unsigned int data_len, unsigned char *mac);
/**
* @brief HMAC-MD5 callback function over data vector (RFC 2104)
*
* @param key Key for HMAC operations
* @param key_len Length of the key in bytes
* @param num_elem Number of elements in the data vector
* @param addr Pointers to the data areas
* @param len Lengths of the data blocks
* @param mac Buffer for the hash (16 bytes)
* Returns: 0 on success, -1 on failure
*/
typedef int (*esp_hmac_md5_vector_t)(const unsigned char *key, unsigned int key_len, unsigned int num_elem,
const unsigned char *addr[], const unsigned int *len, unsigned char *mac);
/**
* @brief HMAC-SHA1 callback function over data buffer (RFC 2104)
*
* @param key Key for HMAC operations
* @param key_len Length of the key in bytes
* @param data Pointers to the data area
* @param data_len Length of the data area
* @param mac Buffer for the hash (20 bytes)
* Returns: 0 on success, -1 of failure
*/
typedef int (*esp_hmac_sha1_t)(const unsigned char *key, unsigned int key_len, const unsigned char *data,
unsigned int data_len, unsigned char *mac);
/**
* @brief HMAC-SHA1 callback function over data vector (RFC 2104)
*
* @param key Key for HMAC operations
* @param key_len Length of the key in bytes
* @param num_elem Number of elements in the data vector
* @param addr Pointers to the data areas
* @param len Lengths of the data blocks
* @param mac Buffer for the hash (20 bytes)
* Returns: 0 on success, -1 on failure
*/
typedef int (*esp_hmac_sha1_vector_t)(const unsigned char *key, unsigned int key_len, unsigned int num_elem,
const unsigned char *addr[], const unsigned int *len, unsigned char *mac);
/**
* @brief SHA1-based Pseudo-Random Function (PRF) (IEEE 802.11i, 8.5.1.1) callback function
*
* @param key Key for PRF
* @param key_len Length of the key in bytes
* @param label A unique label for each purpose of the PRF
* @param data Extra data to bind into the key
* @param data_len Length of the data
* @param buf Buffer for the generated pseudo-random key
* @param buf_len Number of bytes of key to generate
* Returns: 0 on success, -1 of failure
*
* This function is used to derive new, cryptographically separate keys from a
* given key (e.g., PMK in IEEE 802.11i).
*/
typedef int (*esp_sha1_prf_t)(const unsigned char *key, unsigned int key_len, const char *label,
const unsigned char *data, unsigned int data_len, unsigned char *buf, unsigned int buf_len);
/**
* @brief SHA-1 hash callback function for data vector
*
* @param num_elem Number of elements in the data vector
* @param addr Pointers to the data areas
* @param len Lengths of the data blocks
* @param mac Buffer for the hash
* Returns: 0 on success, -1 on failure
*/
typedef int (*esp_sha1_vector_t)(unsigned int num_elem, const unsigned char *addr[], const unsigned int *len,
unsigned char *mac);
/**
* @brief SHA1-based key derivation function (PBKDF2) callback function for IEEE 802.11i
*
* @param passphrase ASCII passphrase
* @param ssid SSID
* @param ssid_len SSID length in bytes
* @param iterations Number of iterations to run
* @param buf Buffer for the generated key
* @param buflen Length of the buffer in bytes
* Returns: 0 on success, -1 of failure
*
* This function is used to derive PSK for WPA-PSK. For this protocol,
* iterations is set to 4096 and buflen to 32. This function is described in
* IEEE Std 802.11-2004, Clause H.4. The main construction is from PKCS#5 v2.0.
*/
typedef int (*esp_pbkdf2_sha1_t)(const char *passphrase, const char *ssid, unsigned int ssid_len,
int iterations, unsigned char *buf, unsigned int buflen);
/**
* @brief XOR RC4 stream callback function to given data with skip-stream-start
*
* @param key RC4 key
* @param keylen RC4 key length
* @param skip number of bytes to skip from the beginning of the RC4 stream
* @param data data to be XOR'ed with RC4 stream
* @param data_len buf length
* Returns: 0 on success, -1 on failure
*
* Generate RC4 pseudo random stream for the given key, skip beginning of the
* stream, and XOR the end result with the data buffer to perform RC4
* encryption/decryption.
*/
typedef int (*esp_rc4_skip_t)(const unsigned char *key, unsigned int keylen, unsigned int skip,
unsigned char *data, unsigned int data_len);
/**
* @brief MD5 hash callback function for data vector
*
* @param num_elem Number of elements in the data vector
* @param addr Pointers to the data areas
* @param len Lengths of the data blocks
* @param mac Buffer for the hash
* Returns: 0 on success, -1 on failure
*/
typedef int (*esp_md5_vector_t)(unsigned int num_elem, const unsigned char *addr[], const unsigned int *len,
unsigned char *mac);
/**
* @brief Encrypt one AES block callback function
*
* @param ctx Context pointer from aes_encrypt_init()
* @param plain Plaintext data to be encrypted (16 bytes)
* @param crypt Buffer for the encrypted data (16 bytes)
*/
typedef void (*esp_aes_encrypt_t)(void *ctx, const unsigned char *plain, unsigned char *crypt);
/**
* @brief Initialize AES callback function for encryption
*
* @param key Encryption key
* @param len Key length in bytes (usually 16, i.e., 128 bits)
* Returns: Pointer to context data or %NULL on failure
*/
typedef void * (*esp_aes_encrypt_init_t)(const unsigned char *key, unsigned int len);
/**
* @brief Deinitialize AES encryption callback function
*
* @param ctx Context pointer from aes_encrypt_init()
*/
typedef void (*esp_aes_encrypt_deinit_t)(void *ctx);
/**
* @brief Decrypt one AES block callback function
*
* @param ctx Context pointer from aes_encrypt_init()
* @param crypt Encrypted data (16 bytes)
* @param plain Buffer for the decrypted data (16 bytes)
*/
typedef void (*esp_aes_decrypt_t)(void *ctx, const unsigned char *crypt, unsigned char *plain);
/**
* @brief Initialize AES callback function for decryption
*
* @param key Decryption key
* @param len Key length in bytes (usually 16, i.e., 128 bits)
* Returns: Pointer to context data or %NULL on failure
*/
typedef void * (*esp_aes_decrypt_init_t)(const unsigned char *key, unsigned int len);
/**
* @brief Deinitialize AES decryption callback function
*
* @param ctx Context pointer from aes_encrypt_init()
*/
typedef void (*esp_aes_decrypt_deinit_t)(void *ctx);
/**
* @brief One-Key CBC MAC (OMAC1) hash with AES-128 callback function for MIC computation
*
* @param key 128-bit key for the hash operation
* @param data Data buffer for which a MIC is computed
* @param data_len Length of data buffer in bytes
* @param mic Buffer for MIC (128 bits, i.e., 16 bytes)
* Returns: 0 on success, -1 on failure
*/
typedef int (*esp_omac1_aes_128_t)(const uint8_t *key, const uint8_t *data, size_t data_len,
uint8_t *mic);
/**
* @brief Decrypt data callback function using CCMP (Counter Mode CBC-MAC Protocol OR
* Counter Mode Cipher Block Chaining Message Authentication
* Code Protocol) which is used in IEEE 802.11i RSN standard.
* @param tk 128-bit Temporal Key for obtained during 4-way handshake
* @param ieee80211_hdr Pointer to IEEE802.11 frame headeri needed for AAD
* @param data Pointer to encrypted data buffer
* @param data_len Encrypted data length in bytes
* @param decrypted_len Length of decrypted data
* @param espnow_pkt Indicates if it's an ESPNOW packet
* Returns: Pointer to decrypted data on success, NULL on failure
*/
typedef uint8_t * (*esp_ccmp_decrypt_t)(const uint8_t *tk, const uint8_t *ieee80211_hdr,
const uint8_t *data, size_t data_len,
size_t *decrypted_len, bool espnow_pkt);
/**
* @brief Encrypt data callback function using CCMP (Counter Mode CBC-MAC Protocol OR
* Counter Mode Cipher Block Chaining Message Authentication
* Code Protocol) which is used in IEEE 802.11i RSN standard.
* @param tk 128-bit Temporal Key for obtained during 4-way handshake
* @param frame Pointer to IEEE802.11 frame including header
* @param len Length of the frame including header
* @param hdrlen Length of the header
* @param pn Packet Number counter
* @param keyid Key ID to be mentioned in CCMP Vector
* @param encrypted_len Length of the encrypted frame including header
*/
typedef uint8_t * (*esp_ccmp_encrypt_t)(const uint8_t *tk, uint8_t *frame, size_t len, size_t hdrlen,
uint8_t *pn, int keyid, size_t *encrypted_len);
/**
* @brief One-Key GMAC hash callback function with AES for MIC computation
*
* @param key key for the hash operation
* @param keylen key length
* @param iv initialization vector
* @param iv_len initialization vector length
* @param aad aad
* @param aad_len aad length
* @param mic Buffer for MIC (128 bits, i.e., 16 bytes)
* Returns: 0 on success, -1 on failure
*/
typedef int (*esp_aes_gmac_t)(const uint8_t *key, size_t keylen, const uint8_t *iv, size_t iv_len,
const uint8_t *aad, size_t aad_len, uint8_t *mic);
/**
* @brief SHA256 hash callback function for data vector
* @param num_elem Number of elements in the data vector
* @param addr Pointers to the data areas
* @param len Lengths of the data blocks
* @param buf Buffer for the hash
* Returns: 0 on success, -1 on failure
*/
typedef int (*esp_sha256_vector_t)(size_t num_elem, const uint8_t *addr[], const size_t *len, uint8_t *buf);
/**
* @brief CRC32 value callback function in little endian.
*
* @param crc Initial CRC value (result of last calculation or 0 for the first time)
* @param buf Data buffer that used to calculate the CRC value
* @param len Length of the data buffer
* @return CRC32 value
*/
typedef uint32_t (*esp_crc32_le_t)(uint32_t crc, uint8_t const *buf, uint32_t len);
/**
* @brief The crypto callback function structure used by esp_wifi.
* The structure can be set as software crypto or the crypto optimized by device's
* hardware.
*/
typedef struct wpa_crypto_funcs_t {
uint32_t size; /**< The crypto callback function structure size */
uint32_t version; /**< The crypto callback function structure version */
esp_aes_wrap_t aes_wrap; /**< The AES wrap callback function used by esp_wifi */
esp_aes_unwrap_t aes_unwrap; /**< The AES unwrap callback function used by esp_wifi */
esp_hmac_sha256_vector_t hmac_sha256_vector; /**< The SHA256 callback function used by esp_wifi */
esp_sha256_prf_t sha256_prf; /**< The SHA256 PRF callback function used by esp_wifi */
esp_hmac_md5_t hmac_md5; /**< HMAC-MD5 callback function over data buffer (RFC 2104) */
esp_hmac_md5_vector_t hamc_md5_vector; /**< HMAC-MD5 callback function over data vector (RFC 2104) */
esp_hmac_sha1_t hmac_sha1; /**< HMAC-SHA1 callback function over data buffer (RFC 2104) */
esp_hmac_sha1_vector_t hmac_sha1_vector; /**< HMAC-SHA1 callback function over data vector (RFC 2104) */
esp_sha1_prf_t sha1_prf; /**< SHA1-based Pseudo-Random Function (PRF) (IEEE 802.11i, 8.5.1.1) callback function */
esp_sha1_vector_t sha1_vector; /**< SHA-1 hash callback function for data vector */
esp_pbkdf2_sha1_t pbkdf2_sha1; /**< SHA1-based key derivation function (PBKDF2) callback function for IEEE 802.11i */
esp_rc4_skip_t rc4_skip; /**< XOR RC4 stream callback function to given data with skip-stream-start */
esp_md5_vector_t md5_vector; /**< MD5 hash callback function for data vector */
esp_aes_encrypt_t aes_encrypt; /**< Encrypt one AES block callback function */
esp_aes_encrypt_init_t aes_encrypt_init; /**< Initialize AES callback function for encryption */
esp_aes_encrypt_deinit_t aes_encrypt_deinit; /**< Deinitialize AES encryption callback function */
esp_aes_decrypt_t aes_decrypt; /**< Decrypt one AES block callback function */
esp_aes_decrypt_init_t aes_decrypt_init; /**< Initialize AES callback function for decryption */
esp_aes_decrypt_deinit_t aes_decrypt_deinit; /**< Deinitialize AES decryption callback function */
esp_aes_128_encrypt_t aes_128_encrypt; /**< The AES 128 encrypt callback function used by esp_wifi */
esp_aes_128_decrypt_t aes_128_decrypt; /**< The AES 128 decrypt callback function used by esp_wifi */
esp_omac1_aes_128_t omac1_aes_128; /**< One-Key CBC MAC (OMAC1) hash with AES-128 callback function for MIC computation */
esp_ccmp_decrypt_t ccmp_decrypt; /**< Decrypt data callback function using CCMP */
esp_ccmp_encrypt_t ccmp_encrypt; /**< Encrypt data callback function using CCMP */
esp_aes_gmac_t aes_gmac; /**< One-Key GMAC hash callback function with AES for MIC computation */
esp_sha256_vector_t sha256_vector; /**< SHA256 hash callback function for data vector */
esp_crc32_le_t crc32; /**< CRC32 value callback function in little endian */
} wpa_crypto_funcs_t;
/**
* @brief The crypto callback function structure used in mesh vendor IE encryption. The
* structure can be set as software crypto or the crypto optimized by device's
* hardware.
*/
typedef struct {
esp_aes_128_encrypt_t aes_128_encrypt; /**< Callback function used in mesh vendor IE encryption */
esp_aes_128_decrypt_t aes_128_decrypt; /**< Callback function used in mesh vendor IE decryption */
} mesh_crypto_funcs_t;
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -0,0 +1,152 @@
/*
* SPDX-FileCopyrightText: 2019-2023 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef _ESP_WIFI_DEFAULT_H
#define _ESP_WIFI_DEFAULT_H
#include "esp_netif.h"
#include "esp_wifi_types.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* @brief Attaches wifi station interface to supplied netif
*
* @param esp_netif instance to attach the wifi station to
*
* @return
* - ESP_OK on success
* - ESP_FAIL if attach failed
*/
esp_err_t esp_netif_attach_wifi_station(esp_netif_t *esp_netif);
/**
* @brief Attaches wifi soft AP interface to supplied netif
*
* @param esp_netif instance to attach the wifi AP to
*
* @return
* - ESP_OK on success
* - ESP_FAIL if attach failed
*/
esp_err_t esp_netif_attach_wifi_ap(esp_netif_t *esp_netif);
/**
* @brief Sets default wifi event handlers for STA interface
*
* @return
* - ESP_OK on success, error returned from esp_event_handler_register if failed
*/
esp_err_t esp_wifi_set_default_wifi_sta_handlers(void);
/**
* @brief Sets default wifi event handlers for AP interface
*
* @return
* - ESP_OK on success, error returned from esp_event_handler_register if failed
*/
esp_err_t esp_wifi_set_default_wifi_ap_handlers(void);
/**
* @brief Sets default wifi event handlers for NAN interface
*
* @return
* - ESP_OK on success, error returned from esp_event_handler_register if failed
*/
esp_err_t esp_wifi_set_default_wifi_nan_handlers(void);
/**
* @brief Clears default wifi event handlers for supplied network interface
*
* @param esp_netif instance of corresponding if object
*
* @return
* - ESP_OK on success, error returned from esp_event_handler_register if failed
*/
esp_err_t esp_wifi_clear_default_wifi_driver_and_handlers(void *esp_netif);
/**
* @brief Creates default WIFI AP. In case of any init error this API aborts.
*
* @note The API creates esp_netif object with default WiFi access point config,
* attaches the netif to wifi and registers wifi handlers to the default event loop.
* This API uses assert() to check for potential errors, so it could abort the program.
* (Note that the default event loop needs to be created prior to calling this API)
*
* @return pointer to esp-netif instance
*/
esp_netif_t* esp_netif_create_default_wifi_ap(void);
/**
* @brief Creates default WIFI STA. In case of any init error this API aborts.
*
* @note The API creates esp_netif object with default WiFi station config,
* attaches the netif to wifi and registers wifi handlers to the default event loop.
* This API uses assert() to check for potential errors, so it could abort the program.
* (Note that the default event loop needs to be created prior to calling this API)
*
* @return pointer to esp-netif instance
*/
esp_netif_t* esp_netif_create_default_wifi_sta(void);
/**
* @brief Creates default WIFI NAN. In case of any init error this API aborts.
*
* @note The API creates esp_netif object with default WiFi station config,
* attaches the netif to wifi and registers wifi handlers to the default event loop.
* (Note that the default event loop needs to be created prior to calling this API)
*
* @return pointer to esp-netif instance
*/
esp_netif_t* esp_netif_create_default_wifi_nan(void);
/**
* @brief Destroys default WIFI netif created with esp_netif_create_default_wifi_...() API.
*
* @param[in] esp_netif object to detach from WiFi and destroy
*
* @note This API unregisters wifi handlers and detaches the created object from the wifi.
* (this function is a no-operation if esp_netif is NULL)
*/
void esp_netif_destroy_default_wifi(void *esp_netif);
/**
* @brief Creates esp_netif WiFi object based on the custom configuration.
*
* @attention This API DOES NOT register default handlers!
*
* @param[in] wifi_if type of wifi interface
* @param[in] esp_netif_config inherent esp-netif configuration pointer
*
* @return pointer to esp-netif instance
*/
esp_netif_t* esp_netif_create_wifi(wifi_interface_t wifi_if, const esp_netif_inherent_config_t *esp_netif_config);
/**
* @brief Creates default STA and AP network interfaces for esp-mesh.
*
* Both netifs are almost identical to the default station and softAP, but with
* DHCP client and server disabled. Please note that the DHCP client is typically
* enabled only if the device is promoted to a root node.
*
* Returns created interfaces which could be ignored setting parameters to NULL
* if an application code does not need to save the interface instances
* for further processing.
*
* @param[out] p_netif_sta pointer where the resultant STA interface is saved (if non NULL)
* @param[out] p_netif_ap pointer where the resultant AP interface is saved (if non NULL)
*
* @return ESP_OK on success
*/
esp_err_t esp_netif_create_default_wifi_mesh_netifs(esp_netif_t **p_netif_sta, esp_netif_t **p_netif_ap);
#ifdef __cplusplus
}
#endif
#endif //_ESP_WIFI_DEFAULT_H

View File

@@ -0,0 +1,221 @@
/*
* SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#pragma once
#include <stdint.h>
#include <stdbool.h>
#include "esp_err.h"
#include "esp_wifi_he_types.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* @brief Set up an individual TWT agreement (NegotiationType=0) or change TWT parameters of the existing TWT agreement
* - TWT Wake Interval = TWT Wake Interval Mantissa * (2 ^ TWT Wake Interval Exponent), unit: us
* - e.g. TWT Wake Interval Mantissa = 512, TWT Wake Interval Exponent = 12, then TWT Wake Interval is 2097.152 ms
* Nominal Minimum Wake Duration = 255, then TWT Wake Duration is 65.28 ms
*
* @attention Support at most 8 TWT agreements, otherwise ESP_ERR_WIFI_TWT_FULL will be returned.
* Support sleep time up to (1 << 35) us.
*
* @param[in,out] setup_config pointer to itwt setup config structure.
*
* @return
* - ESP_OK: succeed
* - ESP_ERR_WIFI_NOT_INIT: WiFi is not initialized by esp_wifi_init
* - ESP_ERR_WIFI_NOT_STARTED: WiFi is not started by esp_wifi_start
* - ESP_ERR_WIFI_CONN: WiFi internal error, station or soft-AP control block wrong
* - ESP_ERR_WIFI_NOT_CONNECT: The station is in disconnect status
* - ESP_ERR_WIFI_TWT_FULL: no available flow id
* - ESP_ERR_INVALID_ARG: invalid argument
*/
esp_err_t esp_wifi_sta_itwt_setup(wifi_itwt_setup_config_t *setup_config);
/**
* @brief Tear down individual TWT agreements
*
* @param[in] flow_id The value range is [0, 7].
* FLOW_ID_ALL indicates tear down all individual TWT agreements.
*
* @return
* - ESP_OK: succeed
* - ESP_ERR_WIFI_NOT_INIT: WiFi is not initialized by esp_wifi_init
* - ESP_ERR_WIFI_NOT_STARTED: WiFi is not started by esp_wifi_start
* - ESP_ERR_WIFI_CONN: WiFi internal error, station or soft-AP control block wrong
* - ESP_ERR_WIFI_NOT_CONNECT: The station is in disconnect status
* - ESP_ERR_INVALID_ARG: invalid argument
*/
esp_err_t esp_wifi_sta_itwt_teardown(int flow_id);
/**
* @brief Send a TWT Information frame to AP for suspending/resuming established iTWT agreements.
*
* @param[in] flow_id The value range is [0, 7].
* FLOW_ID_ALL indicates suspend all individual TWT agreements
* @param[in] suspend_time_ms If the value is 0, indicates the specified flow_id or all established agreements will be suspended until resume by users.
* If the value is greater than 0, indicates the specified flow_id or all established agreements will be suspended until suspend_time_ms timeout, unit: ms.
*
* @return
* - ESP_OK: succeed
* - ESP_ERR_WIFI_NOT_INIT: WiFi is not initialized by esp_wifi_init
* - ESP_ERR_WIFI_NOT_STARTED: WiFi is not started by esp_wifi_start
* - ESP_ERR_WIFI_CONN: WiFi internal error, station or soft-AP control block wrong
* - ESP_ERR_WIFI_NOT_ASSOC: WiFi is not associated
* - ESP_ERR_INVALID_ARG: invalid argument
*/
esp_err_t esp_wifi_sta_itwt_suspend(int flow_id, int suspend_time_ms);
/**
* @brief Get flow id status
*
* @param[in] flow_id_bitmap Flow id status bitmap with 8 bit. Each bit represents that whether the corresponding flow id is setup.
* 1: setup, 0: not setup.
*
* @return
* - ESP_OK: succeed
* - ESP_ERR_WIFI_NOT_INIT: WiFi is not initialized by esp_wifi_init
* - ESP_ERR_WIFI_NOT_STARTED: WiFi is not started by esp_wifi_start
* - ESP_ERR_WIFI_CONN: WiFi internal error, station or soft-AP control block wrong
* - ESP_ERR_WIFI_NOT_CONNECT: The station is in disconnect status
* - ESP_ERR_INVALID_ARG: invalid argument
*/
esp_err_t esp_wifi_sta_itwt_get_flow_id_status(int *flow_id_bitmap);
/**
* @brief Send probe to update TSF time
*
* @attention In bad network, timeout_ms is variable with the network
*
* @param[in] timeout_ms The estimated time includes sending probe request and receiving probe response, unit: ms.
*
* @return
* - ESP_OK: succeed
* - ESP_ERR_WIFI_NOT_INIT: WiFi is not initialized by esp_wifi_init
* - ESP_ERR_WIFI_NOT_STARTED: WiFi is not started by esp_wifi_start
* - ESP_ERR_WIFI_CONN: WiFi internal error, station or soft-AP control block wrong
* - ESP_ERR_WIFI_NOT_ASSOC: WiFi is not associated
*/
esp_err_t esp_wifi_sta_itwt_send_probe_req(int timeout_ms);
/**
* @brief Set time offset with TBTT of target wake time field in itwt setup request frame.
*
* @param[in] offset_us Offset with TBTT of target wake time field in itwt setup request frame, range is [0, 102400], unit microseconds.
*
* @return
* - ESP_OK: succeed
* - ESP_ERR_WIFI_NOT_INIT: WiFi is not initialized by esp_wifi_init
* - ESP_ERR_WIFI_NOT_STARTED: WiFi is not started by esp_wifi_start
* - ESP_ERR_WIFI_CONN: WiFi internal error, station or soft-AP control block wrong
* - ESP_ERR_WIFI_NOT_ASSOC: WiFi is not associated
* - ESP_ERR_INVALID_ARG: invalid argument
*/
esp_err_t esp_wifi_sta_itwt_set_target_wake_time_offset(int offset_us);
/**
* @brief Enable the reception statistics.
*
* @param[in] rx_stats indicate whether enable the reception statistics for HT, HE SU, HE ER SU and legacy
* @param[in] rx_mu_stats indicate whether enable the reception statistics for DL MU-MIMO and DL OFDMA
*
* @return
* - ESP_OK: succeed
* - ESP_ERR_NO_MEM: out of memory
*/
esp_err_t esp_wifi_enable_rx_statistics(bool rx_stats, bool rx_mu_stats);
/**
* @brief Enable the transmission statistics.
*
* @param[in] aci access category of the transmission
* @param[in] tx_stats indicate whether enable the transmission statistics
*
* @return
* - ESP_OK: succeed
* - ESP_ERR_NO_MEM: out of memory
*/
esp_err_t esp_wifi_enable_tx_statistics(esp_wifi_aci_t aci, bool tx_stats);
/**
* @brief Set up an broadcast TWT agreement (NegotiationType=3) or change TWT parameters of the existing TWT agreement
* - TWT Wake Interval = TWT Wake Interval Mantissa * (2 ^ TWT Wake Interval Exponent), unit: us
* - e.g. TWT Wake Interval Mantissa = 512, TWT Wake Interval Exponent = 12, then TWT Wake Interval is 2097.152 ms
* Nominal Minimum Wake Duration = 255, then TWT Wake Duration is 65.28 ms
*
* @attention Support at most 32 TWT agreements, otherwise ESP_ERR_WIFI_TWT_FULL will be returned.
* Support sleep time up to (1 << 35) us.
*
* @param[in,out] config pointer to btwt setup config structure.
*
* @return
* - ESP_OK: succeed
* - ESP_ERR_WIFI_NOT_INIT: WiFi is not initialized by esp_wifi_init
* - ESP_ERR_WIFI_NOT_STARTED: WiFi is not started by esp_wifi_start
* - ESP_ERR_WIFI_CONN: WiFi internal error, station or soft-AP control block wrong
* - ESP_ERR_WIFI_NOT_CONNECT: The station is in disconnect status
* - ESP_ERR_WIFI_TWT_FULL: no available flow id
* - ESP_ERR_INVALID_ARG: invalid argument
*/
esp_err_t esp_wifi_sta_btwt_setup(wifi_btwt_setup_config_t *config);
/**
* @brief Tear down broadcast TWT agreements
*
* @param[in] btwt_id The value range is [0, 31].
* BTWT_ID_ALL indicates tear down all broadcast TWT agreements.
*
* @return
* - ESP_OK: succeed
* - ESP_ERR_WIFI_NOT_INIT: WiFi is not initialized by esp_wifi_init
* - ESP_ERR_WIFI_NOT_STARTED: WiFi is not started by esp_wifi_start
* - ESP_ERR_WIFI_CONN: WiFi internal error, station or soft-AP control block wrong
* - ESP_ERR_WIFI_NOT_CONNECT: The station is in disconnect status
* - ESP_ERR_INVALID_ARG: invalid argument
*/
esp_err_t esp_wifi_sta_btwt_teardown(uint8_t btwt_id);
/**
* @brief Get number of broadcast TWTs supported by the connected AP
*
* @param[out] btwt_number store number of btwts supported by the connected AP
*
* @return
* - ESP_OK: succeed
* - ESP_ERR_WIFI_NOT_INIT: WiFi is not initialized by esp_wifi_init
* - ESP_ERR_WIFI_NOT_STARTED: WiFi is not started by esp_wifi_start
* - ESP_ERR_INVALID_ARG: invalid argument
*/
esp_err_t esp_wifi_sta_get_btwt_num(uint8_t *btwt_number);
/**
* @brief Get broadcast TWT information
*
* @param[in] btwt_number As input param, it stores max btwt number AP supported.
* @param[in] btwt_info array to hold the btwt information supported by AP, and the array size must be at least as large as the BTWT number.
*
* @return
* - ESP_OK: succeed
* - ESP_FAIL: fail
* - ESP_ERR_WIFI_CONN: WiFi internal error, station or soft-AP control block wrong
*/
esp_err_t esp_wifi_sta_btwt_get_info(uint8_t btwt_number, esp_wifi_btwt_info_t *btwt_info);
/**
* @brief Set WiFi TWT config
*
* @param[in] config pointer to the WiFi TWT configure structure.
*
* @return
* - ESP_OK: succeed
*/
esp_err_t esp_wifi_sta_twt_config(wifi_twt_config_t *config);
#ifdef __cplusplus
}
#endif

View File

@@ -0,0 +1,434 @@
/*
* SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#pragma once
#include <stdint.h>
#include <stdbool.h>
#include "esp_err.h"
#ifdef __cplusplus
extern "C" {
#endif
#define FLOW_ID_ALL (8)
#define BTWT_ID_ALL (32)
#define BSS_MAX_COLOR (63)
/**
* @brief Access category
*/
typedef enum {
ESP_WIFI_ACI_VO, /**< voice traffic */
ESP_WIFI_ACI_VI, /**< video traffic */
ESP_WIFI_ACI_BE, /**< best effort traffic */
ESP_WIFI_ACI_BK, /**< background traffic */
ESP_WIFI_ACI_MAX, /**< the max value */
} esp_wifi_aci_t;
/**
* @brief Channel state information(CSI) HE STBC CSI selection
*/
enum {
ESP_CSI_ACQUIRE_STBC_HELTF1, /**< HE STBC: select the first HE-LTF */
ESP_CSI_ACQUIRE_STBC_HELTF2, /**< HE STBC: select the second HE-LTF */
ESP_CSI_ACQUIRE_STBC_SAMPLE_HELTFS, /**< HE STBC: sample alternating scarier of HE-LTF1 and HE-LTF2 */
};
/**
* @brief Channel state information(CSI) configuration type
*/
#if CONFIG_SLAVE_IDF_TARGET_ESP32C5
typedef struct {
uint32_t enable : 1; /**< enable to acquire CSI */
uint32_t acquire_csi_legacy : 1; /**< enable to acquire L-LTF */
uint32_t acquire_csi_force_lltf : 1; /**< enable to acquire L-LTF */
uint32_t acquire_csi_ht20 : 1; /**< enable to acquire HT-LTF when receiving an HT20 PPDU */
uint32_t acquire_csi_ht40 : 1; /**< enable to acquire HT-LTF when receiving an HT40 PPDU */
uint32_t acquire_csi_vht : 1; /**< enable to acquire VHT-LTF when receiving an VHT20 PPDU */
uint32_t acquire_csi_su : 1; /**< enable to acquire HE-LTF when receiving an HE20 SU PPDU */
uint32_t acquire_csi_mu : 1; /**< enable to acquire HE-LTF when receiving an HE20 MU PPDU */
uint32_t acquire_csi_dcm : 1; /**< enable to acquire HE-LTF when receiving an HE20 DCM applied PPDU */
uint32_t acquire_csi_beamformed : 1; /**< enable to acquire HE-LTF when receiving an HE20 Beamformed applied PPDU */
uint32_t acquire_csi_he_stbc_mode: 2; /**< when receiving an STBC applied HE PPDU,
0- acquire the complete HE-LTF1
1- acquire the complete HE-LTF2
2- sample evenly among the HE-LTF1 and HE-LTF2 */
uint32_t val_scale_cfg : 4; /**< value 0-8 */
uint32_t dump_ack_en : 1; /**< enable to dump 802.11 ACK frame, default disabled */
uint32_t reserved : 15; /**< reserved */
} wifi_csi_acquire_config_t;
#else
typedef struct {
uint32_t enable : 1; /**< enable to acquire CSI */
uint32_t acquire_csi_legacy : 1; /**< enable to acquire L-LTF when receiving a 11g PPDU */
uint32_t acquire_csi_ht20 : 1; /**< enable to acquire HT-LTF when receiving an HT20 PPDU */
uint32_t acquire_csi_ht40 : 1; /**< enable to acquire HT-LTF when receiving an HT40 PPDU */
uint32_t acquire_csi_su : 1; /**< enable to acquire HE-LTF when receiving an HE20 SU PPDU */
uint32_t acquire_csi_mu : 1; /**< enable to acquire HE-LTF when receiving an HE20 MU PPDU */
uint32_t acquire_csi_dcm : 1; /**< enable to acquire HE-LTF when receiving an HE20 DCM applied PPDU */
uint32_t acquire_csi_beamformed : 1; /**< enable to acquire HE-LTF when receiving an HE20 Beamformed applied PPDU */
uint32_t acquire_csi_he_stbc : 2; /**< when receiving an STBC applied HE PPDU,
0- acquire the complete HE-LTF1
1- acquire the complete HE-LTF2
2- sample evenly among the HE-LTF1 and HE-LTF2 */
uint32_t val_scale_cfg : 2; /**< value 0-3 */
uint32_t dump_ack_en : 1; /**< enable to dump 802.11 ACK frame, default disabled */
uint32_t reserved : 19; /**< reserved */
} wifi_csi_acquire_config_t;
#endif
/**
* @brief HE variant HT Control field including OM(Operation mode)
*/
typedef struct {
uint32_t id : 2; /**< HE Variant ID = 3 */
uint32_t ctrl_id : 4; /**< OM control ID: 1 */
uint32_t rx_nss : 3; /**< the max. number of spatial streams for the reception, only accept 0. */
uint32_t bw : 2; /**< the operating channel width for both reception and transmission, only accept 0. */
uint32_t ul_mu_disable : 1; /**< disable UL MU operations */
uint32_t tx_nsts : 3; /**< the max. number of spatial streams for the transmission, only accept 0. */
uint32_t er_su_disable : 1; /**< disable the reception of 242-tone HE ER SU PPDU */
uint32_t dl_mu_mimo_resounding_recommendation : 1; /**< indicate the STA suggests the AP either resounding the channel or increase the channel sounding frequency with the STA */
uint32_t ul_mu_data_disable : 1; /**< disable UL MU data operations */
uint32_t padding : 14; /**< padding bits */
} esp_wifi_htc_omc_t;
/**
* @brief TWT setup commands
*/
typedef enum {
TWT_REQUEST, /**< request to join a TWT without providing a set of TWT parameters */
TWT_SUGGEST, /**< request to join a TWT and offer a set of preferred TWT parameters but might accept alternative TWT parameters */
TWT_DEMAND, /**< request to join a TWT and currently accept only the indicated TWT parameters */
TWT_GROUPING, /**< for S1G STA */
TWT_ACCEPT, /**< accept the TWT request with the TWT parameters, also used in unsolicited TWT response */
TWT_ALTERNATE, /**< indicate a counter-offer of TWT parameters without creation of a TWT agreement */
TWT_DICTATE, /**< indicate no TWT agreement is created, but one is likely to be accepted only if the requesting STA transmits a new TWT setup request with the indicated TWT parameters */
TWT_REJECT, /**< indicate that the negotiation has ended in failure to create a new TWT agreement */
} wifi_twt_setup_cmds_t;
/**
* @brief broadcast TWT setup config
*/
typedef struct {
wifi_twt_setup_cmds_t setup_cmd; /**< Indicates the type of TWT command*/
uint8_t btwt_id; /**< When set up an broadcast TWT agreement, the broadcast twt id will be assigned by AP after a successful agreement setup.
broadcast twt id could be specified to a value in the range of [1, 31], but it might be change by AP in the response.
When change TWT parameters of the existing TWT agreement, broadcast twt id should be an existing one. The value range is [1, 31].*/
uint16_t timeout_time_ms; /**< Timeout times of receiving setup action frame response, default 5s*/
} wifi_btwt_setup_config_t;
/**
* @brief Individual TWT setup config
*/
typedef struct {
wifi_twt_setup_cmds_t setup_cmd; /**< Indicates the type of TWT command */
uint16_t trigger : 1; /**< 1: a trigger-enabled individual TWT, 0: a non-trigger-enabled individual TWT */
uint16_t flow_type : 1; /**< 0: an announced individual TWT, 1: an unannounced individual TWT */
uint16_t flow_id : 3; /**< When set up an individual TWT agreement, the flow id will be assigned by AP after a successful agreement setup.
flow_id could be specified to a value in the range of [0, 7], but it might be changed by AP in the response.
When change TWT parameters of the existing TWT agreement, flow_id should be an existing one. The value range is [0, 7]. */
uint16_t wake_invl_expn : 5; /**< Individual TWT Wake Interval Exponent. The value range is [0, 31]. */
uint16_t wake_duration_unit : 1; /**< Individual TWT Wake duration unit, 0: 256us 1: TU (TU = 1024us)*/
uint16_t reserved : 5; /**< bit: 11.15 reserved */
uint8_t min_wake_dura; /**< Nominal Minimum Wake Duration, indicates the minimum amount of time, in unit of 256 us, that the individual TWT requesting STA expects that it needs to be awake. The value range is [1, 255]. */
uint16_t wake_invl_mant; /**< Individual TWT Wake Interval Mantissa. The value range is [1, 65535]. */
uint16_t twt_id; /**< Individual TWT connection id, the value range is [0, 32767]. */
uint16_t timeout_time_ms; /**< Timeout times of receiving setup action frame response, default 5s*/
} wifi_twt_setup_config_t;
typedef wifi_twt_setup_config_t wifi_itwt_setup_config_t;
/**
* @brief HE SU GI and LTF types
*/
typedef enum {
HE_SU_ERSU_1_LTF_0_8_US_GI, /**< 1 LTF and 0.8 us GI */
HE_SU_ERSU_2_LTF_0_8_US_GI, /**< 2 LTF and 0.8 us GI */
HE_SU_ERSU_2_LTF_1_6_US_GI, /**< 2 LTF and 1.6 us GI */
HE_SU_ERSU_4_LTF_3_2_US_GI, /**< 4 LTF and 3.2 us GI */
} he_su_gi_and_ltf_type_t;
/**
* @brief Reception format
*/
typedef enum {
RX_BB_FORMAT_11B = 0, /**< the reception frame is a 11b MPDU */
RX_BB_FORMAT_11G = 1, /**< the reception frame is a 11g MPDU */
RX_BB_FORMAT_11A = RX_BB_FORMAT_11G, /**< the reception frame is a 11a MPDU */
RX_BB_FORMAT_HT = 2, /**< the reception frame is a HT MPDU */
RX_BB_FORMAT_VHT = 3, /**< the reception frame is a VHT MPDU */
RX_BB_FORMAT_HE_SU = 4, /**< the reception frame is a HE SU MPDU */
RX_BB_FORMAT_HE_MU = 5, /**< the reception frame is a HE MU MPDU */
RX_BB_FORMAT_HE_ERSU = 6, /**< the reception frame is a HE ER SU MPDU */
RX_BB_FORMAT_HE_TB = 7, /**< the reception frame is a HE TB MPDU */
} wifi_rx_bb_format_t;
/**
* @brief RxControl Info
*/
#if CONFIG_SLAVE_IDF_TARGET_ESP32C5
typedef struct {
signed rssi: 8; /**< the RSSI of the reception frame */
unsigned rate: 5; /**< if cur_bb_format is RX_BB_FORMAT_11B, it's the transmission rate. otherwise it's Rate field of L-SIG */
unsigned : 1; /**< reserved */
unsigned : 2; /**< reserved */
unsigned : 12; /**< reserved */
unsigned rxmatch0: 1; /**< indicate whether the reception frame is from interface 0 */
unsigned rxmatch1: 1; /**< indicate whether the reception frame is from interface 1 */
unsigned rxmatch2: 1; /**< indicate whether the reception frame is from interface 2 */
unsigned rxmatch3: 1; /**< indicate whether the reception frame is from interface 3 */
uint32_t he_siga1; /**< HE-SIGA1 or HT-SIG or VHT-SIG */
unsigned rxend_state: 8; /**< reception state, 0: successful, others: failure */
uint16_t he_siga2; /**< HE-SIGA2 */
unsigned : 7; /**< reserved */
unsigned is_group: 1; /**< indicate whether the reception is a group addressed frame */
unsigned timestamp: 32; /**< timestamp. The local time when this packet is received. It is precise only if modem sleep or light sleep is not enabled. unit: microsecond */
unsigned : 15; /**< reserved */
unsigned : 15; /**< reserved */
unsigned : 2; /**< reserved */
unsigned noise_floor: 8; /**< the noise floor of the reception frame */
signed : 8; /**< reserved */
signed : 8; /**< reserved */
unsigned : 8; /**< reserved */
unsigned : 8; /**< reserved */
unsigned : 8; /**< reserved */
unsigned : 2; /**< reserved */
unsigned sigb_len: 10; /**< the sigb length */
unsigned : 1; /**< reserved */
unsigned : 1; /**< reserved */
unsigned : 1; /**< reserved */
unsigned : 1; /**< reserved */
unsigned channel: 4; /**< the primary channel */
unsigned second: 4; /**< the second channel if in HT40 */
unsigned : 12; /**< reserved */
unsigned : 4; /**< reserved */
unsigned : 1; /**< reserved */
unsigned : 7; /**< reserved */
unsigned : 2; /**< reserved */
unsigned : 4; /**< reserved */
unsigned : 2; /**< reserved */
unsigned : 11; /**< reserved */
unsigned : 1; /**< reserved */
unsigned : 12; /**< reserved */
unsigned : 12; /**< reserved */
unsigned cur_bb_format: 4; /**< the format of the reception frame */
unsigned rx_channel_estimate_len: 10; /**< the length of the channel information */
unsigned rx_channel_estimate_info_vld: 1; /**< indicate the channel information is valid */
unsigned : 5; /**< reserved */
unsigned : 21; /**< reserved */
unsigned : 10; /**< reserved */
unsigned : 1; /**< reserved */
unsigned : 3; /**< reserved */
unsigned : 1; /**< reserved */
unsigned : 6; /**< reserved */
unsigned : 21; /**< reserved */
unsigned : 1; /**< reserved */
unsigned : 32; /**< reserved */
unsigned : 7; /**< reserved */
unsigned : 1; /**< reserved */
unsigned : 8; /**< reserved */
unsigned : 16; /**< reserved */
unsigned sig_len: 14; /**< the length of the reception MPDU */
unsigned : 2; /**< reserved */
unsigned dump_len: 14; /**< the length of the reception MPDU excluding the FCS */
unsigned : 2; /**< reserved */
unsigned rx_state: 8; /**< reception state, 0: successful, others: failure */
unsigned : 8; /**< reserved */
unsigned : 16; /**< reserved */
} __attribute__((packed)) esp_wifi_rxctrl_t;
#else
typedef struct {
signed rssi : 8; /**< the RSSI of the reception frame */
unsigned rate : 5; /**< if cur_bb_format is RX_BB_FORMAT_11B, it's the transmission rate. otherwise it's Rate field of L-SIG */
unsigned : 1; /**< reserved */
unsigned : 2; /**< reserved */
unsigned : 12; /**< reserved */
unsigned rxmatch0 : 1; /**< indicate whether the reception frame is from interface 0 */
unsigned rxmatch1 : 1; /**< indicate whether the reception frame is from interface 1 */
unsigned rxmatch2 : 1; /**< indicate whether the reception frame is from interface 2 */
unsigned rxmatch3 : 1; /**< indicate whether the reception frame is from interface 3 */
uint32_t he_siga1; /**< HE-SIGA1 or HT-SIG */
unsigned rxend_state : 8; /**< reception state, 0: successful, others: failure */
uint16_t he_siga2; /**< HE-SIGA2 */
unsigned : 7; /**< reserved */
unsigned is_group : 1; /**< indicate whether the reception is a group addressed frame */
unsigned timestamp : 32; /**< timestamp. The local time when this packet is received. It is precise only if modem sleep or light sleep is not enabled. unit: microsecond */
unsigned : 15; /**< reserved */
unsigned : 15; /**< reserved */
unsigned : 2; /**< reserved */
signed noise_floor : 8; /**< the noise floor of the reception frame */
unsigned channel : 4; /**< the primary channel */
unsigned second : 4; /**< the second channel if in HT40 */
unsigned : 8; /**< reserved */
unsigned : 8; /**< reserved */
unsigned : 32; /**< reserved */
unsigned : 32; /**< reserved */
unsigned : 2; /**< reserved */
unsigned : 4; /**< reserved */
unsigned : 2; /**< reserved */
unsigned rx_channel_estimate_len : 10; /**< the length of the channel information */
unsigned rx_channel_estimate_info_vld : 1; /**< indicate the channel information is valid */
unsigned : 1; /**< reserved */
unsigned : 11; /**< reserved */
unsigned : 1; /**< reserved */
unsigned : 24; /**< reserved */
unsigned cur_bb_format : 4; /**< the format of the reception frame */
unsigned cur_single_mpdu : 1; /**< indicate whether the reception MPDU is a S-MPDU */
unsigned : 3; /**< reserved */
unsigned : 32; /**< reserved */
unsigned : 32; /**< reserved */
unsigned : 32; /**< reserved */
unsigned : 32; /**< reserved */
unsigned : 32; /**< reserved */
unsigned : 32; /**< reserved */
unsigned : 32; /**< reserved */
unsigned : 32; /**< reserved */
unsigned : 8; /**< reserved */
unsigned he_sigb_len : 6; /**< the length of HE-SIGB */
unsigned : 2; /**< reserved */
unsigned : 8; /**< reserved */
unsigned : 8; /**< reserved */
unsigned : 32; /**< reserved */
unsigned : 7; /**< reserved */
unsigned : 1; /**< reserved */
unsigned : 8; /**< reserved */
unsigned : 16; /**< reserved */
unsigned sig_len : 14; /**< the length of the reception MPDU */
unsigned : 2; /**< reserved */
unsigned dump_len : 14; /**< the length of the reception MPDU excluding the FCS */
unsigned : 2; /**< reserved */
unsigned rx_state : 8; /**< reception state, 0: successful, others: failure */
unsigned : 24; /**< reserved */
} __attribute__((packed)) esp_wifi_rxctrl_t;
#endif
/**
* @brief bTWT setup status
*/
typedef enum {
BTWT_SETUP_TXFAIL, /**< station sends btwt setup request frame fail */
BTWT_SETUP_SUCCESS, /**< station receives btwt setup response frame and setup btwt sucessfully */
BTWT_SETUP_TIMEOUT, /**< timeout of receiving btwt setup response frame */
BTWT_SETUP_FULL, /**< indicate there is no available btwt id */
BTWT_SETUP_INVALID_ARG, /**< indicate invalid argument to setup btwt */
BTWT_SETUP_INTERNAL_ERR, /**< indicate internal error to setup btwt */
} wifi_btwt_setup_status_t;
/** Argument structure for WIFI_EVENT_TWT_SET_UP event */
typedef struct {
wifi_itwt_setup_config_t config; /**< itwt setup config, this value is determined by the AP */
esp_err_t status; /**< itwt setup status, 1: indicate setup success, others : indicate setup fail */
uint8_t reason; /**< itwt setup frame tx fail reason */
uint64_t target_wake_time; /**< TWT SP start time */
} wifi_event_sta_itwt_setup_t;
/**
* @brief iTWT teardown status
*/
typedef enum {
ITWT_TEARDOWN_FAIL, /**< station sends teardown frame fail */
ITWT_TEARDOWN_SUCCESS, /**< 1) station successfully sends teardown frame to AP; 2) station receives teardown frame from AP */
} wifi_itwt_teardown_status_t;
/** Argument structure for WIFI_EVENT_TWT_TEARDOWN event */
typedef struct {
uint8_t flow_id; /**< flow id */
wifi_itwt_teardown_status_t status; /**< itwt teardown status */
} wifi_event_sta_itwt_teardown_t;
/** Argument structure for WIFI_EVENT_BTWT_SET_UP event */
typedef struct {
wifi_btwt_setup_status_t status; /**< indicate btwt setup status */
wifi_twt_setup_cmds_t setup_cmd; /**< indicate the type of TWT command */
uint8_t btwt_id; /**< indicate btwt id */
uint8_t min_wake_dura; /**< Nominal Minimum Wake Duration, indicates the minimum amount of time, in unit of 256 us, that the TWT requesting STA expects that it needs to be awake. The value range is [1, 255]. */
uint8_t wake_invl_expn; /**< TWT Wake Interval Exponent. The value range is [0, 31]. */
uint16_t wake_invl_mant; /**< TWT Wake Interval Mantissa. The value range is [1, 65535]. */
bool trigger; /**< 1: a trigger-enabled TWT, 0: a non-trigger-enabled TWT */
uint8_t flow_type; /**< 0: an announced TWT, 1: an unannounced TWT */
uint8_t reason; /**< btwt setup frame tx fail reason */
uint64_t target_wake_time; /**< TWT SP start time */
} wifi_event_sta_btwt_setup_t;
/**
* @brief BTWT teardown status
*/
typedef enum {
BTWT_TEARDOWN_FAIL, /**< station sends teardown frame fail */
BTWT_TEARDOWN_SUCCESS, /**< 1) station successfully sends teardown frame to AP; 2) station receives teardown frame from AP */
} wifi_btwt_teardown_status_t;
/** Argument structure for WIFI_EVENT_TWT_TEARDOWN event */
typedef struct {
uint8_t btwt_id; /**< btwt id */
wifi_btwt_teardown_status_t status; /**< btwt teardown status */
} wifi_event_sta_btwt_teardown_t;
/**
* @brief iTWT probe status
*/
typedef enum {
ITWT_PROBE_FAIL, /**< station sends probe request fail */
ITWT_PROBE_SUCCESS, /**< 1) station receives beacon from AP; 2) station receives probe response from AP */
ITWT_PROBE_TIMEOUT, /**< 1) timeout of receiving ACK in response of previously probe request sending by station
2) timeout of receiving probe response in response of previously probe request sending by station */
ITWT_PROBE_STA_DISCONNECTED, /**< station is not connected */
} wifi_itwt_probe_status_t;
/** Argument structure for WIFI_EVENT_ITWT_SEND_PROBE event */
typedef struct {
wifi_itwt_probe_status_t status; /**< probe status */
uint8_t reason; /**< failure reason */
} wifi_event_sta_itwt_probe_t;
/** Argument structure for WIFI_EVENT_ITWT_SUSPEND event */
typedef struct {
esp_err_t status; /**< suspend status */
uint8_t flow_id_bitmap; /**< bitmap of the suspended flow id */
uint32_t actual_suspend_time_ms[8]; /**< the actual suspend time for each flow id, unit: ms */
} wifi_event_sta_itwt_suspend_t;
/**
* @brief TWT types
*/
typedef enum {
TWT_TYPE_INDIVIDUAL, /**< individual twt */
TWT_TYPE_BROADCAST, /**< broadcast twt */
TWT_TYPE_MAX, /**< the max value */
} wifi_twt_type_t;
/** Argument structure for twt configuration */
typedef struct {
bool post_wakeup_event; /**< post twt wakeup event */
} wifi_twt_config_t;
/** Argument structure for WIFI_EVENT_TWT_WAKEUP event */
typedef struct {
wifi_twt_type_t twt_type; /**< twt type */
uint8_t flow_id; /**< flow id */
} wifi_event_sta_twt_wakeup_t;
/** Argument structure for twt information */
typedef struct {
bool btwt_id_in_use; /**< indicate whether the btwt id is in use or not */
uint16_t btwt_trigger : 1; /**< 1: a trigger-enabled TWT, 0: a non-trigger-enabled TWT */
uint16_t btwt_flow_type : 1; /**< 0: an announced TWT, 1: an unannounced TWT */
uint16_t btwt_recommendation : 3; /**< indicate recommendations on the types of frames. 0: no constraints, [1, 3], [4, 7] reserved */
uint16_t btwt_wake_interval_exponent : 5; /**< TWT Wake Interval Exponent. The value range is [0, 31]. */
uint16_t btwt_rsvd : 6; /**< reserved */
uint8_t btwt_wake_duration; /**< TWT Wake duration unit, 0: 256us 1: TU (TU = 1024us) */
uint16_t btwt_wake_interval_mantissa; /**< TWT Wake Interval Mantissa. The value range is [1, 65535]. */
uint16_t btwt_info_id : 5; /**< btwt id */
uint16_t btwt_info_persistence : 8; /**< indicate the number of TBTTs during which the Broadcast TWT SPs corresponding to this broadcast TWT parameters set are present */
uint16_t btwt_info_rsvd : 3; /**< reserved */
} esp_wifi_btwt_info_t;
#ifdef __cplusplus
}
#endif

View File

@@ -0,0 +1,86 @@
/*
* SPDX-FileCopyrightText: 2019-2023 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#pragma once
#include <stdint.h>
#include <stdbool.h>
#include "esp_err.h"
#include "esp_wifi_types.h"
#include "esp_netif_types.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* @brief Number of WiFi interfaces used by wifi-netif abstraction
*/
#define MAX_WIFI_IFS WIFI_IF_MAX
/**
* @brief Forward declaration of WiFi interface handle
*/
typedef struct wifi_netif_driver* wifi_netif_driver_t;
/**
* @brief Creates wifi driver instance to be used with esp-netif
*
* @param wifi_if wifi interface type (station, softAP)
*
* @return
* - pointer to wifi interface handle on success
* - NULL otherwise
*/
wifi_netif_driver_t esp_wifi_create_if_driver(wifi_interface_t wifi_if);
/**
* @brief Destroys wifi driver instance
*
* @param h pointer to wifi interface handle
*
*/
void esp_wifi_destroy_if_driver(wifi_netif_driver_t h);
/**
* @brief Return mac of specified wifi driver instance
*
* @param[in] ifx pointer to wifi interface handle
* @param[out] mac output mac address
*
* @return ESP_OK on success
*
*/
esp_err_t esp_wifi_get_if_mac(wifi_netif_driver_t ifx, uint8_t mac[6]);
/**
* @brief Return true if the supplied interface instance is ready after start.
* Typically used when registering on receive callback, which ought to be
* installed as soon as AP started, but once STA gets connected.
*
* @param[in] ifx pointer to wifi interface handle
*
* @return
* - true if ready after interface started (typically Access Point type)
* - false if ready once interface connected (typically for Station type)
*/
bool esp_wifi_is_if_ready_when_started(wifi_netif_driver_t ifx);
/**
* @brief Register interface receive callback function with argument
*
* @param[in] ifx pointer to wifi interface handle
* @param[in] fn function to be registered (typically esp_netif_receive)
* @param[in] arg argument to be supplied to registered function (typically esp_netif ptr)
*
* @return ESP_OK on success
*
*/
esp_err_t esp_wifi_register_if_rxcb(wifi_netif_driver_t ifx, esp_netif_receive_t fn, void * arg);
#ifdef __cplusplus
}
#endif

View File

@@ -0,0 +1,29 @@
/*
* SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#pragma once
#include "esp_wifi_types_generic.h"
#if __has_include("esp_wifi_types_native.h")
#include "esp_wifi_types_native.h"
#else
#ifdef __cplusplus
extern "C" {
#endif
/*
* In case we have no native types, we can still provide opaque structs,
* so the most common APIs could work and others would compile.
* This could happen for chipsets with no wifi, yet without local esp_wifi_remote.
*/
typedef struct wifi_csi_config_t wifi_csi_config_t;
typedef struct wifi_pkt_rx_ctrl_t wifi_pkt_rx_ctrl_t;
#ifdef __cplusplus
}
#endif
#endif // __has_include("esp_wifi_types_native.h")

View File

@@ -0,0 +1,134 @@
/*
* SPDX-FileCopyrightText: 2023-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#pragma once
#include "sdkconfig.h"
#include "esp_wifi_types_generic.h"
#if CONFIG_SLAVE_SOC_WIFI_HE_SUPPORT
#include "esp_wifi_he_types.h"
#endif
#ifdef __cplusplus
extern "C" {
#endif
#if CONFIG_SLAVE_IDF_TARGET_ESP32C2
#define ESP_WIFI_MAX_CONN_NUM (4) /**< max number of stations which can connect to ESP32C2 soft-AP */
#elif CONFIG_SLAVE_IDF_TARGET_ESP32C3 || CONFIG_SLAVE_IDF_TARGET_ESP32C6 || CONFIG_SLAVE_IDF_TARGET_ESP32C5
#define ESP_WIFI_MAX_CONN_NUM (10) /**< max number of stations which can connect to ESP32C3 soft-AP */
#else
#define ESP_WIFI_MAX_CONN_NUM (15) /**< max number of stations which can connect to ESP32/ESP32S3/ESP32S2 soft-AP */
#endif
/** @brief List of stations associated with the Soft-AP */
typedef struct wifi_sta_list_t {
wifi_sta_info_t sta[ESP_WIFI_MAX_CONN_NUM]; /**< station list */
int num; /**< number of stations in the list (other entries are invalid) */
} wifi_sta_list_t;
#if CONFIG_SLAVE_SOC_WIFI_HE_SUPPORT
typedef esp_wifi_rxctrl_t wifi_pkt_rx_ctrl_t;
#else
/** @brief Received packet radio metadata header, this is the common header at the beginning of all promiscuous mode RX callback buffers */
typedef struct {
signed rssi: 8; /**< Received Signal Strength Indicator(RSSI) of packet. unit: dBm */
unsigned rate: 5; /**< PHY rate encoding of the packet. Only valid for non HT(11bg) packet */
unsigned : 1; /**< reserved */
unsigned sig_mode: 2; /**< Protocol of the received packet, 0: non HT(11bg) packet; 1: HT(11n) packet; 3: VHT(11ac) packet */
unsigned : 16; /**< reserved */
unsigned mcs: 7; /**< Modulation Coding Scheme. If is HT(11n) packet, shows the modulation, range from 0 to 76(MSC0 ~ MCS76) */
unsigned cwb: 1; /**< Channel Bandwidth of the packet. 0: 20MHz; 1: 40MHz */
unsigned : 16; /**< reserved */
unsigned smoothing: 1; /**< Set to 1 indicates that channel estimate smoothing is recommended.
Set to 0 indicates that only per-carrierindependent (unsmoothed) channel estimate is recommended. */
unsigned not_sounding: 1; /**< Set to 0 indicates that PPDU is a sounding PPDU. Set to 1indicates that the PPDU is not a sounding PPDU.
sounding PPDU is used for channel estimation by the request receiver */
unsigned : 1; /**< reserved */
unsigned aggregation: 1; /**< Aggregation. 0: MPDU packet; 1: AMPDU packet */
unsigned stbc: 2; /**< Space Time Block Code(STBC). 0: non STBC packet; 1: STBC packet */
unsigned fec_coding: 1; /**< Forward Error Correction(FEC). Flag is set for 11n packets which are LDPC */
unsigned sgi: 1; /**< Short Guide Interval(SGI). 0: Long GI; 1: Short GI */
#if CONFIG_SLAVE_IDF_TARGET_ESP32
signed noise_floor: 8; /**< noise floor of Radio Frequency Module(RF). unit: dBm*/
#elif CONFIG_SLAVE_IDF_TARGET_ESP32S2 || CONFIG_SLAVE_IDF_TARGET_ESP32S3 || CONFIG_SLAVE_IDF_TARGET_ESP32C3 || CONFIG_SLAVE_IDF_TARGET_ESP32C2
unsigned : 8; /**< reserved */
#endif
unsigned ampdu_cnt: 8; /**< the number of subframes aggregated in AMPDU */
unsigned channel: 4; /**< primary channel on which this packet is received */
unsigned secondary_channel: 4; /**< secondary channel on which this packet is received. 0: none; 1: above; 2: below */
unsigned : 8; /**< reserved */
unsigned timestamp: 32; /**< timestamp. The local time when this packet is received. It is precise only if modem sleep or light sleep is not enabled. unit: microsecond */
unsigned : 32; /**< reserved */
#if CONFIG_SLAVE_IDF_TARGET_ESP32S2
unsigned : 32; /**< reserved */
#elif CONFIG_SLAVE_IDF_TARGET_ESP32S3 || CONFIG_SLAVE_IDF_TARGET_ESP32C3 || CONFIG_SLAVE_IDF_TARGET_ESP32C2
signed noise_floor: 8; /**< noise floor of Radio Frequency Module(RF). unit: dBm*/
unsigned : 24; /**< reserved */
unsigned : 32; /**< reserved */
#endif
unsigned : 31; /**< reserved */
unsigned ant: 1; /**< antenna number from which this packet is received. 0: WiFi antenna 0; 1: WiFi antenna 1 */
#if CONFIG_SLAVE_IDF_TARGET_ESP32S2
signed noise_floor: 8; /**< noise floor of Radio Frequency Module(RF). unit: dBm*/
unsigned : 24; /**< reserved */
#elif CONFIG_SLAVE_IDF_TARGET_ESP32S3 || CONFIG_SLAVE_IDF_TARGET_ESP32C3 || CONFIG_SLAVE_IDF_TARGET_ESP32C2
unsigned : 32; /**< reserved */
unsigned : 32; /**< reserved */
unsigned : 32; /**< reserved */
#endif
unsigned sig_len: 12; /**< length of packet including Frame Check Sequence(FCS) */
unsigned : 12; /**< reserved */
unsigned rx_state: 8; /**< state of the packet. 0: no error; others: error numbers which are not public */
} wifi_pkt_rx_ctrl_t;
#endif
/**
* @brief Channel state information(CSI) configuration type
*
*/
#if CONFIG_SLAVE_SOC_WIFI_HE_SUPPORT
typedef wifi_csi_acquire_config_t wifi_csi_config_t;
#else
typedef struct {
bool lltf_en; /**< enable to receive legacy long training field(lltf) data. Default enabled */
bool htltf_en; /**< enable to receive HT long training field(htltf) data. Default enabled */
bool stbc_htltf2_en; /**< enable to receive space time block code HT long training field(stbc-htltf2) data. Default enabled */
bool ltf_merge_en; /**< enable to generate htlft data by averaging lltf and ht_ltf data when receiving HT packet. Otherwise, use ht_ltf data directly. Default enabled */
bool channel_filter_en; /**< enable to turn on channel filter to smooth adjacent sub-carrier. Disable it to keep independence of adjacent sub-carrier. Default enabled */
bool manu_scale; /**< manually scale the CSI data by left shifting or automatically scale the CSI data. If set true, please set the shift bits. false: automatically. true: manually. Default false */
uint8_t shift; /**< manually left shift bits of the scale of the CSI data. The range of the left shift bits is 0~15 */
bool dump_ack_en; /**< enable to dump 802.11 ACK frame, default disabled */
} wifi_csi_config_t;
#endif // !CONFIG_SLAVE_SOC_WIFI_HE_SUPPORT
/** @brief Payload passed to 'buf' parameter of promiscuous mode RX callback.
*/
typedef struct {
wifi_pkt_rx_ctrl_t rx_ctrl; /**< metadata header */
uint8_t payload[0]; /**< Data or management payload. Length of payload is described by rx_ctrl.sig_len. Type of content determined by packet type argument of callback. */
} wifi_promiscuous_pkt_t;
/**
* @brief CSI data type
*
*/
typedef struct wifi_csi_info_t {
wifi_pkt_rx_ctrl_t rx_ctrl;/**< received packet radio metadata header of the CSI data */
uint8_t mac[6]; /**< source MAC address of the CSI data */
uint8_t dmac[6]; /**< destination MAC address of the CSI data */
bool first_word_invalid; /**< first four bytes of the CSI data is invalid or not, true indicates the first four bytes is invalid due to hardware limitation */
int8_t *buf; /**< valid buffer of CSI data */
uint16_t len; /**< valid length of CSI data */
uint8_t *hdr; /**< header of the wifi packet */
uint8_t *payload; /**< payload of the wifi packet */
uint16_t payload_len; /**< payload len of the wifi packet */
uint16_t rx_seq; /**< rx sequence number of the wifi packet */
} wifi_csi_info_t;
#ifdef __cplusplus
}
#endif

View File

@@ -0,0 +1,19 @@
# This file is auto-generated
choice SLAVE_IDF_TARGET
prompt "choose slave target"
default SLAVE_IDF_TARGET_ESP32C6 if IDF_TARGET_ESP32P4 # To support common use-cases
default SLAVE_IDF_TARGET_ESP32
config SLAVE_IDF_TARGET_ESP32
bool "esp32"
config SLAVE_IDF_TARGET_ESP32S2
bool "esp32s2"
config SLAVE_IDF_TARGET_ESP32C3
bool "esp32c3"
config SLAVE_IDF_TARGET_ESP32S3
bool "esp32s3"
config SLAVE_IDF_TARGET_ESP32C2
bool "esp32c2"
config SLAVE_IDF_TARGET_ESP32C6
bool "esp32c6"
endchoice

View File

@@ -0,0 +1,265 @@
# This file is auto-generated
if SLAVE_IDF_TARGET_ESP32
config SLAVE_SOC_WIFI_SUPPORTED # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_WAPI_SUPPORT # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_CSI_SUPPORT # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_MESH_SUPPORT # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_SUPPORT_VARIABLE_BEACON_WINDOW # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_NAN_SUPPORT # ignore: multiple-definition
bool
default y
config SLAVE_IDF_TARGET_ARCH_XTENSA # ignore: multiple-definition
bool
default y
endif # ESP32
if SLAVE_IDF_TARGET_ESP32S2
config SLAVE_SOC_WIFI_SUPPORTED # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_LIGHT_SLEEP_CLK_WIDTH # ignore: multiple-definition
int
default 12
config SLAVE_SOC_WIFI_HW_TSF # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_FTM_SUPPORT # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_WAPI_SUPPORT # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_CSI_SUPPORT # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_MESH_SUPPORT # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_SUPPORT_VARIABLE_BEACON_WINDOW # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_NAN_SUPPORT # ignore: multiple-definition
bool
default y
config SLAVE_FREERTOS_UNICORE # ignore: multiple-definition
bool
default y
config SLAVE_IDF_TARGET_ARCH_XTENSA # ignore: multiple-definition
bool
default y
endif # ESP32S2
if SLAVE_IDF_TARGET_ESP32C3
config SLAVE_SOC_WIFI_SUPPORTED # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_LIGHT_SLEEP_CLK_WIDTH # ignore: multiple-definition
int
default 12
config SLAVE_SOC_WIFI_HW_TSF # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_FTM_SUPPORT # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_GCMP_SUPPORT # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_WAPI_SUPPORT # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_CSI_SUPPORT # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_MESH_SUPPORT # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_SUPPORT_VARIABLE_BEACON_WINDOW # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_PHY_NEEDS_USB_WORKAROUND # ignore: multiple-definition
bool
default y
config SLAVE_FREERTOS_UNICORE # ignore: multiple-definition
bool
default y
config SLAVE_IDF_TARGET_ARCH_RISCV # ignore: multiple-definition
bool
default y
endif # ESP32C3
if SLAVE_IDF_TARGET_ESP32S3
config SLAVE_SOC_WIFI_SUPPORTED # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_LIGHT_SLEEP_CLK_WIDTH # ignore: multiple-definition
int
default 12
config SLAVE_SOC_WIFI_HW_TSF # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_FTM_SUPPORT # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_GCMP_SUPPORT # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_WAPI_SUPPORT # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_CSI_SUPPORT # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_MESH_SUPPORT # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_SUPPORT_VARIABLE_BEACON_WINDOW # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_PHY_NEEDS_USB_WORKAROUND # ignore: multiple-definition
bool
default y
config SLAVE_IDF_TARGET_ARCH_XTENSA # ignore: multiple-definition
bool
default y
endif # ESP32S3
if SLAVE_IDF_TARGET_ESP32C2
config SLAVE_SOC_WIFI_SUPPORTED # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_LIGHT_SLEEP_CLK_WIDTH # ignore: multiple-definition
int
default 12
config SLAVE_SOC_WIFI_HW_TSF # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_FTM_SUPPORT # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_SUPPORT_VARIABLE_BEACON_WINDOW # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_PHY_NEEDS_USB_WORKAROUND # ignore: multiple-definition
bool
default y
config SLAVE_FREERTOS_UNICORE # ignore: multiple-definition
bool
default y
config SLAVE_IDF_TARGET_ARCH_RISCV # ignore: multiple-definition
bool
default y
endif # ESP32C2
if SLAVE_IDF_TARGET_ESP32C6
config SLAVE_SOC_WIFI_SUPPORTED # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_LIGHT_SLEEP_CLK_WIDTH # ignore: multiple-definition
int
default 12
config SLAVE_SOC_WIFI_HW_TSF # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_FTM_SUPPORT # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_GCMP_SUPPORT # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_WAPI_SUPPORT # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_CSI_SUPPORT # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_MESH_SUPPORT # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_HE_SUPPORT # ignore: multiple-definition
bool
default y
config SLAVE_FREERTOS_UNICORE # ignore: multiple-definition
bool
default y
config SLAVE_IDF_TARGET_ARCH_RISCV # ignore: multiple-definition
bool
default y
endif # ESP32C6

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,392 @@
/*
* SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
// This file is auto-generated
#include "esp_wifi_remote.h"
#include "esp_log.h"
#define WEAK __attribute__((weak))
#define LOG_UNSUPPORTED_AND_RETURN(ret) ESP_LOGW("esp_wifi_remote_weak", "%s unsupported", __func__); \
return ret;
WEAK esp_err_t esp_wifi_remote_init(const wifi_init_config_t *config)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_deinit(void)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_set_mode(wifi_mode_t mode)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_get_mode(wifi_mode_t *mode)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_start(void)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_stop(void)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_restore(void)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_connect(void)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_disconnect(void)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_clear_fast_connect(void)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_deauth_sta(uint16_t aid)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_scan_start(const wifi_scan_config_t *config, _Bool block)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_set_scan_parameters(const wifi_scan_default_params_t *config)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_get_scan_parameters(wifi_scan_default_params_t *config)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_scan_stop(void)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_scan_get_ap_num(uint16_t *number)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_scan_get_ap_records(uint16_t *number, wifi_ap_record_t *ap_records)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_scan_get_ap_record(wifi_ap_record_t *ap_record)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_clear_ap_list(void)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_sta_get_ap_info(wifi_ap_record_t *ap_info)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_set_ps(wifi_ps_type_t type)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_get_ps(wifi_ps_type_t *type)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_set_protocol(wifi_interface_t ifx, uint8_t protocol_bitmap)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_get_protocol(wifi_interface_t ifx, uint8_t *protocol_bitmap)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_set_bandwidth(wifi_interface_t ifx, wifi_bandwidth_t bw)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_get_bandwidth(wifi_interface_t ifx, wifi_bandwidth_t *bw)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_set_channel(uint8_t primary, wifi_second_chan_t second)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_get_channel(uint8_t *primary, wifi_second_chan_t *second)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_set_country(const wifi_country_t *country)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_get_country(wifi_country_t *country)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_set_mac(wifi_interface_t ifx, const uint8_t mac[6])
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_get_mac(wifi_interface_t ifx, uint8_t mac[6])
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_set_promiscuous_rx_cb(wifi_promiscuous_cb_t cb)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_set_promiscuous(_Bool en)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_get_promiscuous(_Bool *en)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_set_promiscuous_filter(const wifi_promiscuous_filter_t *filter)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_get_promiscuous_filter(wifi_promiscuous_filter_t *filter)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_set_promiscuous_ctrl_filter(const wifi_promiscuous_filter_t *filter)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_get_promiscuous_ctrl_filter(wifi_promiscuous_filter_t *filter)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_set_config(wifi_interface_t interface, wifi_config_t *conf)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_get_config(wifi_interface_t interface, wifi_config_t *conf)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_ap_get_sta_list(wifi_sta_list_t *sta)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_ap_get_sta_aid(const uint8_t mac[6], uint16_t *aid)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_set_storage(wifi_storage_t storage)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_set_vendor_ie(_Bool enable, wifi_vendor_ie_type_t type, wifi_vendor_ie_id_t idx, const void *vnd_ie)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_set_vendor_ie_cb(esp_vendor_ie_cb_t cb, void *ctx)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_set_max_tx_power(int8_t power)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_get_max_tx_power(int8_t *power)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_set_event_mask(uint32_t mask)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_get_event_mask(uint32_t *mask)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_80211_tx(wifi_interface_t ifx, const void *buffer, int len, _Bool en_sys_seq)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_set_csi_rx_cb(wifi_csi_cb_t cb, void *ctx)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_set_csi_config(const wifi_csi_config_t *config)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_get_csi_config(wifi_csi_config_t *config)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_set_csi(_Bool en)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK int64_t esp_wifi_remote_get_tsf_time(wifi_interface_t interface)
{
LOG_UNSUPPORTED_AND_RETURN(-1);
}
WEAK esp_err_t esp_wifi_remote_set_inactive_time(wifi_interface_t ifx, uint16_t sec)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_get_inactive_time(wifi_interface_t ifx, uint16_t *sec)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_statis_dump(uint32_t modules)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_set_rssi_threshold(int32_t rssi)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_ftm_initiate_session(wifi_ftm_initiator_cfg_t *cfg)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_ftm_end_session(void)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_ftm_resp_set_offset(int16_t offset_cm)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_ftm_get_report(wifi_ftm_report_entry_t *report, uint8_t num_entries)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_config_11b_rate(wifi_interface_t ifx, _Bool disable)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_connectionless_module_set_wake_interval(uint16_t wake_interval)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_force_wakeup_acquire(void)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_force_wakeup_release(void)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_set_country_code(const char *country, _Bool ieee80211d_enabled)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_get_country_code(char *country)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_config_80211_tx_rate(wifi_interface_t ifx, wifi_phy_rate_t rate)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_disable_pmf_config(wifi_interface_t ifx)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_sta_get_aid(uint16_t *aid)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_sta_get_negotiated_phymode(wifi_phy_mode_t *phymode)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_set_dynamic_cs(_Bool enabled)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_sta_get_rssi(int *rssi)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}

View File

@@ -0,0 +1,388 @@
/*
* SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
// This file is auto-generated
#include "esp_wifi.h"
#include "esp_wifi_remote.h"
esp_err_t esp_wifi_init(const wifi_init_config_t *config)
{
return esp_wifi_remote_init(config);
}
esp_err_t esp_wifi_deinit(void)
{
return esp_wifi_remote_deinit();
}
esp_err_t esp_wifi_set_mode(wifi_mode_t mode)
{
return esp_wifi_remote_set_mode(mode);
}
esp_err_t esp_wifi_get_mode(wifi_mode_t *mode)
{
return esp_wifi_remote_get_mode(mode);
}
esp_err_t esp_wifi_start(void)
{
return esp_wifi_remote_start();
}
esp_err_t esp_wifi_stop(void)
{
return esp_wifi_remote_stop();
}
esp_err_t esp_wifi_restore(void)
{
return esp_wifi_remote_restore();
}
esp_err_t esp_wifi_connect(void)
{
return esp_wifi_remote_connect();
}
esp_err_t esp_wifi_disconnect(void)
{
return esp_wifi_remote_disconnect();
}
esp_err_t esp_wifi_clear_fast_connect(void)
{
return esp_wifi_remote_clear_fast_connect();
}
esp_err_t esp_wifi_deauth_sta(uint16_t aid)
{
return esp_wifi_remote_deauth_sta(aid);
}
esp_err_t esp_wifi_scan_start(const wifi_scan_config_t *config, _Bool block)
{
return esp_wifi_remote_scan_start(config, block);
}
esp_err_t esp_wifi_set_scan_parameters(const wifi_scan_default_params_t *config)
{
return esp_wifi_remote_set_scan_parameters(config);
}
esp_err_t esp_wifi_get_scan_parameters(wifi_scan_default_params_t *config)
{
return esp_wifi_remote_get_scan_parameters(config);
}
esp_err_t esp_wifi_scan_stop(void)
{
return esp_wifi_remote_scan_stop();
}
esp_err_t esp_wifi_scan_get_ap_num(uint16_t *number)
{
return esp_wifi_remote_scan_get_ap_num(number);
}
esp_err_t esp_wifi_scan_get_ap_records(uint16_t *number, wifi_ap_record_t *ap_records)
{
return esp_wifi_remote_scan_get_ap_records(number, ap_records);
}
esp_err_t esp_wifi_scan_get_ap_record(wifi_ap_record_t *ap_record)
{
return esp_wifi_remote_scan_get_ap_record(ap_record);
}
esp_err_t esp_wifi_clear_ap_list(void)
{
return esp_wifi_remote_clear_ap_list();
}
esp_err_t esp_wifi_sta_get_ap_info(wifi_ap_record_t *ap_info)
{
return esp_wifi_remote_sta_get_ap_info(ap_info);
}
esp_err_t esp_wifi_set_ps(wifi_ps_type_t type)
{
return esp_wifi_remote_set_ps(type);
}
esp_err_t esp_wifi_get_ps(wifi_ps_type_t *type)
{
return esp_wifi_remote_get_ps(type);
}
esp_err_t esp_wifi_set_protocol(wifi_interface_t ifx, uint8_t protocol_bitmap)
{
return esp_wifi_remote_set_protocol(ifx, protocol_bitmap);
}
esp_err_t esp_wifi_get_protocol(wifi_interface_t ifx, uint8_t *protocol_bitmap)
{
return esp_wifi_remote_get_protocol(ifx, protocol_bitmap);
}
esp_err_t esp_wifi_set_bandwidth(wifi_interface_t ifx, wifi_bandwidth_t bw)
{
return esp_wifi_remote_set_bandwidth(ifx, bw);
}
esp_err_t esp_wifi_get_bandwidth(wifi_interface_t ifx, wifi_bandwidth_t *bw)
{
return esp_wifi_remote_get_bandwidth(ifx, bw);
}
esp_err_t esp_wifi_set_channel(uint8_t primary, wifi_second_chan_t second)
{
return esp_wifi_remote_set_channel(primary, second);
}
esp_err_t esp_wifi_get_channel(uint8_t *primary, wifi_second_chan_t *second)
{
return esp_wifi_remote_get_channel(primary, second);
}
esp_err_t esp_wifi_set_country(const wifi_country_t *country)
{
return esp_wifi_remote_set_country(country);
}
esp_err_t esp_wifi_get_country(wifi_country_t *country)
{
return esp_wifi_remote_get_country(country);
}
esp_err_t esp_wifi_set_mac(wifi_interface_t ifx, const uint8_t mac[6])
{
return esp_wifi_remote_set_mac(ifx, mac);
}
esp_err_t esp_wifi_get_mac(wifi_interface_t ifx, uint8_t mac[6])
{
return esp_wifi_remote_get_mac(ifx, mac);
}
esp_err_t esp_wifi_set_promiscuous_rx_cb(wifi_promiscuous_cb_t cb)
{
return esp_wifi_remote_set_promiscuous_rx_cb(cb);
}
esp_err_t esp_wifi_set_promiscuous(_Bool en)
{
return esp_wifi_remote_set_promiscuous(en);
}
esp_err_t esp_wifi_get_promiscuous(_Bool *en)
{
return esp_wifi_remote_get_promiscuous(en);
}
esp_err_t esp_wifi_set_promiscuous_filter(const wifi_promiscuous_filter_t *filter)
{
return esp_wifi_remote_set_promiscuous_filter(filter);
}
esp_err_t esp_wifi_get_promiscuous_filter(wifi_promiscuous_filter_t *filter)
{
return esp_wifi_remote_get_promiscuous_filter(filter);
}
esp_err_t esp_wifi_set_promiscuous_ctrl_filter(const wifi_promiscuous_filter_t *filter)
{
return esp_wifi_remote_set_promiscuous_ctrl_filter(filter);
}
esp_err_t esp_wifi_get_promiscuous_ctrl_filter(wifi_promiscuous_filter_t *filter)
{
return esp_wifi_remote_get_promiscuous_ctrl_filter(filter);
}
esp_err_t esp_wifi_set_config(wifi_interface_t interface, wifi_config_t *conf)
{
return esp_wifi_remote_set_config(interface, conf);
}
esp_err_t esp_wifi_get_config(wifi_interface_t interface, wifi_config_t *conf)
{
return esp_wifi_remote_get_config(interface, conf);
}
esp_err_t esp_wifi_ap_get_sta_list(wifi_sta_list_t *sta)
{
return esp_wifi_remote_ap_get_sta_list(sta);
}
esp_err_t esp_wifi_ap_get_sta_aid(const uint8_t mac[6], uint16_t *aid)
{
return esp_wifi_remote_ap_get_sta_aid(mac, aid);
}
esp_err_t esp_wifi_set_storage(wifi_storage_t storage)
{
return esp_wifi_remote_set_storage(storage);
}
esp_err_t esp_wifi_set_vendor_ie(_Bool enable, wifi_vendor_ie_type_t type, wifi_vendor_ie_id_t idx, const void *vnd_ie)
{
return esp_wifi_remote_set_vendor_ie(enable, type, idx, vnd_ie);
}
esp_err_t esp_wifi_set_vendor_ie_cb(esp_vendor_ie_cb_t cb, void *ctx)
{
return esp_wifi_remote_set_vendor_ie_cb(cb, ctx);
}
esp_err_t esp_wifi_set_max_tx_power(int8_t power)
{
return esp_wifi_remote_set_max_tx_power(power);
}
esp_err_t esp_wifi_get_max_tx_power(int8_t *power)
{
return esp_wifi_remote_get_max_tx_power(power);
}
esp_err_t esp_wifi_set_event_mask(uint32_t mask)
{
return esp_wifi_remote_set_event_mask(mask);
}
esp_err_t esp_wifi_get_event_mask(uint32_t *mask)
{
return esp_wifi_remote_get_event_mask(mask);
}
esp_err_t esp_wifi_80211_tx(wifi_interface_t ifx, const void *buffer, int len, _Bool en_sys_seq)
{
return esp_wifi_remote_80211_tx(ifx, buffer, len, en_sys_seq);
}
esp_err_t esp_wifi_set_csi_rx_cb(wifi_csi_cb_t cb, void *ctx)
{
return esp_wifi_remote_set_csi_rx_cb(cb, ctx);
}
esp_err_t esp_wifi_set_csi_config(const wifi_csi_config_t *config)
{
return esp_wifi_remote_set_csi_config(config);
}
esp_err_t esp_wifi_get_csi_config(wifi_csi_config_t *config)
{
return esp_wifi_remote_get_csi_config(config);
}
esp_err_t esp_wifi_set_csi(_Bool en)
{
return esp_wifi_remote_set_csi(en);
}
int64_t esp_wifi_get_tsf_time(wifi_interface_t interface)
{
return esp_wifi_remote_get_tsf_time(interface);
}
esp_err_t esp_wifi_set_inactive_time(wifi_interface_t ifx, uint16_t sec)
{
return esp_wifi_remote_set_inactive_time(ifx, sec);
}
esp_err_t esp_wifi_get_inactive_time(wifi_interface_t ifx, uint16_t *sec)
{
return esp_wifi_remote_get_inactive_time(ifx, sec);
}
esp_err_t esp_wifi_statis_dump(uint32_t modules)
{
return esp_wifi_remote_statis_dump(modules);
}
esp_err_t esp_wifi_set_rssi_threshold(int32_t rssi)
{
return esp_wifi_remote_set_rssi_threshold(rssi);
}
esp_err_t esp_wifi_ftm_initiate_session(wifi_ftm_initiator_cfg_t *cfg)
{
return esp_wifi_remote_ftm_initiate_session(cfg);
}
esp_err_t esp_wifi_ftm_end_session(void)
{
return esp_wifi_remote_ftm_end_session();
}
esp_err_t esp_wifi_ftm_resp_set_offset(int16_t offset_cm)
{
return esp_wifi_remote_ftm_resp_set_offset(offset_cm);
}
esp_err_t esp_wifi_ftm_get_report(wifi_ftm_report_entry_t *report, uint8_t num_entries)
{
return esp_wifi_remote_ftm_get_report(report, num_entries);
}
esp_err_t esp_wifi_config_11b_rate(wifi_interface_t ifx, _Bool disable)
{
return esp_wifi_remote_config_11b_rate(ifx, disable);
}
esp_err_t esp_wifi_connectionless_module_set_wake_interval(uint16_t wake_interval)
{
return esp_wifi_remote_connectionless_module_set_wake_interval(wake_interval);
}
esp_err_t esp_wifi_force_wakeup_acquire(void)
{
return esp_wifi_remote_force_wakeup_acquire();
}
esp_err_t esp_wifi_force_wakeup_release(void)
{
return esp_wifi_remote_force_wakeup_release();
}
esp_err_t esp_wifi_set_country_code(const char *country, _Bool ieee80211d_enabled)
{
return esp_wifi_remote_set_country_code(country, ieee80211d_enabled);
}
esp_err_t esp_wifi_get_country_code(char *country)
{
return esp_wifi_remote_get_country_code(country);
}
esp_err_t esp_wifi_config_80211_tx_rate(wifi_interface_t ifx, wifi_phy_rate_t rate)
{
return esp_wifi_remote_config_80211_tx_rate(ifx, rate);
}
esp_err_t esp_wifi_disable_pmf_config(wifi_interface_t ifx)
{
return esp_wifi_remote_disable_pmf_config(ifx);
}
esp_err_t esp_wifi_sta_get_aid(uint16_t *aid)
{
return esp_wifi_remote_sta_get_aid(aid);
}
esp_err_t esp_wifi_sta_get_negotiated_phymode(wifi_phy_mode_t *phymode)
{
return esp_wifi_remote_sta_get_negotiated_phymode(phymode);
}
esp_err_t esp_wifi_set_dynamic_cs(_Bool enabled)
{
return esp_wifi_remote_set_dynamic_cs(enabled);
}
esp_err_t esp_wifi_sta_get_rssi(int *rssi)
{
return esp_wifi_remote_sta_get_rssi(rssi);
}

View File

@@ -0,0 +1,769 @@
/*
* SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
// This file is auto-generated
#pragma once
#if CONFIG_SLAVE_IDF_TARGET_ESP32
#define CONFIG_ESP_WIFI_REMOTE_ENABLED 1
#define CONFIG_SLAVE_IDF_TARGET_ESP32 1
#define CONFIG_SLAVE_SOC_WIFI_SUPPORTED 1
#define CONFIG_SLAVE_SOC_WIFI_WAPI_SUPPORT 1
#define CONFIG_SLAVE_SOC_WIFI_CSI_SUPPORT 1
#define CONFIG_SLAVE_SOC_WIFI_MESH_SUPPORT 1
#define CONFIG_SLAVE_SOC_WIFI_SUPPORT_VARIABLE_BEACON_WINDOW 1
#define CONFIG_SLAVE_SOC_WIFI_NAN_SUPPORT 1
#define CONFIG_SLAVE_IDF_TARGET_ARCH_XTENSA 1
#define CONFIG_ESP_WIFI_REMOTE_LIBRARY_HOSTED 1
#define CONFIG_WIFI_RMT_STATIC_RX_BUFFER_NUM 10
#define CONFIG_WIFI_RMT_DYNAMIC_RX_BUFFER_NUM 32
#define CONFIG_WIFI_RMT_DYNAMIC_TX_BUFFER 1
#define CONFIG_WIFI_RMT_TX_BUFFER_TYPE 1
#define CONFIG_WIFI_RMT_DYNAMIC_TX_BUFFER_NUM 32
#define CONFIG_WIFI_RMT_STATIC_RX_MGMT_BUFFER 1
#define CONFIG_WIFI_RMT_DYNAMIC_RX_MGMT_BUF 0
#define CONFIG_WIFI_RMT_RX_MGMT_BUF_NUM_DEF 5
#define CONFIG_WIFI_RMT_AMPDU_TX_ENABLED 1
#define CONFIG_WIFI_RMT_TX_BA_WIN 6
#define CONFIG_WIFI_RMT_AMPDU_RX_ENABLED 1
#define CONFIG_WIFI_RMT_RX_BA_WIN 6
#define CONFIG_WIFI_RMT_NVS_ENABLED 1
#define CONFIG_WIFI_RMT_TASK_PINNED_TO_CORE_0 1
#define CONFIG_WIFI_RMT_SOFTAP_BEACON_MAX_LEN 752
#define CONFIG_WIFI_RMT_MGMT_SBUF_NUM 32
#define CONFIG_WIFI_RMT_IRAM_OPT 1
#define CONFIG_WIFI_RMT_RX_IRAM_OPT 1
#define CONFIG_WIFI_RMT_ENABLE_WPA3_SAE 1
#define CONFIG_WIFI_RMT_ENABLE_SAE_PK 1
#define CONFIG_WIFI_RMT_SOFTAP_SAE_SUPPORT 1
#define CONFIG_WIFI_RMT_ENABLE_WPA3_OWE_STA 1
#define CONFIG_WIFI_RMT_SLP_DEFAULT_MIN_ACTIVE_TIME 50
#define CONFIG_WIFI_RMT_SLP_DEFAULT_MAX_ACTIVE_TIME 10
#define CONFIG_WIFI_RMT_SLP_DEFAULT_WAIT_BROADCAST_DATA_TIME 15
#define CONFIG_WIFI_RMT_STA_DISCONNECTED_PM_ENABLE 1
#define CONFIG_WIFI_RMT_GMAC_SUPPORT 1
#define CONFIG_WIFI_RMT_SOFTAP_SUPPORT 1
#define CONFIG_WIFI_RMT_ESPNOW_MAX_ENCRYPT_NUM 7
#define CONFIG_WIFI_RMT_MBEDTLS_CRYPTO 1
#define CONFIG_WIFI_RMT_MBEDTLS_TLS_CLIENT 1
#define CONFIG_WIFI_RMT_ENTERPRISE_SUPPORT 1
#define CONFIG_ESP_WIFI_STATIC_RX_BUFFER_NUM 10
#define CONFIG_ESP_WIFI_DYNAMIC_RX_BUFFER_NUM 32
#define CONFIG_ESP_WIFI_TX_BUFFER_TYPE 1
#define CONFIG_ESP_WIFI_DYNAMIC_TX_BUFFER_NUM 32
#define CONFIG_ESP_WIFI_DYNAMIC_RX_MGMT_BUF 0
#define CONFIG_ESP_WIFI_RX_MGMT_BUF_NUM_DEF 5
#define CONFIG_ESP_WIFI_AMPDU_TX_ENABLED 1
#define CONFIG_ESP_WIFI_TX_BA_WIN 6
#define CONFIG_ESP_WIFI_AMPDU_RX_ENABLED 1
#define CONFIG_ESP_WIFI_RX_BA_WIN 6
#define CONFIG_ESP_WIFI_NVS_ENABLED 1
#define CONFIG_ESP_WIFI_SOFTAP_BEACON_MAX_LEN 752
#define CONFIG_ESP_WIFI_MGMT_SBUF_NUM 32
#define CONFIG_ESP_WIFI_IRAM_OPT 1
#define CONFIG_ESP_WIFI_RX_IRAM_OPT 1
#define CONFIG_ESP_WIFI_ENABLE_WPA3_SAE 1
#define CONFIG_ESP_WIFI_ENABLE_SAE_PK 1
#define CONFIG_ESP_WIFI_SOFTAP_SAE_SUPPORT 1
#define CONFIG_ESP_WIFI_ENABLE_WPA3_OWE_STA 1
#define CONFIG_ESP_WIFI_SLP_DEFAULT_MIN_ACTIVE_TIME 50
#define CONFIG_ESP_WIFI_SLP_DEFAULT_MAX_ACTIVE_TIME 10
#define CONFIG_ESP_WIFI_SLP_DEFAULT_WAIT_BROADCAST_DATA_TIME 15
#define CONFIG_ESP_WIFI_STA_DISCONNECTED_PM_ENABLE 1
#define CONFIG_ESP_WIFI_GMAC_SUPPORT 1
#define CONFIG_ESP_WIFI_SOFTAP_SUPPORT 1
#define CONFIG_ESP_WIFI_ESPNOW_MAX_ENCRYPT_NUM 7
#define CONFIG_ESP_WIFI_MBEDTLS_CRYPTO 1
#define CONFIG_ESP_WIFI_MBEDTLS_TLS_CLIENT 1
#define CONFIG_ESP_WIFI_ENTERPRISE_SUPPORT 1
#endif // CONFIG_SLAVE_IDF_TARGET_ESP32
#if CONFIG_SLAVE_IDF_TARGET_ESP32S2
#define CONFIG_ESP_WIFI_REMOTE_ENABLED 1
#define CONFIG_SLAVE_IDF_TARGET_ESP32S2 1
#define CONFIG_SLAVE_SOC_WIFI_SUPPORTED 1
#define CONFIG_SLAVE_SOC_WIFI_WAPI_SUPPORT 1
#define CONFIG_SLAVE_SOC_WIFI_CSI_SUPPORT 1
#define CONFIG_SLAVE_SOC_WIFI_MESH_SUPPORT 1
#define CONFIG_SLAVE_SOC_WIFI_SUPPORT_VARIABLE_BEACON_WINDOW 1
#define CONFIG_SLAVE_SOC_WIFI_NAN_SUPPORT 1
#define CONFIG_SLAVE_IDF_TARGET_ARCH_XTENSA 1
#define CONFIG_SLAVE_SOC_WIFI_LIGHT_SLEEP_CLK_WIDTH 12
#define CONFIG_SLAVE_SOC_WIFI_HW_TSF 1
#define CONFIG_SLAVE_SOC_WIFI_FTM_SUPPORT 1
#define CONFIG_SLAVE_FREERTOS_UNICORE 1
#define CONFIG_ESP_WIFI_REMOTE_LIBRARY_HOSTED 1
#define CONFIG_WIFI_RMT_STATIC_RX_BUFFER_NUM 10
#define CONFIG_WIFI_RMT_DYNAMIC_RX_BUFFER_NUM 32
#define CONFIG_WIFI_RMT_DYNAMIC_TX_BUFFER 1
#define CONFIG_WIFI_RMT_TX_BUFFER_TYPE 1
#define CONFIG_WIFI_RMT_DYNAMIC_TX_BUFFER_NUM 32
#define CONFIG_WIFI_RMT_STATIC_RX_MGMT_BUFFER 1
#define CONFIG_WIFI_RMT_DYNAMIC_RX_MGMT_BUF 0
#define CONFIG_WIFI_RMT_RX_MGMT_BUF_NUM_DEF 5
#define CONFIG_WIFI_RMT_AMPDU_TX_ENABLED 1
#define CONFIG_WIFI_RMT_TX_BA_WIN 6
#define CONFIG_WIFI_RMT_AMPDU_RX_ENABLED 1
#define CONFIG_WIFI_RMT_RX_BA_WIN 6
#define CONFIG_WIFI_RMT_NVS_ENABLED 1
#define CONFIG_WIFI_RMT_SOFTAP_BEACON_MAX_LEN 752
#define CONFIG_WIFI_RMT_MGMT_SBUF_NUM 32
#define CONFIG_WIFI_RMT_IRAM_OPT 1
#define CONFIG_WIFI_RMT_RX_IRAM_OPT 1
#define CONFIG_WIFI_RMT_ENABLE_WPA3_SAE 1
#define CONFIG_WIFI_RMT_ENABLE_SAE_PK 1
#define CONFIG_WIFI_RMT_SOFTAP_SAE_SUPPORT 1
#define CONFIG_WIFI_RMT_ENABLE_WPA3_OWE_STA 1
#define CONFIG_WIFI_RMT_SLP_DEFAULT_MIN_ACTIVE_TIME 50
#define CONFIG_WIFI_RMT_SLP_DEFAULT_MAX_ACTIVE_TIME 10
#define CONFIG_WIFI_RMT_SLP_DEFAULT_WAIT_BROADCAST_DATA_TIME 15
#define CONFIG_WIFI_RMT_STA_DISCONNECTED_PM_ENABLE 1
#define CONFIG_WIFI_RMT_GMAC_SUPPORT 1
#define CONFIG_WIFI_RMT_SOFTAP_SUPPORT 1
#define CONFIG_WIFI_RMT_ESPNOW_MAX_ENCRYPT_NUM 7
#define CONFIG_WIFI_RMT_MBEDTLS_CRYPTO 1
#define CONFIG_WIFI_RMT_MBEDTLS_TLS_CLIENT 1
#define CONFIG_WIFI_RMT_ENTERPRISE_SUPPORT 1
#define CONFIG_ESP_WIFI_STATIC_RX_BUFFER_NUM 10
#define CONFIG_ESP_WIFI_DYNAMIC_RX_BUFFER_NUM 32
#define CONFIG_ESP_WIFI_TX_BUFFER_TYPE 1
#define CONFIG_ESP_WIFI_DYNAMIC_TX_BUFFER_NUM 32
#define CONFIG_ESP_WIFI_DYNAMIC_RX_MGMT_BUF 0
#define CONFIG_ESP_WIFI_RX_MGMT_BUF_NUM_DEF 5
#define CONFIG_ESP_WIFI_AMPDU_TX_ENABLED 1
#define CONFIG_ESP_WIFI_TX_BA_WIN 6
#define CONFIG_ESP_WIFI_AMPDU_RX_ENABLED 1
#define CONFIG_ESP_WIFI_RX_BA_WIN 6
#define CONFIG_ESP_WIFI_NVS_ENABLED 1
#define CONFIG_ESP_WIFI_SOFTAP_BEACON_MAX_LEN 752
#define CONFIG_ESP_WIFI_MGMT_SBUF_NUM 32
#define CONFIG_ESP_WIFI_IRAM_OPT 1
#define CONFIG_ESP_WIFI_RX_IRAM_OPT 1
#define CONFIG_ESP_WIFI_ENABLE_WPA3_SAE 1
#define CONFIG_ESP_WIFI_ENABLE_SAE_PK 1
#define CONFIG_ESP_WIFI_SOFTAP_SAE_SUPPORT 1
#define CONFIG_ESP_WIFI_ENABLE_WPA3_OWE_STA 1
#define CONFIG_ESP_WIFI_SLP_DEFAULT_MIN_ACTIVE_TIME 50
#define CONFIG_ESP_WIFI_SLP_DEFAULT_MAX_ACTIVE_TIME 10
#define CONFIG_ESP_WIFI_SLP_DEFAULT_WAIT_BROADCAST_DATA_TIME 15
#define CONFIG_ESP_WIFI_STA_DISCONNECTED_PM_ENABLE 1
#define CONFIG_ESP_WIFI_GMAC_SUPPORT 1
#define CONFIG_ESP_WIFI_SOFTAP_SUPPORT 1
#define CONFIG_ESP_WIFI_ESPNOW_MAX_ENCRYPT_NUM 7
#define CONFIG_ESP_WIFI_MBEDTLS_CRYPTO 1
#define CONFIG_ESP_WIFI_MBEDTLS_TLS_CLIENT 1
#define CONFIG_ESP_WIFI_ENTERPRISE_SUPPORT 1
#endif // CONFIG_SLAVE_IDF_TARGET_ESP32S2
#if CONFIG_SLAVE_IDF_TARGET_ESP32C3
#define CONFIG_ESP_WIFI_REMOTE_ENABLED 1
#define CONFIG_SLAVE_IDF_TARGET_ESP32C3 1
#define CONFIG_SLAVE_SOC_WIFI_SUPPORTED 1
#define CONFIG_SLAVE_SOC_WIFI_WAPI_SUPPORT 1
#define CONFIG_SLAVE_SOC_WIFI_CSI_SUPPORT 1
#define CONFIG_SLAVE_SOC_WIFI_MESH_SUPPORT 1
#define CONFIG_SLAVE_SOC_WIFI_SUPPORT_VARIABLE_BEACON_WINDOW 1
#define CONFIG_SLAVE_SOC_WIFI_LIGHT_SLEEP_CLK_WIDTH 12
#define CONFIG_SLAVE_SOC_WIFI_HW_TSF 1
#define CONFIG_SLAVE_SOC_WIFI_FTM_SUPPORT 1
#define CONFIG_SLAVE_FREERTOS_UNICORE 1
#define CONFIG_SLAVE_SOC_WIFI_GCMP_SUPPORT 1
#define CONFIG_SLAVE_SOC_WIFI_PHY_NEEDS_USB_WORKAROUND 1
#define CONFIG_SLAVE_IDF_TARGET_ARCH_RISCV 1
#define CONFIG_ESP_WIFI_REMOTE_LIBRARY_HOSTED 1
#define CONFIG_WIFI_RMT_STATIC_RX_BUFFER_NUM 10
#define CONFIG_WIFI_RMT_DYNAMIC_RX_BUFFER_NUM 32
#define CONFIG_WIFI_RMT_DYNAMIC_TX_BUFFER 1
#define CONFIG_WIFI_RMT_TX_BUFFER_TYPE 1
#define CONFIG_WIFI_RMT_DYNAMIC_TX_BUFFER_NUM 32
#define CONFIG_WIFI_RMT_STATIC_RX_MGMT_BUFFER 1
#define CONFIG_WIFI_RMT_DYNAMIC_RX_MGMT_BUF 0
#define CONFIG_WIFI_RMT_RX_MGMT_BUF_NUM_DEF 5
#define CONFIG_WIFI_RMT_AMPDU_TX_ENABLED 1
#define CONFIG_WIFI_RMT_TX_BA_WIN 6
#define CONFIG_WIFI_RMT_AMPDU_RX_ENABLED 1
#define CONFIG_WIFI_RMT_RX_BA_WIN 6
#define CONFIG_WIFI_RMT_NVS_ENABLED 1
#define CONFIG_WIFI_RMT_SOFTAP_BEACON_MAX_LEN 752
#define CONFIG_WIFI_RMT_MGMT_SBUF_NUM 32
#define CONFIG_WIFI_RMT_IRAM_OPT 1
#define CONFIG_WIFI_RMT_RX_IRAM_OPT 1
#define CONFIG_WIFI_RMT_ENABLE_WPA3_SAE 1
#define CONFIG_WIFI_RMT_ENABLE_SAE_PK 1
#define CONFIG_WIFI_RMT_SOFTAP_SAE_SUPPORT 1
#define CONFIG_WIFI_RMT_ENABLE_WPA3_OWE_STA 1
#define CONFIG_WIFI_RMT_SLP_DEFAULT_MIN_ACTIVE_TIME 50
#define CONFIG_WIFI_RMT_SLP_DEFAULT_MAX_ACTIVE_TIME 10
#define CONFIG_WIFI_RMT_SLP_DEFAULT_WAIT_BROADCAST_DATA_TIME 15
#define CONFIG_WIFI_RMT_STA_DISCONNECTED_PM_ENABLE 1
#define CONFIG_WIFI_RMT_GMAC_SUPPORT 1
#define CONFIG_WIFI_RMT_SOFTAP_SUPPORT 1
#define CONFIG_WIFI_RMT_ESPNOW_MAX_ENCRYPT_NUM 7
#define CONFIG_WIFI_RMT_MBEDTLS_CRYPTO 1
#define CONFIG_WIFI_RMT_MBEDTLS_TLS_CLIENT 1
#define CONFIG_WIFI_RMT_ENTERPRISE_SUPPORT 1
#define CONFIG_ESP_WIFI_STATIC_RX_BUFFER_NUM 10
#define CONFIG_ESP_WIFI_DYNAMIC_RX_BUFFER_NUM 32
#define CONFIG_ESP_WIFI_TX_BUFFER_TYPE 1
#define CONFIG_ESP_WIFI_DYNAMIC_TX_BUFFER_NUM 32
#define CONFIG_ESP_WIFI_DYNAMIC_RX_MGMT_BUF 0
#define CONFIG_ESP_WIFI_RX_MGMT_BUF_NUM_DEF 5
#define CONFIG_ESP_WIFI_AMPDU_TX_ENABLED 1
#define CONFIG_ESP_WIFI_TX_BA_WIN 6
#define CONFIG_ESP_WIFI_AMPDU_RX_ENABLED 1
#define CONFIG_ESP_WIFI_RX_BA_WIN 6
#define CONFIG_ESP_WIFI_NVS_ENABLED 1
#define CONFIG_ESP_WIFI_SOFTAP_BEACON_MAX_LEN 752
#define CONFIG_ESP_WIFI_MGMT_SBUF_NUM 32
#define CONFIG_ESP_WIFI_IRAM_OPT 1
#define CONFIG_ESP_WIFI_RX_IRAM_OPT 1
#define CONFIG_ESP_WIFI_ENABLE_WPA3_SAE 1
#define CONFIG_ESP_WIFI_ENABLE_SAE_PK 1
#define CONFIG_ESP_WIFI_SOFTAP_SAE_SUPPORT 1
#define CONFIG_ESP_WIFI_ENABLE_WPA3_OWE_STA 1
#define CONFIG_ESP_WIFI_SLP_DEFAULT_MIN_ACTIVE_TIME 50
#define CONFIG_ESP_WIFI_SLP_DEFAULT_MAX_ACTIVE_TIME 10
#define CONFIG_ESP_WIFI_SLP_DEFAULT_WAIT_BROADCAST_DATA_TIME 15
#define CONFIG_ESP_WIFI_STA_DISCONNECTED_PM_ENABLE 1
#define CONFIG_ESP_WIFI_GMAC_SUPPORT 1
#define CONFIG_ESP_WIFI_SOFTAP_SUPPORT 1
#define CONFIG_ESP_WIFI_ESPNOW_MAX_ENCRYPT_NUM 7
#define CONFIG_ESP_WIFI_MBEDTLS_CRYPTO 1
#define CONFIG_ESP_WIFI_MBEDTLS_TLS_CLIENT 1
#define CONFIG_ESP_WIFI_ENTERPRISE_SUPPORT 1
#endif // CONFIG_SLAVE_IDF_TARGET_ESP32C3
#if CONFIG_SLAVE_IDF_TARGET_ESP32S3
#define CONFIG_ESP_WIFI_REMOTE_ENABLED 1
#define CONFIG_SLAVE_IDF_TARGET_ESP32S3 1
#define CONFIG_SLAVE_SOC_WIFI_SUPPORTED 1
#define CONFIG_SLAVE_SOC_WIFI_WAPI_SUPPORT 1
#define CONFIG_SLAVE_SOC_WIFI_CSI_SUPPORT 1
#define CONFIG_SLAVE_SOC_WIFI_MESH_SUPPORT 1
#define CONFIG_SLAVE_SOC_WIFI_SUPPORT_VARIABLE_BEACON_WINDOW 1
#define CONFIG_SLAVE_IDF_TARGET_ARCH_XTENSA 1
#define CONFIG_SLAVE_SOC_WIFI_LIGHT_SLEEP_CLK_WIDTH 12
#define CONFIG_SLAVE_SOC_WIFI_HW_TSF 1
#define CONFIG_SLAVE_SOC_WIFI_FTM_SUPPORT 1
#define CONFIG_SLAVE_SOC_WIFI_GCMP_SUPPORT 1
#define CONFIG_SLAVE_SOC_WIFI_PHY_NEEDS_USB_WORKAROUND 1
#define CONFIG_ESP_WIFI_REMOTE_LIBRARY_HOSTED 1
#define CONFIG_WIFI_RMT_STATIC_RX_BUFFER_NUM 10
#define CONFIG_WIFI_RMT_DYNAMIC_RX_BUFFER_NUM 32
#define CONFIG_WIFI_RMT_DYNAMIC_TX_BUFFER 1
#define CONFIG_WIFI_RMT_TX_BUFFER_TYPE 1
#define CONFIG_WIFI_RMT_DYNAMIC_TX_BUFFER_NUM 32
#define CONFIG_WIFI_RMT_STATIC_RX_MGMT_BUFFER 1
#define CONFIG_WIFI_RMT_DYNAMIC_RX_MGMT_BUF 0
#define CONFIG_WIFI_RMT_RX_MGMT_BUF_NUM_DEF 5
#define CONFIG_WIFI_RMT_AMPDU_TX_ENABLED 1
#define CONFIG_WIFI_RMT_TX_BA_WIN 6
#define CONFIG_WIFI_RMT_AMPDU_RX_ENABLED 1
#define CONFIG_WIFI_RMT_RX_BA_WIN 6
#define CONFIG_WIFI_RMT_NVS_ENABLED 1
#define CONFIG_WIFI_RMT_TASK_PINNED_TO_CORE_0 1
#define CONFIG_WIFI_RMT_SOFTAP_BEACON_MAX_LEN 752
#define CONFIG_WIFI_RMT_MGMT_SBUF_NUM 32
#define CONFIG_WIFI_RMT_IRAM_OPT 1
#define CONFIG_WIFI_RMT_RX_IRAM_OPT 1
#define CONFIG_WIFI_RMT_ENABLE_WPA3_SAE 1
#define CONFIG_WIFI_RMT_ENABLE_SAE_PK 1
#define CONFIG_WIFI_RMT_SOFTAP_SAE_SUPPORT 1
#define CONFIG_WIFI_RMT_ENABLE_WPA3_OWE_STA 1
#define CONFIG_WIFI_RMT_SLP_DEFAULT_MIN_ACTIVE_TIME 50
#define CONFIG_WIFI_RMT_SLP_DEFAULT_MAX_ACTIVE_TIME 10
#define CONFIG_WIFI_RMT_SLP_DEFAULT_WAIT_BROADCAST_DATA_TIME 15
#define CONFIG_WIFI_RMT_STA_DISCONNECTED_PM_ENABLE 1
#define CONFIG_WIFI_RMT_GMAC_SUPPORT 1
#define CONFIG_WIFI_RMT_SOFTAP_SUPPORT 1
#define CONFIG_WIFI_RMT_ESPNOW_MAX_ENCRYPT_NUM 7
#define CONFIG_WIFI_RMT_MBEDTLS_CRYPTO 1
#define CONFIG_WIFI_RMT_MBEDTLS_TLS_CLIENT 1
#define CONFIG_WIFI_RMT_ENTERPRISE_SUPPORT 1
#define CONFIG_ESP_WIFI_STATIC_RX_BUFFER_NUM 10
#define CONFIG_ESP_WIFI_DYNAMIC_RX_BUFFER_NUM 32
#define CONFIG_ESP_WIFI_TX_BUFFER_TYPE 1
#define CONFIG_ESP_WIFI_DYNAMIC_TX_BUFFER_NUM 32
#define CONFIG_ESP_WIFI_DYNAMIC_RX_MGMT_BUF 0
#define CONFIG_ESP_WIFI_RX_MGMT_BUF_NUM_DEF 5
#define CONFIG_ESP_WIFI_AMPDU_TX_ENABLED 1
#define CONFIG_ESP_WIFI_TX_BA_WIN 6
#define CONFIG_ESP_WIFI_AMPDU_RX_ENABLED 1
#define CONFIG_ESP_WIFI_RX_BA_WIN 6
#define CONFIG_ESP_WIFI_NVS_ENABLED 1
#define CONFIG_ESP_WIFI_SOFTAP_BEACON_MAX_LEN 752
#define CONFIG_ESP_WIFI_MGMT_SBUF_NUM 32
#define CONFIG_ESP_WIFI_IRAM_OPT 1
#define CONFIG_ESP_WIFI_RX_IRAM_OPT 1
#define CONFIG_ESP_WIFI_ENABLE_WPA3_SAE 1
#define CONFIG_ESP_WIFI_ENABLE_SAE_PK 1
#define CONFIG_ESP_WIFI_SOFTAP_SAE_SUPPORT 1
#define CONFIG_ESP_WIFI_ENABLE_WPA3_OWE_STA 1
#define CONFIG_ESP_WIFI_SLP_DEFAULT_MIN_ACTIVE_TIME 50
#define CONFIG_ESP_WIFI_SLP_DEFAULT_MAX_ACTIVE_TIME 10
#define CONFIG_ESP_WIFI_SLP_DEFAULT_WAIT_BROADCAST_DATA_TIME 15
#define CONFIG_ESP_WIFI_STA_DISCONNECTED_PM_ENABLE 1
#define CONFIG_ESP_WIFI_GMAC_SUPPORT 1
#define CONFIG_ESP_WIFI_SOFTAP_SUPPORT 1
#define CONFIG_ESP_WIFI_ESPNOW_MAX_ENCRYPT_NUM 7
#define CONFIG_ESP_WIFI_MBEDTLS_CRYPTO 1
#define CONFIG_ESP_WIFI_MBEDTLS_TLS_CLIENT 1
#define CONFIG_ESP_WIFI_ENTERPRISE_SUPPORT 1
#endif // CONFIG_SLAVE_IDF_TARGET_ESP32S3
#if CONFIG_SLAVE_IDF_TARGET_ESP32C2
#define CONFIG_ESP_WIFI_REMOTE_ENABLED 1
#define CONFIG_SLAVE_IDF_TARGET_ESP32C2 1
#define CONFIG_SLAVE_SOC_WIFI_SUPPORTED 1
#define CONFIG_SLAVE_SOC_WIFI_SUPPORT_VARIABLE_BEACON_WINDOW 1
#define CONFIG_SLAVE_SOC_WIFI_LIGHT_SLEEP_CLK_WIDTH 12
#define CONFIG_SLAVE_SOC_WIFI_HW_TSF 1
#define CONFIG_SLAVE_SOC_WIFI_FTM_SUPPORT 1
#define CONFIG_SLAVE_FREERTOS_UNICORE 1
#define CONFIG_SLAVE_SOC_WIFI_PHY_NEEDS_USB_WORKAROUND 1
#define CONFIG_SLAVE_IDF_TARGET_ARCH_RISCV 1
#define CONFIG_ESP_WIFI_REMOTE_LIBRARY_HOSTED 1
#define CONFIG_WIFI_RMT_STATIC_RX_BUFFER_NUM 10
#define CONFIG_WIFI_RMT_DYNAMIC_RX_BUFFER_NUM 32
#define CONFIG_WIFI_RMT_DYNAMIC_TX_BUFFER 1
#define CONFIG_WIFI_RMT_TX_BUFFER_TYPE 1
#define CONFIG_WIFI_RMT_DYNAMIC_TX_BUFFER_NUM 32
#define CONFIG_WIFI_RMT_STATIC_RX_MGMT_BUFFER 1
#define CONFIG_WIFI_RMT_DYNAMIC_RX_MGMT_BUF 0
#define CONFIG_WIFI_RMT_RX_MGMT_BUF_NUM_DEF 5
#define CONFIG_WIFI_RMT_AMPDU_TX_ENABLED 1
#define CONFIG_WIFI_RMT_TX_BA_WIN 6
#define CONFIG_WIFI_RMT_AMPDU_RX_ENABLED 1
#define CONFIG_WIFI_RMT_RX_BA_WIN 6
#define CONFIG_WIFI_RMT_NVS_ENABLED 1
#define CONFIG_WIFI_RMT_SOFTAP_BEACON_MAX_LEN 752
#define CONFIG_WIFI_RMT_MGMT_SBUF_NUM 32
#define CONFIG_WIFI_RMT_IRAM_OPT 1
#define CONFIG_WIFI_RMT_RX_IRAM_OPT 1
#define CONFIG_WIFI_RMT_ENABLE_WPA3_SAE 1
#define CONFIG_WIFI_RMT_ENABLE_SAE_PK 1
#define CONFIG_WIFI_RMT_SOFTAP_SAE_SUPPORT 1
#define CONFIG_WIFI_RMT_ENABLE_WPA3_OWE_STA 1
#define CONFIG_WIFI_RMT_SLP_DEFAULT_MIN_ACTIVE_TIME 50
#define CONFIG_WIFI_RMT_SLP_DEFAULT_MAX_ACTIVE_TIME 10
#define CONFIG_WIFI_RMT_SLP_DEFAULT_WAIT_BROADCAST_DATA_TIME 15
#define CONFIG_WIFI_RMT_STA_DISCONNECTED_PM_ENABLE 1
#define CONFIG_WIFI_RMT_GMAC_SUPPORT 1
#define CONFIG_WIFI_RMT_SOFTAP_SUPPORT 1
#define CONFIG_WIFI_RMT_ESPNOW_MAX_ENCRYPT_NUM 2
#define CONFIG_WIFI_RMT_MBEDTLS_CRYPTO 1
#define CONFIG_WIFI_RMT_MBEDTLS_TLS_CLIENT 1
#define CONFIG_WIFI_RMT_ENTERPRISE_SUPPORT 1
#define CONFIG_WIFI_RMT_ENT_FREE_DYNAMIC_BUFFER 1
#define CONFIG_ESP_WIFI_STATIC_RX_BUFFER_NUM 10
#define CONFIG_ESP_WIFI_DYNAMIC_RX_BUFFER_NUM 32
#define CONFIG_ESP_WIFI_TX_BUFFER_TYPE 1
#define CONFIG_ESP_WIFI_DYNAMIC_TX_BUFFER_NUM 32
#define CONFIG_ESP_WIFI_DYNAMIC_RX_MGMT_BUF 0
#define CONFIG_ESP_WIFI_RX_MGMT_BUF_NUM_DEF 5
#define CONFIG_ESP_WIFI_AMPDU_TX_ENABLED 1
#define CONFIG_ESP_WIFI_TX_BA_WIN 6
#define CONFIG_ESP_WIFI_AMPDU_RX_ENABLED 1
#define CONFIG_ESP_WIFI_RX_BA_WIN 6
#define CONFIG_ESP_WIFI_NVS_ENABLED 1
#define CONFIG_ESP_WIFI_SOFTAP_BEACON_MAX_LEN 752
#define CONFIG_ESP_WIFI_MGMT_SBUF_NUM 32
#define CONFIG_ESP_WIFI_IRAM_OPT 1
#define CONFIG_ESP_WIFI_RX_IRAM_OPT 1
#define CONFIG_ESP_WIFI_ENABLE_WPA3_SAE 1
#define CONFIG_ESP_WIFI_ENABLE_SAE_PK 1
#define CONFIG_ESP_WIFI_SOFTAP_SAE_SUPPORT 1
#define CONFIG_ESP_WIFI_ENABLE_WPA3_OWE_STA 1
#define CONFIG_ESP_WIFI_SLP_DEFAULT_MIN_ACTIVE_TIME 50
#define CONFIG_ESP_WIFI_SLP_DEFAULT_MAX_ACTIVE_TIME 10
#define CONFIG_ESP_WIFI_SLP_DEFAULT_WAIT_BROADCAST_DATA_TIME 15
#define CONFIG_ESP_WIFI_STA_DISCONNECTED_PM_ENABLE 1
#define CONFIG_ESP_WIFI_GMAC_SUPPORT 1
#define CONFIG_ESP_WIFI_SOFTAP_SUPPORT 1
#define CONFIG_ESP_WIFI_ESPNOW_MAX_ENCRYPT_NUM 2
#define CONFIG_ESP_WIFI_MBEDTLS_CRYPTO 1
#define CONFIG_ESP_WIFI_MBEDTLS_TLS_CLIENT 1
#define CONFIG_ESP_WIFI_ENTERPRISE_SUPPORT 1
#define CONFIG_ESP_WIFI_ENT_FREE_DYNAMIC_BUFFER 1
#endif // CONFIG_SLAVE_IDF_TARGET_ESP32C2
#if CONFIG_SLAVE_IDF_TARGET_ESP32C6
#define CONFIG_ESP_WIFI_REMOTE_ENABLED 1
#define CONFIG_SLAVE_IDF_TARGET_ESP32C6 1
#define CONFIG_SLAVE_SOC_WIFI_SUPPORTED 1
#define CONFIG_SLAVE_SOC_WIFI_WAPI_SUPPORT 1
#define CONFIG_SLAVE_SOC_WIFI_CSI_SUPPORT 1
#define CONFIG_SLAVE_SOC_WIFI_MESH_SUPPORT 1
#define CONFIG_SLAVE_SOC_WIFI_LIGHT_SLEEP_CLK_WIDTH 12
#define CONFIG_SLAVE_SOC_WIFI_HW_TSF 1
#define CONFIG_SLAVE_SOC_WIFI_FTM_SUPPORT 1
#define CONFIG_SLAVE_FREERTOS_UNICORE 1
#define CONFIG_SLAVE_SOC_WIFI_GCMP_SUPPORT 1
#define CONFIG_SLAVE_IDF_TARGET_ARCH_RISCV 1
#define CONFIG_SLAVE_SOC_WIFI_HE_SUPPORT 1
#define CONFIG_ESP_WIFI_REMOTE_LIBRARY_HOSTED 1
#define CONFIG_WIFI_RMT_STATIC_RX_BUFFER_NUM 10
#define CONFIG_WIFI_RMT_DYNAMIC_RX_BUFFER_NUM 32
#define CONFIG_WIFI_RMT_DYNAMIC_TX_BUFFER 1
#define CONFIG_WIFI_RMT_TX_BUFFER_TYPE 1
#define CONFIG_WIFI_RMT_DYNAMIC_TX_BUFFER_NUM 32
#define CONFIG_WIFI_RMT_STATIC_RX_MGMT_BUFFER 1
#define CONFIG_WIFI_RMT_DYNAMIC_RX_MGMT_BUF 0
#define CONFIG_WIFI_RMT_RX_MGMT_BUF_NUM_DEF 5
#define CONFIG_WIFI_RMT_AMPDU_TX_ENABLED 1
#define CONFIG_WIFI_RMT_TX_BA_WIN 6
#define CONFIG_WIFI_RMT_AMPDU_RX_ENABLED 1
#define CONFIG_WIFI_RMT_RX_BA_WIN 6
#define CONFIG_WIFI_RMT_NVS_ENABLED 1
#define CONFIG_WIFI_RMT_SOFTAP_BEACON_MAX_LEN 752
#define CONFIG_WIFI_RMT_MGMT_SBUF_NUM 32
#define CONFIG_WIFI_RMT_IRAM_OPT 1
#define CONFIG_WIFI_RMT_EXTRA_IRAM_OPT 1
#define CONFIG_WIFI_RMT_RX_IRAM_OPT 1
#define CONFIG_WIFI_RMT_ENABLE_WPA3_SAE 1
#define CONFIG_WIFI_RMT_ENABLE_SAE_PK 1
#define CONFIG_WIFI_RMT_SOFTAP_SAE_SUPPORT 1
#define CONFIG_WIFI_RMT_ENABLE_WPA3_OWE_STA 1
#define CONFIG_WIFI_RMT_SLP_IRAM_OPT 1
#define CONFIG_WIFI_RMT_SLP_DEFAULT_MIN_ACTIVE_TIME 50
#define CONFIG_WIFI_RMT_SLP_DEFAULT_MAX_ACTIVE_TIME 10
#define CONFIG_WIFI_RMT_SLP_DEFAULT_WAIT_BROADCAST_DATA_TIME 15
#define CONFIG_WIFI_RMT_STA_DISCONNECTED_PM_ENABLE 1
#define CONFIG_WIFI_RMT_GMAC_SUPPORT 1
#define CONFIG_WIFI_RMT_SOFTAP_SUPPORT 1
#define CONFIG_WIFI_RMT_ESPNOW_MAX_ENCRYPT_NUM 7
#define CONFIG_WIFI_RMT_MBEDTLS_CRYPTO 1
#define CONFIG_WIFI_RMT_MBEDTLS_TLS_CLIENT 1
#define CONFIG_WIFI_RMT_TX_HETB_QUEUE_NUM 3
#define CONFIG_WIFI_RMT_ENTERPRISE_SUPPORT 1
#define CONFIG_ESP_WIFI_STATIC_RX_BUFFER_NUM 10
#define CONFIG_ESP_WIFI_DYNAMIC_RX_BUFFER_NUM 32
#define CONFIG_ESP_WIFI_TX_BUFFER_TYPE 1
#define CONFIG_ESP_WIFI_DYNAMIC_TX_BUFFER_NUM 32
#define CONFIG_ESP_WIFI_DYNAMIC_RX_MGMT_BUF 0
#define CONFIG_ESP_WIFI_RX_MGMT_BUF_NUM_DEF 5
#define CONFIG_ESP_WIFI_AMPDU_TX_ENABLED 1
#define CONFIG_ESP_WIFI_TX_BA_WIN 6
#define CONFIG_ESP_WIFI_AMPDU_RX_ENABLED 1
#define CONFIG_ESP_WIFI_RX_BA_WIN 6
#define CONFIG_ESP_WIFI_NVS_ENABLED 1
#define CONFIG_ESP_WIFI_SOFTAP_BEACON_MAX_LEN 752
#define CONFIG_ESP_WIFI_MGMT_SBUF_NUM 32
#define CONFIG_ESP_WIFI_IRAM_OPT 1
#define CONFIG_ESP_WIFI_EXTRA_IRAM_OPT 1
#define CONFIG_ESP_WIFI_RX_IRAM_OPT 1
#define CONFIG_ESP_WIFI_ENABLE_WPA3_SAE 1
#define CONFIG_ESP_WIFI_ENABLE_SAE_PK 1
#define CONFIG_ESP_WIFI_SOFTAP_SAE_SUPPORT 1
#define CONFIG_ESP_WIFI_ENABLE_WPA3_OWE_STA 1
#define CONFIG_ESP_WIFI_SLP_IRAM_OPT 1
#define CONFIG_ESP_WIFI_SLP_DEFAULT_MIN_ACTIVE_TIME 50
#define CONFIG_ESP_WIFI_SLP_DEFAULT_MAX_ACTIVE_TIME 10
#define CONFIG_ESP_WIFI_SLP_DEFAULT_WAIT_BROADCAST_DATA_TIME 15
#define CONFIG_ESP_WIFI_STA_DISCONNECTED_PM_ENABLE 1
#define CONFIG_ESP_WIFI_GMAC_SUPPORT 1
#define CONFIG_ESP_WIFI_SOFTAP_SUPPORT 1
#define CONFIG_ESP_WIFI_ESPNOW_MAX_ENCRYPT_NUM 7
#define CONFIG_ESP_WIFI_MBEDTLS_CRYPTO 1
#define CONFIG_ESP_WIFI_MBEDTLS_TLS_CLIENT 1
#define CONFIG_ESP_WIFI_TX_HETB_QUEUE_NUM 3
#define CONFIG_ESP_WIFI_ENTERPRISE_SUPPORT 1
#endif // CONFIG_SLAVE_IDF_TARGET_ESP32C6
#if CONFIG_SLAVE_IDF_TARGET_ESP32H2
#define CONFIG_ESP_WIFI_REMOTE_ENABLED 1
#define CONFIG_SLAVE_IDF_TARGET_ESP32 1
#define CONFIG_SLAVE_SOC_WIFI_SUPPORTED 1
#define CONFIG_SLAVE_SOC_WIFI_WAPI_SUPPORT 1
#define CONFIG_SLAVE_SOC_WIFI_CSI_SUPPORT 1
#define CONFIG_SLAVE_SOC_WIFI_MESH_SUPPORT 1
#define CONFIG_SLAVE_SOC_WIFI_SUPPORT_VARIABLE_BEACON_WINDOW 1
#define CONFIG_SLAVE_SOC_WIFI_NAN_SUPPORT 1
#define CONFIG_SLAVE_IDF_TARGET_ARCH_XTENSA 1
#define CONFIG_ESP_WIFI_REMOTE_LIBRARY_HOSTED 1
#define CONFIG_WIFI_RMT_STATIC_RX_BUFFER_NUM 10
#define CONFIG_WIFI_RMT_DYNAMIC_RX_BUFFER_NUM 32
#define CONFIG_WIFI_RMT_DYNAMIC_TX_BUFFER 1
#define CONFIG_WIFI_RMT_TX_BUFFER_TYPE 1
#define CONFIG_WIFI_RMT_DYNAMIC_TX_BUFFER_NUM 32
#define CONFIG_WIFI_RMT_STATIC_RX_MGMT_BUFFER 1
#define CONFIG_WIFI_RMT_DYNAMIC_RX_MGMT_BUF 0
#define CONFIG_WIFI_RMT_RX_MGMT_BUF_NUM_DEF 5
#define CONFIG_WIFI_RMT_AMPDU_TX_ENABLED 1
#define CONFIG_WIFI_RMT_TX_BA_WIN 6
#define CONFIG_WIFI_RMT_AMPDU_RX_ENABLED 1
#define CONFIG_WIFI_RMT_RX_BA_WIN 6
#define CONFIG_WIFI_RMT_NVS_ENABLED 1
#define CONFIG_WIFI_RMT_TASK_PINNED_TO_CORE_0 1
#define CONFIG_WIFI_RMT_SOFTAP_BEACON_MAX_LEN 752
#define CONFIG_WIFI_RMT_MGMT_SBUF_NUM 32
#define CONFIG_WIFI_RMT_IRAM_OPT 1
#define CONFIG_WIFI_RMT_RX_IRAM_OPT 1
#define CONFIG_WIFI_RMT_ENABLE_WPA3_SAE 1
#define CONFIG_WIFI_RMT_ENABLE_SAE_PK 1
#define CONFIG_WIFI_RMT_SOFTAP_SAE_SUPPORT 1
#define CONFIG_WIFI_RMT_ENABLE_WPA3_OWE_STA 1
#define CONFIG_WIFI_RMT_SLP_DEFAULT_MIN_ACTIVE_TIME 50
#define CONFIG_WIFI_RMT_SLP_DEFAULT_MAX_ACTIVE_TIME 10
#define CONFIG_WIFI_RMT_SLP_DEFAULT_WAIT_BROADCAST_DATA_TIME 15
#define CONFIG_WIFI_RMT_STA_DISCONNECTED_PM_ENABLE 1
#define CONFIG_WIFI_RMT_GMAC_SUPPORT 1
#define CONFIG_WIFI_RMT_SOFTAP_SUPPORT 1
#define CONFIG_WIFI_RMT_ESPNOW_MAX_ENCRYPT_NUM 7
#define CONFIG_WIFI_RMT_MBEDTLS_CRYPTO 1
#define CONFIG_WIFI_RMT_MBEDTLS_TLS_CLIENT 1
#define CONFIG_WIFI_RMT_ENTERPRISE_SUPPORT 1
#define CONFIG_ESP_WIFI_STATIC_RX_BUFFER_NUM 10
#define CONFIG_ESP_WIFI_DYNAMIC_RX_BUFFER_NUM 32
#define CONFIG_ESP_WIFI_TX_BUFFER_TYPE 1
#define CONFIG_ESP_WIFI_DYNAMIC_TX_BUFFER_NUM 32
#define CONFIG_ESP_WIFI_DYNAMIC_RX_MGMT_BUF 0
#define CONFIG_ESP_WIFI_RX_MGMT_BUF_NUM_DEF 5
#define CONFIG_ESP_WIFI_AMPDU_TX_ENABLED 1
#define CONFIG_ESP_WIFI_TX_BA_WIN 6
#define CONFIG_ESP_WIFI_AMPDU_RX_ENABLED 1
#define CONFIG_ESP_WIFI_RX_BA_WIN 6
#define CONFIG_ESP_WIFI_NVS_ENABLED 1
#define CONFIG_ESP_WIFI_SOFTAP_BEACON_MAX_LEN 752
#define CONFIG_ESP_WIFI_MGMT_SBUF_NUM 32
#define CONFIG_ESP_WIFI_IRAM_OPT 1
#define CONFIG_ESP_WIFI_RX_IRAM_OPT 1
#define CONFIG_ESP_WIFI_ENABLE_WPA3_SAE 1
#define CONFIG_ESP_WIFI_ENABLE_SAE_PK 1
#define CONFIG_ESP_WIFI_SOFTAP_SAE_SUPPORT 1
#define CONFIG_ESP_WIFI_ENABLE_WPA3_OWE_STA 1
#define CONFIG_ESP_WIFI_SLP_DEFAULT_MIN_ACTIVE_TIME 50
#define CONFIG_ESP_WIFI_SLP_DEFAULT_MAX_ACTIVE_TIME 10
#define CONFIG_ESP_WIFI_SLP_DEFAULT_WAIT_BROADCAST_DATA_TIME 15
#define CONFIG_ESP_WIFI_STA_DISCONNECTED_PM_ENABLE 1
#define CONFIG_ESP_WIFI_GMAC_SUPPORT 1
#define CONFIG_ESP_WIFI_SOFTAP_SUPPORT 1
#define CONFIG_ESP_WIFI_ESPNOW_MAX_ENCRYPT_NUM 7
#define CONFIG_ESP_WIFI_MBEDTLS_CRYPTO 1
#define CONFIG_ESP_WIFI_MBEDTLS_TLS_CLIENT 1
#define CONFIG_ESP_WIFI_ENTERPRISE_SUPPORT 1
#endif // CONFIG_SLAVE_IDF_TARGET_ESP32H2
#if CONFIG_SLAVE_IDF_TARGET_ESP32P4
#define CONFIG_ESP_WIFI_REMOTE_ENABLED 1
#define CONFIG_SLAVE_IDF_TARGET_ESP32 1
#define CONFIG_SLAVE_SOC_WIFI_SUPPORTED 1
#define CONFIG_SLAVE_SOC_WIFI_WAPI_SUPPORT 1
#define CONFIG_SLAVE_SOC_WIFI_CSI_SUPPORT 1
#define CONFIG_SLAVE_SOC_WIFI_MESH_SUPPORT 1
#define CONFIG_SLAVE_SOC_WIFI_SUPPORT_VARIABLE_BEACON_WINDOW 1
#define CONFIG_SLAVE_SOC_WIFI_NAN_SUPPORT 1
#define CONFIG_SLAVE_IDF_TARGET_ARCH_XTENSA 1
#define CONFIG_ESP_WIFI_REMOTE_LIBRARY_HOSTED 1
#define CONFIG_WIFI_RMT_STATIC_RX_BUFFER_NUM 10
#define CONFIG_WIFI_RMT_DYNAMIC_RX_BUFFER_NUM 32
#define CONFIG_WIFI_RMT_DYNAMIC_TX_BUFFER 1
#define CONFIG_WIFI_RMT_TX_BUFFER_TYPE 1
#define CONFIG_WIFI_RMT_DYNAMIC_TX_BUFFER_NUM 32
#define CONFIG_WIFI_RMT_STATIC_RX_MGMT_BUFFER 1
#define CONFIG_WIFI_RMT_DYNAMIC_RX_MGMT_BUF 0
#define CONFIG_WIFI_RMT_RX_MGMT_BUF_NUM_DEF 5
#define CONFIG_WIFI_RMT_AMPDU_TX_ENABLED 1
#define CONFIG_WIFI_RMT_TX_BA_WIN 6
#define CONFIG_WIFI_RMT_AMPDU_RX_ENABLED 1
#define CONFIG_WIFI_RMT_RX_BA_WIN 6
#define CONFIG_WIFI_RMT_NVS_ENABLED 1
#define CONFIG_WIFI_RMT_TASK_PINNED_TO_CORE_0 1
#define CONFIG_WIFI_RMT_SOFTAP_BEACON_MAX_LEN 752
#define CONFIG_WIFI_RMT_MGMT_SBUF_NUM 32
#define CONFIG_WIFI_RMT_IRAM_OPT 1
#define CONFIG_WIFI_RMT_RX_IRAM_OPT 1
#define CONFIG_WIFI_RMT_ENABLE_WPA3_SAE 1
#define CONFIG_WIFI_RMT_ENABLE_SAE_PK 1
#define CONFIG_WIFI_RMT_SOFTAP_SAE_SUPPORT 1
#define CONFIG_WIFI_RMT_ENABLE_WPA3_OWE_STA 1
#define CONFIG_WIFI_RMT_SLP_DEFAULT_MIN_ACTIVE_TIME 50
#define CONFIG_WIFI_RMT_SLP_DEFAULT_MAX_ACTIVE_TIME 10
#define CONFIG_WIFI_RMT_SLP_DEFAULT_WAIT_BROADCAST_DATA_TIME 15
#define CONFIG_WIFI_RMT_STA_DISCONNECTED_PM_ENABLE 1
#define CONFIG_WIFI_RMT_GMAC_SUPPORT 1
#define CONFIG_WIFI_RMT_SOFTAP_SUPPORT 1
#define CONFIG_WIFI_RMT_ESPNOW_MAX_ENCRYPT_NUM 7
#define CONFIG_WIFI_RMT_MBEDTLS_CRYPTO 1
#define CONFIG_WIFI_RMT_MBEDTLS_TLS_CLIENT 1
#define CONFIG_WIFI_RMT_ENTERPRISE_SUPPORT 1
#define CONFIG_ESP_WIFI_STATIC_RX_BUFFER_NUM 10
#define CONFIG_ESP_WIFI_DYNAMIC_RX_BUFFER_NUM 32
#define CONFIG_ESP_WIFI_TX_BUFFER_TYPE 1
#define CONFIG_ESP_WIFI_DYNAMIC_TX_BUFFER_NUM 32
#define CONFIG_ESP_WIFI_DYNAMIC_RX_MGMT_BUF 0
#define CONFIG_ESP_WIFI_RX_MGMT_BUF_NUM_DEF 5
#define CONFIG_ESP_WIFI_AMPDU_TX_ENABLED 1
#define CONFIG_ESP_WIFI_TX_BA_WIN 6
#define CONFIG_ESP_WIFI_AMPDU_RX_ENABLED 1
#define CONFIG_ESP_WIFI_RX_BA_WIN 6
#define CONFIG_ESP_WIFI_NVS_ENABLED 1
#define CONFIG_ESP_WIFI_SOFTAP_BEACON_MAX_LEN 752
#define CONFIG_ESP_WIFI_MGMT_SBUF_NUM 32
#define CONFIG_ESP_WIFI_IRAM_OPT 1
#define CONFIG_ESP_WIFI_RX_IRAM_OPT 1
#define CONFIG_ESP_WIFI_ENABLE_WPA3_SAE 1
#define CONFIG_ESP_WIFI_ENABLE_SAE_PK 1
#define CONFIG_ESP_WIFI_SOFTAP_SAE_SUPPORT 1
#define CONFIG_ESP_WIFI_ENABLE_WPA3_OWE_STA 1
#define CONFIG_ESP_WIFI_SLP_DEFAULT_MIN_ACTIVE_TIME 50
#define CONFIG_ESP_WIFI_SLP_DEFAULT_MAX_ACTIVE_TIME 10
#define CONFIG_ESP_WIFI_SLP_DEFAULT_WAIT_BROADCAST_DATA_TIME 15
#define CONFIG_ESP_WIFI_STA_DISCONNECTED_PM_ENABLE 1
#define CONFIG_ESP_WIFI_GMAC_SUPPORT 1
#define CONFIG_ESP_WIFI_SOFTAP_SUPPORT 1
#define CONFIG_ESP_WIFI_ESPNOW_MAX_ENCRYPT_NUM 7
#define CONFIG_ESP_WIFI_MBEDTLS_CRYPTO 1
#define CONFIG_ESP_WIFI_MBEDTLS_TLS_CLIENT 1
#define CONFIG_ESP_WIFI_ENTERPRISE_SUPPORT 1
#endif // CONFIG_SLAVE_IDF_TARGET_ESP32P4
#if CONFIG_SLAVE_IDF_TARGET_ESP32C5
#define CONFIG_ESP_WIFI_REMOTE_ENABLED 1
#define CONFIG_SLAVE_IDF_TARGET_ESP32 1
#define CONFIG_SLAVE_SOC_WIFI_SUPPORTED 1
#define CONFIG_SLAVE_SOC_WIFI_WAPI_SUPPORT 1
#define CONFIG_SLAVE_SOC_WIFI_CSI_SUPPORT 1
#define CONFIG_SLAVE_SOC_WIFI_MESH_SUPPORT 1
#define CONFIG_SLAVE_SOC_WIFI_SUPPORT_VARIABLE_BEACON_WINDOW 1
#define CONFIG_SLAVE_SOC_WIFI_NAN_SUPPORT 1
#define CONFIG_SLAVE_IDF_TARGET_ARCH_XTENSA 1
#define CONFIG_ESP_WIFI_REMOTE_LIBRARY_HOSTED 1
#define CONFIG_WIFI_RMT_STATIC_RX_BUFFER_NUM 10
#define CONFIG_WIFI_RMT_DYNAMIC_RX_BUFFER_NUM 32
#define CONFIG_WIFI_RMT_DYNAMIC_TX_BUFFER 1
#define CONFIG_WIFI_RMT_TX_BUFFER_TYPE 1
#define CONFIG_WIFI_RMT_DYNAMIC_TX_BUFFER_NUM 32
#define CONFIG_WIFI_RMT_STATIC_RX_MGMT_BUFFER 1
#define CONFIG_WIFI_RMT_DYNAMIC_RX_MGMT_BUF 0
#define CONFIG_WIFI_RMT_RX_MGMT_BUF_NUM_DEF 5
#define CONFIG_WIFI_RMT_AMPDU_TX_ENABLED 1
#define CONFIG_WIFI_RMT_TX_BA_WIN 6
#define CONFIG_WIFI_RMT_AMPDU_RX_ENABLED 1
#define CONFIG_WIFI_RMT_RX_BA_WIN 6
#define CONFIG_WIFI_RMT_NVS_ENABLED 1
#define CONFIG_WIFI_RMT_TASK_PINNED_TO_CORE_0 1
#define CONFIG_WIFI_RMT_SOFTAP_BEACON_MAX_LEN 752
#define CONFIG_WIFI_RMT_MGMT_SBUF_NUM 32
#define CONFIG_WIFI_RMT_IRAM_OPT 1
#define CONFIG_WIFI_RMT_RX_IRAM_OPT 1
#define CONFIG_WIFI_RMT_ENABLE_WPA3_SAE 1
#define CONFIG_WIFI_RMT_ENABLE_SAE_PK 1
#define CONFIG_WIFI_RMT_SOFTAP_SAE_SUPPORT 1
#define CONFIG_WIFI_RMT_ENABLE_WPA3_OWE_STA 1
#define CONFIG_WIFI_RMT_SLP_DEFAULT_MIN_ACTIVE_TIME 50
#define CONFIG_WIFI_RMT_SLP_DEFAULT_MAX_ACTIVE_TIME 10
#define CONFIG_WIFI_RMT_SLP_DEFAULT_WAIT_BROADCAST_DATA_TIME 15
#define CONFIG_WIFI_RMT_STA_DISCONNECTED_PM_ENABLE 1
#define CONFIG_WIFI_RMT_GMAC_SUPPORT 1
#define CONFIG_WIFI_RMT_SOFTAP_SUPPORT 1
#define CONFIG_WIFI_RMT_ESPNOW_MAX_ENCRYPT_NUM 7
#define CONFIG_WIFI_RMT_MBEDTLS_CRYPTO 1
#define CONFIG_WIFI_RMT_MBEDTLS_TLS_CLIENT 1
#define CONFIG_WIFI_RMT_ENTERPRISE_SUPPORT 1
#define CONFIG_ESP_WIFI_STATIC_RX_BUFFER_NUM 10
#define CONFIG_ESP_WIFI_DYNAMIC_RX_BUFFER_NUM 32
#define CONFIG_ESP_WIFI_TX_BUFFER_TYPE 1
#define CONFIG_ESP_WIFI_DYNAMIC_TX_BUFFER_NUM 32
#define CONFIG_ESP_WIFI_DYNAMIC_RX_MGMT_BUF 0
#define CONFIG_ESP_WIFI_RX_MGMT_BUF_NUM_DEF 5
#define CONFIG_ESP_WIFI_AMPDU_TX_ENABLED 1
#define CONFIG_ESP_WIFI_TX_BA_WIN 6
#define CONFIG_ESP_WIFI_AMPDU_RX_ENABLED 1
#define CONFIG_ESP_WIFI_RX_BA_WIN 6
#define CONFIG_ESP_WIFI_NVS_ENABLED 1
#define CONFIG_ESP_WIFI_SOFTAP_BEACON_MAX_LEN 752
#define CONFIG_ESP_WIFI_MGMT_SBUF_NUM 32
#define CONFIG_ESP_WIFI_IRAM_OPT 1
#define CONFIG_ESP_WIFI_RX_IRAM_OPT 1
#define CONFIG_ESP_WIFI_ENABLE_WPA3_SAE 1
#define CONFIG_ESP_WIFI_ENABLE_SAE_PK 1
#define CONFIG_ESP_WIFI_SOFTAP_SAE_SUPPORT 1
#define CONFIG_ESP_WIFI_ENABLE_WPA3_OWE_STA 1
#define CONFIG_ESP_WIFI_SLP_DEFAULT_MIN_ACTIVE_TIME 50
#define CONFIG_ESP_WIFI_SLP_DEFAULT_MAX_ACTIVE_TIME 10
#define CONFIG_ESP_WIFI_SLP_DEFAULT_WAIT_BROADCAST_DATA_TIME 15
#define CONFIG_ESP_WIFI_STA_DISCONNECTED_PM_ENABLE 1
#define CONFIG_ESP_WIFI_GMAC_SUPPORT 1
#define CONFIG_ESP_WIFI_SOFTAP_SUPPORT 1
#define CONFIG_ESP_WIFI_ESPNOW_MAX_ENCRYPT_NUM 7
#define CONFIG_ESP_WIFI_MBEDTLS_CRYPTO 1
#define CONFIG_ESP_WIFI_MBEDTLS_TLS_CLIENT 1
#define CONFIG_ESP_WIFI_ENTERPRISE_SUPPORT 1
#endif // CONFIG_SLAVE_IDF_TARGET_ESP32C5
#if CONFIG_SLAVE_IDF_TARGET_ESP32C61
#define CONFIG_ESP_WIFI_REMOTE_ENABLED 1
#define CONFIG_SLAVE_IDF_TARGET_ESP32 1
#define CONFIG_SLAVE_SOC_WIFI_SUPPORTED 1
#define CONFIG_SLAVE_SOC_WIFI_WAPI_SUPPORT 1
#define CONFIG_SLAVE_SOC_WIFI_CSI_SUPPORT 1
#define CONFIG_SLAVE_SOC_WIFI_MESH_SUPPORT 1
#define CONFIG_SLAVE_SOC_WIFI_SUPPORT_VARIABLE_BEACON_WINDOW 1
#define CONFIG_SLAVE_SOC_WIFI_NAN_SUPPORT 1
#define CONFIG_SLAVE_IDF_TARGET_ARCH_XTENSA 1
#define CONFIG_ESP_WIFI_REMOTE_LIBRARY_HOSTED 1
#define CONFIG_WIFI_RMT_STATIC_RX_BUFFER_NUM 10
#define CONFIG_WIFI_RMT_DYNAMIC_RX_BUFFER_NUM 32
#define CONFIG_WIFI_RMT_DYNAMIC_TX_BUFFER 1
#define CONFIG_WIFI_RMT_TX_BUFFER_TYPE 1
#define CONFIG_WIFI_RMT_DYNAMIC_TX_BUFFER_NUM 32
#define CONFIG_WIFI_RMT_STATIC_RX_MGMT_BUFFER 1
#define CONFIG_WIFI_RMT_DYNAMIC_RX_MGMT_BUF 0
#define CONFIG_WIFI_RMT_RX_MGMT_BUF_NUM_DEF 5
#define CONFIG_WIFI_RMT_AMPDU_TX_ENABLED 1
#define CONFIG_WIFI_RMT_TX_BA_WIN 6
#define CONFIG_WIFI_RMT_AMPDU_RX_ENABLED 1
#define CONFIG_WIFI_RMT_RX_BA_WIN 6
#define CONFIG_WIFI_RMT_NVS_ENABLED 1
#define CONFIG_WIFI_RMT_TASK_PINNED_TO_CORE_0 1
#define CONFIG_WIFI_RMT_SOFTAP_BEACON_MAX_LEN 752
#define CONFIG_WIFI_RMT_MGMT_SBUF_NUM 32
#define CONFIG_WIFI_RMT_IRAM_OPT 1
#define CONFIG_WIFI_RMT_RX_IRAM_OPT 1
#define CONFIG_WIFI_RMT_ENABLE_WPA3_SAE 1
#define CONFIG_WIFI_RMT_ENABLE_SAE_PK 1
#define CONFIG_WIFI_RMT_SOFTAP_SAE_SUPPORT 1
#define CONFIG_WIFI_RMT_ENABLE_WPA3_OWE_STA 1
#define CONFIG_WIFI_RMT_SLP_DEFAULT_MIN_ACTIVE_TIME 50
#define CONFIG_WIFI_RMT_SLP_DEFAULT_MAX_ACTIVE_TIME 10
#define CONFIG_WIFI_RMT_SLP_DEFAULT_WAIT_BROADCAST_DATA_TIME 15
#define CONFIG_WIFI_RMT_STA_DISCONNECTED_PM_ENABLE 1
#define CONFIG_WIFI_RMT_GMAC_SUPPORT 1
#define CONFIG_WIFI_RMT_SOFTAP_SUPPORT 1
#define CONFIG_WIFI_RMT_ESPNOW_MAX_ENCRYPT_NUM 7
#define CONFIG_WIFI_RMT_MBEDTLS_CRYPTO 1
#define CONFIG_WIFI_RMT_MBEDTLS_TLS_CLIENT 1
#define CONFIG_WIFI_RMT_ENTERPRISE_SUPPORT 1
#define CONFIG_ESP_WIFI_STATIC_RX_BUFFER_NUM 10
#define CONFIG_ESP_WIFI_DYNAMIC_RX_BUFFER_NUM 32
#define CONFIG_ESP_WIFI_TX_BUFFER_TYPE 1
#define CONFIG_ESP_WIFI_DYNAMIC_TX_BUFFER_NUM 32
#define CONFIG_ESP_WIFI_DYNAMIC_RX_MGMT_BUF 0
#define CONFIG_ESP_WIFI_RX_MGMT_BUF_NUM_DEF 5
#define CONFIG_ESP_WIFI_AMPDU_TX_ENABLED 1
#define CONFIG_ESP_WIFI_TX_BA_WIN 6
#define CONFIG_ESP_WIFI_AMPDU_RX_ENABLED 1
#define CONFIG_ESP_WIFI_RX_BA_WIN 6
#define CONFIG_ESP_WIFI_NVS_ENABLED 1
#define CONFIG_ESP_WIFI_SOFTAP_BEACON_MAX_LEN 752
#define CONFIG_ESP_WIFI_MGMT_SBUF_NUM 32
#define CONFIG_ESP_WIFI_IRAM_OPT 1
#define CONFIG_ESP_WIFI_RX_IRAM_OPT 1
#define CONFIG_ESP_WIFI_ENABLE_WPA3_SAE 1
#define CONFIG_ESP_WIFI_ENABLE_SAE_PK 1
#define CONFIG_ESP_WIFI_SOFTAP_SAE_SUPPORT 1
#define CONFIG_ESP_WIFI_ENABLE_WPA3_OWE_STA 1
#define CONFIG_ESP_WIFI_SLP_DEFAULT_MIN_ACTIVE_TIME 50
#define CONFIG_ESP_WIFI_SLP_DEFAULT_MAX_ACTIVE_TIME 10
#define CONFIG_ESP_WIFI_SLP_DEFAULT_WAIT_BROADCAST_DATA_TIME 15
#define CONFIG_ESP_WIFI_STA_DISCONNECTED_PM_ENABLE 1
#define CONFIG_ESP_WIFI_GMAC_SUPPORT 1
#define CONFIG_ESP_WIFI_SOFTAP_SUPPORT 1
#define CONFIG_ESP_WIFI_ESPNOW_MAX_ENCRYPT_NUM 7
#define CONFIG_ESP_WIFI_MBEDTLS_CRYPTO 1
#define CONFIG_ESP_WIFI_MBEDTLS_TLS_CLIENT 1
#define CONFIG_ESP_WIFI_ENTERPRISE_SUPPORT 1
#endif // CONFIG_SLAVE_IDF_TARGET_ESP32C61

View File

@@ -0,0 +1,83 @@
/*
* SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
// This file is auto-generated
#pragma once
esp_err_t esp_wifi_remote_init(const wifi_init_config_t *config);
esp_err_t esp_wifi_remote_deinit(void);
esp_err_t esp_wifi_remote_set_mode(wifi_mode_t mode);
esp_err_t esp_wifi_remote_get_mode(wifi_mode_t *mode);
esp_err_t esp_wifi_remote_start(void);
esp_err_t esp_wifi_remote_stop(void);
esp_err_t esp_wifi_remote_restore(void);
esp_err_t esp_wifi_remote_connect(void);
esp_err_t esp_wifi_remote_disconnect(void);
esp_err_t esp_wifi_remote_clear_fast_connect(void);
esp_err_t esp_wifi_remote_deauth_sta(uint16_t aid);
esp_err_t esp_wifi_remote_scan_start(const wifi_scan_config_t *config, _Bool block);
esp_err_t esp_wifi_remote_set_scan_parameters(const wifi_scan_default_params_t *config);
esp_err_t esp_wifi_remote_get_scan_parameters(wifi_scan_default_params_t *config);
esp_err_t esp_wifi_remote_scan_stop(void);
esp_err_t esp_wifi_remote_scan_get_ap_num(uint16_t *number);
esp_err_t esp_wifi_remote_scan_get_ap_records(uint16_t *number, wifi_ap_record_t *ap_records);
esp_err_t esp_wifi_remote_scan_get_ap_record(wifi_ap_record_t *ap_record);
esp_err_t esp_wifi_remote_clear_ap_list(void);
esp_err_t esp_wifi_remote_sta_get_ap_info(wifi_ap_record_t *ap_info);
esp_err_t esp_wifi_remote_set_ps(wifi_ps_type_t type);
esp_err_t esp_wifi_remote_get_ps(wifi_ps_type_t *type);
esp_err_t esp_wifi_remote_set_protocol(wifi_interface_t ifx, uint8_t protocol_bitmap);
esp_err_t esp_wifi_remote_get_protocol(wifi_interface_t ifx, uint8_t *protocol_bitmap);
esp_err_t esp_wifi_remote_set_bandwidth(wifi_interface_t ifx, wifi_bandwidth_t bw);
esp_err_t esp_wifi_remote_get_bandwidth(wifi_interface_t ifx, wifi_bandwidth_t *bw);
esp_err_t esp_wifi_remote_set_channel(uint8_t primary, wifi_second_chan_t second);
esp_err_t esp_wifi_remote_get_channel(uint8_t *primary, wifi_second_chan_t *second);
esp_err_t esp_wifi_remote_set_country(const wifi_country_t *country);
esp_err_t esp_wifi_remote_get_country(wifi_country_t *country);
esp_err_t esp_wifi_remote_set_mac(wifi_interface_t ifx, const uint8_t mac[6]);
esp_err_t esp_wifi_remote_get_mac(wifi_interface_t ifx, uint8_t mac[6]);
esp_err_t esp_wifi_remote_set_promiscuous_rx_cb(wifi_promiscuous_cb_t cb);
esp_err_t esp_wifi_remote_set_promiscuous(_Bool en);
esp_err_t esp_wifi_remote_get_promiscuous(_Bool *en);
esp_err_t esp_wifi_remote_set_promiscuous_filter(const wifi_promiscuous_filter_t *filter);
esp_err_t esp_wifi_remote_get_promiscuous_filter(wifi_promiscuous_filter_t *filter);
esp_err_t esp_wifi_remote_set_promiscuous_ctrl_filter(const wifi_promiscuous_filter_t *filter);
esp_err_t esp_wifi_remote_get_promiscuous_ctrl_filter(wifi_promiscuous_filter_t *filter);
esp_err_t esp_wifi_remote_set_config(wifi_interface_t interface, wifi_config_t *conf);
esp_err_t esp_wifi_remote_get_config(wifi_interface_t interface, wifi_config_t *conf);
esp_err_t esp_wifi_remote_ap_get_sta_list(wifi_sta_list_t *sta);
esp_err_t esp_wifi_remote_ap_get_sta_aid(const uint8_t mac[6], uint16_t *aid);
esp_err_t esp_wifi_remote_set_storage(wifi_storage_t storage);
esp_err_t esp_wifi_remote_set_vendor_ie(_Bool enable, wifi_vendor_ie_type_t type, wifi_vendor_ie_id_t idx, const void *vnd_ie);
esp_err_t esp_wifi_remote_set_vendor_ie_cb(esp_vendor_ie_cb_t cb, void *ctx);
esp_err_t esp_wifi_remote_set_max_tx_power(int8_t power);
esp_err_t esp_wifi_remote_get_max_tx_power(int8_t *power);
esp_err_t esp_wifi_remote_set_event_mask(uint32_t mask);
esp_err_t esp_wifi_remote_get_event_mask(uint32_t *mask);
esp_err_t esp_wifi_remote_80211_tx(wifi_interface_t ifx, const void *buffer, int len, _Bool en_sys_seq);
esp_err_t esp_wifi_remote_set_csi_rx_cb(wifi_csi_cb_t cb, void *ctx);
esp_err_t esp_wifi_remote_set_csi_config(const wifi_csi_config_t *config);
esp_err_t esp_wifi_remote_get_csi_config(wifi_csi_config_t *config);
esp_err_t esp_wifi_remote_set_csi(_Bool en);
int64_t esp_wifi_remote_get_tsf_time(wifi_interface_t interface);
esp_err_t esp_wifi_remote_set_inactive_time(wifi_interface_t ifx, uint16_t sec);
esp_err_t esp_wifi_remote_get_inactive_time(wifi_interface_t ifx, uint16_t *sec);
esp_err_t esp_wifi_remote_statis_dump(uint32_t modules);
esp_err_t esp_wifi_remote_set_rssi_threshold(int32_t rssi);
esp_err_t esp_wifi_remote_ftm_initiate_session(wifi_ftm_initiator_cfg_t *cfg);
esp_err_t esp_wifi_remote_ftm_end_session(void);
esp_err_t esp_wifi_remote_ftm_resp_set_offset(int16_t offset_cm);
esp_err_t esp_wifi_remote_ftm_get_report(wifi_ftm_report_entry_t *report, uint8_t num_entries);
esp_err_t esp_wifi_remote_config_11b_rate(wifi_interface_t ifx, _Bool disable);
esp_err_t esp_wifi_remote_connectionless_module_set_wake_interval(uint16_t wake_interval);
esp_err_t esp_wifi_remote_force_wakeup_acquire(void);
esp_err_t esp_wifi_remote_force_wakeup_release(void);
esp_err_t esp_wifi_remote_set_country_code(const char *country, _Bool ieee80211d_enabled);
esp_err_t esp_wifi_remote_get_country_code(char *country);
esp_err_t esp_wifi_remote_config_80211_tx_rate(wifi_interface_t ifx, wifi_phy_rate_t rate);
esp_err_t esp_wifi_remote_disable_pmf_config(wifi_interface_t ifx);
esp_err_t esp_wifi_remote_sta_get_aid(uint16_t *aid);
esp_err_t esp_wifi_remote_sta_get_negotiated_phymode(wifi_phy_mode_t *phymode);
esp_err_t esp_wifi_remote_set_dynamic_cs(_Bool enabled);
esp_err_t esp_wifi_remote_sta_get_rssi(int *rssi);

View File

@@ -0,0 +1,324 @@
/*
* SPDX-FileCopyrightText: 2017-2023 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef __ESP_MESH_INTERNAL_H__
#define __ESP_MESH_INTERNAL_H__
#include "esp_err.h"
#include "esp_mesh.h"
#include "esp_wifi.h"
#include "esp_wifi_types.h"
#include "esp_private/wifi.h"
#include "esp_wifi_crypto_types.h"
#ifdef __cplusplus
extern "C" {
#endif
/*******************************************************
* Constants
*******************************************************/
/*******************************************************
* Structures
*******************************************************/
/**
* @brief Mesh attempts
*/
typedef struct {
int scan; /**< minimum scan times before being a root, default:10 */
int vote; /**< max vote times in self-healing, default:1000 */
int fail; /**< parent selection fail times, if the scan times reach this value,
device will disconnect with associated children and join self-healing. default:60 */
int monitor_ie; /**< acceptable times of parent networking IE change before update its own networking IE. default:3 */
} mesh_attempts_t;
/**
* @brief Mesh switch parent
*/
typedef struct {
int duration_ms; /**< parent weak RSSI monitor duration, if the RSSI continues to be weak during this duration_ms,
device will search for a new parent. */
int cnx_rssi; /**< RSSI threshold for keeping a good connection with parent.
If set a value greater than -120 dBm, a timer will be armed to monitor parent RSSI at a period time of duration_ms. */
int select_rssi; /**< RSSI threshold for parent selection. It should be a value greater than switch_rssi. */
int switch_rssi; /**< Disassociate with current parent and switch to a new parent when the RSSI is greater than this set threshold. */
int backoff_rssi; /**< RSSI threshold for connecting to the root */
} mesh_switch_parent_t;
/**
* @brief Mesh RSSI threshold
*/
typedef struct {
int high; /**< high RSSI threshold, used to determine whether the new parent and the current parent are in the same RSSI range */
int medium; /**< medium RSSI threshold, used to determine whether the new parent and the current parent are in the same RSSI range */
int low; /**< low RSSI threshold. If the parent's RSSI is lower than low for a period time of duration_ms,
then the mesh node will post MESH_WEAK_RSSI event.
Also used to determine whether the new parent and the current parent are in the same RSSI range */
} mesh_rssi_threshold_t;
/**
* @brief Mesh networking IE
*/
typedef struct {
/**< mesh networking IE head */
uint8_t eid; /**< element ID, vendor specific, 221 */
uint8_t len; /**< element length, the length after this member */
uint8_t oui[3]; /**< organization identifier, 0x18fe34 */
uint8_t type; /**< ESP defined IE type, include Assoc IE, SSID IE, Ext Assoc IE, Roots IE, etc. */
uint8_t encrypted : 1; /**< whether mesh networking IE is encrypted */
uint8_t version : 7; /**< mesh networking IE version, equal to 2 if mesh PS is enabled, equal to 1 otherwise */
/**< content */
uint8_t mesh_type; /**< mesh device type, include idle, root, node, etc, refer to mesh_type_t */
uint8_t mesh_id[6]; /**< mesh ID, only the same mesh id can form a unified mesh network */
uint8_t layer_cap; /**< layer_cap = max_layer - layer, indicates the number of remaining available layers of the mesh network */
uint8_t layer; /**< the current layer of this node */
uint8_t assoc_cap; /**< the maximum connections of this mesh AP */
uint8_t assoc; /**< current connections of this mesh AP */
uint8_t leaf_cap; /**< the maximum number of leaves in the mesh network */
uint8_t leaf_assoc; /**< the number of current connected leaves */
uint16_t root_cap; /**< the capacity of the root, equal to the total child numbers plus 1, root node updates root_cap and self_cap */
uint16_t self_cap; /**< the capacity of myself, total child numbers plus 1, all nodes update this member */
uint16_t layer2_cap; /**< the capacity of layer2 node, total child numbers plus 1, layer2 node updates layer2_cap and self_cap, root sets this to 0 */
uint16_t scan_ap_num; /**< the number of mesh APs around */
int8_t rssi; /**< RSSI of the connected parent, default value is -120, root node will not update this */
int8_t router_rssi; /**< RSSI of the router, default value is -120 */
uint8_t flag; /**< flag of networking, indicates the status of the network, refer to MESH_ASSOC_FLAG_XXX */
/**< vote related */
uint8_t rc_addr[6]; /**< the address of the root candidate, i.e. the voted addesss before connection, root node will update this with self address */
int8_t rc_rssi; /**< the router RSSI of the root candidate */
uint8_t vote_addr[6]; /**< the voted address after connection */
int8_t vote_rssi; /**< the router RSSI of the voted address */
uint8_t vote_ttl; /**< vote ttl, indicate the voting is from myself or from other nodes */
uint16_t votes; /**< the number of all voting nodes */
uint16_t my_votes; /**< the number of nodes that voted for me */
uint8_t reason; /**< the reason why the voting happens, root initiated or child initiated, refer to mesh_vote_reason_t */
uint8_t child[6]; /**< child address, not used currently */
uint8_t toDS; /**< state represents whether the root is able to access external IP network */
} __attribute__((packed)) mesh_assoc_t;
/**
* @brief Mesh chain layer
*/
typedef struct {
uint16_t layer_cap; /**< max layer of the network */
uint16_t layer; /**< current layer of this node */
} mesh_chain_layer_t;
/**
* @brief Mesh chain assoc
*/
typedef struct {
mesh_assoc_t tree; /**< tree top, mesh_assoc IE */
mesh_chain_layer_t chain; /**< chain top, mesh_assoc IE */
} __attribute__((packed)) mesh_chain_assoc_t;
/* mesh max connections */
#define MESH_MAX_CONNECTIONS (10)
/**
* @brief Mesh power save duties
*/
typedef struct {
uint8_t device; /**< device power save duty*/
uint8_t parent; /**< parent power save duty*/
struct {
bool used; /**< whether the child is joined */
uint8_t duty; /**< power save duty of the child */
uint8_t mac[6]; /**< mac address of the child */
} child[MESH_MAX_CONNECTIONS]; /**< child */
} esp_mesh_ps_duties_t;
/*******************************************************
* Function Definitions
*******************************************************/
/**
* @brief Set mesh softAP beacon interval
*
* @param[in] interval_ms beacon interval (msecs) (100 msecs ~ 60000 msecs)
*
* @return
* - ESP_OK
* - ESP_FAIL
* - ESP_ERR_INVALID_ARG
*/
esp_err_t esp_mesh_set_beacon_interval(int interval_ms);
/**
* @brief Get mesh softAP beacon interval
*
* @param[out] interval_ms beacon interval (msecs)
*
* @return
* - ESP_OK
*/
esp_err_t esp_mesh_get_beacon_interval(int *interval_ms);
/**
* @brief Set attempts for mesh self-organized networking
*
* @param[in] attempts
*
* @return
* - ESP_OK
* - ESP_FAIL
*/
esp_err_t esp_mesh_set_attempts(mesh_attempts_t *attempts);
/**
* @brief Get attempts for mesh self-organized networking
*
* @param[out] attempts
*
* @return
* - ESP_OK
* - ESP_ERR_MESH_ARGUMENT
*/
esp_err_t esp_mesh_get_attempts(mesh_attempts_t *attempts);
/**
* @brief Set parameters for parent switch
*
* @param[in] paras parameters for parent switch
*
* @return
* - ESP_OK
* - ESP_ERR_MESH_ARGUMENT
*/
esp_err_t esp_mesh_set_switch_parent_paras(mesh_switch_parent_t *paras);
/**
* @brief Get parameters for parent switch
*
* @param[out] paras parameters for parent switch
*
* @return
* - ESP_OK
* - ESP_ERR_MESH_ARGUMENT
*/
esp_err_t esp_mesh_get_switch_parent_paras(mesh_switch_parent_t *paras);
/**
* @brief Set RSSI threshold of current parent
* - The default high RSSI threshold value is -78 dBm.
* - The default medium RSSI threshold value is -82 dBm.
* - The default low RSSI threshold value is -85 dBm.
*
* @param[in] threshold RSSI threshold
*
* @return
* - ESP_OK
* - ESP_ERR_MESH_ARGUMENT
*/
esp_err_t esp_mesh_set_rssi_threshold(const mesh_rssi_threshold_t *threshold);
/**
* @brief Get RSSI threshold of current parent
*
* @param[out] threshold RSSI threshold
*
* @return
* - ESP_OK
* - ESP_ERR_MESH_ARGUMENT
*/
esp_err_t esp_mesh_get_rssi_threshold(mesh_rssi_threshold_t *threshold);
/**
* @brief Enable the minimum rate to 6 Mbps
*
* @attention This API shall be called before Wi-Fi is started.
*
* @param[in] is_6m enable or not
*
* @return
* - ESP_OK
*/
esp_err_t esp_mesh_set_6m_rate(bool is_6m);
/**
* @brief Print the number of txQ waiting
*
* @return
* - ESP_OK
* - ESP_FAIL
*/
esp_err_t esp_mesh_print_txQ_waiting(void);
/**
* @brief Print the number of rxQ waiting
*
* @return
* - ESP_OK
* - ESP_FAIL
*/
esp_err_t esp_mesh_print_rxQ_waiting(void);
/**
* @brief Set passive scan time
*
* @param[in] time_ms passive scan time (msecs)
*
* @return
* - ESP_OK
* - ESP_FAIL
* - ESP_ERR_ARGUMENT
*/
esp_err_t esp_mesh_set_passive_scan_time(int time_ms);
/**
* @brief Get passive scan time
*
* @return interval_ms passive scan time (msecs)
*/
int esp_mesh_get_passive_scan_time(void);
/**
* @brief Set announce interval
* - The default short interval is 500 milliseconds.
* - The default long interval is 3000 milliseconds.
*
* @param[in] short_ms shall be greater than the default value
* @param[in] long_ms shall be greater than the default value
*
* @return
* - ESP_OK
*/
esp_err_t esp_mesh_set_announce_interval(int short_ms, int long_ms);
/**
* @brief Get announce interval
*
* @param[out] short_ms short interval
* @param[out] long_ms long interval
*
* @return
* - ESP_OK
*/
esp_err_t esp_mesh_get_announce_interval(int *short_ms, int *long_ms);
/**
* @brief Get the running duties of device, parent and children
*
* @param[out] ps_duties ps duties
*
* @return
* - ESP_OK
*/
esp_err_t esp_mesh_ps_get_duties(esp_mesh_ps_duties_t* ps_duties);
/**
* @brief Enable mesh print scan result
*
* @param[in] enable enable or not
*
* @return
* - ESP_OK
*/
esp_err_t esp_mesh_print_scan_result(bool enable);
#ifdef __cplusplus
}
#endif
#endif /* __ESP_MESH_INTERNAL_H__ */

View File

@@ -0,0 +1,387 @@
/*
* SPDX-FileCopyrightText: 2019-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef __ESP_NOW_H__
#define __ESP_NOW_H__
#include <stdbool.h>
#include "esp_err.h"
#include "esp_wifi_types.h"
#ifdef __cplusplus
extern "C" {
#endif
/** \defgroup WiFi_APIs WiFi Related APIs
* @brief WiFi APIs
*/
/** @addtogroup WiFi_APIs
* @{
*/
/** \defgroup ESPNOW_APIs ESPNOW APIs
* @brief ESP32 ESPNOW APIs
*
*/
/** @addtogroup ESPNOW_APIs
* @{
*/
#define ESP_ERR_ESPNOW_BASE (ESP_ERR_WIFI_BASE + 100) /*!< ESPNOW error number base. */
#define ESP_ERR_ESPNOW_NOT_INIT (ESP_ERR_ESPNOW_BASE + 1) /*!< ESPNOW is not initialized. */
#define ESP_ERR_ESPNOW_ARG (ESP_ERR_ESPNOW_BASE + 2) /*!< Invalid argument */
#define ESP_ERR_ESPNOW_NO_MEM (ESP_ERR_ESPNOW_BASE + 3) /*!< Out of memory */
#define ESP_ERR_ESPNOW_FULL (ESP_ERR_ESPNOW_BASE + 4) /*!< ESPNOW peer list is full */
#define ESP_ERR_ESPNOW_NOT_FOUND (ESP_ERR_ESPNOW_BASE + 5) /*!< ESPNOW peer is not found */
#define ESP_ERR_ESPNOW_INTERNAL (ESP_ERR_ESPNOW_BASE + 6) /*!< Internal error */
#define ESP_ERR_ESPNOW_EXIST (ESP_ERR_ESPNOW_BASE + 7) /*!< ESPNOW peer has existed */
#define ESP_ERR_ESPNOW_IF (ESP_ERR_ESPNOW_BASE + 8) /*!< Interface error */
#define ESP_ERR_ESPNOW_CHAN (ESP_ERR_ESPNOW_BASE + 9) /*!< Channel error */
#define ESP_NOW_ETH_ALEN 6 /*!< Length of ESPNOW peer MAC address */
#define ESP_NOW_KEY_LEN 16 /*!< Length of ESPNOW peer local master key */
#define ESP_NOW_MAX_TOTAL_PEER_NUM 20 /*!< Maximum number of ESPNOW total peers */
#define ESP_NOW_MAX_ENCRYPT_PEER_NUM 6 /*!< Maximum number of ESPNOW encrypted peers */
#define ESP_NOW_MAX_IE_DATA_LEN 250 /**< Maximum data length in a vendor-specific element */
#define ESP_NOW_MAX_DATA_LEN ESP_NOW_MAX_IE_DATA_LEN /**< Maximum length of data sent in each ESPNOW transmission for v1.0 */
/**
* @brief Status of sending ESPNOW data .
*/
typedef enum {
ESP_NOW_SEND_SUCCESS = 0, /**< Send ESPNOW data successfully */
ESP_NOW_SEND_FAIL, /**< Send ESPNOW data fail */
} esp_now_send_status_t;
/**
* @brief ESPNOW peer information parameters.
*/
typedef struct esp_now_peer_info {
uint8_t peer_addr[ESP_NOW_ETH_ALEN]; /**< ESPNOW peer MAC address that is also the MAC address of station or softap */
uint8_t lmk[ESP_NOW_KEY_LEN]; /**< ESPNOW peer local master key that is used to encrypt data */
uint8_t channel; /**< Wi-Fi channel that peer uses to send/receive ESPNOW data. If the value is 0,
use the current channel which station or softap is on. Otherwise, it must be
set as the channel that station or softap is on. */
wifi_interface_t ifidx; /**< Wi-Fi interface that peer uses to send/receive ESPNOW data */
bool encrypt; /**< ESPNOW data that this peer sends/receives is encrypted or not */
void *priv; /**< ESPNOW peer private data */
} esp_now_peer_info_t;
/**
* @brief Number of ESPNOW peers which exist currently.
*/
typedef struct esp_now_peer_num {
int total_num; /**< Total number of ESPNOW peers, maximum value is ESP_NOW_MAX_TOTAL_PEER_NUM */
int encrypt_num; /**< Number of encrypted ESPNOW peers, maximum value is ESP_NOW_MAX_ENCRYPT_PEER_NUM */
} esp_now_peer_num_t;
/**
* @brief ESPNOW packet information
*/
typedef struct esp_now_recv_info {
uint8_t * src_addr; /**< Source address of ESPNOW packet */
uint8_t * des_addr; /**< Destination address of ESPNOW packet */
wifi_pkt_rx_ctrl_t * rx_ctrl; /**< Rx control info of ESPNOW packet */
} esp_now_recv_info_t;
/**
* @brief ESPNOW rate config
*
*/
typedef struct esp_now_rate_config {
wifi_phy_mode_t phymode; /**< ESPNOW phymode of specified interface */
wifi_phy_rate_t rate; /**< ESPNOW rate of specified interface */
bool ersu; /**< ESPNOW using ERSU to send frame, ERSU is a transmission mode related to 802.11 ax.
ERSU is always used in long distance transmission, and its frame has lower rate compared with SU mode */
bool dcm; /**< ESPNOW using dcm rate to send frame */
} esp_now_rate_config_t;
/**
* @brief Callback function of receiving ESPNOW data
* @param esp_now_info received ESPNOW packet information
* @param data received data
* @param data_len length of received data
* @attention esp_now_info is a local variableit can only be used in the callback.
*/
typedef void (*esp_now_recv_cb_t)(const esp_now_recv_info_t * esp_now_info, const uint8_t *data, int data_len);
/**
* @brief Callback function of sending ESPNOW data
* @param mac_addr peer MAC address
* @param status status of sending ESPNOW data (succeed or fail)
*/
typedef void (*esp_now_send_cb_t)(const uint8_t *mac_addr, esp_now_send_status_t status);
/**
* @brief Initialize ESPNOW function
*
* @return
* - ESP_OK : succeed
* - ESP_ERR_ESPNOW_INTERNAL : Internal error
*/
esp_err_t esp_now_init(void);
/**
* @brief De-initialize ESPNOW function
*
* @return
* - ESP_OK : succeed
*/
esp_err_t esp_now_deinit(void);
/**
* @brief Get the version of ESPNOW. Currently, ESPNOW supports one version: v1.0.
*
* The v1.0 devices can receive packets if the packet length is less than or equal to ESP_NOW_MAX_IE_DATA_LEN.
* For packets exceeding this length, the v1.0 devices will discard the packet entirely.
*
* @param version ESPNOW version
*
* @return
* - ESP_OK : succeed
* - ESP_ERR_ESPNOW_ARG : invalid argument
*/
esp_err_t esp_now_get_version(uint32_t *version);
/**
* @brief Register callback function of receiving ESPNOW data
*
* @param cb callback function of receiving ESPNOW data
*
* @return
* - ESP_OK : succeed
* - ESP_ERR_ESPNOW_NOT_INIT : ESPNOW is not initialized
* - ESP_ERR_ESPNOW_INTERNAL : internal error
*/
esp_err_t esp_now_register_recv_cb(esp_now_recv_cb_t cb);
/**
* @brief Unregister callback function of receiving ESPNOW data
*
* @return
* - ESP_OK : succeed
* - ESP_ERR_ESPNOW_NOT_INIT : ESPNOW is not initialized
*/
esp_err_t esp_now_unregister_recv_cb(void);
/**
* @brief Register callback function of sending ESPNOW data
*
* @param cb callback function of sending ESPNOW data
*
* @return
* - ESP_OK : succeed
* - ESP_ERR_ESPNOW_NOT_INIT : ESPNOW is not initialized
* - ESP_ERR_ESPNOW_INTERNAL : internal error
*/
esp_err_t esp_now_register_send_cb(esp_now_send_cb_t cb);
/**
* @brief Unregister callback function of sending ESPNOW data
*
* @return
* - ESP_OK : succeed
* - ESP_ERR_ESPNOW_NOT_INIT : ESPNOW is not initialized
*/
esp_err_t esp_now_unregister_send_cb(void);
/**
* @brief Send ESPNOW data
*
* @attention 1. If peer_addr is not NULL, send data to the peer whose MAC address matches peer_addr
* @attention 2. If peer_addr is NULL, send data to all of the peers that are added to the peer list
* @attention 3. The maximum length of data must be less than ESP_NOW_MAX_DATA_LEN
* @attention 4. The buffer pointed to by data argument does not need to be valid after esp_now_send returns
*
* @param peer_addr peer MAC address
* @param data data to send
* @param len length of data
*
* @return
* - ESP_OK : succeed
* - ESP_ERR_ESPNOW_NOT_INIT : ESPNOW is not initialized
* - ESP_ERR_ESPNOW_ARG : invalid argument
* - ESP_ERR_ESPNOW_INTERNAL : internal error
* - ESP_ERR_ESPNOW_NO_MEM : out of memory, when this happens, you can delay a while before sending the next data
* - ESP_ERR_ESPNOW_NOT_FOUND : peer is not found
* - ESP_ERR_ESPNOW_IF : current Wi-Fi interface doesn't match that of peer
* - ESP_ERR_ESPNOW_CHAN: current Wi-Fi channel doesn't match that of peer
*/
esp_err_t esp_now_send(const uint8_t *peer_addr, const uint8_t *data, size_t len);
/**
* @brief Add a peer to peer list
*
* @param peer peer information
*
* @return
* - ESP_OK : succeed
* - ESP_ERR_ESPNOW_NOT_INIT : ESPNOW is not initialized
* - ESP_ERR_ESPNOW_ARG : invalid argument
* - ESP_ERR_ESPNOW_FULL : peer list is full
* - ESP_ERR_ESPNOW_NO_MEM : out of memory
* - ESP_ERR_ESPNOW_EXIST : peer has existed
*/
esp_err_t esp_now_add_peer(const esp_now_peer_info_t *peer);
/**
* @brief Delete a peer from peer list
*
* @param peer_addr peer MAC address
*
* @return
* - ESP_OK : succeed
* - ESP_ERR_ESPNOW_NOT_INIT : ESPNOW is not initialized
* - ESP_ERR_ESPNOW_ARG : invalid argument
* - ESP_ERR_ESPNOW_NOT_FOUND : peer is not found
*/
esp_err_t esp_now_del_peer(const uint8_t *peer_addr);
/**
* @brief Modify a peer
*
* @param peer peer information
*
* @return
* - ESP_OK : succeed
* - ESP_ERR_ESPNOW_NOT_INIT : ESPNOW is not initialized
* - ESP_ERR_ESPNOW_ARG : invalid argument
* - ESP_ERR_ESPNOW_FULL : peer list is full
*/
esp_err_t esp_now_mod_peer(const esp_now_peer_info_t *peer);
/**
* @brief Config ESPNOW rate of specified interface
*
* @deprecated please use esp_now_set_peer_rate_config() instead.
*
* @attention 1. This API should be called after esp_wifi_start().
* @attention 2. This API only work when not use Wi-Fi 6 and esp_now_set_peer_rate_config() not called.
*
* @param ifx Interface to be configured.
* @param rate Phy rate to be configured.
*
* @return
* - ESP_OK: succeed
* - others: failed
*/
esp_err_t esp_wifi_config_espnow_rate(wifi_interface_t ifx, wifi_phy_rate_t rate)
__attribute__((deprecated("This API can be only used when rate is non-HE rate, \
please use esp_now_set_peer_rate_config if you want full support of the rate.")));
/**
* @brief Set ESPNOW rate config for each peer
*
* @attention 1. This API should be called after esp_wifi_start() and esp_now_init().
*
* @param peer_addr peer MAC address
* @param config rate config to be configured.
*
* @return
* - ESP_OK : succeed
* - ESP_ERR_ESPNOW_NOT_INIT : ESPNOW is not initialized
* - ESP_ERR_ESPNOW_ARG : invalid argument
* - ESP_ERR_ESPNOW_INTERNAL : internal error
*/
esp_err_t esp_now_set_peer_rate_config(const uint8_t *peer_addr, esp_now_rate_config_t *config);
/**
* @brief Get a peer whose MAC address matches peer_addr from peer list
*
* @param peer_addr peer MAC address
* @param peer peer information
*
* @return
* - ESP_OK : succeed
* - ESP_ERR_ESPNOW_NOT_INIT : ESPNOW is not initialized
* - ESP_ERR_ESPNOW_ARG : invalid argument
* - ESP_ERR_ESPNOW_NOT_FOUND : peer is not found
*/
esp_err_t esp_now_get_peer(const uint8_t *peer_addr, esp_now_peer_info_t *peer);
/**
* @brief Fetch a peer from peer list. Only return the peer which address is unicast, for the multicast/broadcast address, the function will ignore and try to find the next in the peer list.
*
* @param from_head fetch from head of list or not
* @param peer peer information
*
* @return
* - ESP_OK : succeed
* - ESP_ERR_ESPNOW_NOT_INIT : ESPNOW is not initialized
* - ESP_ERR_ESPNOW_ARG : invalid argument
* - ESP_ERR_ESPNOW_NOT_FOUND : peer is not found
*/
esp_err_t esp_now_fetch_peer(bool from_head, esp_now_peer_info_t *peer);
/**
* @brief Peer exists or not
*
* @param peer_addr peer MAC address
*
* @return
* - true : peer exists
* - false : peer not exists
*/
bool esp_now_is_peer_exist(const uint8_t *peer_addr);
/**
* @brief Get the number of peers
*
* @param num number of peers
*
* @return
* - ESP_OK : succeed
* - ESP_ERR_ESPNOW_NOT_INIT : ESPNOW is not initialized
* - ESP_ERR_ESPNOW_ARG : invalid argument
*/
esp_err_t esp_now_get_peer_num(esp_now_peer_num_t *num);
/**
* @brief Set the primary master key
*
* @param pmk primary master key
*
* @attention 1. primary master key is used to encrypt local master key
*
* @return
* - ESP_OK : succeed
* - ESP_ERR_ESPNOW_NOT_INIT : ESPNOW is not initialized
* - ESP_ERR_ESPNOW_ARG : invalid argument
*/
esp_err_t esp_now_set_pmk(const uint8_t *pmk);
/**
* @brief Set wake window for esp_now to wake up in interval unit
*
* @param window Milliseconds would the chip keep waked each interval, from 0 to 65535.
*
* @attention 1. This configuration could work at connected status.
* When ESP_WIFI_STA_DISCONNECTED_PM_ENABLE is enabled, this configuration could work at disconnected status.
* @attention 2. Default value is the maximum.
*
* @return
* - ESP_OK : succeed
* - ESP_ERR_ESPNOW_NOT_INIT : ESPNOW is not initialized
*/
esp_err_t esp_now_set_wake_window(uint16_t window);
/**
* @}
*/
/**
* @}
*/
#ifdef __cplusplus
}
#endif
#endif /* __ESP_NOW_H__ */

View File

@@ -0,0 +1,55 @@
/*
* SPDX-FileCopyrightText: 2019-2023 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#pragma once
#include "esp_netif_types.h"
#include "esp_wifi_types.h"
#ifdef __cplusplus
extern "C" {
#endif
#ifndef ESP_WIFI_MAX_CONN_NUM
// Number of maximum wifi connection may be undefined if we have no native wifi support on this target
// and at the same time there's no native interface injected by the wifi_remote component.
// In this case, we just let the header compilable, since no wifi API could be used (let's make a sanity check)
#if !CONFIG_SOC_WIFI_SUPPORTED && !CONFIG_ESP_WIFI_REMOTE_ENABLED
#define ESP_WIFI_MAX_CONN_NUM (15)
typedef struct wifi_sta_list_t wifi_sta_list_t;
#else
#error WiFi header mismatch! Please make sure you use the correct version of WiFi API
#endif
#endif // ESP_WIFI_MAX_CONN_NUM
/**
* @brief station list structure
*/
typedef struct {
int num; /**< Number of connected stations */
esp_netif_pair_mac_ip_t sta[ESP_WIFI_MAX_CONN_NUM]; /**< Connected stations */
} wifi_sta_mac_ip_list_t;
/**
* @brief Get IP information for stations connected to the Wi-Fi AP interface
*
* @note If `CONFIG_LWIP_DHCPS` is disabled then `ip` address field will not be populated in sta list
*
* @warning This API works only for the default Wi-Fi AP interface, i.e. esp-netif with key="WIFI_AP_DEF"
*
* @param[in] wifi_sta_list Wi-Fi station info list, returned from esp_wifi_ap_get_sta_list()
* @param[out] wifi_sta_ip_mac_list IP layer station info list, corresponding to MAC addresses provided in wifi_sta_list
*
* @return
* - ESP_OK
* - ESP_ERR_ESP_NETIF_NO_MEM
* - ESP_ERR_ESP_NETIF_INVALID_PARAMS
*/
esp_err_t esp_wifi_ap_get_sta_list_with_ip(const wifi_sta_list_t *wifi_sta_list, wifi_sta_mac_ip_list_t *wifi_sta_ip_mac_list);
#ifdef __cplusplus
}
#endif

View File

@@ -0,0 +1,440 @@
/*
* SPDX-FileCopyrightText: 2017-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef __ESP_WIFI_CRYPTO_TYPES_H__
#define __ESP_WIFI_CRYPTO_TYPES_H__
/* This is an internal API header for configuring the implementation used for WiFi cryptographic
operations.
During normal operation, you don't need to use any of these types or functions in this header.
See esp_wifi.h & esp_wifi_types.h instead.
*/
#include <stdint.h>
#include <stddef.h>
#include <stdbool.h>
#ifdef __cplusplus
extern "C" {
#endif
#define ESP_WIFI_CRYPTO_VERSION 0x00000001
/*
* Enumeration for hash operations.
* When WPA2 is connecting, this enum is used to
* request a hash algorithm via crypto_hash_xxx functions.
*/
typedef enum {
ESP_CRYPTO_HASH_ALG_MD5, ESP_CRYPTO_HASH_ALG_SHA1,
ESP_CRYPTO_HASH_ALG_HMAC_MD5, ESP_CRYPTO_HASH_ALG_HMAC_SHA1,
ESP_CRYPTO_HASH_ALG_SHA256, ESP_CRYPTO_HASH_ALG_HMAC_SHA256
} esp_crypto_hash_alg_t;
/*
* Enumeration for block cipher operations.
* When WPA2 is connecting, this enum is used to request a block
* cipher algorithm via crypto_cipher_xxx functions.
*/
typedef enum {
ESP_CRYPTO_CIPHER_NULL, ESP_CRYPTO_CIPHER_ALG_AES, ESP_CRYPTO_CIPHER_ALG_3DES,
ESP_CRYPTO_CIPHER_ALG_DES, ESP_CRYPTO_CIPHER_ALG_RC2, ESP_CRYPTO_CIPHER_ALG_RC4
} esp_crypto_cipher_alg_t;
/*
* This structure is about the algorithm when do crypto_hash operation, for detail,
* please reference to the structure crypto_hash.
*/
typedef struct crypto_hash esp_crypto_hash_t;
/*
* This structure is about the algorithm when do crypto_cipher operation, for detail,
* please reference to the structure crypto_cipher.
*/
typedef struct crypto_cipher esp_crypto_cipher_t;
/**
* @brief The AES 128 encrypt callback function used by esp_wifi.
*
* @param key Encryption key.
* @param iv Encryption IV for CBC mode (16 bytes).
* @param data Data to encrypt in-place.
* @param data_len Length of data in bytes (must be divisible by 16)
*/
typedef int (*esp_aes_128_encrypt_t)(const unsigned char *key, const unsigned char *iv, unsigned char *data, int data_len);
/**
* @brief The AES 128 decrypt callback function used by esp_wifi.
*
* @param key Decryption key.
* @param iv Decryption IV for CBC mode (16 bytes).
* @param data Data to decrypt in-place.
* @param data_len Length of data in bytes (must be divisible by 16)
*
*/
typedef int (*esp_aes_128_decrypt_t)(const unsigned char *key, const unsigned char *iv, unsigned char *data, int data_len);
/**
* @brief The AES wrap callback function used by esp_wifi.
*
* @param kek 16-octet Key encryption key (KEK).
* @param n Length of the plaintext key in 64-bit units;
* @param plain Plaintext key to be wrapped, n * 64 bits
* @param cipher Wrapped key, (n + 1) * 64 bits
*
*/
typedef int (*esp_aes_wrap_t)(const unsigned char *kek, int n, const unsigned char *plain, unsigned char *cipher);
/**
* @brief The AES unwrap callback function used by esp_wifi.
*
* @param kek 16-octet Key decryption key (KEK).
* @param n Length of the plaintext key in 64-bit units;
* @param cipher Wrapped key to be unwrapped, (n + 1) * 64 bits
* @param plain Plaintext key, n * 64 bits
*
*/
typedef int (*esp_aes_unwrap_t)(const unsigned char *kek, int n, const unsigned char *cipher, unsigned char *plain);
/**
* @brief The SHA256 callback function used by esp_wifi.
*
* @param key Key for HMAC operations.
* @param key_len Length of the key in bytes.
* @param num_elem Number of elements in the data vector.
* @param addr Pointers to the data areas.
* @param len Lengths of the data blocks.
* @param mac Buffer for the hash (32 bytes).
*
*/
typedef int (*esp_hmac_sha256_vector_t)(const unsigned char *key, int key_len, int num_elem,
const unsigned char *addr[], const int *len, unsigned char *mac);
/**
* @brief The SHA256 PRF callback function used by esp_wifi.
*
* @param key Key for PRF.
* @param key_len Length of the key in bytes.
* @param label A unique label for each purpose of the PRF.
* @param data Extra data to bind into the key.
* @param data_len Length of the data.
* @param buf Buffer for the generated pseudo-random key.
* @param buf_len Number of bytes of key to generate.
*
*/
typedef int (*esp_sha256_prf_t)(const unsigned char *key, int key_len, const char *label,
const unsigned char *data, int data_len, unsigned char *buf, int buf_len);
/**
* @brief HMAC-MD5 callback function over data buffer (RFC 2104)'
*
* @param key Key for HMAC operations
* @param key_len Length of the key in bytes
* @param data Pointers to the data area
* @param data_len Length of the data area
* @param mac Buffer for the hash (16 bytes)
* Returns: 0 on success, -1 on failure
*/
typedef int (*esp_hmac_md5_t)(const unsigned char *key, unsigned int key_len, const unsigned char *data,
unsigned int data_len, unsigned char *mac);
/**
* @brief HMAC-MD5 callback function over data vector (RFC 2104)
*
* @param key Key for HMAC operations
* @param key_len Length of the key in bytes
* @param num_elem Number of elements in the data vector
* @param addr Pointers to the data areas
* @param len Lengths of the data blocks
* @param mac Buffer for the hash (16 bytes)
* Returns: 0 on success, -1 on failure
*/
typedef int (*esp_hmac_md5_vector_t)(const unsigned char *key, unsigned int key_len, unsigned int num_elem,
const unsigned char *addr[], const unsigned int *len, unsigned char *mac);
/**
* @brief HMAC-SHA1 callback function over data buffer (RFC 2104)
*
* @param key Key for HMAC operations
* @param key_len Length of the key in bytes
* @param data Pointers to the data area
* @param data_len Length of the data area
* @param mac Buffer for the hash (20 bytes)
* Returns: 0 on success, -1 of failure
*/
typedef int (*esp_hmac_sha1_t)(const unsigned char *key, unsigned int key_len, const unsigned char *data,
unsigned int data_len, unsigned char *mac);
/**
* @brief HMAC-SHA1 callback function over data vector (RFC 2104)
*
* @param key Key for HMAC operations
* @param key_len Length of the key in bytes
* @param num_elem Number of elements in the data vector
* @param addr Pointers to the data areas
* @param len Lengths of the data blocks
* @param mac Buffer for the hash (20 bytes)
* Returns: 0 on success, -1 on failure
*/
typedef int (*esp_hmac_sha1_vector_t)(const unsigned char *key, unsigned int key_len, unsigned int num_elem,
const unsigned char *addr[], const unsigned int *len, unsigned char *mac);
/**
* @brief SHA1-based Pseudo-Random Function (PRF) (IEEE 802.11i, 8.5.1.1) callback function
*
* @param key Key for PRF
* @param key_len Length of the key in bytes
* @param label A unique label for each purpose of the PRF
* @param data Extra data to bind into the key
* @param data_len Length of the data
* @param buf Buffer for the generated pseudo-random key
* @param buf_len Number of bytes of key to generate
* Returns: 0 on success, -1 of failure
*
* This function is used to derive new, cryptographically separate keys from a
* given key (e.g., PMK in IEEE 802.11i).
*/
typedef int (*esp_sha1_prf_t)(const unsigned char *key, unsigned int key_len, const char *label,
const unsigned char *data, unsigned int data_len, unsigned char *buf, unsigned int buf_len);
/**
* @brief SHA-1 hash callback function for data vector
*
* @param num_elem Number of elements in the data vector
* @param addr Pointers to the data areas
* @param len Lengths of the data blocks
* @param mac Buffer for the hash
* Returns: 0 on success, -1 on failure
*/
typedef int (*esp_sha1_vector_t)(unsigned int num_elem, const unsigned char *addr[], const unsigned int *len,
unsigned char *mac);
/**
* @brief SHA1-based key derivation function (PBKDF2) callback function for IEEE 802.11i
*
* @param passphrase ASCII passphrase
* @param ssid SSID
* @param ssid_len SSID length in bytes
* @param iterations Number of iterations to run
* @param buf Buffer for the generated key
* @param buflen Length of the buffer in bytes
* Returns: 0 on success, -1 of failure
*
* This function is used to derive PSK for WPA-PSK. For this protocol,
* iterations is set to 4096 and buflen to 32. This function is described in
* IEEE Std 802.11-2004, Clause H.4. The main construction is from PKCS#5 v2.0.
*/
typedef int (*esp_pbkdf2_sha1_t)(const char *passphrase, const char *ssid, unsigned int ssid_len,
int iterations, unsigned char *buf, unsigned int buflen);
/**
* @brief XOR RC4 stream callback function to given data with skip-stream-start
*
* @param key RC4 key
* @param keylen RC4 key length
* @param skip number of bytes to skip from the beginning of the RC4 stream
* @param data data to be XOR'ed with RC4 stream
* @param data_len buf length
* Returns: 0 on success, -1 on failure
*
* Generate RC4 pseudo random stream for the given key, skip beginning of the
* stream, and XOR the end result with the data buffer to perform RC4
* encryption/decryption.
*/
typedef int (*esp_rc4_skip_t)(const unsigned char *key, unsigned int keylen, unsigned int skip,
unsigned char *data, unsigned int data_len);
/**
* @brief MD5 hash callback function for data vector
*
* @param num_elem Number of elements in the data vector
* @param addr Pointers to the data areas
* @param len Lengths of the data blocks
* @param mac Buffer for the hash
* Returns: 0 on success, -1 on failure
*/
typedef int (*esp_md5_vector_t)(unsigned int num_elem, const unsigned char *addr[], const unsigned int *len,
unsigned char *mac);
/**
* @brief Encrypt one AES block callback function
*
* @param ctx Context pointer from aes_encrypt_init()
* @param plain Plaintext data to be encrypted (16 bytes)
* @param crypt Buffer for the encrypted data (16 bytes)
*/
typedef void (*esp_aes_encrypt_t)(void *ctx, const unsigned char *plain, unsigned char *crypt);
/**
* @brief Initialize AES callback function for encryption
*
* @param key Encryption key
* @param len Key length in bytes (usually 16, i.e., 128 bits)
* Returns: Pointer to context data or %NULL on failure
*/
typedef void * (*esp_aes_encrypt_init_t)(const unsigned char *key, unsigned int len);
/**
* @brief Deinitialize AES encryption callback function
*
* @param ctx Context pointer from aes_encrypt_init()
*/
typedef void (*esp_aes_encrypt_deinit_t)(void *ctx);
/**
* @brief Decrypt one AES block callback function
*
* @param ctx Context pointer from aes_encrypt_init()
* @param crypt Encrypted data (16 bytes)
* @param plain Buffer for the decrypted data (16 bytes)
*/
typedef void (*esp_aes_decrypt_t)(void *ctx, const unsigned char *crypt, unsigned char *plain);
/**
* @brief Initialize AES callback function for decryption
*
* @param key Decryption key
* @param len Key length in bytes (usually 16, i.e., 128 bits)
* Returns: Pointer to context data or %NULL on failure
*/
typedef void * (*esp_aes_decrypt_init_t)(const unsigned char *key, unsigned int len);
/**
* @brief Deinitialize AES decryption callback function
*
* @param ctx Context pointer from aes_encrypt_init()
*/
typedef void (*esp_aes_decrypt_deinit_t)(void *ctx);
/**
* @brief One-Key CBC MAC (OMAC1) hash with AES-128 callback function for MIC computation
*
* @param key 128-bit key for the hash operation
* @param data Data buffer for which a MIC is computed
* @param data_len Length of data buffer in bytes
* @param mic Buffer for MIC (128 bits, i.e., 16 bytes)
* Returns: 0 on success, -1 on failure
*/
typedef int (*esp_omac1_aes_128_t)(const uint8_t *key, const uint8_t *data, size_t data_len,
uint8_t *mic);
/**
* @brief Decrypt data callback function using CCMP (Counter Mode CBC-MAC Protocol OR
* Counter Mode Cipher Block Chaining Message Authentication
* Code Protocol) which is used in IEEE 802.11i RSN standard.
* @param tk 128-bit Temporal Key for obtained during 4-way handshake
* @param ieee80211_hdr Pointer to IEEE802.11 frame headeri needed for AAD
* @param data Pointer to encrypted data buffer
* @param data_len Encrypted data length in bytes
* @param decrypted_len Length of decrypted data
* @param espnow_pkt Indicates if it's an ESPNOW packet
* Returns: Pointer to decrypted data on success, NULL on failure
*/
typedef uint8_t * (*esp_ccmp_decrypt_t)(const uint8_t *tk, const uint8_t *ieee80211_hdr,
const uint8_t *data, size_t data_len,
size_t *decrypted_len, bool espnow_pkt);
/**
* @brief Encrypt data callback function using CCMP (Counter Mode CBC-MAC Protocol OR
* Counter Mode Cipher Block Chaining Message Authentication
* Code Protocol) which is used in IEEE 802.11i RSN standard.
* @param tk 128-bit Temporal Key for obtained during 4-way handshake
* @param frame Pointer to IEEE802.11 frame including header
* @param len Length of the frame including header
* @param hdrlen Length of the header
* @param pn Packet Number counter
* @param keyid Key ID to be mentioned in CCMP Vector
* @param encrypted_len Length of the encrypted frame including header
*/
typedef uint8_t * (*esp_ccmp_encrypt_t)(const uint8_t *tk, uint8_t *frame, size_t len, size_t hdrlen,
uint8_t *pn, int keyid, size_t *encrypted_len);
/**
* @brief One-Key GMAC hash callback function with AES for MIC computation
*
* @param key key for the hash operation
* @param keylen key length
* @param iv initialization vector
* @param iv_len initialization vector length
* @param aad aad
* @param aad_len aad length
* @param mic Buffer for MIC (128 bits, i.e., 16 bytes)
* Returns: 0 on success, -1 on failure
*/
typedef int (*esp_aes_gmac_t)(const uint8_t *key, size_t keylen, const uint8_t *iv, size_t iv_len,
const uint8_t *aad, size_t aad_len, uint8_t *mic);
/**
* @brief SHA256 hash callback function for data vector
* @param num_elem Number of elements in the data vector
* @param addr Pointers to the data areas
* @param len Lengths of the data blocks
* @param buf Buffer for the hash
* Returns: 0 on success, -1 on failure
*/
typedef int (*esp_sha256_vector_t)(size_t num_elem, const uint8_t *addr[], const size_t *len, uint8_t *buf);
/**
* @brief CRC32 value callback function in little endian.
*
* @param crc Initial CRC value (result of last calculation or 0 for the first time)
* @param buf Data buffer that used to calculate the CRC value
* @param len Length of the data buffer
* @return CRC32 value
*/
typedef uint32_t (*esp_crc32_le_t)(uint32_t crc, uint8_t const *buf, uint32_t len);
/**
* @brief The crypto callback function structure used by esp_wifi.
* The structure can be set as software crypto or the crypto optimized by device's
* hardware.
*/
typedef struct wpa_crypto_funcs_t {
uint32_t size; /**< The crypto callback function structure size */
uint32_t version; /**< The crypto callback function structure version */
esp_aes_wrap_t aes_wrap; /**< The AES wrap callback function used by esp_wifi */
esp_aes_unwrap_t aes_unwrap; /**< The AES unwrap callback function used by esp_wifi */
esp_hmac_sha256_vector_t hmac_sha256_vector; /**< The SHA256 callback function used by esp_wifi */
esp_sha256_prf_t sha256_prf; /**< The SHA256 PRF callback function used by esp_wifi */
esp_hmac_md5_t hmac_md5; /**< HMAC-MD5 callback function over data buffer (RFC 2104) */
esp_hmac_md5_vector_t hamc_md5_vector; /**< HMAC-MD5 callback function over data vector (RFC 2104) */
esp_hmac_sha1_t hmac_sha1; /**< HMAC-SHA1 callback function over data buffer (RFC 2104) */
esp_hmac_sha1_vector_t hmac_sha1_vector; /**< HMAC-SHA1 callback function over data vector (RFC 2104) */
esp_sha1_prf_t sha1_prf; /**< SHA1-based Pseudo-Random Function (PRF) (IEEE 802.11i, 8.5.1.1) callback function */
esp_sha1_vector_t sha1_vector; /**< SHA-1 hash callback function for data vector */
esp_pbkdf2_sha1_t pbkdf2_sha1; /**< SHA1-based key derivation function (PBKDF2) callback function for IEEE 802.11i */
esp_rc4_skip_t rc4_skip; /**< XOR RC4 stream callback function to given data with skip-stream-start */
esp_md5_vector_t md5_vector; /**< MD5 hash callback function for data vector */
esp_aes_encrypt_t aes_encrypt; /**< Encrypt one AES block callback function */
esp_aes_encrypt_init_t aes_encrypt_init; /**< Initialize AES callback function for encryption */
esp_aes_encrypt_deinit_t aes_encrypt_deinit; /**< Deinitialize AES encryption callback function */
esp_aes_decrypt_t aes_decrypt; /**< Decrypt one AES block callback function */
esp_aes_decrypt_init_t aes_decrypt_init; /**< Initialize AES callback function for decryption */
esp_aes_decrypt_deinit_t aes_decrypt_deinit; /**< Deinitialize AES decryption callback function */
esp_aes_128_encrypt_t aes_128_encrypt; /**< The AES 128 encrypt callback function used by esp_wifi */
esp_aes_128_decrypt_t aes_128_decrypt; /**< The AES 128 decrypt callback function used by esp_wifi */
esp_omac1_aes_128_t omac1_aes_128; /**< One-Key CBC MAC (OMAC1) hash with AES-128 callback function for MIC computation */
esp_ccmp_decrypt_t ccmp_decrypt; /**< Decrypt data callback function using CCMP */
esp_ccmp_encrypt_t ccmp_encrypt; /**< Encrypt data callback function using CCMP */
esp_aes_gmac_t aes_gmac; /**< One-Key GMAC hash callback function with AES for MIC computation */
esp_sha256_vector_t sha256_vector; /**< SHA256 hash callback function for data vector */
esp_crc32_le_t crc32; /**< CRC32 value callback function in little endian */
} wpa_crypto_funcs_t;
/**
* @brief The crypto callback function structure used in mesh vendor IE encryption. The
* structure can be set as software crypto or the crypto optimized by device's
* hardware.
*/
typedef struct {
esp_aes_128_encrypt_t aes_128_encrypt; /**< Callback function used in mesh vendor IE encryption */
esp_aes_128_decrypt_t aes_128_decrypt; /**< Callback function used in mesh vendor IE decryption */
} mesh_crypto_funcs_t;
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -0,0 +1,152 @@
/*
* SPDX-FileCopyrightText: 2019-2023 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef _ESP_WIFI_DEFAULT_H
#define _ESP_WIFI_DEFAULT_H
#include "esp_netif.h"
#include "esp_wifi_types.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* @brief Attaches wifi station interface to supplied netif
*
* @param esp_netif instance to attach the wifi station to
*
* @return
* - ESP_OK on success
* - ESP_FAIL if attach failed
*/
esp_err_t esp_netif_attach_wifi_station(esp_netif_t *esp_netif);
/**
* @brief Attaches wifi soft AP interface to supplied netif
*
* @param esp_netif instance to attach the wifi AP to
*
* @return
* - ESP_OK on success
* - ESP_FAIL if attach failed
*/
esp_err_t esp_netif_attach_wifi_ap(esp_netif_t *esp_netif);
/**
* @brief Sets default wifi event handlers for STA interface
*
* @return
* - ESP_OK on success, error returned from esp_event_handler_register if failed
*/
esp_err_t esp_wifi_set_default_wifi_sta_handlers(void);
/**
* @brief Sets default wifi event handlers for AP interface
*
* @return
* - ESP_OK on success, error returned from esp_event_handler_register if failed
*/
esp_err_t esp_wifi_set_default_wifi_ap_handlers(void);
/**
* @brief Sets default wifi event handlers for NAN interface
*
* @return
* - ESP_OK on success, error returned from esp_event_handler_register if failed
*/
esp_err_t esp_wifi_set_default_wifi_nan_handlers(void);
/**
* @brief Clears default wifi event handlers for supplied network interface
*
* @param esp_netif instance of corresponding if object
*
* @return
* - ESP_OK on success, error returned from esp_event_handler_register if failed
*/
esp_err_t esp_wifi_clear_default_wifi_driver_and_handlers(void *esp_netif);
/**
* @brief Creates default WIFI AP. In case of any init error this API aborts.
*
* @note The API creates esp_netif object with default WiFi access point config,
* attaches the netif to wifi and registers wifi handlers to the default event loop.
* This API uses assert() to check for potential errors, so it could abort the program.
* (Note that the default event loop needs to be created prior to calling this API)
*
* @return pointer to esp-netif instance
*/
esp_netif_t* esp_netif_create_default_wifi_ap(void);
/**
* @brief Creates default WIFI STA. In case of any init error this API aborts.
*
* @note The API creates esp_netif object with default WiFi station config,
* attaches the netif to wifi and registers wifi handlers to the default event loop.
* This API uses assert() to check for potential errors, so it could abort the program.
* (Note that the default event loop needs to be created prior to calling this API)
*
* @return pointer to esp-netif instance
*/
esp_netif_t* esp_netif_create_default_wifi_sta(void);
/**
* @brief Creates default WIFI NAN. In case of any init error this API aborts.
*
* @note The API creates esp_netif object with default WiFi station config,
* attaches the netif to wifi and registers wifi handlers to the default event loop.
* (Note that the default event loop needs to be created prior to calling this API)
*
* @return pointer to esp-netif instance
*/
esp_netif_t* esp_netif_create_default_wifi_nan(void);
/**
* @brief Destroys default WIFI netif created with esp_netif_create_default_wifi_...() API.
*
* @param[in] esp_netif object to detach from WiFi and destroy
*
* @note This API unregisters wifi handlers and detaches the created object from the wifi.
* (this function is a no-operation if esp_netif is NULL)
*/
void esp_netif_destroy_default_wifi(void *esp_netif);
/**
* @brief Creates esp_netif WiFi object based on the custom configuration.
*
* @attention This API DOES NOT register default handlers!
*
* @param[in] wifi_if type of wifi interface
* @param[in] esp_netif_config inherent esp-netif configuration pointer
*
* @return pointer to esp-netif instance
*/
esp_netif_t* esp_netif_create_wifi(wifi_interface_t wifi_if, const esp_netif_inherent_config_t *esp_netif_config);
/**
* @brief Creates default STA and AP network interfaces for esp-mesh.
*
* Both netifs are almost identical to the default station and softAP, but with
* DHCP client and server disabled. Please note that the DHCP client is typically
* enabled only if the device is promoted to a root node.
*
* Returns created interfaces which could be ignored setting parameters to NULL
* if an application code does not need to save the interface instances
* for further processing.
*
* @param[out] p_netif_sta pointer where the resultant STA interface is saved (if non NULL)
* @param[out] p_netif_ap pointer where the resultant AP interface is saved (if non NULL)
*
* @return ESP_OK on success
*/
esp_err_t esp_netif_create_default_wifi_mesh_netifs(esp_netif_t **p_netif_sta, esp_netif_t **p_netif_ap);
#ifdef __cplusplus
}
#endif
#endif //_ESP_WIFI_DEFAULT_H

View File

@@ -0,0 +1,221 @@
/*
* SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#pragma once
#include <stdint.h>
#include <stdbool.h>
#include "esp_err.h"
#include "esp_wifi_he_types.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* @brief Set up an individual TWT agreement (NegotiationType=0) or change TWT parameters of the existing TWT agreement
* - TWT Wake Interval = TWT Wake Interval Mantissa * (2 ^ TWT Wake Interval Exponent), unit: us
* - e.g. TWT Wake Interval Mantissa = 512, TWT Wake Interval Exponent = 12, then TWT Wake Interval is 2097.152 ms
* Nominal Minimum Wake Duration = 255, then TWT Wake Duration is 65.28 ms
*
* @attention Support at most 8 TWT agreements, otherwise ESP_ERR_WIFI_TWT_FULL will be returned.
* Support sleep time up to (1 << 35) us.
*
* @param[in,out] setup_config pointer to itwt setup config structure.
*
* @return
* - ESP_OK: succeed
* - ESP_ERR_WIFI_NOT_INIT: WiFi is not initialized by esp_wifi_init
* - ESP_ERR_WIFI_NOT_STARTED: WiFi is not started by esp_wifi_start
* - ESP_ERR_WIFI_CONN: WiFi internal error, station or soft-AP control block wrong
* - ESP_ERR_WIFI_NOT_CONNECT: The station is in disconnect status
* - ESP_ERR_WIFI_TWT_FULL: no available flow id
* - ESP_ERR_INVALID_ARG: invalid argument
*/
esp_err_t esp_wifi_sta_itwt_setup(wifi_itwt_setup_config_t *setup_config);
/**
* @brief Tear down individual TWT agreements
*
* @param[in] flow_id The value range is [0, 7].
* FLOW_ID_ALL indicates tear down all individual TWT agreements.
*
* @return
* - ESP_OK: succeed
* - ESP_ERR_WIFI_NOT_INIT: WiFi is not initialized by esp_wifi_init
* - ESP_ERR_WIFI_NOT_STARTED: WiFi is not started by esp_wifi_start
* - ESP_ERR_WIFI_CONN: WiFi internal error, station or soft-AP control block wrong
* - ESP_ERR_WIFI_NOT_CONNECT: The station is in disconnect status
* - ESP_ERR_INVALID_ARG: invalid argument
*/
esp_err_t esp_wifi_sta_itwt_teardown(int flow_id);
/**
* @brief Send a TWT Information frame to AP for suspending/resuming established iTWT agreements.
*
* @param[in] flow_id The value range is [0, 7].
* FLOW_ID_ALL indicates suspend all individual TWT agreements
* @param[in] suspend_time_ms If the value is 0, indicates the specified flow_id or all established agreements will be suspended until resume by users.
* If the value is greater than 0, indicates the specified flow_id or all established agreements will be suspended until suspend_time_ms timeout, unit: ms.
*
* @return
* - ESP_OK: succeed
* - ESP_ERR_WIFI_NOT_INIT: WiFi is not initialized by esp_wifi_init
* - ESP_ERR_WIFI_NOT_STARTED: WiFi is not started by esp_wifi_start
* - ESP_ERR_WIFI_CONN: WiFi internal error, station or soft-AP control block wrong
* - ESP_ERR_WIFI_NOT_ASSOC: WiFi is not associated
* - ESP_ERR_INVALID_ARG: invalid argument
*/
esp_err_t esp_wifi_sta_itwt_suspend(int flow_id, int suspend_time_ms);
/**
* @brief Get flow id status
*
* @param[in] flow_id_bitmap Flow id status bitmap with 8 bit. Each bit represents that whether the corresponding flow id is setup.
* 1: setup, 0: not setup.
*
* @return
* - ESP_OK: succeed
* - ESP_ERR_WIFI_NOT_INIT: WiFi is not initialized by esp_wifi_init
* - ESP_ERR_WIFI_NOT_STARTED: WiFi is not started by esp_wifi_start
* - ESP_ERR_WIFI_CONN: WiFi internal error, station or soft-AP control block wrong
* - ESP_ERR_WIFI_NOT_CONNECT: The station is in disconnect status
* - ESP_ERR_INVALID_ARG: invalid argument
*/
esp_err_t esp_wifi_sta_itwt_get_flow_id_status(int *flow_id_bitmap);
/**
* @brief Send probe to update TSF time
*
* @attention In bad network, timeout_ms is variable with the network
*
* @param[in] timeout_ms The estimated time includes sending probe request and receiving probe response, unit: ms.
*
* @return
* - ESP_OK: succeed
* - ESP_ERR_WIFI_NOT_INIT: WiFi is not initialized by esp_wifi_init
* - ESP_ERR_WIFI_NOT_STARTED: WiFi is not started by esp_wifi_start
* - ESP_ERR_WIFI_CONN: WiFi internal error, station or soft-AP control block wrong
* - ESP_ERR_WIFI_NOT_ASSOC: WiFi is not associated
*/
esp_err_t esp_wifi_sta_itwt_send_probe_req(int timeout_ms);
/**
* @brief Set time offset with TBTT of target wake time field in itwt setup request frame.
*
* @param[in] offset_us Offset with TBTT of target wake time field in itwt setup request frame, range is [0, 102400], unit microseconds.
*
* @return
* - ESP_OK: succeed
* - ESP_ERR_WIFI_NOT_INIT: WiFi is not initialized by esp_wifi_init
* - ESP_ERR_WIFI_NOT_STARTED: WiFi is not started by esp_wifi_start
* - ESP_ERR_WIFI_CONN: WiFi internal error, station or soft-AP control block wrong
* - ESP_ERR_WIFI_NOT_ASSOC: WiFi is not associated
* - ESP_ERR_INVALID_ARG: invalid argument
*/
esp_err_t esp_wifi_sta_itwt_set_target_wake_time_offset(int offset_us);
/**
* @brief Enable the reception statistics.
*
* @param[in] rx_stats indicate whether enable the reception statistics for HT, HE SU, HE ER SU and legacy
* @param[in] rx_mu_stats indicate whether enable the reception statistics for DL MU-MIMO and DL OFDMA
*
* @return
* - ESP_OK: succeed
* - ESP_ERR_NO_MEM: out of memory
*/
esp_err_t esp_wifi_enable_rx_statistics(bool rx_stats, bool rx_mu_stats);
/**
* @brief Enable the transmission statistics.
*
* @param[in] aci access category of the transmission
* @param[in] tx_stats indicate whether enable the transmission statistics
*
* @return
* - ESP_OK: succeed
* - ESP_ERR_NO_MEM: out of memory
*/
esp_err_t esp_wifi_enable_tx_statistics(esp_wifi_aci_t aci, bool tx_stats);
/**
* @brief Set up an broadcast TWT agreement (NegotiationType=3) or change TWT parameters of the existing TWT agreement
* - TWT Wake Interval = TWT Wake Interval Mantissa * (2 ^ TWT Wake Interval Exponent), unit: us
* - e.g. TWT Wake Interval Mantissa = 512, TWT Wake Interval Exponent = 12, then TWT Wake Interval is 2097.152 ms
* Nominal Minimum Wake Duration = 255, then TWT Wake Duration is 65.28 ms
*
* @attention Support at most 32 TWT agreements, otherwise ESP_ERR_WIFI_TWT_FULL will be returned.
* Support sleep time up to (1 << 35) us.
*
* @param[in,out] config pointer to btwt setup config structure.
*
* @return
* - ESP_OK: succeed
* - ESP_ERR_WIFI_NOT_INIT: WiFi is not initialized by esp_wifi_init
* - ESP_ERR_WIFI_NOT_STARTED: WiFi is not started by esp_wifi_start
* - ESP_ERR_WIFI_CONN: WiFi internal error, station or soft-AP control block wrong
* - ESP_ERR_WIFI_NOT_CONNECT: The station is in disconnect status
* - ESP_ERR_WIFI_TWT_FULL: no available flow id
* - ESP_ERR_INVALID_ARG: invalid argument
*/
esp_err_t esp_wifi_sta_btwt_setup(wifi_btwt_setup_config_t *config);
/**
* @brief Tear down broadcast TWT agreements
*
* @param[in] btwt_id The value range is [0, 31].
* BTWT_ID_ALL indicates tear down all broadcast TWT agreements.
*
* @return
* - ESP_OK: succeed
* - ESP_ERR_WIFI_NOT_INIT: WiFi is not initialized by esp_wifi_init
* - ESP_ERR_WIFI_NOT_STARTED: WiFi is not started by esp_wifi_start
* - ESP_ERR_WIFI_CONN: WiFi internal error, station or soft-AP control block wrong
* - ESP_ERR_WIFI_NOT_CONNECT: The station is in disconnect status
* - ESP_ERR_INVALID_ARG: invalid argument
*/
esp_err_t esp_wifi_sta_btwt_teardown(uint8_t btwt_id);
/**
* @brief Get number of broadcast TWTs supported by the connected AP
*
* @param[out] btwt_number store number of btwts supported by the connected AP
*
* @return
* - ESP_OK: succeed
* - ESP_ERR_WIFI_NOT_INIT: WiFi is not initialized by esp_wifi_init
* - ESP_ERR_WIFI_NOT_STARTED: WiFi is not started by esp_wifi_start
* - ESP_ERR_INVALID_ARG: invalid argument
*/
esp_err_t esp_wifi_sta_get_btwt_num(uint8_t *btwt_number);
/**
* @brief Get broadcast TWT information
*
* @param[in] btwt_number As input param, it stores max btwt number AP supported.
* @param[in] btwt_info array to hold the btwt information supported by AP, and the array size must be at least as large as the BTWT number.
*
* @return
* - ESP_OK: succeed
* - ESP_FAIL: fail
* - ESP_ERR_WIFI_CONN: WiFi internal error, station or soft-AP control block wrong
*/
esp_err_t esp_wifi_sta_btwt_get_info(uint8_t btwt_number, esp_wifi_btwt_info_t *btwt_info);
/**
* @brief Set WiFi TWT config
*
* @param[in] config pointer to the WiFi TWT configure structure.
*
* @return
* - ESP_OK: succeed
*/
esp_err_t esp_wifi_sta_twt_config(wifi_twt_config_t *config);
#ifdef __cplusplus
}
#endif

View File

@@ -0,0 +1,435 @@
/*
* SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#pragma once
#include <stdint.h>
#include <stdbool.h>
#include "esp_err.h"
#ifdef __cplusplus
extern "C" {
#endif
#define FLOW_ID_ALL (8)
#define BTWT_ID_ALL (32)
#define BSS_MAX_COLOR (63)
/**
* @brief Access category
*/
typedef enum {
ESP_WIFI_ACI_VO, /**< voice traffic */
ESP_WIFI_ACI_VI, /**< video traffic */
ESP_WIFI_ACI_BE, /**< best effort traffic */
ESP_WIFI_ACI_BK, /**< background traffic */
ESP_WIFI_ACI_MAX, /**< the max value */
} esp_wifi_aci_t;
/**
* @brief Channel state information(CSI) HE STBC CSI selection
*/
enum {
ESP_CSI_ACQUIRE_STBC_HELTF1, /**< HE STBC: select the first HE-LTF */
ESP_CSI_ACQUIRE_STBC_HELTF2, /**< HE STBC: select the second HE-LTF */
ESP_CSI_ACQUIRE_STBC_SAMPLE_HELTFS, /**< HE STBC: sample alternating scarier of HE-LTF1 and HE-LTF2 */
};
/**
* @brief Channel state information(CSI) configuration type
*/
#if CONFIG_SLAVE_IDF_TARGET_ESP32C5
typedef struct {
uint32_t enable : 1; /**< enable to acquire CSI */
uint32_t acquire_csi_legacy : 1; /**< enable to acquire L-LTF */
uint32_t acquire_csi_force_lltf : 1; /**< enable to acquire L-LTF */
uint32_t acquire_csi_ht20 : 1; /**< enable to acquire HT-LTF when receiving an HT20 PPDU */
uint32_t acquire_csi_ht40 : 1; /**< enable to acquire HT-LTF when receiving an HT40 PPDU */
uint32_t acquire_csi_vht : 1; /**< enable to acquire VHT-LTF when receiving an VHT20 PPDU */
uint32_t acquire_csi_su : 1; /**< enable to acquire HE-LTF when receiving an HE20 SU PPDU */
uint32_t acquire_csi_mu : 1; /**< enable to acquire HE-LTF when receiving an HE20 MU PPDU */
uint32_t acquire_csi_dcm : 1; /**< enable to acquire HE-LTF when receiving an HE20 DCM applied PPDU */
uint32_t acquire_csi_beamformed : 1; /**< enable to acquire HE-LTF when receiving an HE20 Beamformed applied PPDU */
uint32_t acquire_csi_he_stbc_mode: 2; /**< when receiving an STBC applied HE PPDU,
0- acquire the complete HE-LTF1
1- acquire the complete HE-LTF2
2- sample evenly among the HE-LTF1 and HE-LTF2 */
uint32_t val_scale_cfg : 4; /**< value 0-8 */
uint32_t dump_ack_en : 1; /**< enable to dump 802.11 ACK frame, default disabled */
uint32_t reserved : 15; /**< reserved */
} wifi_csi_acquire_config_t;
#else
typedef struct {
uint32_t enable : 1; /**< enable to acquire CSI */
uint32_t acquire_csi_legacy : 1; /**< enable to acquire L-LTF when receiving a 11g PPDU */
uint32_t acquire_csi_ht20 : 1; /**< enable to acquire HT-LTF when receiving an HT20 PPDU */
uint32_t acquire_csi_ht40 : 1; /**< enable to acquire HT-LTF when receiving an HT40 PPDU */
uint32_t acquire_csi_su : 1; /**< enable to acquire HE-LTF when receiving an HE20 SU PPDU */
uint32_t acquire_csi_mu : 1; /**< enable to acquire HE-LTF when receiving an HE20 MU PPDU */
uint32_t acquire_csi_dcm : 1; /**< enable to acquire HE-LTF when receiving an HE20 DCM applied PPDU */
uint32_t acquire_csi_beamformed : 1; /**< enable to acquire HE-LTF when receiving an HE20 Beamformed applied PPDU */
uint32_t acquire_csi_he_stbc : 2; /**< when receiving an STBC applied HE PPDU,
0- acquire the complete HE-LTF1
1- acquire the complete HE-LTF2
2- sample evenly among the HE-LTF1 and HE-LTF2 */
uint32_t val_scale_cfg : 2; /**< value 0-3 */
uint32_t dump_ack_en : 1; /**< enable to dump 802.11 ACK frame, default disabled */
uint32_t reserved : 19; /**< reserved */
} wifi_csi_acquire_config_t;
#endif
/**
* @brief HE variant HT Control field including OM(Operation mode)
*/
typedef struct {
uint32_t id : 2; /**< HE Variant ID = 3 */
uint32_t ctrl_id : 4; /**< OM control ID: 1 */
uint32_t rx_nss : 3; /**< the max. number of spatial streams for the reception, only accept 0. */
uint32_t bw : 2; /**< the operating channel width for both reception and transmission, only accept 0. */
uint32_t ul_mu_disable : 1; /**< disable UL MU operations */
uint32_t tx_nsts : 3; /**< the max. number of spatial streams for the transmission, only accept 0. */
uint32_t er_su_disable : 1; /**< disable the reception of 242-tone HE ER SU PPDU */
uint32_t dl_mu_mimo_resounding_recommendation : 1; /**< indicate the STA suggests the AP either resounding the channel or increase the channel sounding frequency with the STA */
uint32_t ul_mu_data_disable : 1; /**< disable UL MU data operations */
uint32_t padding : 14; /**< padding bits */
} esp_wifi_htc_omc_t;
/**
* @brief TWT setup commands
*/
typedef enum {
TWT_REQUEST, /**< request to join a TWT without providing a set of TWT parameters */
TWT_SUGGEST, /**< request to join a TWT and offer a set of preferred TWT parameters but might accept alternative TWT parameters */
TWT_DEMAND, /**< request to join a TWT and currently accept only the indicated TWT parameters */
TWT_GROUPING, /**< for S1G STA */
TWT_ACCEPT, /**< accept the TWT request with the TWT parameters, also used in unsolicited TWT response */
TWT_ALTERNATE, /**< indicate a counter-offer of TWT parameters without creation of a TWT agreement */
TWT_DICTATE, /**< indicate no TWT agreement is created, but one is likely to be accepted only if the requesting STA transmits a new TWT setup request with the indicated TWT parameters */
TWT_REJECT, /**< indicate that the negotiation has ended in failure to create a new TWT agreement */
} wifi_twt_setup_cmds_t;
/**
* @brief broadcast TWT setup config
*/
typedef struct {
wifi_twt_setup_cmds_t setup_cmd; /**< Indicates the type of TWT command*/
uint8_t btwt_id; /**< When set up an broadcast TWT agreement, the broadcast twt id will be assigned by AP after a successful agreement setup.
broadcast twt id could be specified to a value in the range of [1, 31], but it might be change by AP in the response.
When change TWT parameters of the existing TWT agreement, broadcast twt id should be an existing one. The value range is [1, 31].*/
uint16_t timeout_time_ms; /**< Timeout times of receiving setup action frame response, default 5s*/
} wifi_btwt_setup_config_t;
/**
* @brief Individual TWT setup config
*/
typedef struct {
wifi_twt_setup_cmds_t setup_cmd; /**< Indicates the type of TWT command */
uint16_t trigger : 1; /**< 1: a trigger-enabled individual TWT, 0: a non-trigger-enabled individual TWT */
uint16_t flow_type : 1; /**< 0: an announced individual TWT, 1: an unannounced individual TWT */
uint16_t flow_id : 3; /**< When set up an individual TWT agreement, the flow id will be assigned by AP after a successful agreement setup.
flow_id could be specified to a value in the range of [0, 7], but it might be changed by AP in the response.
When change TWT parameters of the existing TWT agreement, flow_id should be an existing one. The value range is [0, 7]. */
uint16_t wake_invl_expn : 5; /**< Individual TWT Wake Interval Exponent. The value range is [0, 31]. */
uint16_t wake_duration_unit : 1; /**< Individual TWT Wake duration unit, 0: 256us 1: TU (TU = 1024us)*/
uint16_t reserved : 5; /**< bit: 11.15 reserved */
uint8_t min_wake_dura; /**< Nominal Minimum Wake Duration, indicates the minimum amount of time, in unit of 256 us, that the individual TWT requesting STA expects that it needs to be awake. The value range is [1, 255]. */
uint16_t wake_invl_mant; /**< Individual TWT Wake Interval Mantissa. The value range is [1, 65535]. */
uint16_t twt_id; /**< Individual TWT connection id, the value range is [0, 32767]. */
uint16_t timeout_time_ms; /**< Timeout times of receiving setup action frame response, default 5s*/
} wifi_twt_setup_config_t;
typedef wifi_twt_setup_config_t wifi_itwt_setup_config_t;
/**
* @brief HE SU GI and LTF types
*/
typedef enum {
HE_SU_ERSU_1_LTF_0_8_US_GI, /**< 1 LTF and 0.8 us GI */
HE_SU_ERSU_2_LTF_0_8_US_GI, /**< 2 LTF and 0.8 us GI */
HE_SU_ERSU_2_LTF_1_6_US_GI, /**< 2 LTF and 1.6 us GI */
HE_SU_ERSU_4_LTF_3_2_US_GI, /**< 4 LTF and 3.2 us GI */
} he_su_gi_and_ltf_type_t;
/**
* @brief Reception format
*/
typedef enum {
RX_BB_FORMAT_11B = 0, /**< the reception frame is a 11b MPDU */
RX_BB_FORMAT_11G = 1, /**< the reception frame is a 11g MPDU */
RX_BB_FORMAT_11A = RX_BB_FORMAT_11G, /**< the reception frame is a 11a MPDU */
RX_BB_FORMAT_HT = 2, /**< the reception frame is a HT MPDU */
RX_BB_FORMAT_VHT = 3, /**< the reception frame is a VHT MPDU */
RX_BB_FORMAT_HE_SU = 4, /**< the reception frame is a HE SU MPDU */
RX_BB_FORMAT_HE_MU = 5, /**< the reception frame is a HE MU MPDU */
RX_BB_FORMAT_HE_ERSU = 6, /**< the reception frame is a HE ER SU MPDU */
RX_BB_FORMAT_HE_TB = 7, /**< the reception frame is a HE TB MPDU */
} wifi_rx_bb_format_t;
/**
* @brief RxControl Info
*/
#if CONFIG_SLAVE_IDF_TARGET_ESP32C5
typedef struct {
signed rssi: 8; /**< the RSSI of the reception frame */
unsigned rate: 5; /**< if cur_bb_format is RX_BB_FORMAT_11B, it's the transmission rate. otherwise it's Rate field of L-SIG */
unsigned : 1; /**< reserved */
unsigned : 2; /**< reserved */
unsigned : 12; /**< reserved */
unsigned rxmatch0: 1; /**< indicate whether the reception frame is from interface 0 */
unsigned rxmatch1: 1; /**< indicate whether the reception frame is from interface 1 */
unsigned rxmatch2: 1; /**< indicate whether the reception frame is from interface 2 */
unsigned rxmatch3: 1; /**< indicate whether the reception frame is from interface 3 */
uint32_t he_siga1; /**< HE-SIGA1 or HT-SIG or VHT-SIG */
unsigned rxend_state: 8; /**< reception state, 0: successful, others: failure */
uint16_t he_siga2; /**< HE-SIGA2 */
unsigned : 7; /**< reserved */
unsigned is_group: 1; /**< indicate whether the reception is a group addressed frame */
unsigned timestamp: 32; /**< timestamp. The local time when this packet is received. It is precise only if modem sleep or light sleep is not enabled. unit: microsecond */
unsigned : 15; /**< reserved */
unsigned : 15; /**< reserved */
unsigned : 2; /**< reserved */
unsigned noise_floor: 8; /**< the noise floor of the reception frame */
signed : 8; /**< reserved */
signed : 8; /**< reserved */
unsigned : 8; /**< reserved */
unsigned : 8; /**< reserved */
unsigned : 8; /**< reserved */
unsigned : 2; /**< reserved */
unsigned sigb_len: 10; /**< the sigb length */
unsigned : 1; /**< reserved */
unsigned : 1; /**< reserved */
unsigned : 1; /**< reserved */
unsigned : 1; /**< reserved */
unsigned channel: 4; /**< the primary channel */
unsigned second: 4; /**< the second channel if in HT40 */
unsigned : 12; /**< reserved */
unsigned : 4; /**< reserved */
unsigned : 1; /**< reserved */
unsigned : 7; /**< reserved */
unsigned : 2; /**< reserved */
unsigned : 4; /**< reserved */
unsigned : 2; /**< reserved */
unsigned : 11; /**< reserved */
unsigned : 1; /**< reserved */
unsigned : 12; /**< reserved */
unsigned : 12; /**< reserved */
unsigned cur_bb_format: 4; /**< the format of the reception frame */
unsigned rx_channel_estimate_len: 10; /**< the length of the channel information */
unsigned rx_channel_estimate_info_vld: 1; /**< indicate the channel information is valid */
unsigned : 5; /**< reserved */
unsigned : 21; /**< reserved */
unsigned : 10; /**< reserved */
unsigned : 1; /**< reserved */
unsigned : 3; /**< reserved */
unsigned : 1; /**< reserved */
unsigned : 6; /**< reserved */
unsigned : 21; /**< reserved */
unsigned : 1; /**< reserved */
unsigned : 32; /**< reserved */
unsigned : 7; /**< reserved */
unsigned : 1; /**< reserved */
unsigned : 8; /**< reserved */
unsigned : 16; /**< reserved */
unsigned sig_len: 14; /**< the length of the reception MPDU */
unsigned : 2; /**< reserved */
unsigned dump_len: 14; /**< the length of the reception MPDU excluding the FCS */
unsigned : 2; /**< reserved */
unsigned rx_state: 8; /**< reception state, 0: successful, others: failure */
unsigned : 8; /**< reserved */
unsigned : 16; /**< reserved */
} __attribute__((packed)) esp_wifi_rxctrl_t;
#else
typedef struct {
signed rssi : 8; /**< the RSSI of the reception frame */
unsigned rate : 5; /**< if cur_bb_format is RX_BB_FORMAT_11B, it's the transmission rate. otherwise it's Rate field of L-SIG */
unsigned : 1; /**< reserved */
unsigned : 2; /**< reserved */
unsigned : 12; /**< reserved */
unsigned rxmatch0 : 1; /**< indicate whether the reception frame is from interface 0 */
unsigned rxmatch1 : 1; /**< indicate whether the reception frame is from interface 1 */
unsigned rxmatch2 : 1; /**< indicate whether the reception frame is from interface 2 */
unsigned rxmatch3 : 1; /**< indicate whether the reception frame is from interface 3 */
uint32_t he_siga1; /**< HE-SIGA1 or HT-SIG */
unsigned rxend_state : 8; /**< reception state, 0: successful, others: failure */
uint16_t he_siga2; /**< HE-SIGA2 */
unsigned : 7; /**< reserved */
unsigned is_group : 1; /**< indicate whether the reception is a group addressed frame */
unsigned timestamp : 32; /**< timestamp. The local time when this packet is received. It is precise only if modem sleep or light sleep is not enabled. unit: microsecond */
unsigned : 15; /**< reserved */
unsigned : 15; /**< reserved */
unsigned : 2; /**< reserved */
signed noise_floor : 8; /**< the noise floor of the reception frame */
unsigned channel : 4; /**< the primary channel */
unsigned second : 4; /**< the second channel if in HT40 */
unsigned : 8; /**< reserved */
unsigned : 8; /**< reserved */
unsigned : 32; /**< reserved */
unsigned : 32; /**< reserved */
unsigned : 2; /**< reserved */
unsigned : 4; /**< reserved */
unsigned : 2; /**< reserved */
unsigned rx_channel_estimate_len : 10; /**< the length of the channel information */
unsigned rx_channel_estimate_info_vld : 1; /**< indicate the channel information is valid */
unsigned : 1; /**< reserved */
unsigned : 11; /**< reserved */
unsigned : 1; /**< reserved */
unsigned : 24; /**< reserved */
unsigned cur_bb_format : 4; /**< the format of the reception frame */
unsigned cur_single_mpdu : 1; /**< indicate whether the reception MPDU is a S-MPDU */
unsigned : 3; /**< reserved */
unsigned : 32; /**< reserved */
unsigned : 32; /**< reserved */
unsigned : 32; /**< reserved */
unsigned : 32; /**< reserved */
unsigned : 32; /**< reserved */
unsigned : 32; /**< reserved */
unsigned : 32; /**< reserved */
unsigned : 32; /**< reserved */
unsigned : 8; /**< reserved */
unsigned he_sigb_len : 6; /**< the length of HE-SIGB */
unsigned : 2; /**< reserved */
unsigned : 8; /**< reserved */
unsigned : 8; /**< reserved */
unsigned : 32; /**< reserved */
unsigned : 7; /**< reserved */
unsigned : 1; /**< reserved */
unsigned : 8; /**< reserved */
unsigned : 16; /**< reserved */
unsigned sig_len : 14; /**< the length of the reception MPDU */
unsigned : 2; /**< reserved */
unsigned dump_len : 14; /**< the length of the reception MPDU excluding the FCS */
unsigned : 2; /**< reserved */
unsigned rx_state : 8; /**< reception state, 0: successful, others: failure */
unsigned : 24; /**< reserved */
} __attribute__((packed)) esp_wifi_rxctrl_t;
#endif
/**
* @brief bTWT setup status
*/
typedef enum {
BTWT_SETUP_TXFAIL, /**< station sends btwt setup request frame fail */
BTWT_SETUP_SUCCESS, /**< station receives btwt setup response frame and setup btwt sucessfully */
BTWT_SETUP_TIMEOUT, /**< timeout of receiving btwt setup response frame */
BTWT_SETUP_FULL, /**< indicate there is no available btwt id */
BTWT_SETUP_INVALID_ARG, /**< indicate invalid argument to setup btwt */
BTWT_SETUP_INTERNAL_ERR, /**< indicate internal error to setup btwt */
} wifi_btwt_setup_status_t;
/** Argument structure for WIFI_EVENT_TWT_SET_UP event */
typedef struct {
wifi_itwt_setup_config_t config; /**< itwt setup config, this value is determined by the AP */
esp_err_t status; /**< itwt setup status, 1: indicate setup success, others : indicate setup fail */
uint8_t reason; /**< itwt setup frame tx fail reason */
uint64_t target_wake_time; /**< TWT SP start time */
} wifi_event_sta_itwt_setup_t;
/**
* @brief iTWT teardown status
*/
typedef enum {
ITWT_TEARDOWN_FAIL, /**< station sends teardown frame fail */
ITWT_TEARDOWN_SUCCESS, /**< 1) station successfully sends teardown frame to AP; 2) station receives teardown frame from AP */
} wifi_itwt_teardown_status_t;
/** Argument structure for WIFI_EVENT_TWT_TEARDOWN event */
typedef struct {
uint8_t flow_id; /**< flow id */
wifi_itwt_teardown_status_t status; /**< itwt teardown status */
} wifi_event_sta_itwt_teardown_t;
/** Argument structure for WIFI_EVENT_BTWT_SET_UP event */
typedef struct {
wifi_btwt_setup_status_t status; /**< indicate btwt setup status */
wifi_twt_setup_cmds_t setup_cmd; /**< indicate the type of TWT command */
uint8_t btwt_id; /**< indicate btwt id */
uint8_t min_wake_dura; /**< Nominal Minimum Wake Duration, indicates the minimum amount of time, in unit of 256 us, that the TWT requesting STA expects that it needs to be awake. The value range is [1, 255]. */
uint8_t wake_invl_expn; /**< TWT Wake Interval Exponent. The value range is [0, 31]. */
uint16_t wake_invl_mant; /**< TWT Wake Interval Mantissa. The value range is [1, 65535]. */
bool trigger; /**< 1: a trigger-enabled TWT, 0: a non-trigger-enabled TWT */
uint8_t flow_type; /**< 0: an announced TWT, 1: an unannounced TWT */
uint8_t reason; /**< btwt setup frame tx fail reason */
uint64_t target_wake_time; /**< TWT SP start time */
} wifi_event_sta_btwt_setup_t;
/**
* @brief BTWT teardown status
*/
typedef enum {
BTWT_TEARDOWN_FAIL, /**< station sends teardown frame fail */
BTWT_TEARDOWN_SUCCESS, /**< 1) station successfully sends teardown frame to AP; 2) station receives teardown frame from AP */
} wifi_btwt_teardown_status_t;
/** Argument structure for WIFI_EVENT_TWT_TEARDOWN event */
typedef struct {
uint8_t btwt_id; /**< btwt id */
wifi_btwt_teardown_status_t status; /**< btwt teardown status */
} wifi_event_sta_btwt_teardown_t;
/**
* @brief iTWT probe status
*/
typedef enum {
ITWT_PROBE_FAIL, /**< station sends probe request fail */
ITWT_PROBE_SUCCESS, /**< 1) station receives beacon from AP; 2) station receives probe response from AP */
ITWT_PROBE_TIMEOUT, /**< 1) timeout of receiving ACK in response of previously probe request sending by station
2) timeout of receiving probe response in response of previously probe request sending by station */
ITWT_PROBE_STA_DISCONNECTED, /**< station is not connected */
} wifi_itwt_probe_status_t;
/** Argument structure for WIFI_EVENT_ITWT_SEND_PROBE event */
typedef struct {
wifi_itwt_probe_status_t status; /**< probe status */
uint8_t reason; /**< failure reason */
} wifi_event_sta_itwt_probe_t;
/** Argument structure for WIFI_EVENT_ITWT_SUSPEND event */
typedef struct {
esp_err_t status; /**< suspend status */
uint8_t flow_id_bitmap; /**< bitmap of the suspended flow id */
uint32_t actual_suspend_time_ms[8]; /**< the actual suspend time for each flow id, unit: ms */
} wifi_event_sta_itwt_suspend_t;
/**
* @brief TWT types
*/
typedef enum {
TWT_TYPE_INDIVIDUAL, /**< individual twt */
TWT_TYPE_BROADCAST, /**< broadcast twt */
TWT_TYPE_MAX, /**< the max value */
} wifi_twt_type_t;
/** Argument structure for twt configuration */
typedef struct {
bool post_wakeup_event; /**< post twt wakeup event */
bool twt_enable_keep_alive; /**< twt enable send qos null to keep alive */
} wifi_twt_config_t;
/** Argument structure for WIFI_EVENT_TWT_WAKEUP event */
typedef struct {
wifi_twt_type_t twt_type; /**< twt type */
uint8_t flow_id; /**< flow id */
} wifi_event_sta_twt_wakeup_t;
/** Argument structure for twt information */
typedef struct {
bool btwt_id_in_use; /**< indicate whether the btwt id is in use or not */
uint16_t btwt_trigger : 1; /**< 1: a trigger-enabled TWT, 0: a non-trigger-enabled TWT */
uint16_t btwt_flow_type : 1; /**< 0: an announced TWT, 1: an unannounced TWT */
uint16_t btwt_recommendation : 3; /**< indicate recommendations on the types of frames. 0: no constraints, [1, 3], [4, 7] reserved */
uint16_t btwt_wake_interval_exponent : 5; /**< TWT Wake Interval Exponent. The value range is [0, 31]. */
uint16_t btwt_rsvd : 6; /**< reserved */
uint8_t btwt_wake_duration; /**< TWT Wake duration unit, 0: 256us 1: TU (TU = 1024us) */
uint16_t btwt_wake_interval_mantissa; /**< TWT Wake Interval Mantissa. The value range is [1, 65535]. */
uint16_t btwt_info_id : 5; /**< btwt id */
uint16_t btwt_info_persistence : 8; /**< indicate the number of TBTTs during which the Broadcast TWT SPs corresponding to this broadcast TWT parameters set are present */
uint16_t btwt_info_rsvd : 3; /**< reserved */
} esp_wifi_btwt_info_t;
#ifdef __cplusplus
}
#endif

View File

@@ -0,0 +1,86 @@
/*
* SPDX-FileCopyrightText: 2019-2023 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#pragma once
#include <stdint.h>
#include <stdbool.h>
#include "esp_err.h"
#include "esp_wifi_types.h"
#include "esp_netif_types.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* @brief Number of WiFi interfaces used by wifi-netif abstraction
*/
#define MAX_WIFI_IFS WIFI_IF_MAX
/**
* @brief Forward declaration of WiFi interface handle
*/
typedef struct wifi_netif_driver* wifi_netif_driver_t;
/**
* @brief Creates wifi driver instance to be used with esp-netif
*
* @param wifi_if wifi interface type (station, softAP)
*
* @return
* - pointer to wifi interface handle on success
* - NULL otherwise
*/
wifi_netif_driver_t esp_wifi_create_if_driver(wifi_interface_t wifi_if);
/**
* @brief Destroys wifi driver instance
*
* @param h pointer to wifi interface handle
*
*/
void esp_wifi_destroy_if_driver(wifi_netif_driver_t h);
/**
* @brief Return mac of specified wifi driver instance
*
* @param[in] ifx pointer to wifi interface handle
* @param[out] mac output mac address
*
* @return ESP_OK on success
*
*/
esp_err_t esp_wifi_get_if_mac(wifi_netif_driver_t ifx, uint8_t mac[6]);
/**
* @brief Return true if the supplied interface instance is ready after start.
* Typically used when registering on receive callback, which ought to be
* installed as soon as AP started, but once STA gets connected.
*
* @param[in] ifx pointer to wifi interface handle
*
* @return
* - true if ready after interface started (typically Access Point type)
* - false if ready once interface connected (typically for Station type)
*/
bool esp_wifi_is_if_ready_when_started(wifi_netif_driver_t ifx);
/**
* @brief Register interface receive callback function with argument
*
* @param[in] ifx pointer to wifi interface handle
* @param[in] fn function to be registered (typically esp_netif_receive)
* @param[in] arg argument to be supplied to registered function (typically esp_netif ptr)
*
* @return ESP_OK on success
*
*/
esp_err_t esp_wifi_register_if_rxcb(wifi_netif_driver_t ifx, esp_netif_receive_t fn, void * arg);
#ifdef __cplusplus
}
#endif

View File

@@ -0,0 +1,29 @@
/*
* SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#pragma once
#include "esp_wifi_types_generic.h"
#if __has_include("esp_wifi_types_native.h")
#include "esp_wifi_types_native.h"
#else
#ifdef __cplusplus
extern "C" {
#endif
/*
* In case we have no native types, we can still provide opaque structs,
* so the most common APIs could work and others would compile.
* This could happen for chipsets with no wifi, yet without local esp_wifi_remote.
*/
typedef struct wifi_csi_config_t wifi_csi_config_t;
typedef struct wifi_pkt_rx_ctrl_t wifi_pkt_rx_ctrl_t;
#ifdef __cplusplus
}
#endif
#endif // __has_include("esp_wifi_types_native.h")

View File

@@ -0,0 +1,134 @@
/*
* SPDX-FileCopyrightText: 2023-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#pragma once
#include "sdkconfig.h"
#include "esp_wifi_types_generic.h"
#if CONFIG_SLAVE_SOC_WIFI_HE_SUPPORT
#include "esp_wifi_he_types.h"
#endif
#ifdef __cplusplus
extern "C" {
#endif
#if CONFIG_SLAVE_IDF_TARGET_ESP32C2
#define ESP_WIFI_MAX_CONN_NUM (4) /**< max number of stations which can connect to ESP32C2 soft-AP */
#elif CONFIG_SLAVE_IDF_TARGET_ESP32C3 || CONFIG_SLAVE_IDF_TARGET_ESP32C6 || CONFIG_SLAVE_IDF_TARGET_ESP32C5
#define ESP_WIFI_MAX_CONN_NUM (10) /**< max number of stations which can connect to ESP32C3 soft-AP */
#else
#define ESP_WIFI_MAX_CONN_NUM (15) /**< max number of stations which can connect to ESP32/ESP32S3/ESP32S2 soft-AP */
#endif
/** @brief List of stations associated with the Soft-AP */
typedef struct wifi_sta_list_t {
wifi_sta_info_t sta[ESP_WIFI_MAX_CONN_NUM]; /**< station list */
int num; /**< number of stations in the list (other entries are invalid) */
} wifi_sta_list_t;
#if CONFIG_SLAVE_SOC_WIFI_HE_SUPPORT
typedef esp_wifi_rxctrl_t wifi_pkt_rx_ctrl_t;
#else
/** @brief Received packet radio metadata header, this is the common header at the beginning of all promiscuous mode RX callback buffers */
typedef struct {
signed rssi: 8; /**< Received Signal Strength Indicator(RSSI) of packet. unit: dBm */
unsigned rate: 5; /**< PHY rate encoding of the packet. Only valid for non HT(11bg) packet */
unsigned : 1; /**< reserved */
unsigned sig_mode: 2; /**< Protocol of the received packet, 0: non HT(11bg) packet; 1: HT(11n) packet; 3: VHT(11ac) packet */
unsigned : 16; /**< reserved */
unsigned mcs: 7; /**< Modulation Coding Scheme. If is HT(11n) packet, shows the modulation, range from 0 to 76(MSC0 ~ MCS76) */
unsigned cwb: 1; /**< Channel Bandwidth of the packet. 0: 20MHz; 1: 40MHz */
unsigned : 16; /**< reserved */
unsigned smoothing: 1; /**< Set to 1 indicates that channel estimate smoothing is recommended.
Set to 0 indicates that only per-carrierindependent (unsmoothed) channel estimate is recommended. */
unsigned not_sounding: 1; /**< Set to 0 indicates that PPDU is a sounding PPDU. Set to 1indicates that the PPDU is not a sounding PPDU.
sounding PPDU is used for channel estimation by the request receiver */
unsigned : 1; /**< reserved */
unsigned aggregation: 1; /**< Aggregation. 0: MPDU packet; 1: AMPDU packet */
unsigned stbc: 2; /**< Space Time Block Code(STBC). 0: non STBC packet; 1: STBC packet */
unsigned fec_coding: 1; /**< Forward Error Correction(FEC). Flag is set for 11n packets which are LDPC */
unsigned sgi: 1; /**< Short Guide Interval(SGI). 0: Long GI; 1: Short GI */
#if CONFIG_SLAVE_IDF_TARGET_ESP32
signed noise_floor: 8; /**< noise floor of Radio Frequency Module(RF). unit: dBm*/
#elif CONFIG_SLAVE_IDF_TARGET_ESP32S2 || CONFIG_SLAVE_IDF_TARGET_ESP32S3 || CONFIG_SLAVE_IDF_TARGET_ESP32C3 || CONFIG_SLAVE_IDF_TARGET_ESP32C2
unsigned : 8; /**< reserved */
#endif
unsigned ampdu_cnt: 8; /**< the number of subframes aggregated in AMPDU */
unsigned channel: 4; /**< primary channel on which this packet is received */
unsigned secondary_channel: 4; /**< secondary channel on which this packet is received. 0: none; 1: above; 2: below */
unsigned : 8; /**< reserved */
unsigned timestamp: 32; /**< timestamp. The local time when this packet is received. It is precise only if modem sleep or light sleep is not enabled. unit: microsecond */
unsigned : 32; /**< reserved */
#if CONFIG_SLAVE_IDF_TARGET_ESP32S2
unsigned : 32; /**< reserved */
#elif CONFIG_SLAVE_IDF_TARGET_ESP32S3 || CONFIG_SLAVE_IDF_TARGET_ESP32C3 || CONFIG_SLAVE_IDF_TARGET_ESP32C2
signed noise_floor: 8; /**< noise floor of Radio Frequency Module(RF). unit: dBm*/
unsigned : 24; /**< reserved */
unsigned : 32; /**< reserved */
#endif
unsigned : 31; /**< reserved */
unsigned ant: 1; /**< antenna number from which this packet is received. 0: WiFi antenna 0; 1: WiFi antenna 1 */
#if CONFIG_SLAVE_IDF_TARGET_ESP32S2
signed noise_floor: 8; /**< noise floor of Radio Frequency Module(RF). unit: dBm*/
unsigned : 24; /**< reserved */
#elif CONFIG_SLAVE_IDF_TARGET_ESP32S3 || CONFIG_SLAVE_IDF_TARGET_ESP32C3 || CONFIG_SLAVE_IDF_TARGET_ESP32C2
unsigned : 32; /**< reserved */
unsigned : 32; /**< reserved */
unsigned : 32; /**< reserved */
#endif
unsigned sig_len: 12; /**< length of packet including Frame Check Sequence(FCS) */
unsigned : 12; /**< reserved */
unsigned rx_state: 8; /**< state of the packet. 0: no error; others: error numbers which are not public */
} wifi_pkt_rx_ctrl_t;
#endif
/**
* @brief Channel state information(CSI) configuration type
*
*/
#if CONFIG_SLAVE_SOC_WIFI_HE_SUPPORT
typedef wifi_csi_acquire_config_t wifi_csi_config_t;
#else
typedef struct {
bool lltf_en; /**< enable to receive legacy long training field(lltf) data. Default enabled */
bool htltf_en; /**< enable to receive HT long training field(htltf) data. Default enabled */
bool stbc_htltf2_en; /**< enable to receive space time block code HT long training field(stbc-htltf2) data. Default enabled */
bool ltf_merge_en; /**< enable to generate htlft data by averaging lltf and ht_ltf data when receiving HT packet. Otherwise, use ht_ltf data directly. Default enabled */
bool channel_filter_en; /**< enable to turn on channel filter to smooth adjacent sub-carrier. Disable it to keep independence of adjacent sub-carrier. Default enabled */
bool manu_scale; /**< manually scale the CSI data by left shifting or automatically scale the CSI data. If set true, please set the shift bits. false: automatically. true: manually. Default false */
uint8_t shift; /**< manually left shift bits of the scale of the CSI data. The range of the left shift bits is 0~15 */
bool dump_ack_en; /**< enable to dump 802.11 ACK frame, default disabled */
} wifi_csi_config_t;
#endif // !CONFIG_SLAVE_SOC_WIFI_HE_SUPPORT
/** @brief Payload passed to 'buf' parameter of promiscuous mode RX callback.
*/
typedef struct {
wifi_pkt_rx_ctrl_t rx_ctrl; /**< metadata header */
uint8_t payload[0]; /**< Data or management payload. Length of payload is described by rx_ctrl.sig_len. Type of content determined by packet type argument of callback. */
} wifi_promiscuous_pkt_t;
/**
* @brief CSI data type
*
*/
typedef struct wifi_csi_info_t {
wifi_pkt_rx_ctrl_t rx_ctrl;/**< received packet radio metadata header of the CSI data */
uint8_t mac[6]; /**< source MAC address of the CSI data */
uint8_t dmac[6]; /**< destination MAC address of the CSI data */
bool first_word_invalid; /**< first four bytes of the CSI data is invalid or not, true indicates the first four bytes is invalid due to hardware limitation */
int8_t *buf; /**< valid buffer of CSI data */
uint16_t len; /**< valid length of CSI data */
uint8_t *hdr; /**< header of the wifi packet */
uint8_t *payload; /**< payload of the wifi packet */
uint16_t payload_len; /**< payload len of the wifi packet */
uint16_t rx_seq; /**< rx sequence number of the wifi packet */
} wifi_csi_info_t;
#ifdef __cplusplus
}
#endif

View File

@@ -0,0 +1,19 @@
# This file is auto-generated
choice SLAVE_IDF_TARGET
prompt "choose slave target"
default SLAVE_IDF_TARGET_ESP32C6 if IDF_TARGET_ESP32P4 # To support common use-cases
default SLAVE_IDF_TARGET_ESP32
config SLAVE_IDF_TARGET_ESP32
bool "esp32"
config SLAVE_IDF_TARGET_ESP32S2
bool "esp32s2"
config SLAVE_IDF_TARGET_ESP32C3
bool "esp32c3"
config SLAVE_IDF_TARGET_ESP32S3
bool "esp32s3"
config SLAVE_IDF_TARGET_ESP32C2
bool "esp32c2"
config SLAVE_IDF_TARGET_ESP32C6
bool "esp32c6"
endchoice

View File

@@ -0,0 +1,265 @@
# This file is auto-generated
if SLAVE_IDF_TARGET_ESP32
config SLAVE_SOC_WIFI_SUPPORTED # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_WAPI_SUPPORT # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_CSI_SUPPORT # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_MESH_SUPPORT # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_SUPPORT_VARIABLE_BEACON_WINDOW # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_NAN_SUPPORT # ignore: multiple-definition
bool
default y
config SLAVE_IDF_TARGET_ARCH_XTENSA # ignore: multiple-definition
bool
default y
endif # ESP32
if SLAVE_IDF_TARGET_ESP32S2
config SLAVE_SOC_WIFI_SUPPORTED # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_LIGHT_SLEEP_CLK_WIDTH # ignore: multiple-definition
int
default 12
config SLAVE_SOC_WIFI_HW_TSF # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_FTM_SUPPORT # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_WAPI_SUPPORT # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_CSI_SUPPORT # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_MESH_SUPPORT # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_SUPPORT_VARIABLE_BEACON_WINDOW # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_NAN_SUPPORT # ignore: multiple-definition
bool
default y
config SLAVE_FREERTOS_UNICORE # ignore: multiple-definition
bool
default y
config SLAVE_IDF_TARGET_ARCH_XTENSA # ignore: multiple-definition
bool
default y
endif # ESP32S2
if SLAVE_IDF_TARGET_ESP32C3
config SLAVE_SOC_WIFI_SUPPORTED # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_LIGHT_SLEEP_CLK_WIDTH # ignore: multiple-definition
int
default 12
config SLAVE_SOC_WIFI_HW_TSF # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_FTM_SUPPORT # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_GCMP_SUPPORT # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_WAPI_SUPPORT # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_CSI_SUPPORT # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_MESH_SUPPORT # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_SUPPORT_VARIABLE_BEACON_WINDOW # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_PHY_NEEDS_USB_WORKAROUND # ignore: multiple-definition
bool
default y
config SLAVE_FREERTOS_UNICORE # ignore: multiple-definition
bool
default y
config SLAVE_IDF_TARGET_ARCH_RISCV # ignore: multiple-definition
bool
default y
endif # ESP32C3
if SLAVE_IDF_TARGET_ESP32S3
config SLAVE_SOC_WIFI_SUPPORTED # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_LIGHT_SLEEP_CLK_WIDTH # ignore: multiple-definition
int
default 12
config SLAVE_SOC_WIFI_HW_TSF # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_FTM_SUPPORT # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_GCMP_SUPPORT # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_WAPI_SUPPORT # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_CSI_SUPPORT # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_MESH_SUPPORT # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_SUPPORT_VARIABLE_BEACON_WINDOW # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_PHY_NEEDS_USB_WORKAROUND # ignore: multiple-definition
bool
default y
config SLAVE_IDF_TARGET_ARCH_XTENSA # ignore: multiple-definition
bool
default y
endif # ESP32S3
if SLAVE_IDF_TARGET_ESP32C2
config SLAVE_SOC_WIFI_SUPPORTED # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_LIGHT_SLEEP_CLK_WIDTH # ignore: multiple-definition
int
default 12
config SLAVE_SOC_WIFI_HW_TSF # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_FTM_SUPPORT # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_SUPPORT_VARIABLE_BEACON_WINDOW # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_PHY_NEEDS_USB_WORKAROUND # ignore: multiple-definition
bool
default y
config SLAVE_FREERTOS_UNICORE # ignore: multiple-definition
bool
default y
config SLAVE_IDF_TARGET_ARCH_RISCV # ignore: multiple-definition
bool
default y
endif # ESP32C2
if SLAVE_IDF_TARGET_ESP32C6
config SLAVE_SOC_WIFI_SUPPORTED # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_LIGHT_SLEEP_CLK_WIDTH # ignore: multiple-definition
int
default 12
config SLAVE_SOC_WIFI_HW_TSF # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_FTM_SUPPORT # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_GCMP_SUPPORT # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_WAPI_SUPPORT # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_CSI_SUPPORT # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_MESH_SUPPORT # ignore: multiple-definition
bool
default y
config SLAVE_SOC_WIFI_HE_SUPPORT # ignore: multiple-definition
bool
default y
config SLAVE_FREERTOS_UNICORE # ignore: multiple-definition
bool
default y
config SLAVE_IDF_TARGET_ARCH_RISCV # ignore: multiple-definition
bool
default y
endif # ESP32C6

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,397 @@
/*
* SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
// This file is auto-generated
#include "esp_wifi_remote.h"
#include "esp_log.h"
#define WEAK __attribute__((weak))
#define LOG_UNSUPPORTED_AND_RETURN(ret) ESP_LOGW("esp_wifi_remote_weak", "%s unsupported", __func__); \
return ret;
WEAK esp_err_t esp_wifi_remote_init(const wifi_init_config_t *config)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_deinit(void)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_set_mode(wifi_mode_t mode)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_get_mode(wifi_mode_t *mode)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_start(void)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_stop(void)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_restore(void)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_connect(void)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_disconnect(void)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_clear_fast_connect(void)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_deauth_sta(uint16_t aid)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_scan_start(const wifi_scan_config_t *config, _Bool block)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_set_scan_parameters(const wifi_scan_default_params_t *config)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_get_scan_parameters(wifi_scan_default_params_t *config)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_scan_stop(void)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_scan_get_ap_num(uint16_t *number)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_scan_get_ap_records(uint16_t *number, wifi_ap_record_t *ap_records)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_scan_get_ap_record(wifi_ap_record_t *ap_record)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_clear_ap_list(void)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_sta_get_ap_info(wifi_ap_record_t *ap_info)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_set_ps(wifi_ps_type_t type)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_get_ps(wifi_ps_type_t *type)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_set_protocol(wifi_interface_t ifx, uint8_t protocol_bitmap)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_get_protocol(wifi_interface_t ifx, uint8_t *protocol_bitmap)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_set_bandwidth(wifi_interface_t ifx, wifi_bandwidth_t bw)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_get_bandwidth(wifi_interface_t ifx, wifi_bandwidth_t *bw)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_set_channel(uint8_t primary, wifi_second_chan_t second)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_get_channel(uint8_t *primary, wifi_second_chan_t *second)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_set_country(const wifi_country_t *country)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_get_country(wifi_country_t *country)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_set_mac(wifi_interface_t ifx, const uint8_t mac[6])
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_get_mac(wifi_interface_t ifx, uint8_t mac[6])
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_set_promiscuous_rx_cb(wifi_promiscuous_cb_t cb)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_set_promiscuous(_Bool en)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_get_promiscuous(_Bool *en)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_set_promiscuous_filter(const wifi_promiscuous_filter_t *filter)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_get_promiscuous_filter(wifi_promiscuous_filter_t *filter)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_set_promiscuous_ctrl_filter(const wifi_promiscuous_filter_t *filter)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_get_promiscuous_ctrl_filter(wifi_promiscuous_filter_t *filter)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_set_config(wifi_interface_t interface, wifi_config_t *conf)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_get_config(wifi_interface_t interface, wifi_config_t *conf)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_ap_get_sta_list(wifi_sta_list_t *sta)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_ap_get_sta_aid(const uint8_t mac[6], uint16_t *aid)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_set_storage(wifi_storage_t storage)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_set_vendor_ie(_Bool enable, wifi_vendor_ie_type_t type, wifi_vendor_ie_id_t idx, const void *vnd_ie)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_set_vendor_ie_cb(esp_vendor_ie_cb_t cb, void *ctx)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_set_max_tx_power(int8_t power)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_get_max_tx_power(int8_t *power)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_set_event_mask(uint32_t mask)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_get_event_mask(uint32_t *mask)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_80211_tx(wifi_interface_t ifx, const void *buffer, int len, _Bool en_sys_seq)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_set_csi_rx_cb(wifi_csi_cb_t cb, void *ctx)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_set_csi_config(const wifi_csi_config_t *config)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_get_csi_config(wifi_csi_config_t *config)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_set_csi(_Bool en)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK int64_t esp_wifi_remote_get_tsf_time(wifi_interface_t interface)
{
LOG_UNSUPPORTED_AND_RETURN(-1);
}
WEAK esp_err_t esp_wifi_remote_set_inactive_time(wifi_interface_t ifx, uint16_t sec)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_get_inactive_time(wifi_interface_t ifx, uint16_t *sec)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_statis_dump(uint32_t modules)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_set_rssi_threshold(int32_t rssi)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_ftm_initiate_session(wifi_ftm_initiator_cfg_t *cfg)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_ftm_end_session(void)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_ftm_resp_set_offset(int16_t offset_cm)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_ftm_get_report(wifi_ftm_report_entry_t *report, uint8_t num_entries)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_config_11b_rate(wifi_interface_t ifx, _Bool disable)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_connectionless_module_set_wake_interval(uint16_t wake_interval)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_force_wakeup_acquire(void)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_force_wakeup_release(void)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_set_country_code(const char *country, _Bool ieee80211d_enabled)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_get_country_code(char *country)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_config_80211_tx_rate(wifi_interface_t ifx, wifi_phy_rate_t rate)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_config_80211_tx(wifi_interface_t ifx, wifi_tx_rate_config_t *config)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_disable_pmf_config(wifi_interface_t ifx)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_sta_get_aid(uint16_t *aid)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_sta_get_negotiated_phymode(wifi_phy_mode_t *phymode)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_set_dynamic_cs(_Bool enabled)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}
WEAK esp_err_t esp_wifi_remote_sta_get_rssi(int *rssi)
{
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
}

View File

@@ -0,0 +1,393 @@
/*
* SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
// This file is auto-generated
#include "esp_wifi.h"
#include "esp_wifi_remote.h"
esp_err_t esp_wifi_init(const wifi_init_config_t *config)
{
return esp_wifi_remote_init(config);
}
esp_err_t esp_wifi_deinit(void)
{
return esp_wifi_remote_deinit();
}
esp_err_t esp_wifi_set_mode(wifi_mode_t mode)
{
return esp_wifi_remote_set_mode(mode);
}
esp_err_t esp_wifi_get_mode(wifi_mode_t *mode)
{
return esp_wifi_remote_get_mode(mode);
}
esp_err_t esp_wifi_start(void)
{
return esp_wifi_remote_start();
}
esp_err_t esp_wifi_stop(void)
{
return esp_wifi_remote_stop();
}
esp_err_t esp_wifi_restore(void)
{
return esp_wifi_remote_restore();
}
esp_err_t esp_wifi_connect(void)
{
return esp_wifi_remote_connect();
}
esp_err_t esp_wifi_disconnect(void)
{
return esp_wifi_remote_disconnect();
}
esp_err_t esp_wifi_clear_fast_connect(void)
{
return esp_wifi_remote_clear_fast_connect();
}
esp_err_t esp_wifi_deauth_sta(uint16_t aid)
{
return esp_wifi_remote_deauth_sta(aid);
}
esp_err_t esp_wifi_scan_start(const wifi_scan_config_t *config, _Bool block)
{
return esp_wifi_remote_scan_start(config, block);
}
esp_err_t esp_wifi_set_scan_parameters(const wifi_scan_default_params_t *config)
{
return esp_wifi_remote_set_scan_parameters(config);
}
esp_err_t esp_wifi_get_scan_parameters(wifi_scan_default_params_t *config)
{
return esp_wifi_remote_get_scan_parameters(config);
}
esp_err_t esp_wifi_scan_stop(void)
{
return esp_wifi_remote_scan_stop();
}
esp_err_t esp_wifi_scan_get_ap_num(uint16_t *number)
{
return esp_wifi_remote_scan_get_ap_num(number);
}
esp_err_t esp_wifi_scan_get_ap_records(uint16_t *number, wifi_ap_record_t *ap_records)
{
return esp_wifi_remote_scan_get_ap_records(number, ap_records);
}
esp_err_t esp_wifi_scan_get_ap_record(wifi_ap_record_t *ap_record)
{
return esp_wifi_remote_scan_get_ap_record(ap_record);
}
esp_err_t esp_wifi_clear_ap_list(void)
{
return esp_wifi_remote_clear_ap_list();
}
esp_err_t esp_wifi_sta_get_ap_info(wifi_ap_record_t *ap_info)
{
return esp_wifi_remote_sta_get_ap_info(ap_info);
}
esp_err_t esp_wifi_set_ps(wifi_ps_type_t type)
{
return esp_wifi_remote_set_ps(type);
}
esp_err_t esp_wifi_get_ps(wifi_ps_type_t *type)
{
return esp_wifi_remote_get_ps(type);
}
esp_err_t esp_wifi_set_protocol(wifi_interface_t ifx, uint8_t protocol_bitmap)
{
return esp_wifi_remote_set_protocol(ifx, protocol_bitmap);
}
esp_err_t esp_wifi_get_protocol(wifi_interface_t ifx, uint8_t *protocol_bitmap)
{
return esp_wifi_remote_get_protocol(ifx, protocol_bitmap);
}
esp_err_t esp_wifi_set_bandwidth(wifi_interface_t ifx, wifi_bandwidth_t bw)
{
return esp_wifi_remote_set_bandwidth(ifx, bw);
}
esp_err_t esp_wifi_get_bandwidth(wifi_interface_t ifx, wifi_bandwidth_t *bw)
{
return esp_wifi_remote_get_bandwidth(ifx, bw);
}
esp_err_t esp_wifi_set_channel(uint8_t primary, wifi_second_chan_t second)
{
return esp_wifi_remote_set_channel(primary, second);
}
esp_err_t esp_wifi_get_channel(uint8_t *primary, wifi_second_chan_t *second)
{
return esp_wifi_remote_get_channel(primary, second);
}
esp_err_t esp_wifi_set_country(const wifi_country_t *country)
{
return esp_wifi_remote_set_country(country);
}
esp_err_t esp_wifi_get_country(wifi_country_t *country)
{
return esp_wifi_remote_get_country(country);
}
esp_err_t esp_wifi_set_mac(wifi_interface_t ifx, const uint8_t mac[6])
{
return esp_wifi_remote_set_mac(ifx, mac);
}
esp_err_t esp_wifi_get_mac(wifi_interface_t ifx, uint8_t mac[6])
{
return esp_wifi_remote_get_mac(ifx, mac);
}
esp_err_t esp_wifi_set_promiscuous_rx_cb(wifi_promiscuous_cb_t cb)
{
return esp_wifi_remote_set_promiscuous_rx_cb(cb);
}
esp_err_t esp_wifi_set_promiscuous(_Bool en)
{
return esp_wifi_remote_set_promiscuous(en);
}
esp_err_t esp_wifi_get_promiscuous(_Bool *en)
{
return esp_wifi_remote_get_promiscuous(en);
}
esp_err_t esp_wifi_set_promiscuous_filter(const wifi_promiscuous_filter_t *filter)
{
return esp_wifi_remote_set_promiscuous_filter(filter);
}
esp_err_t esp_wifi_get_promiscuous_filter(wifi_promiscuous_filter_t *filter)
{
return esp_wifi_remote_get_promiscuous_filter(filter);
}
esp_err_t esp_wifi_set_promiscuous_ctrl_filter(const wifi_promiscuous_filter_t *filter)
{
return esp_wifi_remote_set_promiscuous_ctrl_filter(filter);
}
esp_err_t esp_wifi_get_promiscuous_ctrl_filter(wifi_promiscuous_filter_t *filter)
{
return esp_wifi_remote_get_promiscuous_ctrl_filter(filter);
}
esp_err_t esp_wifi_set_config(wifi_interface_t interface, wifi_config_t *conf)
{
return esp_wifi_remote_set_config(interface, conf);
}
esp_err_t esp_wifi_get_config(wifi_interface_t interface, wifi_config_t *conf)
{
return esp_wifi_remote_get_config(interface, conf);
}
esp_err_t esp_wifi_ap_get_sta_list(wifi_sta_list_t *sta)
{
return esp_wifi_remote_ap_get_sta_list(sta);
}
esp_err_t esp_wifi_ap_get_sta_aid(const uint8_t mac[6], uint16_t *aid)
{
return esp_wifi_remote_ap_get_sta_aid(mac, aid);
}
esp_err_t esp_wifi_set_storage(wifi_storage_t storage)
{
return esp_wifi_remote_set_storage(storage);
}
esp_err_t esp_wifi_set_vendor_ie(_Bool enable, wifi_vendor_ie_type_t type, wifi_vendor_ie_id_t idx, const void *vnd_ie)
{
return esp_wifi_remote_set_vendor_ie(enable, type, idx, vnd_ie);
}
esp_err_t esp_wifi_set_vendor_ie_cb(esp_vendor_ie_cb_t cb, void *ctx)
{
return esp_wifi_remote_set_vendor_ie_cb(cb, ctx);
}
esp_err_t esp_wifi_set_max_tx_power(int8_t power)
{
return esp_wifi_remote_set_max_tx_power(power);
}
esp_err_t esp_wifi_get_max_tx_power(int8_t *power)
{
return esp_wifi_remote_get_max_tx_power(power);
}
esp_err_t esp_wifi_set_event_mask(uint32_t mask)
{
return esp_wifi_remote_set_event_mask(mask);
}
esp_err_t esp_wifi_get_event_mask(uint32_t *mask)
{
return esp_wifi_remote_get_event_mask(mask);
}
esp_err_t esp_wifi_80211_tx(wifi_interface_t ifx, const void *buffer, int len, _Bool en_sys_seq)
{
return esp_wifi_remote_80211_tx(ifx, buffer, len, en_sys_seq);
}
esp_err_t esp_wifi_set_csi_rx_cb(wifi_csi_cb_t cb, void *ctx)
{
return esp_wifi_remote_set_csi_rx_cb(cb, ctx);
}
esp_err_t esp_wifi_set_csi_config(const wifi_csi_config_t *config)
{
return esp_wifi_remote_set_csi_config(config);
}
esp_err_t esp_wifi_get_csi_config(wifi_csi_config_t *config)
{
return esp_wifi_remote_get_csi_config(config);
}
esp_err_t esp_wifi_set_csi(_Bool en)
{
return esp_wifi_remote_set_csi(en);
}
int64_t esp_wifi_get_tsf_time(wifi_interface_t interface)
{
return esp_wifi_remote_get_tsf_time(interface);
}
esp_err_t esp_wifi_set_inactive_time(wifi_interface_t ifx, uint16_t sec)
{
return esp_wifi_remote_set_inactive_time(ifx, sec);
}
esp_err_t esp_wifi_get_inactive_time(wifi_interface_t ifx, uint16_t *sec)
{
return esp_wifi_remote_get_inactive_time(ifx, sec);
}
esp_err_t esp_wifi_statis_dump(uint32_t modules)
{
return esp_wifi_remote_statis_dump(modules);
}
esp_err_t esp_wifi_set_rssi_threshold(int32_t rssi)
{
return esp_wifi_remote_set_rssi_threshold(rssi);
}
esp_err_t esp_wifi_ftm_initiate_session(wifi_ftm_initiator_cfg_t *cfg)
{
return esp_wifi_remote_ftm_initiate_session(cfg);
}
esp_err_t esp_wifi_ftm_end_session(void)
{
return esp_wifi_remote_ftm_end_session();
}
esp_err_t esp_wifi_ftm_resp_set_offset(int16_t offset_cm)
{
return esp_wifi_remote_ftm_resp_set_offset(offset_cm);
}
esp_err_t esp_wifi_ftm_get_report(wifi_ftm_report_entry_t *report, uint8_t num_entries)
{
return esp_wifi_remote_ftm_get_report(report, num_entries);
}
esp_err_t esp_wifi_config_11b_rate(wifi_interface_t ifx, _Bool disable)
{
return esp_wifi_remote_config_11b_rate(ifx, disable);
}
esp_err_t esp_wifi_connectionless_module_set_wake_interval(uint16_t wake_interval)
{
return esp_wifi_remote_connectionless_module_set_wake_interval(wake_interval);
}
esp_err_t esp_wifi_force_wakeup_acquire(void)
{
return esp_wifi_remote_force_wakeup_acquire();
}
esp_err_t esp_wifi_force_wakeup_release(void)
{
return esp_wifi_remote_force_wakeup_release();
}
esp_err_t esp_wifi_set_country_code(const char *country, _Bool ieee80211d_enabled)
{
return esp_wifi_remote_set_country_code(country, ieee80211d_enabled);
}
esp_err_t esp_wifi_get_country_code(char *country)
{
return esp_wifi_remote_get_country_code(country);
}
esp_err_t esp_wifi_config_80211_tx_rate(wifi_interface_t ifx, wifi_phy_rate_t rate)
{
return esp_wifi_remote_config_80211_tx_rate(ifx, rate);
}
esp_err_t esp_wifi_config_80211_tx(wifi_interface_t ifx, wifi_tx_rate_config_t *config)
{
return esp_wifi_remote_config_80211_tx(ifx, config);
}
esp_err_t esp_wifi_disable_pmf_config(wifi_interface_t ifx)
{
return esp_wifi_remote_disable_pmf_config(ifx);
}
esp_err_t esp_wifi_sta_get_aid(uint16_t *aid)
{
return esp_wifi_remote_sta_get_aid(aid);
}
esp_err_t esp_wifi_sta_get_negotiated_phymode(wifi_phy_mode_t *phymode)
{
return esp_wifi_remote_sta_get_negotiated_phymode(phymode);
}
esp_err_t esp_wifi_set_dynamic_cs(_Bool enabled)
{
return esp_wifi_remote_set_dynamic_cs(enabled);
}
esp_err_t esp_wifi_sta_get_rssi(int *rssi)
{
return esp_wifi_remote_sta_get_rssi(rssi);
}

View File

@@ -0,0 +1,769 @@
/*
* SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
// This file is auto-generated
#pragma once
#if CONFIG_SLAVE_IDF_TARGET_ESP32
#define CONFIG_ESP_WIFI_REMOTE_ENABLED 1
#define CONFIG_SLAVE_IDF_TARGET_ESP32 1
#define CONFIG_SLAVE_SOC_WIFI_SUPPORTED 1
#define CONFIG_SLAVE_SOC_WIFI_WAPI_SUPPORT 1
#define CONFIG_SLAVE_SOC_WIFI_CSI_SUPPORT 1
#define CONFIG_SLAVE_SOC_WIFI_MESH_SUPPORT 1
#define CONFIG_SLAVE_SOC_WIFI_SUPPORT_VARIABLE_BEACON_WINDOW 1
#define CONFIG_SLAVE_SOC_WIFI_NAN_SUPPORT 1
#define CONFIG_SLAVE_IDF_TARGET_ARCH_XTENSA 1
#define CONFIG_ESP_WIFI_REMOTE_LIBRARY_HOSTED 1
#define CONFIG_WIFI_RMT_STATIC_RX_BUFFER_NUM 10
#define CONFIG_WIFI_RMT_DYNAMIC_RX_BUFFER_NUM 32
#define CONFIG_WIFI_RMT_DYNAMIC_TX_BUFFER 1
#define CONFIG_WIFI_RMT_TX_BUFFER_TYPE 1
#define CONFIG_WIFI_RMT_DYNAMIC_TX_BUFFER_NUM 32
#define CONFIG_WIFI_RMT_STATIC_RX_MGMT_BUFFER 1
#define CONFIG_WIFI_RMT_DYNAMIC_RX_MGMT_BUF 0
#define CONFIG_WIFI_RMT_RX_MGMT_BUF_NUM_DEF 5
#define CONFIG_WIFI_RMT_AMPDU_TX_ENABLED 1
#define CONFIG_WIFI_RMT_TX_BA_WIN 6
#define CONFIG_WIFI_RMT_AMPDU_RX_ENABLED 1
#define CONFIG_WIFI_RMT_RX_BA_WIN 6
#define CONFIG_WIFI_RMT_NVS_ENABLED 1
#define CONFIG_WIFI_RMT_TASK_PINNED_TO_CORE_0 1
#define CONFIG_WIFI_RMT_SOFTAP_BEACON_MAX_LEN 752
#define CONFIG_WIFI_RMT_MGMT_SBUF_NUM 32
#define CONFIG_WIFI_RMT_IRAM_OPT 1
#define CONFIG_WIFI_RMT_RX_IRAM_OPT 1
#define CONFIG_WIFI_RMT_ENABLE_WPA3_SAE 1
#define CONFIG_WIFI_RMT_ENABLE_SAE_PK 1
#define CONFIG_WIFI_RMT_SOFTAP_SAE_SUPPORT 1
#define CONFIG_WIFI_RMT_ENABLE_WPA3_OWE_STA 1
#define CONFIG_WIFI_RMT_SLP_DEFAULT_MIN_ACTIVE_TIME 50
#define CONFIG_WIFI_RMT_SLP_DEFAULT_MAX_ACTIVE_TIME 10
#define CONFIG_WIFI_RMT_SLP_DEFAULT_WAIT_BROADCAST_DATA_TIME 15
#define CONFIG_WIFI_RMT_STA_DISCONNECTED_PM_ENABLE 1
#define CONFIG_WIFI_RMT_GMAC_SUPPORT 1
#define CONFIG_WIFI_RMT_SOFTAP_SUPPORT 1
#define CONFIG_WIFI_RMT_ESPNOW_MAX_ENCRYPT_NUM 7
#define CONFIG_WIFI_RMT_MBEDTLS_CRYPTO 1
#define CONFIG_WIFI_RMT_MBEDTLS_TLS_CLIENT 1
#define CONFIG_WIFI_RMT_ENTERPRISE_SUPPORT 1
#define CONFIG_ESP_WIFI_STATIC_RX_BUFFER_NUM 10
#define CONFIG_ESP_WIFI_DYNAMIC_RX_BUFFER_NUM 32
#define CONFIG_ESP_WIFI_TX_BUFFER_TYPE 1
#define CONFIG_ESP_WIFI_DYNAMIC_TX_BUFFER_NUM 32
#define CONFIG_ESP_WIFI_DYNAMIC_RX_MGMT_BUF 0
#define CONFIG_ESP_WIFI_RX_MGMT_BUF_NUM_DEF 5
#define CONFIG_ESP_WIFI_AMPDU_TX_ENABLED 1
#define CONFIG_ESP_WIFI_TX_BA_WIN 6
#define CONFIG_ESP_WIFI_AMPDU_RX_ENABLED 1
#define CONFIG_ESP_WIFI_RX_BA_WIN 6
#define CONFIG_ESP_WIFI_NVS_ENABLED 1
#define CONFIG_ESP_WIFI_SOFTAP_BEACON_MAX_LEN 752
#define CONFIG_ESP_WIFI_MGMT_SBUF_NUM 32
#define CONFIG_ESP_WIFI_IRAM_OPT 1
#define CONFIG_ESP_WIFI_RX_IRAM_OPT 1
#define CONFIG_ESP_WIFI_ENABLE_WPA3_SAE 1
#define CONFIG_ESP_WIFI_ENABLE_SAE_PK 1
#define CONFIG_ESP_WIFI_SOFTAP_SAE_SUPPORT 1
#define CONFIG_ESP_WIFI_ENABLE_WPA3_OWE_STA 1
#define CONFIG_ESP_WIFI_SLP_DEFAULT_MIN_ACTIVE_TIME 50
#define CONFIG_ESP_WIFI_SLP_DEFAULT_MAX_ACTIVE_TIME 10
#define CONFIG_ESP_WIFI_SLP_DEFAULT_WAIT_BROADCAST_DATA_TIME 15
#define CONFIG_ESP_WIFI_STA_DISCONNECTED_PM_ENABLE 1
#define CONFIG_ESP_WIFI_GMAC_SUPPORT 1
#define CONFIG_ESP_WIFI_SOFTAP_SUPPORT 1
#define CONFIG_ESP_WIFI_ESPNOW_MAX_ENCRYPT_NUM 7
#define CONFIG_ESP_WIFI_MBEDTLS_CRYPTO 1
#define CONFIG_ESP_WIFI_MBEDTLS_TLS_CLIENT 1
#define CONFIG_ESP_WIFI_ENTERPRISE_SUPPORT 1
#endif // CONFIG_SLAVE_IDF_TARGET_ESP32
#if CONFIG_SLAVE_IDF_TARGET_ESP32S2
#define CONFIG_ESP_WIFI_REMOTE_ENABLED 1
#define CONFIG_SLAVE_IDF_TARGET_ESP32S2 1
#define CONFIG_SLAVE_SOC_WIFI_SUPPORTED 1
#define CONFIG_SLAVE_SOC_WIFI_WAPI_SUPPORT 1
#define CONFIG_SLAVE_SOC_WIFI_CSI_SUPPORT 1
#define CONFIG_SLAVE_SOC_WIFI_MESH_SUPPORT 1
#define CONFIG_SLAVE_SOC_WIFI_SUPPORT_VARIABLE_BEACON_WINDOW 1
#define CONFIG_SLAVE_SOC_WIFI_NAN_SUPPORT 1
#define CONFIG_SLAVE_IDF_TARGET_ARCH_XTENSA 1
#define CONFIG_SLAVE_SOC_WIFI_LIGHT_SLEEP_CLK_WIDTH 12
#define CONFIG_SLAVE_SOC_WIFI_HW_TSF 1
#define CONFIG_SLAVE_SOC_WIFI_FTM_SUPPORT 1
#define CONFIG_SLAVE_FREERTOS_UNICORE 1
#define CONFIG_ESP_WIFI_REMOTE_LIBRARY_HOSTED 1
#define CONFIG_WIFI_RMT_STATIC_RX_BUFFER_NUM 10
#define CONFIG_WIFI_RMT_DYNAMIC_RX_BUFFER_NUM 32
#define CONFIG_WIFI_RMT_DYNAMIC_TX_BUFFER 1
#define CONFIG_WIFI_RMT_TX_BUFFER_TYPE 1
#define CONFIG_WIFI_RMT_DYNAMIC_TX_BUFFER_NUM 32
#define CONFIG_WIFI_RMT_STATIC_RX_MGMT_BUFFER 1
#define CONFIG_WIFI_RMT_DYNAMIC_RX_MGMT_BUF 0
#define CONFIG_WIFI_RMT_RX_MGMT_BUF_NUM_DEF 5
#define CONFIG_WIFI_RMT_AMPDU_TX_ENABLED 1
#define CONFIG_WIFI_RMT_TX_BA_WIN 6
#define CONFIG_WIFI_RMT_AMPDU_RX_ENABLED 1
#define CONFIG_WIFI_RMT_RX_BA_WIN 6
#define CONFIG_WIFI_RMT_NVS_ENABLED 1
#define CONFIG_WIFI_RMT_SOFTAP_BEACON_MAX_LEN 752
#define CONFIG_WIFI_RMT_MGMT_SBUF_NUM 32
#define CONFIG_WIFI_RMT_IRAM_OPT 1
#define CONFIG_WIFI_RMT_RX_IRAM_OPT 1
#define CONFIG_WIFI_RMT_ENABLE_WPA3_SAE 1
#define CONFIG_WIFI_RMT_ENABLE_SAE_PK 1
#define CONFIG_WIFI_RMT_SOFTAP_SAE_SUPPORT 1
#define CONFIG_WIFI_RMT_ENABLE_WPA3_OWE_STA 1
#define CONFIG_WIFI_RMT_SLP_DEFAULT_MIN_ACTIVE_TIME 50
#define CONFIG_WIFI_RMT_SLP_DEFAULT_MAX_ACTIVE_TIME 10
#define CONFIG_WIFI_RMT_SLP_DEFAULT_WAIT_BROADCAST_DATA_TIME 15
#define CONFIG_WIFI_RMT_STA_DISCONNECTED_PM_ENABLE 1
#define CONFIG_WIFI_RMT_GMAC_SUPPORT 1
#define CONFIG_WIFI_RMT_SOFTAP_SUPPORT 1
#define CONFIG_WIFI_RMT_ESPNOW_MAX_ENCRYPT_NUM 7
#define CONFIG_WIFI_RMT_MBEDTLS_CRYPTO 1
#define CONFIG_WIFI_RMT_MBEDTLS_TLS_CLIENT 1
#define CONFIG_WIFI_RMT_ENTERPRISE_SUPPORT 1
#define CONFIG_ESP_WIFI_STATIC_RX_BUFFER_NUM 10
#define CONFIG_ESP_WIFI_DYNAMIC_RX_BUFFER_NUM 32
#define CONFIG_ESP_WIFI_TX_BUFFER_TYPE 1
#define CONFIG_ESP_WIFI_DYNAMIC_TX_BUFFER_NUM 32
#define CONFIG_ESP_WIFI_DYNAMIC_RX_MGMT_BUF 0
#define CONFIG_ESP_WIFI_RX_MGMT_BUF_NUM_DEF 5
#define CONFIG_ESP_WIFI_AMPDU_TX_ENABLED 1
#define CONFIG_ESP_WIFI_TX_BA_WIN 6
#define CONFIG_ESP_WIFI_AMPDU_RX_ENABLED 1
#define CONFIG_ESP_WIFI_RX_BA_WIN 6
#define CONFIG_ESP_WIFI_NVS_ENABLED 1
#define CONFIG_ESP_WIFI_SOFTAP_BEACON_MAX_LEN 752
#define CONFIG_ESP_WIFI_MGMT_SBUF_NUM 32
#define CONFIG_ESP_WIFI_IRAM_OPT 1
#define CONFIG_ESP_WIFI_RX_IRAM_OPT 1
#define CONFIG_ESP_WIFI_ENABLE_WPA3_SAE 1
#define CONFIG_ESP_WIFI_ENABLE_SAE_PK 1
#define CONFIG_ESP_WIFI_SOFTAP_SAE_SUPPORT 1
#define CONFIG_ESP_WIFI_ENABLE_WPA3_OWE_STA 1
#define CONFIG_ESP_WIFI_SLP_DEFAULT_MIN_ACTIVE_TIME 50
#define CONFIG_ESP_WIFI_SLP_DEFAULT_MAX_ACTIVE_TIME 10
#define CONFIG_ESP_WIFI_SLP_DEFAULT_WAIT_BROADCAST_DATA_TIME 15
#define CONFIG_ESP_WIFI_STA_DISCONNECTED_PM_ENABLE 1
#define CONFIG_ESP_WIFI_GMAC_SUPPORT 1
#define CONFIG_ESP_WIFI_SOFTAP_SUPPORT 1
#define CONFIG_ESP_WIFI_ESPNOW_MAX_ENCRYPT_NUM 7
#define CONFIG_ESP_WIFI_MBEDTLS_CRYPTO 1
#define CONFIG_ESP_WIFI_MBEDTLS_TLS_CLIENT 1
#define CONFIG_ESP_WIFI_ENTERPRISE_SUPPORT 1
#endif // CONFIG_SLAVE_IDF_TARGET_ESP32S2
#if CONFIG_SLAVE_IDF_TARGET_ESP32C3
#define CONFIG_ESP_WIFI_REMOTE_ENABLED 1
#define CONFIG_SLAVE_IDF_TARGET_ESP32C3 1
#define CONFIG_SLAVE_SOC_WIFI_SUPPORTED 1
#define CONFIG_SLAVE_SOC_WIFI_WAPI_SUPPORT 1
#define CONFIG_SLAVE_SOC_WIFI_CSI_SUPPORT 1
#define CONFIG_SLAVE_SOC_WIFI_MESH_SUPPORT 1
#define CONFIG_SLAVE_SOC_WIFI_SUPPORT_VARIABLE_BEACON_WINDOW 1
#define CONFIG_SLAVE_SOC_WIFI_LIGHT_SLEEP_CLK_WIDTH 12
#define CONFIG_SLAVE_SOC_WIFI_HW_TSF 1
#define CONFIG_SLAVE_SOC_WIFI_FTM_SUPPORT 1
#define CONFIG_SLAVE_FREERTOS_UNICORE 1
#define CONFIG_SLAVE_SOC_WIFI_GCMP_SUPPORT 1
#define CONFIG_SLAVE_SOC_WIFI_PHY_NEEDS_USB_WORKAROUND 1
#define CONFIG_SLAVE_IDF_TARGET_ARCH_RISCV 1
#define CONFIG_ESP_WIFI_REMOTE_LIBRARY_HOSTED 1
#define CONFIG_WIFI_RMT_STATIC_RX_BUFFER_NUM 10
#define CONFIG_WIFI_RMT_DYNAMIC_RX_BUFFER_NUM 32
#define CONFIG_WIFI_RMT_DYNAMIC_TX_BUFFER 1
#define CONFIG_WIFI_RMT_TX_BUFFER_TYPE 1
#define CONFIG_WIFI_RMT_DYNAMIC_TX_BUFFER_NUM 32
#define CONFIG_WIFI_RMT_STATIC_RX_MGMT_BUFFER 1
#define CONFIG_WIFI_RMT_DYNAMIC_RX_MGMT_BUF 0
#define CONFIG_WIFI_RMT_RX_MGMT_BUF_NUM_DEF 5
#define CONFIG_WIFI_RMT_AMPDU_TX_ENABLED 1
#define CONFIG_WIFI_RMT_TX_BA_WIN 6
#define CONFIG_WIFI_RMT_AMPDU_RX_ENABLED 1
#define CONFIG_WIFI_RMT_RX_BA_WIN 6
#define CONFIG_WIFI_RMT_NVS_ENABLED 1
#define CONFIG_WIFI_RMT_SOFTAP_BEACON_MAX_LEN 752
#define CONFIG_WIFI_RMT_MGMT_SBUF_NUM 32
#define CONFIG_WIFI_RMT_IRAM_OPT 1
#define CONFIG_WIFI_RMT_RX_IRAM_OPT 1
#define CONFIG_WIFI_RMT_ENABLE_WPA3_SAE 1
#define CONFIG_WIFI_RMT_ENABLE_SAE_PK 1
#define CONFIG_WIFI_RMT_SOFTAP_SAE_SUPPORT 1
#define CONFIG_WIFI_RMT_ENABLE_WPA3_OWE_STA 1
#define CONFIG_WIFI_RMT_SLP_DEFAULT_MIN_ACTIVE_TIME 50
#define CONFIG_WIFI_RMT_SLP_DEFAULT_MAX_ACTIVE_TIME 10
#define CONFIG_WIFI_RMT_SLP_DEFAULT_WAIT_BROADCAST_DATA_TIME 15
#define CONFIG_WIFI_RMT_STA_DISCONNECTED_PM_ENABLE 1
#define CONFIG_WIFI_RMT_GMAC_SUPPORT 1
#define CONFIG_WIFI_RMT_SOFTAP_SUPPORT 1
#define CONFIG_WIFI_RMT_ESPNOW_MAX_ENCRYPT_NUM 7
#define CONFIG_WIFI_RMT_MBEDTLS_CRYPTO 1
#define CONFIG_WIFI_RMT_MBEDTLS_TLS_CLIENT 1
#define CONFIG_WIFI_RMT_ENTERPRISE_SUPPORT 1
#define CONFIG_ESP_WIFI_STATIC_RX_BUFFER_NUM 10
#define CONFIG_ESP_WIFI_DYNAMIC_RX_BUFFER_NUM 32
#define CONFIG_ESP_WIFI_TX_BUFFER_TYPE 1
#define CONFIG_ESP_WIFI_DYNAMIC_TX_BUFFER_NUM 32
#define CONFIG_ESP_WIFI_DYNAMIC_RX_MGMT_BUF 0
#define CONFIG_ESP_WIFI_RX_MGMT_BUF_NUM_DEF 5
#define CONFIG_ESP_WIFI_AMPDU_TX_ENABLED 1
#define CONFIG_ESP_WIFI_TX_BA_WIN 6
#define CONFIG_ESP_WIFI_AMPDU_RX_ENABLED 1
#define CONFIG_ESP_WIFI_RX_BA_WIN 6
#define CONFIG_ESP_WIFI_NVS_ENABLED 1
#define CONFIG_ESP_WIFI_SOFTAP_BEACON_MAX_LEN 752
#define CONFIG_ESP_WIFI_MGMT_SBUF_NUM 32
#define CONFIG_ESP_WIFI_IRAM_OPT 1
#define CONFIG_ESP_WIFI_RX_IRAM_OPT 1
#define CONFIG_ESP_WIFI_ENABLE_WPA3_SAE 1
#define CONFIG_ESP_WIFI_ENABLE_SAE_PK 1
#define CONFIG_ESP_WIFI_SOFTAP_SAE_SUPPORT 1
#define CONFIG_ESP_WIFI_ENABLE_WPA3_OWE_STA 1
#define CONFIG_ESP_WIFI_SLP_DEFAULT_MIN_ACTIVE_TIME 50
#define CONFIG_ESP_WIFI_SLP_DEFAULT_MAX_ACTIVE_TIME 10
#define CONFIG_ESP_WIFI_SLP_DEFAULT_WAIT_BROADCAST_DATA_TIME 15
#define CONFIG_ESP_WIFI_STA_DISCONNECTED_PM_ENABLE 1
#define CONFIG_ESP_WIFI_GMAC_SUPPORT 1
#define CONFIG_ESP_WIFI_SOFTAP_SUPPORT 1
#define CONFIG_ESP_WIFI_ESPNOW_MAX_ENCRYPT_NUM 7
#define CONFIG_ESP_WIFI_MBEDTLS_CRYPTO 1
#define CONFIG_ESP_WIFI_MBEDTLS_TLS_CLIENT 1
#define CONFIG_ESP_WIFI_ENTERPRISE_SUPPORT 1
#endif // CONFIG_SLAVE_IDF_TARGET_ESP32C3
#if CONFIG_SLAVE_IDF_TARGET_ESP32S3
#define CONFIG_ESP_WIFI_REMOTE_ENABLED 1
#define CONFIG_SLAVE_IDF_TARGET_ESP32S3 1
#define CONFIG_SLAVE_SOC_WIFI_SUPPORTED 1
#define CONFIG_SLAVE_SOC_WIFI_WAPI_SUPPORT 1
#define CONFIG_SLAVE_SOC_WIFI_CSI_SUPPORT 1
#define CONFIG_SLAVE_SOC_WIFI_MESH_SUPPORT 1
#define CONFIG_SLAVE_SOC_WIFI_SUPPORT_VARIABLE_BEACON_WINDOW 1
#define CONFIG_SLAVE_IDF_TARGET_ARCH_XTENSA 1
#define CONFIG_SLAVE_SOC_WIFI_LIGHT_SLEEP_CLK_WIDTH 12
#define CONFIG_SLAVE_SOC_WIFI_HW_TSF 1
#define CONFIG_SLAVE_SOC_WIFI_FTM_SUPPORT 1
#define CONFIG_SLAVE_SOC_WIFI_GCMP_SUPPORT 1
#define CONFIG_SLAVE_SOC_WIFI_PHY_NEEDS_USB_WORKAROUND 1
#define CONFIG_ESP_WIFI_REMOTE_LIBRARY_HOSTED 1
#define CONFIG_WIFI_RMT_STATIC_RX_BUFFER_NUM 10
#define CONFIG_WIFI_RMT_DYNAMIC_RX_BUFFER_NUM 32
#define CONFIG_WIFI_RMT_DYNAMIC_TX_BUFFER 1
#define CONFIG_WIFI_RMT_TX_BUFFER_TYPE 1
#define CONFIG_WIFI_RMT_DYNAMIC_TX_BUFFER_NUM 32
#define CONFIG_WIFI_RMT_STATIC_RX_MGMT_BUFFER 1
#define CONFIG_WIFI_RMT_DYNAMIC_RX_MGMT_BUF 0
#define CONFIG_WIFI_RMT_RX_MGMT_BUF_NUM_DEF 5
#define CONFIG_WIFI_RMT_AMPDU_TX_ENABLED 1
#define CONFIG_WIFI_RMT_TX_BA_WIN 6
#define CONFIG_WIFI_RMT_AMPDU_RX_ENABLED 1
#define CONFIG_WIFI_RMT_RX_BA_WIN 6
#define CONFIG_WIFI_RMT_NVS_ENABLED 1
#define CONFIG_WIFI_RMT_TASK_PINNED_TO_CORE_0 1
#define CONFIG_WIFI_RMT_SOFTAP_BEACON_MAX_LEN 752
#define CONFIG_WIFI_RMT_MGMT_SBUF_NUM 32
#define CONFIG_WIFI_RMT_IRAM_OPT 1
#define CONFIG_WIFI_RMT_RX_IRAM_OPT 1
#define CONFIG_WIFI_RMT_ENABLE_WPA3_SAE 1
#define CONFIG_WIFI_RMT_ENABLE_SAE_PK 1
#define CONFIG_WIFI_RMT_SOFTAP_SAE_SUPPORT 1
#define CONFIG_WIFI_RMT_ENABLE_WPA3_OWE_STA 1
#define CONFIG_WIFI_RMT_SLP_DEFAULT_MIN_ACTIVE_TIME 50
#define CONFIG_WIFI_RMT_SLP_DEFAULT_MAX_ACTIVE_TIME 10
#define CONFIG_WIFI_RMT_SLP_DEFAULT_WAIT_BROADCAST_DATA_TIME 15
#define CONFIG_WIFI_RMT_STA_DISCONNECTED_PM_ENABLE 1
#define CONFIG_WIFI_RMT_GMAC_SUPPORT 1
#define CONFIG_WIFI_RMT_SOFTAP_SUPPORT 1
#define CONFIG_WIFI_RMT_ESPNOW_MAX_ENCRYPT_NUM 7
#define CONFIG_WIFI_RMT_MBEDTLS_CRYPTO 1
#define CONFIG_WIFI_RMT_MBEDTLS_TLS_CLIENT 1
#define CONFIG_WIFI_RMT_ENTERPRISE_SUPPORT 1
#define CONFIG_ESP_WIFI_STATIC_RX_BUFFER_NUM 10
#define CONFIG_ESP_WIFI_DYNAMIC_RX_BUFFER_NUM 32
#define CONFIG_ESP_WIFI_TX_BUFFER_TYPE 1
#define CONFIG_ESP_WIFI_DYNAMIC_TX_BUFFER_NUM 32
#define CONFIG_ESP_WIFI_DYNAMIC_RX_MGMT_BUF 0
#define CONFIG_ESP_WIFI_RX_MGMT_BUF_NUM_DEF 5
#define CONFIG_ESP_WIFI_AMPDU_TX_ENABLED 1
#define CONFIG_ESP_WIFI_TX_BA_WIN 6
#define CONFIG_ESP_WIFI_AMPDU_RX_ENABLED 1
#define CONFIG_ESP_WIFI_RX_BA_WIN 6
#define CONFIG_ESP_WIFI_NVS_ENABLED 1
#define CONFIG_ESP_WIFI_SOFTAP_BEACON_MAX_LEN 752
#define CONFIG_ESP_WIFI_MGMT_SBUF_NUM 32
#define CONFIG_ESP_WIFI_IRAM_OPT 1
#define CONFIG_ESP_WIFI_RX_IRAM_OPT 1
#define CONFIG_ESP_WIFI_ENABLE_WPA3_SAE 1
#define CONFIG_ESP_WIFI_ENABLE_SAE_PK 1
#define CONFIG_ESP_WIFI_SOFTAP_SAE_SUPPORT 1
#define CONFIG_ESP_WIFI_ENABLE_WPA3_OWE_STA 1
#define CONFIG_ESP_WIFI_SLP_DEFAULT_MIN_ACTIVE_TIME 50
#define CONFIG_ESP_WIFI_SLP_DEFAULT_MAX_ACTIVE_TIME 10
#define CONFIG_ESP_WIFI_SLP_DEFAULT_WAIT_BROADCAST_DATA_TIME 15
#define CONFIG_ESP_WIFI_STA_DISCONNECTED_PM_ENABLE 1
#define CONFIG_ESP_WIFI_GMAC_SUPPORT 1
#define CONFIG_ESP_WIFI_SOFTAP_SUPPORT 1
#define CONFIG_ESP_WIFI_ESPNOW_MAX_ENCRYPT_NUM 7
#define CONFIG_ESP_WIFI_MBEDTLS_CRYPTO 1
#define CONFIG_ESP_WIFI_MBEDTLS_TLS_CLIENT 1
#define CONFIG_ESP_WIFI_ENTERPRISE_SUPPORT 1
#endif // CONFIG_SLAVE_IDF_TARGET_ESP32S3
#if CONFIG_SLAVE_IDF_TARGET_ESP32C2
#define CONFIG_ESP_WIFI_REMOTE_ENABLED 1
#define CONFIG_SLAVE_IDF_TARGET_ESP32C2 1
#define CONFIG_SLAVE_SOC_WIFI_SUPPORTED 1
#define CONFIG_SLAVE_SOC_WIFI_SUPPORT_VARIABLE_BEACON_WINDOW 1
#define CONFIG_SLAVE_SOC_WIFI_LIGHT_SLEEP_CLK_WIDTH 12
#define CONFIG_SLAVE_SOC_WIFI_HW_TSF 1
#define CONFIG_SLAVE_SOC_WIFI_FTM_SUPPORT 1
#define CONFIG_SLAVE_FREERTOS_UNICORE 1
#define CONFIG_SLAVE_SOC_WIFI_PHY_NEEDS_USB_WORKAROUND 1
#define CONFIG_SLAVE_IDF_TARGET_ARCH_RISCV 1
#define CONFIG_ESP_WIFI_REMOTE_LIBRARY_HOSTED 1
#define CONFIG_WIFI_RMT_STATIC_RX_BUFFER_NUM 10
#define CONFIG_WIFI_RMT_DYNAMIC_RX_BUFFER_NUM 32
#define CONFIG_WIFI_RMT_DYNAMIC_TX_BUFFER 1
#define CONFIG_WIFI_RMT_TX_BUFFER_TYPE 1
#define CONFIG_WIFI_RMT_DYNAMIC_TX_BUFFER_NUM 32
#define CONFIG_WIFI_RMT_STATIC_RX_MGMT_BUFFER 1
#define CONFIG_WIFI_RMT_DYNAMIC_RX_MGMT_BUF 0
#define CONFIG_WIFI_RMT_RX_MGMT_BUF_NUM_DEF 5
#define CONFIG_WIFI_RMT_AMPDU_TX_ENABLED 1
#define CONFIG_WIFI_RMT_TX_BA_WIN 6
#define CONFIG_WIFI_RMT_AMPDU_RX_ENABLED 1
#define CONFIG_WIFI_RMT_RX_BA_WIN 6
#define CONFIG_WIFI_RMT_NVS_ENABLED 1
#define CONFIG_WIFI_RMT_SOFTAP_BEACON_MAX_LEN 752
#define CONFIG_WIFI_RMT_MGMT_SBUF_NUM 32
#define CONFIG_WIFI_RMT_IRAM_OPT 1
#define CONFIG_WIFI_RMT_RX_IRAM_OPT 1
#define CONFIG_WIFI_RMT_ENABLE_WPA3_SAE 1
#define CONFIG_WIFI_RMT_ENABLE_SAE_PK 1
#define CONFIG_WIFI_RMT_SOFTAP_SAE_SUPPORT 1
#define CONFIG_WIFI_RMT_ENABLE_WPA3_OWE_STA 1
#define CONFIG_WIFI_RMT_SLP_DEFAULT_MIN_ACTIVE_TIME 50
#define CONFIG_WIFI_RMT_SLP_DEFAULT_MAX_ACTIVE_TIME 10
#define CONFIG_WIFI_RMT_SLP_DEFAULT_WAIT_BROADCAST_DATA_TIME 15
#define CONFIG_WIFI_RMT_STA_DISCONNECTED_PM_ENABLE 1
#define CONFIG_WIFI_RMT_GMAC_SUPPORT 1
#define CONFIG_WIFI_RMT_SOFTAP_SUPPORT 1
#define CONFIG_WIFI_RMT_ESPNOW_MAX_ENCRYPT_NUM 2
#define CONFIG_WIFI_RMT_MBEDTLS_CRYPTO 1
#define CONFIG_WIFI_RMT_MBEDTLS_TLS_CLIENT 1
#define CONFIG_WIFI_RMT_ENTERPRISE_SUPPORT 1
#define CONFIG_WIFI_RMT_ENT_FREE_DYNAMIC_BUFFER 1
#define CONFIG_ESP_WIFI_STATIC_RX_BUFFER_NUM 10
#define CONFIG_ESP_WIFI_DYNAMIC_RX_BUFFER_NUM 32
#define CONFIG_ESP_WIFI_TX_BUFFER_TYPE 1
#define CONFIG_ESP_WIFI_DYNAMIC_TX_BUFFER_NUM 32
#define CONFIG_ESP_WIFI_DYNAMIC_RX_MGMT_BUF 0
#define CONFIG_ESP_WIFI_RX_MGMT_BUF_NUM_DEF 5
#define CONFIG_ESP_WIFI_AMPDU_TX_ENABLED 1
#define CONFIG_ESP_WIFI_TX_BA_WIN 6
#define CONFIG_ESP_WIFI_AMPDU_RX_ENABLED 1
#define CONFIG_ESP_WIFI_RX_BA_WIN 6
#define CONFIG_ESP_WIFI_NVS_ENABLED 1
#define CONFIG_ESP_WIFI_SOFTAP_BEACON_MAX_LEN 752
#define CONFIG_ESP_WIFI_MGMT_SBUF_NUM 32
#define CONFIG_ESP_WIFI_IRAM_OPT 1
#define CONFIG_ESP_WIFI_RX_IRAM_OPT 1
#define CONFIG_ESP_WIFI_ENABLE_WPA3_SAE 1
#define CONFIG_ESP_WIFI_ENABLE_SAE_PK 1
#define CONFIG_ESP_WIFI_SOFTAP_SAE_SUPPORT 1
#define CONFIG_ESP_WIFI_ENABLE_WPA3_OWE_STA 1
#define CONFIG_ESP_WIFI_SLP_DEFAULT_MIN_ACTIVE_TIME 50
#define CONFIG_ESP_WIFI_SLP_DEFAULT_MAX_ACTIVE_TIME 10
#define CONFIG_ESP_WIFI_SLP_DEFAULT_WAIT_BROADCAST_DATA_TIME 15
#define CONFIG_ESP_WIFI_STA_DISCONNECTED_PM_ENABLE 1
#define CONFIG_ESP_WIFI_GMAC_SUPPORT 1
#define CONFIG_ESP_WIFI_SOFTAP_SUPPORT 1
#define CONFIG_ESP_WIFI_ESPNOW_MAX_ENCRYPT_NUM 2
#define CONFIG_ESP_WIFI_MBEDTLS_CRYPTO 1
#define CONFIG_ESP_WIFI_MBEDTLS_TLS_CLIENT 1
#define CONFIG_ESP_WIFI_ENTERPRISE_SUPPORT 1
#define CONFIG_ESP_WIFI_ENT_FREE_DYNAMIC_BUFFER 1
#endif // CONFIG_SLAVE_IDF_TARGET_ESP32C2
#if CONFIG_SLAVE_IDF_TARGET_ESP32C6
#define CONFIG_ESP_WIFI_REMOTE_ENABLED 1
#define CONFIG_SLAVE_IDF_TARGET_ESP32C6 1
#define CONFIG_SLAVE_SOC_WIFI_SUPPORTED 1
#define CONFIG_SLAVE_SOC_WIFI_WAPI_SUPPORT 1
#define CONFIG_SLAVE_SOC_WIFI_CSI_SUPPORT 1
#define CONFIG_SLAVE_SOC_WIFI_MESH_SUPPORT 1
#define CONFIG_SLAVE_SOC_WIFI_LIGHT_SLEEP_CLK_WIDTH 12
#define CONFIG_SLAVE_SOC_WIFI_HW_TSF 1
#define CONFIG_SLAVE_SOC_WIFI_FTM_SUPPORT 1
#define CONFIG_SLAVE_FREERTOS_UNICORE 1
#define CONFIG_SLAVE_SOC_WIFI_GCMP_SUPPORT 1
#define CONFIG_SLAVE_IDF_TARGET_ARCH_RISCV 1
#define CONFIG_SLAVE_SOC_WIFI_HE_SUPPORT 1
#define CONFIG_ESP_WIFI_REMOTE_LIBRARY_HOSTED 1
#define CONFIG_WIFI_RMT_STATIC_RX_BUFFER_NUM 10
#define CONFIG_WIFI_RMT_DYNAMIC_RX_BUFFER_NUM 32
#define CONFIG_WIFI_RMT_DYNAMIC_TX_BUFFER 1
#define CONFIG_WIFI_RMT_TX_BUFFER_TYPE 1
#define CONFIG_WIFI_RMT_DYNAMIC_TX_BUFFER_NUM 32
#define CONFIG_WIFI_RMT_STATIC_RX_MGMT_BUFFER 1
#define CONFIG_WIFI_RMT_DYNAMIC_RX_MGMT_BUF 0
#define CONFIG_WIFI_RMT_RX_MGMT_BUF_NUM_DEF 5
#define CONFIG_WIFI_RMT_AMPDU_TX_ENABLED 1
#define CONFIG_WIFI_RMT_TX_BA_WIN 6
#define CONFIG_WIFI_RMT_AMPDU_RX_ENABLED 1
#define CONFIG_WIFI_RMT_RX_BA_WIN 6
#define CONFIG_WIFI_RMT_NVS_ENABLED 1
#define CONFIG_WIFI_RMT_SOFTAP_BEACON_MAX_LEN 752
#define CONFIG_WIFI_RMT_MGMT_SBUF_NUM 32
#define CONFIG_WIFI_RMT_IRAM_OPT 1
#define CONFIG_WIFI_RMT_EXTRA_IRAM_OPT 1
#define CONFIG_WIFI_RMT_RX_IRAM_OPT 1
#define CONFIG_WIFI_RMT_ENABLE_WPA3_SAE 1
#define CONFIG_WIFI_RMT_ENABLE_SAE_PK 1
#define CONFIG_WIFI_RMT_SOFTAP_SAE_SUPPORT 1
#define CONFIG_WIFI_RMT_ENABLE_WPA3_OWE_STA 1
#define CONFIG_WIFI_RMT_SLP_IRAM_OPT 1
#define CONFIG_WIFI_RMT_SLP_DEFAULT_MIN_ACTIVE_TIME 50
#define CONFIG_WIFI_RMT_SLP_DEFAULT_MAX_ACTIVE_TIME 10
#define CONFIG_WIFI_RMT_SLP_DEFAULT_WAIT_BROADCAST_DATA_TIME 15
#define CONFIG_WIFI_RMT_STA_DISCONNECTED_PM_ENABLE 1
#define CONFIG_WIFI_RMT_GMAC_SUPPORT 1
#define CONFIG_WIFI_RMT_SOFTAP_SUPPORT 1
#define CONFIG_WIFI_RMT_ESPNOW_MAX_ENCRYPT_NUM 7
#define CONFIG_WIFI_RMT_MBEDTLS_CRYPTO 1
#define CONFIG_WIFI_RMT_MBEDTLS_TLS_CLIENT 1
#define CONFIG_WIFI_RMT_TX_HETB_QUEUE_NUM 3
#define CONFIG_WIFI_RMT_ENTERPRISE_SUPPORT 1
#define CONFIG_ESP_WIFI_STATIC_RX_BUFFER_NUM 10
#define CONFIG_ESP_WIFI_DYNAMIC_RX_BUFFER_NUM 32
#define CONFIG_ESP_WIFI_TX_BUFFER_TYPE 1
#define CONFIG_ESP_WIFI_DYNAMIC_TX_BUFFER_NUM 32
#define CONFIG_ESP_WIFI_DYNAMIC_RX_MGMT_BUF 0
#define CONFIG_ESP_WIFI_RX_MGMT_BUF_NUM_DEF 5
#define CONFIG_ESP_WIFI_AMPDU_TX_ENABLED 1
#define CONFIG_ESP_WIFI_TX_BA_WIN 6
#define CONFIG_ESP_WIFI_AMPDU_RX_ENABLED 1
#define CONFIG_ESP_WIFI_RX_BA_WIN 6
#define CONFIG_ESP_WIFI_NVS_ENABLED 1
#define CONFIG_ESP_WIFI_SOFTAP_BEACON_MAX_LEN 752
#define CONFIG_ESP_WIFI_MGMT_SBUF_NUM 32
#define CONFIG_ESP_WIFI_IRAM_OPT 1
#define CONFIG_ESP_WIFI_EXTRA_IRAM_OPT 1
#define CONFIG_ESP_WIFI_RX_IRAM_OPT 1
#define CONFIG_ESP_WIFI_ENABLE_WPA3_SAE 1
#define CONFIG_ESP_WIFI_ENABLE_SAE_PK 1
#define CONFIG_ESP_WIFI_SOFTAP_SAE_SUPPORT 1
#define CONFIG_ESP_WIFI_ENABLE_WPA3_OWE_STA 1
#define CONFIG_ESP_WIFI_SLP_IRAM_OPT 1
#define CONFIG_ESP_WIFI_SLP_DEFAULT_MIN_ACTIVE_TIME 50
#define CONFIG_ESP_WIFI_SLP_DEFAULT_MAX_ACTIVE_TIME 10
#define CONFIG_ESP_WIFI_SLP_DEFAULT_WAIT_BROADCAST_DATA_TIME 15
#define CONFIG_ESP_WIFI_STA_DISCONNECTED_PM_ENABLE 1
#define CONFIG_ESP_WIFI_GMAC_SUPPORT 1
#define CONFIG_ESP_WIFI_SOFTAP_SUPPORT 1
#define CONFIG_ESP_WIFI_ESPNOW_MAX_ENCRYPT_NUM 7
#define CONFIG_ESP_WIFI_MBEDTLS_CRYPTO 1
#define CONFIG_ESP_WIFI_MBEDTLS_TLS_CLIENT 1
#define CONFIG_ESP_WIFI_TX_HETB_QUEUE_NUM 3
#define CONFIG_ESP_WIFI_ENTERPRISE_SUPPORT 1
#endif // CONFIG_SLAVE_IDF_TARGET_ESP32C6
#if CONFIG_SLAVE_IDF_TARGET_ESP32H2
#define CONFIG_ESP_WIFI_REMOTE_ENABLED 1
#define CONFIG_SLAVE_IDF_TARGET_ESP32 1
#define CONFIG_SLAVE_SOC_WIFI_SUPPORTED 1
#define CONFIG_SLAVE_SOC_WIFI_WAPI_SUPPORT 1
#define CONFIG_SLAVE_SOC_WIFI_CSI_SUPPORT 1
#define CONFIG_SLAVE_SOC_WIFI_MESH_SUPPORT 1
#define CONFIG_SLAVE_SOC_WIFI_SUPPORT_VARIABLE_BEACON_WINDOW 1
#define CONFIG_SLAVE_SOC_WIFI_NAN_SUPPORT 1
#define CONFIG_SLAVE_IDF_TARGET_ARCH_XTENSA 1
#define CONFIG_ESP_WIFI_REMOTE_LIBRARY_HOSTED 1
#define CONFIG_WIFI_RMT_STATIC_RX_BUFFER_NUM 10
#define CONFIG_WIFI_RMT_DYNAMIC_RX_BUFFER_NUM 32
#define CONFIG_WIFI_RMT_DYNAMIC_TX_BUFFER 1
#define CONFIG_WIFI_RMT_TX_BUFFER_TYPE 1
#define CONFIG_WIFI_RMT_DYNAMIC_TX_BUFFER_NUM 32
#define CONFIG_WIFI_RMT_STATIC_RX_MGMT_BUFFER 1
#define CONFIG_WIFI_RMT_DYNAMIC_RX_MGMT_BUF 0
#define CONFIG_WIFI_RMT_RX_MGMT_BUF_NUM_DEF 5
#define CONFIG_WIFI_RMT_AMPDU_TX_ENABLED 1
#define CONFIG_WIFI_RMT_TX_BA_WIN 6
#define CONFIG_WIFI_RMT_AMPDU_RX_ENABLED 1
#define CONFIG_WIFI_RMT_RX_BA_WIN 6
#define CONFIG_WIFI_RMT_NVS_ENABLED 1
#define CONFIG_WIFI_RMT_TASK_PINNED_TO_CORE_0 1
#define CONFIG_WIFI_RMT_SOFTAP_BEACON_MAX_LEN 752
#define CONFIG_WIFI_RMT_MGMT_SBUF_NUM 32
#define CONFIG_WIFI_RMT_IRAM_OPT 1
#define CONFIG_WIFI_RMT_RX_IRAM_OPT 1
#define CONFIG_WIFI_RMT_ENABLE_WPA3_SAE 1
#define CONFIG_WIFI_RMT_ENABLE_SAE_PK 1
#define CONFIG_WIFI_RMT_SOFTAP_SAE_SUPPORT 1
#define CONFIG_WIFI_RMT_ENABLE_WPA3_OWE_STA 1
#define CONFIG_WIFI_RMT_SLP_DEFAULT_MIN_ACTIVE_TIME 50
#define CONFIG_WIFI_RMT_SLP_DEFAULT_MAX_ACTIVE_TIME 10
#define CONFIG_WIFI_RMT_SLP_DEFAULT_WAIT_BROADCAST_DATA_TIME 15
#define CONFIG_WIFI_RMT_STA_DISCONNECTED_PM_ENABLE 1
#define CONFIG_WIFI_RMT_GMAC_SUPPORT 1
#define CONFIG_WIFI_RMT_SOFTAP_SUPPORT 1
#define CONFIG_WIFI_RMT_ESPNOW_MAX_ENCRYPT_NUM 7
#define CONFIG_WIFI_RMT_MBEDTLS_CRYPTO 1
#define CONFIG_WIFI_RMT_MBEDTLS_TLS_CLIENT 1
#define CONFIG_WIFI_RMT_ENTERPRISE_SUPPORT 1
#define CONFIG_ESP_WIFI_STATIC_RX_BUFFER_NUM 10
#define CONFIG_ESP_WIFI_DYNAMIC_RX_BUFFER_NUM 32
#define CONFIG_ESP_WIFI_TX_BUFFER_TYPE 1
#define CONFIG_ESP_WIFI_DYNAMIC_TX_BUFFER_NUM 32
#define CONFIG_ESP_WIFI_DYNAMIC_RX_MGMT_BUF 0
#define CONFIG_ESP_WIFI_RX_MGMT_BUF_NUM_DEF 5
#define CONFIG_ESP_WIFI_AMPDU_TX_ENABLED 1
#define CONFIG_ESP_WIFI_TX_BA_WIN 6
#define CONFIG_ESP_WIFI_AMPDU_RX_ENABLED 1
#define CONFIG_ESP_WIFI_RX_BA_WIN 6
#define CONFIG_ESP_WIFI_NVS_ENABLED 1
#define CONFIG_ESP_WIFI_SOFTAP_BEACON_MAX_LEN 752
#define CONFIG_ESP_WIFI_MGMT_SBUF_NUM 32
#define CONFIG_ESP_WIFI_IRAM_OPT 1
#define CONFIG_ESP_WIFI_RX_IRAM_OPT 1
#define CONFIG_ESP_WIFI_ENABLE_WPA3_SAE 1
#define CONFIG_ESP_WIFI_ENABLE_SAE_PK 1
#define CONFIG_ESP_WIFI_SOFTAP_SAE_SUPPORT 1
#define CONFIG_ESP_WIFI_ENABLE_WPA3_OWE_STA 1
#define CONFIG_ESP_WIFI_SLP_DEFAULT_MIN_ACTIVE_TIME 50
#define CONFIG_ESP_WIFI_SLP_DEFAULT_MAX_ACTIVE_TIME 10
#define CONFIG_ESP_WIFI_SLP_DEFAULT_WAIT_BROADCAST_DATA_TIME 15
#define CONFIG_ESP_WIFI_STA_DISCONNECTED_PM_ENABLE 1
#define CONFIG_ESP_WIFI_GMAC_SUPPORT 1
#define CONFIG_ESP_WIFI_SOFTAP_SUPPORT 1
#define CONFIG_ESP_WIFI_ESPNOW_MAX_ENCRYPT_NUM 7
#define CONFIG_ESP_WIFI_MBEDTLS_CRYPTO 1
#define CONFIG_ESP_WIFI_MBEDTLS_TLS_CLIENT 1
#define CONFIG_ESP_WIFI_ENTERPRISE_SUPPORT 1
#endif // CONFIG_SLAVE_IDF_TARGET_ESP32H2
#if CONFIG_SLAVE_IDF_TARGET_ESP32P4
#define CONFIG_ESP_WIFI_REMOTE_ENABLED 1
#define CONFIG_SLAVE_IDF_TARGET_ESP32 1
#define CONFIG_SLAVE_SOC_WIFI_SUPPORTED 1
#define CONFIG_SLAVE_SOC_WIFI_WAPI_SUPPORT 1
#define CONFIG_SLAVE_SOC_WIFI_CSI_SUPPORT 1
#define CONFIG_SLAVE_SOC_WIFI_MESH_SUPPORT 1
#define CONFIG_SLAVE_SOC_WIFI_SUPPORT_VARIABLE_BEACON_WINDOW 1
#define CONFIG_SLAVE_SOC_WIFI_NAN_SUPPORT 1
#define CONFIG_SLAVE_IDF_TARGET_ARCH_XTENSA 1
#define CONFIG_ESP_WIFI_REMOTE_LIBRARY_HOSTED 1
#define CONFIG_WIFI_RMT_STATIC_RX_BUFFER_NUM 10
#define CONFIG_WIFI_RMT_DYNAMIC_RX_BUFFER_NUM 32
#define CONFIG_WIFI_RMT_DYNAMIC_TX_BUFFER 1
#define CONFIG_WIFI_RMT_TX_BUFFER_TYPE 1
#define CONFIG_WIFI_RMT_DYNAMIC_TX_BUFFER_NUM 32
#define CONFIG_WIFI_RMT_STATIC_RX_MGMT_BUFFER 1
#define CONFIG_WIFI_RMT_DYNAMIC_RX_MGMT_BUF 0
#define CONFIG_WIFI_RMT_RX_MGMT_BUF_NUM_DEF 5
#define CONFIG_WIFI_RMT_AMPDU_TX_ENABLED 1
#define CONFIG_WIFI_RMT_TX_BA_WIN 6
#define CONFIG_WIFI_RMT_AMPDU_RX_ENABLED 1
#define CONFIG_WIFI_RMT_RX_BA_WIN 6
#define CONFIG_WIFI_RMT_NVS_ENABLED 1
#define CONFIG_WIFI_RMT_TASK_PINNED_TO_CORE_0 1
#define CONFIG_WIFI_RMT_SOFTAP_BEACON_MAX_LEN 752
#define CONFIG_WIFI_RMT_MGMT_SBUF_NUM 32
#define CONFIG_WIFI_RMT_IRAM_OPT 1
#define CONFIG_WIFI_RMT_RX_IRAM_OPT 1
#define CONFIG_WIFI_RMT_ENABLE_WPA3_SAE 1
#define CONFIG_WIFI_RMT_ENABLE_SAE_PK 1
#define CONFIG_WIFI_RMT_SOFTAP_SAE_SUPPORT 1
#define CONFIG_WIFI_RMT_ENABLE_WPA3_OWE_STA 1
#define CONFIG_WIFI_RMT_SLP_DEFAULT_MIN_ACTIVE_TIME 50
#define CONFIG_WIFI_RMT_SLP_DEFAULT_MAX_ACTIVE_TIME 10
#define CONFIG_WIFI_RMT_SLP_DEFAULT_WAIT_BROADCAST_DATA_TIME 15
#define CONFIG_WIFI_RMT_STA_DISCONNECTED_PM_ENABLE 1
#define CONFIG_WIFI_RMT_GMAC_SUPPORT 1
#define CONFIG_WIFI_RMT_SOFTAP_SUPPORT 1
#define CONFIG_WIFI_RMT_ESPNOW_MAX_ENCRYPT_NUM 7
#define CONFIG_WIFI_RMT_MBEDTLS_CRYPTO 1
#define CONFIG_WIFI_RMT_MBEDTLS_TLS_CLIENT 1
#define CONFIG_WIFI_RMT_ENTERPRISE_SUPPORT 1
#define CONFIG_ESP_WIFI_STATIC_RX_BUFFER_NUM 10
#define CONFIG_ESP_WIFI_DYNAMIC_RX_BUFFER_NUM 32
#define CONFIG_ESP_WIFI_TX_BUFFER_TYPE 1
#define CONFIG_ESP_WIFI_DYNAMIC_TX_BUFFER_NUM 32
#define CONFIG_ESP_WIFI_DYNAMIC_RX_MGMT_BUF 0
#define CONFIG_ESP_WIFI_RX_MGMT_BUF_NUM_DEF 5
#define CONFIG_ESP_WIFI_AMPDU_TX_ENABLED 1
#define CONFIG_ESP_WIFI_TX_BA_WIN 6
#define CONFIG_ESP_WIFI_AMPDU_RX_ENABLED 1
#define CONFIG_ESP_WIFI_RX_BA_WIN 6
#define CONFIG_ESP_WIFI_NVS_ENABLED 1
#define CONFIG_ESP_WIFI_SOFTAP_BEACON_MAX_LEN 752
#define CONFIG_ESP_WIFI_MGMT_SBUF_NUM 32
#define CONFIG_ESP_WIFI_IRAM_OPT 1
#define CONFIG_ESP_WIFI_RX_IRAM_OPT 1
#define CONFIG_ESP_WIFI_ENABLE_WPA3_SAE 1
#define CONFIG_ESP_WIFI_ENABLE_SAE_PK 1
#define CONFIG_ESP_WIFI_SOFTAP_SAE_SUPPORT 1
#define CONFIG_ESP_WIFI_ENABLE_WPA3_OWE_STA 1
#define CONFIG_ESP_WIFI_SLP_DEFAULT_MIN_ACTIVE_TIME 50
#define CONFIG_ESP_WIFI_SLP_DEFAULT_MAX_ACTIVE_TIME 10
#define CONFIG_ESP_WIFI_SLP_DEFAULT_WAIT_BROADCAST_DATA_TIME 15
#define CONFIG_ESP_WIFI_STA_DISCONNECTED_PM_ENABLE 1
#define CONFIG_ESP_WIFI_GMAC_SUPPORT 1
#define CONFIG_ESP_WIFI_SOFTAP_SUPPORT 1
#define CONFIG_ESP_WIFI_ESPNOW_MAX_ENCRYPT_NUM 7
#define CONFIG_ESP_WIFI_MBEDTLS_CRYPTO 1
#define CONFIG_ESP_WIFI_MBEDTLS_TLS_CLIENT 1
#define CONFIG_ESP_WIFI_ENTERPRISE_SUPPORT 1
#endif // CONFIG_SLAVE_IDF_TARGET_ESP32P4
#if CONFIG_SLAVE_IDF_TARGET_ESP32C5
#define CONFIG_ESP_WIFI_REMOTE_ENABLED 1
#define CONFIG_SLAVE_IDF_TARGET_ESP32 1
#define CONFIG_SLAVE_SOC_WIFI_SUPPORTED 1
#define CONFIG_SLAVE_SOC_WIFI_WAPI_SUPPORT 1
#define CONFIG_SLAVE_SOC_WIFI_CSI_SUPPORT 1
#define CONFIG_SLAVE_SOC_WIFI_MESH_SUPPORT 1
#define CONFIG_SLAVE_SOC_WIFI_SUPPORT_VARIABLE_BEACON_WINDOW 1
#define CONFIG_SLAVE_SOC_WIFI_NAN_SUPPORT 1
#define CONFIG_SLAVE_IDF_TARGET_ARCH_XTENSA 1
#define CONFIG_ESP_WIFI_REMOTE_LIBRARY_HOSTED 1
#define CONFIG_WIFI_RMT_STATIC_RX_BUFFER_NUM 10
#define CONFIG_WIFI_RMT_DYNAMIC_RX_BUFFER_NUM 32
#define CONFIG_WIFI_RMT_DYNAMIC_TX_BUFFER 1
#define CONFIG_WIFI_RMT_TX_BUFFER_TYPE 1
#define CONFIG_WIFI_RMT_DYNAMIC_TX_BUFFER_NUM 32
#define CONFIG_WIFI_RMT_STATIC_RX_MGMT_BUFFER 1
#define CONFIG_WIFI_RMT_DYNAMIC_RX_MGMT_BUF 0
#define CONFIG_WIFI_RMT_RX_MGMT_BUF_NUM_DEF 5
#define CONFIG_WIFI_RMT_AMPDU_TX_ENABLED 1
#define CONFIG_WIFI_RMT_TX_BA_WIN 6
#define CONFIG_WIFI_RMT_AMPDU_RX_ENABLED 1
#define CONFIG_WIFI_RMT_RX_BA_WIN 6
#define CONFIG_WIFI_RMT_NVS_ENABLED 1
#define CONFIG_WIFI_RMT_TASK_PINNED_TO_CORE_0 1
#define CONFIG_WIFI_RMT_SOFTAP_BEACON_MAX_LEN 752
#define CONFIG_WIFI_RMT_MGMT_SBUF_NUM 32
#define CONFIG_WIFI_RMT_IRAM_OPT 1
#define CONFIG_WIFI_RMT_RX_IRAM_OPT 1
#define CONFIG_WIFI_RMT_ENABLE_WPA3_SAE 1
#define CONFIG_WIFI_RMT_ENABLE_SAE_PK 1
#define CONFIG_WIFI_RMT_SOFTAP_SAE_SUPPORT 1
#define CONFIG_WIFI_RMT_ENABLE_WPA3_OWE_STA 1
#define CONFIG_WIFI_RMT_SLP_DEFAULT_MIN_ACTIVE_TIME 50
#define CONFIG_WIFI_RMT_SLP_DEFAULT_MAX_ACTIVE_TIME 10
#define CONFIG_WIFI_RMT_SLP_DEFAULT_WAIT_BROADCAST_DATA_TIME 15
#define CONFIG_WIFI_RMT_STA_DISCONNECTED_PM_ENABLE 1
#define CONFIG_WIFI_RMT_GMAC_SUPPORT 1
#define CONFIG_WIFI_RMT_SOFTAP_SUPPORT 1
#define CONFIG_WIFI_RMT_ESPNOW_MAX_ENCRYPT_NUM 7
#define CONFIG_WIFI_RMT_MBEDTLS_CRYPTO 1
#define CONFIG_WIFI_RMT_MBEDTLS_TLS_CLIENT 1
#define CONFIG_WIFI_RMT_ENTERPRISE_SUPPORT 1
#define CONFIG_ESP_WIFI_STATIC_RX_BUFFER_NUM 10
#define CONFIG_ESP_WIFI_DYNAMIC_RX_BUFFER_NUM 32
#define CONFIG_ESP_WIFI_TX_BUFFER_TYPE 1
#define CONFIG_ESP_WIFI_DYNAMIC_TX_BUFFER_NUM 32
#define CONFIG_ESP_WIFI_DYNAMIC_RX_MGMT_BUF 0
#define CONFIG_ESP_WIFI_RX_MGMT_BUF_NUM_DEF 5
#define CONFIG_ESP_WIFI_AMPDU_TX_ENABLED 1
#define CONFIG_ESP_WIFI_TX_BA_WIN 6
#define CONFIG_ESP_WIFI_AMPDU_RX_ENABLED 1
#define CONFIG_ESP_WIFI_RX_BA_WIN 6
#define CONFIG_ESP_WIFI_NVS_ENABLED 1
#define CONFIG_ESP_WIFI_SOFTAP_BEACON_MAX_LEN 752
#define CONFIG_ESP_WIFI_MGMT_SBUF_NUM 32
#define CONFIG_ESP_WIFI_IRAM_OPT 1
#define CONFIG_ESP_WIFI_RX_IRAM_OPT 1
#define CONFIG_ESP_WIFI_ENABLE_WPA3_SAE 1
#define CONFIG_ESP_WIFI_ENABLE_SAE_PK 1
#define CONFIG_ESP_WIFI_SOFTAP_SAE_SUPPORT 1
#define CONFIG_ESP_WIFI_ENABLE_WPA3_OWE_STA 1
#define CONFIG_ESP_WIFI_SLP_DEFAULT_MIN_ACTIVE_TIME 50
#define CONFIG_ESP_WIFI_SLP_DEFAULT_MAX_ACTIVE_TIME 10
#define CONFIG_ESP_WIFI_SLP_DEFAULT_WAIT_BROADCAST_DATA_TIME 15
#define CONFIG_ESP_WIFI_STA_DISCONNECTED_PM_ENABLE 1
#define CONFIG_ESP_WIFI_GMAC_SUPPORT 1
#define CONFIG_ESP_WIFI_SOFTAP_SUPPORT 1
#define CONFIG_ESP_WIFI_ESPNOW_MAX_ENCRYPT_NUM 7
#define CONFIG_ESP_WIFI_MBEDTLS_CRYPTO 1
#define CONFIG_ESP_WIFI_MBEDTLS_TLS_CLIENT 1
#define CONFIG_ESP_WIFI_ENTERPRISE_SUPPORT 1
#endif // CONFIG_SLAVE_IDF_TARGET_ESP32C5
#if CONFIG_SLAVE_IDF_TARGET_ESP32C61
#define CONFIG_ESP_WIFI_REMOTE_ENABLED 1
#define CONFIG_SLAVE_IDF_TARGET_ESP32 1
#define CONFIG_SLAVE_SOC_WIFI_SUPPORTED 1
#define CONFIG_SLAVE_SOC_WIFI_WAPI_SUPPORT 1
#define CONFIG_SLAVE_SOC_WIFI_CSI_SUPPORT 1
#define CONFIG_SLAVE_SOC_WIFI_MESH_SUPPORT 1
#define CONFIG_SLAVE_SOC_WIFI_SUPPORT_VARIABLE_BEACON_WINDOW 1
#define CONFIG_SLAVE_SOC_WIFI_NAN_SUPPORT 1
#define CONFIG_SLAVE_IDF_TARGET_ARCH_XTENSA 1
#define CONFIG_ESP_WIFI_REMOTE_LIBRARY_HOSTED 1
#define CONFIG_WIFI_RMT_STATIC_RX_BUFFER_NUM 10
#define CONFIG_WIFI_RMT_DYNAMIC_RX_BUFFER_NUM 32
#define CONFIG_WIFI_RMT_DYNAMIC_TX_BUFFER 1
#define CONFIG_WIFI_RMT_TX_BUFFER_TYPE 1
#define CONFIG_WIFI_RMT_DYNAMIC_TX_BUFFER_NUM 32
#define CONFIG_WIFI_RMT_STATIC_RX_MGMT_BUFFER 1
#define CONFIG_WIFI_RMT_DYNAMIC_RX_MGMT_BUF 0
#define CONFIG_WIFI_RMT_RX_MGMT_BUF_NUM_DEF 5
#define CONFIG_WIFI_RMT_AMPDU_TX_ENABLED 1
#define CONFIG_WIFI_RMT_TX_BA_WIN 6
#define CONFIG_WIFI_RMT_AMPDU_RX_ENABLED 1
#define CONFIG_WIFI_RMT_RX_BA_WIN 6
#define CONFIG_WIFI_RMT_NVS_ENABLED 1
#define CONFIG_WIFI_RMT_TASK_PINNED_TO_CORE_0 1
#define CONFIG_WIFI_RMT_SOFTAP_BEACON_MAX_LEN 752
#define CONFIG_WIFI_RMT_MGMT_SBUF_NUM 32
#define CONFIG_WIFI_RMT_IRAM_OPT 1
#define CONFIG_WIFI_RMT_RX_IRAM_OPT 1
#define CONFIG_WIFI_RMT_ENABLE_WPA3_SAE 1
#define CONFIG_WIFI_RMT_ENABLE_SAE_PK 1
#define CONFIG_WIFI_RMT_SOFTAP_SAE_SUPPORT 1
#define CONFIG_WIFI_RMT_ENABLE_WPA3_OWE_STA 1
#define CONFIG_WIFI_RMT_SLP_DEFAULT_MIN_ACTIVE_TIME 50
#define CONFIG_WIFI_RMT_SLP_DEFAULT_MAX_ACTIVE_TIME 10
#define CONFIG_WIFI_RMT_SLP_DEFAULT_WAIT_BROADCAST_DATA_TIME 15
#define CONFIG_WIFI_RMT_STA_DISCONNECTED_PM_ENABLE 1
#define CONFIG_WIFI_RMT_GMAC_SUPPORT 1
#define CONFIG_WIFI_RMT_SOFTAP_SUPPORT 1
#define CONFIG_WIFI_RMT_ESPNOW_MAX_ENCRYPT_NUM 7
#define CONFIG_WIFI_RMT_MBEDTLS_CRYPTO 1
#define CONFIG_WIFI_RMT_MBEDTLS_TLS_CLIENT 1
#define CONFIG_WIFI_RMT_ENTERPRISE_SUPPORT 1
#define CONFIG_ESP_WIFI_STATIC_RX_BUFFER_NUM 10
#define CONFIG_ESP_WIFI_DYNAMIC_RX_BUFFER_NUM 32
#define CONFIG_ESP_WIFI_TX_BUFFER_TYPE 1
#define CONFIG_ESP_WIFI_DYNAMIC_TX_BUFFER_NUM 32
#define CONFIG_ESP_WIFI_DYNAMIC_RX_MGMT_BUF 0
#define CONFIG_ESP_WIFI_RX_MGMT_BUF_NUM_DEF 5
#define CONFIG_ESP_WIFI_AMPDU_TX_ENABLED 1
#define CONFIG_ESP_WIFI_TX_BA_WIN 6
#define CONFIG_ESP_WIFI_AMPDU_RX_ENABLED 1
#define CONFIG_ESP_WIFI_RX_BA_WIN 6
#define CONFIG_ESP_WIFI_NVS_ENABLED 1
#define CONFIG_ESP_WIFI_SOFTAP_BEACON_MAX_LEN 752
#define CONFIG_ESP_WIFI_MGMT_SBUF_NUM 32
#define CONFIG_ESP_WIFI_IRAM_OPT 1
#define CONFIG_ESP_WIFI_RX_IRAM_OPT 1
#define CONFIG_ESP_WIFI_ENABLE_WPA3_SAE 1
#define CONFIG_ESP_WIFI_ENABLE_SAE_PK 1
#define CONFIG_ESP_WIFI_SOFTAP_SAE_SUPPORT 1
#define CONFIG_ESP_WIFI_ENABLE_WPA3_OWE_STA 1
#define CONFIG_ESP_WIFI_SLP_DEFAULT_MIN_ACTIVE_TIME 50
#define CONFIG_ESP_WIFI_SLP_DEFAULT_MAX_ACTIVE_TIME 10
#define CONFIG_ESP_WIFI_SLP_DEFAULT_WAIT_BROADCAST_DATA_TIME 15
#define CONFIG_ESP_WIFI_STA_DISCONNECTED_PM_ENABLE 1
#define CONFIG_ESP_WIFI_GMAC_SUPPORT 1
#define CONFIG_ESP_WIFI_SOFTAP_SUPPORT 1
#define CONFIG_ESP_WIFI_ESPNOW_MAX_ENCRYPT_NUM 7
#define CONFIG_ESP_WIFI_MBEDTLS_CRYPTO 1
#define CONFIG_ESP_WIFI_MBEDTLS_TLS_CLIENT 1
#define CONFIG_ESP_WIFI_ENTERPRISE_SUPPORT 1
#endif // CONFIG_SLAVE_IDF_TARGET_ESP32C61

View File

@@ -0,0 +1,84 @@
/*
* SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
// This file is auto-generated
#pragma once
esp_err_t esp_wifi_remote_init(const wifi_init_config_t *config);
esp_err_t esp_wifi_remote_deinit(void);
esp_err_t esp_wifi_remote_set_mode(wifi_mode_t mode);
esp_err_t esp_wifi_remote_get_mode(wifi_mode_t *mode);
esp_err_t esp_wifi_remote_start(void);
esp_err_t esp_wifi_remote_stop(void);
esp_err_t esp_wifi_remote_restore(void);
esp_err_t esp_wifi_remote_connect(void);
esp_err_t esp_wifi_remote_disconnect(void);
esp_err_t esp_wifi_remote_clear_fast_connect(void);
esp_err_t esp_wifi_remote_deauth_sta(uint16_t aid);
esp_err_t esp_wifi_remote_scan_start(const wifi_scan_config_t *config, _Bool block);
esp_err_t esp_wifi_remote_set_scan_parameters(const wifi_scan_default_params_t *config);
esp_err_t esp_wifi_remote_get_scan_parameters(wifi_scan_default_params_t *config);
esp_err_t esp_wifi_remote_scan_stop(void);
esp_err_t esp_wifi_remote_scan_get_ap_num(uint16_t *number);
esp_err_t esp_wifi_remote_scan_get_ap_records(uint16_t *number, wifi_ap_record_t *ap_records);
esp_err_t esp_wifi_remote_scan_get_ap_record(wifi_ap_record_t *ap_record);
esp_err_t esp_wifi_remote_clear_ap_list(void);
esp_err_t esp_wifi_remote_sta_get_ap_info(wifi_ap_record_t *ap_info);
esp_err_t esp_wifi_remote_set_ps(wifi_ps_type_t type);
esp_err_t esp_wifi_remote_get_ps(wifi_ps_type_t *type);
esp_err_t esp_wifi_remote_set_protocol(wifi_interface_t ifx, uint8_t protocol_bitmap);
esp_err_t esp_wifi_remote_get_protocol(wifi_interface_t ifx, uint8_t *protocol_bitmap);
esp_err_t esp_wifi_remote_set_bandwidth(wifi_interface_t ifx, wifi_bandwidth_t bw);
esp_err_t esp_wifi_remote_get_bandwidth(wifi_interface_t ifx, wifi_bandwidth_t *bw);
esp_err_t esp_wifi_remote_set_channel(uint8_t primary, wifi_second_chan_t second);
esp_err_t esp_wifi_remote_get_channel(uint8_t *primary, wifi_second_chan_t *second);
esp_err_t esp_wifi_remote_set_country(const wifi_country_t *country);
esp_err_t esp_wifi_remote_get_country(wifi_country_t *country);
esp_err_t esp_wifi_remote_set_mac(wifi_interface_t ifx, const uint8_t mac[6]);
esp_err_t esp_wifi_remote_get_mac(wifi_interface_t ifx, uint8_t mac[6]);
esp_err_t esp_wifi_remote_set_promiscuous_rx_cb(wifi_promiscuous_cb_t cb);
esp_err_t esp_wifi_remote_set_promiscuous(_Bool en);
esp_err_t esp_wifi_remote_get_promiscuous(_Bool *en);
esp_err_t esp_wifi_remote_set_promiscuous_filter(const wifi_promiscuous_filter_t *filter);
esp_err_t esp_wifi_remote_get_promiscuous_filter(wifi_promiscuous_filter_t *filter);
esp_err_t esp_wifi_remote_set_promiscuous_ctrl_filter(const wifi_promiscuous_filter_t *filter);
esp_err_t esp_wifi_remote_get_promiscuous_ctrl_filter(wifi_promiscuous_filter_t *filter);
esp_err_t esp_wifi_remote_set_config(wifi_interface_t interface, wifi_config_t *conf);
esp_err_t esp_wifi_remote_get_config(wifi_interface_t interface, wifi_config_t *conf);
esp_err_t esp_wifi_remote_ap_get_sta_list(wifi_sta_list_t *sta);
esp_err_t esp_wifi_remote_ap_get_sta_aid(const uint8_t mac[6], uint16_t *aid);
esp_err_t esp_wifi_remote_set_storage(wifi_storage_t storage);
esp_err_t esp_wifi_remote_set_vendor_ie(_Bool enable, wifi_vendor_ie_type_t type, wifi_vendor_ie_id_t idx, const void *vnd_ie);
esp_err_t esp_wifi_remote_set_vendor_ie_cb(esp_vendor_ie_cb_t cb, void *ctx);
esp_err_t esp_wifi_remote_set_max_tx_power(int8_t power);
esp_err_t esp_wifi_remote_get_max_tx_power(int8_t *power);
esp_err_t esp_wifi_remote_set_event_mask(uint32_t mask);
esp_err_t esp_wifi_remote_get_event_mask(uint32_t *mask);
esp_err_t esp_wifi_remote_80211_tx(wifi_interface_t ifx, const void *buffer, int len, _Bool en_sys_seq);
esp_err_t esp_wifi_remote_set_csi_rx_cb(wifi_csi_cb_t cb, void *ctx);
esp_err_t esp_wifi_remote_set_csi_config(const wifi_csi_config_t *config);
esp_err_t esp_wifi_remote_get_csi_config(wifi_csi_config_t *config);
esp_err_t esp_wifi_remote_set_csi(_Bool en);
int64_t esp_wifi_remote_get_tsf_time(wifi_interface_t interface);
esp_err_t esp_wifi_remote_set_inactive_time(wifi_interface_t ifx, uint16_t sec);
esp_err_t esp_wifi_remote_get_inactive_time(wifi_interface_t ifx, uint16_t *sec);
esp_err_t esp_wifi_remote_statis_dump(uint32_t modules);
esp_err_t esp_wifi_remote_set_rssi_threshold(int32_t rssi);
esp_err_t esp_wifi_remote_ftm_initiate_session(wifi_ftm_initiator_cfg_t *cfg);
esp_err_t esp_wifi_remote_ftm_end_session(void);
esp_err_t esp_wifi_remote_ftm_resp_set_offset(int16_t offset_cm);
esp_err_t esp_wifi_remote_ftm_get_report(wifi_ftm_report_entry_t *report, uint8_t num_entries);
esp_err_t esp_wifi_remote_config_11b_rate(wifi_interface_t ifx, _Bool disable);
esp_err_t esp_wifi_remote_connectionless_module_set_wake_interval(uint16_t wake_interval);
esp_err_t esp_wifi_remote_force_wakeup_acquire(void);
esp_err_t esp_wifi_remote_force_wakeup_release(void);
esp_err_t esp_wifi_remote_set_country_code(const char *country, _Bool ieee80211d_enabled);
esp_err_t esp_wifi_remote_get_country_code(char *country);
esp_err_t esp_wifi_remote_config_80211_tx_rate(wifi_interface_t ifx, wifi_phy_rate_t rate);
esp_err_t esp_wifi_remote_config_80211_tx(wifi_interface_t ifx, wifi_tx_rate_config_t *config);
esp_err_t esp_wifi_remote_disable_pmf_config(wifi_interface_t ifx);
esp_err_t esp_wifi_remote_sta_get_aid(uint16_t *aid);
esp_err_t esp_wifi_remote_sta_get_negotiated_phymode(wifi_phy_mode_t *phymode);
esp_err_t esp_wifi_remote_set_dynamic_cs(_Bool enabled);
esp_err_t esp_wifi_remote_sta_get_rssi(int *rssi);

View File

@@ -0,0 +1,324 @@
/*
* SPDX-FileCopyrightText: 2017-2023 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef __ESP_MESH_INTERNAL_H__
#define __ESP_MESH_INTERNAL_H__
#include "esp_err.h"
#include "esp_mesh.h"
#include "esp_wifi.h"
#include "esp_wifi_types.h"
#include "esp_private/wifi.h"
#include "esp_wifi_crypto_types.h"
#ifdef __cplusplus
extern "C" {
#endif
/*******************************************************
* Constants
*******************************************************/
/*******************************************************
* Structures
*******************************************************/
/**
* @brief Mesh attempts
*/
typedef struct {
int scan; /**< minimum scan times before being a root, default:10 */
int vote; /**< max vote times in self-healing, default:1000 */
int fail; /**< parent selection fail times, if the scan times reach this value,
device will disconnect with associated children and join self-healing. default:60 */
int monitor_ie; /**< acceptable times of parent networking IE change before update its own networking IE. default:3 */
} mesh_attempts_t;
/**
* @brief Mesh switch parent
*/
typedef struct {
int duration_ms; /**< parent weak RSSI monitor duration, if the RSSI continues to be weak during this duration_ms,
device will search for a new parent. */
int cnx_rssi; /**< RSSI threshold for keeping a good connection with parent.
If set a value greater than -120 dBm, a timer will be armed to monitor parent RSSI at a period time of duration_ms. */
int select_rssi; /**< RSSI threshold for parent selection. It should be a value greater than switch_rssi. */
int switch_rssi; /**< Disassociate with current parent and switch to a new parent when the RSSI is greater than this set threshold. */
int backoff_rssi; /**< RSSI threshold for connecting to the root */
} mesh_switch_parent_t;
/**
* @brief Mesh RSSI threshold
*/
typedef struct {
int high; /**< high RSSI threshold, used to determine whether the new parent and the current parent are in the same RSSI range */
int medium; /**< medium RSSI threshold, used to determine whether the new parent and the current parent are in the same RSSI range */
int low; /**< low RSSI threshold. If the parent's RSSI is lower than low for a period time of duration_ms,
then the mesh node will post MESH_WEAK_RSSI event.
Also used to determine whether the new parent and the current parent are in the same RSSI range */
} mesh_rssi_threshold_t;
/**
* @brief Mesh networking IE
*/
typedef struct {
/**< mesh networking IE head */
uint8_t eid; /**< element ID, vendor specific, 221 */
uint8_t len; /**< element length, the length after this member */
uint8_t oui[3]; /**< organization identifier, 0x18fe34 */
uint8_t type; /**< ESP defined IE type, include Assoc IE, SSID IE, Ext Assoc IE, Roots IE, etc. */
uint8_t encrypted : 1; /**< whether mesh networking IE is encrypted */
uint8_t version : 7; /**< mesh networking IE version, equal to 2 if mesh PS is enabled, equal to 1 otherwise */
/**< content */
uint8_t mesh_type; /**< mesh device type, include idle, root, node, etc, refer to mesh_type_t */
uint8_t mesh_id[6]; /**< mesh ID, only the same mesh id can form a unified mesh network */
uint8_t layer_cap; /**< layer_cap = max_layer - layer, indicates the number of remaining available layers of the mesh network */
uint8_t layer; /**< the current layer of this node */
uint8_t assoc_cap; /**< the maximum connections of this mesh AP */
uint8_t assoc; /**< current connections of this mesh AP */
uint8_t leaf_cap; /**< the maximum number of leaves in the mesh network */
uint8_t leaf_assoc; /**< the number of current connected leaves */
uint16_t root_cap; /**< the capacity of the root, equal to the total child numbers plus 1, root node updates root_cap and self_cap */
uint16_t self_cap; /**< the capacity of myself, total child numbers plus 1, all nodes update this member */
uint16_t layer2_cap; /**< the capacity of layer2 node, total child numbers plus 1, layer2 node updates layer2_cap and self_cap, root sets this to 0 */
uint16_t scan_ap_num; /**< the number of mesh APs around */
int8_t rssi; /**< RSSI of the connected parent, default value is -120, root node will not update this */
int8_t router_rssi; /**< RSSI of the router, default value is -120 */
uint8_t flag; /**< flag of networking, indicates the status of the network, refer to MESH_ASSOC_FLAG_XXX */
/**< vote related */
uint8_t rc_addr[6]; /**< the address of the root candidate, i.e. the voted addesss before connection, root node will update this with self address */
int8_t rc_rssi; /**< the router RSSI of the root candidate */
uint8_t vote_addr[6]; /**< the voted address after connection */
int8_t vote_rssi; /**< the router RSSI of the voted address */
uint8_t vote_ttl; /**< vote ttl, indicate the voting is from myself or from other nodes */
uint16_t votes; /**< the number of all voting nodes */
uint16_t my_votes; /**< the number of nodes that voted for me */
uint8_t reason; /**< the reason why the voting happens, root initiated or child initiated, refer to mesh_vote_reason_t */
uint8_t child[6]; /**< child address, not used currently */
uint8_t toDS; /**< state represents whether the root is able to access external IP network */
} __attribute__((packed)) mesh_assoc_t;
/**
* @brief Mesh chain layer
*/
typedef struct {
uint16_t layer_cap; /**< max layer of the network */
uint16_t layer; /**< current layer of this node */
} mesh_chain_layer_t;
/**
* @brief Mesh chain assoc
*/
typedef struct {
mesh_assoc_t tree; /**< tree top, mesh_assoc IE */
mesh_chain_layer_t chain; /**< chain top, mesh_assoc IE */
} __attribute__((packed)) mesh_chain_assoc_t;
/* mesh max connections */
#define MESH_MAX_CONNECTIONS (10)
/**
* @brief Mesh power save duties
*/
typedef struct {
uint8_t device; /**< device power save duty*/
uint8_t parent; /**< parent power save duty*/
struct {
bool used; /**< whether the child is joined */
uint8_t duty; /**< power save duty of the child */
uint8_t mac[6]; /**< mac address of the child */
} child[MESH_MAX_CONNECTIONS]; /**< child */
} esp_mesh_ps_duties_t;
/*******************************************************
* Function Definitions
*******************************************************/
/**
* @brief Set mesh softAP beacon interval
*
* @param[in] interval_ms beacon interval (msecs) (100 msecs ~ 60000 msecs)
*
* @return
* - ESP_OK
* - ESP_FAIL
* - ESP_ERR_INVALID_ARG
*/
esp_err_t esp_mesh_set_beacon_interval(int interval_ms);
/**
* @brief Get mesh softAP beacon interval
*
* @param[out] interval_ms beacon interval (msecs)
*
* @return
* - ESP_OK
*/
esp_err_t esp_mesh_get_beacon_interval(int *interval_ms);
/**
* @brief Set attempts for mesh self-organized networking
*
* @param[in] attempts
*
* @return
* - ESP_OK
* - ESP_FAIL
*/
esp_err_t esp_mesh_set_attempts(mesh_attempts_t *attempts);
/**
* @brief Get attempts for mesh self-organized networking
*
* @param[out] attempts
*
* @return
* - ESP_OK
* - ESP_ERR_MESH_ARGUMENT
*/
esp_err_t esp_mesh_get_attempts(mesh_attempts_t *attempts);
/**
* @brief Set parameters for parent switch
*
* @param[in] paras parameters for parent switch
*
* @return
* - ESP_OK
* - ESP_ERR_MESH_ARGUMENT
*/
esp_err_t esp_mesh_set_switch_parent_paras(mesh_switch_parent_t *paras);
/**
* @brief Get parameters for parent switch
*
* @param[out] paras parameters for parent switch
*
* @return
* - ESP_OK
* - ESP_ERR_MESH_ARGUMENT
*/
esp_err_t esp_mesh_get_switch_parent_paras(mesh_switch_parent_t *paras);
/**
* @brief Set RSSI threshold of current parent
* - The default high RSSI threshold value is -78 dBm.
* - The default medium RSSI threshold value is -82 dBm.
* - The default low RSSI threshold value is -85 dBm.
*
* @param[in] threshold RSSI threshold
*
* @return
* - ESP_OK
* - ESP_ERR_MESH_ARGUMENT
*/
esp_err_t esp_mesh_set_rssi_threshold(const mesh_rssi_threshold_t *threshold);
/**
* @brief Get RSSI threshold of current parent
*
* @param[out] threshold RSSI threshold
*
* @return
* - ESP_OK
* - ESP_ERR_MESH_ARGUMENT
*/
esp_err_t esp_mesh_get_rssi_threshold(mesh_rssi_threshold_t *threshold);
/**
* @brief Enable the minimum rate to 6 Mbps
*
* @attention This API shall be called before Wi-Fi is started.
*
* @param[in] is_6m enable or not
*
* @return
* - ESP_OK
*/
esp_err_t esp_mesh_set_6m_rate(bool is_6m);
/**
* @brief Print the number of txQ waiting
*
* @return
* - ESP_OK
* - ESP_FAIL
*/
esp_err_t esp_mesh_print_txQ_waiting(void);
/**
* @brief Print the number of rxQ waiting
*
* @return
* - ESP_OK
* - ESP_FAIL
*/
esp_err_t esp_mesh_print_rxQ_waiting(void);
/**
* @brief Set passive scan time
*
* @param[in] time_ms passive scan time (msecs)
*
* @return
* - ESP_OK
* - ESP_FAIL
* - ESP_ERR_ARGUMENT
*/
esp_err_t esp_mesh_set_passive_scan_time(int time_ms);
/**
* @brief Get passive scan time
*
* @return interval_ms passive scan time (msecs)
*/
int esp_mesh_get_passive_scan_time(void);
/**
* @brief Set announce interval
* - The default short interval is 500 milliseconds.
* - The default long interval is 3000 milliseconds.
*
* @param[in] short_ms shall be greater than the default value
* @param[in] long_ms shall be greater than the default value
*
* @return
* - ESP_OK
*/
esp_err_t esp_mesh_set_announce_interval(int short_ms, int long_ms);
/**
* @brief Get announce interval
*
* @param[out] short_ms short interval
* @param[out] long_ms long interval
*
* @return
* - ESP_OK
*/
esp_err_t esp_mesh_get_announce_interval(int *short_ms, int *long_ms);
/**
* @brief Get the running duties of device, parent and children
*
* @param[out] ps_duties ps duties
*
* @return
* - ESP_OK
*/
esp_err_t esp_mesh_ps_get_duties(esp_mesh_ps_duties_t* ps_duties);
/**
* @brief Enable mesh print scan result
*
* @param[in] enable enable or not
*
* @return
* - ESP_OK
*/
esp_err_t esp_mesh_print_scan_result(bool enable);
#ifdef __cplusplus
}
#endif
#endif /* __ESP_MESH_INTERNAL_H__ */

View File

@@ -0,0 +1,380 @@
/*
* SPDX-FileCopyrightText: 2019-2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef __ESP_NOW_H__
#define __ESP_NOW_H__
#include <stdbool.h>
#include "esp_err.h"
#include "esp_wifi_types.h"
#ifdef __cplusplus
extern "C" {
#endif
/** \defgroup WiFi_APIs WiFi Related APIs
* @brief WiFi APIs
*/
/** @addtogroup WiFi_APIs
* @{
*/
/** \defgroup ESPNOW_APIs ESPNOW APIs
* @brief ESP32 ESPNOW APIs
*
*/
/** @addtogroup ESPNOW_APIs
* @{
*/
#define ESP_ERR_ESPNOW_BASE (ESP_ERR_WIFI_BASE + 100) /*!< ESPNOW error number base. */
#define ESP_ERR_ESPNOW_NOT_INIT (ESP_ERR_ESPNOW_BASE + 1) /*!< ESPNOW is not initialized. */
#define ESP_ERR_ESPNOW_ARG (ESP_ERR_ESPNOW_BASE + 2) /*!< Invalid argument */
#define ESP_ERR_ESPNOW_NO_MEM (ESP_ERR_ESPNOW_BASE + 3) /*!< Out of memory */
#define ESP_ERR_ESPNOW_FULL (ESP_ERR_ESPNOW_BASE + 4) /*!< ESPNOW peer list is full */
#define ESP_ERR_ESPNOW_NOT_FOUND (ESP_ERR_ESPNOW_BASE + 5) /*!< ESPNOW peer is not found */
#define ESP_ERR_ESPNOW_INTERNAL (ESP_ERR_ESPNOW_BASE + 6) /*!< Internal error */
#define ESP_ERR_ESPNOW_EXIST (ESP_ERR_ESPNOW_BASE + 7) /*!< ESPNOW peer has existed */
#define ESP_ERR_ESPNOW_IF (ESP_ERR_ESPNOW_BASE + 8) /*!< Interface error */
#define ESP_ERR_ESPNOW_CHAN (ESP_ERR_ESPNOW_BASE + 9) /*!< Channel error */
#define ESP_NOW_ETH_ALEN 6 /*!< Length of ESPNOW peer MAC address */
#define ESP_NOW_KEY_LEN 16 /*!< Length of ESPNOW peer local master key */
#define ESP_NOW_MAX_TOTAL_PEER_NUM 20 /*!< Maximum number of ESPNOW total peers */
#define ESP_NOW_MAX_ENCRYPT_PEER_NUM 6 /*!< Maximum number of ESPNOW encrypted peers */
#define ESP_NOW_MAX_IE_DATA_LEN 250 /**< Maximum data length in a vendor-specific element */
#define ESP_NOW_MAX_DATA_LEN ESP_NOW_MAX_IE_DATA_LEN /**< Maximum length of data sent in each ESPNOW transmission for v1.0 */
/**
* @brief Status of sending ESPNOW data .
*/
typedef enum {
ESP_NOW_SEND_SUCCESS = 0, /**< Send ESPNOW data successfully */
ESP_NOW_SEND_FAIL, /**< Send ESPNOW data fail */
} esp_now_send_status_t;
/**
* @brief ESPNOW peer information parameters.
*/
typedef struct esp_now_peer_info {
uint8_t peer_addr[ESP_NOW_ETH_ALEN]; /**< ESPNOW peer MAC address that is also the MAC address of station or softap */
uint8_t lmk[ESP_NOW_KEY_LEN]; /**< ESPNOW peer local master key that is used to encrypt data */
uint8_t channel; /**< Wi-Fi channel that peer uses to send/receive ESPNOW data. If the value is 0,
use the current channel which station or softap is on. Otherwise, it must be
set as the channel that station or softap is on. */
wifi_interface_t ifidx; /**< Wi-Fi interface that peer uses to send/receive ESPNOW data */
bool encrypt; /**< ESPNOW data that this peer sends/receives is encrypted or not */
void *priv; /**< ESPNOW peer private data */
} esp_now_peer_info_t;
/**
* @brief Number of ESPNOW peers which exist currently.
*/
typedef struct esp_now_peer_num {
int total_num; /**< Total number of ESPNOW peers, maximum value is ESP_NOW_MAX_TOTAL_PEER_NUM */
int encrypt_num; /**< Number of encrypted ESPNOW peers, maximum value is ESP_NOW_MAX_ENCRYPT_PEER_NUM */
} esp_now_peer_num_t;
/**
* @brief ESPNOW packet information
*/
typedef struct esp_now_recv_info {
uint8_t * src_addr; /**< Source address of ESPNOW packet */
uint8_t * des_addr; /**< Destination address of ESPNOW packet */
wifi_pkt_rx_ctrl_t * rx_ctrl; /**< Rx control info of ESPNOW packet */
} esp_now_recv_info_t;
/**
* @brief ESPNOW rate config
*/
typedef wifi_tx_rate_config_t esp_now_rate_config_t;
/**
* @brief Callback function of receiving ESPNOW data
* @param esp_now_info received ESPNOW packet information
* @param data received data
* @param data_len length of received data
* @attention esp_now_info is a local variableit can only be used in the callback.
*/
typedef void (*esp_now_recv_cb_t)(const esp_now_recv_info_t * esp_now_info, const uint8_t *data, int data_len);
/**
* @brief Callback function of sending ESPNOW data
* @param mac_addr peer MAC address
* @param status status of sending ESPNOW data (succeed or fail)
*/
typedef void (*esp_now_send_cb_t)(const uint8_t *mac_addr, esp_now_send_status_t status);
/**
* @brief Initialize ESPNOW function
*
* @return
* - ESP_OK : succeed
* - ESP_ERR_ESPNOW_INTERNAL : Internal error
*/
esp_err_t esp_now_init(void);
/**
* @brief De-initialize ESPNOW function
*
* @return
* - ESP_OK : succeed
*/
esp_err_t esp_now_deinit(void);
/**
* @brief Get the version of ESPNOW. Currently, ESPNOW supports one version: v1.0.
*
* The v1.0 devices can receive packets if the packet length is less than or equal to ESP_NOW_MAX_IE_DATA_LEN.
* For packets exceeding this length, the v1.0 devices will discard the packet entirely.
*
* @param version ESPNOW version
*
* @return
* - ESP_OK : succeed
* - ESP_ERR_ESPNOW_ARG : invalid argument
*/
esp_err_t esp_now_get_version(uint32_t *version);
/**
* @brief Register callback function of receiving ESPNOW data
*
* @param cb callback function of receiving ESPNOW data
*
* @return
* - ESP_OK : succeed
* - ESP_ERR_ESPNOW_NOT_INIT : ESPNOW is not initialized
* - ESP_ERR_ESPNOW_INTERNAL : internal error
*/
esp_err_t esp_now_register_recv_cb(esp_now_recv_cb_t cb);
/**
* @brief Unregister callback function of receiving ESPNOW data
*
* @return
* - ESP_OK : succeed
* - ESP_ERR_ESPNOW_NOT_INIT : ESPNOW is not initialized
*/
esp_err_t esp_now_unregister_recv_cb(void);
/**
* @brief Register callback function of sending ESPNOW data
*
* @param cb callback function of sending ESPNOW data
*
* @return
* - ESP_OK : succeed
* - ESP_ERR_ESPNOW_NOT_INIT : ESPNOW is not initialized
* - ESP_ERR_ESPNOW_INTERNAL : internal error
*/
esp_err_t esp_now_register_send_cb(esp_now_send_cb_t cb);
/**
* @brief Unregister callback function of sending ESPNOW data
*
* @return
* - ESP_OK : succeed
* - ESP_ERR_ESPNOW_NOT_INIT : ESPNOW is not initialized
*/
esp_err_t esp_now_unregister_send_cb(void);
/**
* @brief Send ESPNOW data
*
* @attention 1. If peer_addr is not NULL, send data to the peer whose MAC address matches peer_addr
* @attention 2. If peer_addr is NULL, send data to all of the peers that are added to the peer list
* @attention 3. The maximum length of data must be less than ESP_NOW_MAX_DATA_LEN
* @attention 4. The buffer pointed to by data argument does not need to be valid after esp_now_send returns
*
* @param peer_addr peer MAC address
* @param data data to send
* @param len length of data
*
* @return
* - ESP_OK : succeed
* - ESP_ERR_ESPNOW_NOT_INIT : ESPNOW is not initialized
* - ESP_ERR_ESPNOW_ARG : invalid argument
* - ESP_ERR_ESPNOW_INTERNAL : internal error
* - ESP_ERR_ESPNOW_NO_MEM : out of memory, when this happens, you can delay a while before sending the next data
* - ESP_ERR_ESPNOW_NOT_FOUND : peer is not found
* - ESP_ERR_ESPNOW_IF : current Wi-Fi interface doesn't match that of peer
* - ESP_ERR_ESPNOW_CHAN: current Wi-Fi channel doesn't match that of peer
*/
esp_err_t esp_now_send(const uint8_t *peer_addr, const uint8_t *data, size_t len);
/**
* @brief Add a peer to peer list
*
* @param peer peer information
*
* @return
* - ESP_OK : succeed
* - ESP_ERR_ESPNOW_NOT_INIT : ESPNOW is not initialized
* - ESP_ERR_ESPNOW_ARG : invalid argument
* - ESP_ERR_ESPNOW_FULL : peer list is full
* - ESP_ERR_ESPNOW_NO_MEM : out of memory
* - ESP_ERR_ESPNOW_EXIST : peer has existed
*/
esp_err_t esp_now_add_peer(const esp_now_peer_info_t *peer);
/**
* @brief Delete a peer from peer list
*
* @param peer_addr peer MAC address
*
* @return
* - ESP_OK : succeed
* - ESP_ERR_ESPNOW_NOT_INIT : ESPNOW is not initialized
* - ESP_ERR_ESPNOW_ARG : invalid argument
* - ESP_ERR_ESPNOW_NOT_FOUND : peer is not found
*/
esp_err_t esp_now_del_peer(const uint8_t *peer_addr);
/**
* @brief Modify a peer
*
* @param peer peer information
*
* @return
* - ESP_OK : succeed
* - ESP_ERR_ESPNOW_NOT_INIT : ESPNOW is not initialized
* - ESP_ERR_ESPNOW_ARG : invalid argument
* - ESP_ERR_ESPNOW_FULL : peer list is full
*/
esp_err_t esp_now_mod_peer(const esp_now_peer_info_t *peer);
/**
* @brief Config ESPNOW rate of specified interface
*
* @deprecated please use esp_now_set_peer_rate_config() instead.
*
* @attention 1. This API should be called after esp_wifi_start().
* @attention 2. This API only work when not use Wi-Fi 6 and esp_now_set_peer_rate_config() not called.
*
* @param ifx Interface to be configured.
* @param rate Phy rate to be configured.
*
* @return
* - ESP_OK: succeed
* - others: failed
*/
esp_err_t esp_wifi_config_espnow_rate(wifi_interface_t ifx, wifi_phy_rate_t rate)
__attribute__((deprecated("This API can be only used when rate is non-HE rate, \
please use esp_now_set_peer_rate_config if you want full support of the rate.")));
/**
* @brief Set ESPNOW rate config for each peer
*
* @attention 1. This API should be called after esp_wifi_start() and esp_now_init().
*
* @param peer_addr peer MAC address
* @param config rate config to be configured.
*
* @return
* - ESP_OK : succeed
* - ESP_ERR_ESPNOW_NOT_INIT : ESPNOW is not initialized
* - ESP_ERR_ESPNOW_ARG : invalid argument
* - ESP_ERR_ESPNOW_INTERNAL : internal error
*/
esp_err_t esp_now_set_peer_rate_config(const uint8_t *peer_addr, esp_now_rate_config_t *config);
/**
* @brief Get a peer whose MAC address matches peer_addr from peer list
*
* @param peer_addr peer MAC address
* @param peer peer information
*
* @return
* - ESP_OK : succeed
* - ESP_ERR_ESPNOW_NOT_INIT : ESPNOW is not initialized
* - ESP_ERR_ESPNOW_ARG : invalid argument
* - ESP_ERR_ESPNOW_NOT_FOUND : peer is not found
*/
esp_err_t esp_now_get_peer(const uint8_t *peer_addr, esp_now_peer_info_t *peer);
/**
* @brief Fetch a peer from peer list. Only return the peer which address is unicast, for the multicast/broadcast address, the function will ignore and try to find the next in the peer list.
*
* @param from_head fetch from head of list or not
* @param peer peer information
*
* @return
* - ESP_OK : succeed
* - ESP_ERR_ESPNOW_NOT_INIT : ESPNOW is not initialized
* - ESP_ERR_ESPNOW_ARG : invalid argument
* - ESP_ERR_ESPNOW_NOT_FOUND : peer is not found
*/
esp_err_t esp_now_fetch_peer(bool from_head, esp_now_peer_info_t *peer);
/**
* @brief Peer exists or not
*
* @param peer_addr peer MAC address
*
* @return
* - true : peer exists
* - false : peer not exists
*/
bool esp_now_is_peer_exist(const uint8_t *peer_addr);
/**
* @brief Get the number of peers
*
* @param num number of peers
*
* @return
* - ESP_OK : succeed
* - ESP_ERR_ESPNOW_NOT_INIT : ESPNOW is not initialized
* - ESP_ERR_ESPNOW_ARG : invalid argument
*/
esp_err_t esp_now_get_peer_num(esp_now_peer_num_t *num);
/**
* @brief Set the primary master key
*
* @param pmk primary master key
*
* @attention 1. primary master key is used to encrypt local master key
*
* @return
* - ESP_OK : succeed
* - ESP_ERR_ESPNOW_NOT_INIT : ESPNOW is not initialized
* - ESP_ERR_ESPNOW_ARG : invalid argument
*/
esp_err_t esp_now_set_pmk(const uint8_t *pmk);
/**
* @brief Set wake window for esp_now to wake up in interval unit
*
* @param window Milliseconds would the chip keep waked each interval, from 0 to 65535.
*
* @attention 1. This configuration could work at connected status.
* When ESP_WIFI_STA_DISCONNECTED_PM_ENABLE is enabled, this configuration could work at disconnected status.
* @attention 2. Default value is the maximum.
*
* @return
* - ESP_OK : succeed
* - ESP_ERR_ESPNOW_NOT_INIT : ESPNOW is not initialized
*/
esp_err_t esp_now_set_wake_window(uint16_t window);
/**
* @}
*/
/**
* @}
*/
#ifdef __cplusplus
}
#endif
#endif /* __ESP_NOW_H__ */

View File

@@ -0,0 +1,55 @@
/*
* SPDX-FileCopyrightText: 2019-2023 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#pragma once
#include "esp_netif_types.h"
#include "esp_wifi_types.h"
#ifdef __cplusplus
extern "C" {
#endif
#ifndef ESP_WIFI_MAX_CONN_NUM
// Number of maximum wifi connection may be undefined if we have no native wifi support on this target
// and at the same time there's no native interface injected by the wifi_remote component.
// In this case, we just let the header compilable, since no wifi API could be used (let's make a sanity check)
#if !CONFIG_SOC_WIFI_SUPPORTED && !CONFIG_ESP_WIFI_REMOTE_ENABLED && !CONFIG_ESP_HOST_WIFI_ENABLED
#define ESP_WIFI_MAX_CONN_NUM (15)
typedef struct wifi_sta_list_t wifi_sta_list_t;
#else
#error WiFi header mismatch! Please make sure you use the correct version of WiFi API
#endif
#endif // ESP_WIFI_MAX_CONN_NUM
/**
* @brief station list structure
*/
typedef struct {
int num; /**< Number of connected stations */
esp_netif_pair_mac_ip_t sta[ESP_WIFI_MAX_CONN_NUM]; /**< Connected stations */
} wifi_sta_mac_ip_list_t;
/**
* @brief Get IP information for stations connected to the Wi-Fi AP interface
*
* @note If `CONFIG_LWIP_DHCPS` is disabled then `ip` address field will not be populated in sta list
*
* @warning This API works only for the default Wi-Fi AP interface, i.e. esp-netif with key="WIFI_AP_DEF"
*
* @param[in] wifi_sta_list Wi-Fi station info list, returned from esp_wifi_ap_get_sta_list()
* @param[out] wifi_sta_ip_mac_list IP layer station info list, corresponding to MAC addresses provided in wifi_sta_list
*
* @return
* - ESP_OK
* - ESP_ERR_ESP_NETIF_NO_MEM
* - ESP_ERR_ESP_NETIF_INVALID_PARAMS
*/
esp_err_t esp_wifi_ap_get_sta_list_with_ip(const wifi_sta_list_t *wifi_sta_list, wifi_sta_mac_ip_list_t *wifi_sta_ip_mac_list);
#ifdef __cplusplus
}
#endif

View File

@@ -0,0 +1,440 @@
/*
* SPDX-FileCopyrightText: 2017-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef __ESP_WIFI_CRYPTO_TYPES_H__
#define __ESP_WIFI_CRYPTO_TYPES_H__
/* This is an internal API header for configuring the implementation used for WiFi cryptographic
operations.
During normal operation, you don't need to use any of these types or functions in this header.
See esp_wifi.h & esp_wifi_types.h instead.
*/
#include <stdint.h>
#include <stddef.h>
#include <stdbool.h>
#ifdef __cplusplus
extern "C" {
#endif
#define ESP_WIFI_CRYPTO_VERSION 0x00000001
/*
* Enumeration for hash operations.
* When WPA2 is connecting, this enum is used to
* request a hash algorithm via crypto_hash_xxx functions.
*/
typedef enum {
ESP_CRYPTO_HASH_ALG_MD5, ESP_CRYPTO_HASH_ALG_SHA1,
ESP_CRYPTO_HASH_ALG_HMAC_MD5, ESP_CRYPTO_HASH_ALG_HMAC_SHA1,
ESP_CRYPTO_HASH_ALG_SHA256, ESP_CRYPTO_HASH_ALG_HMAC_SHA256
} esp_crypto_hash_alg_t;
/*
* Enumeration for block cipher operations.
* When WPA2 is connecting, this enum is used to request a block
* cipher algorithm via crypto_cipher_xxx functions.
*/
typedef enum {
ESP_CRYPTO_CIPHER_NULL, ESP_CRYPTO_CIPHER_ALG_AES, ESP_CRYPTO_CIPHER_ALG_3DES,
ESP_CRYPTO_CIPHER_ALG_DES, ESP_CRYPTO_CIPHER_ALG_RC2, ESP_CRYPTO_CIPHER_ALG_RC4
} esp_crypto_cipher_alg_t;
/*
* This structure is about the algorithm when do crypto_hash operation, for detail,
* please reference to the structure crypto_hash.
*/
typedef struct crypto_hash esp_crypto_hash_t;
/*
* This structure is about the algorithm when do crypto_cipher operation, for detail,
* please reference to the structure crypto_cipher.
*/
typedef struct crypto_cipher esp_crypto_cipher_t;
/**
* @brief The AES 128 encrypt callback function used by esp_wifi.
*
* @param key Encryption key.
* @param iv Encryption IV for CBC mode (16 bytes).
* @param data Data to encrypt in-place.
* @param data_len Length of data in bytes (must be divisible by 16)
*/
typedef int (*esp_aes_128_encrypt_t)(const unsigned char *key, const unsigned char *iv, unsigned char *data, int data_len);
/**
* @brief The AES 128 decrypt callback function used by esp_wifi.
*
* @param key Decryption key.
* @param iv Decryption IV for CBC mode (16 bytes).
* @param data Data to decrypt in-place.
* @param data_len Length of data in bytes (must be divisible by 16)
*
*/
typedef int (*esp_aes_128_decrypt_t)(const unsigned char *key, const unsigned char *iv, unsigned char *data, int data_len);
/**
* @brief The AES wrap callback function used by esp_wifi.
*
* @param kek 16-octet Key encryption key (KEK).
* @param n Length of the plaintext key in 64-bit units;
* @param plain Plaintext key to be wrapped, n * 64 bits
* @param cipher Wrapped key, (n + 1) * 64 bits
*
*/
typedef int (*esp_aes_wrap_t)(const unsigned char *kek, int n, const unsigned char *plain, unsigned char *cipher);
/**
* @brief The AES unwrap callback function used by esp_wifi.
*
* @param kek 16-octet Key decryption key (KEK).
* @param n Length of the plaintext key in 64-bit units;
* @param cipher Wrapped key to be unwrapped, (n + 1) * 64 bits
* @param plain Plaintext key, n * 64 bits
*
*/
typedef int (*esp_aes_unwrap_t)(const unsigned char *kek, int n, const unsigned char *cipher, unsigned char *plain);
/**
* @brief The SHA256 callback function used by esp_wifi.
*
* @param key Key for HMAC operations.
* @param key_len Length of the key in bytes.
* @param num_elem Number of elements in the data vector.
* @param addr Pointers to the data areas.
* @param len Lengths of the data blocks.
* @param mac Buffer for the hash (32 bytes).
*
*/
typedef int (*esp_hmac_sha256_vector_t)(const unsigned char *key, int key_len, int num_elem,
const unsigned char *addr[], const int *len, unsigned char *mac);
/**
* @brief The SHA256 PRF callback function used by esp_wifi.
*
* @param key Key for PRF.
* @param key_len Length of the key in bytes.
* @param label A unique label for each purpose of the PRF.
* @param data Extra data to bind into the key.
* @param data_len Length of the data.
* @param buf Buffer for the generated pseudo-random key.
* @param buf_len Number of bytes of key to generate.
*
*/
typedef int (*esp_sha256_prf_t)(const unsigned char *key, int key_len, const char *label,
const unsigned char *data, int data_len, unsigned char *buf, int buf_len);
/**
* @brief HMAC-MD5 callback function over data buffer (RFC 2104)'
*
* @param key Key for HMAC operations
* @param key_len Length of the key in bytes
* @param data Pointers to the data area
* @param data_len Length of the data area
* @param mac Buffer for the hash (16 bytes)
* Returns: 0 on success, -1 on failure
*/
typedef int (*esp_hmac_md5_t)(const unsigned char *key, unsigned int key_len, const unsigned char *data,
unsigned int data_len, unsigned char *mac);
/**
* @brief HMAC-MD5 callback function over data vector (RFC 2104)
*
* @param key Key for HMAC operations
* @param key_len Length of the key in bytes
* @param num_elem Number of elements in the data vector
* @param addr Pointers to the data areas
* @param len Lengths of the data blocks
* @param mac Buffer for the hash (16 bytes)
* Returns: 0 on success, -1 on failure
*/
typedef int (*esp_hmac_md5_vector_t)(const unsigned char *key, unsigned int key_len, unsigned int num_elem,
const unsigned char *addr[], const unsigned int *len, unsigned char *mac);
/**
* @brief HMAC-SHA1 callback function over data buffer (RFC 2104)
*
* @param key Key for HMAC operations
* @param key_len Length of the key in bytes
* @param data Pointers to the data area
* @param data_len Length of the data area
* @param mac Buffer for the hash (20 bytes)
* Returns: 0 on success, -1 of failure
*/
typedef int (*esp_hmac_sha1_t)(const unsigned char *key, unsigned int key_len, const unsigned char *data,
unsigned int data_len, unsigned char *mac);
/**
* @brief HMAC-SHA1 callback function over data vector (RFC 2104)
*
* @param key Key for HMAC operations
* @param key_len Length of the key in bytes
* @param num_elem Number of elements in the data vector
* @param addr Pointers to the data areas
* @param len Lengths of the data blocks
* @param mac Buffer for the hash (20 bytes)
* Returns: 0 on success, -1 on failure
*/
typedef int (*esp_hmac_sha1_vector_t)(const unsigned char *key, unsigned int key_len, unsigned int num_elem,
const unsigned char *addr[], const unsigned int *len, unsigned char *mac);
/**
* @brief SHA1-based Pseudo-Random Function (PRF) (IEEE 802.11i, 8.5.1.1) callback function
*
* @param key Key for PRF
* @param key_len Length of the key in bytes
* @param label A unique label for each purpose of the PRF
* @param data Extra data to bind into the key
* @param data_len Length of the data
* @param buf Buffer for the generated pseudo-random key
* @param buf_len Number of bytes of key to generate
* Returns: 0 on success, -1 of failure
*
* This function is used to derive new, cryptographically separate keys from a
* given key (e.g., PMK in IEEE 802.11i).
*/
typedef int (*esp_sha1_prf_t)(const unsigned char *key, unsigned int key_len, const char *label,
const unsigned char *data, unsigned int data_len, unsigned char *buf, unsigned int buf_len);
/**
* @brief SHA-1 hash callback function for data vector
*
* @param num_elem Number of elements in the data vector
* @param addr Pointers to the data areas
* @param len Lengths of the data blocks
* @param mac Buffer for the hash
* Returns: 0 on success, -1 on failure
*/
typedef int (*esp_sha1_vector_t)(unsigned int num_elem, const unsigned char *addr[], const unsigned int *len,
unsigned char *mac);
/**
* @brief SHA1-based key derivation function (PBKDF2) callback function for IEEE 802.11i
*
* @param passphrase ASCII passphrase
* @param ssid SSID
* @param ssid_len SSID length in bytes
* @param iterations Number of iterations to run
* @param buf Buffer for the generated key
* @param buflen Length of the buffer in bytes
* Returns: 0 on success, -1 of failure
*
* This function is used to derive PSK for WPA-PSK. For this protocol,
* iterations is set to 4096 and buflen to 32. This function is described in
* IEEE Std 802.11-2004, Clause H.4. The main construction is from PKCS#5 v2.0.
*/
typedef int (*esp_pbkdf2_sha1_t)(const char *passphrase, const char *ssid, unsigned int ssid_len,
int iterations, unsigned char *buf, unsigned int buflen);
/**
* @brief XOR RC4 stream callback function to given data with skip-stream-start
*
* @param key RC4 key
* @param keylen RC4 key length
* @param skip number of bytes to skip from the beginning of the RC4 stream
* @param data data to be XOR'ed with RC4 stream
* @param data_len buf length
* Returns: 0 on success, -1 on failure
*
* Generate RC4 pseudo random stream for the given key, skip beginning of the
* stream, and XOR the end result with the data buffer to perform RC4
* encryption/decryption.
*/
typedef int (*esp_rc4_skip_t)(const unsigned char *key, unsigned int keylen, unsigned int skip,
unsigned char *data, unsigned int data_len);
/**
* @brief MD5 hash callback function for data vector
*
* @param num_elem Number of elements in the data vector
* @param addr Pointers to the data areas
* @param len Lengths of the data blocks
* @param mac Buffer for the hash
* Returns: 0 on success, -1 on failure
*/
typedef int (*esp_md5_vector_t)(unsigned int num_elem, const unsigned char *addr[], const unsigned int *len,
unsigned char *mac);
/**
* @brief Encrypt one AES block callback function
*
* @param ctx Context pointer from aes_encrypt_init()
* @param plain Plaintext data to be encrypted (16 bytes)
* @param crypt Buffer for the encrypted data (16 bytes)
*/
typedef void (*esp_aes_encrypt_t)(void *ctx, const unsigned char *plain, unsigned char *crypt);
/**
* @brief Initialize AES callback function for encryption
*
* @param key Encryption key
* @param len Key length in bytes (usually 16, i.e., 128 bits)
* Returns: Pointer to context data or %NULL on failure
*/
typedef void * (*esp_aes_encrypt_init_t)(const unsigned char *key, unsigned int len);
/**
* @brief Deinitialize AES encryption callback function
*
* @param ctx Context pointer from aes_encrypt_init()
*/
typedef void (*esp_aes_encrypt_deinit_t)(void *ctx);
/**
* @brief Decrypt one AES block callback function
*
* @param ctx Context pointer from aes_encrypt_init()
* @param crypt Encrypted data (16 bytes)
* @param plain Buffer for the decrypted data (16 bytes)
*/
typedef void (*esp_aes_decrypt_t)(void *ctx, const unsigned char *crypt, unsigned char *plain);
/**
* @brief Initialize AES callback function for decryption
*
* @param key Decryption key
* @param len Key length in bytes (usually 16, i.e., 128 bits)
* Returns: Pointer to context data or %NULL on failure
*/
typedef void * (*esp_aes_decrypt_init_t)(const unsigned char *key, unsigned int len);
/**
* @brief Deinitialize AES decryption callback function
*
* @param ctx Context pointer from aes_encrypt_init()
*/
typedef void (*esp_aes_decrypt_deinit_t)(void *ctx);
/**
* @brief One-Key CBC MAC (OMAC1) hash with AES-128 callback function for MIC computation
*
* @param key 128-bit key for the hash operation
* @param data Data buffer for which a MIC is computed
* @param data_len Length of data buffer in bytes
* @param mic Buffer for MIC (128 bits, i.e., 16 bytes)
* Returns: 0 on success, -1 on failure
*/
typedef int (*esp_omac1_aes_128_t)(const uint8_t *key, const uint8_t *data, size_t data_len,
uint8_t *mic);
/**
* @brief Decrypt data callback function using CCMP (Counter Mode CBC-MAC Protocol OR
* Counter Mode Cipher Block Chaining Message Authentication
* Code Protocol) which is used in IEEE 802.11i RSN standard.
* @param tk 128-bit Temporal Key for obtained during 4-way handshake
* @param ieee80211_hdr Pointer to IEEE802.11 frame headeri needed for AAD
* @param data Pointer to encrypted data buffer
* @param data_len Encrypted data length in bytes
* @param decrypted_len Length of decrypted data
* @param espnow_pkt Indicates if it's an ESPNOW packet
* Returns: Pointer to decrypted data on success, NULL on failure
*/
typedef uint8_t * (*esp_ccmp_decrypt_t)(const uint8_t *tk, const uint8_t *ieee80211_hdr,
const uint8_t *data, size_t data_len,
size_t *decrypted_len, bool espnow_pkt);
/**
* @brief Encrypt data callback function using CCMP (Counter Mode CBC-MAC Protocol OR
* Counter Mode Cipher Block Chaining Message Authentication
* Code Protocol) which is used in IEEE 802.11i RSN standard.
* @param tk 128-bit Temporal Key for obtained during 4-way handshake
* @param frame Pointer to IEEE802.11 frame including header
* @param len Length of the frame including header
* @param hdrlen Length of the header
* @param pn Packet Number counter
* @param keyid Key ID to be mentioned in CCMP Vector
* @param encrypted_len Length of the encrypted frame including header
*/
typedef uint8_t * (*esp_ccmp_encrypt_t)(const uint8_t *tk, uint8_t *frame, size_t len, size_t hdrlen,
uint8_t *pn, int keyid, size_t *encrypted_len);
/**
* @brief One-Key GMAC hash callback function with AES for MIC computation
*
* @param key key for the hash operation
* @param keylen key length
* @param iv initialization vector
* @param iv_len initialization vector length
* @param aad aad
* @param aad_len aad length
* @param mic Buffer for MIC (128 bits, i.e., 16 bytes)
* Returns: 0 on success, -1 on failure
*/
typedef int (*esp_aes_gmac_t)(const uint8_t *key, size_t keylen, const uint8_t *iv, size_t iv_len,
const uint8_t *aad, size_t aad_len, uint8_t *mic);
/**
* @brief SHA256 hash callback function for data vector
* @param num_elem Number of elements in the data vector
* @param addr Pointers to the data areas
* @param len Lengths of the data blocks
* @param buf Buffer for the hash
* Returns: 0 on success, -1 on failure
*/
typedef int (*esp_sha256_vector_t)(size_t num_elem, const uint8_t *addr[], const size_t *len, uint8_t *buf);
/**
* @brief CRC32 value callback function in little endian.
*
* @param crc Initial CRC value (result of last calculation or 0 for the first time)
* @param buf Data buffer that used to calculate the CRC value
* @param len Length of the data buffer
* @return CRC32 value
*/
typedef uint32_t (*esp_crc32_le_t)(uint32_t crc, uint8_t const *buf, uint32_t len);
/**
* @brief The crypto callback function structure used by esp_wifi.
* The structure can be set as software crypto or the crypto optimized by device's
* hardware.
*/
typedef struct wpa_crypto_funcs_t {
uint32_t size; /**< The crypto callback function structure size */
uint32_t version; /**< The crypto callback function structure version */
esp_aes_wrap_t aes_wrap; /**< The AES wrap callback function used by esp_wifi */
esp_aes_unwrap_t aes_unwrap; /**< The AES unwrap callback function used by esp_wifi */
esp_hmac_sha256_vector_t hmac_sha256_vector; /**< The SHA256 callback function used by esp_wifi */
esp_sha256_prf_t sha256_prf; /**< The SHA256 PRF callback function used by esp_wifi */
esp_hmac_md5_t hmac_md5; /**< HMAC-MD5 callback function over data buffer (RFC 2104) */
esp_hmac_md5_vector_t hamc_md5_vector; /**< HMAC-MD5 callback function over data vector (RFC 2104) */
esp_hmac_sha1_t hmac_sha1; /**< HMAC-SHA1 callback function over data buffer (RFC 2104) */
esp_hmac_sha1_vector_t hmac_sha1_vector; /**< HMAC-SHA1 callback function over data vector (RFC 2104) */
esp_sha1_prf_t sha1_prf; /**< SHA1-based Pseudo-Random Function (PRF) (IEEE 802.11i, 8.5.1.1) callback function */
esp_sha1_vector_t sha1_vector; /**< SHA-1 hash callback function for data vector */
esp_pbkdf2_sha1_t pbkdf2_sha1; /**< SHA1-based key derivation function (PBKDF2) callback function for IEEE 802.11i */
esp_rc4_skip_t rc4_skip; /**< XOR RC4 stream callback function to given data with skip-stream-start */
esp_md5_vector_t md5_vector; /**< MD5 hash callback function for data vector */
esp_aes_encrypt_t aes_encrypt; /**< Encrypt one AES block callback function */
esp_aes_encrypt_init_t aes_encrypt_init; /**< Initialize AES callback function for encryption */
esp_aes_encrypt_deinit_t aes_encrypt_deinit; /**< Deinitialize AES encryption callback function */
esp_aes_decrypt_t aes_decrypt; /**< Decrypt one AES block callback function */
esp_aes_decrypt_init_t aes_decrypt_init; /**< Initialize AES callback function for decryption */
esp_aes_decrypt_deinit_t aes_decrypt_deinit; /**< Deinitialize AES decryption callback function */
esp_aes_128_encrypt_t aes_128_encrypt; /**< The AES 128 encrypt callback function used by esp_wifi */
esp_aes_128_decrypt_t aes_128_decrypt; /**< The AES 128 decrypt callback function used by esp_wifi */
esp_omac1_aes_128_t omac1_aes_128; /**< One-Key CBC MAC (OMAC1) hash with AES-128 callback function for MIC computation */
esp_ccmp_decrypt_t ccmp_decrypt; /**< Decrypt data callback function using CCMP */
esp_ccmp_encrypt_t ccmp_encrypt; /**< Encrypt data callback function using CCMP */
esp_aes_gmac_t aes_gmac; /**< One-Key GMAC hash callback function with AES for MIC computation */
esp_sha256_vector_t sha256_vector; /**< SHA256 hash callback function for data vector */
esp_crc32_le_t crc32; /**< CRC32 value callback function in little endian */
} wpa_crypto_funcs_t;
/**
* @brief The crypto callback function structure used in mesh vendor IE encryption. The
* structure can be set as software crypto or the crypto optimized by device's
* hardware.
*/
typedef struct {
esp_aes_128_encrypt_t aes_128_encrypt; /**< Callback function used in mesh vendor IE encryption */
esp_aes_128_decrypt_t aes_128_decrypt; /**< Callback function used in mesh vendor IE decryption */
} mesh_crypto_funcs_t;
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -0,0 +1,152 @@
/*
* SPDX-FileCopyrightText: 2019-2023 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef _ESP_WIFI_DEFAULT_H
#define _ESP_WIFI_DEFAULT_H
#include "esp_netif.h"
#include "esp_wifi_types.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* @brief Attaches wifi station interface to supplied netif
*
* @param esp_netif instance to attach the wifi station to
*
* @return
* - ESP_OK on success
* - ESP_FAIL if attach failed
*/
esp_err_t esp_netif_attach_wifi_station(esp_netif_t *esp_netif);
/**
* @brief Attaches wifi soft AP interface to supplied netif
*
* @param esp_netif instance to attach the wifi AP to
*
* @return
* - ESP_OK on success
* - ESP_FAIL if attach failed
*/
esp_err_t esp_netif_attach_wifi_ap(esp_netif_t *esp_netif);
/**
* @brief Sets default wifi event handlers for STA interface
*
* @return
* - ESP_OK on success, error returned from esp_event_handler_register if failed
*/
esp_err_t esp_wifi_set_default_wifi_sta_handlers(void);
/**
* @brief Sets default wifi event handlers for AP interface
*
* @return
* - ESP_OK on success, error returned from esp_event_handler_register if failed
*/
esp_err_t esp_wifi_set_default_wifi_ap_handlers(void);
/**
* @brief Sets default wifi event handlers for NAN interface
*
* @return
* - ESP_OK on success, error returned from esp_event_handler_register if failed
*/
esp_err_t esp_wifi_set_default_wifi_nan_handlers(void);
/**
* @brief Clears default wifi event handlers for supplied network interface
*
* @param esp_netif instance of corresponding if object
*
* @return
* - ESP_OK on success, error returned from esp_event_handler_register if failed
*/
esp_err_t esp_wifi_clear_default_wifi_driver_and_handlers(void *esp_netif);
/**
* @brief Creates default WIFI AP. In case of any init error this API aborts.
*
* @note The API creates esp_netif object with default WiFi access point config,
* attaches the netif to wifi and registers wifi handlers to the default event loop.
* This API uses assert() to check for potential errors, so it could abort the program.
* (Note that the default event loop needs to be created prior to calling this API)
*
* @return pointer to esp-netif instance
*/
esp_netif_t* esp_netif_create_default_wifi_ap(void);
/**
* @brief Creates default WIFI STA. In case of any init error this API aborts.
*
* @note The API creates esp_netif object with default WiFi station config,
* attaches the netif to wifi and registers wifi handlers to the default event loop.
* This API uses assert() to check for potential errors, so it could abort the program.
* (Note that the default event loop needs to be created prior to calling this API)
*
* @return pointer to esp-netif instance
*/
esp_netif_t* esp_netif_create_default_wifi_sta(void);
/**
* @brief Creates default WIFI NAN. In case of any init error this API aborts.
*
* @note The API creates esp_netif object with default WiFi station config,
* attaches the netif to wifi and registers wifi handlers to the default event loop.
* (Note that the default event loop needs to be created prior to calling this API)
*
* @return pointer to esp-netif instance
*/
esp_netif_t* esp_netif_create_default_wifi_nan(void);
/**
* @brief Destroys default WIFI netif created with esp_netif_create_default_wifi_...() API.
*
* @param[in] esp_netif object to detach from WiFi and destroy
*
* @note This API unregisters wifi handlers and detaches the created object from the wifi.
* (this function is a no-operation if esp_netif is NULL)
*/
void esp_netif_destroy_default_wifi(void *esp_netif);
/**
* @brief Creates esp_netif WiFi object based on the custom configuration.
*
* @attention This API DOES NOT register default handlers!
*
* @param[in] wifi_if type of wifi interface
* @param[in] esp_netif_config inherent esp-netif configuration pointer
*
* @return pointer to esp-netif instance
*/
esp_netif_t* esp_netif_create_wifi(wifi_interface_t wifi_if, const esp_netif_inherent_config_t *esp_netif_config);
/**
* @brief Creates default STA and AP network interfaces for esp-mesh.
*
* Both netifs are almost identical to the default station and softAP, but with
* DHCP client and server disabled. Please note that the DHCP client is typically
* enabled only if the device is promoted to a root node.
*
* Returns created interfaces which could be ignored setting parameters to NULL
* if an application code does not need to save the interface instances
* for further processing.
*
* @param[out] p_netif_sta pointer where the resultant STA interface is saved (if non NULL)
* @param[out] p_netif_ap pointer where the resultant AP interface is saved (if non NULL)
*
* @return ESP_OK on success
*/
esp_err_t esp_netif_create_default_wifi_mesh_netifs(esp_netif_t **p_netif_sta, esp_netif_t **p_netif_ap);
#ifdef __cplusplus
}
#endif
#endif //_ESP_WIFI_DEFAULT_H

View File

@@ -0,0 +1,221 @@
/*
* SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#pragma once
#include <stdint.h>
#include <stdbool.h>
#include "esp_err.h"
#include "esp_wifi_he_types.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* @brief Set up an individual TWT agreement (NegotiationType=0) or change TWT parameters of the existing TWT agreement
* - TWT Wake Interval = TWT Wake Interval Mantissa * (2 ^ TWT Wake Interval Exponent), unit: us
* - e.g. TWT Wake Interval Mantissa = 512, TWT Wake Interval Exponent = 12, then TWT Wake Interval is 2097.152 ms
* Nominal Minimum Wake Duration = 255, then TWT Wake Duration is 65.28 ms
*
* @attention Support at most 8 TWT agreements, otherwise ESP_ERR_WIFI_TWT_FULL will be returned.
* Support sleep time up to (1 << 35) us.
*
* @param[in,out] setup_config pointer to itwt setup config structure.
*
* @return
* - ESP_OK: succeed
* - ESP_ERR_WIFI_NOT_INIT: WiFi is not initialized by esp_wifi_init
* - ESP_ERR_WIFI_NOT_STARTED: WiFi is not started by esp_wifi_start
* - ESP_ERR_WIFI_CONN: WiFi internal error, station or soft-AP control block wrong
* - ESP_ERR_WIFI_NOT_CONNECT: The station is in disconnect status
* - ESP_ERR_WIFI_TWT_FULL: no available flow id
* - ESP_ERR_INVALID_ARG: invalid argument
*/
esp_err_t esp_wifi_sta_itwt_setup(wifi_itwt_setup_config_t *setup_config);
/**
* @brief Tear down individual TWT agreements
*
* @param[in] flow_id The value range is [0, 7].
* FLOW_ID_ALL indicates tear down all individual TWT agreements.
*
* @return
* - ESP_OK: succeed
* - ESP_ERR_WIFI_NOT_INIT: WiFi is not initialized by esp_wifi_init
* - ESP_ERR_WIFI_NOT_STARTED: WiFi is not started by esp_wifi_start
* - ESP_ERR_WIFI_CONN: WiFi internal error, station or soft-AP control block wrong
* - ESP_ERR_WIFI_NOT_CONNECT: The station is in disconnect status
* - ESP_ERR_INVALID_ARG: invalid argument
*/
esp_err_t esp_wifi_sta_itwt_teardown(int flow_id);
/**
* @brief Send a TWT Information frame to AP for suspending/resuming established iTWT agreements.
*
* @param[in] flow_id The value range is [0, 7].
* FLOW_ID_ALL indicates suspend all individual TWT agreements
* @param[in] suspend_time_ms If the value is 0, indicates the specified flow_id or all established agreements will be suspended until resume by users.
* If the value is greater than 0, indicates the specified flow_id or all established agreements will be suspended until suspend_time_ms timeout, unit: ms.
*
* @return
* - ESP_OK: succeed
* - ESP_ERR_WIFI_NOT_INIT: WiFi is not initialized by esp_wifi_init
* - ESP_ERR_WIFI_NOT_STARTED: WiFi is not started by esp_wifi_start
* - ESP_ERR_WIFI_CONN: WiFi internal error, station or soft-AP control block wrong
* - ESP_ERR_WIFI_NOT_ASSOC: WiFi is not associated
* - ESP_ERR_INVALID_ARG: invalid argument
*/
esp_err_t esp_wifi_sta_itwt_suspend(int flow_id, int suspend_time_ms);
/**
* @brief Get flow id status
*
* @param[in] flow_id_bitmap Flow id status bitmap with 8 bit. Each bit represents that whether the corresponding flow id is setup.
* 1: setup, 0: not setup.
*
* @return
* - ESP_OK: succeed
* - ESP_ERR_WIFI_NOT_INIT: WiFi is not initialized by esp_wifi_init
* - ESP_ERR_WIFI_NOT_STARTED: WiFi is not started by esp_wifi_start
* - ESP_ERR_WIFI_CONN: WiFi internal error, station or soft-AP control block wrong
* - ESP_ERR_WIFI_NOT_CONNECT: The station is in disconnect status
* - ESP_ERR_INVALID_ARG: invalid argument
*/
esp_err_t esp_wifi_sta_itwt_get_flow_id_status(int *flow_id_bitmap);
/**
* @brief Send probe to update TSF time
*
* @attention In bad network, timeout_ms is variable with the network
*
* @param[in] timeout_ms The estimated time includes sending probe request and receiving probe response, unit: ms.
*
* @return
* - ESP_OK: succeed
* - ESP_ERR_WIFI_NOT_INIT: WiFi is not initialized by esp_wifi_init
* - ESP_ERR_WIFI_NOT_STARTED: WiFi is not started by esp_wifi_start
* - ESP_ERR_WIFI_CONN: WiFi internal error, station or soft-AP control block wrong
* - ESP_ERR_WIFI_NOT_ASSOC: WiFi is not associated
*/
esp_err_t esp_wifi_sta_itwt_send_probe_req(int timeout_ms);
/**
* @brief Set time offset with TBTT of target wake time field in itwt setup request frame.
*
* @param[in] offset_us Offset with TBTT of target wake time field in itwt setup request frame, range is [0, 102400], unit microseconds.
*
* @return
* - ESP_OK: succeed
* - ESP_ERR_WIFI_NOT_INIT: WiFi is not initialized by esp_wifi_init
* - ESP_ERR_WIFI_NOT_STARTED: WiFi is not started by esp_wifi_start
* - ESP_ERR_WIFI_CONN: WiFi internal error, station or soft-AP control block wrong
* - ESP_ERR_WIFI_NOT_ASSOC: WiFi is not associated
* - ESP_ERR_INVALID_ARG: invalid argument
*/
esp_err_t esp_wifi_sta_itwt_set_target_wake_time_offset(int offset_us);
/**
* @brief Enable the reception statistics.
*
* @param[in] rx_stats indicate whether enable the reception statistics for HT, HE SU, HE ER SU and legacy
* @param[in] rx_mu_stats indicate whether enable the reception statistics for DL MU-MIMO and DL OFDMA
*
* @return
* - ESP_OK: succeed
* - ESP_ERR_NO_MEM: out of memory
*/
esp_err_t esp_wifi_enable_rx_statistics(bool rx_stats, bool rx_mu_stats);
/**
* @brief Enable the transmission statistics.
*
* @param[in] aci access category of the transmission
* @param[in] tx_stats indicate whether enable the transmission statistics
*
* @return
* - ESP_OK: succeed
* - ESP_ERR_NO_MEM: out of memory
*/
esp_err_t esp_wifi_enable_tx_statistics(esp_wifi_aci_t aci, bool tx_stats);
/**
* @brief Set up an broadcast TWT agreement (NegotiationType=3) or change TWT parameters of the existing TWT agreement
* - TWT Wake Interval = TWT Wake Interval Mantissa * (2 ^ TWT Wake Interval Exponent), unit: us
* - e.g. TWT Wake Interval Mantissa = 512, TWT Wake Interval Exponent = 12, then TWT Wake Interval is 2097.152 ms
* Nominal Minimum Wake Duration = 255, then TWT Wake Duration is 65.28 ms
*
* @attention Support at most 32 TWT agreements, otherwise ESP_ERR_WIFI_TWT_FULL will be returned.
* Support sleep time up to (1 << 35) us.
*
* @param[in,out] config pointer to btwt setup config structure.
*
* @return
* - ESP_OK: succeed
* - ESP_ERR_WIFI_NOT_INIT: WiFi is not initialized by esp_wifi_init
* - ESP_ERR_WIFI_NOT_STARTED: WiFi is not started by esp_wifi_start
* - ESP_ERR_WIFI_CONN: WiFi internal error, station or soft-AP control block wrong
* - ESP_ERR_WIFI_NOT_CONNECT: The station is in disconnect status
* - ESP_ERR_WIFI_TWT_FULL: no available flow id
* - ESP_ERR_INVALID_ARG: invalid argument
*/
esp_err_t esp_wifi_sta_btwt_setup(wifi_btwt_setup_config_t *config);
/**
* @brief Tear down broadcast TWT agreements
*
* @param[in] btwt_id The value range is [0, 31].
* BTWT_ID_ALL indicates tear down all broadcast TWT agreements.
*
* @return
* - ESP_OK: succeed
* - ESP_ERR_WIFI_NOT_INIT: WiFi is not initialized by esp_wifi_init
* - ESP_ERR_WIFI_NOT_STARTED: WiFi is not started by esp_wifi_start
* - ESP_ERR_WIFI_CONN: WiFi internal error, station or soft-AP control block wrong
* - ESP_ERR_WIFI_NOT_CONNECT: The station is in disconnect status
* - ESP_ERR_INVALID_ARG: invalid argument
*/
esp_err_t esp_wifi_sta_btwt_teardown(uint8_t btwt_id);
/**
* @brief Get number of broadcast TWTs supported by the connected AP
*
* @param[out] btwt_number store number of btwts supported by the connected AP
*
* @return
* - ESP_OK: succeed
* - ESP_ERR_WIFI_NOT_INIT: WiFi is not initialized by esp_wifi_init
* - ESP_ERR_WIFI_NOT_STARTED: WiFi is not started by esp_wifi_start
* - ESP_ERR_INVALID_ARG: invalid argument
*/
esp_err_t esp_wifi_sta_get_btwt_num(uint8_t *btwt_number);
/**
* @brief Get broadcast TWT information
*
* @param[in] btwt_number As input param, it stores max btwt number AP supported.
* @param[in] btwt_info array to hold the btwt information supported by AP, and the array size must be at least as large as the BTWT number.
*
* @return
* - ESP_OK: succeed
* - ESP_FAIL: fail
* - ESP_ERR_WIFI_CONN: WiFi internal error, station or soft-AP control block wrong
*/
esp_err_t esp_wifi_sta_btwt_get_info(uint8_t btwt_number, esp_wifi_btwt_info_t *btwt_info);
/**
* @brief Set WiFi TWT config
*
* @param[in] config pointer to the WiFi TWT configure structure.
*
* @return
* - ESP_OK: succeed
*/
esp_err_t esp_wifi_sta_twt_config(wifi_twt_config_t *config);
#ifdef __cplusplus
}
#endif

View File

@@ -0,0 +1,435 @@
/*
* SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#pragma once
#include <stdint.h>
#include <stdbool.h>
#include "esp_err.h"
#ifdef __cplusplus
extern "C" {
#endif
#define FLOW_ID_ALL (8)
#define BTWT_ID_ALL (32)
#define BSS_MAX_COLOR (63)
/**
* @brief Access category
*/
typedef enum {
ESP_WIFI_ACI_VO, /**< voice traffic */
ESP_WIFI_ACI_VI, /**< video traffic */
ESP_WIFI_ACI_BE, /**< best effort traffic */
ESP_WIFI_ACI_BK, /**< background traffic */
ESP_WIFI_ACI_MAX, /**< the max value */
} esp_wifi_aci_t;
/**
* @brief Channel state information(CSI) HE STBC CSI selection
*/
enum {
ESP_CSI_ACQUIRE_STBC_HELTF1, /**< HE STBC: select the first HE-LTF */
ESP_CSI_ACQUIRE_STBC_HELTF2, /**< HE STBC: select the second HE-LTF */
ESP_CSI_ACQUIRE_STBC_SAMPLE_HELTFS, /**< HE STBC: sample alternating scarier of HE-LTF1 and HE-LTF2 */
};
/**
* @brief Channel state information(CSI) configuration type
*/
#if CONFIG_SLAVE_IDF_TARGET_ESP32C5
typedef struct {
uint32_t enable : 1; /**< enable to acquire CSI */
uint32_t acquire_csi_legacy : 1; /**< enable to acquire L-LTF */
uint32_t acquire_csi_force_lltf : 1; /**< enable to acquire L-LTF */
uint32_t acquire_csi_ht20 : 1; /**< enable to acquire HT-LTF when receiving an HT20 PPDU */
uint32_t acquire_csi_ht40 : 1; /**< enable to acquire HT-LTF when receiving an HT40 PPDU */
uint32_t acquire_csi_vht : 1; /**< enable to acquire VHT-LTF when receiving an VHT20 PPDU */
uint32_t acquire_csi_su : 1; /**< enable to acquire HE-LTF when receiving an HE20 SU PPDU */
uint32_t acquire_csi_mu : 1; /**< enable to acquire HE-LTF when receiving an HE20 MU PPDU */
uint32_t acquire_csi_dcm : 1; /**< enable to acquire HE-LTF when receiving an HE20 DCM applied PPDU */
uint32_t acquire_csi_beamformed : 1; /**< enable to acquire HE-LTF when receiving an HE20 Beamformed applied PPDU */
uint32_t acquire_csi_he_stbc_mode: 2; /**< when receiving an STBC applied HE PPDU,
0- acquire the complete HE-LTF1
1- acquire the complete HE-LTF2
2- sample evenly among the HE-LTF1 and HE-LTF2 */
uint32_t val_scale_cfg : 4; /**< value 0-8 */
uint32_t dump_ack_en : 1; /**< enable to dump 802.11 ACK frame, default disabled */
uint32_t reserved : 15; /**< reserved */
} wifi_csi_acquire_config_t;
#else
typedef struct {
uint32_t enable : 1; /**< enable to acquire CSI */
uint32_t acquire_csi_legacy : 1; /**< enable to acquire L-LTF when receiving a 11g PPDU */
uint32_t acquire_csi_ht20 : 1; /**< enable to acquire HT-LTF when receiving an HT20 PPDU */
uint32_t acquire_csi_ht40 : 1; /**< enable to acquire HT-LTF when receiving an HT40 PPDU */
uint32_t acquire_csi_su : 1; /**< enable to acquire HE-LTF when receiving an HE20 SU PPDU */
uint32_t acquire_csi_mu : 1; /**< enable to acquire HE-LTF when receiving an HE20 MU PPDU */
uint32_t acquire_csi_dcm : 1; /**< enable to acquire HE-LTF when receiving an HE20 DCM applied PPDU */
uint32_t acquire_csi_beamformed : 1; /**< enable to acquire HE-LTF when receiving an HE20 Beamformed applied PPDU */
uint32_t acquire_csi_he_stbc : 2; /**< when receiving an STBC applied HE PPDU,
0- acquire the complete HE-LTF1
1- acquire the complete HE-LTF2
2- sample evenly among the HE-LTF1 and HE-LTF2 */
uint32_t val_scale_cfg : 2; /**< value 0-3 */
uint32_t dump_ack_en : 1; /**< enable to dump 802.11 ACK frame, default disabled */
uint32_t reserved : 19; /**< reserved */
} wifi_csi_acquire_config_t;
#endif
/**
* @brief HE variant HT Control field including OM(Operation mode)
*/
typedef struct {
uint32_t id : 2; /**< HE Variant ID = 3 */
uint32_t ctrl_id : 4; /**< OM control ID: 1 */
uint32_t rx_nss : 3; /**< the max. number of spatial streams for the reception, only accept 0. */
uint32_t bw : 2; /**< the operating channel width for both reception and transmission, only accept 0. */
uint32_t ul_mu_disable : 1; /**< disable UL MU operations */
uint32_t tx_nsts : 3; /**< the max. number of spatial streams for the transmission, only accept 0. */
uint32_t er_su_disable : 1; /**< disable the reception of 242-tone HE ER SU PPDU */
uint32_t dl_mu_mimo_resounding_recommendation : 1; /**< indicate the STA suggests the AP either resounding the channel or increase the channel sounding frequency with the STA */
uint32_t ul_mu_data_disable : 1; /**< disable UL MU data operations */
uint32_t padding : 14; /**< padding bits */
} esp_wifi_htc_omc_t;
/**
* @brief TWT setup commands
*/
typedef enum {
TWT_REQUEST, /**< request to join a TWT without providing a set of TWT parameters */
TWT_SUGGEST, /**< request to join a TWT and offer a set of preferred TWT parameters but might accept alternative TWT parameters */
TWT_DEMAND, /**< request to join a TWT and currently accept only the indicated TWT parameters */
TWT_GROUPING, /**< for S1G STA */
TWT_ACCEPT, /**< accept the TWT request with the TWT parameters, also used in unsolicited TWT response */
TWT_ALTERNATE, /**< indicate a counter-offer of TWT parameters without creation of a TWT agreement */
TWT_DICTATE, /**< indicate no TWT agreement is created, but one is likely to be accepted only if the requesting STA transmits a new TWT setup request with the indicated TWT parameters */
TWT_REJECT, /**< indicate that the negotiation has ended in failure to create a new TWT agreement */
} wifi_twt_setup_cmds_t;
/**
* @brief broadcast TWT setup config
*/
typedef struct {
wifi_twt_setup_cmds_t setup_cmd; /**< Indicates the type of TWT command*/
uint8_t btwt_id; /**< When set up an broadcast TWT agreement, the broadcast twt id will be assigned by AP after a successful agreement setup.
broadcast twt id could be specified to a value in the range of [1, 31], but it might be change by AP in the response.
When change TWT parameters of the existing TWT agreement, broadcast twt id should be an existing one. The value range is [1, 31].*/
uint16_t timeout_time_ms; /**< Timeout times of receiving setup action frame response, default 5s*/
} wifi_btwt_setup_config_t;
/**
* @brief Individual TWT setup config
*/
typedef struct {
wifi_twt_setup_cmds_t setup_cmd; /**< Indicates the type of TWT command */
uint16_t trigger : 1; /**< 1: a trigger-enabled individual TWT, 0: a non-trigger-enabled individual TWT */
uint16_t flow_type : 1; /**< 0: an announced individual TWT, 1: an unannounced individual TWT */
uint16_t flow_id : 3; /**< When set up an individual TWT agreement, the flow id will be assigned by AP after a successful agreement setup.
flow_id could be specified to a value in the range of [0, 7], but it might be changed by AP in the response.
When change TWT parameters of the existing TWT agreement, flow_id should be an existing one. The value range is [0, 7]. */
uint16_t wake_invl_expn : 5; /**< Individual TWT Wake Interval Exponent. The value range is [0, 31]. */
uint16_t wake_duration_unit : 1; /**< Individual TWT Wake duration unit, 0: 256us 1: TU (TU = 1024us)*/
uint16_t reserved : 5; /**< bit: 11.15 reserved */
uint8_t min_wake_dura; /**< Nominal Minimum Wake Duration, indicates the minimum amount of time, in unit of 256 us, that the individual TWT requesting STA expects that it needs to be awake. The value range is [1, 255]. */
uint16_t wake_invl_mant; /**< Individual TWT Wake Interval Mantissa. The value range is [1, 65535]. */
uint16_t twt_id; /**< Individual TWT connection id, the value range is [0, 32767]. */
uint16_t timeout_time_ms; /**< Timeout times of receiving setup action frame response, default 5s*/
} wifi_twt_setup_config_t;
typedef wifi_twt_setup_config_t wifi_itwt_setup_config_t;
/**
* @brief HE SU GI and LTF types
*/
typedef enum {
HE_SU_ERSU_1_LTF_0_8_US_GI, /**< 1 LTF and 0.8 us GI */
HE_SU_ERSU_2_LTF_0_8_US_GI, /**< 2 LTF and 0.8 us GI */
HE_SU_ERSU_2_LTF_1_6_US_GI, /**< 2 LTF and 1.6 us GI */
HE_SU_ERSU_4_LTF_3_2_US_GI, /**< 4 LTF and 3.2 us GI */
} he_su_gi_and_ltf_type_t;
/**
* @brief Reception format
*/
typedef enum {
RX_BB_FORMAT_11B = 0, /**< the reception frame is a 11b MPDU */
RX_BB_FORMAT_11G = 1, /**< the reception frame is a 11g MPDU */
RX_BB_FORMAT_11A = RX_BB_FORMAT_11G, /**< the reception frame is a 11a MPDU */
RX_BB_FORMAT_HT = 2, /**< the reception frame is a HT MPDU */
RX_BB_FORMAT_VHT = 3, /**< the reception frame is a VHT MPDU */
RX_BB_FORMAT_HE_SU = 4, /**< the reception frame is a HE SU MPDU */
RX_BB_FORMAT_HE_MU = 5, /**< the reception frame is a HE MU MPDU */
RX_BB_FORMAT_HE_ERSU = 6, /**< the reception frame is a HE ER SU MPDU */
RX_BB_FORMAT_HE_TB = 7, /**< the reception frame is a HE TB MPDU */
} wifi_rx_bb_format_t;
/**
* @brief RxControl Info
*/
#if CONFIG_SLAVE_IDF_TARGET_ESP32C5
typedef struct {
signed rssi: 8; /**< the RSSI of the reception frame */
unsigned rate: 5; /**< if cur_bb_format is RX_BB_FORMAT_11B, it's the transmission rate. otherwise it's Rate field of L-SIG */
unsigned : 1; /**< reserved */
unsigned : 2; /**< reserved */
unsigned : 12; /**< reserved */
unsigned rxmatch0: 1; /**< indicate whether the reception frame is from interface 0 */
unsigned rxmatch1: 1; /**< indicate whether the reception frame is from interface 1 */
unsigned rxmatch2: 1; /**< indicate whether the reception frame is from interface 2 */
unsigned rxmatch3: 1; /**< indicate whether the reception frame is from interface 3 */
uint32_t he_siga1; /**< HE-SIGA1 or HT-SIG or VHT-SIG */
unsigned rxend_state: 8; /**< reception state, 0: successful, others: failure */
uint16_t he_siga2; /**< HE-SIGA2 */
unsigned : 7; /**< reserved */
unsigned is_group: 1; /**< indicate whether the reception is a group addressed frame */
unsigned timestamp: 32; /**< timestamp. The local time when this packet is received. It is precise only if modem sleep or light sleep is not enabled. unit: microsecond */
unsigned : 15; /**< reserved */
unsigned : 15; /**< reserved */
unsigned : 2; /**< reserved */
unsigned noise_floor: 8; /**< the noise floor of the reception frame */
signed : 8; /**< reserved */
signed : 8; /**< reserved */
unsigned : 8; /**< reserved */
unsigned : 8; /**< reserved */
unsigned : 8; /**< reserved */
unsigned : 2; /**< reserved */
unsigned sigb_len: 10; /**< the sigb length */
unsigned : 1; /**< reserved */
unsigned : 1; /**< reserved */
unsigned : 1; /**< reserved */
unsigned : 1; /**< reserved */
unsigned channel: 4; /**< the primary channel */
unsigned second: 4; /**< the second channel if in HT40 */
unsigned : 12; /**< reserved */
unsigned : 4; /**< reserved */
unsigned : 1; /**< reserved */
unsigned : 7; /**< reserved */
unsigned : 2; /**< reserved */
unsigned : 4; /**< reserved */
unsigned : 2; /**< reserved */
unsigned : 11; /**< reserved */
unsigned : 1; /**< reserved */
unsigned : 12; /**< reserved */
unsigned : 12; /**< reserved */
unsigned cur_bb_format: 4; /**< the format of the reception frame */
unsigned rx_channel_estimate_len: 10; /**< the length of the channel information */
unsigned rx_channel_estimate_info_vld: 1; /**< indicate the channel information is valid */
unsigned : 5; /**< reserved */
unsigned : 21; /**< reserved */
unsigned : 10; /**< reserved */
unsigned : 1; /**< reserved */
unsigned : 3; /**< reserved */
unsigned : 1; /**< reserved */
unsigned : 6; /**< reserved */
unsigned : 21; /**< reserved */
unsigned : 1; /**< reserved */
unsigned : 32; /**< reserved */
unsigned : 7; /**< reserved */
unsigned : 1; /**< reserved */
unsigned : 8; /**< reserved */
unsigned : 16; /**< reserved */
unsigned sig_len: 14; /**< the length of the reception MPDU */
unsigned : 2; /**< reserved */
unsigned dump_len: 14; /**< the length of the reception MPDU excluding the FCS */
unsigned : 2; /**< reserved */
unsigned rx_state: 8; /**< reception state, 0: successful, others: failure */
unsigned : 8; /**< reserved */
unsigned : 16; /**< reserved */
} __attribute__((packed)) esp_wifi_rxctrl_t;
#else
typedef struct {
signed rssi : 8; /**< the RSSI of the reception frame */
unsigned rate : 5; /**< if cur_bb_format is RX_BB_FORMAT_11B, it's the transmission rate. otherwise it's Rate field of L-SIG */
unsigned : 1; /**< reserved */
unsigned : 2; /**< reserved */
unsigned : 12; /**< reserved */
unsigned rxmatch0 : 1; /**< indicate whether the reception frame is from interface 0 */
unsigned rxmatch1 : 1; /**< indicate whether the reception frame is from interface 1 */
unsigned rxmatch2 : 1; /**< indicate whether the reception frame is from interface 2 */
unsigned rxmatch3 : 1; /**< indicate whether the reception frame is from interface 3 */
uint32_t he_siga1; /**< HE-SIGA1 or HT-SIG */
unsigned rxend_state : 8; /**< reception state, 0: successful, others: failure */
uint16_t he_siga2; /**< HE-SIGA2 */
unsigned : 7; /**< reserved */
unsigned is_group : 1; /**< indicate whether the reception is a group addressed frame */
unsigned timestamp : 32; /**< timestamp. The local time when this packet is received. It is precise only if modem sleep or light sleep is not enabled. unit: microsecond */
unsigned : 15; /**< reserved */
unsigned : 15; /**< reserved */
unsigned : 2; /**< reserved */
signed noise_floor : 8; /**< the noise floor of the reception frame */
unsigned channel : 4; /**< the primary channel */
unsigned second : 4; /**< the second channel if in HT40 */
unsigned : 8; /**< reserved */
unsigned : 8; /**< reserved */
unsigned : 32; /**< reserved */
unsigned : 32; /**< reserved */
unsigned : 2; /**< reserved */
unsigned : 4; /**< reserved */
unsigned : 2; /**< reserved */
unsigned rx_channel_estimate_len : 10; /**< the length of the channel information */
unsigned rx_channel_estimate_info_vld : 1; /**< indicate the channel information is valid */
unsigned : 1; /**< reserved */
unsigned : 11; /**< reserved */
unsigned : 1; /**< reserved */
unsigned : 24; /**< reserved */
unsigned cur_bb_format : 4; /**< the format of the reception frame */
unsigned cur_single_mpdu : 1; /**< indicate whether the reception MPDU is a S-MPDU */
unsigned : 3; /**< reserved */
unsigned : 32; /**< reserved */
unsigned : 32; /**< reserved */
unsigned : 32; /**< reserved */
unsigned : 32; /**< reserved */
unsigned : 32; /**< reserved */
unsigned : 32; /**< reserved */
unsigned : 32; /**< reserved */
unsigned : 32; /**< reserved */
unsigned : 8; /**< reserved */
unsigned he_sigb_len : 6; /**< the length of HE-SIGB */
unsigned : 2; /**< reserved */
unsigned : 8; /**< reserved */
unsigned : 8; /**< reserved */
unsigned : 32; /**< reserved */
unsigned : 7; /**< reserved */
unsigned : 1; /**< reserved */
unsigned : 8; /**< reserved */
unsigned : 16; /**< reserved */
unsigned sig_len : 14; /**< the length of the reception MPDU */
unsigned : 2; /**< reserved */
unsigned dump_len : 14; /**< the length of the reception MPDU excluding the FCS */
unsigned : 2; /**< reserved */
unsigned rx_state : 8; /**< reception state, 0: successful, others: failure */
unsigned : 24; /**< reserved */
} __attribute__((packed)) esp_wifi_rxctrl_t;
#endif
/**
* @brief bTWT setup status
*/
typedef enum {
BTWT_SETUP_TXFAIL, /**< station sends btwt setup request frame fail */
BTWT_SETUP_SUCCESS, /**< station receives btwt setup response frame and setup btwt sucessfully */
BTWT_SETUP_TIMEOUT, /**< timeout of receiving btwt setup response frame */
BTWT_SETUP_FULL, /**< indicate there is no available btwt id */
BTWT_SETUP_INVALID_ARG, /**< indicate invalid argument to setup btwt */
BTWT_SETUP_INTERNAL_ERR, /**< indicate internal error to setup btwt */
} wifi_btwt_setup_status_t;
/** Argument structure for WIFI_EVENT_TWT_SET_UP event */
typedef struct {
wifi_itwt_setup_config_t config; /**< itwt setup config, this value is determined by the AP */
esp_err_t status; /**< itwt setup status, 1: indicate setup success, others : indicate setup fail */
uint8_t reason; /**< itwt setup frame tx fail reason */
uint64_t target_wake_time; /**< TWT SP start time */
} wifi_event_sta_itwt_setup_t;
/**
* @brief iTWT teardown status
*/
typedef enum {
ITWT_TEARDOWN_FAIL, /**< station sends teardown frame fail */
ITWT_TEARDOWN_SUCCESS, /**< 1) station successfully sends teardown frame to AP; 2) station receives teardown frame from AP */
} wifi_itwt_teardown_status_t;
/** Argument structure for WIFI_EVENT_TWT_TEARDOWN event */
typedef struct {
uint8_t flow_id; /**< flow id */
wifi_itwt_teardown_status_t status; /**< itwt teardown status */
} wifi_event_sta_itwt_teardown_t;
/** Argument structure for WIFI_EVENT_BTWT_SET_UP event */
typedef struct {
wifi_btwt_setup_status_t status; /**< indicate btwt setup status */
wifi_twt_setup_cmds_t setup_cmd; /**< indicate the type of TWT command */
uint8_t btwt_id; /**< indicate btwt id */
uint8_t min_wake_dura; /**< Nominal Minimum Wake Duration, indicates the minimum amount of time, in unit of 256 us, that the TWT requesting STA expects that it needs to be awake. The value range is [1, 255]. */
uint8_t wake_invl_expn; /**< TWT Wake Interval Exponent. The value range is [0, 31]. */
uint16_t wake_invl_mant; /**< TWT Wake Interval Mantissa. The value range is [1, 65535]. */
bool trigger; /**< 1: a trigger-enabled TWT, 0: a non-trigger-enabled TWT */
uint8_t flow_type; /**< 0: an announced TWT, 1: an unannounced TWT */
uint8_t reason; /**< btwt setup frame tx fail reason */
uint64_t target_wake_time; /**< TWT SP start time */
} wifi_event_sta_btwt_setup_t;
/**
* @brief BTWT teardown status
*/
typedef enum {
BTWT_TEARDOWN_FAIL, /**< station sends teardown frame fail */
BTWT_TEARDOWN_SUCCESS, /**< 1) station successfully sends teardown frame to AP; 2) station receives teardown frame from AP */
} wifi_btwt_teardown_status_t;
/** Argument structure for WIFI_EVENT_TWT_TEARDOWN event */
typedef struct {
uint8_t btwt_id; /**< btwt id */
wifi_btwt_teardown_status_t status; /**< btwt teardown status */
} wifi_event_sta_btwt_teardown_t;
/**
* @brief iTWT probe status
*/
typedef enum {
ITWT_PROBE_FAIL, /**< station sends probe request fail */
ITWT_PROBE_SUCCESS, /**< 1) station receives beacon from AP; 2) station receives probe response from AP */
ITWT_PROBE_TIMEOUT, /**< 1) timeout of receiving ACK in response of previously probe request sending by station
2) timeout of receiving probe response in response of previously probe request sending by station */
ITWT_PROBE_STA_DISCONNECTED, /**< station is not connected */
} wifi_itwt_probe_status_t;
/** Argument structure for WIFI_EVENT_ITWT_SEND_PROBE event */
typedef struct {
wifi_itwt_probe_status_t status; /**< probe status */
uint8_t reason; /**< failure reason */
} wifi_event_sta_itwt_probe_t;
/** Argument structure for WIFI_EVENT_ITWT_SUSPEND event */
typedef struct {
esp_err_t status; /**< suspend status */
uint8_t flow_id_bitmap; /**< bitmap of the suspended flow id */
uint32_t actual_suspend_time_ms[8]; /**< the actual suspend time for each flow id, unit: ms */
} wifi_event_sta_itwt_suspend_t;
/**
* @brief TWT types
*/
typedef enum {
TWT_TYPE_INDIVIDUAL, /**< individual twt */
TWT_TYPE_BROADCAST, /**< broadcast twt */
TWT_TYPE_MAX, /**< the max value */
} wifi_twt_type_t;
/** Argument structure for twt configuration */
typedef struct {
bool post_wakeup_event; /**< post twt wakeup event */
bool twt_enable_keep_alive; /**< twt enable send qos null to keep alive */
} wifi_twt_config_t;
/** Argument structure for WIFI_EVENT_TWT_WAKEUP event */
typedef struct {
wifi_twt_type_t twt_type; /**< twt type */
uint8_t flow_id; /**< flow id */
} wifi_event_sta_twt_wakeup_t;
/** Argument structure for twt information */
typedef struct {
bool btwt_id_in_use; /**< indicate whether the btwt id is in use or not */
uint16_t btwt_trigger : 1; /**< 1: a trigger-enabled TWT, 0: a non-trigger-enabled TWT */
uint16_t btwt_flow_type : 1; /**< 0: an announced TWT, 1: an unannounced TWT */
uint16_t btwt_recommendation : 3; /**< indicate recommendations on the types of frames. 0: no constraints, [1, 3], [4, 7] reserved */
uint16_t btwt_wake_interval_exponent : 5; /**< TWT Wake Interval Exponent. The value range is [0, 31]. */
uint16_t btwt_rsvd : 6; /**< reserved */
uint8_t btwt_wake_duration; /**< TWT Wake duration unit, 0: 256us 1: TU (TU = 1024us) */
uint16_t btwt_wake_interval_mantissa; /**< TWT Wake Interval Mantissa. The value range is [1, 65535]. */
uint16_t btwt_info_id : 5; /**< btwt id */
uint16_t btwt_info_persistence : 8; /**< indicate the number of TBTTs during which the Broadcast TWT SPs corresponding to this broadcast TWT parameters set are present */
uint16_t btwt_info_rsvd : 3; /**< reserved */
} esp_wifi_btwt_info_t;
#ifdef __cplusplus
}
#endif

Some files were not shown because too many files have changed in this diff Show More