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

Tutorial Characteristic Master example

Hi, I'm trying to notify the temperature value with Tutorial Characteristic Master example. But log shows me this rows when I try to read the Descriptor Client Characteristic Configuration:

  • Read Response received from descr. 00002902-0000-1000-8000-00805f9b34fb, value: (0x) 00-00

  • "Notifications and indications disabled" received

Why don't I receive the temperature value? Why is notification disabled? I followed correctly all the steps explained here: devzone.nordicsemi.com/.../ On the contrary I've not problems to add a characteristic to the service. I'm using S130, nRF51822 and nRF connect for Android. Thanks!

Parents
  • FormerMember
    0 FormerMember

    From what I understand, you are setting up a peripheral device?

    If notifications are enabled, the value of the CCCD for the given characteristic should be 0x01. The read response tells that notifications are not enabled.

    What do you do in nRF Connect to enabled notifications?

    Update 30.06.2017: This is how to enable notifications:

    image description

  • Yes, I'm setting up a peripheral device. Actually I don't enable notifications using nRF connect but the example enables them writing this code:

    // OUR_JOB: Step 3.A, Configuring Client Characteristic Configuration Descriptor metadata and add to char_md structure
    		ble_gatts_attr_md_t cccd_md;
    		memset(&cccd_md, 0, sizeof(cccd_md));
    		BLE_GAP_CONN_SEC_MODE_SET_OPEN(&cccd_md.read_perm);
    		BLE_GAP_CONN_SEC_MODE_SET_OPEN(&cccd_md.write_perm);
    		cccd_md.vloc                = BLE_GATTS_VLOC_STACK;    
    		char_md.p_cccd_md           = &cccd_md;
    		char_md.char_props.notify   = 1;
    
Reply
  • Yes, I'm setting up a peripheral device. Actually I don't enable notifications using nRF connect but the example enables them writing this code:

    // OUR_JOB: Step 3.A, Configuring Client Characteristic Configuration Descriptor metadata and add to char_md structure
    		ble_gatts_attr_md_t cccd_md;
    		memset(&cccd_md, 0, sizeof(cccd_md));
    		BLE_GAP_CONN_SEC_MODE_SET_OPEN(&cccd_md.read_perm);
    		BLE_GAP_CONN_SEC_MODE_SET_OPEN(&cccd_md.write_perm);
    		cccd_md.vloc                = BLE_GATTS_VLOC_STACK;    
    		char_md.p_cccd_md           = &cccd_md;
    		char_md.char_props.notify   = 1;
    
Children
No Data
Related