Reputation: 107
When I load any method at that time it shows me this warning where as I am using that characteristic which is retrieving from method
var cbChar : CBCharacteristic
func bleManagerPeripheral(_ peripheral: CBPeripheral!, didUpdateValueFor characteristic: CBCharacteristic!, error: Error!) {
cbChar = characteristic
}
I get warning when I try to write following line
[self.cb writeValue:aData forCharacteristic:cbChar type:1];
I am getting following warmning
[CoreBluetooth] WARNING: Characteristic , notifying = NO> does not specify the "Write Without Response" property - ignoring response-less write
Can any one help me?
Upvotes: 1
Views: 1591
Reputation: 114773
The characteristic you are writing to does not support write without response, but when you call writeData
you are passing 1
for the type
parameter. 1 corresponds to CBCharacteristicWriteWithoutResponse
. The warning is telling you that Core Bluetooth can't do what you have asked.
You need to specify CBCharacteristicWriteWithResponse
[self.cb writeValue:aData forCharacteristic:cbChar type: CBCharacteristicWriteWithResponse];
Upvotes: 3