cancel
Showing results for 
Search instead for 
Did you mean: 

BlueNRG-LP maximum advertisement delay.

jbie
Associate II

Hello,

When I try to set advertisement delay more than 10000ms, the function aci_gap_set_advertising_configuration return an error 0x82 (BLE_STATUS_INVALID_PARAMS).

According to the function declaration, it must be ok:

/*
....
* @param Primary_Advertising_Interval_Min Minimum advertising interval for
 *        undirected and low duty cycle directed advertising. Time = N * 0.625
 *        msec.
 *        Values:
 *        - 0x00000020 (20.000 ms)  ... 0x00FFFFFF (10485759.375 ms) 
 * @param Primary_Advertising_Interval_Max Maximum advertising interval for
 *        undirected and low duty cycle directed advertising. Time = N * 0.625
 *        msec.
 *        Values:
 *        - 0x00000020 (20.000 ms)  ... 0x00FFFFFF (10485759.375 ms)
...
*/

Here is my function:

BLE_ConfigureDeviceAdvertising(uint32_t adv_interval)
{
ret = aci_gap_set_advertising_configuration(0, GAP_MODE_GENERAL_DISCOVERABLE,
												  ADV_PROP_CONNECTABLE|ADV_PROP_SCANNABLE|ADV_PROP_LEGACY,
												  (adv_interval*1000)/625,(adv_interval*1000)/625,
												  ADV_CH_ALL,
												  PUBLIC_ADDR,NULL,
												  ADV_NO_WHITE_LIST_USE,
												  0, /* 0 dBm */
												  LE_1M_PHY, /* Primary advertising PHY */
												  0, /* 0 skips */
												  LE_1M_PHY, /* Secondary advertising PHY. Not used with legacy advertising. */
												  0, /* SID */
												  0 /* No scan request notifications */);
...
}

Do you have some idea?

Thank you

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @jbie​ ,

Agree maximum is not exactly 10sec (this is a common language we used).

Maximum allowed according to BT core spec is 10.24sec for the legacy advertising you are using.

See : BT core spec 5.2 - §7.8.5 : LE Set Advertising Parameters command

0693W00000SvRUTQA3.png 

The 10,485 value you are mentioning refer to the "extended advertising".

Coming back to your point, this maximum of 10.24sec is indeed supported by BlueNRG-LP stack in accordance with BT core spec.

You can test ADV_interval = 16384 (10.24sec = 16384*0.625)

You can check our "Beacon example" from SDK for more details.

Regards,

Sebastien.

View solution in original post

7 REPLIES 7
Sebastien DENOUAL
ST Employee

Hi @jbie​ ,

This is expected behavior considering 10sec is the maximum advertising interval allowed by Bluetooth spec.

Regards,

Sebastien.

jbie
Associate II

Edit: Response not correct

I understand.

But is there any way to bypass this limitation ? I want to make a very low power device.

The BLE link will not be with a smartphone but another proprietary device.

 

Regards,

 

Jean

Hi @jbie​ ,

As BlueNRG-LP is a certified Stack => by default you can not extend advertising interval outside BLE spec (between 20msec and 10sec)

Using timer (or VTimer), you may stop/start advertising. That could be valid alternative.

Regards,

Sebastien.

Hello Sebastien,

There is an interpretation error from ST. The Core spec 5.2 says 10485 seconds and not 10 seconds.

0693W00000SvRDcQAN.png 

Regards,

Jean

Hi @jbie​ ,

Agree maximum is not exactly 10sec (this is a common language we used).

Maximum allowed according to BT core spec is 10.24sec for the legacy advertising you are using.

See : BT core spec 5.2 - §7.8.5 : LE Set Advertising Parameters command

0693W00000SvRUTQA3.png 

The 10,485 value you are mentioning refer to the "extended advertising".

Coming back to your point, this maximum of 10.24sec is indeed supported by BlueNRG-LP stack in accordance with BT core spec.

You can test ADV_interval = 16384 (10.24sec = 16384*0.625)

You can check our "Beacon example" from SDK for more details.

Regards,

Sebastien.

Hello Sebastien,

Thank you for the precision.

Regards,

Jean

jbie
Associate II

Hello @Sebastien DENOUAL ,

 

I have another question related to this topic.

Do you have a maximum duration of advertisement ?

I want to do a very low power device, so I have an advertisement every 10 seconds for an infinity amount of time.

After around 2.5 hours (900 advertisements), the Bluetooth stops advertising. Do you have any idea ?

 

Regards,

Jean