Missing flow control for -writeValue:forCharacteristic:type: and CBCharacteristicWriteWithoutResponse

Originator:martijn
Number:rdar://20394802 Date Originated:01-Apr-2015
Status:Open Resolved:No
Product:iOS SDK Product Version:8.2
Classification:Enhancement Reproducible:N/A
 
Summary:
When using the GATT client API -writeValue:forCharacteristic:type: with CBCharacteristicWriteWithoutResponse, the underlying queue seems to overflow when having ~20 or so packets queued up. Unfortunately, there is no way for the application to know this through the CoreBluetooth API.

The other way around, when an app is providing a GATT service, there is actually flow control: -updateValue:forCharacteristic:onSubscribedCentrals: returns NO if the queue is full. The system calls -peripheralManagerIsReadyToUpdateSubscribers: when there is space again in the queue.

Steps to Reproduce:
1. Read the CoreBluetooth docs with -writeValue:forCharacteristic:type:
"If you specify the write type as CBCharacteristicWriteWithoutResponse and the write does not succeed, you are not notified nor do you receive an error indicating the cause of the failure."
2. Try to find any other way to get feedback of whether the outbound queue is full or not.
3. Observe there is no such way at the moment.

Expected Results:
CoreBluetooth should provide a way to know whether the underlying ATT Write Command was successfully queued or not. Any decent GATT stack provides this.

Actual Results:
CoreBluetooth does not provide a way to know whether the underlying ATT Write Command was successfully queued or not.

Version:
iOS 8.2

Notes:


Configuration:
iPhone 6

Attachments:

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!