You can chat about native SDK questions and issues here.

User avatar
By maverickchongo
#90327 Hi,

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!
User avatar
By maverickchongo
#90341 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;