acquire a semaphore for the esp32 antenna (bluetooth/wifi dualmode)

删除回忆录丶 提交于 2019-11-29 10:31:15

As you saw, Bluetooth has higher priority on WIFI.

Have a look at CONFIG_SW_COEXIST_ENABLE and make sure it is enabled. You also need to configure CONFIG_SW_COEXIST_PREFERENCE to WIFI. Please see the page for additional flags that you could update depending on your application.

If you want to leave the hardware responsible for handling the co-existing devices (BL and WIFI), you can disable CONFIG_SW_COEXIST_ENABLE and reduce the scan window and increase the scan interval of the BL to leave time for WIFI to get access to the antenna. See this post for more details.

To answer your original question about a possible semaphore/mutex. I doubt there is one accessible for you to use and I would leave the API (software) handling the co-existing modules accessing the antenna. But you can always checkout what the code is doing once CONFIG_SW_COEXIST_ENABLE is set (the flag is renamed to CONFIG_ESP32_WIFI_SW_COEXIST_ENABLE). See https://github.com/espressif/esp-idf/blob/81ca1c01395f604972fbf141cfbe49764a746023/components/esp_wifi/src/phy_init.c

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!