BLE disconnection issues and reasons

959 views Asked by At

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.

0

There are 0 answers