[ 
https://issues.apache.org/jira/browse/MYNEWT-508?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15746192#comment-15746192
 ] 

William San Filippo commented on MYNEWT-508:
--------------------------------------------

How to enable multiple advertising instances:

There are two system configuration variables that need to be set to 
enable/disable multiple advertising instances. These definitions are in 
net/nimble/syscfg.yml. As always, these variables can be overridden in the app 
or target; I do not suggest modifying the definitions in net/nimble/syscfg.yml.

BLE_MULTI_ADV_SUPPORT: needs to be set to 1 to enable multuiple advertising 
instances.
BLE_MULTI_ADV_INSTANCES: This is the number of advertising instances in 
addition to the default advertising instance. If this number is 0, there will 
be only one advertising instance. If this number is 4, there will be 5 
advertising instances. The "standard" HCI commands always reference advertising 
instance 0.

Changes to the code:
I think the main change to the code is in the scheduler. The old scheduler 
would prioritize advertising over everything else. If a connection event 
overlapped with an advertising event, the connection event would get removed 
from the scheduler and re-scheduled for the next event. Given that we only had 
one advertising instance, the chance that this would cause a disconnection is 
very small. After some discussion, the community decided it would be better to 
not advertise if advertising would cause a connection to fail. The code now 
attempts to find time to advertise by changing the random advDelay to 
accommodate the advertising instance and any other scheduled events that might 
overlap. If advertising events overlap, they should be dealt with in a 
round-robin fashion (at least that is the intent).

> Allow for multiple advertising instances
> ----------------------------------------
>
>                 Key: MYNEWT-508
>                 URL: https://issues.apache.org/jira/browse/MYNEWT-508
>             Project: Mynewt
>          Issue Type: New Feature
>          Components: Nimble
>    Affects Versions: v1_0_0_beta1
>            Reporter: William San Filippo
>            Assignee: William San Filippo
>             Fix For: v1_0_0_rel
>
>         Attachments: Android-6.0-Bluetooth-HCI-Reqs.pdf
>
>
> The nimble controller will support multiple advertising instances. This 
> support follows the Android 6.0 Bluetooth HCI requirements (document is 
> attached to this ticket).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to