Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

DennisBlah

macrumors 6502
Original poster
Dec 5, 2013
485
2
The Netherlands
Hi all,

I made 2 little applications:
- 1 for iDevices, which sends out their UDID
- 1 for the Mac, which scans for peripherals

I notice that after a while, the bluetooth module is crashing, either the module or the OSX.
the didDiscoverPeripheral function checks the RSSI if its greater than -70 it will check the UDID with an external database using Restfull API.

I have 2 iMacs with the same version of OSX and the application itself.
1 keeps working as it should, one other one doesn't.

After a while it either responds like between 3-10 minutes or even longer.
I notice that I can't disable the bluetooth, clear devices or reset module at all.

I need to clear nvram and pram, then I can reset module etc etc
And again after a while (few hours) the same issue occures.

What I did try :
- reinstall osx (different versions, from Mavericks to high sierra)
- replaced complete iMac 4 times (and all installations)

I still find it weird that on the other building this does not happen at all.
So I thought it had something to do with surrounding bluetooth devices, which doesn't seem the issue, as there aint that many devices, and not always near this 1 computer (it's a warehouse)

Does anyone know anything about this behaviour and how to prevent it ?
 

DennisBlah

macrumors 6502
Original poster
Dec 5, 2013
485
2
The Netherlands
Ok, there appears to be THOUSANDS of Bluetooth Pencils nearby, which seems to clog up the peripheral scanner and the queue for checking and eventually also crash the bluetooth adapter. Which requires a PRAM and NVRAM reset to get it back on.
And further research on the pencil's show that they can't be turned off. I'm trying some 'faraday curtains' now, but... I can't block all of it due operations -,-

Is there any way I can either lower the 'discovery' power on the Mac
I could not find anything special on the 'scanForPeripheralsWithServices'
or the CBCentralManager to scan only for certain identifiers of beacons ? i.e. com.mydomain.myBeacon

'client':
Code:
self.myBeaconRegion = CLBeaconRegion.init(proximityUUID: UUID.init(uuidString: myUniqueKey!)!, major: 1, minor: 1, identifier: "com.mydomain.myBeacon")

'server':
Code:
btManager = [[CBCentralManager alloc] initWithDelegate:self queue:nil options: nil];



//In 1 second loop
[btManager scanForPeripheralsWithServices:nil options:nil];
 
Last edited:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.