Peripheral Randomly Disconnects: with Code=6

Hello,


I am working on an application where there is an option of "Change Peripheral Device", which discoonects with the respective peripheral and gives the user to choose a new peripheral device from the list and connect. In this case value from characterstic are read more than once, which slows down the ability to perform any operation.


Also, peripheral randomly disconnects with an error message:

Optional(Error Domain=CBErrorDomain Code=6 "The connection has timed out unexpectedly." UserInfo={NSLocalizedDescription=The connection has timed out unexpectedly.})


I have done a thorough research on the same, but haven't found any adaptive solution to mitigate the issue. Nonetheless, I have looked at the harware specifications from Apple for peripheral device and it meets the requirements.


Any help will be benificial at this point. I have tried my best.


Using Core Bluetooth API. Followed this tutorial :https://www.raywenderlich.com/231-core-bluetooth-tutorial-for-ios-heart-rate-monitor

Also made Bluetooth as a Singleton class.

Replies

Hello Marc,
Did you found a solution?
I have the same problem on iOS 12.4.1. On the previous iOS versions connection is stable

Hi, not yet.

Hi anyone has solution for this?

I saw this issue very often on my iPad 6th Gen, running iOS 13.1

Found solution for me.

Last message:

https://lists.apple.com/archives/bluetooth-dev/2013/Apr/msg00154.html