I am developing a BLE client-server application which works as follows:
- Server App - iOS Peripheral Application
- Client App - An external device works with bluez
- iOS peripheral app register a Gatt Service with 1 characteristic
- external client device connect with iOS app and subscribe the characteristic.
- Before subscription external device's client app send read request and iOS perpheral app send proper response. (negotiation)
In general it connects successfully and works fine. But recently, sometimes, I am getting some reserved ATT error while sending gatt characteristic read request from the external cielnt device. In that case I found no didReceiveReadRequest() callback in my iOS peripheral app. The error I found from external device that iOS sent ATT error 0xF2. Error was as follows:
BLUETOOTH_FRWK_API: __bluetooth_internal_read_cb(906) > Error : GDBus.Error:org.bluez.Error.Failed: Operation failed with ATT error: 0xf2
Currently this is a major issue in both side communication. Would anyone suggest what is the error for and how can I get rid of this error ?
Thanks on advance.
NB: Most probably on that time, peripheral app was in background state, however app's background capabilities was turned on. In general this kind of readRequest, writeRequest, subscription (enabling notificatio) works fine in background.