Reputation: 391
I'm implementing CBPeripheralManager on my iPhone running iOS6 and I have created and added a custom service and characteristic. An external Bluetooth Device (the BLE112, if it makes a difference) acts as the Central and starts writing data to the characteristic I have implemented. I know it's being written because a test application on the App Store (light blue) sees it as being written, but I'm just not sure how to see it from the CBPeripheralManager. didReceiveWriteRequests is never called, and the "value" property on my characteristic variable is never called either. So, to sum up, my question is: From the CBPeripheralManager, how can I tell when updates to a characteristic have been written from a central?
Upvotes: 3
Views: 1464
Reputation: 391
Through much trial and error, I found that under the Service property for the iOS side, you need to create it with "CBCharacteristicPropertyWrite" instead of "CBCharacteristicPropertyWriteWithoutResponse" in order to get didReceiveWriteRequests. Seems obvious, but kept me scratching my head for a while.
Upvotes: 2