Hi folks,
I'm working on two Bluetooth low energy application, First one is a peripheral, running on iPhone Second one is a central, running on iPad mini.
At some point, the central connects with the peripheral, discover services and attributes, updates attributes then reads back attributes.
On the central side, after asking to read back the attribute value, I get this:
CoreBluetooth[WARNING] Unknown error: 241
On the central application, my read request looks like this:
[dataModel.targetPeripheral writeValue:(NSData*) newDataValue forCharacteristic:(CBCharacteristic*) selectedCharacteristic type:(CBCharacteristicWriteType) CBCharacteristicWriteWithResponse];
On the peripheral side, this is how I handle the read
- (void)peripheralManager:(CBPeripheralManager *)peripheral didReceiveReadRequest:(CBATTRequest *)request { NSData* dataForCode = [self attributeData: (CBUUID*) request.characteristic.UUID]; assert( dataForCode != nil );
request.value = dataForCode;
NSLog(@"readRequest at offset %lu [response %@ %d bytes]", (unsigned long)request.offset, request.value, [request.value length] );
[self.peripheralManager respondToRequest:(CBATTRequest *) request withResult:(CBATTError) CBATTErrorSuccess ]; }
Q1) is there any reference for such warnings? I have googled for a long time, but not found any definitive reference.
Q2) What is the meaning of "CoreBluetooth[WARNING] Unknown error: 241" ?
Thanks,
|