[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
  • Yes, setLagacy(false) is needed and setting PHY_LE_ALL_SUPPORTED might be needed to find a device so the best is to set both. For scanner library PHY_LE_ALL_SUPPORTED should be set by default.

    Example:

    val settings = ScanSettings.Builder()
        .setScanMode(ScanSettings.SCAN_MODE_LOW_LATENCY)
        .setPhy(ScanSettings.PHY_LE_ALL_SUPPORTED) //not needed / set by default
        .setLegacy(false)
        .setReportDelay(500)
        .build()

    I'm going on vacation for two weeks now, so if you have any follow-up questions could you open a new ticket?

    Best regards,

    Simon

Children
Related