I am trying to get a notification from a bluetooth device when the feature value changes. To do this, I need to enable notification for the client characteristics configuration descriptor (CCC). I used setNotifyValue(enabled: Bool, forCharacteristic characteristic: CBCharacteristic) for the characteristic, but did not receive an update to change the values.
I tried to enable writeValue(data: NSData, forDescriptor descriptor: CBDescriptor) for CCC using writeValue(data: NSData, forDescriptor descriptor: CBDescriptor) , but my application crashes for this API and shows an error like
It is not possible to write descriptive descriptors for client configuration using this method!
Any help!
ios iphone swift bluetooth bluetooth-lowenergy
Vikas Goyal
source share