Skip to content Skip to sidebar Skip to footer

Android Ble Scan Mode Setting Interval

I'm writing a small test application to assess a Bluetooth module. The app is currently scanning with the aggressive match mode and low latency scan mode. We have control of the ad

Solution 1:

They aren't documented.

You can see the source at https://android.googlesource.com/platform/packages/apps/Bluetooth/+/master/src/com/android/bluetooth/gatt/ScanManager.java if you search under "Scan params corresponding to regular scan setting". You will need to look at the history to see how the values have been changed between different Android versions.

The current values at the time of this post are the following:

/**
     * Scan params corresponding to regular scan setting
     */privatestaticfinalint SCAN_MODE_LOW_POWER_WINDOW_MS = 512;
    privatestaticfinalint SCAN_MODE_LOW_POWER_INTERVAL_MS = 5120;
    privatestaticfinalint SCAN_MODE_BALANCED_WINDOW_MS = 1024;
    privatestaticfinalint SCAN_MODE_BALANCED_INTERVAL_MS = 4096;
    privatestaticfinalint SCAN_MODE_LOW_LATENCY_WINDOW_MS = 4096;
    privatestaticfinalint SCAN_MODE_LOW_LATENCY_INTERVAL_MS = 4096;

You can also fetch the hci snoop log and see which scan parameters it tells the controller to use. Note that there parameters are just a suggestion, according to the specification. The controller may use different values depending on other concurrent radio activities.

Post a Comment for "Android Ble Scan Mode Setting Interval"