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

I'm having trouble advertising a VS service

I'm leveraging off the heart rate sensor example to create my own VS service. I've successfully registered a 128-bit UUID with the Soft Device which is enumerated along with 0x1800, 0x1801, the Battery Service and the Device Information Service when I connect to the peripheral (attached iPhone screencap).

But I cannot seem to add it to the array of advertised services.

Specifically when I call ble_advdata_set() with the following array:

ble_uuid_t adv_uuids[] = { {BLE_UUID_DEVICE_INFORMATION_SERVICE, BLE_UUID_TYPE_BLE}, {BLE_UUID_BATTERY_SERVICE, BLE_UUID_TYPE_BLE}, {0xA1A6, BLE_UUID_TYPE_VENDOR_BEGIN}, };

I receive an error code 0x0C which is NRF_ERROR_DATA_SIZE. I don't think it's a memory issue since I can comment out the BLE_UUID_BATTERY_SERVICE entry and receive the same error. I know the handle for my service always comes back as 0x02 so it's the safe to use BLE_UUID_TYPE_VENDOR_BEGIN as the type (and I only have one vendor specific service).

Thank you in advance for your assistance! Dan

Updated: I've attached a screencap of my Fitbit Zip doing exactly what I want.

photo.PNG

photo2.PNG

Related