On Thu, Jun 30, 2016 at 12:39:00PM -0700, Simon Ratner wrote: > Hi devs, > > I've been looking at the reasons I get in BLE_GAP_EVENT_DISCONNECT to make > sure I cover all edge cases, and this is what I see (on an nrf51-based > board): > > switch (ctxt->disconnect.reason) { > case BLE_HS_ENOTCONN: > /* I see this when the local host has terminated the connection. > Feels like this should > * be BLE_HS_HCI_ERR(BLE_ERR_CONN_TERM_LOCAL) instead, per spec.
I thought reporting the HCI error code for locally-terminated connections would be confusing. However, I have to admit I am not really sure what I was thinking there... consistently reporting the HCI reason code seems to make more sense. If there are no objections from anyone else, I will make this change to develop shortly. Thanks, Chris