• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Read/write requests fail while peripheral is in background
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Read/write requests fail while peripheral is in background
      • From: Joakim Linde <email@hidden>
  • Prev by Date: Re: UUID is nil for newly discovered CBPeripheral
  • Next by Date: Re: Read/write requests fail while peripheral is in background
  • Previous by thread: Re: Testing Core Bluetooth Applications in the iOS Simulator on OSX 10.8.1
  • Next by thread: Re: Read/write requests fail while peripheral is in background
  • Index(es):
    • Date
    • Thread