espressif / esp-idf

Espressif IoT Development Framework. Official development framework for Espressif SoCs.
Apache License 2.0
13.53k stars 7.26k forks source link

How do I know the timing device is using WiFi or BLE? (IDFGH-5571) #7294

Open Rokachy opened 3 years ago

Rokachy commented 3 years ago

Our app implements a BLE to Wi-Fi gateway. The gateway listen to BLE devices advertisements (BLE scanning) and every second reports the list of devices to system application via WiFi. We are using "Software controls WiFi/Bluetooth coexistence" (HW control coexistence didn't works for us). We are using 4.0.3 and v4.3 SDKs. How do I know how much time the device is at BLE at WiFi ? Is there is a status that can query to retrieve its state?
How I can configure the timing to optimize WiFi/BLE for my needs?

xiongweichao commented 3 years ago

Hi, @Rokachy

1. Is there is a status that can query to retrieve its state? Do you want to debug or use it in your application?

2. How I can configure the timing to optimize WiFi/BLE for my needs? The time used by WiFi/BLE is automatically configured.

Thanks

Rokachy commented 3 years ago

Hi,

  1. I want to use it in my application, this is the setup:

    I have a BLE device that sent advertisement every second Gateway (ESP32 based) report the received BLE advertisement at uart but sometimes reports missed for 2-3 sec and then resume I assume that ESP32 was on WiFi at the time reports missed but I don't know how to approve it.

  2. what do you mean for automatically? is it fixed or dynamically changed?

Yehuda

xiongweichao commented 3 years ago

Hi, @Rokachy

what do you mean for automatically? is it fixed or dynamically changed? This time is dynamically changing.

Thanks

Rokachy commented 3 years ago

Hi,

Is there is a way for app to know when it enter to wifi and when it exit from wifi (back to BT)?

Thanks, Yehuda

On Thu, Jul 29, 2021, 15:29 xiongweichao @.***> wrote:

Hi, @Rokachy https://github.com/Rokachy

what do you mean for automatically? is it fixed or dynamically changed? This time is dynamically changing.

Thanks

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/espressif/esp-idf/issues/7294#issuecomment-889076069, or unsubscribe https://github.com/notifications/unsubscribe-auth/AS7K4PPG3376QMSRKUHTJ43T2FCRBANCNFSM5AVXRBEA .

xiongweichao commented 3 years ago

Hi, @Rokachy

Sorry, ESP32 currently does not support this function, but this function may be added in the future.

Thanks

xiongweichao commented 6 months ago

Hi @Rokachy

Sorry for replying to you so late. You can get the wifi/ble status through the GPIO level. Reference documentation https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/phy.html

Thanks