This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How to stop Mac OS X Mavericks from caching nrf8001 profile

I have an imuduino (arduino board with nrf8001 bluetooth and some sensors) board and am trying to load some of the profiles from the nordic arduino nrf8001 bluetooth api on github (github.com/.../ble-sdk-arduino) but it seems that my Macbook only looks for the older uart profile I used from another code base.

My question is:

  1. How do I force Mavericks to stop trying to find the older profile I used to have on my nrf8001 and allow itself to look for the new services. For example when I'm using the heart rate monitor template.
  2. Why does my Iphone recognize the new services but not my Macbook?

Using nrf studio go.

Thank you for any help with this. I'm at my wits end!

  • Both OSX and iOS will buffer Attribute tables/profiles. If you want to avoid that you should enable the service changed characteristic. If this is enabled they should redo service discovery when reconnecting to a device that isn't using bonding. If you are using bonding, the attribute table will be buffered until a service changed indication is sent from the peripheral.

    On iOS you can "flush" the buffer by toggling Bluetooth off then back on. I guess you can try this on OSX as well. However if that doesn't work you could try to delete the bluetooth.plist to force it to forget the device.

  • This is the script to clear OSX BLE cache:

    sudo defaults write /Library/Preferences/com.apple.Bluetooth CoreBluetoothCache -dict

    sudo launchctl unload /System/Library/LaunchDaemons/com.apple.blued.plist

    sudo launchctl load /System/Library/LaunchDaemons/com.apple.blued.plist

  • Thank you Konstantin. I enabled the service changed characteristic but it still did not work on Mavericks. I ended up just upgrading my Macbook to Yosemite and now it works :) Spent too many hours on this... just gave up.

Related