BLE and WIFI coexistence

Jacek@dtm.pl
Posts: 11
Joined: Thu Jan 28, 2021 4:21 pm

BLE and WIFI coexistence

Postby Jacek@dtm.pl » Mon Jul 11, 2022 3:43 pm

I tried 'bleprph_wifi_coex' example. There is BLE advertising implemented and wifi pings. I changed it for BLE scanning (like in 'blecent' example) because I need to have connection with wifi and scanning BLE advertiser (my other BLE device - sensor).
Wifi is OK (pings works), but scanning is very poor.
I use ESP32-C3, so according to docummentation:
https://docs.espressif.com/projects/esp ... ce-feature
I only need to enable CONFIG_ESP32_WIFI_SW_COEXIST_ENABLE in menuconfig.
Is something that i can do for scaning improvement?
What should i set in disc_params?:

Code: Select all

disc_params.filter_duplicates = 0;

    /**
     * Perform a passive scan.  I.e., don't send follow-up scan requests to
     * each advertiser.
     */
    disc_params.passive = 1;

    /* Use defaults for the rest of the parameters. */
    disc_params.itvl = 0;
    disc_params.window =0;
    disc_params.filter_policy = 0;
    disc_params.limited = 0;

    rc = ble_gap_disc(own_addr_type, BLE_HS_FOREVER, &disc_params,
                      blecent_gap_event, NULL);
Should there be .itvl and .window set to 0's or can change it (with CONFIG_ESP32_WIFI_SW_COEXIST_ENABLE=y)?
My sensor sends one advertising frame every 10s. and on each port change. Most of advertising packets is not received.
Is there any way to calculate what is the interval and window of BLE scanning wiyh CONFIG_ESP32_WIFI_SW_COEXIST_ENABLE=y ?
Meaby my sensor should send data twice with calculated time interval? But how to calculate what this interval should be?
I'm planning to move this code (BLE scanning) to RainMaker if it start to work reliably in this modified 'bleprph_wifi_coex' example.

Who is online

Users browsing this forum: No registered users and 271 guests