This PR contains two changes to address a bug that has been observed 
occasionally.  The bug is: sometimes the controller thinks advertising is 
active while the host thinks it is not.  This bug causes all subsequent 
advertise attempts to fail.

#### Change 1- host: Unconditionally disable adv on controller

Prior to this commit, the host would only honor a request to stop advertising 
if its state indicated that advertising is active.  If advertising were not 
active, `ble_gap_adv_stop()` would abort early with the `BLE_HS_EALREADY` error 
code.

Now, the host always attempts to disable advertising when requested.  It does 
not inspect its own state at all.

#### Change 2- host: Add debug setting for verifying ll state

This commit adds a new syscfg setting: `BLE_HS_DEBUG_CONTROLLER`.  When this 
setting is enabled, the host performs some extra assertions of the expected 
controller state.  This setting assumes the host has direct access to the 
controller's internal state, so it should only be used in combined host 
controller setups.

[ Full content available at: https://github.com/apache/mynewt-nimble/pull/211 ]
This message was relayed via gitbox.apache.org for [email protected]

Reply via email to