espressif / ESP8266_RTOS_SDK

Latest ESP8266 SDK based on FreeRTOS, esp-idf style.
http://bbs.espressif.com
Apache License 2.0
3.31k stars 1.56k forks source link

After obtaining the IP, `bcn_timeout` appears after 6s, and disconnects after 2.5s (GIT8266O-799) #1222

Open HaydnLiao opened 1 year ago

HaydnLiao commented 1 year ago

Environment

Problem Description

Expected Behavior

station example:

Stay connected after connecting to NEC Aterm WX3000HP router.

Actual Behavior

After obtaining the IP, bcn_timeout appears after 6s, and disconnects after 2.5s. ap_probe_send_over, rest wifi status to disassoc

Steps to repropduce

Just use the station to connect to the router.

I troubleshoot:

  1. It is example, no out of memory.
  2. Use Mac Book to capture packets, AP sends beacons.
  3. Not rssi problem.
  4. Not hardware problem.
  5. Use esp_wifi_set_country() change policy to WIFI_COUNTRY_POLICY_MANUAL;. It works.
  6. There is no such issue when using v3.3 SDK 2bc42667d166da3676529bf5ca6b680c649f2ff8, even if the policy is WIFI_COUNTRY_POLICY_AUTO.
  7. Had the same problem using tag v3.4. 89a3f254b63819035f65d9c5dcdae8864f1a6a8a

v3.4 19776c71e0e42cf42ecc5c2b56407f7 f8174954f192c99606491786f7eb8a3

v3.3 image

Code to reproduce this issue

D:\esp\ESP8266_RTOS_SDK\examples\wifi\getting_started\station

How to solve it:

    wifi_country_t tCountry;
    esp_wifi_get_country(&tCountry);
    ESP_LOGI(TAG, "################ country %s %d %d %d %d",  tCountry.cc, tCountry.schan, tCountry.nchan, tCountry.max_tx_power, tCountry.policy);
    // tCountry.policy = WIFI_COUNTRY_POLICY_AUTO;
    tCountry.policy = WIFI_COUNTRY_POLICY_MANUAL;
    esp_wifi_set_country(&tCountry);
    ESP_LOGI(TAG, "################ country %s %d %d %d %d",  tCountry.cc, tCountry.schan, tCountry.nchan, tCountry.max_tx_power, tCountry.policy);

image

HaydnLiao commented 1 year ago

Any update?

HaydnLiao commented 1 year ago

Any update?

HaydnLiao commented 1 year ago

Any update?