Welcome to the Pycom forum Forum
    • \[\[global:header.categories\]\]
    • \[\[global:header.recent\]\]
    • \[\[global:header.tags\]\]
    • \[\[global:header.popular\]\]
    • Login

    Explore Pybytes | Official Documentation | Report a Firmware Bug/Issue | GitHub

    Fipy Beta Firmware 1.20.3.b3 BLE advertisement sniffer

    Scheduled Pinned Locked Moved Comments & Feedback
    blefipybeta firmwaresnifferperformance
    4 Posts 2 Posters 51 Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • C Offline
      Clément Berges
      last edited by

      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.

      J 1 Reply Last reply Reply Quote 0
      • J Offline
        jcaron @Clément Berges
        last edited by

        @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.

        C 1 Reply Last reply Reply Quote 0
        • C Offline
          Clément Berges @jcaron
          last edited by

          @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!

          1 Reply Last reply Reply Quote 0
          • C Offline
            Clément Berges
            last edited by Clément Berges

            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.

            1 Reply Last reply Reply Quote 1

            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

            With your input, this post could be even better 💗

            Register Login
            • 1 / 1
            • First post
              Last post

            Pycom on Twitter

            Pycom