9个帖子/ 0新
Last post
兰迪宇
Offline
最后一次露面:2年10个月前
Joined:2015-01-28 08:49
about DSPS advertise

我的项目是修改表单DSP项目。
when I set intv_min and intv_max to 10000,the interval is getting longer,but also I find it's hard to connection.
1.how to solve the problem?
2.how many advertises packets it send after once wakeup?Can I modify it?I think if the value is bigger,it will be easy to connect.
3.这个值可以设置大可以吗?
4.如果两个值是开放的,则效果是什么?

设备:
mt_dialog.
Offline
最后一次露面:3 months 1 day ago
Staff
Joined:2015-06-08 11:34
嗨兰迪宇,

嗨兰迪宇,

1.您将INTV_MIN和INTV_MAX更改为10000ms?如果您在大约10秒内更改了它,那么在您的设备看到外围设备的广告消息后,中央将要等待侦听第二个广告消息,以便发送连接请求,如果有TRAFIC(未能看到下一个广告消息)它也可能等待更长。

2. The advertising command doesn't timeout after waking up and send the advertising command it will advertise as long as you dont cancel the command. Only at the directed advertising there is a timeout. The advertising packets are defined only via the interval set, if you have set it into 10 seconds then you will send 3 advertising messages (one for each advertising channel) every 10 seconds.

3.它约为10.24秒,可以检查此功能的BLE规范。

4.检查此线程的答案http://support.dialog-semicondiondiondum/help-help-help-cant-go-deep-slee ...on post #10.

谢谢mt_dialog.

兰迪宇
Offline
最后一次露面:2年10个月前
Joined:2015-01-28 08:49
1.if I modify the device and

1.如果我修改设备和Central才能配对,那么连接和发送数据将减少时间。如果它是,可以让我成为配对的示例。
2.you said interval?I don't quite understand,Can I change it?if I want change it to every 10 seconds send 10 advertising messges.which parameter need I to change it.
3.I sorry ,my english is not very good.I mean the parameter of intv,the biggest value it can set.becasue I want it sleep about 10minutes
谢谢你

mt_dialog.
Offline
最后一次露面:3 months 1 day ago
Staff
Joined:2015-06-08 11:34
嗨兰迪宇,

嗨兰迪宇,

1. In order for a connection to be established (paired or not) the device has to be awake and listen for requests (connection requests in your case) so if your scanner listens one advertising event and initiate a connection the connenction request will be send by the master at the next advertising event of the peripheral, what you can try is the directed advertising if it suits you, in that case your device will emmit directed advertising events to the scanner in order to get connected (the procedure is power consuming and you can directly advertise only to a specific central with a allready known bluetooth address). So an idea could be to advertise undirectly for a large amount of time and while you dont have an available central bd address, when a central finds your device you can establish a connection (the initial connection will be time consuming for the reasons i ve explained above). After that every time you are unconnected you will directly advertise to that central and you will get connected faster than the undirected advertising procedure. But i repeat that directed advetising is power consuming, stops automatically after 1.28 seconds, hasn't any advertising data (no advertising data means that you are not going to be able to connect to the DSPS android & ios application also you will have to reconfigure the 580 host to accept directed advertising requests and you will have to know the address of your central). You can implement the above with or without security. The above could be a solution depending on your device's use case. Also since from what i can tell you care about low power consumption, what you can do is keep the undirected advertising and gradually increase the advertising interval while there is no activity (being with no connection for quite sometime) or, if there is a possibility you can place a button on the device to increase advertising interval so that the user can force a reconnection with no delays.

2.如果您设置在.intv_min和.intv_max中的值Ms_to_bleslots(10000)的广告间隔will be设置在10秒内,这意味着设备将睡眠约10秒钟,然后退出睡眠模式自动扫描和睡眠。您无法通过广告命令控制广告数据包的数量,您必须实现一个计数器,以计算从您的设备授予的广告消息。

3.广告的最大值是通过规范10.24秒,如果您想要的更多,您必须使用ke_timer来实现自定义广告方案。定时器可以作为最大值为300秒(5分钟),但您可以唤醒并重置该计时器并重新返回睡眠状态。

谢谢mt_dialog.

兰迪宇
Offline
最后一次露面:2年10个月前
Joined:2015-01-28 08:49
因为我想要我的设备

因为我希望我的设备可以使用电池工作3年,因此直接宣传不适合我。虚荣心
你说我可以“实现柜台以计算揭示的广告消息”。
我认为这是一个好主意,我的问题是,但我不知道哪个职位可以改变它。
**************************************
我试图改变它,
A.睡觉
B.Open Printf控制台
c.add a avd_counter ++;在app_easy_gap_undirected_advertsie_start()中
并写一个ARCH_PRINTF
但我发现该函数只执行一次。
It is stranged that my android app can also scaned it.does there have oher position and function
send advertise?
3.我可以实现自定义宣传方案吗?
你能给我一个详细的描述或一个例子吗?
非常感谢你

兰迪宇
Offline
最后一次露面:2年10个月前
Joined:2015-01-28 08:49
dear dialog

dear dialog
i want to use another timer to solve the problem mention above,the code paste here
void adv_timer_fsm(void)
{
静态UINT8_T ADV_STATE = ADV_INIT_STATE;
ARCH_PRINTF(“adv_timer_fsm \ r \ n \ r \ n”);
切换(Adv_state)
{
case ADV_INIT_STATE:
arch_printf("ADV_INIT_STATE\r\n\r\n");
spss_env.adv_tmr_hndl = app_easy_timer(10,spsss_env.adv_timer_cb);
Adv_state = Adv_Modify_State;
休息;
case ADV_MODIFY_STATE:
ARCH_PRINTF(“停止advtise \ r \ n \ r \ n”);
app_easy_gap_advertise_stop();
spss_env.adv_tmr_hndl = app_easy_timer(6000, spss_env.adv_timer_cb ); //Q1
adv_state = adv_cycle_state;
休息;
案例adv_cycle_state:
ARCH_PRINTF(“adv_cycle_state \ r \ n \ r \ n”);
default_advertise_operation();
spss_env.adv_tmr_hndl = app_easy_timer(300, spss_env.adv_timer_cb );Q2
Adv_state = Adv_Modify_State;
休息;
默认:
休息;
}
}

My question is :
Q1:Q1帖子的代码(上面的代码)这是否可以阻止广告和睡眠60岁?60年代之后,设备唤醒
timer of spss_env.adv_tmr_hndl
Q2:the code at Q2 postion(code above) does this code in this postion can start advertise and continued 3s?(I have modified the advertise interval to 100,
这个值的最小值是多少?

我有一个测试,但结果并不是很理想。当连接时,我的从站将数据包发送到掌握,而且大师都有ack.在我收到的地方
ack,我叫app_easy_gap_disconnect(spss_env.con_info.conidx),它有点断开连接(实际上,我只确定user_on_disconnect已经执行了)。但是在短时间内完成了
它再次连接(我希望它睡眠1分钟,并由Timer SPSSS_ENV.Adv.Admr_hndl = app_easy_timer唤醒(6000,spss_env.adv_timer_cb);)。
can you give me a suggestion how to modified it.
非常感谢你

mt_dialog.
Offline
最后一次露面:3 months 1 day ago
Staff
Joined:2015-06-08 11:34
嗨兰迪宇,

嗨兰迪宇,

我没有得到你想要与上述代码一起做的事情。

我不看到你广告的测量essages will help you in connecting faster, the app_easy_gap_undirected_advertise_start() its executed only once and then the device advertises with the interval that you have set. In order to count the advertising messages that you ve emmited you can follow the example in the beacon project. Please check the implementation in the app_asynch_trm() function, the implementation will check the last state of the BLE if its a BLE_END_EVT and will increment the app_advertise_counter, you can take this implementation in order to count your messages.

谢谢mt_dialog.

兰迪宇
Offline
最后一次露面:2年10个月前
Joined:2015-01-28 08:49
I have change as you said

I have change as you said ,but the counter is not accuracy,I have set the MAX counter = 20,but I have Sniffer 49.

mt_dialog.
Offline
最后一次露面:3 months 1 day ago
Staff
Joined:2015-06-08 11:34
嗨兰迪宇,

嗨兰迪宇,

我不确定是否与嗅探器进行比较是可靠的比较,据我所知,如果您正在跟踪每个BLE事件的末尾,那么方法是正确的。只要记住,为了跟踪您应该在广告状态的广告消息中,如果不是,则计数器也将测量连接的事件。关于与我所提到的方法的嗅探器比较,计数器将在每个频道(37,38,39)上进行一次广告(37,38,39),这将计入嗅探器上的3个广告消息,也据我所知,也是嗅探物,不会显示如果空气上有任何广告包碰撞,则广告消息。

谢谢mt_dialog.

Topic locked