Occasionally I see a message from wirelessproxd in the console log of my app, after it has been running for a while - I’d like to know why this message is being generated, and what I should do about it. Here’s the message:
wirelessproxd[35] <Warning>: CoreBluetooth[WARNING] <CBCentralManager: 0x124604c90> is disabling duplicate filtering, but is using the default queue (main thread) for delegate events
This is apparently a condition that has developed, and I’m not certain that Core Bluetooth has tried to tell me about it - I’ve received no callbacks on the delegate indicating a problem. Of course, taken literally it could
mean that the delegate calls are going somewhere other than to the defined delegate.
My app sets up the Central Manager without duplicate filtering, and not on the default queue. Here’s the code to initialize the Core Bluetooth CentralManager:
- (void) coreBluetoothSetup {
DebugLog(@"coreBluetoothSetup - entered");
self.hmiCBQueue = dispatch_queue_create("com.onset.corebluetooth.queue", DISPATCH_QUEUE_SERIAL);
self.CM = [[CBCentralManager alloc] initWithDelegate:self queue:self.hmiCBQueue options:nil];
}
where self.hmiCBQueue is defined as:
@property (nonatomic, strong) dispatch_queue_t hmiCBQueue;
The code to start scanning for advertisements is as follows:
NSDictionary * options = [NSDictionary dictionaryWithObject:[NSNumber numberWithBool:YES] forKey:CBCentralManagerScanOptionAllowDuplicatesKey];
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
[self.CM scanForPeripheralsWithServices:nil options:options];
});
And so, I have disabled duplicate filtering, and assigned the Central Manager to a separate queue. What is this message trying to tell me?
Don