nRF52840 – Android Kotlin application : Problem with 16-bit UUIDs

  android, bluetooth-lowenergy, kotlin, nrf52, uuid

I’m developing a frame exchange sequence between an nRF52840 and an Android smartphone using the BLE protocol.

The service exposed by nRF52840 has the following 16-bit UUID : EB7A

In my Android application, if I only want to retrieve BLE devices that have this service, I need to initialize the filter like this :

    private var scanFilters: List<ScanFilter> = arrayListOf(
        ScanFilter.Builder().setServiceUuid(ParcelUuid(UUID.fromString("0000eb7a-0000-1000-8000-00805f9b34fb"))
)

However, if I want to write about a feature of this service, I have to use the following UUID:

0000eb7a-0000-0000-0000-000000000000

I don’t understand why I can’t use the same UUID for filtering as for read/write operations, can you help me?

Source: Android Questions

LEAVE A COMMENT