What is the duty cycle setting used by wiced_bt_ble_observe()?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
AxLi_1746341
Level 7
Level 7
10 comments on KBA 5 comments on KBA First comment on KBA

Hi,

When use wiced_bt_ble_scan() there is a parameter call scan_type,

so we can set BTM_BLE_SCAN_TYPE_HIGH_DUTY or BTM_BLE_SCAN_TYPE_LOW_DUTY.

And I can find the corresponding scan interval/window/duration in wiced_bt_cfg_settings_t.

However, with wiced_bt_ble_observe(), I don't find such duty cycle setting.

So I have no idea what is the duty cycle setting used by wiced_bt_ble_observe().

0 Likes
1 Solution
Anonymous
Not applicable

Axel, you are right.

Just confirmed that the wiced_bt_ble_observe() API sets both the scan window and scan interval to 18*1.25ms = 22.5ms. Also, it uses Active Scanning.

I checked the source, you cannot change these values from application.

View solution in original post

0 Likes
7 Replies
Anonymous
Not applicable

wiced_bt_ble_observe is used to put the device in an Observer role: performs Passive scanning and uses the default values of 2048 (2048*1.25ms = 2560ms)  for scan interval and 18 (18*1.25ms = 22.5ms) for scan window.

Why not make it allow to set duty cycle setting rather than use default settings?

0 Likes
Anonymous
Not applicable

I guess the default values were considered optimal. We will try to enhance the API based on the requests.

Thanks for your feedback.

0 Likes

yssu wrote:

wiced_bt_ble_observe is used to put the device in an Observer role: performs Passive scanning and uses the default values of 2048 (2048*1.25ms = 2560ms)  for scan interval and 18 (18*1.25ms = 22.5ms) for scan window.

yssu

Your reply does not match what I observed.

1) With ENABLE_BT_PROTOCOL_TRACES enabled, I can find below log:

   It shows Scan Interval : 18, Scan Window : 18

SENT Command to HCI. Name: HCI_LE_Write_Scan_Parameters  (Hex Code: 0x200b  Param Len: 7) Ctrl(0)

Parameters

                               Scan Type : Active Scan (01)

                           Scan Interval : 18 (0x0012)

                             Scan Window : 18 (0x0012)

                            Address Type : Public (00)

(0x00)

RCVD Event from HCI. Name: HCI_Command_Complete  (Hex Code: 0x0e  Param Len: 4) Ctrl(0)

Parameters

                      Num HCI Cmd Packets : 1 (0x01)

                                Cmd Code : 0x200b  (HCI_LE_Write_Scan_Parameters)

                                  Status : Success (0x00)

2) I don't think the default is Passive scanning, it looks like it is always Active scanning in sdk-6.1.

   I tried changing .scan_mode = BTM_BLE_SCAN_MODE_PASSIVE in .ble_scan_cfg but it does not work.

   (It was working in sdk-6.0.1 or older sdks)

Can you double check these?

0 Likes
Anonymous
Not applicable

Axel, you are right.

Just confirmed that the wiced_bt_ble_observe() API sets both the scan window and scan interval to 18*1.25ms = 22.5ms. Also, it uses Active Scanning.

I checked the source, you cannot change these values from application.

0 Likes

yssu wrote:

Axel, you are right.

Just confirmed that the wiced_bt_ble_observe() API sets both the scan window and scan interval to 18*1.25ms = 22.5ms. Also, it uses Active Scanning.

I checked the source, you cannot change these values from application.

What do you mean by "cannot change these values from application"?

The Active Scanning can be enable/disabled in sdk 6.0.1 and ealier sdks.

It's clearly a regression.

yssu wrote:

I checked the source, you cannot change these values from application.

The interval, window, active/passive, etc. are configurable if using wiced_bt_ble_scan().

So why these values cannot be changed/configured from application if using wiced_bt_ble_observe().

The same question was asked 2 years ago on the forum, no improvement so far. That is quite disappointed.

0 Likes