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

Characteristics not available with vendor UUIDs

Hi, I'm having some trouble setting up the vendor UUIDs on a nRF51 devkit. I've written a short application based off of the template example, providing a service called 'recording unit'. I based that off of the HRS example, with 'faked' BLE UUIDs, and it worked fine, displaying a characteristic called timestamp. I then found the instructions for using vendor UUIDs in the UART app example and proceeded to implement that; which seems to advertise the service correctly (the master control panel displays it in the list of available services with the custom UUID I defined) but the characteristic is no longer available. If I comment out the adding of the custom UUID to the table and the manual setting of the ble_uuid, and instead revert to using BLE_UUID_BLE_ASSIGN() the characteristic is displayed correctly. I'm assuming that I'm missing something but I can't figure out what. I've appended my main.c and the files for the custom service.

main.c

ble_rus.h

ble_rus.c

Update: I noticed that I had not changed the uuid list array in main.c, so I was still advertising the service as a BLE_UUID_TYPE_BLE. When I first rectified this I got a NRF_ERROR_INVALID_PARAM when attempting to encode it. By changing the order of the services_init() and advertising_init() (so that the services are initialised before the advertisements) I managed to fix that, but instead I am getting a buffer overflow error when encoding.

Update: Thanks to De Witt I now managed to get the adveritising working again, but I still cannot see my characteristics. Fresh copies of the files can be found below:

main.c

ble_rus.h

ble_rus.c

Related