Fipy Beta Firmware 1.20.3.b3 BLE advertisement sniffer



  • Hi,

    I’m using a Fipy as BLE Central Device to catch advertisement frames of a peripheral device. I used the previous Beta Firmware (v1.20.3.b0). I tried the new one (v1.20.3.b3) and there is lowering in the performances.

    To give numbers, the Fipy catched around 85% of the emitted frames with the previous Beta Firmware (v1.20.3.b0) and we fall to 50% with the new one (v1.20.3.b3).

    The tests have been done with the same Software, the same board, the same emitter and in similar condition. The advertisement interval was 500ms.

    The code source being available I will rebuild the new Beta Firmware and change the code source to try to upgrade the mentioned performances.

    Do you have any ideas of what I could change in the source code to upgrade the mentioned performances?

    Best regards.



  • I have made the test with scan intervals and scan windows equal to 10 ms.

    static esp_ble_scan_params_t ble_scan_params = {
            .scan_type              = BLE_SCAN_TYPE_ACTIVE,
            .own_addr_type          = BLE_ADDR_TYPE_PUBLIC,
            .scan_filter_policy     = BLE_SCAN_FILTER_ALLOW_ALL,
            .scan_interval          = 0x10,
            .scan_window            = 0x10  
        };
    

    The results are better but still not as good as v1.20.3.b0 Beta Firmware was.

    With the new values, I raised up to 60% of advertisement frames catched. Always with the same conditions and 500 ms as advertisement interval.



  • @jcaron In the source code these value are set in esp32\mods\modbt.c

    static esp_ble_scan_params_t ble_scan_params = {
            .scan_type              = BLE_SCAN_TYPE_ACTIVE,
            .own_addr_type          = BLE_ADDR_TYPE_PUBLIC,
            .scan_filter_policy     = BLE_SCAN_FILTER_ALLOW_ALL,
            .scan_interval          = 0x50,
            .scan_window            = 0x30  
        };
    

    If I remember well this is equivalent to 50 ms and 30 ms. This initialization didn't change since last release (v1.20.2.r4).

    I will do a try with lower values and come back with the result.

    Thanks for ur answer!



  • @Clément-Berges This is a pure wild guess as I have no idea if anything has changed in that respect, but I would start by checking scan intervals and windows (https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/bluetooth/esp_gap_ble.html#_CPPv421esp_ble_scan_params_t).

    The current ESP-IDF defaults are 10 ms and 10 ms, which is probably consistent with the 50% capture rate of your advertisements with a 500 ms interval. No idea if the defaults have changed or if they were overridden somewhere and no longer are.



Pycom on Twitter