Skip to content

Commit 19dc26f

Browse files
committed
Merge branch 'bugfix/fix_writing_errors_v3.3' into 'release/v3.3'
fix(wifi): fix writing errors(backport v3.3) See merge request sdk/ESP8266_RTOS_SDK!1409
2 parents c47938e + d48e117 commit 19dc26f

File tree

44 files changed

+43
-46
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+43
-46
lines changed

components/esp8266/include/esp_wifi.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,6 @@ extern "C" {
9090

9191
#define ESP_WIFI_PARAM_USE_NVS 0
9292

93-
#define WIFI_PROTOCAL_11B 1
94-
#define WIFI_PROTOCAL_11G 2
95-
#define WIFI_PROTOCAL_11N 4
9693
/**
9794
* @brief WiFi stack configuration parameters passed to esp_wifi_init call.
9895
*/

components/mqtt/esp-mqtt/examples/emitter-client/main/app_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ static esp_err_t wifi_event_handler(void *ctx, system_event_t *event)
4444
ESP_LOGE(TAG, "Disconnect reason : %d", info->disconnected.reason);
4545
if (info->disconnected.reason == WIFI_REASON_BASIC_RATE_NOT_SUPPORT) {
4646
/*Switch to 802.11 bgn mode */
47-
esp_wifi_set_protocol(ESP_IF_WIFI_STA, WIFI_PROTOCAL_11B | WIFI_PROTOCAL_11G | WIFI_PROTOCAL_11N);
47+
esp_wifi_set_protocol(ESP_IF_WIFI_STA, WIFI_PROTOCOL_11B | WIFI_PROTOCOL_11G | WIFI_PROTOCOL_11N);
4848
}
4949
esp_wifi_connect();
5050
xEventGroupClearBits(wifi_event_group, CONNECTED_BIT);

examples/common_components/protocol_examples_common/connect.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ static esp_err_t event_handler(void *ctx, system_event_t *event)
6666
ESP_LOGE(TAG, "Disconnect reason : %d", info->disconnected.reason);
6767
if (info->disconnected.reason == WIFI_REASON_BASIC_RATE_NOT_SUPPORT) {
6868
/*Switch to 802.11 bgn mode */
69-
esp_wifi_set_protocol(ESP_IF_WIFI_STA, WIFI_PROTOCAL_11B | WIFI_PROTOCAL_11G | WIFI_PROTOCAL_11N);
69+
esp_wifi_set_protocol(ESP_IF_WIFI_STA, WIFI_PROTOCOL_11B | WIFI_PROTOCOL_11G | WIFI_PROTOCOL_11N);
7070
}
7171
esp_wifi_connect();
7272
xEventGroupClearBits(s_connect_event_group, GOT_IPV4_BIT);

examples/protocols/aws_iot/subscribe_publish/main/subscribe_publish_sample.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ static esp_err_t event_handler(void *ctx, system_event_t *event)
127127
ESP_LOGE(TAG, "Disconnect reason : %d", info->disconnected.reason);
128128
if (info->disconnected.reason == WIFI_REASON_BASIC_RATE_NOT_SUPPORT) {
129129
/*Switch to 802.11 bgn mode */
130-
esp_wifi_set_protocol(ESP_IF_WIFI_STA, WIFI_PROTOCAL_11B | WIFI_PROTOCAL_11G | WIFI_PROTOCAL_11N);
130+
esp_wifi_set_protocol(ESP_IF_WIFI_STA, WIFI_PROTOCOL_11B | WIFI_PROTOCOL_11G | WIFI_PROTOCOL_11N);
131131
}
132132
esp_wifi_connect();
133133
xEventGroupClearBits(wifi_event_group, CONNECTED_BIT);

examples/protocols/aws_iot/thing_shadow/main/thing_shadow_sample.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ static esp_err_t event_handler(void *ctx, system_event_t *event)
144144
ESP_LOGE(TAG, "Disconnect reason : %d", info->disconnected.reason);
145145
if (info->disconnected.reason == WIFI_REASON_BASIC_RATE_NOT_SUPPORT) {
146146
/*Switch to 802.11 bgn mode */
147-
esp_wifi_set_protocol(ESP_IF_WIFI_STA, WIFI_PROTOCAL_11B | WIFI_PROTOCAL_11G | WIFI_PROTOCAL_11N);
147+
esp_wifi_set_protocol(ESP_IF_WIFI_STA, WIFI_PROTOCOL_11B | WIFI_PROTOCOL_11G | WIFI_PROTOCOL_11N);
148148
}
149149
esp_wifi_connect();
150150
xEventGroupClearBits(wifi_event_group, CONNECTED_BIT);

examples/protocols/coap_client/main/coap_client_example_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ static esp_err_t wifi_event_handler(void *ctx, system_event_t *event)
173173
ESP_LOGE(TAG, "Disconnect reason : %d", info->disconnected.reason);
174174
if (info->disconnected.reason == WIFI_REASON_BASIC_RATE_NOT_SUPPORT) {
175175
/*Switch to 802.11 bgn mode */
176-
esp_wifi_set_protocol(ESP_IF_WIFI_STA, WIFI_PROTOCAL_11B | WIFI_PROTOCAL_11G | WIFI_PROTOCAL_11N);
176+
esp_wifi_set_protocol(ESP_IF_WIFI_STA, WIFI_PROTOCOL_11B | WIFI_PROTOCOL_11G | WIFI_PROTOCOL_11N);
177177
}
178178
esp_wifi_connect();
179179
xEventGroupClearBits(wifi_event_group, CONNECTED_BIT);

examples/protocols/coap_server/main/coap_server_example_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ static esp_err_t wifi_event_handler(void *ctx, system_event_t *event)
159159
ESP_LOGE(TAG, "Disconnect reason : %d", info->disconnected.reason);
160160
if (info->disconnected.reason == WIFI_REASON_BASIC_RATE_NOT_SUPPORT) {
161161
/*Switch to 802.11 bgn mode */
162-
esp_wifi_set_protocol(ESP_IF_WIFI_STA, WIFI_PROTOCAL_11B | WIFI_PROTOCAL_11G | WIFI_PROTOCAL_11N);
162+
esp_wifi_set_protocol(ESP_IF_WIFI_STA, WIFI_PROTOCOL_11B | WIFI_PROTOCOL_11G | WIFI_PROTOCOL_11N);
163163
}
164164
esp_wifi_connect();
165165
xEventGroupClearBits(wifi_event_group, CONNECTED_BIT);

examples/protocols/esp-mqtt/ssl/main/app_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ static esp_err_t wifi_event_handler(void *ctx, system_event_t *event)
4444
ESP_LOGE(TAG, "Disconnect reason : %d", info->disconnected.reason);
4545
if (info->disconnected.reason == WIFI_REASON_BASIC_RATE_NOT_SUPPORT) {
4646
/*Switch to 802.11 bgn mode */
47-
esp_wifi_set_protocol(ESP_IF_WIFI_STA, WIFI_PROTOCAL_11B | WIFI_PROTOCAL_11G | WIFI_PROTOCAL_11N);
47+
esp_wifi_set_protocol(ESP_IF_WIFI_STA, WIFI_PROTOCOL_11B | WIFI_PROTOCOL_11G | WIFI_PROTOCOL_11N);
4848
}
4949
esp_wifi_connect();
5050
xEventGroupClearBits(wifi_event_group, CONNECTED_BIT);

examples/protocols/esp-mqtt/ssl_mutual_auth/main/app_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ static esp_err_t wifi_event_handler(void *ctx, system_event_t *event)
4444
ESP_LOGE(TAG, "Disconnect reason : %d", info->disconnected.reason);
4545
if (info->disconnected.reason == WIFI_REASON_BASIC_RATE_NOT_SUPPORT) {
4646
/*Switch to 802.11 bgn mode */
47-
esp_wifi_set_protocol(ESP_IF_WIFI_STA, WIFI_PROTOCAL_11B | WIFI_PROTOCAL_11G | WIFI_PROTOCAL_11N);
47+
esp_wifi_set_protocol(ESP_IF_WIFI_STA, WIFI_PROTOCOL_11B | WIFI_PROTOCOL_11G | WIFI_PROTOCOL_11N);
4848
}
4949
esp_wifi_connect();
5050
xEventGroupClearBits(wifi_event_group, CONNECTED_BIT);

examples/protocols/esp-mqtt/tcp/main/app_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ static esp_err_t wifi_event_handler(void *ctx, system_event_t *event)
9090
ESP_LOGE(TAG, "Disconnect reason : %d", info->disconnected.reason);
9191
if (info->disconnected.reason == WIFI_REASON_BASIC_RATE_NOT_SUPPORT) {
9292
/*Switch to 802.11 bgn mode */
93-
esp_wifi_set_protocol(ESP_IF_WIFI_STA, WIFI_PROTOCAL_11B | WIFI_PROTOCAL_11G | WIFI_PROTOCAL_11N);
93+
esp_wifi_set_protocol(ESP_IF_WIFI_STA, WIFI_PROTOCOL_11B | WIFI_PROTOCOL_11G | WIFI_PROTOCOL_11N);
9494
}
9595
esp_wifi_connect();
9696
xEventGroupClearBits(wifi_event_group, CONNECTED_BIT);

examples/protocols/esp-mqtt/ws/main/app_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ static esp_err_t wifi_event_handler(void *ctx, system_event_t *event)
8787
ESP_LOGE(TAG, "Disconnect reason : %d", info->disconnected.reason);
8888
if (info->disconnected.reason == WIFI_REASON_BASIC_RATE_NOT_SUPPORT) {
8989
/*Switch to 802.11 bgn mode */
90-
esp_wifi_set_protocol(ESP_IF_WIFI_STA, WIFI_PROTOCAL_11B | WIFI_PROTOCAL_11G | WIFI_PROTOCAL_11N);
90+
esp_wifi_set_protocol(ESP_IF_WIFI_STA, WIFI_PROTOCOL_11B | WIFI_PROTOCOL_11G | WIFI_PROTOCOL_11N);
9191
}
9292
esp_wifi_connect();
9393
xEventGroupClearBits(wifi_event_group, CONNECTED_BIT);

examples/protocols/esp-mqtt/wss/main/app_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ static esp_err_t wifi_event_handler(void *ctx, system_event_t *event)
4444
ESP_LOGE(TAG, "Disconnect reason : %d", info->disconnected.reason);
4545
if (info->disconnected.reason == WIFI_REASON_BASIC_RATE_NOT_SUPPORT) {
4646
/*Switch to 802.11 bgn mode */
47-
esp_wifi_set_protocol(ESP_IF_WIFI_STA, WIFI_PROTOCAL_11B | WIFI_PROTOCAL_11G | WIFI_PROTOCAL_11N);
47+
esp_wifi_set_protocol(ESP_IF_WIFI_STA, WIFI_PROTOCOL_11B | WIFI_PROTOCOL_11G | WIFI_PROTOCOL_11N);
4848
}
4949
esp_wifi_connect();
5050
xEventGroupClearBits(wifi_event_group, CONNECTED_BIT);

examples/protocols/esp_http_client/main/app_wifi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ static esp_err_t event_handler(void *ctx, system_event_t *event)
4343
ESP_LOGE(TAG, "Disconnect reason : %d", info->disconnected.reason);
4444
if (info->disconnected.reason == WIFI_REASON_BASIC_RATE_NOT_SUPPORT) {
4545
/*Switch to 802.11 bgn mode */
46-
esp_wifi_set_protocol(ESP_IF_WIFI_STA, WIFI_PROTOCAL_11B | WIFI_PROTOCAL_11G | WIFI_PROTOCAL_11N);
46+
esp_wifi_set_protocol(ESP_IF_WIFI_STA, WIFI_PROTOCOL_11B | WIFI_PROTOCOL_11G | WIFI_PROTOCOL_11N);
4747
}
4848
esp_wifi_connect();
4949
xEventGroupClearBits(wifi_event_group, CONNECTED_BIT);

examples/protocols/http_request/main/http_request_example_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ static esp_err_t event_handler(void *ctx, system_event_t *event)
6767
ESP_LOGE(TAG, "Disconnect reason : %d", info->disconnected.reason);
6868
if (info->disconnected.reason == WIFI_REASON_BASIC_RATE_NOT_SUPPORT) {
6969
/*Switch to 802.11 bgn mode */
70-
esp_wifi_set_protocol(ESP_IF_WIFI_STA, WIFI_PROTOCAL_11B | WIFI_PROTOCAL_11G | WIFI_PROTOCAL_11N);
70+
esp_wifi_set_protocol(ESP_IF_WIFI_STA, WIFI_PROTOCOL_11B | WIFI_PROTOCOL_11G | WIFI_PROTOCOL_11N);
7171
}
7272
esp_wifi_connect();
7373
xEventGroupClearBits(wifi_event_group, CONNECTED_BIT);

examples/protocols/http_server/advanced_tests/main/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ static esp_err_t event_handler(void *ctx, system_event_t *event)
4444
ESP_LOGE(TAG, "Disconnect reason : %d", info->disconnected.reason);
4545
if (info->disconnected.reason == WIFI_REASON_BASIC_RATE_NOT_SUPPORT) {
4646
/*Switch to 802.11 bgn mode */
47-
esp_wifi_set_protocol(ESP_IF_WIFI_STA, WIFI_PROTOCAL_11B | WIFI_PROTOCAL_11G | WIFI_PROTOCAL_11N);
47+
esp_wifi_set_protocol(ESP_IF_WIFI_STA, WIFI_PROTOCOL_11B | WIFI_PROTOCOL_11G | WIFI_PROTOCOL_11N);
4848
}
4949
ESP_ERROR_CHECK(esp_wifi_connect());
5050

examples/protocols/http_server/persistent_sockets/main/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ static esp_err_t event_handler(void *ctx, system_event_t *event)
216216
ESP_LOGE(TAG, "Disconnect reason : %d", info->disconnected.reason);
217217
if (info->disconnected.reason == WIFI_REASON_BASIC_RATE_NOT_SUPPORT) {
218218
/*Switch to 802.11 bgn mode */
219-
esp_wifi_set_protocol(ESP_IF_WIFI_STA, WIFI_PROTOCAL_11B | WIFI_PROTOCAL_11G | WIFI_PROTOCAL_11N);
219+
esp_wifi_set_protocol(ESP_IF_WIFI_STA, WIFI_PROTOCOL_11B | WIFI_PROTOCOL_11G | WIFI_PROTOCOL_11N);
220220
}
221221
ESP_ERROR_CHECK(esp_wifi_connect());
222222

examples/protocols/http_server/simple/main/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ static esp_err_t event_handler(void *ctx, system_event_t *event)
243243
ESP_LOGE(TAG, "Disconnect reason : %d", info->disconnected.reason);
244244
if (info->disconnected.reason == WIFI_REASON_BASIC_RATE_NOT_SUPPORT) {
245245
/*Switch to 802.11 bgn mode */
246-
esp_wifi_set_protocol(ESP_IF_WIFI_STA, WIFI_PROTOCAL_11B | WIFI_PROTOCAL_11G | WIFI_PROTOCAL_11N);
246+
esp_wifi_set_protocol(ESP_IF_WIFI_STA, WIFI_PROTOCOL_11B | WIFI_PROTOCOL_11G | WIFI_PROTOCOL_11N);
247247
}
248248
ESP_ERROR_CHECK(esp_wifi_connect());
249249

examples/protocols/https_mbedtls/main/https_mbedtls_example_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ static esp_err_t event_handler(void *ctx, system_event_t *event)
104104
ESP_LOGE(TAG, "Disconnect reason : %d", info->disconnected.reason);
105105
if (info->disconnected.reason == WIFI_REASON_BASIC_RATE_NOT_SUPPORT) {
106106
/*Switch to 802.11 bgn mode */
107-
esp_wifi_set_protocol(ESP_IF_WIFI_STA, WIFI_PROTOCAL_11B | WIFI_PROTOCAL_11G | WIFI_PROTOCAL_11N);
107+
esp_wifi_set_protocol(ESP_IF_WIFI_STA, WIFI_PROTOCOL_11B | WIFI_PROTOCOL_11G | WIFI_PROTOCOL_11N);
108108
}
109109
esp_wifi_connect();
110110
xEventGroupClearBits(wifi_event_group, CONNECTED_BIT);

examples/protocols/https_request/main/https_request_example_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ static esp_err_t event_handler(void *ctx, system_event_t *event)
9898
ESP_LOGE(TAG, "Disconnect reason : %d", info->disconnected.reason);
9999
if (info->disconnected.reason == WIFI_REASON_BASIC_RATE_NOT_SUPPORT) {
100100
/*Switch to 802.11 bgn mode */
101-
esp_wifi_set_protocol(ESP_IF_WIFI_STA, WIFI_PROTOCAL_11B | WIFI_PROTOCAL_11G | WIFI_PROTOCAL_11N);
101+
esp_wifi_set_protocol(ESP_IF_WIFI_STA, WIFI_PROTOCOL_11B | WIFI_PROTOCOL_11G | WIFI_PROTOCOL_11N);
102102
}
103103
esp_wifi_connect();
104104
xEventGroupClearBits(wifi_event_group, CONNECTED_BIT);

examples/protocols/ibm-mqtt/main/MQTTEcho.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ static esp_err_t event_handler(void *ctx, system_event_t *event)
6262
ESP_LOGE(TAG, "Disconnect reason : %d", info->disconnected.reason);
6363
if (info->disconnected.reason == WIFI_REASON_BASIC_RATE_NOT_SUPPORT) {
6464
/*Switch to 802.11 bgn mode */
65-
esp_wifi_set_protocol(ESP_IF_WIFI_STA, WIFI_PROTOCAL_11B | WIFI_PROTOCAL_11G | WIFI_PROTOCAL_11N);
65+
esp_wifi_set_protocol(ESP_IF_WIFI_STA, WIFI_PROTOCOL_11B | WIFI_PROTOCOL_11G | WIFI_PROTOCOL_11N);
6666
}
6767
esp_wifi_connect();
6868
xEventGroupClearBits(wifi_event_group, CONNECTED_BIT);

examples/protocols/mdns/main/mdns_example_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ static esp_err_t event_handler(void *ctx, system_event_t *event)
7070
ESP_LOGE(TAG, "Disconnect reason : %d", info->disconnected.reason);
7171
if (info->disconnected.reason == WIFI_REASON_BASIC_RATE_NOT_SUPPORT) {
7272
/*Switch to 802.11 bgn mode */
73-
esp_wifi_set_protocol(ESP_IF_WIFI_STA, WIFI_PROTOCAL_11B | WIFI_PROTOCAL_11G | WIFI_PROTOCAL_11N);
73+
esp_wifi_set_protocol(ESP_IF_WIFI_STA, WIFI_PROTOCOL_11B | WIFI_PROTOCOL_11G | WIFI_PROTOCOL_11N);
7474
}
7575
esp_wifi_connect();
7676
}

examples/protocols/openssl_client/main/openssl_client_example_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ static esp_err_t event_handler(void *ctx, system_event_t *event)
8989
ESP_LOGE(TAG, "Disconnect reason : %d", info->disconnected.reason);
9090
if (info->disconnected.reason == WIFI_REASON_BASIC_RATE_NOT_SUPPORT) {
9191
/*Switch to 802.11 bgn mode */
92-
esp_wifi_set_protocol(ESP_IF_WIFI_STA, WIFI_PROTOCAL_11B | WIFI_PROTOCAL_11G | WIFI_PROTOCAL_11N);
92+
esp_wifi_set_protocol(ESP_IF_WIFI_STA, WIFI_PROTOCOL_11B | WIFI_PROTOCOL_11G | WIFI_PROTOCOL_11N);
9393
}
9494
esp_wifi_connect();
9595
xEventGroupClearBits(wifi_event_group, CONNECTED_BIT);

examples/protocols/openssl_demo/main/openssl_demo_example_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ static esp_err_t event_handler(void *ctx, system_event_t *event)
7676
ESP_LOGE(TAG, "Disconnect reason : %d", info->disconnected.reason);
7777
if (info->disconnected.reason == WIFI_REASON_BASIC_RATE_NOT_SUPPORT) {
7878
/*Switch to 802.11 bgn mode */
79-
esp_wifi_set_protocol(ESP_IF_WIFI_STA, WIFI_PROTOCAL_11B | WIFI_PROTOCAL_11G | WIFI_PROTOCAL_11N);
79+
esp_wifi_set_protocol(ESP_IF_WIFI_STA, WIFI_PROTOCOL_11B | WIFI_PROTOCOL_11G | WIFI_PROTOCOL_11N);
8080
}
8181
esp_wifi_connect();
8282
xEventGroupClearBits(wifi_event_group, CONNECTED_BIT);

examples/protocols/openssl_server/main/openssl_server_example_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ static esp_err_t event_handler(void *ctx, system_event_t *event)
8989
ESP_LOGE(TAG, "Disconnect reason : %d", info->disconnected.reason);
9090
if (info->disconnected.reason == WIFI_REASON_BASIC_RATE_NOT_SUPPORT) {
9191
/*Switch to 802.11 bgn mode */
92-
esp_wifi_set_protocol(ESP_IF_WIFI_STA, WIFI_PROTOCAL_11B | WIFI_PROTOCAL_11G | WIFI_PROTOCAL_11N);
92+
esp_wifi_set_protocol(ESP_IF_WIFI_STA, WIFI_PROTOCOL_11B | WIFI_PROTOCOL_11G | WIFI_PROTOCOL_11N);
9393
}
9494
esp_wifi_connect();
9595
xEventGroupClearBits(wifi_event_group, CONNECTED_BIT);

examples/protocols/sntp/main/sntp_example_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ static esp_err_t event_handler(void *ctx, system_event_t *event)
8888
ESP_LOGE(TAG, "Disconnect reason : %d", info->disconnected.reason);
8989
if (info->disconnected.reason == WIFI_REASON_BASIC_RATE_NOT_SUPPORT) {
9090
/*Switch to 802.11 bgn mode */
91-
esp_wifi_set_protocol(ESP_IF_WIFI_STA, WIFI_PROTOCAL_11B | WIFI_PROTOCAL_11G | WIFI_PROTOCAL_11N);
91+
esp_wifi_set_protocol(ESP_IF_WIFI_STA, WIFI_PROTOCOL_11B | WIFI_PROTOCOL_11G | WIFI_PROTOCOL_11N);
9292
}
9393
esp_wifi_connect();
9494
xEventGroupClearBits(wifi_event_group, CONNECTED_BIT);

examples/protocols/sockets/tcp_client/main/tcp_client.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ static esp_err_t event_handler(void *ctx, system_event_t *event)
7474
ESP_LOGE(TAG, "Disconnect reason : %d", info->disconnected.reason);
7575
if (info->disconnected.reason == WIFI_REASON_BASIC_RATE_NOT_SUPPORT) {
7676
/*Switch to 802.11 bgn mode */
77-
esp_wifi_set_protocol(ESP_IF_WIFI_STA, WIFI_PROTOCAL_11B | WIFI_PROTOCAL_11G | WIFI_PROTOCAL_11N);
77+
esp_wifi_set_protocol(ESP_IF_WIFI_STA, WIFI_PROTOCOL_11B | WIFI_PROTOCOL_11G | WIFI_PROTOCOL_11N);
7878
}
7979
esp_wifi_connect();
8080
xEventGroupClearBits(wifi_event_group, IPV4_GOTIP_BIT);

examples/protocols/sockets/tcp_server/main/tcp_server.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ static esp_err_t event_handler(void *ctx, system_event_t *event)
6767
ESP_LOGE(TAG, "Disconnect reason : %d", info->disconnected.reason);
6868
if (info->disconnected.reason == WIFI_REASON_BASIC_RATE_NOT_SUPPORT) {
6969
/*Switch to 802.11 bgn mode */
70-
esp_wifi_set_protocol(ESP_IF_WIFI_STA, WIFI_PROTOCAL_11B | WIFI_PROTOCAL_11G | WIFI_PROTOCAL_11N);
70+
esp_wifi_set_protocol(ESP_IF_WIFI_STA, WIFI_PROTOCOL_11B | WIFI_PROTOCOL_11G | WIFI_PROTOCOL_11N);
7171
}
7272
esp_wifi_connect();
7373
xEventGroupClearBits(wifi_event_group, IPV4_GOTIP_BIT);

examples/protocols/sockets/udp_client/main/udp_client.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ static esp_err_t event_handler(void *ctx, system_event_t *event)
7474
ESP_LOGE(TAG, "Disconnect reason : %d", info->disconnected.reason);
7575
if (info->disconnected.reason == WIFI_REASON_BASIC_RATE_NOT_SUPPORT) {
7676
/*Switch to 802.11 bgn mode */
77-
esp_wifi_set_protocol(ESP_IF_WIFI_STA, WIFI_PROTOCAL_11B | WIFI_PROTOCAL_11G | WIFI_PROTOCAL_11N);
77+
esp_wifi_set_protocol(ESP_IF_WIFI_STA, WIFI_PROTOCOL_11B | WIFI_PROTOCOL_11G | WIFI_PROTOCOL_11N);
7878
}
7979
esp_wifi_connect();
8080
xEventGroupClearBits(wifi_event_group, IPV4_GOTIP_BIT);

examples/protocols/sockets/udp_multicast/main/udp_multicast_example_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ static esp_err_t event_handler(void *ctx, system_event_t *event)
7979
ESP_LOGE(TAG, "Disconnect reason : %d", info->disconnected.reason);
8080
if (info->disconnected.reason == WIFI_REASON_BASIC_RATE_NOT_SUPPORT) {
8181
/*Switch to 802.11 bgn mode */
82-
esp_wifi_set_protocol(ESP_IF_WIFI_STA, WIFI_PROTOCAL_11B | WIFI_PROTOCAL_11G | WIFI_PROTOCAL_11N);
82+
esp_wifi_set_protocol(ESP_IF_WIFI_STA, WIFI_PROTOCOL_11B | WIFI_PROTOCOL_11G | WIFI_PROTOCOL_11N);
8383
}
8484
esp_wifi_connect();
8585
xEventGroupClearBits(wifi_event_group, IPV4_GOTIP_BIT);

examples/protocols/sockets/udp_server/main/udp_server.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ static esp_err_t event_handler(void *ctx, system_event_t *event)
6767
ESP_LOGE(TAG, "Disconnect reason : %d", info->disconnected.reason);
6868
if (info->disconnected.reason == WIFI_REASON_BASIC_RATE_NOT_SUPPORT) {
6969
/*Switch to 802.11 bgn mode */
70-
esp_wifi_set_protocol(ESP_IF_WIFI_STA, WIFI_PROTOCAL_11B | WIFI_PROTOCAL_11G | WIFI_PROTOCAL_11N);
70+
esp_wifi_set_protocol(ESP_IF_WIFI_STA, WIFI_PROTOCOL_11B | WIFI_PROTOCOL_11G | WIFI_PROTOCOL_11N);
7171
}
7272
esp_wifi_connect();
7373
xEventGroupClearBits(wifi_event_group, IPV4_GOTIP_BIT);

examples/provisioning/custom_config/main/app_prov.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ esp_err_t app_prov_event_handler(void *ctx, system_event_t *event)
217217
g_prov->wifi_state = WIFI_PROV_STA_CONNECTING;
218218
if (info->disconnected.reason == WIFI_REASON_BASIC_RATE_NOT_SUPPORT) {
219219
/*Switch to 802.11 bgn mode */
220-
esp_wifi_set_protocol(ESP_IF_WIFI_STA, WIFI_PROTOCAL_11B | WIFI_PROTOCAL_11G | WIFI_PROTOCAL_11N);
220+
esp_wifi_set_protocol(ESP_IF_WIFI_STA, WIFI_PROTOCOL_11B | WIFI_PROTOCOL_11G | WIFI_PROTOCOL_11N);
221221
}
222222
esp_wifi_connect();
223223
}

examples/provisioning/softap_prov/main/app_prov.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ esp_err_t app_prov_event_handler(void *ctx, system_event_t *event)
200200
default:
201201
if (info->disconnected.reason == WIFI_REASON_BASIC_RATE_NOT_SUPPORT) {
202202
/*Switch to 802.11 bgn mode */
203-
esp_wifi_set_protocol(ESP_IF_WIFI_STA, WIFI_PROTOCAL_11B | WIFI_PROTOCAL_11G | WIFI_PROTOCAL_11N);
203+
esp_wifi_set_protocol(ESP_IF_WIFI_STA, WIFI_PROTOCOL_11B | WIFI_PROTOCOL_11G | WIFI_PROTOCOL_11N);
204204
}
205205
/* If none of the expected reasons,
206206
* retry connecting to host SSID */

examples/system/console/main/cmd_wifi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ static esp_err_t event_handler(void *ctx, system_event_t *event)
3636
ESP_LOGI(__func__, "Disconnect reason : %d", info->disconnected.reason);
3737
if (info->disconnected.reason == WIFI_REASON_BASIC_RATE_NOT_SUPPORT) {
3838
/*Switch to 802.11 bgn mode */
39-
esp_wifi_set_protocol(ESP_IF_WIFI_STA, WIFI_PROTOCAL_11B | WIFI_PROTOCAL_11G | WIFI_PROTOCAL_11N);
39+
esp_wifi_set_protocol(ESP_IF_WIFI_STA, WIFI_PROTOCOL_11B | WIFI_PROTOCOL_11G | WIFI_PROTOCOL_11N);
4040
}
4141
esp_wifi_connect();
4242
xEventGroupClearBits(wifi_event_group, CONNECTED_BIT);

0 commit comments

Comments
 (0)