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

SCCD not visible in nrfToolbox

I am trying to implement SCCD on S130 v2 sdk11 but this is not in the scope of the tutorial. I have populated the structure just the same as for CCCD, but I can't have the descriptor shown in nRF toolbox or in my own android app when using getDescriptors (developer.android.com/.../BluetoothGattCharacteristic.html. I have tried to un-re-bond device but it does not help. do I have to use add_descriptor function, ? it is not used for cccd, so I don't use it for sccd. If it is needed, please provide an example as the doc does not really help. I want to use this descriptor in order to activate some hardware peripheral on my device independantly from notifications, as the peripheral is HW ressource, hence unique for all clients.

here is my code (sorry for formatting but I am a newbie on this forum)

ble_gatts_attr_md_t sccd_md;
memset(&sccd_md, 0, sizeof(sccd_md));
BLE_GAP_CONN_SEC_MODE_SET_OPEN(&sccd_md.read_perm);
BLE_GAP_CONN_SEC_MODE_SET_OPEN(&sccd_md.write_perm);
    sccd_md.vloc                = BLE_GATTS_VLOC_STACK; 
    sccd_md.rd_auth = 0;
    sccd_md.wr_auth = 0;
    char_md.p_sccd_md           = &sccd_md;  				
    
err_code =  sd_ble_gatts_characteristic_add(p_dss->service_handle,
                                       &char_md,
                                       &attr_char_value,
                                       &p_dss->accelerometer_handles);
Parents
  • Hi jfDev,

    I was checking again with our developer, it seems that I was wrong.

    You can create your proprietary descriptor as you already have done. The only limitation of a descriptor compare to a characteristic is that you can't do notification or indication from a descriptor. Other than that you can do pretty much the same (read/write).

    As you may already know, GATT layer is on top of the ATT layer, so on the ATT layer, service, characteristic and descriptor all are simply attributes.

    I was confused that if the spec limit the descriptor to only the ones defined in the spec or user can define their own. Sorry for the confusion.

Reply
  • Hi jfDev,

    I was checking again with our developer, it seems that I was wrong.

    You can create your proprietary descriptor as you already have done. The only limitation of a descriptor compare to a characteristic is that you can't do notification or indication from a descriptor. Other than that you can do pretty much the same (read/write).

    As you may already know, GATT layer is on top of the ATT layer, so on the ATT layer, service, characteristic and descriptor all are simply attributes.

    I was confused that if the spec limit the descriptor to only the ones defined in the spec or user can define their own. Sorry for the confusion.

Children
No Data
Related