Read/write requests fail while peripheral is in background
Hi guys, I have a problem when I try to send a read or write request from my central (ipad3 - iOS 6 beta4) to a backgrounded peripheral (iphone4s - iOS 6 beta4). I get the following error: "CoreBluetooth[WARNING] Unknown error: 242". Moreover the delegate methods receive the same error. - (void)peripheral:(CBPeripheral *)peripheral didUpdateValueForCharacteristic:(CBCharacteristic *)characteristic error:(NSError *)error - (void)peripheral:(CBPeripheral *)peripheral didWriteValueForCharacteristic:(CBCharacteristic *)characteristic error:(NSError *)error However, when the peripheral become active again with the application entering foreground then the reads and writes succeed as expected. I use the background mode "bluetooth-central" for my peripheral. Note also I use the following permissions: CBAttributePermissionsReadEncryptionRequired and CBAttributePermissionsWriteEncryptionRequired and therefore a connection and pairing is first established before the peripheral is backgrounded. Is it impossible to read/write characteristics while the peripheral is in background ? -- sébastien _______________________________________________ Do not post admin requests to the list. They will be ignored. Bluetooth-dev mailing list (Bluetooth-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/bluetooth-dev/site_archiver%40lists.... This email sent to site_archiver@lists.apple.com
participants (1)
-
Sébastien Martini