reading value for non-notifying characteristic
reading value for non-notifying characteristic
- Subject: reading value for non-notifying characteristic
- From: Alessandro Gregori <email@hidden>
- Date: Wed, 13 Feb 2013 12:23:05 +0100
Hi,
you can tell a CBPeripheral to send notification for a characteristic by calling
- (void)setNotifyValue:(BOOL)notifyValue forCharacteristic:(CBCharacteristic *)characteristic;
When data becomes available, the relevant callback is called and you can use the characteristic value.
- (void)peripheral:(CBPeripheral *)peripheral didUpdateValueForCharacteristic:(CBCharacteristic *)characteristic error:(NSError *)error
But what about non-notifying characteristic?
If I set in a peripheral a CBMutableCharacteristic's properties to CBCharacteristicPropertyRead I expect that if I call readValueForCharacteristic: the callback will be called.
Instead I get this error:
Error Domain=CBErrorDomain Code=0 "The operation couldn’t be completed. (CBErrorDomain error 0.)"
Am I doing something wrong?
Alessandro
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Bluetooth-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden