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

Problem with custom service UUID and Notify

I've been following the custom service nAN-36 instructions and have it mostly working on my PCA10028 board, but I have two problems that I just can't figure out. I'm pretty sure they are related.

1st Problem

In advertising_init() if I implement the code to configure the service UUID the same as in nAN-36 my board won't initialize and gets stuck in a continuous reset loop. I can only get it to work if I use the BLE_UUID_TYPE_BLE as per the code snippet below, but I think this causes problems with the button Notify handler (see 2nd Problem).

  //ble_uuid_t adv_uuids[] = {{TAG_UUID_SERVICE, m_tag.uuid_type}};  //This should work but does not, causes the device to continuously reset
  ble_uuid_t adv_uuids[] = {{TAG_UUID_SERVICE, BLE_UUID_TYPE_BLE}}; //this does work, but crashes when sending a notification

2nd Problem

When I modify the advertising_init() as above, everything mostly works. But when I go to Master Control Panel, I can connect to the board, I can write to change the LED state characteristic, I can enable the CCCD on the Button characteristic. But when I toggle the button which calls the ble_on_button_change() handler, the PCA10028 hangs.

I'm attaching the source files, plus a zip of the entire project in the hope there is someone who can take a quick look and offer some advice on why this doesn't work.

main.c

ble_sfst_tag.c

ble_sfst_tag.h

CustomServiceProject.zip

Thanks!

Parents Reply Children
No Data
Related