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

Parents
  • I noticed that you are including the device full name and UUIDs in the advertising packet. The advertising packet is limited to 31 bytes and it may be difficult to fit all of that into the packet. You could set the name to be BLE_ADVDATA_NO_NAME and see if that helps. Another possibility would be to move the UUID information into the scan response packet.

Reply
  • I noticed that you are including the device full name and UUIDs in the advertising packet. The advertising packet is limited to 31 bytes and it may be difficult to fit all of that into the packet. You could set the name to be BLE_ADVDATA_NO_NAME and see if that helps. Another possibility would be to move the UUID information into the scan response packet.

Children
Related