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.

Changing advertising time



Hi,

In the demo project advertising is specified in the "simpleBLEPeripheral.c" as:

static uint8 advertData[B_MAX_ADV_LEN] = 

  0x02,   // length of this data

  0x01,   // AD Type = Flags

  0x05,   // Limited Discoverable (advertises for 30 seconds at a time)

          // and BR/EDR Not Supported

};

What is the data format of these fields? I found the Flag field definition in the Bluetooth spec. but the last field (0x05) I haven't found.

Can I change the advertise time? I tried to change it to 0x04 and 0x06, but that resulted in a indefinite advertise time.

 

Regards,

Niels

  • A peripheral device can either be limited discoverable (advertises for 30 seconds), or general discoverable (indefinitely advertises). A value of 0x05 indicates limited discoverable, and a value of 0x06 indicates general discoverable.

     

    More information on discoverable modes can be found in the Bluetooth 4.0 spec, Volume 3, Part C (GAP), section 9.2. More information on the advertisement data can be found in Volume 3, Part C (GAP), section 11.1.

  • Thanks!

    So, the 0x01 indicates that a AD flag type follows and the 0x05 indicates that the flags 'LE Limited Discoverable Mode' and 'BR/EDR Not Supported (i.e. bit 37 of LMP Extended Feature bits Page 0)' are set.

    Is the 30 sec. advertise time then part of the TI BLE implementation and can it be changed?

  • Niels Pryds Rolsted said:

    Thanks!

    So, the 0x01 indicates that a AD flag type follows and the 0x05 indicates that the flags 'LE Limited Discoverable Mode' and 'BR/EDR Not Supported (i.e. bit 37 of LMP Extended Feature bits Page 0)' are set.

    Is the 30 sec. advertise time then part of the TI BLE implementation and can it be changed?

    The BT spec calls for a maximum advertisement time of 30.72s for limited discoverable mode, and this the amount of time the BLE stack will advertise for. It is possible, though, for the application or a profile to stop advertising at any time before the full 30.72s is up. In the SimpleBLEperipheral and KeyFobDemo projects (if you use the CC2540DK-MINI keyfob slave configuration), the device will advertise the fully 30.72s when the button is pressed once, but if the button is pressed again it will stop. You could put a timer in your application that disables advertising at some point before the 30.72s is up.

  • Hi Willis 

    Thanks for the information and references.

    Just a note however; based on on your references it would appear that the 30.72 second advertising time is the minimum time and not the maximum time. It also appears to be a required value as opposed to a recommended value. So although one can switch off the advertisement if one was being a stickler for conforming to spec the 30.72 time is required.

     

    30seconds seems an excessive amount of time in a low power device especially in environments where both entities are know and controlled as in telemetry applications where my sensors are only ever going to communicate with my telemetry devices.

     

  • Found this vol3 -parc -sec 11

    Devices shall remain in the limited discoverable mode no longer than
    TGAP(lim_adv_timeout).
  • Hi,

    I am using the following code for the Advertisements to toggle b/w START & STOP..

    the timer is not working properly..pls suggest me the changes that i need to include in the code..//

    7331.BroadcasterEI.c