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

SERVICE HANDLE OF NUS

I am trying to determine the service handle of the nus example, to be able to verify that the central has turned on notifications.

I am using the sd_ble_gatts_value_get(m_conn_handle,  , &pval); function to read the attribute value and then test if for notifications enabled, but for the life of me cannot determine what it is?

I have found the characteristic add and found the p_nus->service_handle, but the reference is not valid, how do I access this handle to be able to do this test?

Herb

Parents Reply
  • \nRF5_SDK_17.0.2_d674dde\examples\ble_peripheral\ble_app_uart\main.c

    static void nus_data_handler(ble_nus_evt_t * p_evt)
    {
        if (p_evt->type == BLE_NUS_EVT_COMM_STARTED)
        {
            /* TX Characteristic notification enabled */
        }
        else if (p_evt->type == BLE_NUS_EVT_COMM_STOPPED)
        {
            /* TX Characteristic notification disabled */
        }

        :

    jing

Children
No Data
Related