• 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
Re: How can I tell if a central connected to my peripheral?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How can I tell if a central connected to my peripheral?


  • Subject: Re: How can I tell if a central connected to my peripheral?
  • From: Jason Conn <email@hidden>
  • Date: Thu, 05 Feb 2015 14:58:47 -0800

Tian’s got it right on all counts. When a device connects, we don’t have any idea what service(s) it’s interested in. So, in order to be safe, we’d have to wake up every app with a CBPeripheralManager, in case it’s the “right” one. This is incredibly wasteful from a power perspective and fairly inelegant to boot.

In the end, it seemed natural that if an app is hosting a service, it could wait to find out about a remote device once it began “using” the service, via a read, write, or subscription event.

On Feb 5, 2015, at 12:35 PM, Justin Cooper <email@hidden> wrote:

Thanks for the history and information, Tian!  

It does make sense, I suppose...


Justin
  




On Thu, Feb 5, 2015 at 2:00 PM, Tian Zhang <email@hidden> wrote:
Hi Justin,

Currently there is no public API to get notification when a central connected to peripheral. If you find that’s something you really need, please file an enhancement request on http://bugreport.apple.com .

When CBPeripheralManager first introduced in iOS 6 beta, there was a delegate callback when the peripheral get connected. However, in the later release, the team made the argument that since a peripheral (iOS) can host multiple services from different apps and the central may not interested in your app’s service, they decided to remove that delegate callback. I’d say the possibility to bring that API back is really small.

Best Wishes,
Tian

On Feb 5, 2015, at 9:48 AM, Justin Cooper <email@hidden> wrote:

Greetings!

I have a peripheral app which is working fine.  

I want to be notified when a central connects to my peripheral.

I understand there is a didSubscribeToCharacteristic which works when a central subscribes, but I would like a notification on the connection itself.  (like didConnectToPeripheral on the central side)


Am I missing something in the documentation?  I can't seem to find this information anywhere!


Thanks in advance,
Justin

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
References: 
 >How can I tell if a central connected to my peripheral? (From: Justin Cooper <email@hidden>)
 >Re: How can I tell if a central connected to my peripheral? (From: Tian Zhang <email@hidden>)
 >Re: How can I tell if a central connected to my peripheral? (From: Justin Cooper <email@hidden>)

  • Prev by Date: Re: How can I tell if a central connected to my peripheral?
  • Next by Date: Re: How to get the updated advertisementData (kCBAdvDataManufacturerData) value?
  • Previous by thread: Re: How can I tell if a central connected to my peripheral?
  • Next by thread: Bluetooth heart rate sensor with iOS 8
  • Index(es):
    • Date
    • Thread