This is the documentation for the latest (main) development branch. If you are looking for the documentation of previous releases, use the drop-down menu on the left and select the desired version.

Bluetooth: Wi-Fi Provision

Overview

Application demonstrating Wi-Fi provision by the BLE Peripheral role. It exposes the vendor-specific GATT services and advertisement data, the WMBleWiFi(app) can scan and connect this device. once connected, the app will send SSID and password to device and it will connect to AP with required information. Security communication is supported to protect sensitive wifi information. details see Wi-Fi Provision protocol

Requirements

  • A board with BLE support

  • WMBleWiFi tool

Building and Running

examples/bluetooth/wifi_prov

compile, burn, and more, see get-started chapter 。

Running result

I/bt_hci_core     [0.110] Identity: 28:6D:CE:01:02:03 (public)
I/bt_hci_core     [0.116] HCI: version 4.2 (0x08) revision 0x0709, manufacturer 0x070c
I/bt_hci_core     [0.126] LMP: version 4.2 (0x08) subver 0x0709
I/wifi_prov       [0.134] WiFi provision by BLE ready
I/wifi_prov       [224.184] Connected 5E:C0:7C:15:1F:10 (random)
I/wifi_prov       [224.190] wps service connected
D/wifi_prov       [225.168] Received data from: 5E:C0:7C:15:1F:10 (random)
D/wifi_prov       [225.482] Received data from: 5E:C0:7C:15:1F:10 (random)
D/HEX SSID:: 0000-000F: 54 50 2D 4C 49 4E 4B 5F  43 30 36 32                TP-LINK_C062
D/HEX PASS:: 0000-000F: 31 32 33 34 35 36 37 38  39 30                      1234567890
I/wifi_prov       [225.506] connecting to ap SSID:TP-LINK_C062 password:1234567890 (225504)
I/wifi_prov       [226.340] wifi_init_sta finished (226340).
D/wifi            [227.998] distribution event 1
D/wifi            [228.002] sta connected 64-6E-97-07-C0-62 channel 6 authmode 3
D/wifi            [231.470] distribution event 0
D/wifi            [231.474] sta got ip 192.168.1.131
I/wifi_prov       [231.478] got ip: 192.168.1.131