Page 1 of 1

WiFi provisioning over BLE

Posted: Tue Aug 20, 2024 1:07 pm
by tjaffey
Does ESP-AT support WiFi provisioning over BLE?

I would like to make use of the existing apps for this (e.g. https://github.com/espressif/esp-idf-pr ... ng-android)

https://docs.espressif.com/projects/esp ... oning.html

Re: WiFi provisioning over BLE

Posted: Tue Aug 20, 2024 1:40 pm
by aliarifat794
tjaffey wrote:Does ESP-AT support WiFi provisioning over BLE?
As far as I know, it does.

Re: WiFi provisioning over BLE

Posted: Thu Sep 05, 2024 8:43 am
by ESP_Sun
You can learn about BluFi Provisioning. BluFi provisioning is done through the mobile device's Bluetooth interface. Therefore, it requires the mobile device to have Bluetooth and GPS enabled, and the EspBluFi app must be downloaded.

- Android: `EspBluFi App & Source Code <https://github.com/EspressifApp/EspBlufiForAndroid>`_
- iOS: `EspBluFi App <https://apps.apple.com/cn/app/EspBlufi/id1450614082>`_
- iOS: `EspBluFi App Source Code <https://github.com/EspressifApp/EspBlufiForiOS>`_

1. Download the EspBluFi app on your mobile device.

2. Set the BluFi device name.

Command:

Code: Select all

AT+BLUFINAME="blufi_test"

Response:

Code: Select all

OK

3. Enable BluFi.

Command:

Code: Select all

AT+BLUFI=1

Response:

Code: Select all

OK

4. Create a BluFi connection and perform provisioning.

Enable Bluetooth and GPS on your mobile device, launch the EspBluFi app, find the device named ``blufi_test`` and click to enter, then click ``Connect`` to establish the connection. At this point, the ESP device should print a log similar to ``+BLUFICONN``, and the application page will also display similar information, indicating that the BluFi connection has been successfully established.

Code: Select all

       Connected <mac>
  
       Discover service and characteristics success
  
       Set notification enable complete
  
       Set mtu complete, mtu=...

At this point, click the ``Configure`` button on your mobile device, which will redirect you to the ``Configure`` page. On this page, fill in the Wi-Fi SSID and password, then click the ``OK`` button to start the provisioning process. The application page will also display similar information.

Code: Select all

       Post configure params complete
  
       Receive device status response:
       OpMode: Station
       Station connect Wi-Fi now
       Station connect Wi-Fi bssid: <mac>
       Station connect Wi-Fi ssid: <ssid>

At this point, the ESP device should output the following log

Code: Select all

       WIFI CONNECTED
       WIFI GOT IP

At this point, the ESP device's provisioning has been successfully completed.