Re: it takes time to discover peripherals in background
Re: it takes time to discover peripherals in background
- Subject: Re: it takes time to discover peripherals in background
- From: Joakim Linde <email@hidden>
- Date: Sun, 20 May 2012 17:10:10 -0700
Hi Frederic,
Can you try with allowing duplicates (CBCentralManagerScanOptionAllowDuplicatesKey)? You might be in a case where the peripheral is seen in the foreground before the app goes in the background. If so, you will not get a "duplicate" while in the background.
Thanks, Joakim
On May 20, 2012, at 3:33 PM, Frederic Visticot wrote: When the app is in foreground all is working fine...
I have filled the bluetooth param in the plist. I'm using the follwinging code to discover peripheral in background:- Only 1 service
- No duplicate key NSArray *services = [NSArray arrayWithObject:[CBUUID UUIDWithString:@"1804"]]; NSDictionary *options = [NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithBool: NO], CBCentralManagerScanOptionAllowDuplicatesKey, nil]; [self.cbCentralManager scanForPeripheralsWithServices: services options:options]; The advertiser is using advertising min/max interval with very small value (20ms / 645ms)
It takes a long time in background to discover peripheral (30s or more or never :( ). Is it normal ? Can you please advice ?
Tx for your help
|
_______________________________________________
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