espressif / esp-now

A connectionless Wi-Fi communication protocol
Apache License 2.0
486 stars 91 forks source link

Workaround for wifi_channel_set when connected to AP (AEGHB-23) #52

Closed davnec closed 1 year ago

davnec commented 1 year ago

Hi at all, I'm working on refactoring of an old firmware written with IDF<3.3 reguarding a product that is connected to wifi (STA) and communicate to other standalone device not connected to wifi

For bypass the AP dynamic channel use the function wifi_channel_set to temporarily change the channel to 1 and send the real channel to the slave (I know that it's not the best thing to do... but works)

But starting from IDF 3.3 the function usage is restricted and I cannot use It while is connected to AP.

But there is a workaround in the recent IDF to force temporarily the STA channel and send a esp-now message?

Thanks

lhespress commented 1 year ago

@davnec Please use esp_wifi_set_channel and check again.

lhespress commented 1 year ago

@davnec Closing this issue since there has been no update on this. Please feel free to reopen if required.