Different SCAN performance

11 posts / 0 new
Last post
alex
Offline
Last seen:2年5个月前
加入:2014-08-20 03:39
Different SCAN performance

我们在下面测试了两个雪彩酸:
答:使用Connection Manager +(SDK)Monitor_fe_usb进行测试
B: test with the scan code developped based on smarttag ref design codes

both A and B run with dialog BLE USB dongle seperately to scan some BLE node which keep always advertising...

test result:
with A: by clicking "scan" button of connection manager, each time the log window can quickly(say within ~1 second printing on screen) report/print advertise data by the BLE advertising node
with B: we set breakpoint at first line within gapm_adv_report_ind_handler();
then click the run button in Keil.
each time click "run", it just take 1 seconds to 10 seconds(it just differs for each "run" to get the
广告数据扫描并停止在断点。)

in our application:
- 我们有以下配置为扫描模式配置:

空白app_scanning(空白)
{

// create a kernel message to start the scanning
struct gapm_start_scan_cmd * msg =(struct gapm_start_scan_cmd *)ke_msg_alloc(gapm_start_scan_cmd,task_gapm,task_app,gapm_start_scan_cmd);
// Maximal peer connection
msg->mode = GAP_GEN_DISCOVERY;
// msg->mode = GAP_OBSERVER_MODE;
msg->op.code = GAPM_SCAN_ACTIVE;
msg->op.addr_src = GAPM_PUBLIC_ADDR;
msg-> filter_duplic = scan_filt_duplic_en;
msg->间隔= 10;// app_scan_interval;
msg->窗口= 5;// app_scan_window;

// Send the message
ke_msg_send(msg);
}

void app_configuration_func(ke_task_id_t const task_id,struct gapm_set_dev_config_cmd * cmd)
{
// Operation select
cmd->操作= gapm_set_dev_config;

// Device Role
cmd->role = GAP_CENTRAL_MST;

//Defined maximum transmission unit
cmd->max_mtu = 160;  //APP_CFG_MAX_MTU
}

- in gapm_cmp_evt_handler(), we have below lines to make it keep scanning.
case GAPM_SCAN_PASSIVE:
案例Gapm_scan_active:
{
app_scanning();
}

We do not know what is about the connection manager "boot as Central" procedure, but the test result is so different ( the connection manager scan the node quickly...but our codes scan the node so slow...), pls suggest what is the major issue with it and how we should fix it.

谢谢!

JE_Dialog
Offline
Last seen:1 month 21 hours ago
工作人员
加入:2013-12-05 14:02
Hello Alex, i have assined

Hello Alex, i have assined this to our local team in China to follow up with you. Best regards, JE_DIalog

alex
Offline
Last seen:2年5个月前
加入:2014-08-20 03:39
Not yet fix it...

Not yet fix it...
We tested below further:
Connection Manager + CM firmware Scan get advertise data quickly ( within 1~2s each scan);
Host app + Monitor_fe_usb Scan get advertise data slow ( from 1s~10s each scan )
SPS_Host Scan get advertise data slow ( from 1s~10s each scan ).
(in the tests, we set the advertise node adv_interval to 20ms and 100ms seperately, but make no difference with the test results)
So it looks for SDK or reference design example software(Monitor, SPS), the scan is slow. for CM, it's quick.
We'd need quick scan in our application, so please help suggest what we should do.

谢谢!

alex
Offline
Last seen:2年5个月前
加入:2014-08-20 03:39
It's one week past...we do

It's one week past...we do would like get some help here.
in other words, we need a guidance on how to SCAN the peer broadcasting ADV_DATA within short time(say 500ms?)...or is it feasible or not?

Joacimwe
Offline
Last seen:1年5个月前
格鲁鲁
加入:2014-01-14 06:45
You could try to change your

You could try to change your scan window/interval.
扫描窗口是实际扫描的时间有多长时间,而扫描间隔是在扫描窗口的每个开始之间等待的时间长度,即扫描间隔减去扫描窗口是每次扫描之间睡眠的时间。如果设置扫描窗口等于扫描间隔,则使用缺少广告数据包的最低可能性扫描。当然,这消耗了更多的电流。
要求是扫描窗口<=扫描间隔。
Try to set your scan window to something like 50 instead of 5.
Also, the time for discovery will also depend on your advertisement interval on the peripheral. A lower advertisement interval means lower discovery times but uses more current from your battery on the peripheral.

alex
Offline
Last seen:2年5个月前
加入:2014-08-20 03:39
Thank you Joacimwe...it's

Thank you Joacimwe...it's fixed after I set interval to 1362 and window to 1320. Pls close this ticket.

alex
Offline
Last seen:2年5个月前
加入:2014-08-20 03:39
We did more tests...below

We did more tests...below parameters set in the test:
Advertise side:
-: adv_interval = 0x20; // we do not change the value 0x20 after this initialization ; we also tried 0x40, 0x100, etc.
-: cmd->op.code = GAPM_ADV_UNDIRECT;
cmd-> op.addr_src = gapm_public_addr;
cmd->intv_max = adv_interval;
cmd->intv_min = adv_interval;
cmd->channel_map = APP_ADV_CHMAP; //0x07;
cmd->info.host.mode = GAP_GEN_DISCOVERABLE;

扫描侧:
-: we tried different window/interval settings:
// msg->间隔= 10;// app_scan_interval;
// msg->窗口= 10;// app_scan_window;
// msg->interval = 1336; //APP_SCAN_INTERVAL;
// msg->窗口= 1320;// app_scan_window;
msg->interval = 100; //APP_SCAN_INTERVAL;
msg->window = 100; //APP_SCAN_WINDOW;

-: in gapm_adv_report_ind_handler(), we will cancel scanning; in gapm_cmp_evt_handler(), we restart scanning;

in most test cases (say 8 out 10 tests, we change adv data each time, so to read the scan data update ), the scan can get the adv within 1 second, but it will still need 2 seconds or more time to successfully scan the adv data.
We need each peripheral adv data update to be scanned by central within 1 second ( 500ms will be better ), pls kindly suggest any other approaches we can try to get improved? thank you.

alex
Offline
Last seen:2年5个月前
加入:2014-08-20 03:39
我会更加欣赏

我会更加欣赏guidance to improve...thanks!

alex
Offline
Last seen:2年5个月前
加入:2014-08-20 03:39
请帮忙...谢谢!

请帮忙...谢谢!

alex
Offline
Last seen:2年5个月前
加入:2014-08-20 03:39
the problem still pending..

the problem still pending...Just need factory guidance/advise, pls kindly support. Thanks!

JE_Dialog
Offline
Last seen:1 month 21 hours ago
工作人员
加入:2013-12-05 14:02
Hello Alex, I will arrange

你好亚历克斯,我将安排当地的人联系.. Br Je_Dialog