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

Add / remove custom service/charac work only if ….. !!!

Hi,

I started my project from the “BLE Characteristics, a beginner's tutorial” I download this project and add it to my SDK_11.0.0_89a8197 . Then I started to modify the code like adding i2c communication, reading values from different sensors that I have in my board, adding new custom UUID service/ characteristic and everything work perfectly. I even develop my own android APP and things work fine. I have been working on this project since 4 months.

But these last days when I tried to make some modification in my services/characteristic by adding new one, remove some of them I notice a WEIIRD behavior.

For example I have actually 5 services that I created before, if I try to remove one of them by uncommenting the init function related to the service in the main file it won't be removed.

image description

In the photo above i uncomment the init service declaration of the last two one from the service_init() inside the main and then I compile the project and load it to my board. after that i open the 'nRF Connect' APP to discover my nRF BLE services/Characteristic and I notice that all the services that I remove it still there.

I stay days to figure out why sometimes in rare occasion the beacon accept the modification that I made about the service/characteristics and sometimes no. And I discover it HOW!!!!

it work only When I left the 'nRF Connect' APP open and I flash my Nrf. The App will be disconnected and when the memory flashing will finish I click on the connect and GUESS WHAT!! now the modification was taken into consideration.

IT's weird but that what I got, this is a little video that I upload it on youtube to demonstrate what I just says :

www.youtube.com/watch

Any idea ?


Update :

I think may be it's comming from the phone it self. once the connection established for the first time with the BLE peripheral, the phone will memeorize the BLE with Services/Characteristic it have.

Parents Reply Children
No Data
Related