|
|
4 anos atrás | |
|---|---|---|
| .. | ||
| components | 5 anos atrás | |
| main | 5 anos atrás | |
| CMakeLists.txt | 5 anos atrás | |
| Makefile | 5 anos atrás | |
| README.md | 5 anos atrás | |
| partitions.csv | 5 anos atrás | |
| sdkconfig.defaults | 4 anos atrás | |
| Supported Targets | ESP32 |
|---|
This example introduces how to test the basic functions of BLE Mesh data interface and TCP Server/Client Coexistence. BLE Mesh data interface is GAP scanning and advertising.
There are two working modes here:
In automatic mode, the program coordinates three development boards working through a synchronization mechanism.
In manual mode, you will work with three development boards via commands
Before running the test, you need to prepare a router and three ESP32 development boards. This Example of BLE Mesh and TCP Server/Client Coexistence has the following three items, and any of the three development boards is for running one specific item.
Note: If you want better performance in BLE and WiFi coexistence, you should use a development board with PSRAM that could run a coexistence program. Such as ESP32_LyraT, ESP32-WROVER-B and etc.
The following structure shows the parameters you need to configure. And usually, there are two methods for configuration, i.e. configuring during initialization or configuring with the command env.
coex_test_env_t test_env = {
#if defined(CONFIG_EXAMPLE_MANAUL)
.ap_ssid = CONFIG_EXAMPLE_WIFI_SSID,
.ap_password = CONFIG_EXAMPLE_WIFI_PASSWORD,
#endif
#if defined(CONFIG_EXAMPLE_COEX_ROLE)
.ap_ssid = CONFIG_EXAMPLE_WIFI_SSID,
.ap_password = CONFIG_EXAMPLE_WIFI_PASSWORD,
#endif
.test_port = "8080",
.server_ip = "192.168.3.32",
.duration = "120000",
.is_start = false,
};
Configure to Manual Mode via Example Configuration --->run mode (manual)
The meaning of the numeric argument of the command run_tc is as follows:
| id | case name | description | |:-:|:-|:-| | 0 | wifi_tcp_tx_throughput| Test the case of Wi-Fi tcp tx, which will create a tcp client that will continuously send data to the tcp server. | | 1 |wifi_tcp_rx_throughput| Test the case of Wi-Fi tcp rx, which will create a tcp server that will continuously receive data from the tcp client. | | 2 | ble_adv | Test the case of BLE advertising. | | 3 | ble_scan| Test the case of BLE Scan.|
Configure to Automatic Mode via Example Configuration --->run mode (auto)
Example Configuration --->select role (run device as coex role)Example Configuration --->select case.select role (run device as bluetooth role)select role (run device as wifi role)In theory, the performance of BLE and Wi-Fi coexistence will drop to half of the performance in BLE Only mode or Wi-Fi Only mode.
ESP32 working frequency:
ESP32 external PSRAM
ESP32 coexistence mode