• 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: Peripheral not being discovered in the background until I open the BlueTooth Settings page
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Peripheral not being discovered in the background until I open the BlueTooth Settings page


  • Subject: Re: Peripheral not being discovered in the background until I open the BlueTooth Settings page
  • From: Jan Lübeck (Fyrastudio) <email@hidden>
  • Date: Mon, 09 Nov 2015 14:21:12 -0500

Craig,

It's a custom device made for us by a third-party vendor. Is there a way for me to check this info somehow without asking the vendor? Maybe with another app? Their customer service takes forever to reply...

But still, if this was the case, shouldn't it not be found at all while in the background? Because it IS being found when I open the BlueTooth settings page.

Thanks!

______
Jan Lübeck
Chief Technology Officer
fyrastudio.com

On Mon, Nov 9, 2015 at 2:14 PM, Craig Dooley <email@hidden> wrote:
What is the device?  Is the service you are looking for in the advertisement, or in the scan response?  If the service is only in the scan response, it will not be found in background mode.

- Craig

On Nov 9, 2015, at 11:00 AM, Jan Lübeck (Fyrastudio) <email@hidden> wrote:

Hey all, first message here, so I hope I don't sound too newbie.

I've been looking at the documentation to have my app discover peripherals while on the background and I think I have it all set up correctly.

1) I wait until the CBCentralManager's state is CBCentralManagerStatePoweredOn before I start scanning.
2) On scanForPeripheralsWithServices I pass an array of UUIDs with the services. NOT scanning with nil as that doesn't work in the background. 
3) I have bluetooth-central inside UIBackgroundModes in my plist

With all these, eveything works great in the foreground, plus it works great if I discover the peripheral in the foreground and then go to the background. But if I go to the background before discovering the peripheral, it is never discovered.

UNLESS

I go to my phone Settings and open the BlueTooth page. Without even touching anything else, centralManager:didDiscoverPeripheral is called on my app as expected. 

This surprised me, but at least gave me something solid to come and ask here. 

Is there something I'm missing? 

I'm running iOS 9.1. Couldn't test on 8.x yet to see if it is a new thing.

Thanks!
______
Jan Lübeck
Chief Technology Officer
fyrastudio.com
 _______________________________________________
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: Peripheral not being discovered in the background until I open the BlueTooth Settings page
      • From: robert carlsen <email@hidden>
References: 
 >Peripheral not being discovered in the background until I open the BlueTooth Settings page (From: Jan Lübeck (Fyrastudio) <email@hidden>)
 >Re: Peripheral not being discovered in the background until I open the BlueTooth Settings page (From: Craig Dooley <email@hidden>)

  • Prev by Date: Re: Peripheral not being discovered in the background until I open the BlueTooth Settings page
  • Next by Date: Re: Reinitiate CoreBluetooth BTLE Pairing Connection
  • Previous by thread: Re: Peripheral not being discovered in the background until I open the BlueTooth Settings page
  • Next by thread: Re: Peripheral not being discovered in the background until I open the BlueTooth Settings page
  • Index(es):
    • Date
    • Thread