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.

CC2650: Manual trigger for advertisement

Part Number: CC2650
Other Parts Discussed in Thread: BLE-STACK

I'm trying to find out if there is a way to trigger BLE advertisements manually, instead of this being handled periodically by the BLE-stack? For instance having an interrupt routine that, when run, triggers a single advertisement to be sent?

I've been having a quick look through the BLE sdk code, but haven't been able to pinpoint where the advertisements are actually being scheduled - but I have a suspicion that this is happening in parts of the stack where the source is not available?

Any pointers or ideas (or just a confirmation if this not possible) are highly appreciated - thanks in advance!

  • Hi,

    It is possible, though there is no example code for this. Please see the following thread: e2e.ti.com/.../554342

    -Nathan
  • Hello Simon,

    No, this is handled by the link layer in the ble stack which is based on library code(no source). But you can try to start advertising and set up a callback which will notify the application when an advertisement event has completed (refer to HCI_EXT_AdvEventNoticeCmd in the TI_BLE_Vendor_Specific_HCI_Guide.pdf) and then stop the advertisement. You control the advertisement state with the following command:

    uint8_t advertEnabled = TRUE; // Turn on Advertising
    GAPRole_SetParameter(GAPROLE_ADVERT_ENABLED, sizeof(uint8_t),&advertEnabled);

  • Hi Nathan,

    Thanks! I actually already had a look at that thread - and I should probably have been a bit more specific in my question - but I'd like to be able to trigger the advertisements with as little delay as possible, basically bypassing the stacks scheduling of these, and it doesn't sound as if the linked solution (turning on advertising, and then turning it off again as soon as the first advertisement has been sent out) accomplishes this, sadly. I'll have to try it out to see what the delay actually is though.
  • Hi Eirik,

    Thanks! That confirms my suspicion then. As replied to Nathan, I'd like to be able to trigger the advertisements with as little delay as possible though, basically bypassing the stacks scheduling of these - do you know what the expected delay would be with your suggested method? I presume that the scheduling is in full effect here, including the random delay?
  • If your end application is beacon, then you can take a look at our beacon example made by only using RF driver. In this example, you will have full control of the advertising time. github.com/.../beacon_rfdriver

    If your end application is more than that, then you will have to use our BLE stack and follow Eirik's suggestion