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

How is BLE_CONN_HANDLE_INVALID changed in multiple services

How is BLE_CONN_HANDLE_INVALID changed in multiple services

I modified the ble_sdk_app_proximity example. I added x3 services, based on the BLE Characteristics, a beginner's tutorial, and it seems to be working fine. (nrf5-ble-tutorial-characteristic-CompletedCode ported for SDK 13.zip)

The first service, our_service.c from the turorial, works ok. The characteristic gets updated. The additional two (2) services did not until.......

It seems BLE_CONN_HANDLE_INVALID does not get changed to "VALID" or whatever.

So my service 2 and 3 does not update the characteristic.

When I comment out //p_our_service->conn_handle = BLE_CONN_HANDLE_INVALID; both the characteristics of the two additional services are updated.

So it seems the first service determines the connection state. Once it is connected, conn_handle ... stays .... BLE_CONN_HANDLE_INVALID for the other services?

How / where can I change BLE_CONN_HANDLE_INVALID to be "VALID"? (BLE_CONN_HANDLE_ALL)???

Any help appreciated

Related