This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Only one service characteristic appears in nRF Connect

Hello,

I'm implementing a custom service and followed the tutorial here. I added a second characteristic by adding its own char_b_init function, creating a CHAR_B_UUID, creating a new char_b_handles in the my_service_t struct. However, only one of the two characteristics shows up in nRFConnect, specifically the second characteristic to be added in the my_service_init function (I've switched the order that char_A and char_B are initialized and the second always appears in nRFConnect.). It would seem that either 1) nRFConnect is unaware of the other characteristics, or 2) The second characteristic is overwriting the first.

I added my custom service to the ble_hrs example. The hrs provides two characteristics (both of which show up in nRFConnect) so I believe it's a configuration issue with my specific service.

Other info: SDK 13.0 Using nRFConnect for iOS

Any input is much appreciated.

  • If you have static MAC (Adv.) address and static GATT Server (= Service Changed Characteristic under GATT Service missing) then you might be experiencing GATT handles caching on Client side...

    Also in char_B_add you are adding Characteristic to p_degree->service_handle but I don't see where this service is coming from (I thought you are adding both Characteristics to the same service so I would expect p_my_service->service_handle there).

  • p_degree is the name of the service in my application--I changed the names to make explanations easier. I just corrected that error here.

  • Just figured out my problem. Either iOS or nRFConnect caches some ble information, so connecting/reconnecting is useless without turning the phone's ble off and on. That refreshes everything and the new characteristics show up. Figured it out by trying to delete services and they stayed on nRFConnect even after they had been deleted from code and reflashed.

  • That's proper behavior of BLE stack on GATT Client side (if GATT Server indicates it's static)!

Related