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.

Fast Advertising Interval



I'm trying to broadcast advertisements faster than every 100ms using the simpleBLEBroadcaster. There's no problem setting the interval greater than 100ms. But when I set DEFAULT_ADVERTISING_INTERVAL to less than 160 I get no broadcasts at all. Is there something I'm missing?

Don.

  • Hi Djindra,
    Broadcasting faster than 100ms is prohibited by the specification, when using non-connectable advertisements. Use connectable advertisements instead;

    uint8 advType = GAP_ADTYPE_ADV_SCAN_IND;
    GAPRole_SetParameter( GAPROLE_ADV_EVENT_TYPE, sizeof( uint8 ), &advType );

    Best Regards
    Joakim
  • Using GAP_ADTYPE_ADV_SCAN_IND you don't achieve smaller advertising interval. You may need to use GAP_ADTYPE_ADV_IND or GAP_ADTYPE_ADV_HDC_DIRECT_IND.
    But I'm trying the same thing and I can't get it work with advertising interval shorter than 100ms....
    As said by Joakim it is not a device restriction, but a ble protocol restriction.

    copied from here (electronics.stackexchange.com/.../ble-scan-interval-and-window):

    According to the Bluetooth 4.0 core specification the time period of 'advertising events' are as shown below for the different types of advertising packets:

    ADV_IND: General connectable and scannable advertisement packets' time period ranges from 20 ms to 10.24s in steps of 0.625ms.

    ADV_DIRECT_IND: Directed advertisement packets' time period is less than or equal to 3.75 ms. This kind of advertisement events can be happen consecutively only for 1.28s. This is for a establishing a quick connection (if there is a device listening).

    ADV_NONCONN_IND: Non-connectable and non-scannable advertisement packets' time period ranges from 100 ms to 10.24s in steps of 0.625ms.

    ADV_SCAN_IND: Scannable advertisement packets' time period ranges from 100 ms to 10.24s in steps of 0.625ms.

    So, unless you the kind of device you are scanning for a good approach would be continuously to scan for around 11 (max) seconds to see if there are any advertising devices around. How often to do this will depend on the amount of battery or power available.

    Hope this helps.