- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
An additional question to Directed Advertising .
>>> Assume the following setting for "direct" advertising:
>>> low_direct_adv_interval = 0.5s
>>> low_direct_adv_duration = 10s
>>>
>>>
>>> The device will then send 1 adv event (three beacons) every 0.5s and repeat it for 10s?
Does it apply to high_direct_adv_interval as well?
Best,
Wataru
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi wataru_sugimoto
There is no problem using this function if it is giving you the behavior you want. When using blecm_setAdvParam beware that no timers are setup. It is a one-shot event (high interval for 1.28s duration) and will not restart until you recall the function. Additionally, blecm_setAdvParam and bleprofile_Discoverable should not be used at the same time.
Jacob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, this is correct. The interval refers to the time in between advertising events, while the duration is the time over which we will repeat the advertising event interval.
These parameters are in the same exact format for high_undirect_adv_duration, high_undirect_adv_interval, low_undirect_adv_duration, low_undirect_adv_interval, high_direct_adv_duration, high_direct_adv_interval, low_direct_adv_duration, and low_direct_adv_interval.
Jacob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Jacob,
Excuse me for one additional question, what if I want to specify 30ms interval for high directed advertising, is the following acceptable?
high_direct_adv_interval = 0.03,
Best,
Wataru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can specify 30ms for high directed advertising interval as below.
high_direct_adv_interval = 48; // 0.625[ms] * 48[slot] = 30[ms]
(*) The format of high_direct_adv_interval is UINT16.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
>> (*) The format of high_direct_adv_interval is UINT16.
Somehow I completely missed this... Thanks!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Setting high directed adv event interval in slots seems to be actually setting in seconds.
For instance with the below setting, high directed adv interval event occurs every 6 seconds.
/*.high_direct_adv_interval =*/ 6
Is there any other way to configure directed adv event interval that is less than 1 second?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
blecm_setAdvParam() can set directed advertise event interval in milliseconds.
Is there more official way of achieving the same result that doesn't involve low level API?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Wataru,
I checked the code and captured the air package, please ignore the ".high_direct_adv_interval and .low_direct_adv_interval", it's a timer interval to re-start the directed ADV.
About the blecm_setAdvParam(), the paramter "interval" is to set the advertise event interval, but it isn't available for directed ADV. In the BT Core Spec, the following description about HCI command "LE Set Advertising Parameters Command". So I think link layer decide the advertisement event interval of direct ADV.
----------------------------------------------------------------------------------------
For high duty cycle directed advertising, i.e. when Advertising_Type is 0x01(ADV_DIRECT_IND, high duty cycle), the advertising_Interval_Min and Advertising_Interval_Max parameters are not used and shall be ignored.
---------------------------------------------------------------------------------------
About the advertisement event interval of direct ADV, have the following description in in BT Core Spec.
---------------------------------------------------------------------------------------
In low duty cycle directed advertising mode, the time between the start of two consecutive ADV_DIRECT_IND PDUs within an advertising event shall be less than or equal to 10 ms.
In high duty cycle directed advertising mode, the time between the start of two consecutive ADV_DIRECT_IND PDUs sent within an advertising event shall be less than or equal to 3.75 ms.
---------------------------------------------------------------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The expected output of directed advertising on 20736 and 20737 using blecm_startAdv is a preset one-shot event that advertises on as fast an interval as possible for a duration of exactly 1.28 seconds. This is per the 4.0 spec. The 4.1 spec added optional changes to this scheme.
Using bleprofile_Discoverable, we assign our own "interval" and "duration" on top of those pre-defined ones. In doing so, we're simply setting app timers to restart that 1.28 second, high interval advertisement once every timer callback (re-calling blecm_startAdv every timer callback). In your case you defined the timer interval to be 6 seconds, so we expect that you see a 1.28 second duration, high interval advertising state every 6 seconds for as long (in seconds) as you defined the duration to be.
Does this confirm the output you're seeing?
Jacob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi jakewtorres
> we expect that you see a 1.28 second duration, high interval advertising state every 6 seconds for as long (in seconds) as you defined the duration to be.
This I'd say is exactly what I have observed under my environment.
BTW, with bleprofile_Discoverable(), could only go as low as 2 second for .high_direct_adv_interval.
With blecm_setAdvParam(), three consecutive ADV_DIRECT_IND PDUs every 30 milliseconds is possible.
This is my end customer's request. Is it safe to tap this HCI command level API?
Best,
Wataru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi wataru_sugimoto
I made the sample to introduce the direct adv on 2073x SDK.
My direct adv setting as below.
/*.high_direct_adv_interval =*/ 5, // seconds
/*.low_direct_adv_interval =*/ 10, // seconds
/*.high_direct_adv_duration =*/ 30, // seconds
/*.low_direct_adv_duration =*/ 60, // seconds
Captured the 2073x current waveform in direct adv as below.
The x-axis is time(unit second), the y-axis is current( unit mA). The large current pules in 90s is the current for sending direct adv, width of pules is 1.28s; the little current pules is 1s timer.
The high direct adv operation from 0s to 30s(high_direct_adv_duration), send 1.28S direct adv every 5s(high_direct_adv_interval).
The low direct adv operation from 30s to 90s(low_direct_adv_duration), send 1.28S direct adv every 10s(low_direct_adv_interval).
Follow the core spec 4.1 when sending 1.28s direct adv.
BR,
Ocean
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi wataru_sugimoto
There is no problem using this function if it is giving you the behavior you want. When using blecm_setAdvParam beware that no timers are setup. It is a one-shot event (high interval for 1.28s duration) and will not restart until you recall the function. Additionally, blecm_setAdvParam and bleprofile_Discoverable should not be used at the same time.
Jacob