Hemang Hemang - 5 days ago 6
iOS Question

Why CBCharacteristic is not updating on each write calls?

Whenever, I am performing a write operation, I have a call of below method: it works! but the problem is that, even if I will be making different calls it will always showing me the output of last result. I am not getting an updated values for the specific commands.

- (void)peripheral:(CBPeripheral *)peripheral didWriteValueForCharacteristic:(CBCharacteristic *)characteristic error:(NSError *)error {...}


To fix this, if we disconnect and then reconnects to the peripheral it will be with updated results.

Couldn't understanding what's wrong happened here?

Is it related to
CBCharacteristic
object? Can we refresh it? Do we need to refresh a peripheral?

Answer

It is only updating if I will restart my BT device. Hence, the answer is short but it took 1 hour for me to get an update on this.

Comments