AnsweredAssumed Answered

BLE Disconnect fails

Question asked by Michael Brudevold on Apr 27, 2017
Latest reply on Jan 19, 2018 by Gerardo Rodríguez

I'm using an MKW31Z.  Might be related to MKW30Z BLE connection flood protection but different processor so unsure.

 

I'm experiencing an issue where on occasion the call to Gap_Disconnect fails to produce a gConnEvtDisconnected_c callback event.  If I call Gap_Disconnect again, I get an internal error of gHciUnknownConnectionIdentifier_c, which indicates that the disconnect occurred but no gConnEvtDisconnected_c callback.

 

If I ignore the fact that I didn't get the callback and go ahead and call Gap_SetAdvertisingParameters, I then receive no advertising callbacks.

 

The usual flow is:

gAdvertisingDataSetupComplete_c

gAdvertisingParametersSetupComplete_c

gAdvertisingStateChanged_c

gConnEvtConnected_c

gConnEvtParameterUpdateComplete_c

gConnEvtParameterUpdateComplete_c

gConnEvtDisconnected_c

 

And this will repeat until I don't get the gConnEvtDisconnected_c event.  At that point, I can only achieve the gAdvertisingDataSetupComplete_c event, but not the other advertising events.

 

I have not found any pattern of number of connects/disconnects or advertising calls that trigger this.  My code is based off the heart rate sensor example, but I don't currently have a working test sample.  Using version 1.0.2 of the connectivity software.

Outcomes