mirror of
https://github.com/espressif/esp-protocols.git
synced 2025-07-26 08:47:27 +02:00
Compare commits
100 Commits
wifi_remot
...
wifi_remot
Author | SHA1 | Date | |
---|---|---|---|
8c4f392f93 | |||
8d8f2bf130 | |||
30f121e6a9 | |||
29810f4139 | |||
2abe55c173 | |||
eb7ea3450e | |||
1b62adbdf1 | |||
d6347a9d5f | |||
c454ec09e6 | |||
ff5dac70b7 | |||
50c113e412 | |||
bde97203ed | |||
8795d16466 | |||
e9ac41e1d7 | |||
7ca5ed1d3e | |||
345c457711 | |||
2e53b81f64 | |||
1a57a878be | |||
8475adf1d1 | |||
29e5fbdf93 | |||
554f022cbf | |||
cfd6d6ad90 | |||
6f90d85933 | |||
0e0cbd6b17 | |||
e926a2c4e6 | |||
b6792c527c | |||
492a6a0029 | |||
22ec03b3e6 | |||
6705bcae5e | |||
2208e76e04 | |||
c348076849 | |||
1b6a3b3b75 | |||
e2392c36fe | |||
a20c0c9d2c | |||
5c850cdad3 | |||
de4531e8c7 | |||
d2880418e5 | |||
8e4d43e00d | |||
fb7b0c201d | |||
f5c13b927f | |||
571a741b56 | |||
1790989242 | |||
f8ae7defd6 | |||
25b3d5fd7b | |||
11846c7d00 | |||
73c48307a3 | |||
b9357b31b5 | |||
788f0513fa | |||
bcab28c1b8 | |||
60817dd384 | |||
2c1b16617e | |||
169405b534 | |||
643dc6d43b | |||
f9f234c440 | |||
3f97a8228b | |||
c62b920bb9 | |||
a927bf3a8d | |||
99d5fb27e9 | |||
8a690503ed | |||
7e5ac87d09 | |||
d4da9cb079 | |||
0660ece128 | |||
d7fa24bc20 | |||
9cf4163663 | |||
a8f13bc861 | |||
aecf6f80bf | |||
34d7c1b23b | |||
6766be6955 | |||
234f579bd8 | |||
1e8ede3396 | |||
f107dcd118 | |||
ee00e97b2b | |||
07b79abf62 | |||
c9a58d7350 | |||
6b9a6ce65b | |||
43de7e5c4d | |||
ce7f326af0 | |||
a91ead8ef5 | |||
e425a3c504 | |||
50d059af07 | |||
f198967c98 | |||
c41e8891ca | |||
b80c19d72c | |||
5964eadbf5 | |||
e583848695 | |||
cb1bc41386 | |||
8d91f5fd62 | |||
5ccc018a98 | |||
9d4d5d2d49 | |||
e2f0477a00 | |||
906e447193 | |||
15ae280bbe | |||
e6f9fe2385 | |||
3a6720ded6 | |||
333a68936a | |||
25d8423e6d | |||
bd9f062709 | |||
9152cfcf82 | |||
83ea2876fc | |||
c714d24d75 |
2
.github/workflows/clang-tidy.yml
vendored
2
.github/workflows/clang-tidy.yml
vendored
@ -42,7 +42,7 @@ jobs:
|
||||
export PATH=$PWD:$PATH
|
||||
./clang-tidy-sarif -o results.sarif.raw warnings.txt
|
||||
python3 filter_sarif.py -o results.sarif --include-prefix ${GITHUB_WORKSPACE}/ results.sarif.raw
|
||||
- uses: actions/upload-artifact@v2
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
path: |
|
||||
warnings.txt
|
||||
|
@ -14,12 +14,17 @@ jobs:
|
||||
strategy:
|
||||
matrix:
|
||||
idf_ver: ["latest", "release-v5.1", "release-v5.2", "release-v5.3"]
|
||||
include:
|
||||
- idf_ver: "latest"
|
||||
warning: "Warning: The smallest app partition is nearly full"
|
||||
runs-on: ubuntu-22.04
|
||||
container: espressif/idf:${{ matrix.idf_ver }}
|
||||
steps:
|
||||
- name: Checkout esp-protocols
|
||||
uses: actions/checkout@v4
|
||||
- name: Build with IDF-${{ matrix.idf_ver }}
|
||||
env:
|
||||
EXPECTED_WARNING: ${{ matrix.warning }}
|
||||
shell: bash
|
||||
run: |
|
||||
. ${IDF_PATH}/export.sh
|
||||
|
23
.github/workflows/mdns__host-tests.yml
vendored
23
.github/workflows/mdns__host-tests.yml
vendored
@ -10,27 +10,30 @@ on:
|
||||
jobs:
|
||||
host_test_mdns:
|
||||
if: contains(github.event.pull_request.labels.*.name, 'mdns') || github.event_name == 'push'
|
||||
name: Host test
|
||||
name: Host test build
|
||||
runs-on: ubuntu-22.04
|
||||
container: espressif/idf:release-v5.1
|
||||
container: espressif/idf:release-v5.3
|
||||
|
||||
steps:
|
||||
- name: Checkout esp-protocols
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
path: esp-protocols
|
||||
path: protocols
|
||||
|
||||
- name: Build and Test
|
||||
shell: bash
|
||||
run: |
|
||||
apt-get update && apt-get install -y dnsutils gcc g++
|
||||
. ${IDF_PATH}/export.sh
|
||||
cd $GITHUB_WORKSPACE/esp-protocols/components/mdns/tests/host_test
|
||||
idf.py build
|
||||
./build/mdns_host.elf &
|
||||
dig +short -p 5353 @224.0.0.251 myesp.local > ip.txt
|
||||
cat ip.txt | xargs dig +short -p 5353 @224.0.0.251 -x
|
||||
cat ip.txt
|
||||
python -m pip install idf-build-apps dnspython pytest pytest-embedded pytest-embedded-serial-esp pytest-embedded-idf
|
||||
cd $GITHUB_WORKSPACE/protocols
|
||||
# Build host tests app (with all configs and targets supported)
|
||||
python ./ci/build_apps.py components/mdns/tests/host_test/
|
||||
cd components/mdns/tests/host_test
|
||||
# First run the linux_app and send a quick A query and a reverse query
|
||||
./build_linux_app/mdns_host.elf &
|
||||
python dnsfixture.py A myesp.local --ip_only | xargs python dnsfixture.py X
|
||||
# Next we run the pytest (using the console app)
|
||||
pytest
|
||||
|
||||
build_afl_host_test_mdns:
|
||||
if: contains(github.event.pull_request.labels.*.name, 'mdns') || github.event_name == 'push'
|
||||
|
8
.github/workflows/modem__target-test.yml
vendored
8
.github/workflows/modem__target-test.yml
vendored
@ -15,7 +15,7 @@ jobs:
|
||||
matrix:
|
||||
idf_ver: ["latest"]
|
||||
idf_target: ["esp32c3"]
|
||||
test: [ { app: pppd, path: test/target }, { app: sim800_c3, path: examples/pppos_client }, { app: sim800_cmux, path: examples/simple_cmux_client } ]
|
||||
test: [ { app: pppd, path: test/target }, { app: pppd_chap_auth, path: test/target }, { app: sim800_c3, path: examples/pppos_client }, { app: sim800_cmux, path: examples/simple_cmux_client } ]
|
||||
include:
|
||||
- idf_ver: "latest"
|
||||
idf_target: "esp32s2"
|
||||
@ -58,7 +58,7 @@ jobs:
|
||||
matrix:
|
||||
idf_ver: ["latest"]
|
||||
idf_target: ["esp32c3"]
|
||||
test: [ { app: pppd, path: test/target }, { app: sim800_c3, path: examples/pppos_client }, { app: sim800_cmux, path: examples/simple_cmux_client } ]
|
||||
test: [ { app: pppd, path: test/target }, { app: pppd_chap_auth, path: test/target }, { app: sim800_c3, path: examples/pppos_client }, { app: sim800_cmux, path: examples/simple_cmux_client } ]
|
||||
include:
|
||||
- idf_ver: "latest"
|
||||
idf_target: "esp32s2"
|
||||
@ -69,9 +69,11 @@ jobs:
|
||||
- modem
|
||||
env:
|
||||
TEST_DIR: components/esp_modem/${{ matrix.test.path }}
|
||||
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
|
||||
steps:
|
||||
- name: Clear repository
|
||||
run: sudo rm -fr $GITHUB_WORKSPACE && mkdir $GITHUB_WORKSPACE
|
||||
run: |
|
||||
sudo rm -fr $GITHUB_WORKSPACE && mkdir $GITHUB_WORKSPACE
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/download-artifact@v3
|
||||
with:
|
||||
|
72
.github/workflows/mosq__build.yml
vendored
Normal file
72
.github/workflows/mosq__build.yml
vendored
Normal file
@ -0,0 +1,72 @@
|
||||
name: "mosq: build-tests"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
types: [opened, synchronize, reopened, labeled]
|
||||
|
||||
jobs:
|
||||
build_mosq:
|
||||
if: contains(github.event.pull_request.labels.*.name, 'mosquitto') || github.event_name == 'push'
|
||||
name: Mosquitto build
|
||||
strategy:
|
||||
matrix:
|
||||
idf_ver: ["latest", "release-v5.3"]
|
||||
runs-on: ubuntu-22.04
|
||||
container: espressif/idf:${{ matrix.idf_ver }}
|
||||
env:
|
||||
TEST_DIR: components/mosquitto/examples/broker
|
||||
TARGET_TEST_DIR: build_esp32_default
|
||||
steps:
|
||||
- name: Checkout esp-protocols
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: Build with IDF-${{ matrix.idf_ver }}
|
||||
shell: bash
|
||||
run: |
|
||||
. ${IDF_PATH}/export.sh
|
||||
pip install idf-component-manager idf-build-apps --upgrade
|
||||
python ci/build_apps.py ${TEST_DIR}
|
||||
cd ${TEST_DIR}
|
||||
${GITHUB_WORKSPACE}/ci/clean_build_artifacts.sh `pwd`/${TARGET_TEST_DIR}
|
||||
zip -qur artifacts.zip ${TARGET_TEST_DIR}
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: mosq_target_esp32_${{ matrix.idf_ver }}
|
||||
path: ${{ env.TEST_DIR }}/artifacts.zip
|
||||
if-no-files-found: error
|
||||
|
||||
test_mosq:
|
||||
# Skip running on forks since it won't have access to secrets
|
||||
if: |
|
||||
github.repository == 'espressif/esp-protocols' &&
|
||||
( contains(github.event.pull_request.labels.*.name, 'mosquitto') || github.event_name == 'push' )
|
||||
name: Mosquitto target test
|
||||
needs: build_mosq
|
||||
strategy:
|
||||
matrix:
|
||||
idf_ver: ["latest", "release-v5.3"]
|
||||
runs-on:
|
||||
- self-hosted
|
||||
- ESP32-ETHERNET-KIT
|
||||
env:
|
||||
TEST_DIR: components/mosquitto/examples/broker
|
||||
TARGET_TEST_DIR: build_esp32_default
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: mosq_target_esp32_${{ matrix.idf_ver }}
|
||||
path: ${{ env.TEST_DIR }}/ci/
|
||||
- name: Run Test
|
||||
working-directory: ${{ env.TEST_DIR }}
|
||||
run: |
|
||||
unzip ci/artifacts.zip -d ci
|
||||
for dir in `ls -d ci/build_*`; do
|
||||
rm -rf build sdkconfig.defaults
|
||||
mv $dir build
|
||||
python -m pytest --log-cli-level DEBUG --junit-xml=./results_esp32_${{ matrix.idf_ver }}_${dir#"ci/build_"}.xml --target=esp32
|
||||
done
|
41
.github/workflows/wifi_remote__build.yml
vendored
41
.github/workflows/wifi_remote__build.yml
vendored
@ -13,7 +13,7 @@ jobs:
|
||||
name: Check API compatibility of WiFi Remote
|
||||
strategy:
|
||||
matrix:
|
||||
idf_ver: ["latest"]
|
||||
idf_ver: ["latest", "release-v5.3"]
|
||||
runs-on: ubuntu-20.04
|
||||
container: espressif/idf:${{ matrix.idf_ver }}
|
||||
steps:
|
||||
@ -24,15 +24,16 @@ jobs:
|
||||
run: |
|
||||
. ${IDF_PATH}/export.sh
|
||||
pip install idf-component-manager idf-build-apps --upgrade
|
||||
cp -r ./components/esp_wifi_remote ./components/esp_wifi_remote_base
|
||||
cd ./components/esp_wifi_remote/scripts
|
||||
python generate_and_check.py
|
||||
python generate_and_check.py --base-dir ../../esp_wifi_remote_base
|
||||
|
||||
build_wifi_remote:
|
||||
if: contains(github.event.pull_request.labels.*.name, 'wifi_remote') || github.event_name == 'push'
|
||||
name: Build WiFi Remote Test
|
||||
strategy:
|
||||
matrix:
|
||||
idf_ver: ["latest"]
|
||||
idf_ver: ["latest", "release-v5.3"]
|
||||
test: [ { app: smoke_test, path: "test/smoke_test" }]
|
||||
runs-on: ubuntu-20.04
|
||||
container: espressif/idf:${{ matrix.idf_ver }}
|
||||
@ -48,6 +49,7 @@ jobs:
|
||||
run: |
|
||||
. ${IDF_PATH}/export.sh
|
||||
pip install idf-component-manager idf-build-apps --upgrade
|
||||
python ./components/esp_wifi_remote/scripts/generate_slave_configs.py ./components/esp_wifi_remote/${{matrix.test.path}}
|
||||
python ./ci/build_apps.py ./components/esp_wifi_remote/${{matrix.test.path}} -vv --preserve-all
|
||||
|
||||
build_wifi_remote_example:
|
||||
@ -75,3 +77,36 @@ jobs:
|
||||
. ${IDF_PATH}/export.sh
|
||||
pip install idf-component-manager idf-build-apps --upgrade
|
||||
python ./ci/build_apps.py ./components/esp_wifi_remote/${{matrix.example.path}} -vv --preserve-all
|
||||
|
||||
build_idf_examples_with_wifi_remote:
|
||||
if: contains(github.event.pull_request.labels.*.name, 'wifi_remote') || github.event_name == 'push'
|
||||
name: Build IDF examples with WiFi Remote
|
||||
strategy:
|
||||
matrix:
|
||||
idf_ver: ["latest", "release-v5.3"]
|
||||
idf_target: ["esp32p4", "esp32h2", "esp32s3"]
|
||||
test: [ { app: idf_mqtt_example, path: "examples/protocols/mqtt/tcp" }]
|
||||
runs-on: ubuntu-20.04
|
||||
container: espressif/idf:${{ matrix.idf_ver }}
|
||||
steps:
|
||||
- name: Checkout esp-protocols
|
||||
uses: actions/checkout@v3
|
||||
- name: ccache
|
||||
uses: hendrikmuhs/ccache-action@v1.2
|
||||
with:
|
||||
key: ${{ matrix.idf_ver }}
|
||||
- name: Build ${{ matrix.test.app }} with IDF-${{ matrix.idf_ver }} for ${{ matrix.idf_target }}
|
||||
shell: bash
|
||||
run: |
|
||||
. ${IDF_PATH}/export.sh
|
||||
pip install idf-component-manager idf-build-apps --upgrade
|
||||
export OVERRIDE_PATH=`pwd`/components/esp_wifi_remote
|
||||
echo ${OVERRIDE_PATH}
|
||||
sed -i '/espressif\/esp_wifi_remote:/a \ \ \ \ override_path: "${OVERRIDE_PATH}"' ${IDF_PATH}/${{matrix.test.path}}/main/idf_component.yml
|
||||
cat ${IDF_PATH}/${{matrix.test.path}}/main/idf_component.yml
|
||||
export PEDANTIC_FLAGS="-DIDF_CI_BUILD -Werror -Werror=deprecated-declarations -Werror=unused-variable -Werror=unused-but-set-variable -Werror=unused-function"
|
||||
export EXTRA_CFLAGS="${PEDANTIC_FLAGS} -Wstrict-prototypes"
|
||||
export EXTRA_CXXFLAGS="${PEDANTIC_FLAGS}"
|
||||
cd ${IDF_PATH}/${{matrix.test.path}}
|
||||
idf-build-apps find --config sdkconfig.ci* -vv --target ${{ matrix.idf_target }}
|
||||
idf-build-apps build --config sdkconfig.ci* -vv --target ${{ matrix.idf_target }}
|
||||
|
3
.gitmodules
vendored
3
.gitmodules
vendored
@ -1,3 +1,6 @@
|
||||
[submodule "components/asio/asio"]
|
||||
path = components/asio/asio
|
||||
url = https://github.com/espressif/asio
|
||||
[submodule "components/mosquitto/mosquitto"]
|
||||
path = components/mosquitto/mosquitto
|
||||
url = https://github.com/eclipse/mosquitto
|
||||
|
@ -62,7 +62,7 @@ repos:
|
||||
hooks:
|
||||
- id: commit message scopes
|
||||
name: "commit message must be scoped with: mdns, modem, websocket, asio, mqtt_cxx, console, common, eppp, wifi_remote, tls_cxx"
|
||||
entry: '\A(?!(feat|fix|ci|bump|test|docs)\((mdns|modem|common|console|websocket|asio|mqtt_cxx|examples|eppp|wifi_remote|tls_cxx)\)\:)'
|
||||
entry: '\A(?!(feat|fix|ci|bump|test|docs)\((mdns|modem|common|console|websocket|asio|mqtt_cxx|examples|eppp|wifi_remote|tls_cxx|mosq)\)\:)'
|
||||
language: pygrep
|
||||
args: [--multiline]
|
||||
stages: [commit-msg]
|
||||
|
@ -1,4 +1,4 @@
|
||||
# SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-FileCopyrightText: 2023-2024 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
"""
|
||||
This file is used in CI for esp-protocols build tests
|
||||
@ -10,8 +10,6 @@ import sys
|
||||
|
||||
from idf_build_apps import build_apps, find_apps, setup_logging
|
||||
from idf_build_apps.constants import SUPPORTED_TARGETS
|
||||
from packaging import version
|
||||
from pkg_resources import get_distribution
|
||||
|
||||
if __name__ == '__main__':
|
||||
parser = argparse.ArgumentParser(
|
||||
@ -51,43 +49,24 @@ if __name__ == '__main__':
|
||||
SUPPORTED_TARGETS.append('linux')
|
||||
ignore_warning = 'warning: ' # Ignore all common warnings on linux builds
|
||||
setup_logging(2)
|
||||
if version.parse(get_distribution('idf_build_apps').version) >= version.parse('2.0.0'):
|
||||
apps = find_apps(
|
||||
args.paths,
|
||||
recursive=args.recursive,
|
||||
target=args.target,
|
||||
build_dir='build_@t_@w',
|
||||
config_rules_str=args.rules,
|
||||
build_log_filename='build_log.txt',
|
||||
size_json_filename='size.json' if not args.linux else None,
|
||||
check_warnings=True,
|
||||
preserve=not args.delete,
|
||||
manifest_files=args.manifests,
|
||||
default_build_targets=SUPPORTED_TARGETS,
|
||||
manifest_rootpath='.',
|
||||
)
|
||||
else:
|
||||
apps = find_apps(
|
||||
args.paths,
|
||||
recursive=args.recursive,
|
||||
target=args.target,
|
||||
build_dir='build_@t_@w',
|
||||
config_rules_str=args.rules,
|
||||
build_log_path='build_log.txt',
|
||||
size_json_path='size.json' if not args.linux else None,
|
||||
check_warnings=True,
|
||||
preserve=not args.delete,
|
||||
manifest_files=args.manifests,
|
||||
default_build_targets=SUPPORTED_TARGETS,
|
||||
manifest_rootpath='.',
|
||||
)
|
||||
|
||||
for app in apps:
|
||||
print(app)
|
||||
apps = find_apps(
|
||||
args.paths,
|
||||
recursive=args.recursive,
|
||||
target=args.target,
|
||||
build_dir='build_@t_@w',
|
||||
config_rules_str=args.rules,
|
||||
build_log_filename='build_log.txt',
|
||||
size_json_filename='size.json' if not args.linux else None,
|
||||
check_warnings=True,
|
||||
manifest_files=args.manifests,
|
||||
default_build_targets=SUPPORTED_TARGETS,
|
||||
manifest_rootpath='.',
|
||||
)
|
||||
|
||||
sys.exit(
|
||||
build_apps(apps,
|
||||
dry_run=False,
|
||||
keep_going=False,
|
||||
no_preserve=args.delete,
|
||||
ignore_warning_strs=ignore_warning)
|
||||
)
|
||||
|
@ -47,6 +47,13 @@ asio_component:
|
||||
- Apache-2.0
|
||||
- BSL-1.0
|
||||
|
||||
mosquitto_component:
|
||||
include:
|
||||
- 'components/mosquitto/port/**'
|
||||
allowed_licenses:
|
||||
- EPL-2.0
|
||||
- Apache-2.0
|
||||
|
||||
slim_modem_examples:
|
||||
include:
|
||||
- 'examples/esp_netif/slip_custom_netif/**'
|
||||
|
@ -22,7 +22,11 @@ if git log -1 -m --name-only --pretty="" | grep -q components/${comp}/idf_compon
|
||||
if [ $(git tag -l "$tag") ]; then
|
||||
echo "${comp}: version (${tag}) already exits"
|
||||
else
|
||||
# skip components that do not have changelog
|
||||
[ -f components/${comp}/CHANGELOG.md ] || continue
|
||||
|
||||
echo "${comp}: Component version has been updated to ${version}"
|
||||
|
||||
# creates release notes from the last entry (between first two "## sections")
|
||||
awk '/^## \[/{a++};{if(a==1){print}}' components/${comp}/CHANGELOG.md > release_notes.md
|
||||
|
||||
|
@ -0,0 +1 @@
|
||||
idf_component_register()
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2021-2024 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@ -12,8 +12,24 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "osal/osal_api.h"
|
||||
#include <semaphore.h>
|
||||
|
||||
typedef struct task_notifiers {
|
||||
sem_t sem;
|
||||
TaskHandle_t id;
|
||||
} task_notifiers_t;
|
||||
|
||||
typedef struct pthread_params {
|
||||
void *const param;
|
||||
TaskFunction_t task;
|
||||
bool started;
|
||||
TaskHandle_t handle;
|
||||
} pthread_params_t;
|
||||
|
||||
static uint64_t s_semaphore_data = 0;
|
||||
static task_notifiers_t *s_notifiers;
|
||||
static int s_threads = 0;
|
||||
pthread_mutex_t s_mutex;
|
||||
|
||||
typedef enum queue_type_tag {
|
||||
MUTEX_REC,
|
||||
@ -89,6 +105,7 @@ BaseType_t xSemaphoreGiveRecursive( QueueHandle_t xQueue)
|
||||
}
|
||||
return pdFALSE;
|
||||
}
|
||||
|
||||
BaseType_t xSemaphoreTake( QueueHandle_t xQueue, TickType_t pvTask )
|
||||
{
|
||||
struct generic_queue_handle *h = xQueue;
|
||||
@ -99,7 +116,6 @@ BaseType_t xSemaphoreTake( QueueHandle_t xQueue, TickType_t pvTask )
|
||||
return xQueueReceive(xQueue, &s_semaphore_data, portMAX_DELAY);
|
||||
}
|
||||
|
||||
|
||||
BaseType_t xSemaphoreTakeRecursive( QueueHandle_t xQueue, TickType_t pvTask )
|
||||
{
|
||||
struct generic_queue_handle *h = xQueue;
|
||||
@ -110,9 +126,6 @@ BaseType_t xSemaphoreTakeRecursive( QueueHandle_t xQueue, TickType_t pvTask )
|
||||
return pdFALSE;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void vQueueDelete( QueueHandle_t xQueue )
|
||||
{
|
||||
struct generic_queue_handle *h = xQueue;
|
||||
@ -128,8 +141,7 @@ void vQueueDelete( QueueHandle_t xQueue )
|
||||
|
||||
QueueHandle_t xSemaphoreCreateBinary(void)
|
||||
{
|
||||
QueueHandle_t sempaphore = xQueueCreate(1, 1);
|
||||
return sempaphore;
|
||||
return xQueueCreate(1, 1);
|
||||
}
|
||||
|
||||
QueueHandle_t xSemaphoreCreateMutex(void)
|
||||
@ -145,6 +157,13 @@ QueueHandle_t xSemaphoreCreateRecursiveMutex(void)
|
||||
|
||||
void vTaskDelete(TaskHandle_t *task)
|
||||
{
|
||||
for (int i = 0; i < s_threads; ++i) {
|
||||
if (task == s_notifiers[i].id) {
|
||||
sem_destroy(&s_notifiers[i].sem);
|
||||
s_notifiers[i].id = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (task == NULL) {
|
||||
pthread_exit(0);
|
||||
}
|
||||
@ -171,14 +190,21 @@ void vTaskDelay( const TickType_t xTicksToDelay )
|
||||
|
||||
void *pthread_task(void *params)
|
||||
{
|
||||
struct {
|
||||
void *const param;
|
||||
TaskFunction_t task;
|
||||
bool started;
|
||||
} *pthread_params = params;
|
||||
pthread_params_t *pthread_params = params;
|
||||
|
||||
void *const param = pthread_params->param;
|
||||
TaskFunction_t task = pthread_params->task;
|
||||
|
||||
pthread_params->handle = xTaskGetCurrentTaskHandle();
|
||||
if (s_threads == 0) {
|
||||
pthread_mutex_init(&s_mutex, NULL);
|
||||
}
|
||||
pthread_mutex_lock(&s_mutex);
|
||||
s_notifiers = realloc(s_notifiers, sizeof(struct task_notifiers) * (++s_threads));
|
||||
assert(s_notifiers);
|
||||
s_notifiers[s_threads - 1].id = pthread_params->handle;
|
||||
sem_init(&s_notifiers[s_threads - 1].sem, 0, 0);
|
||||
pthread_mutex_unlock(&s_mutex);
|
||||
pthread_params->started = true;
|
||||
|
||||
task(param);
|
||||
@ -198,16 +224,12 @@ BaseType_t xTaskCreatePinnedToCore( TaskFunction_t pvTaskCode,
|
||||
return pdTRUE;
|
||||
}
|
||||
|
||||
|
||||
BaseType_t xTaskCreate(TaskFunction_t pvTaskCode, const char *const pcName, const uint32_t usStackDepth, void *const pvParameters, UBaseType_t uxPriority, TaskHandle_t *const pvCreatedTask)
|
||||
{
|
||||
pthread_t new_thread = (pthread_t)NULL;
|
||||
pthread_attr_t attr;
|
||||
struct {
|
||||
void *const param;
|
||||
TaskFunction_t task;
|
||||
bool started;
|
||||
} pthread_params = { .param = pvParameters, .task = pvTaskCode};
|
||||
pthread_params_t pthread_params = { .param = pvParameters, .task = pvTaskCode};
|
||||
|
||||
int res = pthread_attr_init(&attr);
|
||||
assert(res == 0);
|
||||
res = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
|
||||
@ -215,20 +237,33 @@ BaseType_t xTaskCreate(TaskFunction_t pvTaskCode, const char *const pcName, cons
|
||||
res = pthread_create(&new_thread, &attr, pthread_task, &pthread_params);
|
||||
assert(res == 0);
|
||||
|
||||
if (pvCreatedTask) {
|
||||
*pvCreatedTask = (void *)new_thread;
|
||||
}
|
||||
|
||||
// just wait till the task started so we can unwind params from the stack
|
||||
while (pthread_params.started == false) {
|
||||
usleep(1000);
|
||||
}
|
||||
if (pvCreatedTask) {
|
||||
*pvCreatedTask = pthread_params.handle;
|
||||
}
|
||||
|
||||
return pdTRUE;
|
||||
}
|
||||
|
||||
void xTaskNotifyGive(TaskHandle_t task)
|
||||
{
|
||||
|
||||
int i = 0;
|
||||
while (true) {
|
||||
pthread_mutex_lock(&s_mutex);
|
||||
if (task == s_notifiers[i].id) {
|
||||
sem_post(&s_notifiers[i].sem);
|
||||
pthread_mutex_unlock(&s_mutex);
|
||||
return;
|
||||
}
|
||||
pthread_mutex_unlock(&s_mutex);
|
||||
if (++i == s_threads) {
|
||||
i = 0;
|
||||
}
|
||||
usleep(1000);
|
||||
}
|
||||
}
|
||||
|
||||
BaseType_t xTaskNotifyWait(uint32_t bits_entry_clear, uint32_t bits_exit_clear, uint32_t *value, TickType_t wait_time )
|
||||
@ -238,7 +273,7 @@ BaseType_t xTaskNotifyWait(uint32_t bits_entry_clear, uint32_t bits_exit_clear,
|
||||
|
||||
TaskHandle_t xTaskGetCurrentTaskHandle(void)
|
||||
{
|
||||
return NULL;
|
||||
return (TaskHandle_t)pthread_self();
|
||||
}
|
||||
|
||||
EventGroupHandle_t xEventGroupCreate( void )
|
||||
@ -270,3 +305,22 @@ EventBits_t xEventGroupWaitBits( EventGroupHandle_t xEventGroup, const EventBits
|
||||
{
|
||||
return osal_signal_wait(xEventGroup, uxBitsToWaitFor, xWaitForAllBits, xTicksToWait);
|
||||
}
|
||||
|
||||
void ulTaskNotifyTake(bool clear_on_exit, uint32_t xTicksToWait)
|
||||
{
|
||||
TaskHandle_t task = xTaskGetCurrentTaskHandle();
|
||||
int i = 0;
|
||||
while (true) {
|
||||
pthread_mutex_lock(&s_mutex);
|
||||
if (task == s_notifiers[i].id) {
|
||||
pthread_mutex_unlock(&s_mutex);
|
||||
sem_wait(&s_notifiers[i].sem);
|
||||
return;
|
||||
}
|
||||
pthread_mutex_unlock(&s_mutex);
|
||||
if (++i == s_threads) {
|
||||
i = 0;
|
||||
}
|
||||
usleep(1000);
|
||||
}
|
||||
}
|
||||
|
@ -5,6 +5,7 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
|
@ -0,0 +1,6 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Unlicense OR CC0-1.0
|
||||
*/
|
||||
#pragma once
|
@ -11,6 +11,7 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define tskNO_AFFINITY ( ( BaseType_t ) 0x7FFFFFFF )
|
||||
#define TaskHandle_t TaskHandle_t
|
||||
#define vSemaphoreDelete( xSemaphore ) vQueueDelete( ( QueueHandle_t ) ( xSemaphore ) )
|
||||
|
||||
@ -18,6 +19,8 @@ void vTaskDelay( const TickType_t xTicksToDelay );
|
||||
|
||||
void xTaskNotifyGive(TaskHandle_t task);
|
||||
|
||||
void ulTaskNotifyTake(bool stuff, uint32_t timeout);
|
||||
|
||||
TaskHandle_t xTaskGetCurrentTaskHandle(void);
|
||||
|
||||
BaseType_t xTaskNotifyWait(uint32_t bits_entry_clear, uint32_t bits_exit_clear, uint32_t *value, TickType_t wait_time );
|
||||
|
@ -3,6 +3,6 @@ commitizen:
|
||||
bump_message: 'bump(console): $current_version -> $new_version'
|
||||
pre_bump_hooks: python ../../ci/changelog.py console_cmd_ping
|
||||
tag_format: console_cmd_ping-v$version
|
||||
version: 1.0.0
|
||||
version: 1.1.0
|
||||
version_files:
|
||||
- idf_component.yml
|
||||
|
@ -1,5 +1,11 @@
|
||||
# Changelog
|
||||
|
||||
## [1.1.0](https://github.com/espressif/esp-protocols/commits/console_cmd_ping-v1.1.0)
|
||||
|
||||
### Features
|
||||
|
||||
- Added command getaddrinfo, set/get dnsserver to console_cmd_ping ([b80c19d7](https://github.com/espressif/esp-protocols/commit/b80c19d7))
|
||||
|
||||
## [1.0.0](https://github.com/espressif/esp-protocols/commits/console_cmd_ping-v1.0.0)
|
||||
|
||||
### Features
|
||||
|
@ -1,4 +1,10 @@
|
||||
idf_component_register(SRCS "console_ping.c"
|
||||
idf_component_register(SRCS "console_ping.c" "console_getaddrinfo.c" "console_getsetdnsserver.c"
|
||||
INCLUDE_DIRS "."
|
||||
PRIV_REQUIRES esp_netif console
|
||||
WHOLE_ARCHIVE)
|
||||
PRIV_REQUIRES esp_netif console)
|
||||
|
||||
if(CONFIG_PING_CMD_AUTO_REGISTRATION)
|
||||
target_link_libraries(${COMPONENT_LIB} "-u console_cmd_ping_register")
|
||||
target_link_libraries(${COMPONENT_LIB} "-u console_cmd_getaddrinfo_register")
|
||||
target_link_libraries(${COMPONENT_LIB} "-u console_cmd_setdnsserver_register")
|
||||
target_link_libraries(${COMPONENT_LIB} "-u console_cmd_getdnsserver_register")
|
||||
endif()
|
||||
|
9
components/console_cmd_ping/Kconfig.projbuild
Normal file
9
components/console_cmd_ping/Kconfig.projbuild
Normal file
@ -0,0 +1,9 @@
|
||||
menu "Ping command Configuration"
|
||||
|
||||
config PING_CMD_AUTO_REGISTRATION
|
||||
bool "Enable Console command ping/dns Auto-registration"
|
||||
default y
|
||||
help
|
||||
Enabling this allows for the autoregistration of the ping and dns commands.
|
||||
|
||||
endmenu
|
@ -1,5 +1,5 @@
|
||||
# Console command ping
|
||||
The component provides a console where the 'ping' command can be executed.
|
||||
# Console command ping and DNS server configuration
|
||||
The component provides a console where the 'ping' command, 'getaddrinfo', and DNS server configuration commands can be executed.
|
||||
|
||||
## API
|
||||
|
||||
@ -27,8 +27,11 @@ The component provides a console where the 'ping' command can be executed.
|
||||
// Register all plugin command added to your project
|
||||
ESP_ERROR_CHECK(console_cmd_all_register());
|
||||
|
||||
// To register only ifconfig command skip calling console_cmd_all_register()
|
||||
// To register only ping/dns command skip calling console_cmd_all_register()
|
||||
ESP_ERROR_CHECK(console_cmd_ping_register());
|
||||
ESP_ERROR_CHECK(console_cmd_getaddrinfo_register());
|
||||
ESP_ERROR_CHECK(console_cmd_setdnsserver_register());
|
||||
ESP_ERROR_CHECK(console_cmd_getdnsserver_register());
|
||||
|
||||
ESP_ERROR_CHECK(console_cmd_start()); // Start console
|
||||
```
|
||||
@ -36,6 +39,8 @@ The component provides a console where the 'ping' command can be executed.
|
||||
### Adding a plugin command or component:
|
||||
To add a plugin command or any component from IDF component manager into your project, simply include an entry within the `idf_component.yml` file.
|
||||
|
||||
Note: **Auto-registration** of a specific plugin command can be disabled from menuconfig.
|
||||
|
||||
For more details refer [IDF Component Manager](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/tools/idf-component-manager.html)
|
||||
|
||||
|
||||
@ -52,4 +57,72 @@ ping [-W <t>] [-i <t>] [-s <n>] [-c <n>] [-Q <n>] [-T <n>] <host>
|
||||
-Q, --tos=<n> Set Type of Service related bits in IP datagrams
|
||||
-T, --ttl=<n> Set Time to Live related bits in IP datagrams
|
||||
<host> Host address
|
||||
|
||||
getaddrinfo [-f <AF>] [-F <FLAGS>]... [-p <port>] <hostname>
|
||||
Usage: getaddrinfo [options] <hostname> [service]
|
||||
-f, --family=<AF> Address family (AF_INET, AF_INET6, AF_UNSPEC).
|
||||
-F, --flags=<FLAGS> Special flags (AI_PASSIVE, AI_CANONNAME, AI_NUMERICHOST, AI_V4MAPPED, AI_ALL).
|
||||
-p, --port=<port> String containing a numeric port number.
|
||||
<hostname> Host address
|
||||
|
||||
setdnsserver <main> [backup] [fallback]
|
||||
Usage: setdnsserver <main> [backup] [fallback]
|
||||
<main> The main DNS server IP address.
|
||||
backup The secondary DNS server IP address (optional).
|
||||
fallback The fallback DNS server IP address (optional).
|
||||
|
||||
getdnsserver
|
||||
Usage: getdnsserver
|
||||
```
|
||||
These commands allow you to configure and retrieve DNS server settings on your ESP32 device, in addition to the existing ping functionality.
|
||||
|
||||
## Usage
|
||||
### Using the setdnsserver command:
|
||||
1. To set the main DNS server:
|
||||
```
|
||||
setdnsserver 8.8.8.8
|
||||
```
|
||||
|
||||
2. To set the main and backup DNS servers:
|
||||
|
||||
```
|
||||
setdnsserver 8.8.8.8 fe80::b0be:83ff:fe77:dd64
|
||||
```
|
||||
|
||||
3. To set the main, backup, and fallback DNS servers:
|
||||
|
||||
```
|
||||
setdnsserver 8.8.8.8 fe80::b0be:83ff:fe77:dd64 www.xyz.com
|
||||
```
|
||||
|
||||
### Using the getdnsserver command:
|
||||
To get the current DNS server settings:
|
||||
```
|
||||
getdnsserver
|
||||
```
|
||||
|
||||
### Using the getaddrinfo command:
|
||||
1. To get address information for a hostname:
|
||||
|
||||
```
|
||||
getaddrinfo www.example.com
|
||||
```
|
||||
|
||||
2. To specify additional options:
|
||||
|
||||
```
|
||||
getaddrinfo -f AF_INET -F AI_PASSIVE www.example.com
|
||||
```
|
||||
|
||||
### Using the ping command:
|
||||
1. To ping a host:
|
||||
|
||||
```
|
||||
ping www.example.com
|
||||
```
|
||||
|
||||
2. To specify additional options, such as timeout, interval, packet size, etc.:
|
||||
|
||||
```
|
||||
ping -W 5 -i 1 -s 64 -c 4 -Q 0x10 -T 64 www.example.com
|
||||
```
|
||||
|
180
components/console_cmd_ping/console_getaddrinfo.c
Normal file
180
components/console_cmd_ping/console_getaddrinfo.c
Normal file
@ -0,0 +1,180 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2023-2024 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include "sdkconfig.h"
|
||||
#include "lwip/inet.h"
|
||||
#include "lwip/netdb.h"
|
||||
#include "lwip/sockets.h"
|
||||
#include "esp_console.h"
|
||||
#include "esp_log.h"
|
||||
#include "argtable3/argtable3.h"
|
||||
#include <netdb.h>
|
||||
#include "console_ping.h"
|
||||
|
||||
|
||||
static const char *TAG = "console_getaddrinfo";
|
||||
|
||||
#if CONFIG_PING_CMD_AUTO_REGISTRATION
|
||||
/**
|
||||
* @brief Static registration of the getaddrinfo command plugin.
|
||||
*
|
||||
* This section registers the plugin description structure and places it into
|
||||
* the .console_cmd_desc section, as determined by the linker.lf file in the
|
||||
* 'plugins' component.
|
||||
*/
|
||||
static const console_cmd_plugin_desc_t __attribute__((section(".console_cmd_desc"), used)) PLUGIN = {
|
||||
.name = "console_cmd_getddrinfo",
|
||||
.plugin_regd_fn = &console_cmd_getaddrinfo_register
|
||||
};
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Structure to hold arguments for the getaddrinfo command.
|
||||
*/
|
||||
static struct {
|
||||
struct arg_str *family;
|
||||
struct arg_str *flags;
|
||||
struct arg_str *port_nr;
|
||||
struct arg_str *hostname;
|
||||
struct arg_end *end;
|
||||
} getddrinfo_args;
|
||||
|
||||
/**
|
||||
* @brief Executes the getaddrinfo command.
|
||||
*
|
||||
* This function parses arguments, sets hints for address resolution, and calls
|
||||
* getaddrinfo to resolve the hostname. It then prints the resolved IP addresses
|
||||
* and associated information.
|
||||
*
|
||||
* @param argc Argument count
|
||||
* @param argv Argument vector
|
||||
*
|
||||
* @return int Returns 0 on success, 1 on error.
|
||||
*/
|
||||
static int do_getddrinfo_cmd(int argc, char **argv)
|
||||
{
|
||||
char ip_str[INET6_ADDRSTRLEN];
|
||||
struct addrinfo hint = {0};
|
||||
struct addrinfo *res = NULL, *res_tmp = NULL;
|
||||
const char *port_nr_str = NULL;
|
||||
int ret = 0;
|
||||
|
||||
int nerrors = arg_parse(argc, argv, (void **)&getddrinfo_args);
|
||||
if (nerrors != 0) {
|
||||
arg_print_errors(stderr, getddrinfo_args.end, argv[0]);
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Set the address family */
|
||||
if (getddrinfo_args.family->count > 0) {
|
||||
if (strcmp(getddrinfo_args.family->sval[0], "AF_INET") == 0) {
|
||||
hint.ai_family = AF_INET;
|
||||
} else if (strcmp(getddrinfo_args.family->sval[0], "AF_INET6") == 0) {
|
||||
hint.ai_family = AF_INET6;
|
||||
} else if (strcmp(getddrinfo_args.family->sval[0], "AF_UNSPEC") == 0) {
|
||||
hint.ai_family = AF_UNSPEC;
|
||||
} else {
|
||||
ESP_LOGE(TAG, "Unknown family");
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
/* Set the flags */
|
||||
if (getddrinfo_args.flags->count > 0) {
|
||||
for (int i = 0; i < getddrinfo_args.flags->count; i++) {
|
||||
if (strcmp(getddrinfo_args.flags->sval[i], "AI_PASSIVE") == 0) {
|
||||
hint.ai_flags |= AI_PASSIVE;
|
||||
} else if (strcmp(getddrinfo_args.flags->sval[i], "AI_CANONNAME") == 0) {
|
||||
hint.ai_flags |= AI_CANONNAME;
|
||||
} else if (strcmp(getddrinfo_args.flags->sval[i], "AI_NUMERICHOST") == 0) {
|
||||
hint.ai_flags |= AI_NUMERICHOST;
|
||||
} else if (strcmp(getddrinfo_args.flags->sval[i], "AI_V4MAPPED") == 0) {
|
||||
hint.ai_flags |= AI_V4MAPPED;
|
||||
} else if (strcmp(getddrinfo_args.flags->sval[i], "AI_ALL") == 0) {
|
||||
hint.ai_flags |= AI_ALL;
|
||||
} else {
|
||||
ESP_LOGE(TAG, "Unknown flag: %s", getddrinfo_args.flags->sval[i]);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (getddrinfo_args.port_nr->count > 0) {
|
||||
port_nr_str = getddrinfo_args.port_nr->sval[0];
|
||||
}
|
||||
|
||||
/* Convert hostname to IP address */
|
||||
if (!strcmp(getddrinfo_args.hostname->sval[0], "NULL")) {
|
||||
ret = getaddrinfo(NULL, port_nr_str, &hint, &res);
|
||||
} else {
|
||||
ret = getaddrinfo(getddrinfo_args.hostname->sval[0], port_nr_str, &hint, &res);
|
||||
}
|
||||
|
||||
if (ret != 0) {
|
||||
printf("getddrinfo: Failure host:%s(ERROR: %d)\n", getddrinfo_args.hostname->sval[0], ret);
|
||||
ESP_LOGE(TAG, "Failure host");
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Iterate through the results from getaddrinfo */
|
||||
for (res_tmp = res; res_tmp != NULL; res_tmp = res_tmp->ai_next) {
|
||||
|
||||
if (res_tmp->ai_family == AF_INET) {
|
||||
inet_ntop(AF_INET, &((struct sockaddr_in *)res_tmp->ai_addr)->sin_addr, ip_str, INET_ADDRSTRLEN);
|
||||
printf("\tIP Address: %s\n", ip_str);
|
||||
printf("\tAddress Family: AF_INET\n");
|
||||
} else if (res_tmp->ai_family == AF_INET6) {
|
||||
inet_ntop(AF_INET6, &((struct sockaddr_in6 *)res_tmp->ai_addr)->sin6_addr, ip_str, INET6_ADDRSTRLEN);
|
||||
printf("\tIP Address: %s\n", ip_str);
|
||||
printf("\tAddress Family: AF_INET6\n");
|
||||
} else {
|
||||
ESP_LOGE(TAG, "ai_family Unknown: %d\n", res_tmp->ai_family);
|
||||
}
|
||||
|
||||
/* Print the protocol used */
|
||||
printf("\tProtocol: %d\n", res_tmp->ai_protocol);
|
||||
|
||||
/* Print the canonical name if available */
|
||||
if (res_tmp->ai_canonname) {
|
||||
printf("\tCanonical Name: %s\n", res_tmp->ai_canonname);
|
||||
}
|
||||
}
|
||||
|
||||
freeaddrinfo(res);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Registers the getaddrinfo command.
|
||||
*
|
||||
* @return esp_err_t Returns ESP_OK on success, or an error code on failure.
|
||||
*/
|
||||
esp_err_t console_cmd_getaddrinfo_register(void)
|
||||
{
|
||||
esp_err_t ret;
|
||||
|
||||
getddrinfo_args.family = arg_str0("f", "family", "<AF>", "Address family (AF_INET, AF_INET6, AF_UNSPEC).");
|
||||
getddrinfo_args.flags = arg_strn("F", "flags", "<FLAGS>", 0, 5, "Special flags (AI_PASSIVE, AI_CANONNAME, AI_NUMERICHOST, AI_V4MAPPED, AI_ALL).");
|
||||
getddrinfo_args.port_nr = arg_str0("p", "port", "<port>", "String containing a numeric port number.");
|
||||
getddrinfo_args.hostname = arg_str1(NULL, NULL, "<hostname>", "Host address");
|
||||
getddrinfo_args.end = arg_end(1);
|
||||
const esp_console_cmd_t getddrinfo_cmd = {
|
||||
.command = "getaddrinfo",
|
||||
.help = "Usage: getaddrinfo [options] <hostname> [service]",
|
||||
.hint = NULL,
|
||||
.func = &do_getddrinfo_cmd,
|
||||
.argtable = &getddrinfo_args
|
||||
};
|
||||
|
||||
ret = esp_console_cmd_register(&getddrinfo_cmd);
|
||||
if (ret) {
|
||||
ESP_LOGE(TAG, "Unable to register getddrinfo");
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
279
components/console_cmd_ping/console_getsetdnsserver.c
Normal file
279
components/console_cmd_ping/console_getsetdnsserver.c
Normal file
@ -0,0 +1,279 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2023-2024 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include "sdkconfig.h"
|
||||
#include "lwip/inet.h"
|
||||
#include "lwip/netdb.h"
|
||||
#include "lwip/sockets.h"
|
||||
#include "esp_console.h"
|
||||
#include "esp_netif.h"
|
||||
#include "lwip/netdb.h"
|
||||
#include "esp_log.h"
|
||||
#include "argtable3/argtable3.h"
|
||||
#include <netdb.h>
|
||||
#include "console_ping.h"
|
||||
|
||||
|
||||
static const char *TAG = "console_setdnsserver";
|
||||
|
||||
#if CONFIG_PING_CMD_AUTO_REGISTRATION
|
||||
static esp_err_t console_cmd_dnscmd_register(void);
|
||||
|
||||
/**
|
||||
* @brief Static registration of the getaddrinfo command plugin.
|
||||
*
|
||||
* This section registers the plugin description structure and places it into
|
||||
* the .console_cmd_desc section, as determined by the linker.lf file in the
|
||||
* 'plugins' component.
|
||||
*/
|
||||
static const console_cmd_plugin_desc_t __attribute__((section(".console_cmd_desc"), used)) PLUGIN = {
|
||||
.name = "console_cmd_dnscmd",
|
||||
.plugin_regd_fn = &console_cmd_dnscmd_register
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @brief Registers the DNS commands (setdnsserver and getdnsserver) with the console.
|
||||
*
|
||||
* @return esp_err_t Returns ESP_OK.
|
||||
*/
|
||||
static esp_err_t console_cmd_dnscmd_register(void)
|
||||
{
|
||||
console_cmd_setdnsserver_register();
|
||||
console_cmd_getdnsserver_register();
|
||||
|
||||
return ESP_OK;
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Structure to hold arguments for the setdnsserver command.
|
||||
*/
|
||||
static struct {
|
||||
struct arg_str *main;
|
||||
struct arg_str *backup;
|
||||
struct arg_str *fallback;
|
||||
struct arg_end *end;
|
||||
} setdnsserver_args;
|
||||
|
||||
/**
|
||||
* @brief Sets the DNS server address for all network interfaces.
|
||||
*
|
||||
* This function iterates over all network interfaces available on the ESP32 device
|
||||
* and sets the DNS server address for the specified DNS type (main, backup, or fallback).
|
||||
* The DNS address is only set if a valid address is provided (non-zero and not equal to IPADDR_NONE).
|
||||
*
|
||||
* @param server IP address of the DNS server.
|
||||
* @param type Type of the DNS server (main, backup, fallback).
|
||||
*
|
||||
* @return esp_err_t Returns ESP_OK on success, or an error code on failure.
|
||||
*/
|
||||
static esp_err_t set_dns_server(const char *server, esp_netif_dns_type_t type)
|
||||
{
|
||||
int ret = 0;
|
||||
struct addrinfo hint = {0};
|
||||
struct addrinfo *res = NULL, *res_tmp = NULL;
|
||||
esp_netif_t *esp_netif = NULL;
|
||||
esp_netif_dns_info_t dns;
|
||||
int addr_cnt = 0;
|
||||
|
||||
ret = getaddrinfo(server, NULL, &hint, &res);
|
||||
if (ret != 0) {
|
||||
printf("setdnsserver: Failure host:%s(ERROR: %d)\n", server, ret);
|
||||
ESP_LOGE(TAG, "Failure host");
|
||||
return 1;
|
||||
}
|
||||
|
||||
for (res_tmp = res; res_tmp != NULL; res_tmp = res_tmp->ai_next) {
|
||||
|
||||
if (addr_cnt == 0) {
|
||||
if (res_tmp->ai_family == AF_INET) {
|
||||
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 2, 0)
|
||||
while ((esp_netif = esp_netif_next_unsafe(esp_netif)) != NULL) {
|
||||
#else
|
||||
while ((esp_netif = esp_netif_next(esp_netif)) != NULL) {
|
||||
#endif
|
||||
struct sockaddr_in *ipv4 = (struct sockaddr_in *)res_tmp->ai_addr;
|
||||
dns.ip.u_addr.ip4.addr = ipv4->sin_addr.s_addr;
|
||||
dns.ip.type = IPADDR_TYPE_V4;
|
||||
ESP_ERROR_CHECK(esp_netif_set_dns_info(esp_netif, type, &dns));
|
||||
}
|
||||
} else if (res_tmp->ai_family == AF_INET6) {
|
||||
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 2, 0)
|
||||
while ((esp_netif = esp_netif_next_unsafe(esp_netif)) != NULL) {
|
||||
#else
|
||||
while ((esp_netif = esp_netif_next(esp_netif)) != NULL) {
|
||||
#endif
|
||||
struct sockaddr_in6 *ipv6 = (struct sockaddr_in6 *)res_tmp->ai_addr;
|
||||
memcpy(dns.ip.u_addr.ip6.addr, &ipv6->sin6_addr, sizeof(dns.ip.u_addr.ip6.addr));
|
||||
dns.ip.type = IPADDR_TYPE_V6;
|
||||
ESP_ERROR_CHECK(esp_netif_set_dns_info(esp_netif, type, &dns));
|
||||
}
|
||||
} else {
|
||||
ESP_LOGE(TAG, "ai_family Unknown: %d\n", res_tmp->ai_family);
|
||||
}
|
||||
}
|
||||
addr_cnt++;
|
||||
}
|
||||
|
||||
freeaddrinfo(res);
|
||||
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Command handler for setting DNS server addresses.
|
||||
*
|
||||
* @param argc Argument count.
|
||||
* @param argv Argument values.
|
||||
*
|
||||
* @return int: 0 on success, 1 on error.
|
||||
*/
|
||||
static int do_setdnsserver_cmd(int argc, char **argv)
|
||||
{
|
||||
int nerrors = arg_parse(argc, argv, (void **)&setdnsserver_args);
|
||||
if (nerrors != 0) {
|
||||
arg_print_errors(stderr, setdnsserver_args.end, argv[0]);
|
||||
return 1;
|
||||
}
|
||||
|
||||
set_dns_server(setdnsserver_args.main->sval[0], ESP_NETIF_DNS_MAIN);
|
||||
|
||||
if (setdnsserver_args.backup->count > 0) {
|
||||
set_dns_server(setdnsserver_args.backup->sval[0], ESP_NETIF_DNS_BACKUP);
|
||||
}
|
||||
|
||||
if (setdnsserver_args.fallback->count > 0) {
|
||||
set_dns_server(setdnsserver_args.fallback->sval[0], ESP_NETIF_DNS_FALLBACK);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Registers the setdnsserver command.
|
||||
*
|
||||
* @return esp_err_t Returns ESP_OK on success, or an error code on failure.
|
||||
*/
|
||||
esp_err_t console_cmd_setdnsserver_register(void)
|
||||
{
|
||||
esp_err_t ret;
|
||||
|
||||
setdnsserver_args.main = arg_str1(NULL, NULL, "<main>", "The main DNS server IP address.");
|
||||
setdnsserver_args.backup = arg_str0(NULL, NULL, "backup", "The secondary DNS server IP address (optional).");
|
||||
setdnsserver_args.fallback = arg_str0(NULL, NULL, "fallback", "The fallback DNS server IP address (optional).");
|
||||
setdnsserver_args.end = arg_end(1);
|
||||
const esp_console_cmd_t setdnsserver_cmd = {
|
||||
.command = "setdnsserver",
|
||||
.help = "Usage: setdnsserver <main> [backup] [fallback]",
|
||||
.hint = NULL,
|
||||
.func = &do_setdnsserver_cmd,
|
||||
.argtable = &setdnsserver_args
|
||||
};
|
||||
|
||||
ret = esp_console_cmd_register(&setdnsserver_cmd);
|
||||
if (ret) {
|
||||
ESP_LOGE(TAG, "Unable to register setdnsserver");
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Structure to hold arguments for the getdnsserver command.
|
||||
*/
|
||||
static struct {
|
||||
struct arg_end *end;
|
||||
} getdnsserver_args;
|
||||
|
||||
/**
|
||||
* @brief Command handler for getting DNS server addresses.
|
||||
*
|
||||
* @param argc Argument count.
|
||||
* @param argv Argument values.
|
||||
*
|
||||
* @return int: 0 on success, 1 on error.
|
||||
*/
|
||||
static int do_getdnsserver_cmd(int argc, char **argv)
|
||||
{
|
||||
esp_netif_t *esp_netif = NULL;
|
||||
esp_netif_dns_info_t dns_info;
|
||||
char interface[10];
|
||||
esp_err_t ret = ESP_FAIL;
|
||||
|
||||
int nerrors = arg_parse(argc, argv, (void **)&getdnsserver_args);
|
||||
if (nerrors != 0) {
|
||||
arg_print_errors(stderr, getdnsserver_args.end, argv[0]);
|
||||
return 1;
|
||||
}
|
||||
|
||||
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 2, 0)
|
||||
while ((esp_netif = esp_netif_next_unsafe(esp_netif)) != NULL) {
|
||||
#else
|
||||
while ((esp_netif = esp_netif_next(esp_netif)) != NULL) {
|
||||
#endif
|
||||
|
||||
/* Print Interface Name and Number */
|
||||
ret = esp_netif_get_netif_impl_name(esp_netif, interface);
|
||||
if ((ESP_FAIL == ret) || (NULL == esp_netif)) {
|
||||
ESP_LOGE(TAG, "No interface available");
|
||||
return 1;
|
||||
}
|
||||
|
||||
printf("Interface Name: %s\n", interface);
|
||||
ESP_ERROR_CHECK(esp_netif_get_dns_info(esp_netif, ESP_NETIF_DNS_MAIN, &dns_info));
|
||||
if (dns_info.ip.type == ESP_IPADDR_TYPE_V4) {
|
||||
printf("Main DNS server : " IPSTR "\n", IP2STR(&dns_info.ip.u_addr.ip4));
|
||||
} else if (dns_info.ip.type == ESP_IPADDR_TYPE_V6) {
|
||||
printf("Main DNS server : " IPV6STR "\n", IPV62STR(dns_info.ip.u_addr.ip6));
|
||||
}
|
||||
|
||||
ESP_ERROR_CHECK(esp_netif_get_dns_info(esp_netif, ESP_NETIF_DNS_BACKUP, &dns_info));
|
||||
if (dns_info.ip.type == ESP_IPADDR_TYPE_V4) {
|
||||
printf("Backup DNS server : " IPSTR "\n", IP2STR(&dns_info.ip.u_addr.ip4));
|
||||
} else if (dns_info.ip.type == ESP_IPADDR_TYPE_V6) {
|
||||
printf("Backup DNS server : " IPV6STR "\n", IPV62STR(dns_info.ip.u_addr.ip6));
|
||||
}
|
||||
|
||||
ESP_ERROR_CHECK(esp_netif_get_dns_info(esp_netif, ESP_NETIF_DNS_FALLBACK, &dns_info));
|
||||
if (dns_info.ip.type == ESP_IPADDR_TYPE_V4) {
|
||||
printf("Fallback DNS server : " IPSTR "\n", IP2STR(&dns_info.ip.u_addr.ip4));
|
||||
} else if (dns_info.ip.type == ESP_IPADDR_TYPE_V6) {
|
||||
printf("Fallback DNS server : " IPV6STR "\n", IPV62STR(dns_info.ip.u_addr.ip6));
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Registers the getdnsserver command.
|
||||
*
|
||||
* @return esp_err_t Returns ESP_OK on success, or an error code on failure.
|
||||
*/
|
||||
esp_err_t console_cmd_getdnsserver_register(void)
|
||||
{
|
||||
esp_err_t ret;
|
||||
|
||||
getdnsserver_args.end = arg_end(1);
|
||||
const esp_console_cmd_t getdnsserver_cmd = {
|
||||
.command = "getdnsserver",
|
||||
.help = "Usage: getdnsserver",
|
||||
.hint = NULL,
|
||||
.func = &do_getdnsserver_cmd,
|
||||
.argtable = &getdnsserver_args
|
||||
};
|
||||
|
||||
ret = esp_console_cmd_register(&getdnsserver_cmd);
|
||||
if (ret) {
|
||||
ESP_LOGE(TAG, "Unable to register getdnsserver");
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2023-2024 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@ -20,7 +20,7 @@
|
||||
static const char *TAG = "console_ping";
|
||||
SemaphoreHandle_t sync_semaphore;
|
||||
|
||||
|
||||
#if CONFIG_PING_CMD_AUTO_REGISTRATION
|
||||
/**
|
||||
* Static registration of this plugin is achieved by defining the plugin description
|
||||
* structure and placing it into .console_cmd_desc section.
|
||||
@ -30,7 +30,7 @@ static const console_cmd_plugin_desc_t __attribute__((section(".console_cmd_desc
|
||||
.name = "console_cmd_ping",
|
||||
.plugin_regd_fn = &console_cmd_ping_register
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
static void cmd_ping_on_ping_success(esp_ping_handle_t hdl, void *args)
|
||||
{
|
||||
@ -75,9 +75,13 @@ static void cmd_ping_on_ping_end(esp_ping_handle_t hdl, void *args)
|
||||
loss = 0;
|
||||
}
|
||||
if (IP_IS_V4(&target_addr)) {
|
||||
#if CONFIG_LWIP_IPV4
|
||||
printf("\n--- %s ping statistics ---\n", inet_ntoa(*ip_2_ip4(&target_addr)));
|
||||
#endif
|
||||
} else {
|
||||
#if CONFIG_LWIP_IPV6
|
||||
printf("\n--- %s ping statistics ---\n", inet6_ntoa(*ip_2_ip6(&target_addr)));
|
||||
#endif
|
||||
}
|
||||
printf("%" PRIu32 " packets transmitted, %" PRIu32 " received, %" PRIu32 "%% packet loss, time %" PRIu32 "ms\n",
|
||||
transmitted, received, loss, total_time_ms);
|
||||
@ -150,11 +154,15 @@ static int do_ping_cmd(int argc, char **argv)
|
||||
return 1;
|
||||
}
|
||||
if (res->ai_family == AF_INET) {
|
||||
#if CONFIG_LWIP_IPV4
|
||||
struct in_addr addr4 = ((struct sockaddr_in *) (res->ai_addr))->sin_addr;
|
||||
inet_addr_to_ip4addr(ip_2_ip4(&target_addr), &addr4);
|
||||
#endif
|
||||
} else {
|
||||
#if CONFIG_LWIP_IPV6
|
||||
struct in6_addr addr6 = ((struct sockaddr_in6 *) (res->ai_addr))->sin6_addr;
|
||||
inet6_addr_to_ip6addr(ip_2_ip6(&target_addr), &addr6);
|
||||
#endif
|
||||
}
|
||||
freeaddrinfo(res);
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2023-2024 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@ -20,6 +20,30 @@ extern "C" {
|
||||
*/
|
||||
esp_err_t console_cmd_ping_register(void);
|
||||
|
||||
/**
|
||||
* @brief Registers the getddrinfo command.
|
||||
*
|
||||
* @return
|
||||
* - esp_err_t
|
||||
*/
|
||||
esp_err_t console_cmd_getaddrinfo_register(void);
|
||||
|
||||
/**
|
||||
* @brief Registers the setdnsserver command.
|
||||
*
|
||||
* @return
|
||||
* - esp_err_t
|
||||
*/
|
||||
esp_err_t console_cmd_setdnsserver_register(void);
|
||||
|
||||
/**
|
||||
* @brief Registers the setdnsserver command.
|
||||
*
|
||||
* @return
|
||||
* - esp_err_t
|
||||
*/
|
||||
esp_err_t console_cmd_getdnsserver_register(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@ -1,4 +1,4 @@
|
||||
version: 1.0.0
|
||||
version: 1.1.0
|
||||
url: https://github.com/espressif/esp-protocols/tree/master/components/console_cmd_ping
|
||||
description: The component provides a console where the 'ping' command can be executed.
|
||||
dependencies:
|
||||
|
@ -63,4 +63,17 @@ menu "esp-modem"
|
||||
dce_factory::Factory::create_unique_dce_from<CustomModule, DCE*>(dce_config, std::move(dte), netif)
|
||||
Please refer to the pppos_client example for more details.
|
||||
|
||||
config ESP_MODEM_C_API_STR_MAX
|
||||
int "Size in bytes for response from AT commands returning textual values (C-API)"
|
||||
default 128
|
||||
help
|
||||
Some AT commands returns textual values which C-API copy as c-string to user allocated space,
|
||||
it also truncates the output data to this size. Increase this if some AT answers are truncated.
|
||||
|
||||
config ESP_MODEM_URC_HANDLER
|
||||
bool "Enable support for adding URC handler"
|
||||
default n
|
||||
help
|
||||
If enabled, APIs to add URC handler are available
|
||||
|
||||
endmenu
|
||||
|
@ -56,7 +56,7 @@ DCE *esp_modem_create_custom_dce(const esp_modem_dce_config_t *dce_config, std::
|
||||
/**
|
||||
* @brief This API is only needed for extending standard C-API, since we added get_time() method to our CustomModule
|
||||
*
|
||||
* @note This header is included from esp_modem_c_api.cpp, so it could use ESP_MODEM_C_API_STR_MAX macro
|
||||
* @note This header is included from esp_modem_c_api.cpp, so it could use CONFIG_ESP_MODEM_C_API_STR_MAX macro
|
||||
* indicating maximum C-API string size
|
||||
*
|
||||
* @note In order to access the newly added API get_time(), we have to static_cast<> the GenericModule from DCE
|
||||
@ -70,10 +70,10 @@ extern "C" esp_err_t esp_modem_get_time(esp_modem_dce_t *dce_wrap, char *p_time)
|
||||
if (dce_wrap == nullptr || dce_wrap->dce == nullptr) {
|
||||
return ESP_ERR_INVALID_ARG;
|
||||
}
|
||||
std::string time{ESP_MODEM_C_API_STR_MAX};
|
||||
std::string time{CONFIG_ESP_MODEM_C_API_STR_MAX};
|
||||
auto ret = command_response_to_esp_err(static_cast<SIM7600_WITH_TIME *>(dce_wrap->dce->get_module())->get_time(time));
|
||||
if (ret == ESP_OK && !time.empty()) {
|
||||
strlcpy(p_time, time.c_str(), ESP_MODEM_C_API_STR_MAX);
|
||||
strlcpy(p_time, time.c_str(), CONFIG_ESP_MODEM_C_API_STR_MAX);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
@ -129,4 +129,16 @@ menu "Example Configuration"
|
||||
help
|
||||
URL of an mqtt broker which this example connects to.
|
||||
|
||||
config EXAMPLE_MQTT_TEST_TOPIC
|
||||
string "MQTT topic to publish/subscribe"
|
||||
default "/topic/esp-pppos"
|
||||
help
|
||||
MQTT topic, which we subscribe on and publish to.
|
||||
|
||||
config EXAMPLE_MQTT_TEST_DATA
|
||||
string "MQTT data to publish/receive"
|
||||
default "esp32-pppos"
|
||||
help
|
||||
MQTT data message, which we publish and expect to receive.
|
||||
|
||||
endmenu
|
||||
|
@ -234,8 +234,8 @@ extern "C" void app_main(void)
|
||||
}
|
||||
std::cout << "Connected" << std::endl;
|
||||
|
||||
mqtt.subscribe("/topic/esp-modem");
|
||||
mqtt.publish("/topic/esp-modem", "Hello modem");
|
||||
mqtt.subscribe(CONFIG_EXAMPLE_MQTT_TEST_TOPIC);
|
||||
mqtt.publish(CONFIG_EXAMPLE_MQTT_TEST_TOPIC, CONFIG_EXAMPLE_MQTT_TEST_DATA);
|
||||
if (!handler.wait_for(StatusHandler::MQTT_Data, 60000)) {
|
||||
ESP_LOGE(TAG, "Didn't receive published data within specified timeout... exiting");
|
||||
return;
|
||||
|
@ -1,4 +1,4 @@
|
||||
# SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-FileCopyrightText: 2023-2024 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-License-Identifier: Unlicense OR CC0-1.0
|
||||
from __future__ import print_function, unicode_literals
|
||||
|
||||
@ -10,8 +10,17 @@ def test_cmux_connection(dut):
|
||||
2. checks we get an IP
|
||||
3. checks for the MQTT events
|
||||
"""
|
||||
# Get topic and data from Kconfig
|
||||
topic = ''
|
||||
data = ''
|
||||
try:
|
||||
topic = dut.app.sdkconfig.get('EXAMPLE_MQTT_TEST_TOPIC')
|
||||
data = dut.app.sdkconfig.get('EXAMPLE_MQTT_TEST_DATA')
|
||||
except Exception:
|
||||
print('ENV_TEST_FAILURE: Cannot find broker url in sdkconfig')
|
||||
raise
|
||||
# Check the sequence of connecting, publishing, disconnecting
|
||||
dut.expect('Modem has correctly entered multiplexed')
|
||||
# Check for MQTT connection and the data event
|
||||
dut.expect('TOPIC: /topic/esp-modem')
|
||||
dut.expect('DATA: Hello modem')
|
||||
dut.expect(f'TOPIC: {topic}')
|
||||
dut.expect(f'DATA: {data}')
|
||||
|
@ -15,3 +15,4 @@ CONFIG_ESP32_PANIC_PRINT_HALT=y
|
||||
CONFIG_COMPILER_CXX_EXCEPTIONS=y
|
||||
CONFIG_ESP_MAIN_TASK_STACK_SIZE=8192
|
||||
CONFIG_EXAMPLE_CLOSE_CMUX_AT_END=y
|
||||
CONFIG_EXAMPLE_MQTT_TEST_TOPIC="/ci/esp-modem/pppos-client"
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2021-2024 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@ -89,6 +89,13 @@ public:
|
||||
return dte->recover();
|
||||
}
|
||||
|
||||
#ifdef CONFIG_ESP_MODEM_URC_HANDLER
|
||||
void set_urc(got_line_cb on_read_cb)
|
||||
{
|
||||
dte->set_urc_cb(on_read_cb);
|
||||
}
|
||||
#endif
|
||||
|
||||
protected:
|
||||
std::shared_ptr<DTE> dte;
|
||||
std::shared_ptr<SpecificModule> device;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2021-2023 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2021-2024 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@ -94,6 +94,17 @@ public:
|
||||
*/
|
||||
void set_error_cb(std::function<void(terminal_error err)> f);
|
||||
|
||||
#ifdef CONFIG_ESP_MODEM_URC_HANDLER
|
||||
/**
|
||||
* @brief Allow setting a line callback for all incoming data
|
||||
* @param line_cb
|
||||
*/
|
||||
void set_urc_cb(got_line_cb line_cb)
|
||||
{
|
||||
command_cb.urc_handler = std::move(line_cb);
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Sets the DTE to desired mode (Command/Data/Cmux)
|
||||
* @param m Desired operation mode
|
||||
@ -191,6 +202,9 @@ private:
|
||||
* @brief This abstracts command callback processing and implements its locking, signaling of completion and timeouts.
|
||||
*/
|
||||
struct command_cb {
|
||||
#ifdef CONFIG_ESP_MODEM_URC_HANDLER
|
||||
got_line_cb urc_handler {}; /*!< URC callback if enabled */
|
||||
#endif
|
||||
static const size_t GOT_LINE = SignalGroup::bit0; /*!< Bit indicating response available */
|
||||
got_line_cb got_line; /*!< Supplied command callback */
|
||||
Lock line_lock{}; /*!< Command callback locking mechanism */
|
||||
|
@ -50,7 +50,6 @@ ESP_MODEM_DECLARE_DCE_COMMAND(set_pin, command_result, 1, STRING_IN(p1, pin)) \
|
||||
* @param[out] out Raw output from DTE
|
||||
* @param[in] pass Pattern in response for the API to return OK
|
||||
* @param[in] fail Pattern in response for the API to return FAIL
|
||||
* @param[in] cmd String command that's send to DTE
|
||||
* @param[in] timeout AT command timeout in milliseconds
|
||||
* @return OK, FAIL or TIMEOUT
|
||||
*/\
|
||||
|
@ -3,9 +3,9 @@
|
||||
// Parameters
|
||||
// * handle different parameters for C++ and C API
|
||||
// * make parameter unique names, so they could be easily referenced and forwarded
|
||||
#define _ARG(param, name) param
|
||||
#define INT_IN(param, name) int _ARG(param, name)
|
||||
#ifdef __cplusplus
|
||||
#define _ARG(param, name) param
|
||||
#include <string>
|
||||
#define STRING_IN(param, name) const std::string& _ARG(param, name)
|
||||
#define STRING_OUT(param, name) std::string& _ARG(param, name)
|
||||
@ -16,6 +16,7 @@
|
||||
|
||||
#define STRUCT_OUT(struct_name, p1) struct_name& p1
|
||||
#else
|
||||
#define _ARG(param, name) name
|
||||
#define STRING_IN(param, name) const char* _ARG(param, name)
|
||||
#define STRING_OUT(param, name) char* _ARG(param, name)
|
||||
#define BOOL_IN(param, name) const bool _ARG(param, name)
|
||||
|
@ -16,10 +16,6 @@
|
||||
#include "exception_stub.hpp"
|
||||
#include "esp_private/c_api_wrapper.hpp"
|
||||
|
||||
#ifndef ESP_MODEM_C_API_STR_MAX
|
||||
#define ESP_MODEM_C_API_STR_MAX 128
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_STRLCPY
|
||||
size_t strlcpy(char *dest, const char *src, size_t len);
|
||||
#endif
|
||||
@ -180,7 +176,7 @@ extern "C" esp_err_t esp_modem_at(esp_modem_dce_t *dce_wrap, const char *at, cha
|
||||
std::string at_str(at);
|
||||
auto ret = command_response_to_esp_err(dce_wrap->dce->at(at_str, out, timeout));
|
||||
if ((p_out != NULL) && (!out.empty())) {
|
||||
strlcpy(p_out, out.c_str(), ESP_MODEM_C_API_STR_MAX);
|
||||
strlcpy(p_out, out.c_str(), CONFIG_ESP_MODEM_C_API_STR_MAX);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
@ -201,7 +197,7 @@ extern "C" esp_err_t esp_modem_get_imsi(esp_modem_dce_t *dce_wrap, char *p_imsi)
|
||||
std::string imsi;
|
||||
auto ret = command_response_to_esp_err(dce_wrap->dce->get_imsi(imsi));
|
||||
if (ret == ESP_OK && !imsi.empty()) {
|
||||
strlcpy(p_imsi, imsi.c_str(), ESP_MODEM_C_API_STR_MAX);
|
||||
strlcpy(p_imsi, imsi.c_str(), CONFIG_ESP_MODEM_C_API_STR_MAX);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
@ -214,7 +210,7 @@ extern "C" esp_err_t esp_modem_at_raw(esp_modem_dce_t *dce_wrap, const char *cmd
|
||||
std::string out;
|
||||
auto ret = command_response_to_esp_err(dce_wrap->dce->at_raw(cmd, out, pass, fail, timeout));
|
||||
if ((p_out != NULL) && (!out.empty())) {
|
||||
strlcpy(p_out, out.c_str(), ESP_MODEM_C_API_STR_MAX);
|
||||
strlcpy(p_out, out.c_str(), CONFIG_ESP_MODEM_C_API_STR_MAX);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
@ -244,7 +240,7 @@ extern "C" esp_err_t esp_modem_get_imei(esp_modem_dce_t *dce_wrap, char *p_imei)
|
||||
std::string imei;
|
||||
auto ret = command_response_to_esp_err(dce_wrap->dce->get_imei(imei));
|
||||
if (ret == ESP_OK && !imei.empty()) {
|
||||
strlcpy(p_imei, imei.c_str(), ESP_MODEM_C_API_STR_MAX);
|
||||
strlcpy(p_imei, imei.c_str(), CONFIG_ESP_MODEM_C_API_STR_MAX);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
@ -258,7 +254,7 @@ extern "C" esp_err_t esp_modem_get_operator_name(esp_modem_dce_t *dce_wrap, char
|
||||
int act;
|
||||
auto ret = command_response_to_esp_err(dce_wrap->dce->get_operator_name(name, act));
|
||||
if (ret == ESP_OK && !name.empty()) {
|
||||
strlcpy(p_name, name.c_str(), ESP_MODEM_C_API_STR_MAX);
|
||||
strlcpy(p_name, name.c_str(), CONFIG_ESP_MODEM_C_API_STR_MAX);
|
||||
*p_act = act;
|
||||
}
|
||||
return ret;
|
||||
@ -272,7 +268,7 @@ extern "C" esp_err_t esp_modem_get_module_name(esp_modem_dce_t *dce_wrap, char *
|
||||
std::string name;
|
||||
auto ret = command_response_to_esp_err(dce_wrap->dce->get_module_name(name));
|
||||
if (ret == ESP_OK && !name.empty()) {
|
||||
strlcpy(p_name, name.c_str(), ESP_MODEM_C_API_STR_MAX);
|
||||
strlcpy(p_name, name.c_str(), CONFIG_ESP_MODEM_C_API_STR_MAX);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2021-2023 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2021-2024 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@ -50,9 +50,11 @@ void DTE::set_command_callbacks()
|
||||
{
|
||||
primary_term->set_read_cb([this](uint8_t *data, size_t len) {
|
||||
Scoped<Lock> l(command_cb.line_lock);
|
||||
if (command_cb.got_line == nullptr) {
|
||||
return false;
|
||||
#ifndef CONFIG_ESP_MODEM_URC_HANDLER
|
||||
if (command_cb.got_line == nullptr || command_cb.result != command_result::TIMEOUT) {
|
||||
return false; // this line has been processed already (got OK or FAIL previously)
|
||||
}
|
||||
#endif
|
||||
if (data) {
|
||||
// For terminals which post data directly with the callback (CMUX)
|
||||
// we cannot defragment unless we allocate, but
|
||||
@ -154,12 +156,10 @@ bool DTE::exit_cmux()
|
||||
if (!cmux_term) {
|
||||
return false;
|
||||
}
|
||||
if (!cmux_term->deinit()) {
|
||||
return false;
|
||||
}
|
||||
const bool success = cmux_term->deinit();
|
||||
exit_cmux_internal();
|
||||
cmux_term.reset();
|
||||
return true;
|
||||
return success;
|
||||
}
|
||||
|
||||
void DTE::exit_cmux_internal()
|
||||
@ -347,9 +347,14 @@ void DTE::on_read(got_line_cb on_read_cb)
|
||||
|
||||
bool DTE::command_cb::process_line(uint8_t *data, size_t consumed, size_t len)
|
||||
{
|
||||
if (result != command_result::TIMEOUT) {
|
||||
#ifdef CONFIG_ESP_MODEM_URC_HANDLER
|
||||
if (urc_handler) {
|
||||
urc_handler(data, consumed + len);
|
||||
}
|
||||
if (result != command_result::TIMEOUT || got_line == nullptr) {
|
||||
return false; // this line has been processed already (got OK or FAIL previously)
|
||||
}
|
||||
#endif
|
||||
if (memchr(data + consumed, separator, len)) {
|
||||
result = got_line(data, consumed + len);
|
||||
if (result == command_result::OK || result == command_result::FAIL) {
|
||||
|
@ -1,7 +1,6 @@
|
||||
idf_component_register(SRCS "pppd_test.cpp"
|
||||
"NetworkDCE.cpp"
|
||||
INCLUDE_DIRS "$ENV{IDF_PATH}/tools/catch"
|
||||
REQUIRES esp_modem)
|
||||
REQUIRES esp_modem catch2)
|
||||
|
||||
set_target_properties(${COMPONENT_LIB} PROPERTIES
|
||||
CXX_STANDARD 17
|
||||
|
@ -27,12 +27,23 @@ menu "Test App Configuration"
|
||||
help
|
||||
Pin number of UART RX.
|
||||
|
||||
config TEST_APP_TCP_PORT
|
||||
int "Port of test"
|
||||
range 0 65535
|
||||
default 2222
|
||||
config TEST_APP_AUTH
|
||||
bool "Use PPP authentication"
|
||||
select LWIP_PPP_CHAP_SUPPORT
|
||||
default n
|
||||
help
|
||||
The remote port to which the client will connects to
|
||||
once the PPP connection established
|
||||
Set to true for the PPP client to use authentication
|
||||
|
||||
config TEST_APP_AUTH_USERNAME
|
||||
string "Set username for authentication"
|
||||
default "myclient"
|
||||
help
|
||||
Username to authenticate the PPP connection.
|
||||
|
||||
config TEST_APP_AUTH_PASSWORD
|
||||
string "Set password for authentication"
|
||||
default "mypassword"
|
||||
help
|
||||
Password to authenticate the PPP connection.
|
||||
|
||||
endmenu
|
||||
|
4
components/esp_modem/test/target/main/idf_component.yml
Normal file
4
components/esp_modem/test/target/main/idf_component.yml
Normal file
@ -0,0 +1,4 @@
|
||||
dependencies:
|
||||
espressif/catch2: "*"
|
||||
idf:
|
||||
version: ">=4.4"
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Unlicense OR CC0-1.0
|
||||
*/
|
||||
@ -18,7 +18,8 @@
|
||||
#include "freertos/event_groups.h"
|
||||
|
||||
#define CATCH_CONFIG_MAIN
|
||||
#include "catch.hpp"
|
||||
#include "catch2/catch_test_macros.hpp"
|
||||
#include "catch2/catch_session.hpp"
|
||||
|
||||
static const char *TAG = "pppd_test";
|
||||
static EventGroupHandle_t event_group = NULL;
|
||||
@ -94,6 +95,10 @@ extern "C" void app_main(void)
|
||||
ESP_ERROR_CHECK(esp_event_handler_register(IP_EVENT, ESP_EVENT_ANY_ID, on_modem_event, nullptr));
|
||||
ESP_ERROR_CHECK(esp_event_handler_register(NETIF_PPP_STATUS, ESP_EVENT_ANY_ID, &on_ppp_changed, nullptr));
|
||||
|
||||
#if CONFIG_TEST_APP_AUTH
|
||||
esp_netif_ppp_set_auth(ppp_netif, NETIF_PPP_AUTHTYPE_CHAP, CONFIG_TEST_APP_AUTH_USERNAME, CONFIG_TEST_APP_AUTH_PASSWORD);
|
||||
#endif
|
||||
|
||||
modem_start_network();
|
||||
Catch::Session session;
|
||||
int numFailed = session.run();
|
||||
|
@ -1,4 +1,4 @@
|
||||
# SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-License-Identifier: Unlicense OR CC0-1.0
|
||||
from __future__ import print_function, unicode_literals
|
||||
|
||||
@ -9,14 +9,20 @@ from threading import Event, Thread
|
||||
import netifaces
|
||||
|
||||
|
||||
def run_server(server_stop, port, server_ip, client_ip):
|
||||
def run_server(server_stop, port, server_ip, client_ip, auth, auth_user, auth_password):
|
||||
print('Starting PPP server on port: {}'.format(port))
|
||||
try:
|
||||
arg_list = [
|
||||
'sudo', 'pppd', port, '115200',
|
||||
'{}:{}'.format(server_ip, client_ip), 'modem', 'local', 'noauth',
|
||||
'{}:{}'.format(server_ip, client_ip), 'modem', 'local',
|
||||
'debug', 'nocrtscts', 'nodetach', '+ipv6'
|
||||
]
|
||||
if auth:
|
||||
arg_list.extend(['auth', '+chap'])
|
||||
subprocess.run(['sudo', 'rm', '/etc/ppp/chap-secrets'])
|
||||
subprocess.run(f"echo '{auth_user} * {auth_password} *' | sudo tee -a /etc/ppp/chap-secrets", shell=True)
|
||||
else:
|
||||
arg_list.append('noauth')
|
||||
p = subprocess.Popen(arg_list, stdout=subprocess.PIPE, bufsize=1)
|
||||
while not server_stop.is_set():
|
||||
if p.poll() is not None:
|
||||
@ -51,6 +57,9 @@ def test_examples_protocol_pppos_connect(dut):
|
||||
try:
|
||||
server_ip = dut.app.sdkconfig.get('TEST_APP_PPP_SERVER_IP')
|
||||
client_ip = dut.app.sdkconfig.get('TEST_APP_PPP_CLIENT_IP')
|
||||
auth = dut.app.sdkconfig.get('TEST_APP_AUTH')
|
||||
auth_user = dut.app.sdkconfig.get('TEST_APP_AUTH_USERNAME')
|
||||
auth_password = dut.app.sdkconfig.get('TEST_APP_AUTH_PASSWORD')
|
||||
except Exception:
|
||||
print(
|
||||
'ENV_TEST_FAILURE: Some mandatory configuration not found in sdkconfig'
|
||||
@ -63,7 +72,7 @@ def test_examples_protocol_pppos_connect(dut):
|
||||
# Start the PPP server
|
||||
server_stop = Event()
|
||||
t = Thread(target=run_server,
|
||||
args=(server_stop, port, server_ip, client_ip))
|
||||
args=(server_stop, port, server_ip, client_ip, auth, auth_user, auth_password))
|
||||
t.start()
|
||||
try:
|
||||
ppp_server_timeout = time.time() + 30
|
||||
|
@ -0,0 +1,5 @@
|
||||
CONFIG_COMPILER_CXX_EXCEPTIONS=y
|
||||
CONFIG_ESP_MAIN_TASK_STACK_SIZE=8192
|
||||
CONFIG_LWIP_PPP_SUPPORT=y
|
||||
CONFIG_PARTITION_TABLE_SINGLE_APP_LARGE=y
|
||||
CONFIG_TEST_APP_AUTH=y
|
@ -1,4 +1,4 @@
|
||||
CONFIG_COMPILER_CXX_EXCEPTIONS=y
|
||||
CONFIG_CXX_EXCEPTIONS=y
|
||||
CONFIG_PPP_SUPPORT=y
|
||||
CONFIG_ESP_MAIN_TASK_STACK_SIZE=4096
|
||||
CONFIG_ESP_MAIN_TASK_STACK_SIZE=8192
|
||||
CONFIG_LWIP_PPP_SUPPORT=y
|
||||
CONFIG_PARTITION_TABLE_SINGLE_APP_LARGE=y
|
||||
|
@ -3,6 +3,6 @@ commitizen:
|
||||
bump_message: 'bump(mqtt_cxx): $current_version -> $new_version'
|
||||
pre_bump_hooks: python ../../ci/changelog.py esp_mqtt_cxx
|
||||
tag_format: mqtt_cxx-v$version
|
||||
version: 0.3.0
|
||||
version: 0.4.0
|
||||
version_files:
|
||||
- idf_component.yml
|
||||
|
@ -1,5 +1,11 @@
|
||||
# Changelog
|
||||
|
||||
## [0.4.0](https://github.com/espressif/esp-protocols/commits/mqtt_cxx-v0.4.0)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- Adds missing configuration fields ([d4c6d5ed](https://github.com/espressif/esp-protocols/commit/d4c6d5ed))
|
||||
|
||||
## [0.3.0](https://github.com/espressif/esp-protocols/commits/mqtt_cxx-v0.3.0)
|
||||
|
||||
### Bug Fixes
|
||||
|
@ -1,4 +1,4 @@
|
||||
version: "0.3.0"
|
||||
version: "0.4.0"
|
||||
description: C++ APIs for ESP-MQTT library
|
||||
url: https://github.com/espressif/esp-protocols/tree/master/components/esp_mqtt_cxx
|
||||
issues: https://github.com/espressif/esp-protocols/issues
|
||||
|
@ -95,7 +95,9 @@ typedef struct {
|
||||
size_t client_key_len;
|
||||
bool use_global_ca_store;
|
||||
bool skip_cert_common_name_check;
|
||||
const char *cert_common_name;
|
||||
esp_err_t (*crt_bundle_attach)(void *conf);
|
||||
esp_transport_handle_t ext_transport;
|
||||
} websocket_config_storage_t;
|
||||
|
||||
typedef enum {
|
||||
@ -204,6 +206,8 @@ static esp_err_t esp_websocket_client_dispatch_event(esp_websocket_client_handle
|
||||
event_data.error_handle.esp_tls_last_esp_err = esp_tls_get_and_clear_last_error(esp_transport_get_error_handle(client->transport),
|
||||
&client->error_handle.esp_tls_stack_err,
|
||||
&client->error_handle.esp_tls_cert_verify_flags);
|
||||
event_data.error_handle.esp_tls_stack_err = client->error_handle.esp_tls_stack_err;
|
||||
event_data.error_handle.esp_tls_cert_verify_flags = client->error_handle.esp_tls_cert_verify_flags;
|
||||
event_data.error_handle.esp_transport_sock_errno = esp_transport_get_errno(client->transport);
|
||||
}
|
||||
event_data.error_handle.error_type = client->error_handle.error_type;
|
||||
@ -500,6 +504,10 @@ static esp_err_t esp_websocket_client_create_transport(esp_websocket_client_hand
|
||||
if (client->keep_alive_cfg.keep_alive_enable) {
|
||||
esp_transport_ssl_set_keep_alive(ssl, &client->keep_alive_cfg);
|
||||
}
|
||||
if (client->if_name) {
|
||||
esp_transport_ssl_set_interface_name(ssl, client->if_name);
|
||||
}
|
||||
|
||||
if (client->config->use_global_ca_store == true) {
|
||||
esp_transport_ssl_enable_global_ca_store(ssl);
|
||||
} else if (client->config->cert) {
|
||||
@ -533,6 +541,13 @@ static esp_err_t esp_websocket_client_create_transport(esp_websocket_client_hand
|
||||
if (client->config->skip_cert_common_name_check) {
|
||||
esp_transport_ssl_skip_common_name_check(ssl);
|
||||
}
|
||||
if (client->config->cert_common_name) {
|
||||
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 1, 0)
|
||||
esp_transport_ssl_set_common_name(ssl, client->config->cert_common_name);
|
||||
#else
|
||||
ESP_LOGE(TAG, "cert_common_name requires ESP-IDF 5.1.0 or later");
|
||||
#endif
|
||||
}
|
||||
|
||||
esp_transport_handle_t wss = esp_transport_ws_init(ssl);
|
||||
ESP_WS_CLIENT_MEM_CHECK(TAG, wss, return ESP_ERR_NO_MEM);
|
||||
@ -668,6 +683,11 @@ esp_websocket_client_handle_t esp_websocket_client_init(const esp_websocket_clie
|
||||
}
|
||||
|
||||
// configure ssl related parameters
|
||||
if (config->cert_common_name != NULL && config->skip_cert_common_name_check) {
|
||||
ESP_LOGE(TAG, "Both cert_common_name and skip_cert_common_name_check are set, only one of them can be set");
|
||||
goto _websocket_init_fail;
|
||||
}
|
||||
|
||||
client->config->use_global_ca_store = config->use_global_ca_store;
|
||||
client->config->cert = config->cert_pem;
|
||||
client->config->cert_len = config->cert_len;
|
||||
@ -676,7 +696,9 @@ esp_websocket_client_handle_t esp_websocket_client_init(const esp_websocket_clie
|
||||
client->config->client_key = config->client_key;
|
||||
client->config->client_key_len = config->client_key_len;
|
||||
client->config->skip_cert_common_name_check = config->skip_cert_common_name_check;
|
||||
client->config->cert_common_name = config->cert_common_name;
|
||||
client->config->crt_bundle_attach = config->crt_bundle_attach;
|
||||
client->config->ext_transport = config->ext_transport;
|
||||
|
||||
if (config->uri) {
|
||||
if (esp_websocket_client_set_uri(client, config->uri) != ESP_OK) {
|
||||
@ -935,7 +957,9 @@ static void esp_websocket_client_task(void *pv)
|
||||
client->run = true;
|
||||
|
||||
//get transport by scheme
|
||||
client->transport = esp_transport_list_get_transport(client->transport_list, client->config->scheme);
|
||||
if (client->transport == NULL && client->config->ext_transport == NULL) {
|
||||
client->transport = esp_transport_list_get_transport(client->transport_list, client->config->scheme);
|
||||
}
|
||||
|
||||
if (client->transport == NULL) {
|
||||
ESP_LOGE(TAG, "There are no transports valid, stop websocket client");
|
||||
@ -948,6 +972,7 @@ static void esp_websocket_client_task(void *pv)
|
||||
|
||||
client->state = WEBSOCKET_STATE_INIT;
|
||||
xEventGroupClearBits(client->status_bits, STOPPED_BIT | CLOSE_FRAME_SENT_BIT);
|
||||
esp_websocket_client_dispatch_event(client, WEBSOCKET_EVENT_BEGIN, NULL, 0);
|
||||
int read_select = 0;
|
||||
while (client->run) {
|
||||
if (xSemaphoreTakeRecursive(client->lock, lock_timeout) != pdPASS) {
|
||||
@ -1082,6 +1107,7 @@ static void esp_websocket_client_task(void *pv)
|
||||
}
|
||||
}
|
||||
|
||||
esp_websocket_client_dispatch_event(client, WEBSOCKET_EVENT_FINISH, NULL, 0);
|
||||
esp_transport_close(client->transport);
|
||||
xEventGroupSetBits(client->status_bits, STOPPED_BIT);
|
||||
client->state = WEBSOCKET_STATE_UNKNOW;
|
||||
@ -1100,9 +1126,13 @@ esp_err_t esp_websocket_client_start(esp_websocket_client_handle_t client)
|
||||
ESP_LOGE(TAG, "The client has started");
|
||||
return ESP_FAIL;
|
||||
}
|
||||
if (esp_websocket_client_create_transport(client) != ESP_OK) {
|
||||
ESP_LOGE(TAG, "Failed to create websocket transport");
|
||||
return ESP_FAIL;
|
||||
|
||||
client->transport = client->config->ext_transport;
|
||||
if (!client->transport) {
|
||||
if (esp_websocket_client_create_transport(client) != ESP_OK) {
|
||||
ESP_LOGE(TAG, "Failed to create websocket transport");
|
||||
return ESP_FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
if (xTaskCreate(esp_websocket_client_task, client->config->task_name ? client->config->task_name : "websocket_task",
|
||||
@ -1111,6 +1141,7 @@ esp_err_t esp_websocket_client_start(esp_websocket_client_handle_t client)
|
||||
return ESP_FAIL;
|
||||
}
|
||||
xEventGroupClearBits(client->status_bits, STOPPED_BIT | CLOSE_FRAME_SENT_BIT);
|
||||
ESP_LOGI(TAG, "Started");
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
@ -1278,6 +1309,43 @@ esp_err_t esp_websocket_client_set_ping_interval_sec(esp_websocket_client_handle
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
int esp_websocket_client_get_reconnect_timeout(esp_websocket_client_handle_t client)
|
||||
{
|
||||
if (client == NULL) {
|
||||
ESP_LOGW(TAG, "Client was not initialized");
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (!client->config->auto_reconnect) {
|
||||
ESP_LOGW(TAG, "Automatic reconnect is disabled");
|
||||
return -1;
|
||||
}
|
||||
|
||||
return client->wait_timeout_ms;
|
||||
}
|
||||
|
||||
esp_err_t esp_websocket_client_set_reconnect_timeout(esp_websocket_client_handle_t client, int reconnect_timeout_ms)
|
||||
{
|
||||
if (client == NULL) {
|
||||
ESP_LOGW(TAG, "Client was not initialized");
|
||||
return ESP_ERR_INVALID_ARG;
|
||||
}
|
||||
|
||||
if (reconnect_timeout_ms <= 0) {
|
||||
ESP_LOGW(TAG, "Invalid reconnect timeout");
|
||||
return ESP_ERR_INVALID_ARG;
|
||||
}
|
||||
|
||||
if (!client->config->auto_reconnect) {
|
||||
ESP_LOGW(TAG, "Automatic reconnect is disabled");
|
||||
return ESP_ERR_INVALID_STATE;
|
||||
}
|
||||
|
||||
client->wait_timeout_ms = reconnect_timeout_ms;
|
||||
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
esp_err_t esp_websocket_register_events(esp_websocket_client_handle_t client,
|
||||
esp_websocket_event_id_t event,
|
||||
esp_event_handler_t event_handler,
|
||||
|
@ -6,7 +6,6 @@ set(common_component_dir ../../../../common_components)
|
||||
set(EXTRA_COMPONENT_DIRS
|
||||
../..
|
||||
"${common_component_dir}/linux_compat/esp_timer"
|
||||
"${common_component_dir}/linux_compat"
|
||||
"${common_component_dir}/linux_compat/freertos"
|
||||
$ENV{IDF_PATH}/examples/protocols/linux_stubs/esp_stubs
|
||||
$ENV{IDF_PATH}/examples/common_components/protocol_examples_common)
|
||||
|
@ -1,6 +1,4 @@
|
||||
idf_component_register(SRCS "main.c"
|
||||
INCLUDE_DIRS
|
||||
"."
|
||||
idf_component_register(SRCS "websocket_linux.c"
|
||||
REQUIRES esp_websocket_client protocol_examples_common)
|
||||
|
||||
if(CONFIG_GCOV_ENABLED)
|
||||
|
@ -3,20 +3,13 @@
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include "esp_log.h"
|
||||
#include <esp_log.h>
|
||||
#include "nvs_flash.h"
|
||||
#include "protocol_examples_common.h"
|
||||
|
||||
#include "freertos/FreeRTOS.h"
|
||||
#include "freertos/task.h"
|
||||
#include "freertos/semphr.h"
|
||||
#include "freertos/event_groups.h"
|
||||
|
||||
#include "esp_websocket_client.h"
|
||||
#include "esp_system.h"
|
||||
#include "esp_event.h"
|
||||
#include "esp_log.h"
|
||||
#include "esp_netif.h"
|
||||
|
||||
static const char *TAG = "websocket";
|
||||
@ -32,6 +25,9 @@ static void websocket_event_handler(void *handler_args, esp_event_base_t base, i
|
||||
{
|
||||
esp_websocket_event_data_t *data = (esp_websocket_event_data_t *)event_data;
|
||||
switch (event_id) {
|
||||
case WEBSOCKET_EVENT_BEGIN:
|
||||
ESP_LOGI(TAG, "WEBSOCKET_EVENT_BEGIN");
|
||||
break;
|
||||
case WEBSOCKET_EVENT_CONNECTED:
|
||||
ESP_LOGI(TAG, "WEBSOCKET_EVENT_CONNECTED");
|
||||
break;
|
||||
@ -66,6 +62,9 @@ static void websocket_event_handler(void *handler_args, esp_event_base_t base, i
|
||||
log_error_if_nonzero("captured as transport's socket errno", data->error_handle.esp_transport_sock_errno);
|
||||
}
|
||||
break;
|
||||
case WEBSOCKET_EVENT_FINISH:
|
||||
ESP_LOGI(TAG, "WEBSOCKET_EVENT_FINISH");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -10,12 +10,6 @@ set(EMBED_FILES "") # Initialize an empty list for files to embed
|
||||
"certs/client_key.pem")
|
||||
#endif()
|
||||
|
||||
# For testing purpose we are using CA of wss://echo.websocket.events
|
||||
#if(CONFIG_WS_OVER_TLS_SERVER_AUTH)
|
||||
list(APPEND EMBED_FILES
|
||||
"certs/ca_certificate_public_domain.pem")
|
||||
#endif()
|
||||
|
||||
# Register the component with source files, include dirs, and any conditionally added embedded files
|
||||
idf_component_register(SRCS "${SRC_FILES}"
|
||||
INCLUDE_DIRS "${INCLUDE_DIRS}"
|
||||
|
@ -1,30 +0,0 @@
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIFFjCCAv6gAwIBAgIRAJErCErPDBinU/bWLiWnX1owDQYJKoZIhvcNAQELBQAw
|
||||
TzELMAkGA1UEBhMCVVMxKTAnBgNVBAoTIEludGVybmV0IFNlY3VyaXR5IFJlc2Vh
|
||||
cmNoIEdyb3VwMRUwEwYDVQQDEwxJU1JHIFJvb3QgWDEwHhcNMjAwOTA0MDAwMDAw
|
||||
WhcNMjUwOTE1MTYwMDAwWjAyMQswCQYDVQQGEwJVUzEWMBQGA1UEChMNTGV0J3Mg
|
||||
RW5jcnlwdDELMAkGA1UEAxMCUjMwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEK
|
||||
AoIBAQC7AhUozPaglNMPEuyNVZLD+ILxmaZ6QoinXSaqtSu5xUyxr45r+XXIo9cP
|
||||
R5QUVTVXjJ6oojkZ9YI8QqlObvU7wy7bjcCwXPNZOOftz2nwWgsbvsCUJCWH+jdx
|
||||
sxPnHKzhm+/b5DtFUkWWqcFTzjTIUu61ru2P3mBw4qVUq7ZtDpelQDRrK9O8Zutm
|
||||
NHz6a4uPVymZ+DAXXbpyb/uBxa3Shlg9F8fnCbvxK/eG3MHacV3URuPMrSXBiLxg
|
||||
Z3Vms/EY96Jc5lP/Ooi2R6X/ExjqmAl3P51T+c8B5fWmcBcUr2Ok/5mzk53cU6cG
|
||||
/kiFHaFpriV1uxPMUgP17VGhi9sVAgMBAAGjggEIMIIBBDAOBgNVHQ8BAf8EBAMC
|
||||
AYYwHQYDVR0lBBYwFAYIKwYBBQUHAwIGCCsGAQUFBwMBMBIGA1UdEwEB/wQIMAYB
|
||||
Af8CAQAwHQYDVR0OBBYEFBQusxe3WFbLrlAJQOYfr52LFMLGMB8GA1UdIwQYMBaA
|
||||
FHm0WeZ7tuXkAXOACIjIGlj26ZtuMDIGCCsGAQUFBwEBBCYwJDAiBggrBgEFBQcw
|
||||
AoYWaHR0cDovL3gxLmkubGVuY3Iub3JnLzAnBgNVHR8EIDAeMBygGqAYhhZodHRw
|
||||
Oi8veDEuYy5sZW5jci5vcmcvMCIGA1UdIAQbMBkwCAYGZ4EMAQIBMA0GCysGAQQB
|
||||
gt8TAQEBMA0GCSqGSIb3DQEBCwUAA4ICAQCFyk5HPqP3hUSFvNVneLKYY611TR6W
|
||||
PTNlclQtgaDqw+34IL9fzLdwALduO/ZelN7kIJ+m74uyA+eitRY8kc607TkC53wl
|
||||
ikfmZW4/RvTZ8M6UK+5UzhK8jCdLuMGYL6KvzXGRSgi3yLgjewQtCPkIVz6D2QQz
|
||||
CkcheAmCJ8MqyJu5zlzyZMjAvnnAT45tRAxekrsu94sQ4egdRCnbWSDtY7kh+BIm
|
||||
lJNXoB1lBMEKIq4QDUOXoRgffuDghje1WrG9ML+Hbisq/yFOGwXD9RiX8F6sw6W4
|
||||
avAuvDszue5L3sz85K+EC4Y/wFVDNvZo4TYXao6Z0f+lQKc0t8DQYzk1OXVu8rp2
|
||||
yJMC6alLbBfODALZvYH7n7do1AZls4I9d1P4jnkDrQoxB3UqQ9hVl3LEKQ73xF1O
|
||||
yK5GhDDX8oVfGKF5u+decIsH4YaTw7mP3GFxJSqv3+0lUFJoi5Lc5da149p90Ids
|
||||
hCExroL1+7mryIkXPeFM5TgO9r0rvZaBFOvV2z0gp35Z0+L4WPlbuEjN/lxPFin+
|
||||
HlUjr8gRsI3qfJOQFy/9rKIJR0Y/8Omwt/8oTWgy1mdeHmmjk7j1nYsvC9JSQ6Zv
|
||||
MldlTTKB3zhThV1+XWYp6rjd5JW1zbVWEkLNxE7GJThEUG3szgBVGP7pSWTUTsqX
|
||||
nLRbwHOoq7hHwg==
|
||||
-----END CERTIFICATE-----
|
@ -19,6 +19,7 @@
|
||||
#include "nvs_flash.h"
|
||||
#include "esp_event.h"
|
||||
#include "protocol_examples_common.h"
|
||||
#include "esp_crt_bundle.h"
|
||||
|
||||
#include "freertos/FreeRTOS.h"
|
||||
#include "freertos/task.h"
|
||||
@ -73,6 +74,9 @@ static void websocket_event_handler(void *handler_args, esp_event_base_t base, i
|
||||
{
|
||||
esp_websocket_event_data_t *data = (esp_websocket_event_data_t *)event_data;
|
||||
switch (event_id) {
|
||||
case WEBSOCKET_EVENT_BEGIN:
|
||||
ESP_LOGI(TAG, "WEBSOCKET_EVENT_BEGIN");
|
||||
break;
|
||||
case WEBSOCKET_EVENT_CONNECTED:
|
||||
ESP_LOGI(TAG, "WEBSOCKET_EVENT_CONNECTED");
|
||||
break;
|
||||
@ -121,6 +125,9 @@ static void websocket_event_handler(void *handler_args, esp_event_base_t base, i
|
||||
log_error_if_nonzero("captured as transport's socket errno", data->error_handle.esp_transport_sock_errno);
|
||||
}
|
||||
break;
|
||||
case WEBSOCKET_EVENT_FINISH:
|
||||
ESP_LOGI(TAG, "WEBSOCKET_EVENT_FINISH");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -159,8 +166,12 @@ static void websocket_app_start(void)
|
||||
websocket_cfg.client_key = key_start;
|
||||
websocket_cfg.client_key_len = key_end - key_start;
|
||||
#elif CONFIG_WS_OVER_TLS_SERVER_AUTH
|
||||
extern const char cacert_start[] asm("_binary_ca_certificate_public_domain_pem_start"); // CA cert of wss://echo.websocket.event, modify it if using another server
|
||||
websocket_cfg.cert_pem = cacert_start;
|
||||
// Using certificate bundle as default server certificate source
|
||||
websocket_cfg.crt_bundle_attach = esp_crt_bundle_attach;
|
||||
// If using a custom certificate it could be added to certificate bundle, added to the build similar to client certificates in this examples,
|
||||
// or read from NVS.
|
||||
/* extern const char cacert_start[] asm("ADDED_CERTIFICATE"); */
|
||||
/* websocket_cfg.cert_pem = cacert_start; */
|
||||
#endif
|
||||
|
||||
#if CONFIG_WS_OVER_TLS_SKIP_COMMON_NAME_CHECK
|
||||
|
@ -52,7 +52,7 @@ class Websocket(object):
|
||||
def run(self):
|
||||
if self.use_tls is True:
|
||||
ssl_context = ssl.SSLContext(ssl.PROTOCOL_TLS_SERVER)
|
||||
ssl_context.load_cert_chain(certfile='main/certs/server_cert.pem', keyfile='main/certs/server_key.pem')
|
||||
ssl_context.load_cert_chain(certfile='main/certs/server/server_cert.pem', keyfile='main/certs/server/server_key.pem')
|
||||
if self.client_verify is True:
|
||||
ssl_context.load_verify_locations(cafile='main/certs/ca_cert.pem')
|
||||
ssl_context.verify = ssl.CERT_REQUIRED
|
||||
|
@ -36,6 +36,8 @@ typedef enum {
|
||||
WEBSOCKET_EVENT_DATA, /*!< When receiving data from the server, possibly multiple portions of the packet */
|
||||
WEBSOCKET_EVENT_CLOSED, /*!< The connection has been closed cleanly */
|
||||
WEBSOCKET_EVENT_BEFORE_CONNECT, /*!< The event occurs before connecting */
|
||||
WEBSOCKET_EVENT_BEGIN, /*!< The event occurs once after thread creation, before event loop */
|
||||
WEBSOCKET_EVENT_FINISH, /*!< The event occurs once after event loop, before thread destruction */
|
||||
WEBSOCKET_EVENT_MAX
|
||||
} esp_websocket_event_id_t;
|
||||
|
||||
@ -118,6 +120,7 @@ typedef struct {
|
||||
bool disable_pingpong_discon; /*!< Disable auto-disconnect due to no PONG received within pingpong_timeout_sec */
|
||||
bool use_global_ca_store; /*!< Use a global ca_store for all the connections in which this bool is set. */
|
||||
esp_err_t (*crt_bundle_attach)(void *conf); /*!< Function pointer to esp_crt_bundle_attach. Enables the use of certification bundle for server verification, MBEDTLS_CERTIFICATE_BUNDLE must be enabled in menuconfig. Include esp_crt_bundle.h, and use `esp_crt_bundle_attach` here to include bundled CA certificates. */
|
||||
const char *cert_common_name; /*!< Expected common name of the server certificate */
|
||||
bool skip_cert_common_name_check;/*!< Skip any validation of server certificate CN field */
|
||||
bool keep_alive_enable; /*!< Enable keep-alive timeout */
|
||||
int keep_alive_idle; /*!< Keep-alive idle time. Default is 5 (second) */
|
||||
@ -127,6 +130,7 @@ typedef struct {
|
||||
int network_timeout_ms; /*!< Abort network operation if it is not completed after this value, in milliseconds (defaults to 10s) */
|
||||
size_t ping_interval_sec; /*!< Websocket ping interval, defaults to 10 seconds if not set */
|
||||
struct ifreq *if_name; /*!< The name of interface for data to go through. Use the default interface without setting */
|
||||
esp_transport_handle_t ext_transport; /*!< External WebSocket tcp_transport handle to the client; or if null, the client will create its own transport handle. */
|
||||
} esp_websocket_client_config_t;
|
||||
|
||||
/**
|
||||
@ -416,6 +420,29 @@ size_t esp_websocket_client_get_ping_interval_sec(esp_websocket_client_handle_t
|
||||
*/
|
||||
esp_err_t esp_websocket_client_set_ping_interval_sec(esp_websocket_client_handle_t client, size_t ping_interval_sec);
|
||||
|
||||
/**
|
||||
* @brief Get the next reconnect timeout for client. Returns -1 when client is not initialized or automatic reconnect is disabled.
|
||||
*
|
||||
* @param[in] client The client
|
||||
*
|
||||
* @return Reconnect timeout in msec
|
||||
*/
|
||||
int esp_websocket_client_get_reconnect_timeout(esp_websocket_client_handle_t client);
|
||||
|
||||
/**
|
||||
* @brief Set next reconnect timeout for client.
|
||||
*
|
||||
* Notes:
|
||||
* - Changing this value when reconnection delay is already active does not immediately affect the active delay and may have unexpected result.
|
||||
* - Good place to change this value is when handling WEBSOCKET_EVENT_DISCONNECTED or WEBSOCKET_EVENT_ERROR events.
|
||||
*
|
||||
* @param[in] client The client
|
||||
* @param[in] reconnect_timeout_ms The new timeout
|
||||
*
|
||||
* @return esp_err_t
|
||||
*/
|
||||
esp_err_t esp_websocket_client_set_reconnect_timeout(esp_websocket_client_handle_t client, int reconnect_timeout_ms);
|
||||
|
||||
/**
|
||||
* @brief Register the Websocket Events
|
||||
*
|
||||
|
@ -3,6 +3,6 @@ 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.3.0
|
||||
version: 0.4.0
|
||||
version_files:
|
||||
- idf_component.yml
|
||||
|
@ -1,5 +1,24 @@
|
||||
# Changelog
|
||||
|
||||
## [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
|
||||
|
@ -1,14 +1,16 @@
|
||||
set(IDF_VER_DIR "idf_v${IDF_VERSION_MAJOR}.${IDF_VERSION_MINOR}")
|
||||
|
||||
if(NOT CONFIG_ESP_WIFI_ENABLED)
|
||||
set(src_wifi_is_remote esp_wifi_remote.c esp_wifi_with_remote.c esp_wifi_remote_net.c)
|
||||
set(src_wifi_is_remote esp_wifi_remote.c ${IDF_VER_DIR}/esp_wifi_with_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)
|
||||
else()
|
||||
set(src_wifi_remote_weak esp_wifi_remote_weak.c)
|
||||
set(src_wifi_remote_weak ${IDF_VER_DIR}/esp_wifi_remote_weak.c)
|
||||
endif()
|
||||
|
||||
idf_component_register(INCLUDE_DIRS include
|
||||
idf_component_register(INCLUDE_DIRS include ${IDF_VER_DIR}/include
|
||||
SRCS ${src_wifi_remote_weak}
|
||||
${src_wifi_remote_eppp}
|
||||
${src_wifi_is_remote}
|
||||
|
@ -1,678 +1,14 @@
|
||||
# This file is auto-generated
|
||||
menu "Wi-Fi Remote"
|
||||
config ESP_WIFI_REMOTE_ENABLED
|
||||
bool
|
||||
default y
|
||||
|
||||
orsource "./Kconfig.soc_wifi_caps.in"
|
||||
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"
|
||||
|
||||
config ESP_WIFI_STATIC_RX_BUFFER_NUM
|
||||
int "Max number of WiFi static RX buffers"
|
||||
range 2 25 if !SLAVE_SOC_WIFI_HE_SUPPORT
|
||||
range 2 128 if SLAVE_SOC_WIFI_HE_SUPPORT
|
||||
default 10 if !SPIRAM_TRY_ALLOCATE_WIFI_LWIP
|
||||
default 16 if SPIRAM_TRY_ALLOCATE_WIFI_LWIP
|
||||
help
|
||||
Set the number of WiFi static RX buffers. Each buffer takes approximately 1.6KB of RAM.
|
||||
The static rx buffers are allocated when esp_wifi_init is called, they are not freed
|
||||
until esp_wifi_deinit is called.
|
||||
|
||||
WiFi hardware use these buffers to receive all 802.11 frames.
|
||||
A higher number may allow higher throughput but increases memory use. If ESP_WIFI_AMPDU_RX_ENABLED
|
||||
is enabled, this value is recommended to set equal or bigger than ESP_WIFI_RX_BA_WIN in order to
|
||||
achieve better throughput and compatibility with both stations and APs.
|
||||
|
||||
config ESP_WIFI_DYNAMIC_RX_BUFFER_NUM
|
||||
int "Max number of WiFi dynamic RX buffers"
|
||||
range 0 128 if !LWIP_WND_SCALE
|
||||
range 0 1024 if LWIP_WND_SCALE
|
||||
default 32
|
||||
help
|
||||
Set the number of WiFi dynamic RX buffers, 0 means unlimited RX buffers will be allocated
|
||||
(provided sufficient free RAM). The size of each dynamic RX buffer depends on the size of
|
||||
the received data frame.
|
||||
|
||||
For each received data frame, the WiFi driver makes a copy to an RX buffer and then delivers
|
||||
it to the high layer TCP/IP stack. The dynamic RX buffer is freed after the higher layer has
|
||||
successfully received the data frame.
|
||||
|
||||
For some applications, WiFi data frames may be received faster than the application can
|
||||
process them. In these cases we may run out of memory if RX buffer number is unlimited (0).
|
||||
|
||||
If a dynamic RX buffer limit is set, it should be at least the number of static RX buffers.
|
||||
|
||||
choice ESP_WIFI_TX_BUFFER
|
||||
prompt "Type of WiFi TX buffers"
|
||||
default ESP_WIFI_DYNAMIC_TX_BUFFER
|
||||
help
|
||||
Select type of WiFi TX buffers:
|
||||
|
||||
If "Static" is selected, WiFi TX buffers are allocated when WiFi is initialized and released
|
||||
when WiFi is de-initialized. The size of each static TX buffer is fixed to about 1.6KB.
|
||||
|
||||
If "Dynamic" is selected, each WiFi TX buffer is allocated as needed when a data frame is
|
||||
delivered to the Wifi driver from the TCP/IP stack. The buffer is freed after the data frame
|
||||
has been sent by the WiFi driver. The size of each dynamic TX buffer depends on the length
|
||||
of each data frame sent by the TCP/IP layer.
|
||||
|
||||
If PSRAM is enabled, "Static" should be selected to guarantee enough WiFi TX buffers.
|
||||
If PSRAM is disabled, "Dynamic" should be selected to improve the utilization of RAM.
|
||||
|
||||
config ESP_WIFI_STATIC_TX_BUFFER
|
||||
bool "Static"
|
||||
config ESP_WIFI_DYNAMIC_TX_BUFFER
|
||||
bool "Dynamic"
|
||||
depends on !SPIRAM_USE_MALLOC
|
||||
endchoice
|
||||
|
||||
config ESP_WIFI_TX_BUFFER_TYPE
|
||||
int
|
||||
default 0 if ESP_WIFI_STATIC_TX_BUFFER
|
||||
default 1 if ESP_WIFI_DYNAMIC_TX_BUFFER
|
||||
|
||||
config ESP_WIFI_STATIC_TX_BUFFER_NUM
|
||||
int "Max number of WiFi static TX buffers"
|
||||
depends on ESP_WIFI_STATIC_TX_BUFFER
|
||||
range 1 64
|
||||
default 16
|
||||
help
|
||||
Set the number of WiFi static TX buffers. Each buffer takes approximately 1.6KB of RAM.
|
||||
The static RX buffers are allocated when esp_wifi_init() is called, they are not released
|
||||
until esp_wifi_deinit() is called.
|
||||
|
||||
For each transmitted data frame from the higher layer TCP/IP stack, the WiFi driver makes a
|
||||
copy of it in a TX buffer. For some applications especially UDP applications, the upper
|
||||
layer can deliver frames faster than WiFi layer can transmit. In these cases, we may run out
|
||||
of TX buffers.
|
||||
|
||||
config ESP_WIFI_CACHE_TX_BUFFER_NUM
|
||||
int "Max number of WiFi cache TX buffers"
|
||||
depends on SPIRAM
|
||||
range 16 128
|
||||
default 32
|
||||
help
|
||||
Set the number of WiFi cache TX buffer number.
|
||||
|
||||
For each TX packet from uplayer, such as LWIP etc, WiFi driver needs to allocate a static TX
|
||||
buffer and makes a copy of uplayer packet. If WiFi driver fails to allocate the static TX buffer,
|
||||
it caches the uplayer packets to a dedicated buffer queue, this option is used to configure the
|
||||
size of the cached TX queue.
|
||||
|
||||
config ESP_WIFI_DYNAMIC_TX_BUFFER_NUM
|
||||
int "Max number of WiFi dynamic TX buffers"
|
||||
depends on ESP_WIFI_DYNAMIC_TX_BUFFER
|
||||
range 1 128
|
||||
default 32
|
||||
help
|
||||
Set the number of WiFi dynamic TX buffers. The size of each dynamic TX buffer is not fixed,
|
||||
it depends on the size of each transmitted data frame.
|
||||
|
||||
For each transmitted frame from the higher layer TCP/IP stack, the WiFi driver makes a copy
|
||||
of it in a TX buffer. For some applications, especially UDP applications, the upper layer
|
||||
can deliver frames faster than WiFi layer can transmit. In these cases, we may run out of TX
|
||||
buffers.
|
||||
|
||||
choice ESP_WIFI_MGMT_RX_BUFFER
|
||||
prompt "Type of WiFi RX MGMT buffers"
|
||||
default ESP_WIFI_STATIC_RX_MGMT_BUFFER
|
||||
help
|
||||
Select type of WiFi RX MGMT buffers:
|
||||
|
||||
If "Static" is selected, WiFi RX MGMT buffers are allocated when WiFi is initialized and released
|
||||
when WiFi is de-initialized. The size of each static RX MGMT buffer is fixed to about 500 Bytes.
|
||||
|
||||
If "Dynamic" is selected, each WiFi RX MGMT buffer is allocated as needed when a MGMT data frame is
|
||||
received. The MGMT buffer is freed after the MGMT data frame has been processed by the WiFi driver.
|
||||
|
||||
|
||||
config ESP_WIFI_STATIC_RX_MGMT_BUFFER
|
||||
bool "Static"
|
||||
config ESP_WIFI_DYNAMIC_RX_MGMT_BUFFER
|
||||
bool "Dynamic"
|
||||
endchoice
|
||||
|
||||
config ESP_WIFI_DYNAMIC_RX_MGMT_BUF
|
||||
int
|
||||
default 0 if ESP_WIFI_STATIC_RX_MGMT_BUFFER
|
||||
default 1 if ESP_WIFI_DYNAMIC_RX_MGMT_BUFFER
|
||||
|
||||
config ESP_WIFI_RX_MGMT_BUF_NUM_DEF
|
||||
int "Max number of WiFi RX MGMT buffers"
|
||||
range 1 10
|
||||
default 5
|
||||
help
|
||||
Set the number of WiFi RX_MGMT buffers.
|
||||
|
||||
For Management buffers, the number of dynamic and static management buffers is the same.
|
||||
In order to prevent memory fragmentation, the management buffer type should be set to static first.
|
||||
|
||||
config ESP_WIFI_CSI_ENABLED
|
||||
bool "WiFi CSI(Channel State Information)"
|
||||
depends on SLAVE_SOC_WIFI_CSI_SUPPORT
|
||||
default n
|
||||
help
|
||||
Select this option to enable CSI(Channel State Information) feature. CSI takes about
|
||||
CONFIG_ESP_WIFI_STATIC_RX_BUFFER_NUM KB of RAM. If CSI is not used, it is better to disable
|
||||
this feature in order to save memory.
|
||||
|
||||
config ESP_WIFI_AMPDU_TX_ENABLED
|
||||
bool "WiFi AMPDU TX"
|
||||
default y
|
||||
help
|
||||
Select this option to enable AMPDU TX feature
|
||||
|
||||
|
||||
config ESP_WIFI_TX_BA_WIN
|
||||
int "WiFi AMPDU TX BA window size"
|
||||
depends on ESP_WIFI_AMPDU_TX_ENABLED
|
||||
range 2 32 if !SLAVE_SOC_WIFI_HE_SUPPORT
|
||||
range 2 64 if SLAVE_SOC_WIFI_HE_SUPPORT
|
||||
default 6
|
||||
help
|
||||
Set the size of WiFi Block Ack TX window. Generally a bigger value means higher throughput but
|
||||
more memory. Most of time we should NOT change the default value unless special reason, e.g.
|
||||
test the maximum UDP TX throughput with iperf etc. For iperf test in shieldbox, the recommended
|
||||
value is 9~12.
|
||||
|
||||
config ESP_WIFI_AMPDU_RX_ENABLED
|
||||
bool "WiFi AMPDU RX"
|
||||
default y
|
||||
help
|
||||
Select this option to enable AMPDU RX feature
|
||||
|
||||
config ESP_WIFI_RX_BA_WIN
|
||||
int "WiFi AMPDU RX BA window size"
|
||||
depends on ESP_WIFI_AMPDU_RX_ENABLED
|
||||
range 2 32 if !SLAVE_SOC_WIFI_HE_SUPPORT
|
||||
range 2 64 if SLAVE_SOC_WIFI_HE_SUPPORT
|
||||
default 6 if !SPIRAM_TRY_ALLOCATE_WIFI_LWIP
|
||||
default 16 if SPIRAM_TRY_ALLOCATE_WIFI_LWIP
|
||||
help
|
||||
Set the size of WiFi Block Ack RX window. Generally a bigger value means higher throughput and better
|
||||
compatibility but more memory. Most of time we should NOT change the default value unless special
|
||||
reason, e.g. test the maximum UDP RX throughput with iperf etc. For iperf test in shieldbox, the
|
||||
recommended value is 9~12. If PSRAM is used and WiFi memory is preferred to allocate in PSRAM first,
|
||||
the default and minimum value should be 16 to achieve better throughput and compatibility with both
|
||||
stations and APs.
|
||||
|
||||
config ESP_WIFI_AMSDU_TX_ENABLED
|
||||
bool "WiFi AMSDU TX"
|
||||
depends on SPIRAM
|
||||
default n
|
||||
help
|
||||
Select this option to enable AMSDU TX feature
|
||||
|
||||
config ESP_WIFI_NVS_ENABLED
|
||||
bool "WiFi NVS flash"
|
||||
default y
|
||||
help
|
||||
Select this option to enable WiFi NVS flash
|
||||
|
||||
choice ESP_WIFI_TASK_CORE_ID
|
||||
depends on !FREERTOS_UNICORE
|
||||
prompt "WiFi Task Core ID"
|
||||
default ESP_WIFI_TASK_PINNED_TO_CORE_0
|
||||
help
|
||||
Pinned WiFi task to core 0 or core 1.
|
||||
|
||||
config ESP_WIFI_TASK_PINNED_TO_CORE_0
|
||||
bool "Core 0"
|
||||
config ESP_WIFI_TASK_PINNED_TO_CORE_1
|
||||
bool "Core 1"
|
||||
endchoice
|
||||
|
||||
config ESP_WIFI_SOFTAP_BEACON_MAX_LEN
|
||||
int "Max length of WiFi SoftAP Beacon"
|
||||
range 752 1256
|
||||
default 752
|
||||
help
|
||||
ESP-MESH utilizes beacon frames to detect and resolve root node conflicts (see documentation). However
|
||||
the default length of a beacon frame can simultaneously hold only five root node identifier structures,
|
||||
meaning that a root node conflict of up to five nodes can be detected at one time. In the occurrence of
|
||||
more root nodes conflict involving more than five root nodes, the conflict resolution process will
|
||||
detect five of the root nodes, resolve the conflict, and re-detect more root nodes. This process will
|
||||
repeat until all root node conflicts are resolved. However this process can generally take a very long
|
||||
time.
|
||||
|
||||
To counter this situation, the beacon frame length can be increased such that more root nodes can be
|
||||
detected simultaneously. Each additional root node will require 36 bytes and should be added on top of
|
||||
the default beacon frame length of
|
||||
752 bytes. For example, if you want to detect 10 root nodes simultaneously, you need to set the beacon
|
||||
frame length as
|
||||
932 (752+36*5).
|
||||
|
||||
Setting a longer beacon length also assists with debugging as the conflicting root nodes can be
|
||||
identified more quickly.
|
||||
|
||||
config ESP_WIFI_MGMT_SBUF_NUM
|
||||
int "WiFi mgmt short buffer number"
|
||||
range 6 32
|
||||
default 32
|
||||
help
|
||||
Set the number of WiFi management short buffer.
|
||||
|
||||
config ESP_WIFI_IRAM_OPT
|
||||
bool "WiFi IRAM speed optimization"
|
||||
default n if (BT_ENABLED && SPIRAM && SLAVE_IDF_TARGET_ESP32)
|
||||
default y
|
||||
help
|
||||
Select this option to place frequently called Wi-Fi library functions in IRAM.
|
||||
When this option is disabled, more than 10Kbytes of IRAM memory will be saved
|
||||
but Wi-Fi throughput will be reduced.
|
||||
|
||||
config ESP_WIFI_EXTRA_IRAM_OPT
|
||||
bool "WiFi EXTRA IRAM speed optimization"
|
||||
default y if SLAVE_IDF_TARGET_ESP32C6
|
||||
default n
|
||||
help
|
||||
Select this option to place additional frequently called Wi-Fi library functions
|
||||
in IRAM. When this option is disabled, more than 5Kbytes of IRAM memory will be saved
|
||||
but Wi-Fi throughput will be reduced.
|
||||
|
||||
config ESP_WIFI_RX_IRAM_OPT
|
||||
bool "WiFi RX IRAM speed optimization"
|
||||
default n if (BT_ENABLED && SPIRAM && SLAVE_IDF_TARGET_ESP32)
|
||||
default y
|
||||
help
|
||||
Select this option to place frequently called Wi-Fi library RX functions in IRAM.
|
||||
When this option is disabled, more than 17Kbytes of IRAM memory will be saved
|
||||
but Wi-Fi performance will be reduced.
|
||||
|
||||
config ESP_WIFI_ENABLE_WPA3_SAE
|
||||
bool "Enable WPA3-Personal"
|
||||
default y
|
||||
select ESP_WIFI_MBEDTLS_CRYPTO
|
||||
help
|
||||
Select this option to allow the device to establish a WPA3-Personal connection with eligible AP's.
|
||||
PMF (Protected Management Frames) is a prerequisite feature for a WPA3 connection, it needs to be
|
||||
explicitly configured before attempting connection. Please refer to the Wi-Fi Driver API Guide
|
||||
for details.
|
||||
|
||||
config ESP_WIFI_ENABLE_SAE_PK
|
||||
bool "Enable SAE-PK"
|
||||
default y
|
||||
depends on ESP_WIFI_ENABLE_WPA3_SAE
|
||||
help
|
||||
Select this option to enable SAE-PK
|
||||
|
||||
config ESP_WIFI_SOFTAP_SAE_SUPPORT
|
||||
bool "Enable WPA3 Personal(SAE) SoftAP"
|
||||
default y
|
||||
depends on ESP_WIFI_ENABLE_WPA3_SAE
|
||||
depends on ESP_WIFI_SOFTAP_SUPPORT
|
||||
help
|
||||
Select this option to enable SAE support in softAP mode.
|
||||
|
||||
config ESP_WIFI_ENABLE_WPA3_OWE_STA
|
||||
bool "Enable OWE STA"
|
||||
default y
|
||||
select ESP_WIFI_MBEDTLS_CRYPTO
|
||||
help
|
||||
Select this option to allow the device to establish OWE connection with eligible AP's.
|
||||
PMF (Protected Management Frames) is a prerequisite feature for a WPA3 connection, it needs to be
|
||||
explicitly configured before attempting connection. Please refer to the Wi-Fi Driver API Guide
|
||||
for details.
|
||||
|
||||
config ESP_WIFI_SLP_IRAM_OPT
|
||||
bool "WiFi SLP IRAM speed optimization"
|
||||
select PM_SLP_DEFAULT_PARAMS_OPT
|
||||
select PERIPH_CTRL_FUNC_IN_IRAM
|
||||
help
|
||||
Select this option to place called Wi-Fi library TBTT process and receive beacon functions in IRAM.
|
||||
Some functions can be put in IRAM either by ESP_WIFI_IRAM_OPT and ESP_WIFI_RX_IRAM_OPT, or this one.
|
||||
If already enabled ESP_WIFI_IRAM_OPT, the other 7.3KB IRAM memory would be taken by this option.
|
||||
If already enabled ESP_WIFI_RX_IRAM_OPT, the other 1.3KB IRAM memory would be taken by this option.
|
||||
If neither of them are enabled, the other 7.4KB IRAM memory would be taken by this option.
|
||||
Wi-Fi power-save mode average current would be reduced if this option is enabled.
|
||||
|
||||
config ESP_WIFI_SLP_DEFAULT_MIN_ACTIVE_TIME
|
||||
int "Minimum active time"
|
||||
range 8 60
|
||||
default 50
|
||||
depends on ESP_WIFI_SLP_IRAM_OPT
|
||||
help
|
||||
The minimum timeout for waiting to receive data, unit: milliseconds.
|
||||
|
||||
config ESP_WIFI_SLP_DEFAULT_MAX_ACTIVE_TIME
|
||||
int "Maximum keep alive time"
|
||||
range 10 60
|
||||
default 10
|
||||
depends on ESP_WIFI_SLP_IRAM_OPT
|
||||
help
|
||||
The maximum time that wifi keep alive, unit: seconds.
|
||||
|
||||
config ESP_WIFI_FTM_ENABLE
|
||||
bool "WiFi FTM"
|
||||
default n
|
||||
depends on SLAVE_SOC_WIFI_FTM_SUPPORT
|
||||
help
|
||||
Enable feature Fine Timing Measurement for calculating WiFi Round-Trip-Time (RTT).
|
||||
|
||||
config ESP_WIFI_FTM_INITIATOR_SUPPORT
|
||||
bool "FTM Initiator support"
|
||||
default y
|
||||
depends on ESP_WIFI_FTM_ENABLE
|
||||
|
||||
config ESP_WIFI_FTM_RESPONDER_SUPPORT
|
||||
bool "FTM Responder support"
|
||||
default y
|
||||
depends on ESP_WIFI_FTM_ENABLE
|
||||
|
||||
config ESP_WIFI_STA_DISCONNECTED_PM_ENABLE
|
||||
bool "Power Management for station at disconnected"
|
||||
default y
|
||||
help
|
||||
Select this option to enable power_management for station when disconnected.
|
||||
Chip will do modem-sleep when rf module is not in use any more.
|
||||
|
||||
config ESP_WIFI_GCMP_SUPPORT
|
||||
bool "WiFi GCMP Support(GCMP128 and GCMP256)"
|
||||
default n
|
||||
depends on SLAVE_SOC_WIFI_GCMP_SUPPORT
|
||||
help
|
||||
Select this option to enable GCMP support. GCMP support is compulsory for WiFi Suite-B support.
|
||||
|
||||
config ESP_WIFI_GMAC_SUPPORT
|
||||
bool "WiFi GMAC Support(GMAC128 and GMAC256)"
|
||||
default n
|
||||
help
|
||||
Select this option to enable GMAC support. GMAC support is compulsory for WiFi 192 bit certification.
|
||||
|
||||
config ESP_WIFI_SOFTAP_SUPPORT
|
||||
bool "WiFi SoftAP Support"
|
||||
default y
|
||||
help
|
||||
WiFi module can be compiled without SoftAP to save code size.
|
||||
|
||||
config ESP_WIFI_ENHANCED_LIGHT_SLEEP
|
||||
bool "WiFi modem automatically receives the beacon"
|
||||
default n
|
||||
depends on ESP_PHY_MAC_BB_PD && SOC_PM_SUPPORT_BEACON_WAKEUP
|
||||
help
|
||||
The wifi modem automatically receives the beacon frame during light sleep.
|
||||
|
||||
config ESP_WIFI_SLP_BEACON_LOST_OPT
|
||||
bool "Wifi sleep optimize when beacon lost"
|
||||
help
|
||||
Enable wifi sleep optimization when beacon loss occurs and immediately enter
|
||||
sleep mode when the WiFi module detects beacon loss.
|
||||
|
||||
config ESP_WIFI_SLP_BEACON_LOST_TIMEOUT
|
||||
int "Beacon loss timeout"
|
||||
range 5 100
|
||||
default 10
|
||||
depends on ESP_WIFI_SLP_BEACON_LOST_OPT
|
||||
help
|
||||
Timeout time for close rf phy when beacon loss occurs, Unit: 1024 microsecond.
|
||||
|
||||
config ESP_WIFI_SLP_BEACON_LOST_THRESHOLD
|
||||
int "Maximum number of consecutive lost beacons allowed"
|
||||
range 0 8
|
||||
default 3
|
||||
depends on ESP_WIFI_SLP_BEACON_LOST_OPT
|
||||
help
|
||||
Maximum number of consecutive lost beacons allowed, WiFi keeps Rx state when
|
||||
the number of consecutive beacons lost is greater than the given threshold.
|
||||
|
||||
config ESP_WIFI_SLP_PHY_ON_DELTA_EARLY_TIME
|
||||
int "Delta early time for RF PHY on"
|
||||
range 0 100
|
||||
default 2
|
||||
depends on ESP_WIFI_SLP_BEACON_LOST_OPT && SLAVE_SOC_WIFI_SUPPORT_VARIABLE_BEACON_WINDOW
|
||||
help
|
||||
Delta early time for rf phy on, When the beacon is lost, the next rf phy on will
|
||||
be earlier the time specified by the configuration item, Unit: 32 microsecond.
|
||||
|
||||
config ESP_WIFI_SLP_PHY_OFF_DELTA_TIMEOUT_TIME
|
||||
int "Delta timeout time for RF PHY off"
|
||||
range 0 8
|
||||
default 2
|
||||
depends on ESP_WIFI_SLP_BEACON_LOST_OPT && SLAVE_SOC_WIFI_SUPPORT_VARIABLE_BEACON_WINDOW
|
||||
help
|
||||
Delta timeout time for rf phy off, When the beacon is lost, the next rf phy off will
|
||||
be delayed for the time specified by the configuration item. Unit: 1024 microsecond.
|
||||
|
||||
config ESP_WIFI_ESPNOW_MAX_ENCRYPT_NUM
|
||||
int "Maximum espnow encrypt peers number"
|
||||
range 0 4 if SLAVE_IDF_TARGET_ESP32C2
|
||||
range 0 17 if (!SLAVE_IDF_TARGET_ESP32C2)
|
||||
default 2 if SLAVE_IDF_TARGET_ESP32C2
|
||||
default 7 if (!SLAVE_IDF_TARGET_ESP32C2)
|
||||
help
|
||||
Maximum number of encrypted peers supported by espnow.
|
||||
The number of hardware keys for encryption is fixed. And the espnow and SoftAP share the same
|
||||
hardware keys. So this configuration will affect the maximum connection number of SoftAP.
|
||||
Maximum espnow encrypted peers number + maximum number of connections of SoftAP = Max hardware
|
||||
keys number. When using ESP mesh, this value should be set to a maximum of 6.
|
||||
|
||||
config ESP_WIFI_NAN_ENABLE
|
||||
bool "WiFi Aware"
|
||||
default n
|
||||
depends on SLAVE_SOC_WIFI_NAN_SUPPORT
|
||||
help
|
||||
Enable WiFi Aware (NAN) feature.
|
||||
|
||||
config ESP_WIFI_ENABLE_WIFI_TX_STATS
|
||||
bool "Enable Wi-Fi transmission statistics"
|
||||
depends on SLAVE_SOC_WIFI_HE_SUPPORT
|
||||
default "y"
|
||||
help
|
||||
Enable Wi-Fi transmission statistics. Total support 4 access category. Each access category
|
||||
will use 346 bytes memory.
|
||||
|
||||
config ESP_WIFI_MBEDTLS_CRYPTO
|
||||
bool "Use MbedTLS crypto APIs"
|
||||
default y
|
||||
select MBEDTLS_AES_C
|
||||
select MBEDTLS_ECP_C
|
||||
select MBEDTLS_ECDH_C
|
||||
select MBEDTLS_ECDSA_C
|
||||
select MBEDTLS_CMAC_C
|
||||
select MBEDTLS_ECP_DP_SECP256R1_ENABLED
|
||||
help
|
||||
Select this option to enable the use of MbedTLS crypto APIs.
|
||||
The internal crypto support within the supplicant is limited
|
||||
and may not suffice for all new security features, including WPA3.
|
||||
|
||||
It is recommended to always keep this option enabled. Additionally,
|
||||
note that MbedTLS can leverage hardware acceleration if available,
|
||||
resulting in significantly faster cryptographic operations.
|
||||
|
||||
if ESP_WIFI_MBEDTLS_CRYPTO
|
||||
config ESP_WIFI_MBEDTLS_TLS_CLIENT
|
||||
bool "Use MbedTLS TLS client for WiFi Enterprise connection"
|
||||
depends on ESP_WIFI_ENTERPRISE_SUPPORT
|
||||
default y
|
||||
select MBEDTLS_TLS_ENABLED
|
||||
help
|
||||
Select this option to use MbedTLS TLS client for WPA2 enterprise connection.
|
||||
Please note that from MbedTLS-3.0 onwards, MbedTLS does not support SSL-3.0
|
||||
TLS-v1.0, TLS-v1.1 versions. In case your server is using one of these version,
|
||||
it is advisable to update your server.
|
||||
Please disable this option for compatibility with older TLS versions.
|
||||
|
||||
config ESP_WIFI_EAP_TLS1_3
|
||||
bool "Enable EAP-TLS v1.3 Support for WiFi Enterprise connection"
|
||||
default n
|
||||
select MBEDTLS_SSL_PROTO_TLS1_3
|
||||
depends on ESP_WIFI_MBEDTLS_TLS_CLIENT && IDF_EXPERIMENTAL_FEATURES
|
||||
help
|
||||
Select this option to support EAP with TLS v1.3.
|
||||
This configuration still supports compatibility with EAP-TLS v1.2.
|
||||
Please note that enabling this configuration will cause every application which
|
||||
uses TLS go for TLS1.3 if server supports that. TLS1.3 is still in development in mbedtls
|
||||
and there may be interoperability issues with this. Please modify your application to set
|
||||
max version as TLS1.2 if you want to enable TLS1.3 only for WiFi connection.
|
||||
|
||||
endif
|
||||
|
||||
config ESP_WIFI_WAPI_PSK
|
||||
bool "Enable WAPI PSK support"
|
||||
depends on SLAVE_SOC_WIFI_WAPI_SUPPORT
|
||||
default n
|
||||
help
|
||||
Select this option to enable WAPI-PSK
|
||||
which is a Chinese National Standard Encryption for Wireless LANs (GB 15629.11-2003).
|
||||
|
||||
config ESP_WIFI_SUITE_B_192
|
||||
bool "Enable NSA suite B support with 192 bit key"
|
||||
default n
|
||||
depends on SLAVE_SOC_WIFI_GCMP_SUPPORT
|
||||
select ESP_WIFI_GCMP_SUPPORT
|
||||
select ESP_WIFI_GMAC_SUPPORT
|
||||
help
|
||||
Select this option to enable 192 bit NSA suite-B.
|
||||
This is necessary to support WPA3 192 bit security.
|
||||
|
||||
config ESP_WIFI_11KV_SUPPORT
|
||||
bool "Enable 802.11k, 802.11v APIs Support"
|
||||
default n
|
||||
help
|
||||
Select this option to enable 802.11k 802.11v APIs(RRM and BTM support).
|
||||
Only APIs which are helpful for network assisted roaming
|
||||
are supported for now.
|
||||
Enable this option with BTM and RRM enabled in sta config
|
||||
to make device ready for network assisted roaming.
|
||||
BTM: BSS transition management enables an AP to request a station to transition
|
||||
to a specific AP, or to indicate to a station a set of preferred APs.
|
||||
RRM: Radio measurements enable STAs to understand the radio environment,
|
||||
it enables STAs to observe and gather data on radio link performance
|
||||
and on the radio environment. Current implementation adds beacon report,
|
||||
link measurement, neighbor report.
|
||||
|
||||
config ESP_WIFI_SCAN_CACHE
|
||||
bool "Keep scan results in cache"
|
||||
depends on ESP_WIFI_11KV_SUPPORT
|
||||
default n
|
||||
help
|
||||
Keep scan results in cache, if not enabled, those
|
||||
will be flushed immediately.
|
||||
|
||||
config ESP_WIFI_MBO_SUPPORT
|
||||
bool "Enable Multi Band Operation Certification Support"
|
||||
default n
|
||||
select ESP_WIFI_11KV_SUPPORT
|
||||
select ESP_WIFI_SCAN_CACHE
|
||||
help
|
||||
Select this option to enable WiFi Multiband operation certification support.
|
||||
|
||||
config ESP_WIFI_ENABLE_ROAMING_APP
|
||||
bool "Advanced support for Wi-Fi Roaming (Experimental)"
|
||||
depends on IDF_EXPERIMENTAL_FEATURES
|
||||
default n
|
||||
select ESP_WIFI_SCAN_CACHE
|
||||
help
|
||||
Enable Espressif's roaming app to allow for efficient Wi-Fi roaming.
|
||||
This includes configurable periodic environment scans, maintaining a cache of the
|
||||
best APs, handling low rssi events etc.
|
||||
|
||||
Risk Warning
|
||||
Please note that this feature is still experimental and enabling this potentially can
|
||||
lead to unpredictable scanning, connection and roaming attempts.
|
||||
We are still working on tuning and optimising this feature to ensure reliable and stable use.
|
||||
|
||||
menu "Configure roaming App"
|
||||
depends on ESP_WIFI_ENABLE_ROAMING_APP
|
||||
rsource "wifi_apps/roaming_app/src/Kconfig.roaming"
|
||||
endmenu
|
||||
|
||||
config ESP_WIFI_DPP_SUPPORT
|
||||
bool "Enable DPP support"
|
||||
default n
|
||||
select ESP_WIFI_MBEDTLS_CRYPTO
|
||||
help
|
||||
Select this option to enable WiFi Easy Connect Support.
|
||||
|
||||
config ESP_WIFI_11R_SUPPORT
|
||||
bool "Enable 802.11R (Fast Transition) Support"
|
||||
default n
|
||||
help
|
||||
Select this option to enable WiFi Fast Transition Support.
|
||||
|
||||
config ESP_WIFI_WPS_SOFTAP_REGISTRAR
|
||||
bool "Add WPS Registrar support in SoftAP mode"
|
||||
depends on ESP_WIFI_SOFTAP_SUPPORT
|
||||
default n
|
||||
help
|
||||
Select this option to enable WPS registrar support in softAP mode.
|
||||
|
||||
config ESP_WIFI_ENABLE_WIFI_RX_STATS
|
||||
bool "Enable Wi-Fi reception statistics"
|
||||
depends on SLAVE_SOC_WIFI_HE_SUPPORT
|
||||
default "y"
|
||||
help
|
||||
Enable Wi-Fi reception statistics. Total support 2 access category. Each access category
|
||||
will use 190 bytes memory.
|
||||
|
||||
config ESP_WIFI_ENABLE_WIFI_RX_MU_STATS
|
||||
bool "Enable Wi-Fi DL MU-MIMO and DL OFDMA reception statistics"
|
||||
depends on ESP_WIFI_ENABLE_WIFI_RX_STATS
|
||||
default "y"
|
||||
help
|
||||
Enable Wi-Fi DL MU-MIMO and DL OFDMA reception statistics. Will use 10932 bytes memory.
|
||||
|
||||
menu "WPS Configuration Options"
|
||||
config ESP_WIFI_WPS_STRICT
|
||||
bool "Strictly validate all WPS attributes"
|
||||
default n
|
||||
help
|
||||
Select this option to enable validate each WPS attribute
|
||||
rigorously. Disabling this add the workarounds with various APs.
|
||||
Enabling this may cause inter operability issues with some APs.
|
||||
|
||||
config ESP_WIFI_WPS_PASSPHRASE
|
||||
bool "Get WPA2 passphrase in WPS config"
|
||||
default n
|
||||
help
|
||||
Select this option to get passphrase during WPS configuration.
|
||||
This option fakes the virtual display capabilities to get the
|
||||
configuration in passphrase mode.
|
||||
Not recommended to be used since WPS credentials should not
|
||||
be shared to other devices, making it in readable format increases
|
||||
that risk, also passphrase requires pbkdf2 to convert in psk.
|
||||
|
||||
endmenu # "WPS Configuration Options"
|
||||
|
||||
|
||||
config ESP_WIFI_DEBUG_PRINT
|
||||
bool "Print debug messages from WPA Supplicant"
|
||||
default n
|
||||
help
|
||||
Select this option to print logging information from WPA supplicant,
|
||||
this includes handshake information and key hex dumps depending
|
||||
on the project logging level.
|
||||
|
||||
Enabling this could increase the build size ~60kb
|
||||
depending on the project logging level.
|
||||
|
||||
config ESP_WIFI_TESTING_OPTIONS
|
||||
bool "Add DPP testing code"
|
||||
default n
|
||||
help
|
||||
Select this to enable unity test for DPP.
|
||||
|
||||
config ESP_WIFI_ENTERPRISE_SUPPORT
|
||||
bool "Enable enterprise option"
|
||||
default y
|
||||
help
|
||||
Select this to enable/disable enterprise connection support.
|
||||
|
||||
disabling this will reduce binary size.
|
||||
disabling this will disable the use of any esp_wifi_sta_wpa2_ent_* (as APIs will be meaningless)
|
||||
|
||||
Note that when using bigger certificates on low-power chips without crypto
|
||||
hardware acceleration, it is recommended to adjust the task watchdog timer (TWDT)
|
||||
if it is enabled. For precise information on timing requirements, you can check
|
||||
performance numbers at https://github.com/espressif/mbedtls/wiki/Performance-Numbers.
|
||||
|
||||
config ESP_WIFI_ENT_FREE_DYNAMIC_BUFFER
|
||||
bool "Free dynamic buffers during WiFi enterprise connection"
|
||||
depends on ESP_WIFI_ENTERPRISE_SUPPORT
|
||||
default y if SLAVE_IDF_TARGET_ESP32C2
|
||||
default n if !SLAVE_IDF_TARGET_ESP32C2
|
||||
help
|
||||
Select this configuration to free dynamic buffers during WiFi enterprise connection.
|
||||
This will enable chip to reduce heap consumption during WiFi enterprise connection.
|
||||
menu "Wi-Fi configuration"
|
||||
orsource "./idf_v$ESP_IDF_VERSION/Kconfig.wifi.in"
|
||||
endmenu
|
||||
|
||||
endmenu # Wi-Fi Remote
|
||||
|
@ -1,6 +1,6 @@
|
||||
choice ESP_WIFI_REMOTE_LIBRARY
|
||||
prompt "Choose WiFi-remote implementation"
|
||||
default ESP_WIFI_REMOTE_LIBRARY_EPPP
|
||||
default ESP_WIFI_REMOTE_LIBRARY_HOSTED
|
||||
help
|
||||
Select type of WiFi Remote implementation
|
||||
|
||||
|
@ -1,3 +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
|
||||
|
@ -1,3 +1,4 @@
|
||||
CONFIG_ESP_WIFI_REMOTE_LIBRARY_EPPP=y
|
||||
CONFIG_LWIP_IP_FORWARD=y
|
||||
CONFIG_LWIP_IPV4_NAPT=y
|
||||
CONFIG_LWIP_TCPIP_TASK_STACK_SIZE=4096
|
||||
|
@ -1,4 +1,4 @@
|
||||
version: 0.3.0
|
||||
version: 0.4.0
|
||||
url: https://github.com/espressif/esp-protocols/tree/master/components/esp_wifi_remote
|
||||
description: Utility wrapper for esp_wifi functionality on remote targets
|
||||
dependencies:
|
||||
@ -8,3 +8,5 @@ dependencies:
|
||||
version: '>=5.3'
|
||||
espressif/esp_hosted:
|
||||
version: '>=0.0.6'
|
||||
rules:
|
||||
- if: "target in [esp32h2, esp32p4]"
|
||||
|
@ -1,5 +1,4 @@
|
||||
# This file is auto-generated
|
||||
menu "ESP Hosted Mock"
|
||||
choice SLAVE_IDF_TARGET
|
||||
prompt "choose slave target"
|
||||
default SLAVE_IDF_TARGET_ESP32
|
||||
@ -15,9 +14,4 @@ menu "ESP Hosted Mock"
|
||||
bool "esp32c2"
|
||||
config SLAVE_IDF_TARGET_ESP32C6
|
||||
bool "esp32c6"
|
||||
config SLAVE_IDF_TARGET_ESP32H2
|
||||
bool "esp32h2"
|
||||
config SLAVE_IDF_TARGET_ESP32P4
|
||||
bool "esp32p4"
|
||||
endchoice
|
||||
endmenu
|
@ -223,15 +223,3 @@ if SLAVE_IDF_TARGET_ESP32C6
|
||||
default y
|
||||
|
||||
endif # ESP32C6
|
||||
|
||||
if SLAVE_IDF_TARGET_ESP32H2
|
||||
|
||||
endif # ESP32H2
|
||||
|
||||
if SLAVE_IDF_TARGET_ESP32P4
|
||||
|
||||
config SLAVE_SOC_WIFI_LIGHT_SLEEP_CLK_WIDTH
|
||||
int
|
||||
default 12
|
||||
|
||||
endif # ESP32P4
|
723
components/esp_wifi_remote/idf_v5.3/Kconfig.wifi.in
Normal file
723
components/esp_wifi_remote/idf_v5.3/Kconfig.wifi.in
Normal file
@ -0,0 +1,723 @@
|
||||
# Wi-Fi configuration
|
||||
# This file is auto-generated
|
||||
|
||||
config ESP_WIFI_STATIC_RX_BUFFER_NUM
|
||||
int "Max number of WiFi static RX buffers"
|
||||
range 2 25 if !SLAVE_SOC_WIFI_HE_SUPPORT
|
||||
range 2 128 if SLAVE_SOC_WIFI_HE_SUPPORT
|
||||
default 10 if !SPIRAM_TRY_ALLOCATE_WIFI_LWIP
|
||||
default 16 if SPIRAM_TRY_ALLOCATE_WIFI_LWIP
|
||||
help
|
||||
Set the number of WiFi static RX buffers. Each buffer takes approximately 1.6KB of RAM.
|
||||
The static rx buffers are allocated when esp_wifi_init is called, they are not freed
|
||||
until esp_wifi_deinit is called.
|
||||
|
||||
WiFi hardware use these buffers to receive all 802.11 frames.
|
||||
A higher number may allow higher throughput but increases memory use. If ESP_WIFI_AMPDU_RX_ENABLED
|
||||
is enabled, this value is recommended to set equal or bigger than ESP_WIFI_RX_BA_WIN in order to
|
||||
achieve better throughput and compatibility with both stations and APs.
|
||||
|
||||
config ESP_WIFI_DYNAMIC_RX_BUFFER_NUM
|
||||
int "Max number of WiFi dynamic RX buffers"
|
||||
range 0 128 if !LWIP_WND_SCALE
|
||||
range 0 1024 if LWIP_WND_SCALE
|
||||
default 32
|
||||
help
|
||||
Set the number of WiFi dynamic RX buffers, 0 means unlimited RX buffers will be allocated
|
||||
(provided sufficient free RAM). The size of each dynamic RX buffer depends on the size of
|
||||
the received data frame.
|
||||
|
||||
For each received data frame, the WiFi driver makes a copy to an RX buffer and then delivers
|
||||
it to the high layer TCP/IP stack. The dynamic RX buffer is freed after the higher layer has
|
||||
successfully received the data frame.
|
||||
|
||||
For some applications, WiFi data frames may be received faster than the application can
|
||||
process them. In these cases we may run out of memory if RX buffer number is unlimited (0).
|
||||
|
||||
If a dynamic RX buffer limit is set, it should be at least the number of static RX buffers.
|
||||
|
||||
choice ESP_WIFI_TX_BUFFER
|
||||
prompt "Type of WiFi TX buffers"
|
||||
default ESP_WIFI_DYNAMIC_TX_BUFFER
|
||||
help
|
||||
Select type of WiFi TX buffers:
|
||||
|
||||
If "Static" is selected, WiFi TX buffers are allocated when WiFi is initialized and released
|
||||
when WiFi is de-initialized. The size of each static TX buffer is fixed to about 1.6KB.
|
||||
|
||||
If "Dynamic" is selected, each WiFi TX buffer is allocated as needed when a data frame is
|
||||
delivered to the Wifi driver from the TCP/IP stack. The buffer is freed after the data frame
|
||||
has been sent by the WiFi driver. The size of each dynamic TX buffer depends on the length
|
||||
of each data frame sent by the TCP/IP layer.
|
||||
|
||||
If PSRAM is enabled, "Static" should be selected to guarantee enough WiFi TX buffers.
|
||||
If PSRAM is disabled, "Dynamic" should be selected to improve the utilization of RAM.
|
||||
|
||||
config ESP_WIFI_STATIC_TX_BUFFER
|
||||
bool "Static"
|
||||
config ESP_WIFI_DYNAMIC_TX_BUFFER
|
||||
bool "Dynamic"
|
||||
depends on !SPIRAM_USE_MALLOC
|
||||
endchoice
|
||||
|
||||
config ESP_WIFI_TX_BUFFER_TYPE
|
||||
int
|
||||
default 0 if ESP_WIFI_STATIC_TX_BUFFER
|
||||
default 1 if ESP_WIFI_DYNAMIC_TX_BUFFER
|
||||
|
||||
config ESP_WIFI_STATIC_TX_BUFFER_NUM
|
||||
int "Max number of WiFi static TX buffers"
|
||||
depends on ESP_WIFI_STATIC_TX_BUFFER
|
||||
range 1 64
|
||||
default 16
|
||||
help
|
||||
Set the number of WiFi static TX buffers. Each buffer takes approximately 1.6KB of RAM.
|
||||
The static RX buffers are allocated when esp_wifi_init() is called, they are not released
|
||||
until esp_wifi_deinit() is called.
|
||||
|
||||
For each transmitted data frame from the higher layer TCP/IP stack, the WiFi driver makes a
|
||||
copy of it in a TX buffer. For some applications especially UDP applications, the upper
|
||||
layer can deliver frames faster than WiFi layer can transmit. In these cases, we may run out
|
||||
of TX buffers.
|
||||
|
||||
config ESP_WIFI_CACHE_TX_BUFFER_NUM
|
||||
int "Max number of WiFi cache TX buffers"
|
||||
depends on SPIRAM
|
||||
range 16 128
|
||||
default 32
|
||||
help
|
||||
Set the number of WiFi cache TX buffer number.
|
||||
|
||||
For each TX packet from uplayer, such as LWIP etc, WiFi driver needs to allocate a static TX
|
||||
buffer and makes a copy of uplayer packet. If WiFi driver fails to allocate the static TX buffer,
|
||||
it caches the uplayer packets to a dedicated buffer queue, this option is used to configure the
|
||||
size of the cached TX queue.
|
||||
|
||||
config ESP_WIFI_DYNAMIC_TX_BUFFER_NUM
|
||||
int "Max number of WiFi dynamic TX buffers"
|
||||
depends on ESP_WIFI_DYNAMIC_TX_BUFFER
|
||||
range 1 128
|
||||
default 32
|
||||
help
|
||||
Set the number of WiFi dynamic TX buffers. The size of each dynamic TX buffer is not fixed,
|
||||
it depends on the size of each transmitted data frame.
|
||||
|
||||
For each transmitted frame from the higher layer TCP/IP stack, the WiFi driver makes a copy
|
||||
of it in a TX buffer. For some applications, especially UDP applications, the upper layer
|
||||
can deliver frames faster than WiFi layer can transmit. In these cases, we may run out of TX
|
||||
buffers.
|
||||
|
||||
choice ESP_WIFI_MGMT_RX_BUFFER
|
||||
prompt "Type of WiFi RX MGMT buffers"
|
||||
default ESP_WIFI_STATIC_RX_MGMT_BUFFER
|
||||
help
|
||||
Select type of WiFi RX MGMT buffers:
|
||||
|
||||
If "Static" is selected, WiFi RX MGMT buffers are allocated when WiFi is initialized and released
|
||||
when WiFi is de-initialized. The size of each static RX MGMT buffer is fixed to about 500 Bytes.
|
||||
|
||||
If "Dynamic" is selected, each WiFi RX MGMT buffer is allocated as needed when a MGMT data frame is
|
||||
received. The MGMT buffer is freed after the MGMT data frame has been processed by the WiFi driver.
|
||||
|
||||
|
||||
config ESP_WIFI_STATIC_RX_MGMT_BUFFER
|
||||
bool "Static"
|
||||
config ESP_WIFI_DYNAMIC_RX_MGMT_BUFFER
|
||||
bool "Dynamic"
|
||||
endchoice
|
||||
|
||||
config ESP_WIFI_DYNAMIC_RX_MGMT_BUF
|
||||
int
|
||||
default 0 if ESP_WIFI_STATIC_RX_MGMT_BUFFER
|
||||
default 1 if ESP_WIFI_DYNAMIC_RX_MGMT_BUFFER
|
||||
|
||||
config ESP_WIFI_RX_MGMT_BUF_NUM_DEF
|
||||
int "Max number of WiFi RX MGMT buffers"
|
||||
range 1 10
|
||||
default 5
|
||||
help
|
||||
Set the number of WiFi RX_MGMT buffers.
|
||||
|
||||
For Management buffers, the number of dynamic and static management buffers is the same.
|
||||
In order to prevent memory fragmentation, the management buffer type should be set to static first.
|
||||
|
||||
config ESP_WIFI_CSI_ENABLED
|
||||
bool "WiFi CSI(Channel State Information)"
|
||||
depends on SLAVE_SOC_WIFI_CSI_SUPPORT
|
||||
default n
|
||||
help
|
||||
Select this option to enable CSI(Channel State Information) feature. CSI takes about
|
||||
CONFIG_ESP_WIFI_STATIC_RX_BUFFER_NUM KB of RAM. If CSI is not used, it is better to disable
|
||||
this feature in order to save memory.
|
||||
|
||||
config ESP_WIFI_AMPDU_TX_ENABLED
|
||||
bool "WiFi AMPDU TX"
|
||||
default y
|
||||
help
|
||||
Select this option to enable AMPDU TX feature
|
||||
|
||||
|
||||
config ESP_WIFI_TX_BA_WIN
|
||||
int "WiFi AMPDU TX BA window size"
|
||||
depends on ESP_WIFI_AMPDU_TX_ENABLED
|
||||
range 2 32 if !SLAVE_SOC_WIFI_HE_SUPPORT
|
||||
range 2 64 if SLAVE_SOC_WIFI_HE_SUPPORT
|
||||
default 6
|
||||
help
|
||||
Set the size of WiFi Block Ack TX window. Generally a bigger value means higher throughput but
|
||||
more memory. Most of time we should NOT change the default value unless special reason, e.g.
|
||||
test the maximum UDP TX throughput with iperf etc. For iperf test in shieldbox, the recommended
|
||||
value is 9~12.
|
||||
|
||||
config ESP_WIFI_AMPDU_RX_ENABLED
|
||||
bool "WiFi AMPDU RX"
|
||||
default y
|
||||
help
|
||||
Select this option to enable AMPDU RX feature
|
||||
|
||||
config ESP_WIFI_RX_BA_WIN
|
||||
int "WiFi AMPDU RX BA window size"
|
||||
depends on ESP_WIFI_AMPDU_RX_ENABLED
|
||||
range 2 32 if !SLAVE_SOC_WIFI_HE_SUPPORT
|
||||
range 2 64 if SLAVE_SOC_WIFI_HE_SUPPORT
|
||||
default 6 if !SPIRAM_TRY_ALLOCATE_WIFI_LWIP
|
||||
default 16 if SPIRAM_TRY_ALLOCATE_WIFI_LWIP
|
||||
help
|
||||
Set the size of WiFi Block Ack RX window. Generally a bigger value means higher throughput and better
|
||||
compatibility but more memory. Most of time we should NOT change the default value unless special
|
||||
reason, e.g. test the maximum UDP RX throughput with iperf etc. For iperf test in shieldbox, the
|
||||
recommended value is 9~12. If PSRAM is used and WiFi memory is preferred to allocate in PSRAM first,
|
||||
the default and minimum value should be 16 to achieve better throughput and compatibility with both
|
||||
stations and APs.
|
||||
|
||||
config ESP_WIFI_AMSDU_TX_ENABLED
|
||||
bool "WiFi AMSDU TX"
|
||||
depends on SPIRAM
|
||||
default n
|
||||
help
|
||||
Select this option to enable AMSDU TX feature
|
||||
|
||||
config ESP_WIFI_NVS_ENABLED
|
||||
bool "WiFi NVS flash"
|
||||
default y
|
||||
help
|
||||
Select this option to enable WiFi NVS flash
|
||||
|
||||
choice ESP_WIFI_TASK_CORE_ID
|
||||
depends on !FREERTOS_UNICORE
|
||||
prompt "WiFi Task Core ID"
|
||||
default ESP_WIFI_TASK_PINNED_TO_CORE_0
|
||||
help
|
||||
Pinned WiFi task to core 0 or core 1.
|
||||
|
||||
config ESP_WIFI_TASK_PINNED_TO_CORE_0
|
||||
bool "Core 0"
|
||||
config ESP_WIFI_TASK_PINNED_TO_CORE_1
|
||||
bool "Core 1"
|
||||
endchoice
|
||||
|
||||
config ESP_WIFI_SOFTAP_BEACON_MAX_LEN
|
||||
int "Max length of WiFi SoftAP Beacon"
|
||||
range 752 1256
|
||||
default 752
|
||||
help
|
||||
ESP-MESH utilizes beacon frames to detect and resolve root node conflicts (see documentation). However
|
||||
the default length of a beacon frame can simultaneously hold only five root node identifier structures,
|
||||
meaning that a root node conflict of up to five nodes can be detected at one time. In the occurrence of
|
||||
more root nodes conflict involving more than five root nodes, the conflict resolution process will
|
||||
detect five of the root nodes, resolve the conflict, and re-detect more root nodes. This process will
|
||||
repeat until all root node conflicts are resolved. However this process can generally take a very long
|
||||
time.
|
||||
|
||||
To counter this situation, the beacon frame length can be increased such that more root nodes can be
|
||||
detected simultaneously. Each additional root node will require 36 bytes and should be added on top of
|
||||
the default beacon frame length of
|
||||
752 bytes. For example, if you want to detect 10 root nodes simultaneously, you need to set the beacon
|
||||
frame length as
|
||||
932 (752+36*5).
|
||||
|
||||
Setting a longer beacon length also assists with debugging as the conflicting root nodes can be
|
||||
identified more quickly.
|
||||
|
||||
config ESP_WIFI_MGMT_SBUF_NUM
|
||||
int "WiFi mgmt short buffer number"
|
||||
range 6 32
|
||||
default 32
|
||||
help
|
||||
Set the number of WiFi management short buffer.
|
||||
|
||||
config ESP_WIFI_IRAM_OPT
|
||||
bool "WiFi IRAM speed optimization"
|
||||
default n if (BT_ENABLED && SPIRAM && SLAVE_IDF_TARGET_ESP32)
|
||||
default y
|
||||
help
|
||||
Select this option to place frequently called Wi-Fi library functions in IRAM.
|
||||
When this option is disabled, more than 10Kbytes of IRAM memory will be saved
|
||||
but Wi-Fi throughput will be reduced.
|
||||
|
||||
config ESP_WIFI_EXTRA_IRAM_OPT
|
||||
bool "WiFi EXTRA IRAM speed optimization"
|
||||
default y if SLAVE_SOC_WIFI_HE_SUPPORT
|
||||
default n
|
||||
help
|
||||
Select this option to place additional frequently called Wi-Fi library functions
|
||||
in IRAM. When this option is disabled, more than 5Kbytes of IRAM memory will be saved
|
||||
but Wi-Fi throughput will be reduced.
|
||||
|
||||
config ESP_WIFI_RX_IRAM_OPT
|
||||
bool "WiFi RX IRAM speed optimization"
|
||||
default n if (BT_ENABLED && SPIRAM && SLAVE_IDF_TARGET_ESP32)
|
||||
default y
|
||||
help
|
||||
Select this option to place frequently called Wi-Fi library RX functions in IRAM.
|
||||
When this option is disabled, more than 17Kbytes of IRAM memory will be saved
|
||||
but Wi-Fi performance will be reduced.
|
||||
|
||||
config ESP_WIFI_ENABLE_WPA3_SAE
|
||||
bool "Enable WPA3-Personal"
|
||||
default y
|
||||
select ESP_WIFI_MBEDTLS_CRYPTO
|
||||
help
|
||||
Select this option to allow the device to establish a WPA3-Personal connection with eligible AP's.
|
||||
PMF (Protected Management Frames) is a prerequisite feature for a WPA3 connection, it needs to be
|
||||
explicitly configured before attempting connection. Please refer to the Wi-Fi Driver API Guide
|
||||
for details.
|
||||
|
||||
config ESP_WIFI_ENABLE_SAE_PK
|
||||
bool "Enable SAE-PK"
|
||||
default y
|
||||
depends on ESP_WIFI_ENABLE_WPA3_SAE
|
||||
help
|
||||
Select this option to enable SAE-PK
|
||||
|
||||
config ESP_WIFI_SOFTAP_SAE_SUPPORT
|
||||
bool "Enable WPA3 Personal(SAE) SoftAP"
|
||||
default y
|
||||
depends on ESP_WIFI_ENABLE_WPA3_SAE
|
||||
depends on ESP_WIFI_SOFTAP_SUPPORT
|
||||
help
|
||||
Select this option to enable SAE support in softAP mode.
|
||||
|
||||
config ESP_WIFI_ENABLE_WPA3_OWE_STA
|
||||
bool "Enable OWE STA"
|
||||
default y
|
||||
select ESP_WIFI_MBEDTLS_CRYPTO
|
||||
help
|
||||
Select this option to allow the device to establish OWE connection with eligible AP's.
|
||||
PMF (Protected Management Frames) is a prerequisite feature for a WPA3 connection, it needs to be
|
||||
explicitly configured before attempting connection. Please refer to the Wi-Fi Driver API Guide
|
||||
for details.
|
||||
|
||||
config ESP_WIFI_SLP_IRAM_OPT
|
||||
bool "WiFi SLP IRAM speed optimization"
|
||||
select PM_SLP_DEFAULT_PARAMS_OPT
|
||||
select PERIPH_CTRL_FUNC_IN_IRAM
|
||||
default y if SLAVE_SOC_WIFI_HE_SUPPORT
|
||||
help
|
||||
Select this option to place called Wi-Fi library TBTT process and receive beacon functions in IRAM.
|
||||
Some functions can be put in IRAM either by ESP_WIFI_IRAM_OPT and ESP_WIFI_RX_IRAM_OPT, or this one.
|
||||
If already enabled ESP_WIFI_IRAM_OPT, the other 7.3KB IRAM memory would be taken by this option.
|
||||
If already enabled ESP_WIFI_RX_IRAM_OPT, the other 1.3KB IRAM memory would be taken by this option.
|
||||
If neither of them are enabled, the other 7.4KB IRAM memory would be taken by this option.
|
||||
Wi-Fi power-save mode average current would be reduced if this option is enabled.
|
||||
|
||||
config ESP_WIFI_SLP_DEFAULT_MIN_ACTIVE_TIME
|
||||
int "Minimum active time"
|
||||
range 8 60
|
||||
default 50
|
||||
help
|
||||
Only for station in WIFI_PS_MIN_MODEM or WIFI_PS_MAX_MODEM. When the station enters the active state,
|
||||
it will work for at least ESP_WIFI_SLP_DEFAULT_MIN_ACTIVE_TIME. If a data packet is received or sent
|
||||
during this period, the time will be refreshed. If the time is up, but the station still has packets
|
||||
to receive or send, the time will also be refreshed. unit: milliseconds.
|
||||
|
||||
config ESP_WIFI_SLP_DEFAULT_MAX_ACTIVE_TIME
|
||||
int "Maximum keep alive time"
|
||||
range 10 60
|
||||
default 10
|
||||
help
|
||||
Only for station in WIFI_PS_MIN_MODEM or WIFI_PS_MAX_MODEM. If no packet has been
|
||||
sent within ESP_WIFI_SLP_DEFAULT_MAX_ACTIVE_TIME, a null data packet will be sent
|
||||
to maintain the connection with the AP. unit: seconds.
|
||||
|
||||
config ESP_WIFI_SLP_DEFAULT_WAIT_BROADCAST_DATA_TIME
|
||||
int "Minimum wait broadcast data time"
|
||||
range 10 30
|
||||
default 15
|
||||
help
|
||||
Only for station in WIFI_PS_MIN_MODEM or WIFI_PS_MAX_MODEM. When the station knows through the beacon
|
||||
that AP will send broadcast packet, it will wait for ESP_WIFI_SLP_DEFAULT_WAIT_BROADCAST_DATA_TIME
|
||||
before entering the sleep process. If a broadcast packet is received with more data bits, the time
|
||||
will refreshed. unit: milliseconds.
|
||||
|
||||
config ESP_WIFI_FTM_ENABLE
|
||||
bool "WiFi FTM"
|
||||
default n
|
||||
depends on SLAVE_SOC_WIFI_FTM_SUPPORT
|
||||
help
|
||||
Enable feature Fine Timing Measurement for calculating WiFi Round-Trip-Time (RTT).
|
||||
|
||||
config ESP_WIFI_FTM_INITIATOR_SUPPORT
|
||||
bool "FTM Initiator support"
|
||||
default y
|
||||
depends on ESP_WIFI_FTM_ENABLE
|
||||
|
||||
config ESP_WIFI_FTM_RESPONDER_SUPPORT
|
||||
bool "FTM Responder support"
|
||||
default y
|
||||
depends on ESP_WIFI_FTM_ENABLE
|
||||
|
||||
config ESP_WIFI_STA_DISCONNECTED_PM_ENABLE
|
||||
bool "Power Management for station at disconnected"
|
||||
default y
|
||||
help
|
||||
Select this option to enable power_management for station when disconnected.
|
||||
Chip will do modem-sleep when rf module is not in use any more.
|
||||
|
||||
config ESP_WIFI_GCMP_SUPPORT
|
||||
bool "WiFi GCMP Support(GCMP128 and GCMP256)"
|
||||
default n
|
||||
depends on SLAVE_SOC_WIFI_GCMP_SUPPORT
|
||||
help
|
||||
Select this option to enable GCMP support. GCMP support is compulsory for WiFi Suite-B support.
|
||||
|
||||
config ESP_WIFI_GMAC_SUPPORT
|
||||
bool "WiFi GMAC Support(GMAC128 and GMAC256)"
|
||||
default y
|
||||
help
|
||||
Select this option to enable GMAC support. GMAC support is compulsory for WiFi 192 bit certification.
|
||||
|
||||
config ESP_WIFI_SOFTAP_SUPPORT
|
||||
bool "WiFi SoftAP Support"
|
||||
default y
|
||||
help
|
||||
WiFi module can be compiled without SoftAP to save code size.
|
||||
|
||||
config ESP_WIFI_ENHANCED_LIGHT_SLEEP
|
||||
bool "WiFi modem automatically receives the beacon"
|
||||
default n
|
||||
depends on ESP_PHY_MAC_BB_PD && SOC_PM_SUPPORT_BEACON_WAKEUP
|
||||
help
|
||||
The wifi modem automatically receives the beacon frame during light sleep.
|
||||
|
||||
config ESP_WIFI_SLP_BEACON_LOST_OPT
|
||||
bool "Wifi sleep optimize when beacon lost"
|
||||
help
|
||||
Enable wifi sleep optimization when beacon loss occurs and immediately enter
|
||||
sleep mode when the WiFi module detects beacon loss.
|
||||
|
||||
config ESP_WIFI_SLP_BEACON_LOST_TIMEOUT
|
||||
int "Beacon loss timeout"
|
||||
range 5 100
|
||||
default 10
|
||||
depends on ESP_WIFI_SLP_BEACON_LOST_OPT
|
||||
help
|
||||
Timeout time for close rf phy when beacon loss occurs, Unit: 1024 microsecond.
|
||||
|
||||
config ESP_WIFI_SLP_BEACON_LOST_THRESHOLD
|
||||
int "Maximum number of consecutive lost beacons allowed"
|
||||
range 0 8
|
||||
default 3
|
||||
depends on ESP_WIFI_SLP_BEACON_LOST_OPT
|
||||
help
|
||||
Maximum number of consecutive lost beacons allowed, WiFi keeps Rx state when
|
||||
the number of consecutive beacons lost is greater than the given threshold.
|
||||
|
||||
config ESP_WIFI_SLP_PHY_ON_DELTA_EARLY_TIME
|
||||
int "Delta early time for RF PHY on"
|
||||
range 0 100
|
||||
default 2
|
||||
depends on ESP_WIFI_SLP_BEACON_LOST_OPT && SLAVE_SOC_WIFI_SUPPORT_VARIABLE_BEACON_WINDOW
|
||||
help
|
||||
Delta early time for rf phy on, When the beacon is lost, the next rf phy on will
|
||||
be earlier the time specified by the configuration item, Unit: 32 microsecond.
|
||||
|
||||
config ESP_WIFI_SLP_PHY_OFF_DELTA_TIMEOUT_TIME
|
||||
int "Delta timeout time for RF PHY off"
|
||||
range 0 8
|
||||
default 2
|
||||
depends on ESP_WIFI_SLP_BEACON_LOST_OPT && SLAVE_SOC_WIFI_SUPPORT_VARIABLE_BEACON_WINDOW
|
||||
help
|
||||
Delta timeout time for rf phy off, When the beacon is lost, the next rf phy off will
|
||||
be delayed for the time specified by the configuration item. Unit: 1024 microsecond.
|
||||
|
||||
config ESP_WIFI_ESPNOW_MAX_ENCRYPT_NUM
|
||||
int "Maximum espnow encrypt peers number"
|
||||
range 0 4 if SLAVE_IDF_TARGET_ESP32C2
|
||||
range 0 17 if (!SLAVE_IDF_TARGET_ESP32C2)
|
||||
default 2 if SLAVE_IDF_TARGET_ESP32C2
|
||||
default 7 if (!SLAVE_IDF_TARGET_ESP32C2)
|
||||
help
|
||||
Maximum number of encrypted peers supported by espnow.
|
||||
The number of hardware keys for encryption is fixed. And the espnow and SoftAP share the same
|
||||
hardware keys. So this configuration will affect the maximum connection number of SoftAP.
|
||||
Maximum espnow encrypted peers number + maximum number of connections of SoftAP = Max hardware
|
||||
keys number. When using ESP mesh, this value should be set to a maximum of 6.
|
||||
|
||||
config ESP_WIFI_NAN_ENABLE
|
||||
bool "WiFi Aware"
|
||||
default n
|
||||
depends on SLAVE_SOC_WIFI_NAN_SUPPORT
|
||||
help
|
||||
Enable WiFi Aware (NAN) feature.
|
||||
|
||||
config ESP_WIFI_MBEDTLS_CRYPTO
|
||||
bool "Use MbedTLS crypto APIs"
|
||||
default y
|
||||
select MBEDTLS_AES_C
|
||||
select MBEDTLS_ECP_C
|
||||
select MBEDTLS_ECDH_C
|
||||
select MBEDTLS_ECDSA_C
|
||||
select MBEDTLS_CMAC_C
|
||||
select MBEDTLS_ECP_DP_SECP256R1_ENABLED
|
||||
help
|
||||
Select this option to enable the use of MbedTLS crypto APIs.
|
||||
The internal crypto support within the supplicant is limited
|
||||
and may not suffice for all new security features, including WPA3.
|
||||
|
||||
It is recommended to always keep this option enabled. Additionally,
|
||||
note that MbedTLS can leverage hardware acceleration if available,
|
||||
resulting in significantly faster cryptographic operations.
|
||||
|
||||
if ESP_WIFI_MBEDTLS_CRYPTO
|
||||
config ESP_WIFI_MBEDTLS_TLS_CLIENT
|
||||
bool "Use MbedTLS TLS client for WiFi Enterprise connection"
|
||||
depends on ESP_WIFI_ENTERPRISE_SUPPORT
|
||||
default y
|
||||
select MBEDTLS_TLS_ENABLED
|
||||
help
|
||||
Select this option to use MbedTLS TLS client for WPA2 enterprise connection.
|
||||
Please note that from MbedTLS-3.0 onwards, MbedTLS does not support SSL-3.0
|
||||
TLS-v1.0, TLS-v1.1 versions. In case your server is using one of these version,
|
||||
it is advisable to update your server.
|
||||
Please disable this option for compatibility with older TLS versions.
|
||||
|
||||
config ESP_WIFI_EAP_TLS1_3
|
||||
bool "Enable EAP-TLS v1.3 Support for WiFi Enterprise connection"
|
||||
default n
|
||||
select MBEDTLS_SSL_PROTO_TLS1_3
|
||||
depends on ESP_WIFI_MBEDTLS_TLS_CLIENT && IDF_EXPERIMENTAL_FEATURES
|
||||
help
|
||||
Select this option to support EAP with TLS v1.3.
|
||||
This configuration still supports compatibility with EAP-TLS v1.2.
|
||||
Please note that enabling this configuration will cause every application which
|
||||
uses TLS go for TLS1.3 if server supports that. TLS1.3 is still in development in mbedtls
|
||||
and there may be interoperability issues with this. Please modify your application to set
|
||||
max version as TLS1.2 if you want to enable TLS1.3 only for WiFi connection.
|
||||
|
||||
endif
|
||||
|
||||
config ESP_WIFI_WAPI_PSK
|
||||
bool "Enable WAPI PSK support"
|
||||
depends on SLAVE_SOC_WIFI_WAPI_SUPPORT
|
||||
default n
|
||||
help
|
||||
Select this option to enable WAPI-PSK
|
||||
which is a Chinese National Standard Encryption for Wireless LANs (GB 15629.11-2003).
|
||||
|
||||
config ESP_WIFI_SUITE_B_192
|
||||
bool "Enable NSA suite B support with 192 bit key"
|
||||
default n
|
||||
depends on SLAVE_SOC_WIFI_GCMP_SUPPORT
|
||||
select ESP_WIFI_GCMP_SUPPORT
|
||||
select ESP_WIFI_GMAC_SUPPORT
|
||||
help
|
||||
Select this option to enable 192 bit NSA suite-B.
|
||||
This is necessary to support WPA3 192 bit security.
|
||||
|
||||
config ESP_WIFI_11KV_SUPPORT
|
||||
bool "Enable 802.11k, 802.11v APIs Support"
|
||||
default n
|
||||
help
|
||||
Select this option to enable 802.11k 802.11v APIs(RRM and BTM support).
|
||||
Only APIs which are helpful for network assisted roaming
|
||||
are supported for now.
|
||||
Enable this option with BTM and RRM enabled in sta config
|
||||
to make device ready for network assisted roaming.
|
||||
BTM: BSS transition management enables an AP to request a station to transition
|
||||
to a specific AP, or to indicate to a station a set of preferred APs.
|
||||
RRM: Radio measurements enable STAs to understand the radio environment,
|
||||
it enables STAs to observe and gather data on radio link performance
|
||||
and on the radio environment. Current implementation adds beacon report,
|
||||
link measurement, neighbor report.
|
||||
|
||||
config ESP_WIFI_SCAN_CACHE
|
||||
bool "Keep scan results in cache"
|
||||
depends on ESP_WIFI_11KV_SUPPORT
|
||||
default n
|
||||
help
|
||||
Keep scan results in cache, if not enabled, those
|
||||
will be flushed immediately.
|
||||
|
||||
config ESP_WIFI_MBO_SUPPORT
|
||||
bool "Enable Multi Band Operation Certification Support"
|
||||
default n
|
||||
select ESP_WIFI_11KV_SUPPORT
|
||||
select ESP_WIFI_SCAN_CACHE
|
||||
help
|
||||
Select this option to enable WiFi Multiband operation certification support.
|
||||
|
||||
config ESP_WIFI_ENABLE_ROAMING_APP
|
||||
bool "Advanced support for Wi-Fi Roaming (Experimental)"
|
||||
depends on IDF_EXPERIMENTAL_FEATURES
|
||||
default n
|
||||
select ESP_WIFI_SCAN_CACHE
|
||||
help
|
||||
Enable Espressif's roaming app to allow for efficient Wi-Fi roaming.
|
||||
This includes configurable periodic environment scans, maintaining a cache of the
|
||||
best APs, handling low rssi events etc.
|
||||
|
||||
Risk Warning
|
||||
Please note that this feature is still experimental and enabling this potentially can
|
||||
lead to unpredictable scanning, connection and roaming attempts.
|
||||
We are still working on tuning and optimising this feature to ensure reliable and stable use.
|
||||
|
||||
menu "Configure roaming App"
|
||||
depends on ESP_WIFI_ENABLE_ROAMING_APP
|
||||
rsource "wifi_apps/roaming_app/src/Kconfig.roaming"
|
||||
endmenu
|
||||
|
||||
config ESP_WIFI_DPP_SUPPORT
|
||||
bool "Enable DPP support"
|
||||
default n
|
||||
select ESP_WIFI_MBEDTLS_CRYPTO
|
||||
help
|
||||
Select this option to enable WiFi Easy Connect Support.
|
||||
|
||||
config ESP_WIFI_11R_SUPPORT
|
||||
bool "Enable 802.11R (Fast Transition) Support"
|
||||
default n
|
||||
help
|
||||
Select this option to enable WiFi Fast Transition Support.
|
||||
|
||||
config ESP_WIFI_WPS_SOFTAP_REGISTRAR
|
||||
bool "Add WPS Registrar support in SoftAP mode"
|
||||
depends on ESP_WIFI_SOFTAP_SUPPORT
|
||||
default n
|
||||
help
|
||||
Select this option to enable WPS registrar support in softAP mode.
|
||||
|
||||
config ESP_WIFI_ENABLE_WIFI_TX_STATS
|
||||
bool "Enable Wi-Fi transmission statistics"
|
||||
depends on SLAVE_SOC_WIFI_HE_SUPPORT
|
||||
default n
|
||||
help
|
||||
Enable Wi-Fi transmission statistics. Total support 4 access category. Each access category
|
||||
will use 346 bytes memory.
|
||||
|
||||
config ESP_WIFI_ENABLE_WIFI_RX_STATS
|
||||
bool "Enable Wi-Fi reception statistics"
|
||||
depends on SLAVE_SOC_WIFI_HE_SUPPORT
|
||||
default n
|
||||
help
|
||||
Enable Wi-Fi reception statistics. Total support 2 access category. Each access category
|
||||
will use 190 bytes memory.
|
||||
|
||||
config ESP_WIFI_ENABLE_WIFI_RX_MU_STATS
|
||||
bool "Enable Wi-Fi DL MU-MIMO and DL OFDMA reception statistics"
|
||||
depends on ESP_WIFI_ENABLE_WIFI_RX_STATS
|
||||
default n
|
||||
help
|
||||
Enable Wi-Fi DL MU-MIMO and DL OFDMA reception statistics. Will use 10932 bytes memory.
|
||||
|
||||
config ESP_WIFI_TX_HETB_QUEUE_NUM
|
||||
int "WiFi TX HE TB QUEUE number for STA HE TB PPDU transmission"
|
||||
depends on SLAVE_SOC_WIFI_HE_SUPPORT
|
||||
range 1 4
|
||||
default 3
|
||||
help
|
||||
Set the maximum number of queue that can be aggregated by the STA in the A-MPDU carried in the
|
||||
HE TB PPDU.
|
||||
|
||||
config ESP_WIFI_ENABLE_DUMP_HESIGB
|
||||
bool "Enable Wi-Fi dump HE-SIGB which is contained in DL HE MU PPDUs"
|
||||
depends on SLAVE_SOC_WIFI_HE_SUPPORT_5G
|
||||
default "n"
|
||||
help
|
||||
Enable Wi-Fi dump HE-SIGB which is contained in DL HE MU PPDUs.
|
||||
|
||||
config ESP_WIFI_ENABLE_DUMP_MU_CFO
|
||||
bool "Enable Wi-Fi dump MU CFO"
|
||||
depends on SLAVE_SOC_WIFI_HE_SUPPORT_5G
|
||||
default "n"
|
||||
help
|
||||
Enable Wi-Fi dump MU CFO.
|
||||
|
||||
config ESP_WIFI_ENABLE_DUMP_CTRL_NDPA
|
||||
bool "Enable Wi-Fi dump NDPA frames"
|
||||
depends on SLAVE_SOC_WIFI_HE_SUPPORT_5G
|
||||
default "n"
|
||||
help
|
||||
Enable Wi-Fi dump NDPA frames.
|
||||
|
||||
config ESP_WIFI_ENABLE_DUMP_CTRL_BFRP
|
||||
bool "Enable Wi-Fi dump BFRP frames"
|
||||
depends on SLAVE_SOC_WIFI_HE_SUPPORT_5G
|
||||
default "n"
|
||||
help
|
||||
Enable Wi-Fi dump BFRP frames.
|
||||
|
||||
menu "WPS Configuration Options"
|
||||
config ESP_WIFI_WPS_STRICT
|
||||
bool "Strictly validate all WPS attributes"
|
||||
default n
|
||||
help
|
||||
Select this option to enable validate each WPS attribute
|
||||
rigorously. Disabling this add the workarounds with various APs.
|
||||
Enabling this may cause inter operability issues with some APs.
|
||||
|
||||
config ESP_WIFI_WPS_PASSPHRASE
|
||||
bool "Get WPA2 passphrase in WPS config"
|
||||
default n
|
||||
help
|
||||
Select this option to get passphrase during WPS configuration.
|
||||
This option fakes the virtual display capabilities to get the
|
||||
configuration in passphrase mode.
|
||||
Not recommended to be used since WPS credentials should not
|
||||
be shared to other devices, making it in readable format increases
|
||||
that risk, also passphrase requires pbkdf2 to convert in psk.
|
||||
|
||||
endmenu # "WPS Configuration Options"
|
||||
|
||||
|
||||
config ESP_WIFI_DEBUG_PRINT
|
||||
bool "Print debug messages from WPA Supplicant"
|
||||
default n
|
||||
help
|
||||
Select this option to print logging information from WPA supplicant,
|
||||
this includes handshake information and key hex dumps depending
|
||||
on the project logging level.
|
||||
|
||||
Enabling this could increase the build size ~60kb
|
||||
depending on the project logging level.
|
||||
|
||||
config ESP_WIFI_TESTING_OPTIONS
|
||||
bool "Add DPP testing code"
|
||||
default n
|
||||
help
|
||||
Select this to enable unity test for DPP.
|
||||
|
||||
config ESP_WIFI_ENTERPRISE_SUPPORT
|
||||
bool "Enable enterprise option"
|
||||
default y
|
||||
help
|
||||
Select this to enable/disable enterprise connection support.
|
||||
|
||||
disabling this will reduce binary size.
|
||||
disabling this will disable the use of any esp_wifi_sta_wpa2_ent_* (as APIs will be meaningless)
|
||||
|
||||
Note that when using bigger certificates on low-power chips without crypto
|
||||
hardware acceleration, it is recommended to adjust the task watchdog timer (TWDT)
|
||||
if it is enabled. For precise information on timing requirements, you can check
|
||||
performance numbers at https://github.com/espressif/mbedtls/wiki/Performance-Numbers.
|
||||
|
||||
config ESP_WIFI_ENT_FREE_DYNAMIC_BUFFER
|
||||
bool "Free dynamic buffers during WiFi enterprise connection"
|
||||
depends on ESP_WIFI_ENTERPRISE_SUPPORT
|
||||
default y if SLAVE_IDF_TARGET_ESP32C2
|
||||
default n if !SLAVE_IDF_TARGET_ESP32C2
|
||||
help
|
||||
Select this configuration to free dynamic buffers during WiFi enterprise connection.
|
||||
This will enable chip to reduce heap consumption during WiFi enterprise connection.
|
||||
|
||||
# Wi-Fi configuration end
|
@ -71,6 +71,16 @@ WEAK esp_err_t esp_wifi_remote_scan_start(const wifi_scan_config_t *config, _Boo
|
||||
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);
|
||||
@ -266,6 +276,11 @@ 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);
|
@ -67,6 +67,16 @@ 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();
|
||||
@ -262,6 +272,11 @@ 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);
|
@ -17,6 +17,8 @@ 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);
|
||||
@ -56,6 +58,7 @@ 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);
|
@ -18,7 +18,7 @@ extern "C" {
|
||||
|
||||
#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
|
||||
#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 */
|
||||
@ -35,54 +35,54 @@ 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 reveived 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.
|
||||
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.
|
||||
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 */
|
||||
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*/
|
||||
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 */
|
||||
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 */
|
||||
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 */
|
||||
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 */
|
||||
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 */
|
||||
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 */
|
||||
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 */
|
||||
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 */
|
||||
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
|
||||
|
||||
@ -105,7 +105,6 @@ typedef struct {
|
||||
} wifi_csi_config_t;
|
||||
#endif // !CONFIG_SLAVE_SOC_WIFI_HE_SUPPORT
|
||||
|
||||
|
||||
/** @brief Payload passed to 'buf' parameter of promiscuous mode RX callback.
|
||||
*/
|
||||
typedef struct {
|
||||
@ -121,12 +120,13 @@ 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 limition */
|
||||
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
|
21
components/esp_wifi_remote/idf_v5.4/Kconfig.slave_select.in
Normal file
21
components/esp_wifi_remote/idf_v5.4/Kconfig.slave_select.in
Normal file
@ -0,0 +1,21 @@
|
||||
# This file is auto-generated
|
||||
choice SLAVE_IDF_TARGET
|
||||
prompt "choose slave target"
|
||||
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"
|
||||
config SLAVE_IDF_TARGET_ESP32C5
|
||||
bool "esp32c5"
|
||||
config SLAVE_IDF_TARGET_ESP32C61
|
||||
bool "esp32c61"
|
||||
endchoice
|
321
components/esp_wifi_remote/idf_v5.4/Kconfig.soc_wifi_caps.in
Normal file
321
components/esp_wifi_remote/idf_v5.4/Kconfig.soc_wifi_caps.in
Normal file
@ -0,0 +1,321 @@
|
||||
# This file is auto-generated
|
||||
|
||||
if SLAVE_IDF_TARGET_ESP32
|
||||
|
||||
config SLAVE_SOC_WIFI_SUPPORTED
|
||||
bool
|
||||
default y
|
||||
|
||||
config SLAVE_SOC_WIFI_WAPI_SUPPORT
|
||||
bool
|
||||
default y
|
||||
|
||||
config SLAVE_SOC_WIFI_CSI_SUPPORT
|
||||
bool
|
||||
default y
|
||||
|
||||
config SLAVE_SOC_WIFI_MESH_SUPPORT
|
||||
bool
|
||||
default y
|
||||
|
||||
config SLAVE_SOC_WIFI_SUPPORT_VARIABLE_BEACON_WINDOW
|
||||
bool
|
||||
default y
|
||||
|
||||
config SLAVE_SOC_WIFI_NAN_SUPPORT
|
||||
bool
|
||||
default y
|
||||
|
||||
endif # ESP32
|
||||
|
||||
if SLAVE_IDF_TARGET_ESP32S2
|
||||
|
||||
config SLAVE_SOC_WIFI_SUPPORTED
|
||||
bool
|
||||
default y
|
||||
|
||||
config SLAVE_SOC_WIFI_LIGHT_SLEEP_CLK_WIDTH
|
||||
int
|
||||
default 12
|
||||
|
||||
config SLAVE_SOC_WIFI_HW_TSF
|
||||
bool
|
||||
default y
|
||||
|
||||
config SLAVE_SOC_WIFI_FTM_SUPPORT
|
||||
bool
|
||||
default y
|
||||
|
||||
config SLAVE_SOC_WIFI_WAPI_SUPPORT
|
||||
bool
|
||||
default y
|
||||
|
||||
config SLAVE_SOC_WIFI_CSI_SUPPORT
|
||||
bool
|
||||
default y
|
||||
|
||||
config SLAVE_SOC_WIFI_MESH_SUPPORT
|
||||
bool
|
||||
default y
|
||||
|
||||
config SLAVE_SOC_WIFI_SUPPORT_VARIABLE_BEACON_WINDOW
|
||||
bool
|
||||
default y
|
||||
|
||||
config SLAVE_SOC_WIFI_NAN_SUPPORT
|
||||
bool
|
||||
default y
|
||||
|
||||
endif # ESP32S2
|
||||
|
||||
if SLAVE_IDF_TARGET_ESP32C3
|
||||
|
||||
config SLAVE_SOC_WIFI_SUPPORTED
|
||||
bool
|
||||
default y
|
||||
|
||||
config SLAVE_SOC_WIFI_LIGHT_SLEEP_CLK_WIDTH
|
||||
int
|
||||
default 12
|
||||
|
||||
config SLAVE_SOC_WIFI_HW_TSF
|
||||
bool
|
||||
default y
|
||||
|
||||
config SLAVE_SOC_WIFI_FTM_SUPPORT
|
||||
bool
|
||||
default y
|
||||
|
||||
config SLAVE_SOC_WIFI_GCMP_SUPPORT
|
||||
bool
|
||||
default y
|
||||
|
||||
config SLAVE_SOC_WIFI_WAPI_SUPPORT
|
||||
bool
|
||||
default y
|
||||
|
||||
config SLAVE_SOC_WIFI_CSI_SUPPORT
|
||||
bool
|
||||
default y
|
||||
|
||||
config SLAVE_SOC_WIFI_MESH_SUPPORT
|
||||
bool
|
||||
default y
|
||||
|
||||
config SLAVE_SOC_WIFI_SUPPORT_VARIABLE_BEACON_WINDOW
|
||||
bool
|
||||
default y
|
||||
|
||||
config SLAVE_SOC_WIFI_PHY_NEEDS_USB_WORKAROUND
|
||||
bool
|
||||
default y
|
||||
|
||||
endif # ESP32C3
|
||||
|
||||
if SLAVE_IDF_TARGET_ESP32S3
|
||||
|
||||
config SLAVE_SOC_WIFI_SUPPORTED
|
||||
bool
|
||||
default y
|
||||
|
||||
config SLAVE_SOC_WIFI_LIGHT_SLEEP_CLK_WIDTH
|
||||
int
|
||||
default 12
|
||||
|
||||
config SLAVE_SOC_WIFI_HW_TSF
|
||||
bool
|
||||
default y
|
||||
|
||||
config SLAVE_SOC_WIFI_FTM_SUPPORT
|
||||
bool
|
||||
default y
|
||||
|
||||
config SLAVE_SOC_WIFI_GCMP_SUPPORT
|
||||
bool
|
||||
default y
|
||||
|
||||
config SLAVE_SOC_WIFI_WAPI_SUPPORT
|
||||
bool
|
||||
default y
|
||||
|
||||
config SLAVE_SOC_WIFI_CSI_SUPPORT
|
||||
bool
|
||||
default y
|
||||
|
||||
config SLAVE_SOC_WIFI_MESH_SUPPORT
|
||||
bool
|
||||
default y
|
||||
|
||||
config SLAVE_SOC_WIFI_SUPPORT_VARIABLE_BEACON_WINDOW
|
||||
bool
|
||||
default y
|
||||
|
||||
config SLAVE_SOC_WIFI_PHY_NEEDS_USB_WORKAROUND
|
||||
bool
|
||||
default y
|
||||
|
||||
endif # ESP32S3
|
||||
|
||||
if SLAVE_IDF_TARGET_ESP32C2
|
||||
|
||||
config SLAVE_SOC_WIFI_SUPPORTED
|
||||
bool
|
||||
default y
|
||||
|
||||
config SLAVE_SOC_WIFI_LIGHT_SLEEP_CLK_WIDTH
|
||||
int
|
||||
default 12
|
||||
|
||||
config SLAVE_SOC_WIFI_HW_TSF
|
||||
bool
|
||||
default y
|
||||
|
||||
config SLAVE_SOC_WIFI_FTM_SUPPORT
|
||||
bool
|
||||
default y
|
||||
|
||||
config SLAVE_SOC_WIFI_SUPPORT_VARIABLE_BEACON_WINDOW
|
||||
bool
|
||||
default y
|
||||
|
||||
config SLAVE_SOC_WIFI_PHY_NEEDS_USB_WORKAROUND
|
||||
bool
|
||||
default y
|
||||
|
||||
endif # ESP32C2
|
||||
|
||||
if SLAVE_IDF_TARGET_ESP32C6
|
||||
|
||||
config SLAVE_SOC_WIFI_SUPPORTED
|
||||
bool
|
||||
default y
|
||||
|
||||
config SLAVE_SOC_WIFI_LIGHT_SLEEP_CLK_WIDTH
|
||||
int
|
||||
default 12
|
||||
|
||||
config SLAVE_SOC_WIFI_HW_TSF
|
||||
bool
|
||||
default y
|
||||
|
||||
config SLAVE_SOC_WIFI_FTM_SUPPORT
|
||||
bool
|
||||
default y
|
||||
|
||||
config SLAVE_SOC_WIFI_GCMP_SUPPORT
|
||||
bool
|
||||
default y
|
||||
|
||||
config SLAVE_SOC_WIFI_WAPI_SUPPORT
|
||||
bool
|
||||
default y
|
||||
|
||||
config SLAVE_SOC_WIFI_CSI_SUPPORT
|
||||
bool
|
||||
default y
|
||||
|
||||
config SLAVE_SOC_WIFI_MESH_SUPPORT
|
||||
bool
|
||||
default y
|
||||
|
||||
config SLAVE_SOC_WIFI_HE_SUPPORT
|
||||
bool
|
||||
default y
|
||||
|
||||
config SLAVE_SOC_WIFI_MAC_VERSION_NUM
|
||||
int
|
||||
default 2
|
||||
|
||||
endif # ESP32C6
|
||||
|
||||
if SLAVE_IDF_TARGET_ESP32C5
|
||||
|
||||
config SLAVE_SOC_WIFI_SUPPORTED
|
||||
bool
|
||||
default y
|
||||
|
||||
config SLAVE_SOC_WIFI_LIGHT_SLEEP_CLK_WIDTH
|
||||
int
|
||||
default 12
|
||||
|
||||
config SLAVE_SOC_WIFI_HW_TSF
|
||||
bool
|
||||
default y
|
||||
|
||||
config SLAVE_SOC_WIFI_FTM_SUPPORT
|
||||
bool
|
||||
default n
|
||||
|
||||
config SLAVE_SOC_WIFI_GCMP_SUPPORT
|
||||
bool
|
||||
default y
|
||||
|
||||
config SLAVE_SOC_WIFI_WAPI_SUPPORT
|
||||
bool
|
||||
default y
|
||||
|
||||
config SLAVE_SOC_WIFI_CSI_SUPPORT
|
||||
bool
|
||||
default y
|
||||
|
||||
config SLAVE_SOC_WIFI_MESH_SUPPORT
|
||||
bool
|
||||
default y
|
||||
|
||||
config SLAVE_SOC_WIFI_HE_SUPPORT
|
||||
bool
|
||||
default y
|
||||
|
||||
config SLAVE_SOC_WIFI_SUPPORT_5G
|
||||
bool
|
||||
default y
|
||||
|
||||
config SLAVE_SOC_WIFI_MAC_VERSION_NUM
|
||||
int
|
||||
default 3
|
||||
|
||||
endif # ESP32C5
|
||||
|
||||
if SLAVE_IDF_TARGET_ESP32C61
|
||||
|
||||
config SLAVE_SOC_WIFI_SUPPORTED
|
||||
bool
|
||||
default y
|
||||
|
||||
config SLAVE_SOC_WIFI_LIGHT_SLEEP_CLK_WIDTH
|
||||
int
|
||||
default 12
|
||||
|
||||
config SLAVE_SOC_WIFI_HW_TSF
|
||||
bool
|
||||
default y
|
||||
|
||||
config SLAVE_SOC_WIFI_FTM_SUPPORT
|
||||
bool
|
||||
default n
|
||||
|
||||
config SLAVE_SOC_WIFI_GCMP_SUPPORT
|
||||
bool
|
||||
default y
|
||||
|
||||
config SLAVE_SOC_WIFI_WAPI_SUPPORT
|
||||
bool
|
||||
default y
|
||||
|
||||
config SLAVE_SOC_WIFI_CSI_SUPPORT
|
||||
bool
|
||||
default y
|
||||
|
||||
config SLAVE_SOC_WIFI_MESH_SUPPORT
|
||||
bool
|
||||
default y
|
||||
|
||||
config SLAVE_SOC_WIFI_HE_SUPPORT
|
||||
bool
|
||||
default y
|
||||
|
||||
config SLAVE_SOC_WIFI_MAC_VERSION_NUM
|
||||
int
|
||||
default 3
|
||||
|
||||
endif # ESP32C61
|
726
components/esp_wifi_remote/idf_v5.4/Kconfig.wifi.in
Normal file
726
components/esp_wifi_remote/idf_v5.4/Kconfig.wifi.in
Normal file
@ -0,0 +1,726 @@
|
||||
# Wi-Fi configuration
|
||||
# This file is auto-generated
|
||||
|
||||
config ESP_WIFI_STATIC_RX_BUFFER_NUM
|
||||
int "Max number of WiFi static RX buffers"
|
||||
range 2 25 if !SLAVE_SOC_WIFI_HE_SUPPORT
|
||||
range 2 128 if SLAVE_SOC_WIFI_HE_SUPPORT
|
||||
default 10 if !SPIRAM_TRY_ALLOCATE_WIFI_LWIP
|
||||
default 16 if SPIRAM_TRY_ALLOCATE_WIFI_LWIP
|
||||
help
|
||||
Set the number of WiFi static RX buffers. Each buffer takes approximately 1.6KB of RAM.
|
||||
The static rx buffers are allocated when esp_wifi_init is called, they are not freed
|
||||
until esp_wifi_deinit is called.
|
||||
|
||||
WiFi hardware use these buffers to receive all 802.11 frames.
|
||||
A higher number may allow higher throughput but increases memory use. If ESP_WIFI_AMPDU_RX_ENABLED
|
||||
is enabled, this value is recommended to set equal or bigger than ESP_WIFI_RX_BA_WIN in order to
|
||||
achieve better throughput and compatibility with both stations and APs.
|
||||
|
||||
config ESP_WIFI_DYNAMIC_RX_BUFFER_NUM
|
||||
int "Max number of WiFi dynamic RX buffers"
|
||||
range 0 128 if !LWIP_WND_SCALE
|
||||
range 0 1024 if LWIP_WND_SCALE
|
||||
default 32
|
||||
help
|
||||
Set the number of WiFi dynamic RX buffers, 0 means unlimited RX buffers will be allocated
|
||||
(provided sufficient free RAM). The size of each dynamic RX buffer depends on the size of
|
||||
the received data frame.
|
||||
|
||||
For each received data frame, the WiFi driver makes a copy to an RX buffer and then delivers
|
||||
it to the high layer TCP/IP stack. The dynamic RX buffer is freed after the higher layer has
|
||||
successfully received the data frame.
|
||||
|
||||
For some applications, WiFi data frames may be received faster than the application can
|
||||
process them. In these cases we may run out of memory if RX buffer number is unlimited (0).
|
||||
|
||||
If a dynamic RX buffer limit is set, it should be at least the number of static RX buffers.
|
||||
|
||||
choice ESP_WIFI_TX_BUFFER
|
||||
prompt "Type of WiFi TX buffers"
|
||||
default ESP_WIFI_DYNAMIC_TX_BUFFER
|
||||
help
|
||||
Select type of WiFi TX buffers:
|
||||
|
||||
If "Static" is selected, WiFi TX buffers are allocated when WiFi is initialized and released
|
||||
when WiFi is de-initialized. The size of each static TX buffer is fixed to about 1.6KB.
|
||||
|
||||
If "Dynamic" is selected, each WiFi TX buffer is allocated as needed when a data frame is
|
||||
delivered to the Wifi driver from the TCP/IP stack. The buffer is freed after the data frame
|
||||
has been sent by the WiFi driver. The size of each dynamic TX buffer depends on the length
|
||||
of each data frame sent by the TCP/IP layer.
|
||||
|
||||
If PSRAM is enabled, "Static" should be selected to guarantee enough WiFi TX buffers.
|
||||
If PSRAM is disabled, "Dynamic" should be selected to improve the utilization of RAM.
|
||||
|
||||
config ESP_WIFI_STATIC_TX_BUFFER
|
||||
bool "Static"
|
||||
config ESP_WIFI_DYNAMIC_TX_BUFFER
|
||||
bool "Dynamic"
|
||||
depends on !SPIRAM_USE_MALLOC
|
||||
endchoice
|
||||
|
||||
config ESP_WIFI_TX_BUFFER_TYPE
|
||||
int
|
||||
default 0 if ESP_WIFI_STATIC_TX_BUFFER
|
||||
default 1 if ESP_WIFI_DYNAMIC_TX_BUFFER
|
||||
|
||||
config ESP_WIFI_STATIC_TX_BUFFER_NUM
|
||||
int "Max number of WiFi static TX buffers"
|
||||
depends on ESP_WIFI_STATIC_TX_BUFFER
|
||||
range 1 64
|
||||
default 16
|
||||
help
|
||||
Set the number of WiFi static TX buffers. Each buffer takes approximately 1.6KB of RAM.
|
||||
The static RX buffers are allocated when esp_wifi_init() is called, they are not released
|
||||
until esp_wifi_deinit() is called.
|
||||
|
||||
For each transmitted data frame from the higher layer TCP/IP stack, the WiFi driver makes a
|
||||
copy of it in a TX buffer. For some applications especially UDP applications, the upper
|
||||
layer can deliver frames faster than WiFi layer can transmit. In these cases, we may run out
|
||||
of TX buffers.
|
||||
|
||||
config ESP_WIFI_CACHE_TX_BUFFER_NUM
|
||||
int "Max number of WiFi cache TX buffers"
|
||||
depends on SPIRAM
|
||||
range 16 128
|
||||
default 32
|
||||
help
|
||||
Set the number of WiFi cache TX buffer number.
|
||||
|
||||
For each TX packet from uplayer, such as LWIP etc, WiFi driver needs to allocate a static TX
|
||||
buffer and makes a copy of uplayer packet. If WiFi driver fails to allocate the static TX buffer,
|
||||
it caches the uplayer packets to a dedicated buffer queue, this option is used to configure the
|
||||
size of the cached TX queue.
|
||||
|
||||
config ESP_WIFI_DYNAMIC_TX_BUFFER_NUM
|
||||
int "Max number of WiFi dynamic TX buffers"
|
||||
depends on ESP_WIFI_DYNAMIC_TX_BUFFER
|
||||
range 1 128
|
||||
default 32
|
||||
help
|
||||
Set the number of WiFi dynamic TX buffers. The size of each dynamic TX buffer is not fixed,
|
||||
it depends on the size of each transmitted data frame.
|
||||
|
||||
For each transmitted frame from the higher layer TCP/IP stack, the WiFi driver makes a copy
|
||||
of it in a TX buffer. For some applications, especially UDP applications, the upper layer
|
||||
can deliver frames faster than WiFi layer can transmit. In these cases, we may run out of TX
|
||||
buffers.
|
||||
|
||||
choice ESP_WIFI_MGMT_RX_BUFFER
|
||||
prompt "Type of WiFi RX MGMT buffers"
|
||||
default ESP_WIFI_STATIC_RX_MGMT_BUFFER
|
||||
help
|
||||
Select type of WiFi RX MGMT buffers:
|
||||
|
||||
If "Static" is selected, WiFi RX MGMT buffers are allocated when WiFi is initialized and released
|
||||
when WiFi is de-initialized. The size of each static RX MGMT buffer is fixed to about 500 Bytes.
|
||||
|
||||
If "Dynamic" is selected, each WiFi RX MGMT buffer is allocated as needed when a MGMT data frame is
|
||||
received. The MGMT buffer is freed after the MGMT data frame has been processed by the WiFi driver.
|
||||
|
||||
|
||||
config ESP_WIFI_STATIC_RX_MGMT_BUFFER
|
||||
bool "Static"
|
||||
config ESP_WIFI_DYNAMIC_RX_MGMT_BUFFER
|
||||
bool "Dynamic"
|
||||
endchoice
|
||||
|
||||
config ESP_WIFI_DYNAMIC_RX_MGMT_BUF
|
||||
int
|
||||
default 0 if ESP_WIFI_STATIC_RX_MGMT_BUFFER
|
||||
default 1 if ESP_WIFI_DYNAMIC_RX_MGMT_BUFFER
|
||||
|
||||
config ESP_WIFI_RX_MGMT_BUF_NUM_DEF
|
||||
int "Max number of WiFi RX MGMT buffers"
|
||||
range 1 10
|
||||
default 5
|
||||
help
|
||||
Set the number of WiFi RX_MGMT buffers.
|
||||
|
||||
For Management buffers, the number of dynamic and static management buffers is the same.
|
||||
In order to prevent memory fragmentation, the management buffer type should be set to static first.
|
||||
|
||||
config ESP_WIFI_CSI_ENABLED
|
||||
bool "WiFi CSI(Channel State Information)"
|
||||
depends on SLAVE_SOC_WIFI_CSI_SUPPORT
|
||||
default n
|
||||
help
|
||||
Select this option to enable CSI(Channel State Information) feature. CSI takes about
|
||||
CONFIG_ESP_WIFI_STATIC_RX_BUFFER_NUM KB of RAM. If CSI is not used, it is better to disable
|
||||
this feature in order to save memory.
|
||||
|
||||
config ESP_WIFI_AMPDU_TX_ENABLED
|
||||
bool "WiFi AMPDU TX"
|
||||
default y
|
||||
help
|
||||
Select this option to enable AMPDU TX feature
|
||||
|
||||
|
||||
config ESP_WIFI_TX_BA_WIN
|
||||
int "WiFi AMPDU TX BA window size"
|
||||
depends on ESP_WIFI_AMPDU_TX_ENABLED
|
||||
range 2 32 if !SLAVE_SOC_WIFI_HE_SUPPORT
|
||||
range 2 64 if SLAVE_SOC_WIFI_HE_SUPPORT
|
||||
default 6
|
||||
help
|
||||
Set the size of WiFi Block Ack TX window. Generally a bigger value means higher throughput but
|
||||
more memory. Most of time we should NOT change the default value unless special reason, e.g.
|
||||
test the maximum UDP TX throughput with iperf etc. For iperf test in shieldbox, the recommended
|
||||
value is 9~12.
|
||||
|
||||
config ESP_WIFI_AMPDU_RX_ENABLED
|
||||
bool "WiFi AMPDU RX"
|
||||
default y
|
||||
help
|
||||
Select this option to enable AMPDU RX feature
|
||||
|
||||
config ESP_WIFI_RX_BA_WIN
|
||||
int "WiFi AMPDU RX BA window size"
|
||||
depends on ESP_WIFI_AMPDU_RX_ENABLED
|
||||
range 2 32 if !SLAVE_SOC_WIFI_HE_SUPPORT
|
||||
range 2 64 if SLAVE_SOC_WIFI_HE_SUPPORT
|
||||
default 6 if !SPIRAM_TRY_ALLOCATE_WIFI_LWIP
|
||||
default 16 if SPIRAM_TRY_ALLOCATE_WIFI_LWIP
|
||||
help
|
||||
Set the size of WiFi Block Ack RX window. Generally a bigger value means higher throughput and better
|
||||
compatibility but more memory. Most of time we should NOT change the default value unless special
|
||||
reason, e.g. test the maximum UDP RX throughput with iperf etc. For iperf test in shieldbox, the
|
||||
recommended value is 9~12. If PSRAM is used and WiFi memory is preferred to allocate in PSRAM first,
|
||||
the default and minimum value should be 16 to achieve better throughput and compatibility with both
|
||||
stations and APs.
|
||||
|
||||
config ESP_WIFI_AMSDU_TX_ENABLED
|
||||
bool "WiFi AMSDU TX"
|
||||
depends on SPIRAM
|
||||
default n
|
||||
help
|
||||
Select this option to enable AMSDU TX feature
|
||||
|
||||
config ESP_WIFI_NVS_ENABLED
|
||||
bool "WiFi NVS flash"
|
||||
default y
|
||||
help
|
||||
Select this option to enable WiFi NVS flash
|
||||
|
||||
choice ESP_WIFI_TASK_CORE_ID
|
||||
depends on !FREERTOS_UNICORE
|
||||
prompt "WiFi Task Core ID"
|
||||
default ESP_WIFI_TASK_PINNED_TO_CORE_0
|
||||
help
|
||||
Pinned WiFi task to core 0 or core 1.
|
||||
|
||||
config ESP_WIFI_TASK_PINNED_TO_CORE_0
|
||||
bool "Core 0"
|
||||
config ESP_WIFI_TASK_PINNED_TO_CORE_1
|
||||
bool "Core 1"
|
||||
endchoice
|
||||
|
||||
config ESP_WIFI_SOFTAP_BEACON_MAX_LEN
|
||||
int "Max length of WiFi SoftAP Beacon"
|
||||
range 752 1256
|
||||
default 752
|
||||
help
|
||||
ESP-MESH utilizes beacon frames to detect and resolve root node conflicts (see documentation). However
|
||||
the default length of a beacon frame can simultaneously hold only five root node identifier structures,
|
||||
meaning that a root node conflict of up to five nodes can be detected at one time. In the occurrence of
|
||||
more root nodes conflict involving more than five root nodes, the conflict resolution process will
|
||||
detect five of the root nodes, resolve the conflict, and re-detect more root nodes. This process will
|
||||
repeat until all root node conflicts are resolved. However this process can generally take a very long
|
||||
time.
|
||||
|
||||
To counter this situation, the beacon frame length can be increased such that more root nodes can be
|
||||
detected simultaneously. Each additional root node will require 36 bytes and should be added on top of
|
||||
the default beacon frame length of
|
||||
752 bytes. For example, if you want to detect 10 root nodes simultaneously, you need to set the beacon
|
||||
frame length as
|
||||
932 (752+36*5).
|
||||
|
||||
Setting a longer beacon length also assists with debugging as the conflicting root nodes can be
|
||||
identified more quickly.
|
||||
|
||||
config ESP_WIFI_MGMT_SBUF_NUM
|
||||
int "WiFi mgmt short buffer number"
|
||||
range 6 32
|
||||
default 32
|
||||
help
|
||||
Set the maximum number of Wi-Fi management short buffers. These buffers are dynamically allocated,
|
||||
with their size determined by the length of the management packet to be sent. When a management
|
||||
packet is less than 64 bytes, the Wi-Fi driver classifies it as a short management packet and
|
||||
assigns it to one of these buffers.
|
||||
|
||||
config ESP_WIFI_IRAM_OPT
|
||||
bool "WiFi IRAM speed optimization"
|
||||
default n if (BT_ENABLED && SPIRAM && SLAVE_IDF_TARGET_ESP32)
|
||||
default y
|
||||
help
|
||||
Select this option to place frequently called Wi-Fi library functions in IRAM.
|
||||
When this option is disabled, more than 10Kbytes of IRAM memory will be saved
|
||||
but Wi-Fi throughput will be reduced.
|
||||
|
||||
config ESP_WIFI_EXTRA_IRAM_OPT
|
||||
bool "WiFi EXTRA IRAM speed optimization"
|
||||
default y if SLAVE_SOC_WIFI_HE_SUPPORT
|
||||
default n
|
||||
help
|
||||
Select this option to place additional frequently called Wi-Fi library functions
|
||||
in IRAM. When this option is disabled, more than 5Kbytes of IRAM memory will be saved
|
||||
but Wi-Fi throughput will be reduced.
|
||||
|
||||
config ESP_WIFI_RX_IRAM_OPT
|
||||
bool "WiFi RX IRAM speed optimization"
|
||||
default n if (BT_ENABLED && SPIRAM && SLAVE_IDF_TARGET_ESP32)
|
||||
default y
|
||||
help
|
||||
Select this option to place frequently called Wi-Fi library RX functions in IRAM.
|
||||
When this option is disabled, more than 17Kbytes of IRAM memory will be saved
|
||||
but Wi-Fi performance will be reduced.
|
||||
|
||||
config ESP_WIFI_ENABLE_WPA3_SAE
|
||||
bool "Enable WPA3-Personal"
|
||||
default y
|
||||
select ESP_WIFI_MBEDTLS_CRYPTO
|
||||
help
|
||||
Select this option to allow the device to establish a WPA3-Personal connection with eligible AP's.
|
||||
PMF (Protected Management Frames) is a prerequisite feature for a WPA3 connection, it needs to be
|
||||
explicitly configured before attempting connection. Please refer to the Wi-Fi Driver API Guide
|
||||
for details.
|
||||
|
||||
config ESP_WIFI_ENABLE_SAE_PK
|
||||
bool "Enable SAE-PK"
|
||||
default y
|
||||
depends on ESP_WIFI_ENABLE_WPA3_SAE
|
||||
help
|
||||
Select this option to enable SAE-PK
|
||||
|
||||
config ESP_WIFI_SOFTAP_SAE_SUPPORT
|
||||
bool "Enable WPA3 Personal(SAE) SoftAP"
|
||||
default y
|
||||
depends on ESP_WIFI_ENABLE_WPA3_SAE
|
||||
depends on ESP_WIFI_SOFTAP_SUPPORT
|
||||
help
|
||||
Select this option to enable SAE support in softAP mode.
|
||||
|
||||
config ESP_WIFI_ENABLE_WPA3_OWE_STA
|
||||
bool "Enable OWE STA"
|
||||
default y
|
||||
select ESP_WIFI_MBEDTLS_CRYPTO
|
||||
help
|
||||
Select this option to allow the device to establish OWE connection with eligible AP's.
|
||||
PMF (Protected Management Frames) is a prerequisite feature for a WPA3 connection, it needs to be
|
||||
explicitly configured before attempting connection. Please refer to the Wi-Fi Driver API Guide
|
||||
for details.
|
||||
|
||||
config ESP_WIFI_SLP_IRAM_OPT
|
||||
bool "WiFi SLP IRAM speed optimization"
|
||||
select PM_SLP_DEFAULT_PARAMS_OPT
|
||||
select PERIPH_CTRL_FUNC_IN_IRAM
|
||||
default y if SLAVE_SOC_WIFI_HE_SUPPORT
|
||||
help
|
||||
Select this option to place called Wi-Fi library TBTT process and receive beacon functions in IRAM.
|
||||
Some functions can be put in IRAM either by ESP_WIFI_IRAM_OPT and ESP_WIFI_RX_IRAM_OPT, or this one.
|
||||
If already enabled ESP_WIFI_IRAM_OPT, the other 7.3KB IRAM memory would be taken by this option.
|
||||
If already enabled ESP_WIFI_RX_IRAM_OPT, the other 1.3KB IRAM memory would be taken by this option.
|
||||
If neither of them are enabled, the other 7.4KB IRAM memory would be taken by this option.
|
||||
Wi-Fi power-save mode average current would be reduced if this option is enabled.
|
||||
|
||||
config ESP_WIFI_SLP_DEFAULT_MIN_ACTIVE_TIME
|
||||
int "Minimum active time"
|
||||
range 8 60
|
||||
default 50
|
||||
help
|
||||
Only for station in WIFI_PS_MIN_MODEM or WIFI_PS_MAX_MODEM. When the station enters the active state,
|
||||
it will work for at least ESP_WIFI_SLP_DEFAULT_MIN_ACTIVE_TIME. If a data packet is received or sent
|
||||
during this period, the time will be refreshed. If the time is up, but the station still has packets
|
||||
to receive or send, the time will also be refreshed. unit: milliseconds.
|
||||
|
||||
config ESP_WIFI_SLP_DEFAULT_MAX_ACTIVE_TIME
|
||||
int "Maximum keep alive time"
|
||||
range 10 60
|
||||
default 10
|
||||
help
|
||||
Only for station in WIFI_PS_MIN_MODEM or WIFI_PS_MAX_MODEM. If no packet has been
|
||||
sent within ESP_WIFI_SLP_DEFAULT_MAX_ACTIVE_TIME, a null data packet will be sent
|
||||
to maintain the connection with the AP. unit: seconds.
|
||||
|
||||
config ESP_WIFI_SLP_DEFAULT_WAIT_BROADCAST_DATA_TIME
|
||||
int "Minimum wait broadcast data time"
|
||||
range 10 30
|
||||
default 15
|
||||
help
|
||||
Only for station in WIFI_PS_MIN_MODEM or WIFI_PS_MAX_MODEM. When the station knows through the beacon
|
||||
that AP will send broadcast packet, it will wait for ESP_WIFI_SLP_DEFAULT_WAIT_BROADCAST_DATA_TIME
|
||||
before entering the sleep process. If a broadcast packet is received with more data bits, the time
|
||||
will refreshed. unit: milliseconds.
|
||||
|
||||
config ESP_WIFI_FTM_ENABLE
|
||||
bool "WiFi FTM"
|
||||
default n
|
||||
depends on SLAVE_SOC_WIFI_FTM_SUPPORT
|
||||
help
|
||||
Enable feature Fine Timing Measurement for calculating WiFi Round-Trip-Time (RTT).
|
||||
|
||||
config ESP_WIFI_FTM_INITIATOR_SUPPORT
|
||||
bool "FTM Initiator support"
|
||||
default y
|
||||
depends on ESP_WIFI_FTM_ENABLE
|
||||
|
||||
config ESP_WIFI_FTM_RESPONDER_SUPPORT
|
||||
bool "FTM Responder support"
|
||||
default y
|
||||
depends on ESP_WIFI_FTM_ENABLE
|
||||
|
||||
config ESP_WIFI_STA_DISCONNECTED_PM_ENABLE
|
||||
bool "Power Management for station at disconnected"
|
||||
default y
|
||||
help
|
||||
Select this option to enable power_management for station when disconnected.
|
||||
Chip will do modem-sleep when rf module is not in use any more.
|
||||
|
||||
config ESP_WIFI_GCMP_SUPPORT
|
||||
bool "WiFi GCMP Support(GCMP128 and GCMP256)"
|
||||
default n
|
||||
depends on SLAVE_SOC_WIFI_GCMP_SUPPORT
|
||||
help
|
||||
Select this option to enable GCMP support. GCMP support is compulsory for WiFi Suite-B support.
|
||||
|
||||
config ESP_WIFI_GMAC_SUPPORT
|
||||
bool "WiFi GMAC Support(GMAC128 and GMAC256)"
|
||||
default y
|
||||
help
|
||||
Select this option to enable GMAC support. GMAC support is compulsory for WiFi 192 bit certification.
|
||||
|
||||
config ESP_WIFI_SOFTAP_SUPPORT
|
||||
bool "WiFi SoftAP Support"
|
||||
default y
|
||||
help
|
||||
WiFi module can be compiled without SoftAP to save code size.
|
||||
|
||||
config ESP_WIFI_ENHANCED_LIGHT_SLEEP
|
||||
bool "WiFi modem automatically receives the beacon"
|
||||
default n
|
||||
depends on ESP_PHY_MAC_BB_PD && SOC_PM_SUPPORT_BEACON_WAKEUP
|
||||
help
|
||||
The wifi modem automatically receives the beacon frame during light sleep.
|
||||
|
||||
config ESP_WIFI_SLP_BEACON_LOST_OPT
|
||||
bool "Wifi sleep optimize when beacon lost"
|
||||
help
|
||||
Enable wifi sleep optimization when beacon loss occurs and immediately enter
|
||||
sleep mode when the WiFi module detects beacon loss.
|
||||
|
||||
config ESP_WIFI_SLP_BEACON_LOST_TIMEOUT
|
||||
int "Beacon loss timeout"
|
||||
range 5 100
|
||||
default 10
|
||||
depends on ESP_WIFI_SLP_BEACON_LOST_OPT
|
||||
help
|
||||
Timeout time for close rf phy when beacon loss occurs, Unit: 1024 microsecond.
|
||||
|
||||
config ESP_WIFI_SLP_BEACON_LOST_THRESHOLD
|
||||
int "Maximum number of consecutive lost beacons allowed"
|
||||
range 0 8
|
||||
default 3
|
||||
depends on ESP_WIFI_SLP_BEACON_LOST_OPT
|
||||
help
|
||||
Maximum number of consecutive lost beacons allowed, WiFi keeps Rx state when
|
||||
the number of consecutive beacons lost is greater than the given threshold.
|
||||
|
||||
config ESP_WIFI_SLP_PHY_ON_DELTA_EARLY_TIME
|
||||
int "Delta early time for RF PHY on"
|
||||
range 0 100
|
||||
default 2
|
||||
depends on ESP_WIFI_SLP_BEACON_LOST_OPT && SLAVE_SOC_WIFI_SUPPORT_VARIABLE_BEACON_WINDOW
|
||||
help
|
||||
Delta early time for rf phy on, When the beacon is lost, the next rf phy on will
|
||||
be earlier the time specified by the configuration item, Unit: 32 microsecond.
|
||||
|
||||
config ESP_WIFI_SLP_PHY_OFF_DELTA_TIMEOUT_TIME
|
||||
int "Delta timeout time for RF PHY off"
|
||||
range 0 8
|
||||
default 2
|
||||
depends on ESP_WIFI_SLP_BEACON_LOST_OPT && SLAVE_SOC_WIFI_SUPPORT_VARIABLE_BEACON_WINDOW
|
||||
help
|
||||
Delta timeout time for rf phy off, When the beacon is lost, the next rf phy off will
|
||||
be delayed for the time specified by the configuration item. Unit: 1024 microsecond.
|
||||
|
||||
config ESP_WIFI_ESPNOW_MAX_ENCRYPT_NUM
|
||||
int "Maximum espnow encrypt peers number"
|
||||
range 0 4 if SLAVE_IDF_TARGET_ESP32C2
|
||||
range 0 17 if (!SLAVE_IDF_TARGET_ESP32C2)
|
||||
default 2 if SLAVE_IDF_TARGET_ESP32C2
|
||||
default 7 if (!SLAVE_IDF_TARGET_ESP32C2)
|
||||
help
|
||||
Maximum number of encrypted peers supported by espnow.
|
||||
The number of hardware keys for encryption is fixed. And the espnow and SoftAP share the same
|
||||
hardware keys. So this configuration will affect the maximum connection number of SoftAP.
|
||||
Maximum espnow encrypted peers number + maximum number of connections of SoftAP = Max hardware
|
||||
keys number. When using ESP mesh, this value should be set to a maximum of 6.
|
||||
|
||||
config ESP_WIFI_NAN_ENABLE
|
||||
bool "WiFi Aware"
|
||||
default n
|
||||
depends on SLAVE_SOC_WIFI_NAN_SUPPORT
|
||||
help
|
||||
Enable WiFi Aware (NAN) feature.
|
||||
|
||||
config ESP_WIFI_MBEDTLS_CRYPTO
|
||||
bool "Use MbedTLS crypto APIs"
|
||||
default y
|
||||
select MBEDTLS_AES_C
|
||||
select MBEDTLS_ECP_C
|
||||
select MBEDTLS_ECDH_C
|
||||
select MBEDTLS_ECDSA_C
|
||||
select MBEDTLS_CMAC_C
|
||||
select MBEDTLS_ECP_DP_SECP256R1_ENABLED
|
||||
help
|
||||
Select this option to enable the use of MbedTLS crypto APIs.
|
||||
The internal crypto support within the supplicant is limited
|
||||
and may not suffice for all new security features, including WPA3.
|
||||
|
||||
It is recommended to always keep this option enabled. Additionally,
|
||||
note that MbedTLS can leverage hardware acceleration if available,
|
||||
resulting in significantly faster cryptographic operations.
|
||||
|
||||
if ESP_WIFI_MBEDTLS_CRYPTO
|
||||
config ESP_WIFI_MBEDTLS_TLS_CLIENT
|
||||
bool "Use MbedTLS TLS client for WiFi Enterprise connection"
|
||||
depends on ESP_WIFI_ENTERPRISE_SUPPORT
|
||||
default y
|
||||
select MBEDTLS_TLS_ENABLED
|
||||
help
|
||||
Select this option to use MbedTLS TLS client for WPA2 enterprise connection.
|
||||
Please note that from MbedTLS-3.0 onwards, MbedTLS does not support SSL-3.0
|
||||
TLS-v1.0, TLS-v1.1 versions. In case your server is using one of these version,
|
||||
it is advisable to update your server.
|
||||
Please disable this option for compatibility with older TLS versions.
|
||||
|
||||
config ESP_WIFI_EAP_TLS1_3
|
||||
bool "Enable EAP-TLS v1.3 Support for WiFi Enterprise connection"
|
||||
default n
|
||||
select MBEDTLS_SSL_PROTO_TLS1_3
|
||||
depends on ESP_WIFI_MBEDTLS_TLS_CLIENT && IDF_EXPERIMENTAL_FEATURES
|
||||
help
|
||||
Select this option to support EAP with TLS v1.3.
|
||||
This configuration still supports compatibility with EAP-TLS v1.2.
|
||||
Please note that enabling this configuration will cause every application which
|
||||
uses TLS go for TLS1.3 if server supports that. TLS1.3 is still in development in mbedtls
|
||||
and there may be interoperability issues with this. Please modify your application to set
|
||||
max version as TLS1.2 if you want to enable TLS1.3 only for WiFi connection.
|
||||
|
||||
endif
|
||||
|
||||
config ESP_WIFI_WAPI_PSK
|
||||
bool "Enable WAPI PSK support"
|
||||
depends on SLAVE_SOC_WIFI_WAPI_SUPPORT
|
||||
default n
|
||||
help
|
||||
Select this option to enable WAPI-PSK
|
||||
which is a Chinese National Standard Encryption for Wireless LANs (GB 15629.11-2003).
|
||||
|
||||
config ESP_WIFI_SUITE_B_192
|
||||
bool "Enable NSA suite B support with 192 bit key"
|
||||
default n
|
||||
depends on SLAVE_SOC_WIFI_GCMP_SUPPORT
|
||||
select ESP_WIFI_GCMP_SUPPORT
|
||||
select ESP_WIFI_GMAC_SUPPORT
|
||||
help
|
||||
Select this option to enable 192 bit NSA suite-B.
|
||||
This is necessary to support WPA3 192 bit security.
|
||||
|
||||
config ESP_WIFI_11KV_SUPPORT
|
||||
bool "Enable 802.11k, 802.11v APIs Support"
|
||||
default n
|
||||
help
|
||||
Select this option to enable 802.11k 802.11v APIs(RRM and BTM support).
|
||||
Only APIs which are helpful for network assisted roaming
|
||||
are supported for now.
|
||||
Enable this option with BTM and RRM enabled in sta config
|
||||
to make device ready for network assisted roaming.
|
||||
BTM: BSS transition management enables an AP to request a station to transition
|
||||
to a specific AP, or to indicate to a station a set of preferred APs.
|
||||
RRM: Radio measurements enable STAs to understand the radio environment,
|
||||
it enables STAs to observe and gather data on radio link performance
|
||||
and on the radio environment. Current implementation adds beacon report,
|
||||
link measurement, neighbor report.
|
||||
|
||||
config ESP_WIFI_SCAN_CACHE
|
||||
bool "Keep scan results in cache"
|
||||
depends on ESP_WIFI_11KV_SUPPORT
|
||||
default n
|
||||
help
|
||||
Keep scan results in cache, if not enabled, those
|
||||
will be flushed immediately.
|
||||
|
||||
config ESP_WIFI_MBO_SUPPORT
|
||||
bool "Enable Multi Band Operation Certification Support"
|
||||
default n
|
||||
select ESP_WIFI_11KV_SUPPORT
|
||||
select ESP_WIFI_SCAN_CACHE
|
||||
help
|
||||
Select this option to enable WiFi Multiband operation certification support.
|
||||
|
||||
config ESP_WIFI_ENABLE_ROAMING_APP
|
||||
bool "Advanced support for Wi-Fi Roaming (Experimental)"
|
||||
depends on IDF_EXPERIMENTAL_FEATURES
|
||||
default n
|
||||
select ESP_WIFI_SCAN_CACHE
|
||||
help
|
||||
Enable Espressif's roaming app to allow for efficient Wi-Fi roaming.
|
||||
This includes configurable periodic environment scans, maintaining a cache of the
|
||||
best APs, handling low rssi events etc.
|
||||
|
||||
Risk Warning
|
||||
Please note that this feature is still experimental and enabling this potentially can
|
||||
lead to unpredictable scanning, connection and roaming attempts.
|
||||
We are still working on tuning and optimising this feature to ensure reliable and stable use.
|
||||
|
||||
menu "Configure roaming App"
|
||||
depends on ESP_WIFI_ENABLE_ROAMING_APP
|
||||
rsource "wifi_apps/roaming_app/src/Kconfig.roaming"
|
||||
endmenu
|
||||
|
||||
config ESP_WIFI_DPP_SUPPORT
|
||||
bool "Enable DPP support"
|
||||
default n
|
||||
select ESP_WIFI_MBEDTLS_CRYPTO
|
||||
help
|
||||
Select this option to enable WiFi Easy Connect Support.
|
||||
|
||||
config ESP_WIFI_11R_SUPPORT
|
||||
bool "Enable 802.11R (Fast Transition) Support"
|
||||
default n
|
||||
help
|
||||
Select this option to enable WiFi Fast Transition Support.
|
||||
|
||||
config ESP_WIFI_WPS_SOFTAP_REGISTRAR
|
||||
bool "Add WPS Registrar support in SoftAP mode"
|
||||
depends on ESP_WIFI_SOFTAP_SUPPORT
|
||||
default n
|
||||
help
|
||||
Select this option to enable WPS registrar support in softAP mode.
|
||||
|
||||
config ESP_WIFI_ENABLE_WIFI_TX_STATS
|
||||
bool "Enable Wi-Fi transmission statistics"
|
||||
depends on SLAVE_SOC_WIFI_HE_SUPPORT
|
||||
default n
|
||||
help
|
||||
Enable Wi-Fi transmission statistics. Total support 4 access category. Each access category
|
||||
will use 346 bytes memory.
|
||||
|
||||
config ESP_WIFI_ENABLE_WIFI_RX_STATS
|
||||
bool "Enable Wi-Fi reception statistics"
|
||||
depends on SLAVE_SOC_WIFI_HE_SUPPORT
|
||||
default n
|
||||
help
|
||||
Enable Wi-Fi reception statistics. Total support 2 access category. Each access category
|
||||
will use 190 bytes memory.
|
||||
|
||||
config ESP_WIFI_ENABLE_WIFI_RX_MU_STATS
|
||||
bool "Enable Wi-Fi DL MU-MIMO and DL OFDMA reception statistics"
|
||||
depends on ESP_WIFI_ENABLE_WIFI_RX_STATS
|
||||
default n
|
||||
help
|
||||
Enable Wi-Fi DL MU-MIMO and DL OFDMA reception statistics. Will use 10932 bytes memory.
|
||||
|
||||
config ESP_WIFI_TX_HETB_QUEUE_NUM
|
||||
int "WiFi TX HE TB QUEUE number for STA HE TB PPDU transmission"
|
||||
depends on SLAVE_SOC_WIFI_HE_SUPPORT
|
||||
range 1 4
|
||||
default 3
|
||||
help
|
||||
Set the maximum number of queue that can be aggregated by the STA in the A-MPDU carried in the
|
||||
HE TB PPDU.
|
||||
|
||||
config ESP_WIFI_ENABLE_DUMP_HESIGB
|
||||
bool "Enable Wi-Fi dump HE-SIGB which is contained in DL HE MU PPDUs"
|
||||
depends on SLAVE_SOC_WIFI_SUPPORT_5G
|
||||
default "n"
|
||||
help
|
||||
Enable Wi-Fi dump HE-SIGB which is contained in DL HE MU PPDUs.
|
||||
|
||||
config ESP_WIFI_ENABLE_DUMP_MU_CFO
|
||||
bool "Enable Wi-Fi dump MU CFO"
|
||||
depends on SLAVE_SOC_WIFI_SUPPORT_5G
|
||||
default "n"
|
||||
help
|
||||
Enable Wi-Fi dump MU CFO.
|
||||
|
||||
config ESP_WIFI_ENABLE_DUMP_CTRL_NDPA
|
||||
bool "Enable Wi-Fi dump NDPA frames"
|
||||
depends on SLAVE_SOC_WIFI_SUPPORT_5G
|
||||
default "n"
|
||||
help
|
||||
Enable Wi-Fi dump NDPA frames.
|
||||
|
||||
config ESP_WIFI_ENABLE_DUMP_CTRL_BFRP
|
||||
bool "Enable Wi-Fi dump BFRP frames"
|
||||
depends on SLAVE_SOC_WIFI_SUPPORT_5G
|
||||
default "n"
|
||||
help
|
||||
Enable Wi-Fi dump BFRP frames.
|
||||
|
||||
menu "WPS Configuration Options"
|
||||
config ESP_WIFI_WPS_STRICT
|
||||
bool "Strictly validate all WPS attributes"
|
||||
default n
|
||||
help
|
||||
Select this option to enable validate each WPS attribute
|
||||
rigorously. Disabling this add the workarounds with various APs.
|
||||
Enabling this may cause inter operability issues with some APs.
|
||||
|
||||
config ESP_WIFI_WPS_PASSPHRASE
|
||||
bool "Get WPA2 passphrase in WPS config"
|
||||
default n
|
||||
help
|
||||
Select this option to get passphrase during WPS configuration.
|
||||
This option fakes the virtual display capabilities to get the
|
||||
configuration in passphrase mode.
|
||||
Not recommended to be used since WPS credentials should not
|
||||
be shared to other devices, making it in readable format increases
|
||||
that risk, also passphrase requires pbkdf2 to convert in psk.
|
||||
|
||||
endmenu # "WPS Configuration Options"
|
||||
|
||||
|
||||
config ESP_WIFI_DEBUG_PRINT
|
||||
bool "Print debug messages from WPA Supplicant"
|
||||
default n
|
||||
help
|
||||
Select this option to print logging information from WPA supplicant,
|
||||
this includes handshake information and key hex dumps depending
|
||||
on the project logging level.
|
||||
|
||||
Enabling this could increase the build size ~60kb
|
||||
depending on the project logging level.
|
||||
|
||||
config ESP_WIFI_TESTING_OPTIONS
|
||||
bool "Add DPP testing code"
|
||||
default n
|
||||
help
|
||||
Select this to enable unity test for DPP.
|
||||
|
||||
config ESP_WIFI_ENTERPRISE_SUPPORT
|
||||
bool "Enable enterprise option"
|
||||
default y
|
||||
help
|
||||
Select this to enable/disable enterprise connection support.
|
||||
|
||||
disabling this will reduce binary size.
|
||||
disabling this will disable the use of any esp_wifi_sta_wpa2_ent_* (as APIs will be meaningless)
|
||||
|
||||
Note that when using bigger certificates on low-power chips without crypto
|
||||
hardware acceleration, it is recommended to adjust the task watchdog timer (TWDT)
|
||||
if it is enabled. For precise information on timing requirements, you can check
|
||||
performance numbers at https://github.com/espressif/mbedtls/wiki/Performance-Numbers.
|
||||
|
||||
config ESP_WIFI_ENT_FREE_DYNAMIC_BUFFER
|
||||
bool "Free dynamic buffers during WiFi enterprise connection"
|
||||
depends on ESP_WIFI_ENTERPRISE_SUPPORT
|
||||
default y if SLAVE_IDF_TARGET_ESP32C2
|
||||
default n if !SLAVE_IDF_TARGET_ESP32C2
|
||||
help
|
||||
Select this configuration to free dynamic buffers during WiFi enterprise connection.
|
||||
This will enable chip to reduce heap consumption during WiFi enterprise connection.
|
||||
|
||||
# Wi-Fi configuration end
|
432
components/esp_wifi_remote/idf_v5.4/esp_wifi_remote_weak.c
Normal file
432
components/esp_wifi_remote/idf_v5.4/esp_wifi_remote_weak.c
Normal file
@ -0,0 +1,432 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2024 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);
|
||||
}
|
||||
|
||||
WEAK esp_err_t esp_wifi_remote_set_band(wifi_band_t band)
|
||||
{
|
||||
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
|
||||
}
|
||||
|
||||
WEAK esp_err_t esp_wifi_remote_get_band(wifi_band_t *band)
|
||||
{
|
||||
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
|
||||
}
|
||||
|
||||
WEAK esp_err_t esp_wifi_remote_set_band_mode(wifi_band_mode_t band_mode)
|
||||
{
|
||||
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
|
||||
}
|
||||
|
||||
WEAK esp_err_t esp_wifi_remote_get_band_mode(wifi_band_mode_t *band_mode)
|
||||
{
|
||||
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
|
||||
}
|
||||
|
||||
WEAK esp_err_t esp_wifi_remote_set_protocols(wifi_interface_t ifx, wifi_protocols_t *protocols)
|
||||
{
|
||||
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
|
||||
}
|
||||
|
||||
WEAK esp_err_t esp_wifi_remote_get_protocols(wifi_interface_t ifx, wifi_protocols_t *protocols)
|
||||
{
|
||||
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
|
||||
}
|
||||
|
||||
WEAK esp_err_t esp_wifi_remote_set_bandwidths(wifi_interface_t ifx, wifi_bandwidths_t *bw)
|
||||
{
|
||||
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
|
||||
}
|
||||
|
||||
WEAK esp_err_t esp_wifi_remote_get_bandwidths(wifi_interface_t ifx, wifi_bandwidths_t *bw)
|
||||
{
|
||||
LOG_UNSUPPORTED_AND_RETURN(ESP_ERR_NOT_SUPPORTED);
|
||||
}
|
428
components/esp_wifi_remote/idf_v5.4/esp_wifi_with_remote.c
Normal file
428
components/esp_wifi_remote/idf_v5.4/esp_wifi_with_remote.c
Normal file
@ -0,0 +1,428 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2024 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);
|
||||
}
|
||||
|
||||
esp_err_t esp_wifi_set_band(wifi_band_t band)
|
||||
{
|
||||
return esp_wifi_remote_set_band(band);
|
||||
}
|
||||
|
||||
esp_err_t esp_wifi_get_band(wifi_band_t *band)
|
||||
{
|
||||
return esp_wifi_remote_get_band(band);
|
||||
}
|
||||
|
||||
esp_err_t esp_wifi_set_band_mode(wifi_band_mode_t band_mode)
|
||||
{
|
||||
return esp_wifi_remote_set_band_mode(band_mode);
|
||||
}
|
||||
|
||||
esp_err_t esp_wifi_get_band_mode(wifi_band_mode_t *band_mode)
|
||||
{
|
||||
return esp_wifi_remote_get_band_mode(band_mode);
|
||||
}
|
||||
|
||||
esp_err_t esp_wifi_set_protocols(wifi_interface_t ifx, wifi_protocols_t *protocols)
|
||||
{
|
||||
return esp_wifi_remote_set_protocols(ifx, protocols);
|
||||
}
|
||||
|
||||
esp_err_t esp_wifi_get_protocols(wifi_interface_t ifx, wifi_protocols_t *protocols)
|
||||
{
|
||||
return esp_wifi_remote_get_protocols(ifx, protocols);
|
||||
}
|
||||
|
||||
esp_err_t esp_wifi_set_bandwidths(wifi_interface_t ifx, wifi_bandwidths_t *bw)
|
||||
{
|
||||
return esp_wifi_remote_set_bandwidths(ifx, bw);
|
||||
}
|
||||
|
||||
esp_err_t esp_wifi_get_bandwidths(wifi_interface_t ifx, wifi_bandwidths_t *bw)
|
||||
{
|
||||
return esp_wifi_remote_get_bandwidths(ifx, bw);
|
||||
}
|
@ -0,0 +1,91 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2024 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);
|
||||
esp_err_t esp_wifi_remote_set_band(wifi_band_t band);
|
||||
esp_err_t esp_wifi_remote_get_band(wifi_band_t *band);
|
||||
esp_err_t esp_wifi_remote_set_band_mode(wifi_band_mode_t band_mode);
|
||||
esp_err_t esp_wifi_remote_get_band_mode(wifi_band_mode_t *band_mode);
|
||||
esp_err_t esp_wifi_remote_set_protocols(wifi_interface_t ifx, wifi_protocols_t *protocols);
|
||||
esp_err_t esp_wifi_remote_get_protocols(wifi_interface_t ifx, wifi_protocols_t *protocols);
|
||||
esp_err_t esp_wifi_remote_set_bandwidths(wifi_interface_t ifx, wifi_bandwidths_t *bw);
|
||||
esp_err_t esp_wifi_remote_get_bandwidths(wifi_interface_t ifx, wifi_bandwidths_t *bw);
|
@ -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 || CONFIG_SLAVE_IDF_TARGET_ESP32C61
|
||||
#define ESP_WIFI_MAX_CONN_NUM (10) /**< max number of stations which can connect to ESP32C3/ESP32C6/ESP32C5/ESP32C61 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
|
@ -7,7 +7,7 @@ import re
|
||||
import subprocess
|
||||
from collections import namedtuple
|
||||
|
||||
from idf_build_apps.constants import SUPPORTED_TARGETS
|
||||
from idf_build_apps.constants import PREVIEW_TARGETS, SUPPORTED_TARGETS
|
||||
from pycparser import c_ast, c_parser, preprocess_file
|
||||
|
||||
Param = namedtuple('Param', ['ptr', 'array', 'qual', 'type', 'name'])
|
||||
@ -159,53 +159,46 @@ def get_vars(parameters):
|
||||
return definitions, comma_separated_names
|
||||
|
||||
|
||||
def generate_kconfig_wifi_caps(idf_path, component_path):
|
||||
kconfig = os.path.join(component_path, 'Kconfig.soc_wifi_caps.in')
|
||||
sdkconfig_files = []
|
||||
with open(kconfig, 'w') as out:
|
||||
out.write(f'# {AUTO_GENERATED}\n')
|
||||
for slave_target in SUPPORTED_TARGETS:
|
||||
out.write(f'\nif SLAVE_IDF_TARGET_{slave_target.upper()}\n\n')
|
||||
def generate_kconfig_wifi_caps(idf_path, idf_ver_dir, component_path):
|
||||
kconfig = os.path.join(component_path, idf_ver_dir, 'Kconfig.soc_wifi_caps.in')
|
||||
slave_select = os.path.join(component_path, idf_ver_dir, 'Kconfig.slave_select.in')
|
||||
with open(kconfig, 'w') as slave_caps, open(slave_select, 'w') as slave:
|
||||
slave_caps.write(f'# {AUTO_GENERATED}\n')
|
||||
slave.write(f'# {AUTO_GENERATED}\n')
|
||||
slave.write(' choice SLAVE_IDF_TARGET\n')
|
||||
slave.write(' prompt "choose slave target"\n')
|
||||
slave.write(' default SLAVE_IDF_TARGET_ESP32\n')
|
||||
for slave_target in SUPPORTED_TARGETS + PREVIEW_TARGETS:
|
||||
add_slave = False
|
||||
kconfig_content = []
|
||||
soc_caps = os.path.join(idf_path, 'components', 'soc', slave_target, 'include', 'soc', 'Kconfig.soc_caps.in')
|
||||
with open(soc_caps, 'r') as f:
|
||||
for line in f:
|
||||
if line.strip().startswith('config SOC_WIFI_'):
|
||||
if 'config SOC_WIFI_SUPPORTED' in line:
|
||||
# if WiFi supported for this target, test it as a slave
|
||||
sdkconfig = os.path.join(component_path, 'test', 'smoke_test', f'sdkconfig.ci.slave_{slave_target}')
|
||||
open(sdkconfig, 'w').write(f'CONFIG_SLAVE_IDF_TARGET_{slave_target.upper()}=y\n')
|
||||
sdkconfig_files.append(sdkconfig)
|
||||
replaced = re.compile(r'SOC_WIFI_').sub('SLAVE_SOC_WIFI_', line)
|
||||
out.write(f' {replaced}')
|
||||
line = f.readline() # type
|
||||
out.write(f' {line}')
|
||||
line = f.readline() # default
|
||||
out.write(f' {line}\n')
|
||||
out.write(f'endif # {slave_target.upper()}\n')
|
||||
return [kconfig] + sdkconfig_files
|
||||
# if WiFi supported for this target, add it to Kconfig slave options and test this slave
|
||||
add_slave = True
|
||||
replaced = re.sub(r'SOC_WIFI_', 'SLAVE_SOC_WIFI_', line)
|
||||
kconfig_content.append(f' {replaced}')
|
||||
kconfig_content.append(f' {f.readline()}') # type
|
||||
kconfig_content.append(f' {f.readline()}\n') # default
|
||||
if add_slave:
|
||||
slave_caps.write(f'\nif SLAVE_IDF_TARGET_{slave_target.upper()}\n\n')
|
||||
slave_caps.writelines(kconfig_content)
|
||||
slave_caps.write(f'endif # {slave_target.upper()}\n')
|
||||
|
||||
slave_config_name = 'SLAVE_IDF_TARGET_' + slave_target.upper()
|
||||
slave.write(f' config {slave_config_name}\n')
|
||||
slave.write(f' bool "{slave_target}"\n')
|
||||
|
||||
slave.write(' endchoice\n')
|
||||
return [kconfig, slave_select]
|
||||
|
||||
|
||||
def generate_test_kconfig(component_path):
|
||||
path = os.path.join(component_path, 'test','smoke_test','components','esp_hosted','Kconfig')
|
||||
with open(path, 'w') as f:
|
||||
f.write(f'# {AUTO_GENERATED}\n')
|
||||
f.write('menu "ESP Hosted Mock"\n')
|
||||
f.write(' choice SLAVE_IDF_TARGET\n')
|
||||
f.write(' prompt "choose slave target"\n')
|
||||
f.write(' default SLAVE_IDF_TARGET_ESP32\n')
|
||||
for slave_target in SUPPORTED_TARGETS:
|
||||
config = 'SLAVE_IDF_TARGET_' + slave_target.upper()
|
||||
f.write(f' config {config}\n')
|
||||
f.write(f' bool "{slave_target}"\n')
|
||||
f.write(' endchoice\n')
|
||||
f.write('endmenu\n')
|
||||
return [path]
|
||||
|
||||
|
||||
def generate_remote_wifi_api(function_prototypes, component_path):
|
||||
header = os.path.join(component_path, 'include', 'esp_wifi_remote_api.h')
|
||||
wifi_source = os.path.join(component_path, 'esp_wifi_with_remote.c')
|
||||
remote_source = os.path.join(component_path, 'esp_wifi_remote_weak.c')
|
||||
def generate_remote_wifi_api(function_prototypes, idf_ver_dir, component_path):
|
||||
header = os.path.join(component_path, idf_ver_dir, 'include', 'esp_wifi_remote_api.h')
|
||||
wifi_source = os.path.join(component_path, idf_ver_dir, 'esp_wifi_with_remote.c')
|
||||
remote_source = os.path.join(component_path, idf_ver_dir, 'esp_wifi_remote_weak.c')
|
||||
with open(header, 'w') as f:
|
||||
f.write(COPYRIGHT_HEADER)
|
||||
f.write('#pragma once\n')
|
||||
@ -240,9 +233,9 @@ def generate_remote_wifi_api(function_prototypes, component_path):
|
||||
return [header, wifi_source, remote_source]
|
||||
|
||||
|
||||
def generate_hosted_mocks(function_prototypes, component_path):
|
||||
source = os.path.join(component_path, 'test', 'smoke_test', 'components', 'esp_hosted', 'esp_hosted_mock.c')
|
||||
header = os.path.join(component_path, 'test', 'smoke_test', 'components', 'esp_hosted', 'include', 'esp_hosted_mock.h')
|
||||
def generate_hosted_mocks(function_prototypes, idf_ver_dir, component_path):
|
||||
source = os.path.join(component_path, 'test', 'smoke_test', 'components', 'esp_hosted', idf_ver_dir, 'esp_hosted_mock.c')
|
||||
header = os.path.join(component_path, 'test', 'smoke_test', 'components', 'esp_hosted', idf_ver_dir, 'include', 'esp_hosted_mock.h')
|
||||
with open(source, 'w') as f, open(header, 'w') as h:
|
||||
f.write(COPYRIGHT_HEADER)
|
||||
h.write(COPYRIGHT_HEADER)
|
||||
@ -264,9 +257,9 @@ def generate_hosted_mocks(function_prototypes, component_path):
|
||||
return [source, header]
|
||||
|
||||
|
||||
def generate_test_cases(function_prototypes, component_path):
|
||||
wifi_cases = os.path.join(component_path, 'test', 'smoke_test', 'main', 'all_wifi_calls.c')
|
||||
remote_wifi_cases = os.path.join(component_path, 'test', 'smoke_test', 'main', 'all_wifi_remote_calls.c')
|
||||
def generate_test_cases(function_prototypes, idf_ver_dir, component_path):
|
||||
wifi_cases = os.path.join(component_path, 'test', 'smoke_test', 'main', idf_ver_dir, 'all_wifi_calls.c')
|
||||
remote_wifi_cases = os.path.join(component_path, 'test', 'smoke_test', 'main', idf_ver_dir, 'all_wifi_remote_calls.c')
|
||||
with open(wifi_cases, 'w') as wifi, open(remote_wifi_cases, 'w') as remote:
|
||||
wifi.write(COPYRIGHT_HEADER)
|
||||
remote.write(COPYRIGHT_HEADER)
|
||||
@ -290,8 +283,8 @@ def generate_test_cases(function_prototypes, component_path):
|
||||
return [wifi_cases, remote_wifi_cases]
|
||||
|
||||
|
||||
def generate_wifi_native(idf_path, component_path):
|
||||
wifi_native = os.path.join(component_path, 'include', 'esp_wifi_types_native.h')
|
||||
def generate_wifi_native(idf_path, idf_ver_dir, component_path):
|
||||
wifi_native = os.path.join(component_path, idf_ver_dir, 'include', 'esp_wifi_types_native.h')
|
||||
native_header = os.path.join(idf_path, 'components', 'esp_wifi', 'include', 'local', 'esp_wifi_types_native.h')
|
||||
orig_content = open(native_header, 'r').read()
|
||||
content = orig_content.replace('CONFIG_','CONFIG_SLAVE_')
|
||||
@ -299,20 +292,15 @@ def generate_wifi_native(idf_path, component_path):
|
||||
return [wifi_native]
|
||||
|
||||
|
||||
def generate_kconfig(idf_path, component_path):
|
||||
remote_kconfig = os.path.join(component_path, 'Kconfig')
|
||||
def generate_kconfig(idf_path, idf_ver_dir, component_path):
|
||||
remote_kconfig = os.path.join(component_path, idf_ver_dir, 'Kconfig.wifi.in')
|
||||
slave_configs = ['SOC_WIFI_', 'IDF_TARGET_']
|
||||
lines = open(os.path.join(idf_path, 'components', 'esp_wifi', 'Kconfig'), 'r').readlines()
|
||||
copy = 100 # just a big number to be greater than nested_if in the first few iterations
|
||||
nested_if = 0
|
||||
with open(remote_kconfig, 'w') as f:
|
||||
f.write(f'# Wi-Fi configuration\n')
|
||||
f.write(f'# {AUTO_GENERATED}\n')
|
||||
f.write('menu "Wi-Fi Remote"\n')
|
||||
f.write(' config ESP_WIFI_REMOTE_ENABLED\n')
|
||||
f.write(' bool\n')
|
||||
f.write(' default y\n\n')
|
||||
f.write(' orsource "./Kconfig.soc_wifi_caps.in"\n')
|
||||
f.write(' orsource "./Kconfig.rpc.in"\n')
|
||||
for line1 in lines:
|
||||
line = line1.strip()
|
||||
if re.match(r'^if\s+[A-Z_0-9]+\s*$', line):
|
||||
@ -328,10 +316,29 @@ def generate_kconfig(idf_path, component_path):
|
||||
|
||||
if re.match(r'^if\s+\(?ESP_WIFI_ENABLED', line):
|
||||
copy = nested_if
|
||||
f.write('endmenu # Wi-Fi Remote\n')
|
||||
f.write(f'# Wi-Fi configuration end\n')
|
||||
return [remote_kconfig]
|
||||
|
||||
|
||||
def compare_files(base_dir, component_path, files_to_check):
|
||||
failures = []
|
||||
for file_path in files_to_check:
|
||||
relative_path = os.path.relpath(file_path, component_path)
|
||||
base_file = os.path.join(base_dir, relative_path)
|
||||
|
||||
if not os.path.exists(base_file):
|
||||
failures.append((relative_path, 'File does not exist in base directory'))
|
||||
continue
|
||||
|
||||
diff_cmd = ['diff', '-I', 'Copyright', file_path, base_file]
|
||||
result = subprocess.run(diff_cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||
|
||||
if result.returncode != 0: # diff returns 0 if files are identical
|
||||
failures.append((relative_path, result.stdout.decode('utf-8')))
|
||||
|
||||
return failures
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
parser = argparse.ArgumentParser(
|
||||
description='Build all projects',
|
||||
@ -346,8 +353,14 @@ Please be aware that the pregenerated files use the same copyright header, so af
|
||||
making changes you might need to modify 'copyright_header.h' in the script directory.
|
||||
''')
|
||||
parser.add_argument('-s', '--skip-check', help='Skip checking the versioned files against the re-generated', action='store_true')
|
||||
parser.add_argument('--base-dir', help='Base directory to compare generated files against')
|
||||
args = parser.parse_args()
|
||||
|
||||
idf_version = os.getenv('ESP_IDF_VERSION')
|
||||
if idf_version is None:
|
||||
raise RuntimeError("Environment variable 'ESP_IDF_VERSION' wasn't set.")
|
||||
idf_ver_dir = f'idf_v{idf_version}'
|
||||
|
||||
component_path = os.path.normpath(os.path.join(os.path.realpath(__file__),'..', '..'))
|
||||
idf_path = os.getenv('IDF_PATH')
|
||||
if idf_path is None:
|
||||
@ -357,35 +370,32 @@ making changes you might need to modify 'copyright_header.h' in the script direc
|
||||
|
||||
files_to_check = []
|
||||
|
||||
files_to_check += generate_test_kconfig(component_path)
|
||||
files_to_check += generate_kconfig_wifi_caps(idf_path, idf_ver_dir, component_path)
|
||||
|
||||
files_to_check += generate_kconfig_wifi_caps(idf_path, component_path)
|
||||
files_to_check += generate_remote_wifi_api(function_prototypes, idf_ver_dir, component_path)
|
||||
|
||||
files_to_check += generate_remote_wifi_api(function_prototypes, component_path)
|
||||
files_to_check += generate_hosted_mocks(function_prototypes, idf_ver_dir, component_path)
|
||||
|
||||
files_to_check += generate_hosted_mocks(function_prototypes, component_path)
|
||||
files_to_check += generate_test_cases(function_prototypes, idf_ver_dir, component_path)
|
||||
|
||||
files_to_check += generate_test_cases(function_prototypes, component_path)
|
||||
files_to_check += generate_wifi_native(idf_path, idf_ver_dir, component_path)
|
||||
|
||||
files_to_check += generate_wifi_native(idf_path, component_path)
|
||||
files_to_check += generate_kconfig(idf_path, idf_ver_dir, component_path)
|
||||
|
||||
files_to_check += generate_kconfig(idf_path, component_path)
|
||||
|
||||
fail_test = False
|
||||
failures = []
|
||||
for f in files_to_check:
|
||||
print(f'checking {f}')
|
||||
rc, out, err, cmd = exec_cmd(['git', 'difftool', '-y', '-x', 'diff -I Copyright', '--', f])
|
||||
if out == '' or out.isspace():
|
||||
print(' - ok')
|
||||
else:
|
||||
print(' - FAILED!')
|
||||
failures.append((f, out))
|
||||
fail_test = True
|
||||
print(f)
|
||||
|
||||
if fail_test:
|
||||
if args.skip_check or args.base_dir is None:
|
||||
exit(0)
|
||||
|
||||
failures = compare_files(args.base_dir, component_path, files_to_check)
|
||||
|
||||
if failures:
|
||||
print(parser.epilog)
|
||||
print('\nDIfferent files:\n')
|
||||
for i in failures:
|
||||
print(f'{i[0]}\nChanges:\n{i[1]}')
|
||||
print('\nDifferent files:\n')
|
||||
for file, diff in failures:
|
||||
print(f'{file}\nChanges:\n{diff}')
|
||||
exit(1)
|
||||
else:
|
||||
print('All files are identical to the base directory.')
|
||||
exit(0)
|
||||
|
33
components/esp_wifi_remote/scripts/generate_slave_configs.py
Normal file
33
components/esp_wifi_remote/scripts/generate_slave_configs.py
Normal file
@ -0,0 +1,33 @@
|
||||
# SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
import os
|
||||
import re
|
||||
import sys
|
||||
|
||||
if len(sys.argv) < 2:
|
||||
print('Usage: python generate_slave_configs.py <output_directory>')
|
||||
sys.exit(1)
|
||||
output_directory = sys.argv[1]
|
||||
|
||||
# Input Kconfig file
|
||||
component_path = os.path.normpath(os.path.join(os.path.realpath(__file__),'..', '..'))
|
||||
kconfig_file = os.path.join(component_path, f"idf_v{os.getenv('ESP_IDF_VERSION')}", 'Kconfig.slave_select.in')
|
||||
|
||||
# Output file prefix
|
||||
output_prefix = 'sdkconfig.ci.'
|
||||
|
||||
# Regex pattern to match all available options for SLAVE_IDF_TARGET
|
||||
pattern = r'^ *config SLAVE_IDF_TARGET_(\w+)'
|
||||
|
||||
# Read the Kconfig and generate specific sdkconfig.ci.{slave} for each option
|
||||
with open(kconfig_file, 'r') as file:
|
||||
for line in file:
|
||||
match = re.match(pattern, line)
|
||||
if match:
|
||||
slave = match.group(1)
|
||||
output_file = os.path.join(output_directory, f'{output_prefix}{slave.lower()}')
|
||||
|
||||
with open(output_file, 'w') as out_file:
|
||||
out_file.write(f'CONFIG_SLAVE_IDF_TARGET_{slave.upper()}=y\n')
|
||||
|
||||
print(f'Generated: {output_file}')
|
@ -1,3 +1,5 @@
|
||||
idf_component_register(SRCS "esp_hosted_mock.c"
|
||||
INCLUDE_DIRS "include"
|
||||
set(IDF_VER_DIR "idf_v${IDF_VERSION_MAJOR}.${IDF_VERSION_MINOR}")
|
||||
|
||||
idf_component_register(SRCS "${IDF_VER_DIR}/esp_hosted_mock.c"
|
||||
INCLUDE_DIRS "${IDF_VER_DIR}/include" "include"
|
||||
REQUIRES esp_wifi esp_wifi_remote)
|
||||
|
@ -67,6 +67,16 @@ esp_err_t esp_wifi_remote_scan_start(const wifi_scan_config_t *config, _Bool blo
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
esp_err_t esp_wifi_remote_set_scan_parameters(const wifi_scan_default_params_t *config)
|
||||
{
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
esp_err_t esp_wifi_remote_get_scan_parameters(wifi_scan_default_params_t *config)
|
||||
{
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
esp_err_t esp_wifi_remote_scan_stop(void)
|
||||
{
|
||||
return ESP_OK;
|
||||
@ -262,6 +272,11 @@ esp_err_t esp_wifi_remote_set_csi_config(const wifi_csi_config_t *config)
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
esp_err_t esp_wifi_remote_get_csi_config(wifi_csi_config_t *config)
|
||||
{
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
esp_err_t esp_wifi_remote_set_csi(_Bool en)
|
||||
{
|
||||
return ESP_OK;
|
@ -17,6 +17,8 @@ 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);
|
||||
@ -56,6 +58,7 @@ 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);
|
@ -0,0 +1,428 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2024 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_remote_init(const wifi_init_config_t *config)
|
||||
{
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
esp_err_t esp_wifi_remote_deinit(void)
|
||||
{
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
esp_err_t esp_wifi_remote_set_mode(wifi_mode_t mode)
|
||||
{
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
esp_err_t esp_wifi_remote_get_mode(wifi_mode_t *mode)
|
||||
{
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
esp_err_t esp_wifi_remote_start(void)
|
||||
{
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
esp_err_t esp_wifi_remote_stop(void)
|
||||
{
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
esp_err_t esp_wifi_remote_restore(void)
|
||||
{
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
esp_err_t esp_wifi_remote_connect(void)
|
||||
{
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
esp_err_t esp_wifi_remote_disconnect(void)
|
||||
{
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
esp_err_t esp_wifi_remote_clear_fast_connect(void)
|
||||
{
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
esp_err_t esp_wifi_remote_deauth_sta(uint16_t aid)
|
||||
{
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
esp_err_t esp_wifi_remote_scan_start(const wifi_scan_config_t *config, _Bool block)
|
||||
{
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
esp_err_t esp_wifi_remote_set_scan_parameters(const wifi_scan_default_params_t *config)
|
||||
{
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
esp_err_t esp_wifi_remote_get_scan_parameters(wifi_scan_default_params_t *config)
|
||||
{
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
esp_err_t esp_wifi_remote_scan_stop(void)
|
||||
{
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
esp_err_t esp_wifi_remote_scan_get_ap_num(uint16_t *number)
|
||||
{
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
esp_err_t esp_wifi_remote_scan_get_ap_records(uint16_t *number, wifi_ap_record_t *ap_records)
|
||||
{
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
esp_err_t esp_wifi_remote_scan_get_ap_record(wifi_ap_record_t *ap_record)
|
||||
{
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
esp_err_t esp_wifi_remote_clear_ap_list(void)
|
||||
{
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
esp_err_t esp_wifi_remote_sta_get_ap_info(wifi_ap_record_t *ap_info)
|
||||
{
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
esp_err_t esp_wifi_remote_set_ps(wifi_ps_type_t type)
|
||||
{
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
esp_err_t esp_wifi_remote_get_ps(wifi_ps_type_t *type)
|
||||
{
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
esp_err_t esp_wifi_remote_set_protocol(wifi_interface_t ifx, uint8_t protocol_bitmap)
|
||||
{
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
esp_err_t esp_wifi_remote_get_protocol(wifi_interface_t ifx, uint8_t *protocol_bitmap)
|
||||
{
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
esp_err_t esp_wifi_remote_set_bandwidth(wifi_interface_t ifx, wifi_bandwidth_t bw)
|
||||
{
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
esp_err_t esp_wifi_remote_get_bandwidth(wifi_interface_t ifx, wifi_bandwidth_t *bw)
|
||||
{
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
esp_err_t esp_wifi_remote_set_channel(uint8_t primary, wifi_second_chan_t second)
|
||||
{
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
esp_err_t esp_wifi_remote_get_channel(uint8_t *primary, wifi_second_chan_t *second)
|
||||
{
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
esp_err_t esp_wifi_remote_set_country(const wifi_country_t *country)
|
||||
{
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
esp_err_t esp_wifi_remote_get_country(wifi_country_t *country)
|
||||
{
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
esp_err_t esp_wifi_remote_set_mac(wifi_interface_t ifx, const uint8_t mac[6])
|
||||
{
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
esp_err_t esp_wifi_remote_get_mac(wifi_interface_t ifx, uint8_t mac[6])
|
||||
{
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
esp_err_t esp_wifi_remote_set_promiscuous_rx_cb(wifi_promiscuous_cb_t cb)
|
||||
{
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
esp_err_t esp_wifi_remote_set_promiscuous(_Bool en)
|
||||
{
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
esp_err_t esp_wifi_remote_get_promiscuous(_Bool *en)
|
||||
{
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
esp_err_t esp_wifi_remote_set_promiscuous_filter(const wifi_promiscuous_filter_t *filter)
|
||||
{
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
esp_err_t esp_wifi_remote_get_promiscuous_filter(wifi_promiscuous_filter_t *filter)
|
||||
{
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
esp_err_t esp_wifi_remote_set_promiscuous_ctrl_filter(const wifi_promiscuous_filter_t *filter)
|
||||
{
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
esp_err_t esp_wifi_remote_get_promiscuous_ctrl_filter(wifi_promiscuous_filter_t *filter)
|
||||
{
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
esp_err_t esp_wifi_remote_set_config(wifi_interface_t interface, wifi_config_t *conf)
|
||||
{
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
esp_err_t esp_wifi_remote_get_config(wifi_interface_t interface, wifi_config_t *conf)
|
||||
{
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
esp_err_t esp_wifi_remote_ap_get_sta_list(wifi_sta_list_t *sta)
|
||||
{
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
esp_err_t esp_wifi_remote_ap_get_sta_aid(const uint8_t mac[6], uint16_t *aid)
|
||||
{
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
esp_err_t esp_wifi_remote_set_storage(wifi_storage_t storage)
|
||||
{
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
esp_err_t esp_wifi_remote_set_vendor_ie_cb(esp_vendor_ie_cb_t cb, void *ctx)
|
||||
{
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
esp_err_t esp_wifi_remote_set_max_tx_power(int8_t power)
|
||||
{
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
esp_err_t esp_wifi_remote_get_max_tx_power(int8_t *power)
|
||||
{
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
esp_err_t esp_wifi_remote_set_event_mask(uint32_t mask)
|
||||
{
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
esp_err_t esp_wifi_remote_get_event_mask(uint32_t *mask)
|
||||
{
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
esp_err_t esp_wifi_remote_80211_tx(wifi_interface_t ifx, const void *buffer, int len, _Bool en_sys_seq)
|
||||
{
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
esp_err_t esp_wifi_remote_set_csi_rx_cb(wifi_csi_cb_t cb, void *ctx)
|
||||
{
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
esp_err_t esp_wifi_remote_set_csi_config(const wifi_csi_config_t *config)
|
||||
{
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
esp_err_t esp_wifi_remote_get_csi_config(wifi_csi_config_t *config)
|
||||
{
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
esp_err_t esp_wifi_remote_set_csi(_Bool en)
|
||||
{
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
int64_t esp_wifi_remote_get_tsf_time(wifi_interface_t interface)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
esp_err_t esp_wifi_remote_set_inactive_time(wifi_interface_t ifx, uint16_t sec)
|
||||
{
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
esp_err_t esp_wifi_remote_get_inactive_time(wifi_interface_t ifx, uint16_t *sec)
|
||||
{
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
esp_err_t esp_wifi_remote_statis_dump(uint32_t modules)
|
||||
{
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
esp_err_t esp_wifi_remote_set_rssi_threshold(int32_t rssi)
|
||||
{
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
esp_err_t esp_wifi_remote_ftm_initiate_session(wifi_ftm_initiator_cfg_t *cfg)
|
||||
{
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
esp_err_t esp_wifi_remote_ftm_end_session(void)
|
||||
{
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
esp_err_t esp_wifi_remote_ftm_resp_set_offset(int16_t offset_cm)
|
||||
{
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
esp_err_t esp_wifi_remote_ftm_get_report(wifi_ftm_report_entry_t *report, uint8_t num_entries)
|
||||
{
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
esp_err_t esp_wifi_remote_config_11b_rate(wifi_interface_t ifx, _Bool disable)
|
||||
{
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
esp_err_t esp_wifi_remote_connectionless_module_set_wake_interval(uint16_t wake_interval)
|
||||
{
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
esp_err_t esp_wifi_remote_force_wakeup_acquire(void)
|
||||
{
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
esp_err_t esp_wifi_remote_force_wakeup_release(void)
|
||||
{
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
esp_err_t esp_wifi_remote_set_country_code(const char *country, _Bool ieee80211d_enabled)
|
||||
{
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
esp_err_t esp_wifi_remote_get_country_code(char *country)
|
||||
{
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
esp_err_t esp_wifi_remote_config_80211_tx_rate(wifi_interface_t ifx, wifi_phy_rate_t rate)
|
||||
{
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
esp_err_t esp_wifi_remote_disable_pmf_config(wifi_interface_t ifx)
|
||||
{
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
esp_err_t esp_wifi_remote_sta_get_aid(uint16_t *aid)
|
||||
{
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
esp_err_t esp_wifi_remote_sta_get_negotiated_phymode(wifi_phy_mode_t *phymode)
|
||||
{
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
esp_err_t esp_wifi_remote_set_dynamic_cs(_Bool enabled)
|
||||
{
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
esp_err_t esp_wifi_remote_sta_get_rssi(int *rssi)
|
||||
{
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
esp_err_t esp_wifi_remote_set_band(wifi_band_t band)
|
||||
{
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
esp_err_t esp_wifi_remote_get_band(wifi_band_t *band)
|
||||
{
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
esp_err_t esp_wifi_remote_set_band_mode(wifi_band_mode_t band_mode)
|
||||
{
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
esp_err_t esp_wifi_remote_get_band_mode(wifi_band_mode_t *band_mode)
|
||||
{
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
esp_err_t esp_wifi_remote_set_protocols(wifi_interface_t ifx, wifi_protocols_t *protocols)
|
||||
{
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
esp_err_t esp_wifi_remote_get_protocols(wifi_interface_t ifx, wifi_protocols_t *protocols)
|
||||
{
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
esp_err_t esp_wifi_remote_set_bandwidths(wifi_interface_t ifx, wifi_bandwidths_t *bw)
|
||||
{
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
esp_err_t esp_wifi_remote_get_bandwidths(wifi_interface_t ifx, wifi_bandwidths_t *bw)
|
||||
{
|
||||
return ESP_OK;
|
||||
}
|
@ -0,0 +1,91 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2024 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);
|
||||
esp_err_t esp_wifi_remote_set_band(wifi_band_t band);
|
||||
esp_err_t esp_wifi_remote_get_band(wifi_band_t *band);
|
||||
esp_err_t esp_wifi_remote_set_band_mode(wifi_band_mode_t band_mode);
|
||||
esp_err_t esp_wifi_remote_get_band_mode(wifi_band_mode_t *band_mode);
|
||||
esp_err_t esp_wifi_remote_set_protocols(wifi_interface_t ifx, wifi_protocols_t *protocols);
|
||||
esp_err_t esp_wifi_remote_get_protocols(wifi_interface_t ifx, wifi_protocols_t *protocols);
|
||||
esp_err_t esp_wifi_remote_set_bandwidths(wifi_interface_t ifx, wifi_bandwidths_t *bw);
|
||||
esp_err_t esp_wifi_remote_get_bandwidths(wifi_interface_t ifx, wifi_bandwidths_t *bw);
|
@ -1,2 +1,6 @@
|
||||
idf_component_register(SRCS "smoke_test.c" "all_wifi_calls.c" "all_wifi_remote_calls.c"
|
||||
INCLUDE_DIRS ".")
|
||||
set(IDF_VER_DIR "idf_v${IDF_VERSION_MAJOR}.${IDF_VERSION_MINOR}")
|
||||
|
||||
idf_component_register(SRCS "smoke_test.c"
|
||||
"${IDF_VER_DIR}/all_wifi_calls.c"
|
||||
"${IDF_VER_DIR}/all_wifi_remote_calls.c"
|
||||
INCLUDE_DIRS ".")
|
||||
|
@ -62,6 +62,16 @@ void run_all_wifi_apis(void)
|
||||
esp_wifi_scan_start(config, block);
|
||||
}
|
||||
|
||||
{
|
||||
const wifi_scan_default_params_t *config = NULL;
|
||||
esp_wifi_set_scan_parameters(config);
|
||||
}
|
||||
|
||||
{
|
||||
wifi_scan_default_params_t *config = NULL;
|
||||
esp_wifi_get_scan_parameters(config);
|
||||
}
|
||||
|
||||
{
|
||||
esp_wifi_scan_stop();
|
||||
}
|
||||
@ -275,6 +285,11 @@ void run_all_wifi_apis(void)
|
||||
esp_wifi_set_csi_config(config);
|
||||
}
|
||||
|
||||
{
|
||||
wifi_csi_config_t *config = NULL;
|
||||
esp_wifi_get_csi_config(config);
|
||||
}
|
||||
|
||||
{
|
||||
_Bool en = 0;
|
||||
esp_wifi_set_csi(en);
|
@ -62,6 +62,16 @@ void run_all_wifi_remote_apis(void)
|
||||
esp_wifi_remote_scan_start(config, block);
|
||||
}
|
||||
|
||||
{
|
||||
const wifi_scan_default_params_t *config = NULL;
|
||||
esp_wifi_remote_set_scan_parameters(config);
|
||||
}
|
||||
|
||||
{
|
||||
wifi_scan_default_params_t *config = NULL;
|
||||
esp_wifi_remote_get_scan_parameters(config);
|
||||
}
|
||||
|
||||
{
|
||||
esp_wifi_remote_scan_stop();
|
||||
}
|
||||
@ -275,6 +285,11 @@ void run_all_wifi_remote_apis(void)
|
||||
esp_wifi_remote_set_csi_config(config);
|
||||
}
|
||||
|
||||
{
|
||||
wifi_csi_config_t *config = NULL;
|
||||
esp_wifi_remote_get_csi_config(config);
|
||||
}
|
||||
|
||||
{
|
||||
_Bool en = 0;
|
||||
esp_wifi_remote_set_csi(en);
|
@ -0,0 +1,450 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
// This file is auto-generated
|
||||
#include "esp_wifi.h"
|
||||
|
||||
void run_all_wifi_apis(void)
|
||||
{
|
||||
{
|
||||
const wifi_init_config_t *config = NULL;
|
||||
esp_wifi_init(config);
|
||||
}
|
||||
|
||||
{
|
||||
esp_wifi_deinit();
|
||||
}
|
||||
|
||||
{
|
||||
wifi_mode_t mode = 0;
|
||||
esp_wifi_set_mode(mode);
|
||||
}
|
||||
|
||||
{
|
||||
wifi_mode_t *mode = NULL;
|
||||
esp_wifi_get_mode(mode);
|
||||
}
|
||||
|
||||
{
|
||||
esp_wifi_start();
|
||||
}
|
||||
|
||||
{
|
||||
esp_wifi_stop();
|
||||
}
|
||||
|
||||
{
|
||||
esp_wifi_restore();
|
||||
}
|
||||
|
||||
{
|
||||
esp_wifi_connect();
|
||||
}
|
||||
|
||||
{
|
||||
esp_wifi_disconnect();
|
||||
}
|
||||
|
||||
{
|
||||
esp_wifi_clear_fast_connect();
|
||||
}
|
||||
|
||||
{
|
||||
uint16_t aid = 0;
|
||||
esp_wifi_deauth_sta(aid);
|
||||
}
|
||||
|
||||
{
|
||||
const wifi_scan_config_t *config = NULL;
|
||||
_Bool block = 0;
|
||||
esp_wifi_scan_start(config, block);
|
||||
}
|
||||
|
||||
{
|
||||
const wifi_scan_default_params_t *config = NULL;
|
||||
esp_wifi_set_scan_parameters(config);
|
||||
}
|
||||
|
||||
{
|
||||
wifi_scan_default_params_t *config = NULL;
|
||||
esp_wifi_get_scan_parameters(config);
|
||||
}
|
||||
|
||||
{
|
||||
esp_wifi_scan_stop();
|
||||
}
|
||||
|
||||
{
|
||||
uint16_t *number = NULL;
|
||||
esp_wifi_scan_get_ap_num(number);
|
||||
}
|
||||
|
||||
{
|
||||
uint16_t *number = NULL;
|
||||
wifi_ap_record_t *ap_records = NULL;
|
||||
esp_wifi_scan_get_ap_records(number, ap_records);
|
||||
}
|
||||
|
||||
{
|
||||
wifi_ap_record_t *ap_record = NULL;
|
||||
esp_wifi_scan_get_ap_record(ap_record);
|
||||
}
|
||||
|
||||
{
|
||||
esp_wifi_clear_ap_list();
|
||||
}
|
||||
|
||||
{
|
||||
wifi_ap_record_t *ap_info = NULL;
|
||||
esp_wifi_sta_get_ap_info(ap_info);
|
||||
}
|
||||
|
||||
{
|
||||
wifi_ps_type_t type = 0;
|
||||
esp_wifi_set_ps(type);
|
||||
}
|
||||
|
||||
{
|
||||
wifi_ps_type_t *type = NULL;
|
||||
esp_wifi_get_ps(type);
|
||||
}
|
||||
|
||||
{
|
||||
wifi_interface_t ifx = 0;
|
||||
uint8_t protocol_bitmap = 0;
|
||||
esp_wifi_set_protocol(ifx, protocol_bitmap);
|
||||
}
|
||||
|
||||
{
|
||||
wifi_interface_t ifx = 0;
|
||||
uint8_t *protocol_bitmap = NULL;
|
||||
esp_wifi_get_protocol(ifx, protocol_bitmap);
|
||||
}
|
||||
|
||||
{
|
||||
wifi_interface_t ifx = 0;
|
||||
wifi_bandwidth_t bw = 0;
|
||||
esp_wifi_set_bandwidth(ifx, bw);
|
||||
}
|
||||
|
||||
{
|
||||
wifi_interface_t ifx = 0;
|
||||
wifi_bandwidth_t *bw = NULL;
|
||||
esp_wifi_get_bandwidth(ifx, bw);
|
||||
}
|
||||
|
||||
{
|
||||
uint8_t primary = 0;
|
||||
wifi_second_chan_t second = 0;
|
||||
esp_wifi_set_channel(primary, second);
|
||||
}
|
||||
|
||||
{
|
||||
uint8_t *primary = NULL;
|
||||
wifi_second_chan_t *second = NULL;
|
||||
esp_wifi_get_channel(primary, second);
|
||||
}
|
||||
|
||||
{
|
||||
const wifi_country_t *country = NULL;
|
||||
esp_wifi_set_country(country);
|
||||
}
|
||||
|
||||
{
|
||||
wifi_country_t *country = NULL;
|
||||
esp_wifi_get_country(country);
|
||||
}
|
||||
|
||||
{
|
||||
wifi_interface_t ifx = 0;
|
||||
const uint8_t mac[6] = {};
|
||||
esp_wifi_set_mac(ifx, mac);
|
||||
}
|
||||
|
||||
{
|
||||
wifi_interface_t ifx = 0;
|
||||
uint8_t mac[6] = {};
|
||||
esp_wifi_get_mac(ifx, mac);
|
||||
}
|
||||
|
||||
{
|
||||
wifi_promiscuous_cb_t cb = 0;
|
||||
esp_wifi_set_promiscuous_rx_cb(cb);
|
||||
}
|
||||
|
||||
{
|
||||
_Bool en = 0;
|
||||
esp_wifi_set_promiscuous(en);
|
||||
}
|
||||
|
||||
{
|
||||
_Bool *en = NULL;
|
||||
esp_wifi_get_promiscuous(en);
|
||||
}
|
||||
|
||||
{
|
||||
const wifi_promiscuous_filter_t *filter = NULL;
|
||||
esp_wifi_set_promiscuous_filter(filter);
|
||||
}
|
||||
|
||||
{
|
||||
wifi_promiscuous_filter_t *filter = NULL;
|
||||
esp_wifi_get_promiscuous_filter(filter);
|
||||
}
|
||||
|
||||
{
|
||||
const wifi_promiscuous_filter_t *filter = NULL;
|
||||
esp_wifi_set_promiscuous_ctrl_filter(filter);
|
||||
}
|
||||
|
||||
{
|
||||
wifi_promiscuous_filter_t *filter = NULL;
|
||||
esp_wifi_get_promiscuous_ctrl_filter(filter);
|
||||
}
|
||||
|
||||
{
|
||||
wifi_interface_t interface = 0;
|
||||
wifi_config_t *conf = NULL;
|
||||
esp_wifi_set_config(interface, conf);
|
||||
}
|
||||
|
||||
{
|
||||
wifi_interface_t interface = 0;
|
||||
wifi_config_t *conf = NULL;
|
||||
esp_wifi_get_config(interface, conf);
|
||||
}
|
||||
|
||||
{
|
||||
wifi_sta_list_t *sta = NULL;
|
||||
esp_wifi_ap_get_sta_list(sta);
|
||||
}
|
||||
|
||||
{
|
||||
const uint8_t mac[6] = {};
|
||||
uint16_t *aid = NULL;
|
||||
esp_wifi_ap_get_sta_aid(mac, aid);
|
||||
}
|
||||
|
||||
{
|
||||
wifi_storage_t storage = 0;
|
||||
esp_wifi_set_storage(storage);
|
||||
}
|
||||
|
||||
{
|
||||
_Bool enable = 0;
|
||||
wifi_vendor_ie_type_t type = 0;
|
||||
wifi_vendor_ie_id_t idx = 0;
|
||||
const void *vnd_ie = NULL;
|
||||
esp_wifi_set_vendor_ie(enable, type, idx, vnd_ie);
|
||||
}
|
||||
|
||||
{
|
||||
esp_vendor_ie_cb_t cb = 0;
|
||||
void *ctx = NULL;
|
||||
esp_wifi_set_vendor_ie_cb(cb, ctx);
|
||||
}
|
||||
|
||||
{
|
||||
int8_t power = 0;
|
||||
esp_wifi_set_max_tx_power(power);
|
||||
}
|
||||
|
||||
{
|
||||
int8_t *power = NULL;
|
||||
esp_wifi_get_max_tx_power(power);
|
||||
}
|
||||
|
||||
{
|
||||
uint32_t mask = 0;
|
||||
esp_wifi_set_event_mask(mask);
|
||||
}
|
||||
|
||||
{
|
||||
uint32_t *mask = NULL;
|
||||
esp_wifi_get_event_mask(mask);
|
||||
}
|
||||
|
||||
{
|
||||
wifi_interface_t ifx = 0;
|
||||
const void *buffer = NULL;
|
||||
int len = 0;
|
||||
_Bool en_sys_seq = 0;
|
||||
esp_wifi_80211_tx(ifx, buffer, len, en_sys_seq);
|
||||
}
|
||||
|
||||
{
|
||||
wifi_csi_cb_t cb = 0;
|
||||
void *ctx = NULL;
|
||||
esp_wifi_set_csi_rx_cb(cb, ctx);
|
||||
}
|
||||
|
||||
{
|
||||
const wifi_csi_config_t *config = NULL;
|
||||
esp_wifi_set_csi_config(config);
|
||||
}
|
||||
|
||||
{
|
||||
wifi_csi_config_t *config = NULL;
|
||||
esp_wifi_get_csi_config(config);
|
||||
}
|
||||
|
||||
{
|
||||
_Bool en = 0;
|
||||
esp_wifi_set_csi(en);
|
||||
}
|
||||
|
||||
{
|
||||
wifi_interface_t interface = 0;
|
||||
esp_wifi_get_tsf_time(interface);
|
||||
}
|
||||
|
||||
{
|
||||
wifi_interface_t ifx = 0;
|
||||
uint16_t sec = 0;
|
||||
esp_wifi_set_inactive_time(ifx, sec);
|
||||
}
|
||||
|
||||
{
|
||||
wifi_interface_t ifx = 0;
|
||||
uint16_t *sec = NULL;
|
||||
esp_wifi_get_inactive_time(ifx, sec);
|
||||
}
|
||||
|
||||
{
|
||||
uint32_t modules = 0;
|
||||
esp_wifi_statis_dump(modules);
|
||||
}
|
||||
|
||||
{
|
||||
int32_t rssi = 0;
|
||||
esp_wifi_set_rssi_threshold(rssi);
|
||||
}
|
||||
|
||||
{
|
||||
wifi_ftm_initiator_cfg_t *cfg = NULL;
|
||||
esp_wifi_ftm_initiate_session(cfg);
|
||||
}
|
||||
|
||||
{
|
||||
esp_wifi_ftm_end_session();
|
||||
}
|
||||
|
||||
{
|
||||
int16_t offset_cm = 0;
|
||||
esp_wifi_ftm_resp_set_offset(offset_cm);
|
||||
}
|
||||
|
||||
{
|
||||
wifi_ftm_report_entry_t *report = NULL;
|
||||
uint8_t num_entries = 0;
|
||||
esp_wifi_ftm_get_report(report, num_entries);
|
||||
}
|
||||
|
||||
{
|
||||
wifi_interface_t ifx = 0;
|
||||
_Bool disable = 0;
|
||||
esp_wifi_config_11b_rate(ifx, disable);
|
||||
}
|
||||
|
||||
{
|
||||
uint16_t wake_interval = 0;
|
||||
esp_wifi_connectionless_module_set_wake_interval(wake_interval);
|
||||
}
|
||||
|
||||
{
|
||||
esp_wifi_force_wakeup_acquire();
|
||||
}
|
||||
|
||||
{
|
||||
esp_wifi_force_wakeup_release();
|
||||
}
|
||||
|
||||
{
|
||||
const char *country = NULL;
|
||||
_Bool ieee80211d_enabled = 0;
|
||||
esp_wifi_set_country_code(country, ieee80211d_enabled);
|
||||
}
|
||||
|
||||
{
|
||||
char *country = NULL;
|
||||
esp_wifi_get_country_code(country);
|
||||
}
|
||||
|
||||
{
|
||||
wifi_interface_t ifx = 0;
|
||||
wifi_phy_rate_t rate = 0;
|
||||
esp_wifi_config_80211_tx_rate(ifx, rate);
|
||||
}
|
||||
|
||||
{
|
||||
wifi_interface_t ifx = 0;
|
||||
esp_wifi_disable_pmf_config(ifx);
|
||||
}
|
||||
|
||||
{
|
||||
uint16_t *aid = NULL;
|
||||
esp_wifi_sta_get_aid(aid);
|
||||
}
|
||||
|
||||
{
|
||||
wifi_phy_mode_t *phymode = NULL;
|
||||
esp_wifi_sta_get_negotiated_phymode(phymode);
|
||||
}
|
||||
|
||||
{
|
||||
_Bool enabled = 0;
|
||||
esp_wifi_set_dynamic_cs(enabled);
|
||||
}
|
||||
|
||||
{
|
||||
int *rssi = NULL;
|
||||
esp_wifi_sta_get_rssi(rssi);
|
||||
}
|
||||
|
||||
{
|
||||
wifi_band_t band = 0;
|
||||
esp_wifi_set_band(band);
|
||||
}
|
||||
|
||||
{
|
||||
wifi_band_t *band = NULL;
|
||||
esp_wifi_get_band(band);
|
||||
}
|
||||
|
||||
{
|
||||
wifi_band_mode_t band_mode = 0;
|
||||
esp_wifi_set_band_mode(band_mode);
|
||||
}
|
||||
|
||||
{
|
||||
wifi_band_mode_t *band_mode = NULL;
|
||||
esp_wifi_get_band_mode(band_mode);
|
||||
}
|
||||
|
||||
{
|
||||
wifi_interface_t ifx = 0;
|
||||
wifi_protocols_t *protocols = NULL;
|
||||
esp_wifi_set_protocols(ifx, protocols);
|
||||
}
|
||||
|
||||
{
|
||||
wifi_interface_t ifx = 0;
|
||||
wifi_protocols_t *protocols = NULL;
|
||||
esp_wifi_get_protocols(ifx, protocols);
|
||||
}
|
||||
|
||||
{
|
||||
wifi_interface_t ifx = 0;
|
||||
wifi_bandwidths_t *bw = NULL;
|
||||
esp_wifi_set_bandwidths(ifx, bw);
|
||||
}
|
||||
|
||||
{
|
||||
wifi_interface_t ifx = 0;
|
||||
wifi_bandwidths_t *bw = NULL;
|
||||
esp_wifi_get_bandwidths(ifx, bw);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,450 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
// This file is auto-generated
|
||||
#include "esp_wifi_remote.h"
|
||||
|
||||
void run_all_wifi_remote_apis(void)
|
||||
{
|
||||
{
|
||||
const wifi_init_config_t *config = NULL;
|
||||
esp_wifi_remote_init(config);
|
||||
}
|
||||
|
||||
{
|
||||
esp_wifi_remote_deinit();
|
||||
}
|
||||
|
||||
{
|
||||
wifi_mode_t mode = 0;
|
||||
esp_wifi_remote_set_mode(mode);
|
||||
}
|
||||
|
||||
{
|
||||
wifi_mode_t *mode = NULL;
|
||||
esp_wifi_remote_get_mode(mode);
|
||||
}
|
||||
|
||||
{
|
||||
esp_wifi_remote_start();
|
||||
}
|
||||
|
||||
{
|
||||
esp_wifi_remote_stop();
|
||||
}
|
||||
|
||||
{
|
||||
esp_wifi_remote_restore();
|
||||
}
|
||||
|
||||
{
|
||||
esp_wifi_remote_connect();
|
||||
}
|
||||
|
||||
{
|
||||
esp_wifi_remote_disconnect();
|
||||
}
|
||||
|
||||
{
|
||||
esp_wifi_remote_clear_fast_connect();
|
||||
}
|
||||
|
||||
{
|
||||
uint16_t aid = 0;
|
||||
esp_wifi_remote_deauth_sta(aid);
|
||||
}
|
||||
|
||||
{
|
||||
const wifi_scan_config_t *config = NULL;
|
||||
_Bool block = 0;
|
||||
esp_wifi_remote_scan_start(config, block);
|
||||
}
|
||||
|
||||
{
|
||||
const wifi_scan_default_params_t *config = NULL;
|
||||
esp_wifi_remote_set_scan_parameters(config);
|
||||
}
|
||||
|
||||
{
|
||||
wifi_scan_default_params_t *config = NULL;
|
||||
esp_wifi_remote_get_scan_parameters(config);
|
||||
}
|
||||
|
||||
{
|
||||
esp_wifi_remote_scan_stop();
|
||||
}
|
||||
|
||||
{
|
||||
uint16_t *number = NULL;
|
||||
esp_wifi_remote_scan_get_ap_num(number);
|
||||
}
|
||||
|
||||
{
|
||||
uint16_t *number = NULL;
|
||||
wifi_ap_record_t *ap_records = NULL;
|
||||
esp_wifi_remote_scan_get_ap_records(number, ap_records);
|
||||
}
|
||||
|
||||
{
|
||||
wifi_ap_record_t *ap_record = NULL;
|
||||
esp_wifi_remote_scan_get_ap_record(ap_record);
|
||||
}
|
||||
|
||||
{
|
||||
esp_wifi_remote_clear_ap_list();
|
||||
}
|
||||
|
||||
{
|
||||
wifi_ap_record_t *ap_info = NULL;
|
||||
esp_wifi_remote_sta_get_ap_info(ap_info);
|
||||
}
|
||||
|
||||
{
|
||||
wifi_ps_type_t type = 0;
|
||||
esp_wifi_remote_set_ps(type);
|
||||
}
|
||||
|
||||
{
|
||||
wifi_ps_type_t *type = NULL;
|
||||
esp_wifi_remote_get_ps(type);
|
||||
}
|
||||
|
||||
{
|
||||
wifi_interface_t ifx = 0;
|
||||
uint8_t protocol_bitmap = 0;
|
||||
esp_wifi_remote_set_protocol(ifx, protocol_bitmap);
|
||||
}
|
||||
|
||||
{
|
||||
wifi_interface_t ifx = 0;
|
||||
uint8_t *protocol_bitmap = NULL;
|
||||
esp_wifi_remote_get_protocol(ifx, protocol_bitmap);
|
||||
}
|
||||
|
||||
{
|
||||
wifi_interface_t ifx = 0;
|
||||
wifi_bandwidth_t bw = 0;
|
||||
esp_wifi_remote_set_bandwidth(ifx, bw);
|
||||
}
|
||||
|
||||
{
|
||||
wifi_interface_t ifx = 0;
|
||||
wifi_bandwidth_t *bw = NULL;
|
||||
esp_wifi_remote_get_bandwidth(ifx, bw);
|
||||
}
|
||||
|
||||
{
|
||||
uint8_t primary = 0;
|
||||
wifi_second_chan_t second = 0;
|
||||
esp_wifi_remote_set_channel(primary, second);
|
||||
}
|
||||
|
||||
{
|
||||
uint8_t *primary = NULL;
|
||||
wifi_second_chan_t *second = NULL;
|
||||
esp_wifi_remote_get_channel(primary, second);
|
||||
}
|
||||
|
||||
{
|
||||
const wifi_country_t *country = NULL;
|
||||
esp_wifi_remote_set_country(country);
|
||||
}
|
||||
|
||||
{
|
||||
wifi_country_t *country = NULL;
|
||||
esp_wifi_remote_get_country(country);
|
||||
}
|
||||
|
||||
{
|
||||
wifi_interface_t ifx = 0;
|
||||
const uint8_t mac[6] = {};
|
||||
esp_wifi_remote_set_mac(ifx, mac);
|
||||
}
|
||||
|
||||
{
|
||||
wifi_interface_t ifx = 0;
|
||||
uint8_t mac[6] = {};
|
||||
esp_wifi_remote_get_mac(ifx, mac);
|
||||
}
|
||||
|
||||
{
|
||||
wifi_promiscuous_cb_t cb = 0;
|
||||
esp_wifi_remote_set_promiscuous_rx_cb(cb);
|
||||
}
|
||||
|
||||
{
|
||||
_Bool en = 0;
|
||||
esp_wifi_remote_set_promiscuous(en);
|
||||
}
|
||||
|
||||
{
|
||||
_Bool *en = NULL;
|
||||
esp_wifi_remote_get_promiscuous(en);
|
||||
}
|
||||
|
||||
{
|
||||
const wifi_promiscuous_filter_t *filter = NULL;
|
||||
esp_wifi_remote_set_promiscuous_filter(filter);
|
||||
}
|
||||
|
||||
{
|
||||
wifi_promiscuous_filter_t *filter = NULL;
|
||||
esp_wifi_remote_get_promiscuous_filter(filter);
|
||||
}
|
||||
|
||||
{
|
||||
const wifi_promiscuous_filter_t *filter = NULL;
|
||||
esp_wifi_remote_set_promiscuous_ctrl_filter(filter);
|
||||
}
|
||||
|
||||
{
|
||||
wifi_promiscuous_filter_t *filter = NULL;
|
||||
esp_wifi_remote_get_promiscuous_ctrl_filter(filter);
|
||||
}
|
||||
|
||||
{
|
||||
wifi_interface_t interface = 0;
|
||||
wifi_config_t *conf = NULL;
|
||||
esp_wifi_remote_set_config(interface, conf);
|
||||
}
|
||||
|
||||
{
|
||||
wifi_interface_t interface = 0;
|
||||
wifi_config_t *conf = NULL;
|
||||
esp_wifi_remote_get_config(interface, conf);
|
||||
}
|
||||
|
||||
{
|
||||
wifi_sta_list_t *sta = NULL;
|
||||
esp_wifi_remote_ap_get_sta_list(sta);
|
||||
}
|
||||
|
||||
{
|
||||
const uint8_t mac[6] = {};
|
||||
uint16_t *aid = NULL;
|
||||
esp_wifi_remote_ap_get_sta_aid(mac, aid);
|
||||
}
|
||||
|
||||
{
|
||||
wifi_storage_t storage = 0;
|
||||
esp_wifi_remote_set_storage(storage);
|
||||
}
|
||||
|
||||
{
|
||||
_Bool enable = 0;
|
||||
wifi_vendor_ie_type_t type = 0;
|
||||
wifi_vendor_ie_id_t idx = 0;
|
||||
const void *vnd_ie = NULL;
|
||||
esp_wifi_remote_set_vendor_ie(enable, type, idx, vnd_ie);
|
||||
}
|
||||
|
||||
{
|
||||
esp_vendor_ie_cb_t cb = 0;
|
||||
void *ctx = NULL;
|
||||
esp_wifi_remote_set_vendor_ie_cb(cb, ctx);
|
||||
}
|
||||
|
||||
{
|
||||
int8_t power = 0;
|
||||
esp_wifi_remote_set_max_tx_power(power);
|
||||
}
|
||||
|
||||
{
|
||||
int8_t *power = NULL;
|
||||
esp_wifi_remote_get_max_tx_power(power);
|
||||
}
|
||||
|
||||
{
|
||||
uint32_t mask = 0;
|
||||
esp_wifi_remote_set_event_mask(mask);
|
||||
}
|
||||
|
||||
{
|
||||
uint32_t *mask = NULL;
|
||||
esp_wifi_remote_get_event_mask(mask);
|
||||
}
|
||||
|
||||
{
|
||||
wifi_interface_t ifx = 0;
|
||||
const void *buffer = NULL;
|
||||
int len = 0;
|
||||
_Bool en_sys_seq = 0;
|
||||
esp_wifi_remote_80211_tx(ifx, buffer, len, en_sys_seq);
|
||||
}
|
||||
|
||||
{
|
||||
wifi_csi_cb_t cb = 0;
|
||||
void *ctx = NULL;
|
||||
esp_wifi_remote_set_csi_rx_cb(cb, ctx);
|
||||
}
|
||||
|
||||
{
|
||||
const wifi_csi_config_t *config = NULL;
|
||||
esp_wifi_remote_set_csi_config(config);
|
||||
}
|
||||
|
||||
{
|
||||
wifi_csi_config_t *config = NULL;
|
||||
esp_wifi_remote_get_csi_config(config);
|
||||
}
|
||||
|
||||
{
|
||||
_Bool en = 0;
|
||||
esp_wifi_remote_set_csi(en);
|
||||
}
|
||||
|
||||
{
|
||||
wifi_interface_t interface = 0;
|
||||
esp_wifi_remote_get_tsf_time(interface);
|
||||
}
|
||||
|
||||
{
|
||||
wifi_interface_t ifx = 0;
|
||||
uint16_t sec = 0;
|
||||
esp_wifi_remote_set_inactive_time(ifx, sec);
|
||||
}
|
||||
|
||||
{
|
||||
wifi_interface_t ifx = 0;
|
||||
uint16_t *sec = NULL;
|
||||
esp_wifi_remote_get_inactive_time(ifx, sec);
|
||||
}
|
||||
|
||||
{
|
||||
uint32_t modules = 0;
|
||||
esp_wifi_remote_statis_dump(modules);
|
||||
}
|
||||
|
||||
{
|
||||
int32_t rssi = 0;
|
||||
esp_wifi_remote_set_rssi_threshold(rssi);
|
||||
}
|
||||
|
||||
{
|
||||
wifi_ftm_initiator_cfg_t *cfg = NULL;
|
||||
esp_wifi_remote_ftm_initiate_session(cfg);
|
||||
}
|
||||
|
||||
{
|
||||
esp_wifi_remote_ftm_end_session();
|
||||
}
|
||||
|
||||
{
|
||||
int16_t offset_cm = 0;
|
||||
esp_wifi_remote_ftm_resp_set_offset(offset_cm);
|
||||
}
|
||||
|
||||
{
|
||||
wifi_ftm_report_entry_t *report = NULL;
|
||||
uint8_t num_entries = 0;
|
||||
esp_wifi_remote_ftm_get_report(report, num_entries);
|
||||
}
|
||||
|
||||
{
|
||||
wifi_interface_t ifx = 0;
|
||||
_Bool disable = 0;
|
||||
esp_wifi_remote_config_11b_rate(ifx, disable);
|
||||
}
|
||||
|
||||
{
|
||||
uint16_t wake_interval = 0;
|
||||
esp_wifi_remote_connectionless_module_set_wake_interval(wake_interval);
|
||||
}
|
||||
|
||||
{
|
||||
esp_wifi_remote_force_wakeup_acquire();
|
||||
}
|
||||
|
||||
{
|
||||
esp_wifi_remote_force_wakeup_release();
|
||||
}
|
||||
|
||||
{
|
||||
const char *country = NULL;
|
||||
_Bool ieee80211d_enabled = 0;
|
||||
esp_wifi_remote_set_country_code(country, ieee80211d_enabled);
|
||||
}
|
||||
|
||||
{
|
||||
char *country = NULL;
|
||||
esp_wifi_remote_get_country_code(country);
|
||||
}
|
||||
|
||||
{
|
||||
wifi_interface_t ifx = 0;
|
||||
wifi_phy_rate_t rate = 0;
|
||||
esp_wifi_remote_config_80211_tx_rate(ifx, rate);
|
||||
}
|
||||
|
||||
{
|
||||
wifi_interface_t ifx = 0;
|
||||
esp_wifi_remote_disable_pmf_config(ifx);
|
||||
}
|
||||
|
||||
{
|
||||
uint16_t *aid = NULL;
|
||||
esp_wifi_remote_sta_get_aid(aid);
|
||||
}
|
||||
|
||||
{
|
||||
wifi_phy_mode_t *phymode = NULL;
|
||||
esp_wifi_remote_sta_get_negotiated_phymode(phymode);
|
||||
}
|
||||
|
||||
{
|
||||
_Bool enabled = 0;
|
||||
esp_wifi_remote_set_dynamic_cs(enabled);
|
||||
}
|
||||
|
||||
{
|
||||
int *rssi = NULL;
|
||||
esp_wifi_remote_sta_get_rssi(rssi);
|
||||
}
|
||||
|
||||
{
|
||||
wifi_band_t band = 0;
|
||||
esp_wifi_remote_set_band(band);
|
||||
}
|
||||
|
||||
{
|
||||
wifi_band_t *band = NULL;
|
||||
esp_wifi_remote_get_band(band);
|
||||
}
|
||||
|
||||
{
|
||||
wifi_band_mode_t band_mode = 0;
|
||||
esp_wifi_remote_set_band_mode(band_mode);
|
||||
}
|
||||
|
||||
{
|
||||
wifi_band_mode_t *band_mode = NULL;
|
||||
esp_wifi_remote_get_band_mode(band_mode);
|
||||
}
|
||||
|
||||
{
|
||||
wifi_interface_t ifx = 0;
|
||||
wifi_protocols_t *protocols = NULL;
|
||||
esp_wifi_remote_set_protocols(ifx, protocols);
|
||||
}
|
||||
|
||||
{
|
||||
wifi_interface_t ifx = 0;
|
||||
wifi_protocols_t *protocols = NULL;
|
||||
esp_wifi_remote_get_protocols(ifx, protocols);
|
||||
}
|
||||
|
||||
{
|
||||
wifi_interface_t ifx = 0;
|
||||
wifi_bandwidths_t *bw = NULL;
|
||||
esp_wifi_remote_set_bandwidths(ifx, bw);
|
||||
}
|
||||
|
||||
{
|
||||
wifi_interface_t ifx = 0;
|
||||
wifi_bandwidths_t *bw = NULL;
|
||||
esp_wifi_remote_get_bandwidths(ifx, bw);
|
||||
}
|
||||
|
||||
}
|
@ -16,6 +16,9 @@ void app_main(void)
|
||||
esp_wifi_init(&cfg);
|
||||
esp_wifi_deinit();
|
||||
|
||||
run_all_wifi_apis();
|
||||
#if CONFIG_SOC_WIFI_SUPPORTED
|
||||
run_all_wifi_remote_apis();
|
||||
#else
|
||||
run_all_wifi_apis();
|
||||
#endif
|
||||
}
|
||||
|
@ -1 +0,0 @@
|
||||
CONFIG_SLAVE_IDF_TARGET_ESP32=y
|
@ -1 +0,0 @@
|
||||
CONFIG_SLAVE_IDF_TARGET_ESP32C2=y
|
@ -1 +0,0 @@
|
||||
CONFIG_SLAVE_IDF_TARGET_ESP32C3=y
|
@ -1 +0,0 @@
|
||||
CONFIG_SLAVE_IDF_TARGET_ESP32C6=y
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user