Skip to content

Handle network_driver: Unhandled wifi event: 21. #1100

Closed
@petermm

Description

@petermm
I (1593851) wifi:bcn_timeout,ap_probe_send_start
I (1593851) network_driver: Unhandled wifi event: 21.

repeatedly.. on a C3card - most likely poor Rssi..

Solution:

Silently handle it - as there already is the wifi:bcn_timeout,ap_probe_send_start log

or

gracefully log "bcn_timeout: Potentially weak wifi signal", or better wording.

What does bcn_timeout, ap_probe_send_start mean?

The STA does not receive the Beacon frame within the specified time (6 s by default for ESP32, equals to 60 Beacon Intervals). - The reason could be:

Insufficient memory. “ESP32_WIFI_MGMT_SBUF_NUM” is not enough (there will be errors like “esf_buf: t=8, l=beacon_len, …” in the log). You can check this by typing the heap size when received a Disconnect event.
The AP did not send a beacon. This can be checked by capturing beacons from AP.
Rssi too low. When the Rssi value is too low in complex environments, the STA may not receive the beacon. This can be checked by retrieving Rssi values via esp_wifi_sta_get_ap_info.
Hardware related issues. Bad package capturing performance.
When there is a bcn_timeout, the STA will try to send Probe Request for five times. If a Probe Response is received from the AP, the connection will be kept, otherwise, the STA will send a Disconnect event and the connection will fail.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions