I’ve recently been working on a project involving Bluetooth Low Energy. With something like a Nordic dev board, you switch a lot of things around, for example, UUIDs of services. Apple’s Core Bluetooth has problems with this. That’s not to say the implementation is broken. In fact, the thing being developed is, well, being developed, so it’s not going to play nice with other things. For example, there is a “services updated” message that the device can send out. But the device is under development so it can’t do that yet, even if the team already knows that’s a thing the device might need to do. What I’m documenting here is workarounds that give developing devices a little more space to mess around when you’re testing with Core Bluetooth. One workaround is to change the MAC address of the device. Core Bluetooth will think it’s a completely new device and rediscover everything about it. Another is to find this wonderfully undocumented file:
and maybe this one too:
delete them, and restart your computer. The first file keeps a list of previously discovered devices, mapping their address to various aspects of the device. If an aspect changes, it doesn’t do anything, because the previously cached aspect is what gets read, and it hasn’t been told to update. This probably reduces battery usage for some devices. The second file seems like it’s some kind of lock for programs to tell each other if someone’s using the first file, but that’s just my guess from its name.