esp-idf/examples/bluetooth/nimble/bleprph_wifi_coex
Nachiket Kukade 7ed8fdac59 esp_wifi: Always connect Station in PMF mode if possible
While using esp_wifi_set_config, flag pmf_capable defaults to 0.
Users may not bother to enable it, which prevents connection to a
WPA3 AP. Or the AP may reset into WPA3 mode failing the re-connection.
To ensure better security, deprecate the pmf_capable flag and set it to
true internally.
2022-02-21 11:31:56 +05:30
..
main esp_wifi: Always connect Station in PMF mode if possible 2022-02-21 11:31:56 +05:30
CMakeLists.txt NimBLE: example running BLE prph & ICMP echo reply simultaneously. 2020-12-07 11:29:49 +05:30
README.md docs: Rebase and typos fixed for the bluetooth README files 2021-11-16 16:56:47 +08:00
sdkconfig.defaults NimBLE: example running BLE prph & ICMP echo reply simultaneously. 2020-12-07 11:29:49 +05:30

Supported Targets ESP32

BLE Peripheral with ICMP Echo-Reply

(See the README.md file in the upper level 'examples' directory for more information about examples.)

This example aims to run ping network utility along with BLE GATT server simultaneously using NimBLE host stack. It is a combination of 2 examples in IDF: bluetooth/nimble/bleprph and protocols/icmp_echo. See the README.md files of these examples to know more about them.

BLE peripheral

This example creates GATT server and then starts advertising, waiting to be connected to a GATT client.

It uses ESP32's Bluetooth controller and NimBLE stack based BLE host.

ICMP Echo-Reply

Ping is a useful network utility used to test if a remote host is reachable on the IP network. It measures the round-trip time for messages sent from the source host to a destination target that are echoed back to the source.

Ping operates by sending Internet Control Message Protocol (ICMP) echo request packets to the target host and waiting for an ICMP echo reply.

Notes: Currently this example only supports IPv4.

How to Use Example

Before project configuration and build, be sure to set the correct chip target using:

idf.py set-target <chip_name>

Configure the project

Open the project configuration menu:

idf.py menuconfig

In the Example Configuration menu:

  • Enter SSID and password of known Wi-Fi AP with connectivity to internet.

  • Enter desired ping IP Address. Default is set to 93.184.216.34 ( This is the IP address of https://example.com ).

  • Enter other related parameters like count of ping and maximum numbers of retry.

Testing

To test this demo, any BLE scanner app and a WiFi access point with internet connectivity can be used.

Build and Flash

Run idf.py -p PORT flash monitor to build, flash and monitor the project.

(To exit the serial monitor, type Ctrl-].)

See the Getting Started Guide for full steps to configure and use ESP-IDF to build projects.

Troubleshooting

For any technical queries, please open an issue on GitHub. We will get back to you soon.