Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 4d118b3

Browse filesBrowse files
Minor modifications in provisioning (espressif#3919)
1 parent 2c9b648 commit 4d118b3
Copy full SHA for 4d118b3

File tree

2 files changed

+15
-20
lines changed
Filter options

2 files changed

+15
-20
lines changed

‎libraries/WiFi/examples/WiFiProv/README.md

Copy file name to clipboardExpand all lines: libraries/WiFi/examples/WiFiProv/README.md
+10-19Lines changed: 10 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ This sketch implements provisioning using various IDF components
66

77
This example allows Arduino user to choose either BLE or SOFTAP as a mode of transport, over which the provisioning related communication is to take place, between the device (to be provisioned) and the client (owner of the device).
88

9-
## API's introduced for provisioning
9+
# APIs introduced for provisioning
1010

1111
## WiFi.onEvent()
1212

13-
Using this API user can register to recieve WIFI Events and Provisioning Events
13+
Using this API user can register to receive WiFi Events and Provisioning Events
1414

1515
#### Parameters passed
1616

@@ -22,11 +22,11 @@ A function with following signature
2222
* wifi_prov_cb_event_t event;
2323
* void * event_data;
2424

25-
### WiFi.beginProvision()
25+
## WiFi.beginProvision()
2626

2727
WiFi.beginProvision(scheme prov_scheme, wifi_prov_scheme_event_handler_t scheme_event_handler, wifi_prov_security_t security, char * pop, char * service_name, char * service_key, uint8_t * uuid);
2828

29-
#### Parameters
29+
#### Parameters passed
3030

3131
* prov_scheme : choose the mode of transfer
3232
* WIFI_PROV_SCHEME_BLE - Using BLE
@@ -46,11 +46,11 @@ WiFi.beginProvision(scheme prov_scheme, wifi_prov_scheme_event_handler_t scheme_
4646
* SoftAp :
4747
- WIFI_PROV_EVENT_HANDLER_NONE
4848

49-
* pop : It is the string that is used to provide the authentication while provisioning
49+
* pop : It is the string that is used to provide the authentication.
5050

51-
* service_name : Specify service name for the device while provisioning, if it is not specified then default chosen name via SoftAP is WIFI_XXX and for BLE service it is BLE_XXX where XXX is the last 3 bytes of the MAC address.
51+
* service_name : Specify service name for the device, if it is not specified then default chosen name via SoftAP is WIFI_XXX and via BLE is BLE_XXX where XXX are the last 3 bytes of the MAC address.
5252

53-
* service_key : Specify service key while provisioning, if chosen mode of provisioning is BLE then service_key is always NULL
53+
* service_key : Specify service key, if chosen mode of provisioning is BLE then service_key is always NULL
5454

5555
* uuid : user can specify there own 128 bit UUID while provisioning using BLE, if not specified then default value taken is
5656
- { 0xb4, 0xdf, 0x5a, 0x1c, 0x3f, 0x6b, 0xf4, 0xbf,
@@ -63,24 +63,15 @@ WiFi.beginProvision(scheme prov_scheme, wifi_prov_scheme_event_handler_t scheme_
6363
* scheme_event_handler = WIFI_PROV_EVENT_HANDLER_NONE
6464
* security = WIFI_PROV_SECURITY_1
6565
* pop = "abcd1234"
66-
* service_name = "WiFi_XXX"
66+
* service_name = "WiFi_XXX"
6767
* service_key = NULL
6868
* uuid = NULL
6969

7070
# Log Output
7171
* Enable debuger : [ Tools -> Core Debug Level -> Info ]
7272

73-
# App required for provisioning
74-
75-
##Gihub link
76-
77-
* Android : (https://github.com/espressif/esp-idf-provisioning-android)
78-
* iOS : (https://github.com/espressif/esp-idf-provisioning-ios)
79-
80-
## These apps are available on playstore
81-
82-
* For SoftAP : ESP SoftAP Prov
83-
* For BLE : ESP BLE Prov
73+
# Provisioning Tools
74+
https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/provisioning/wifi_provisioning.html#provisioning-tools
8475

8576
# Example output
8677

‎libraries/WiFi/src/WiFiProv.cpp

Copy file name to clipboardExpand all lines: libraries/WiFi/src/WiFiProv.cpp
+5-1Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,11 @@ void WiFiProvClass :: beginProvision(scheme prov_scheme, wifi_prov_event_handler
151151
WiFi.mode(WIFI_MODE_STA);
152152
log_i("Aleardy Provisioned, starting Wi-Fi STA");
153153
log_i("CONNECTING ACCESS POINT CREDENTIALS : ");
154-
log_i("SSID : %s\n",WiFi.SSID().c_str());
154+
#if ARDUHAL_LOG_LEVEL >= ARDUHAL_LOG_LEVEL_INFO
155+
wifi_config_t conf;
156+
esp_wifi_get_config(WIFI_IF_STA,&conf);
157+
log_i("SSID : %s\n",conf.sta.ssid);
158+
#endif
155159
}
156160
}
157161

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.