9 years, 7 months ago.

You should not use 16-bit UUID for custom sevices.

Everything's hardcoded for u_int16

Question relating to:

This is a demonstration of how to create a GATT service and characteristic. BLE, evothings, GATT, GATT Demo, GATT Example

2 Answers

9 years, 7 months ago.

You'll find examples of the use of 128-bit UUID in the following: http://developer.mbed.org/teams/Bluetooth-Low-Energy/code/BLE_API/file/8a104d9d80c1/services/URIBeaconConfigService.h http://developer.mbed.org/teams/Bluetooth-Low-Energy/code/BLE_API/file/8a104d9d80c1/services/UARTService.h [together with the corresponding .cpp file] http://developer.mbed.org/teams/Bluetooth-Low-Energy/code/BLE_API/file/8a104d9d80c1/services/DFUService.h [together with the corresponding .cpp file]

You can also look at the BLE_LED and BLE_Button demos which create custom services using 128-bit UUIDs.

posted by Rohit Grover 30 Apr 2015
9 years, 7 months ago.

Vincent,

Try changing the UUID's to larger values, the BLE API should handle it transparently (ie there are functiones aliased for uint16 and long long). The UUID's were done in this way for ease of use and understanding during a class I taught using these as examples. See here: https://docs.google.com/document/d/1S9zRHjKOE2DGxW3xIcncZrAFgcxIK_Zzoqi2V8ALOL4/pub