This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

128-bit characteristic: Discrepancy between tutorial and app note.

I found a discrepancy between a tutorial and an application note.

Step 2.A of "BLE Characteristics, a beginner's tutorial" devzone.nordicsemi.com/.../ calls sd_ble_uuid_vs_add for each characteristic.

Application note nAN-36 www.nordicsemi.com/.../nAN-36.zip

does not call sd_ble_uuid_vs_add for each characteristic. It just re-uses the returned type by the sd_ble_uuid_vs_add call for the service.

ble_uuid.type = p_lbs->uuid_type;
ble_uuid.uuid = LBS_UUID_BUTTON_CHAR;

Which one is correct? Or do they achieve exactly the same under water?

  • I have learned from Carles (Nordic) that effectively this is the same.

    The trick used (and explained in different area's) is that the vendor-specific base UUID is given a type number which then can be used later for vendor-specific service UUIDs and characteristic UUIDs (where only 16-bit of the 128-bits are changed).

    However, due to a bug in an older release, adding an vendor-specific base UUID that was already added earlier results in a error code, thus the approach of the application note works for older releases without generating an error.

Related