Skip to content

Adjust wifi based proxies for coexistence#71

Merged
jesserockz merged 8 commits intoesphome:mainfrom
bdraco:wifi_coexist
Apr 5, 2023
Merged

Adjust wifi based proxies for coexistence#71
jesserockz merged 8 commits intoesphome:mainfrom
bdraco:wifi_coexist

Conversation

@bdraco
Copy link
Copy Markdown
Member

@bdraco bdraco commented Feb 22, 2023

fixes #67

https://espressif-docs.readthedocs-hosted.com/projects/espressif-esp-faq/en/latest/software-framework/ble-bt.html#how-do-esp32-bluetooth-and-wi-fi-coexist

If the Bluetooth LE and Wi-Fi coexistence is required.....However, if this option is not enabled, please note that the Bluetooth LE scan window should be larger than 150 ms, and the Bluetooth LE scan interval should be less than 500 ms.

https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/coexist.html

We will use the defaults for the wifi versions leave the 1100ms for ethernet as this makes the devices stable and avoids the wifi disconnect problem.

In a future PR we may be able to enable the built-in coexistence logic in the ESP-IDF code, but that is a more involved change.

@bdraco
Copy link
Copy Markdown
Member Author

bdraco commented Feb 22, 2023

450ms/450ms still doesn't work.

Might need to be 450ms interval, 160ms window?

Comment thread esp32-generic.yaml Outdated
Comment thread m5stack-atom-lite.yaml Outdated
@bdraco
Copy link
Copy Markdown
Member Author

bdraco commented Feb 22, 2023

It may make more sense to enable the coexistence configurations instead of this.

Ideally we land on a config that works for Wi-Fi and can still operate Erik's lock as that's going to be a great test case for this.

Will come back to this after beta and release. I want to get home-assistant/core#88603 in first as well

@bdraco
Copy link
Copy Markdown
Member Author

bdraco commented Feb 23, 2023

Looks like the defaults work well for wifi devices but much more and things get a bit unstable.

home-assistant/core#87158 (comment)

Still need to collect more feedback and look into if the built in coexistence settings will improve the situation.

@bdraco
Copy link
Copy Markdown
Member Author

bdraco commented Feb 23, 2023

Some more interesting reads https://esp32.com/viewtopic.php?t=2291

@bdraco
Copy link
Copy Markdown
Member Author

bdraco commented Feb 23, 2023

@nagyrobi
Copy link
Copy Markdown
Member

@bdraco by coexistence you mean a new configurable option, or just fine-tuned numbers for existing params?

@bdraco
Copy link
Copy Markdown
Member Author

bdraco commented Feb 23, 2023

Now have reports that the defaults fix the Wi-Fi stability and active connections.

I still want to do some testing with the coexistence flags but it might be the best interim solution to make the Wi-Fi ones the defaults and use the enhanced values for Ethernet

@bdraco
Copy link
Copy Markdown
Member Author

bdraco commented Feb 23, 2023

@nagyrobi
Copy link
Copy Markdown
Member

it might be the best interim solution to make the Wi-Fi ones the defaults and use the enhanced values for Ethernet

Sounds good

@bdraco
Copy link
Copy Markdown
Member Author

bdraco commented Feb 23, 2023

@bdraco by coexistence you mean a new configurable option, or just fine-tuned numbers for existing params?

It would likely have to first be a change in the esphome code to add support for the underlying compile flags, and than a change here to enable them.

@nagyrobi
Copy link
Copy Markdown
Member

That would be awesome.

Comment thread esp32-generic.yaml Outdated
Comment thread m5stack-atom-lite.yaml Outdated
@bdraco bdraco marked this pull request as ready for review March 27, 2023 19:26
Comment thread esp32-generic.yaml
Comment thread m5stack-atom-lite.yaml
Comment thread esp32-generic.yaml Outdated
Comment thread m5stack-atom-lite.yaml Outdated
Comment thread m5stack-atom-lite.yaml Outdated
Comment thread esp32-generic.yaml Outdated
@jesserockz jesserockz merged commit 6ccc74c into esphome:main Apr 5, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Apr 30, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Too aggressive settings for bluetooth proxies with WiFi + BT support

4 participants