I am currently creating a simple iOS bluetooth app. I currently have a device with the ability to modify the name. What I am finding is that when I connect to a CBPeripheral device, it seems to be caching the old device name.
- Connect to the device via my app.
- Disconnect from device via my app.
- Change the name of the device.
- Rediscover/reconnect to the device via my app (with an existing CBPeripheral object).
By following the procedure above, I was expecting my iOS app to discover the new device name. However, I am finding that it has a tendency of retaining the old name instead. By disconnecting from the CBPeripheral device twice, I find that I can retrieve the new name.
So my question is, is there a way to update or clear CBPeripheral's existing discovered characteristics (or rediscovering new characteristics each time) in order to get the latest device name?
Here is a similar issue: CoreBluetooth: Refreshing local name of an already discovered Peripheral