你好,我调整后,安卓手机可以根据我的参数调整过来,IOS不行,我想问一下,IOS那边是不是有什么限制?我的设置参数是: /// Connection interval minimum measured in ble double slots (1.25ms) /// use the macro MS_TO_DOUBLESLOTS to convert from milliseconds (ms) to double slots .intv_min = MS_TO_DOUBLESLOTS(50),
/// Connection interval maximum measured in ble double slots (1.25ms) /// use the macro MS_TO_DOUBLESLOTS to convert from milliseconds (ms) to double slots .intv_max = MS_TO_DOUBLESLOTS(100), .latency = 2, .time_out = MS_TO_TIMERUNITS(30000), 麻烦帮我看一下,谢谢
APP_PARAM_UPDATE_REQUEST_TO设定是10s,回调函数param_update_request_timer_cb中最终会调用app_easy_gap_param_update_msg_create函数进行配置发起更改连接请求命令的参数,参数如下: .intv_min = MS_TO_DOUBLESLOTS(20), /// Connection interval maximum measured in ble double slots (1.25ms) /// use the macro MS_TO_DOUBLESLOTS to convert from milliseconds (ms) to double slots .intv_max = MS_TO_DOUBLESLOTS(250), .latency = 4, .time_out = MS_TO_TIMERUNITS(32000),
你好,
如果是从机的话,可以通过接口:app_easy_gap_param_update_start()
来实现更改连接参数的目的。
将连接间隔改大后,可达到延长睡眠时间、降低功耗的目的
你好,我调整后,安卓手机可以根据我的参数调整过来,IOS不行,我想问一下,IOS那边是不是有什么限制?我的设置参数是:
/// Connection interval minimum measured in ble double slots (1.25ms)
/// use the macro MS_TO_DOUBLESLOTS to convert from milliseconds (ms) to double slots
.intv_min = MS_TO_DOUBLESLOTS(50),
/// Connection interval maximum measured in ble double slots (1.25ms)
/// use the macro MS_TO_DOUBLESLOTS to convert from milliseconds (ms) to double slots
.intv_max = MS_TO_DOUBLESLOTS(100),
.latency = 2,
.time_out = MS_TO_TIMERUNITS(30000),
麻烦帮我看一下,谢谢
你好,
iOS 对连接参数之间的关系,有一定的要求,可参考 APPLE 官网的外设设计指导书:https://developer.apple.com/accessories/Accessory-Design-Guidelines.pdf
在 1.6 Connection Parameters 章节里有介绍
你好,我是按照这个参数要求配置的,结果是IOS拒绝,我想问一下,IOS那边是不是需要使能某一个功能才允许更改的?
你好,
能否描述下你修改连接参数的时机、方式?
在ble_app_sleepmode模板中当检测连接好后,会调用user_app_connection函数,在这个函数中会启用一个定时器:app_param_update_request_timer_used = app_easy_timer(APP_PARAM_UPDATE_REQUEST_TO, param_update_request_timer_cb);
APP_PARAM_UPDATE_REQUEST_TO设定是10s,回调函数param_update_request_timer_cb中最终会调用app_easy_gap_param_update_msg_create函数进行配置发起更改连接请求命令的参数,参数如下:
.intv_min = MS_TO_DOUBLESLOTS(20),
/// Connection interval maximum measured in ble double slots (1.25ms)
/// use the macro MS_TO_DOUBLESLOTS to convert from milliseconds (ms) to double slots
.intv_max = MS_TO_DOUBLESLOTS(250),
.latency = 4,
.time_out = MS_TO_TIMERUNITS(32000),
包括上面的参数也测试过,在IOS中还是不行,但是在安卓手机上一直都可以,麻烦帮我看一下,谢谢
你的参数 timeout 时间没满足 2s <= timeout <= 6s 的条件
问题解决了,谢谢
不客气