Read/write requests fail while peripheral is in background
Read/write requests fail while peripheral is in background
- Subject: Read/write requests fail while peripheral is in background
- From: Sébastien Martini <email@hidden>
- Date: Fri, 24 Aug 2012 02:36:00 +0200
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 (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden