Hi everyone!
This is a issue many developers face during the development of apps
using CoreBluetooth. When connecting to BLE devices, CoreBluetooth
caches the peripheral in order to reconnect faster later, i
presume. But if for any reason, peripheral developers, we in this
case, decide to change the peripheral name, then an iOS device that
has previously connected to this peripheral would stop connecting
to it because it would read it with its previous name. There’s no
problems with iOS devices that hasn’t connected yet since they will
connect to it with its real name.
I’m checking for
the device name both in centralManager:didConnectPeripheral and in
peripheral:didDiscoverCharacteristicsForService:error and the both
show the previous name.
Is there a way to clear CoreBluetooth cache or force the
rediscovery of everything about the peripheral so we we can get the
right device name? Or is there an alternate way to check if it is
the device iOS needs to connect to?
I’ve already tried turning off and on Bluetooth, WIFI, reset
network settings.
The peripheral we’re working with is a Microchip RN4020 (I know,
not the best one out there…)
Thanks in advance.