3
votes

I implemented a CBPeripheral in iOS through the CBPeripheralManager with Services and Characteristics. With a CBCentralManager i am able to scan Peripherals and work with that.

Problem: If I make changes in the CBPeripheral (e.g.: adding a Characteristic to Service) then the CBCentralManager give me the old CBPeripheral, therefore I don't have the new added Characteristic in it. The tool LightBlue has the same effect! Scans just the first created service without changes.

So how I can change Services and Characteristics and get it through the CBCentralManager? Is it possible to clear the Peripherals UUIDs at the scanner side?

1

1 Answers

1
votes

I am using LightBlue as well and running into problems from this caching. https://github.com/sandeepmistry/bleno/issues/22 mentions this issue and says that turning Wifi on and off resolves it. I had to turn Bluetooth on and off to remedy it. I suppose this doesn't really help if you need to do it from a program.