Skip to content
This repository has been archived by the owner on Oct 5, 2023. It is now read-only.

Adjust wifi based proxies for coexistence #71

Merged
merged 8 commits into from Apr 5, 2023

Conversation

bdraco
Copy link
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
Member Author

bdraco commented Feb 22, 2023

450ms/450ms still doesn't work.

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

esp32-generic.yaml Outdated Show resolved Hide resolved
m5stack-atom-lite.yaml Outdated Show resolved Hide resolved
@bdraco
Copy link
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
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
Member Author

bdraco commented Feb 23, 2023

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

@nagyrobi
Copy link
Member

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

@bdraco
Copy link
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

@nagyrobi
Copy link
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
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
Member

That would be awesome.

esp32-generic.yaml Outdated Show resolved Hide resolved
m5stack-atom-lite.yaml Outdated Show resolved Hide resolved
@bdraco bdraco marked this pull request as ready for review March 27, 2023 19:26
esp32-generic.yaml Outdated Show resolved Hide resolved
m5stack-atom-lite.yaml Outdated Show resolved Hide resolved
m5stack-atom-lite.yaml Outdated Show resolved Hide resolved
esp32-generic.yaml Outdated Show resolved Hide resolved
@jesserockz jesserockz merged commit 6ccc74c into esphome:main Apr 5, 2023
8 checks passed
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