Hi,
I have read through this tutorials on how to develop custom UUID, and I have implemented it successfully.
But I need to have 2 characteristics. I have basically duplicated the codes for the custom UUID in order to have 2 characteristics.
I am not sure that is the way to do it.
When I compile, there is no error but I am not able to see the second characteristics on the nRF Connect.
Below is snippet of the code for ble_cus.h
Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// CUSTOM_SERVICE_UUID_BASE f364adc9-b000-4042-ba50-05ca45bf8abc : ADC9 taken as the 16bit Serivice. Added 1 to have the characteristics
#define CUSTOM_SERVICE_UUID_BASE {0xBC, 0x8A, 0xBF, 0x45, 0xCA, 0x05, 0x50, 0xBA, \
0x42, 0x40, 0x00, 0xB0, 0xC9, 0xAD, 0x64, 0xF3}
#define CUSTOM_SERVICE_UUID 0xADC9
#define CUSTOM_VALUE_CHAR_UUID 0xADCA
#define CUSTOM_VALUE2_CHAR_UUID 0xADCB /**<Added for second characteristics, and increased NRF_SDH_BLE_VS_UUID_COUNT to 2 but it didn't advertise*/
/**@brief Custom Service event type. */
typedef enum
{
BLE_CUS_EVT_NOTIFICATION_ENABLED, /**< Custom value notification enabled event. */
BLE_CUS_EVT_NOTIFICATION_DISABLED, /**< Custom value notification disabled event. */
BLE_CUS_EVT_DISCONNECTED,
BLE_CUS_EVT_CONNECTED
} ble_cus_evt_type_t;
/**@brief Custom Service event. */
typedef struct
{
ble_cus_evt_type_t evt_type; /**< Type of event. */
I also tried to change the NRF_SDH_BLE_VS_UUID_COUNT from 1 to 2 but instead the DK does not advertise.
I appreciate any guide to resolving this. Thanks.