1

I’m new to bluetooth development and I’m working on a project that require connecting to a BLE. Currently I have multiple problem that I will list them:

  • The app (some times) keep disconnecting from Peripheral with three different reasons:

    • The first one is "The connection has timed out unexpectedly.” with error code = 6.
    • The second one is unclear to me, error object is null.
    • The last one is "Unknown error".

    how can I solve such a problems? the disconnection interval between each one is ~10 sec., after the disconnection, I’m trying to reconnect again, which will reconnect then disconnect, how can I solve such an issue?

  • While debugging the app using xCode, the above errors does not appear, I can check these error on adhoc version or release version (from debug log from the devices that uses the app), but in xCode I can see a warning:

    "[CoreBluetooth] WARNING: Characteristic <CBCharacteristic: 0x1706aab00, UUID = FFF3, properties = 0x8, value = (null), notifying = NO> does not specify the "Write Without Response" property - ignoring response-less write”

    Is this warning relative to the disconnection problem? or does this warning meaning that the app will disconnect from Peripheral at some point?

  • If I don’t stop scanning for Peripheral, will this create an issue for me? currently I keep scanning for Peripheral despite I’m connecting to one, the only case I stop scanning is when the app is terminated.

Scar
  • 3,460
  • 3
  • 26
  • 51
  • For the second point: `properties = 0x8`, means the characteristic properties is set to `CBCharacteristicPropertyWrite`, meaning with Response. So when you write to it, you need to writeWithResponse, not writeWithouthReponse. – Larme Dec 19 '16 at 09:11
  • @Larme you are right, I've used writeWithResponse and the warning gone, but does this cause the connection to drop, I can't verify that because the issue is happening with a testers. – Scar Dec 19 '16 at 12:53
  • Did you manage to fix this problems? Im like in the exact same situation. I also keep the scanning while connected – Sachi Cortes Apr 29 '21 at 19:13
  • @SachiCortes unfortunately not, the tester did not report the issue again and I've didn't continue investigating the issue, sorry. – Scar Apr 29 '21 at 19:44

0 Answers0