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

Writing data using Python binding method

Hello. I am literally looking at the set_hrm_cccd function in Python used to write data. This is for the S130 heart rate collector example. I understand the sd.ble_gattc_write function and what it does but what I don't understand is where my value goes within the cccd_array that sets the write.params.p_value?

Assuming a peripheral handle exists the Py code has a list called cccd_list = [value, 0] where value from the example for enabling Notification: 0x01. How would I say write a utf8 string? Does the cccd value always precede the actual value?

Related