Page 1 of 1

Getting REASON_ASSOC_LEAVE on Non os sdk v3.0.4

PostPosted: Mon Jan 25, 2021 6:18 pm
by maverickchongo

I have just migrated to the latest non-os-sdk (v3.0.4) and I am experiencing an issue that didn't have before, a minute or so after the ESP (configured in STA mode) gets connected to the AP it disconnects from it with reason 8 (REASON_ASSOC_LEAVE).

After that it never reconnects (even though I have set wifi_station_set_reconnect_policy(true)) again unless it is rebooted.

If I flash the ESP again using sdk version 2.18 all works fine, I have also tried a couple of different WiFi APs and I get same behaviour.

Has any of you experienced this, or might you know what the issue is?

Any help is much appreciated!

Re: Getting REASON_ASSOC_LEAVE on Non os sdk v3.0.4

PostPosted: Wed Jan 27, 2021 6:28 am
by maverickchongo
I found the issue, it was partly my mistake. The scan was failing to find the current AP and after doing that 5 reties we were disconnecting from the AP. I solved the problem by setting the time per channel variable (passive - which wasn't present in the previous sdk)

Code: Select all/** @brief Aggregate of active & passive scan time per channel */
typedef union {
    wifi_active_scan_time_t active;  /**< active scan time per channel, units: millisecond. */
    uint32_t passive;                /**< passive scan time per channel, units: millisecond, values above 1500ms may
                                          cause station to disconnect from AP and are not recommended. */
} wifi_scan_time_t;