This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Scanning and Broadcasting while in Peripheral (Slave) Role

Dear Community!

I have a kind of important question about the possible role combinations, e. g. the one mentioned in the subject.

As I have seen in the "gap.c" there is no way to initialize this kind of combo-role.

But in the "peripheralBroadcaster.c" I noticed, that the used gapRole_profileRole is GAP_PROFILE_PERIPHERAL, and 
advertisements can still be enabled, while in connection. Based on this, if I set the  gapRole_profileRole, to
(GAP_PROFILE_PERIPHERAL | GAP_PROFILE_OBSERVER) I can achieve the wanted combination of roles, in which, I can 
"simultaneously" scan, advertise, and remain in the connection.

Is my assumption correct, or there is something that I hasn't noticed? 

  • Hi Andras,

    I believe you are correct in your assumption. Our stack supports the multiple roles that is part of the core specification. There are several threads at this forum on the matter. 

    Best Regards

  • Hi Nick,

    Thank you for your fast answer. I have still one question regarding to the "peripheralBroadcaster" combo-role sample application.

    As I have seen, the broadcasting functionality is simply achieved by turning on advertisments (and setting up the time constants), while
    the module is in peripheral role (LL connection state).

    The device is initialized with the gapRole_profileRole=GAP_PROFILE_PERIPHERAL value, and by the way there is no
    combination supported by the stack (gap.c), which suits the peripheral-broadcaster combination.

    Is this all because there is actually no need for that combination support, because the peripheral role itself "contains"
    the advertising, connection, and standby LL states? So the LL statemachines can be instantiated "inside" the Peripheral Role (GAP).

    Sorry for the fuzzy phrasing. I just want to understand how that actually works, and I know that it might be copyright (BLE stack) concern...