You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2019/08/07 16:16:03 UTC
[GitHub] [mynewt-nimble] ccollins476ad commented on issue #211: host:
Unconditionally disable adv on controller
ccollins476ad commented on issue #211: host: Unconditionally disable adv on controller
URL: https://github.com/apache/mynewt-nimble/pull/211#issuecomment-519167241
@dhrishi
> 1. Can we assume that once the connection is complete, the advertisement should stop in all the cases. I mean, is there anything related to this in the spec? If so, I can directly remove stop adv call when connection is complete.
Yes - if a peer initiates a connection to your device, your device will always cease to advertise.
Re: where this is specified - I'm a bit rusty with the Bluetooth spec; you might want to ask this question on the #nimble slack channel. That said, here is my understanding: the link layer is defined as a state machine. Among others, states in this FSM are: "Advertising" and "Connection". In the 4.2 spec, 6.B.4.4.2.3 states:
> If the advertiser receives a CONNECT_REQ PDU that contains its device address, from an initiator allowed by the advertising filter policy, the Link Layer shall exit the Advertising State and transition to the Connection State in the Slave Role...
so the implication is that the controller stops advertising when a peer initiates a connection. I don't see any language in the spec indicating what the host should do. It might be permissible for the host to automatically initiate a second advertising procedure as soon as the peer connects, but I would be surprised if any hosts actually do this.
> 2. Are you aware if NimBLE controller would also return the same error code in such a scenario?
No, the NimBLE controller always returns success when the host attempts to stop advertising (even if the device is not currently advertising). I don't believe the spec mandates what to do in this case.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services