[Answered] Menu config option clarification: "Software do control of wifi/bt coexisit"

User avatar
kolban
Posts: 1683
Joined: Mon Nov 16, 2015 4:43 pm
Location: Texas, USA

[Answered] Menu config option clarification: "Software do control of wifi/bt coexisit"

Postby kolban » Sun Jan 01, 2017 11:42 pm

Howdy guys,
Am working with bluetooth and I need some help with one of the new functions.

When we "enable" BT in the "make menuconfig" options under "ESP32-specific" config, a new option appears that is described as:

"Software do control of wifi/bt coexistit"

When we ask for help on this we get:

"Software do something control of wifi/bt coexist. For some heavy traffic senario, do sotware coexist, may be better."

I'd like to understand the meaning of this ... the English is broken but that is ok ... as I fully realize that the author doesn't use English as a primary language and I couldn't even start to write a description in Chinese.

I get the feeling that this is an important option and one that needs to be clarified.
Last edited by kolban on Tue Jan 03, 2017 1:00 am, edited 1 time in total.
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32

stevem
Posts: 3
Joined: Mon Jan 02, 2017 12:08 pm

Re: Menu config option clarification: "Software do control of wifi/bt coexisit"

Postby stevem » Mon Jan 02, 2017 1:02 pm

These co-existence functions seem mysterious indeed.

In components/esp32/Kconfig we see:

Code: Select all

config SW_COEXIST_ENABLE
  bool "Software do control of wifi/bt coexisit"
  depends on ESP32_ENABLE_STACK_BT && ESP32_ENABLE_STACK_WIFI
Chasing down SW_COEXIST_ENABLE all I can find is, in function start_cpu0_default in ./components/esp32/cpu_start.c, the following:

Code: Select all

#if CONFIG_SW_COEXIST_ENABLE
    if (coex_init() == ESP_OK) {
        coexist_set_enable(true);
    }
#endif
There is header file components/esp32/include/esp_coexist.h which sheds little extra light, other than alleging the existence of function coexist_get_enable.

The functions are implemented in ./components/esp32/lib/libcoexist.a which arrives when you clone the git repo - you don't build this lib. If you look at the git log for this lib you'll find some relevant history

Cheers, HTH
Steve

ESP_Angus
Posts: 2344
Joined: Sun May 08, 2016 4:11 am

Re: Menu config option clarification: "Software do control of wifi/bt coexisit"

Postby ESP_Angus » Tue Jan 03, 2017 12:35 am

By default, coexistence is managed by hardware. Under some circumstances (such as high traffic) it may be desirable to have it managed in software, this option enables this.

It's not necessary to do any manual coexistence management, it's automatically managed in both configurations.

I'll update the KConfig description/help to clarify.

axellin
Posts: 200
Joined: Mon Sep 17, 2018 9:09 am

Re: Menu config option clarification: "Software do control of wifi/bt coexisit"

Postby axellin » Fri Nov 30, 2018 12:53 am

ESP_Angus wrote:
Tue Jan 03, 2017 12:35 am
By default, coexistence is managed by hardware. Under some circumstances (such as high traffic) it may be desirable to have it managed in software, this option enables this.
Hi Angus,
It's not clear to me about how to decide using s/w or h/w coexistence.
If the device is in high traffic or not is depended on the run-time environment,
should I use s/w coexistence or h/w coexistence?
i.e. I cannot decide if it's in high traffic or not at compile time.

Any drawback of using s/w coexistence?
And what happen if choose wrong choice. e.g. Using h/w coexistence at high traffic case?

walterjj
Posts: 1
Joined: Mon Apr 26, 2021 1:16 pm

Re: [Answered] Menu config option clarification: "Software do control of wifi/bt coexisit"

Postby walterjj » Mon Apr 26, 2021 2:19 pm

Hi fiends! April 2021, ESP-IDF version 4.3 and from 3 weeks ago I'm yet dealing with an issue which I guess is related to WiFI + BLE coexistence management.. Every works fine during hours and even days, heap free memory is stable.. disconnecting and reconnecting the AP works as expected, until wifi unexpectedly the ESP disconnects form AP and cannot connect again, giving a "AP Not Found" error on each attemp to reconnect.. Arter a reset the board connects without problems,,, Sometimes BLE advertising works yet after the problem, sometimes not.
STA configuration structure IS zero initialized as adviced in some forum topics about this issue.
So I wish understand better the coexistence mechanism and how to decide configuration
By the way: Neil: Thanyou for all of your work!
.
Best regards,
Walter

Who is online

Users browsing this forum: Bing [Bot], Majestic-12 [Bot], Sang_Huynh and 201 guests