I created a service with several characteristic values. I can read the values without any problem with the Master Control Panel on my Android tablet, but reading from the Central with API call sd_ble_gattc_char_value_by_uuid_read() does not work.
My configuration:
- 2x nRF51-DK (running Peripheral and Central application)
- S110 SoftDevice v7.1.0
- S120 SoftDevice v1.0.1
I used a CC2540 USB dongle from TI to do some sniffing on the Bluetooth communication:
The forum seems to resize the screenshot, please check the following attachment for a larger version: BT_READ_BY_UUID_ERROR_SNIFFING_LOG.png
This log shows that the read request is sent with the correct UUID (the first Byte on the UUID packet is the rightmost byte in common UUID representation - I also used the same #define when registering the base UUID with the SoftDevice.
As you can see, the reply is an error code INVALID_HANDLE(0x01) from the Peripheral.
A characteristic value with this UUID definitely exists in the Peripheral, as you can see in the following screenshot from Master Control Panel (on the Peripheral, exactly the same software is used):
Does anybody know what went wrong? How is the Read by UUID function used correctly?