[Android] Trying to scan extended ADV from the Cadence example

Hi guys.


With the nRF52840 DK(PCA10056) running the Running Speed and Cadence Service (RSCS) example,
the nRF Connect app on my Galaxy S10/Android 12 was able to scan the "Bluetooth 5 Advertising Extension".

This used the RSCS example and the S132 SoftDevice from SDK 17.1.0.

However, for my custom Android app, calling startLeScan() doesn't show the nRF52 RSCS peripheral when the extended advertising was used.
If the RSCS example is changed to advertise the legacy packets (no extension), my custom Android app can scan the nRF52.

Is there a different method I need to call from Android's BluetoothAdapter?
I hope my custom app can scan nRF52's extended advertisement.

Thanks for your help!

REF URLs:
infocenter.nordicsemi.com/index.jsp

developer.nordicsemi.com/.../README.html

developer.android.com/.../BluetoothAdapter

Parents Reply
  • Thank you Simon! I didn't know this GitHub library. This is great for me.

    One question from the GitHub library sample:

    ScanSettings settings = new ScanSettings.Builder()
    				.setLegacy(false)
    				.setScanMode(ScanSettings.SCAN_MODE_LOW_LATENCY)
    				.setReportDelay(5000)
    				.setUseHardwareBatchingIfSupported(true)
    				.build();

    As Vidar has mentioned, when using the library, does this mean 

    setScanMode(ScanSettings.PHY_LE_ALL_SUPPORTED)

    is not needed?

    If ScanSettings.PHY_LE_ALL_SUPPORTED is required, how can I add both

    setScanMode(ScanSettings.PHY_LE_ALL_SUPPORTED)

    and

    setScanMode(ScanSettings.SCAN_MODE_LOW_LATENCY)
    ?

    Thanks for your help!

Children
Related