CoreBluetooth[WARNING] Unknown error: 14 on iPhone 5

寵の児 提交于 2019-12-21 09:24:49

问题


I am able to connect to a peripheral device using BLE, but shortly after reading some characteristics, the framework returns:

CoreBluetooth[WARNING] Unknown error: 14

and the peripheral is disconnected.

Looking at the BT Core_V4.0 spec, I am not sure what the error means. Is the 14 a hex value? does it mean the following error according to the spec: (Part D Section 2 - Error Codes)

2.20 REMOTE DEVICE TERMINATED CONNECTION DUE TO LOW RESOURCES (0X14) The Remote Device Terminated Connection due to Low Resources error code indicates that the remote device terminated the connection because of low resources.

I tried changing the battery but did not have a different effect.

Also, I don't know how to catch these CB errors, I only see them logged, but when the device disconnects, it does not provide an error (it is null).

I do not directly control the source code for the peripheral but can ask for a bug fix. So any hints are appreciated it.

Thanks,


回答1:


You cannot intercept these CB errors, they are just traces from lower layer BLE.

Error 13 for instance is when the length of written data is not as specified in the GATT database. Error 14 means the connection was closed by other side (peripheral). I have seen this several times. Some times I read data too fast (You are not allowed to request next access before previous has been answered, there is only 1 "resource" in BLE per connection. Maybe this is what you also see?

As always it is best to get the TI BTLE USB Dongle with sniffer sw installed and then use the TI RF Sniffer tool in BLE mode with that dongle. You get a lot of information you can debug from in those traces. Like see if there are more than one read or write request without response.



来源:https://stackoverflow.com/questions/15581684/corebluetoothwarning-unknown-error-14-on-iphone-5

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!