3 Replies
      Latest reply on Sep 26, 2019 10:40 AM by nbt
      marc12 Level 1 Level 1 (0 points)



        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.