3 Replies
      Latest reply on Jul 27, 2019 12:40 AM by Claude31
      asehgal Level 1 Level 1 (0 points)



        I am using Swift 5 to make an iOS application, which connects to the BLE device to read characteristic and also write to the characteristic. I am able to read and write conviniently when I hit 'Pair' to 'Bluetooth Pairing Request'. My questions related to this are:


        1. Can I avoid getting this Bluetooth Pairing request and have my app seamlessly connect to the BLE peripheral?
        2. If not, can I get the response of the user to this Bluetooth Pairing request (Cancel/Pair/No response)?
        3. Since my application needs authentication in order to read and write characteristic values, is there a way I can check if authentication is present? (For me calling CBCentralManager.connect(peripheral) connects to the BLE device irrespective or the authentication, but I am not able to read and write if 'Pair' button wasn't initially selected and I would get CBATTErrorDoman, Code=5 "Authentication is insufficient")
        4. I just want user to hit 'Pair', only then user should be able to access other features in the view, otherwise, app should check the authentication. If there is insufficient authentication, I can take it to different view (I can handle this after this point)