esp-rs / esp-idf-svc

Type-Safe Rust Wrappers for various ESP-IDF services (WiFi, Network, Httpd, Logging, etc.)
https://docs.esp-rs.org/esp-idf-svc/
Apache License 2.0
333 stars 183 forks source link

add missing wifi event WIFI_EVENT_HOME_CHANNEL_CHANGE #352

Closed 1HPorange closed 10 months ago

1HPorange commented 10 months ago

Hi,

Somehow this event was missing for me. It seems to be here, and my home WIFI setup triggers it consistently with the basic connect example, so I need this patch to get around the panic.

1HPorange commented 10 months ago

Oh, seems i need to version gate this somehow, how do you prefer that to be done?

Vollbrecht commented 10 months ago

What version of esp-idf are you using? I can't imagine that esp is currently triggering it, as you see it was added here relatively recently and this commit also touches all the proprietary wifi blobs, so it is not included in any released esp-idf version.

I mean yes your router can try force a channel switch non-stop, but that should be independent of that event.

Anyway if that lands on one of the release versions its fine to futureproof, in general we import via conditional cfg's with respect to the taged semver versions of the esp-idf. Example here if worst come to worst this way, otherwise if there is a clean point where they only have it for newer versions and dont backport it, it might just one cfg point to include it.

1HPorange commented 10 months ago

I am using a the espressif idf dev container espressif/idf:latest. The reported version is ESP-IDF v5.3-dev-1353-gb3f7e2c8a4.

I might have gone a bit too "bleeding edge" :) After reading your thoughts it's probably best to wait before including this event, which might not even land.