Maximum connection interval

4个帖子/ 0新
最后一篇
感伤
离线
最后一次露面:2 years 11 months ago
加入:2016-11-28 15:55
Maximum connection interval

你好,
我正在使用Pro Board和SDK 5.0.4。我想设置一个大的连接间隔,以降低功耗。基于BLE_PERITELAL项目,我将参数更改在用户_config.h中。当我将间隔更改为大约300ms时,它可以工作,我可以使用PowerProfiler看到波形。但是,当我进一步设置连接间隔至约3.6〜4.0s时,这是根据BLE规范的限制,实际间隔仍然是30ms。这是我的user.config.h :(我没有改变其他地方)

/*
****************************************************************************************
*
* GAPM配置
*
****************************************************************************************
* /
static const结构gapm_configuration user_gapm_conf = {
///设备角色:中央,外设,观察者或广播公司
。role = gap_peripheral_slv,

///设备iRK用于可解析的随机BD地址生成(LSB首先)
.irk = {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},

///设备外观(0x0000 - 未知外观)
//Fill in according tohttps://developer.bluetooth.org/gatt/characteristics/pages/charracteristi ...
.appearance = 0,

///设备外观对等设备的写入权限要求(@see gapm_write_att_perm)
.appearance_write_perm = gapm_write_disable,

///设备名称对等设备的写入权限要求(@see gapm_write_att_perm)
.name_write_perm = gapm_write_disable,

/// Maximal MTU
.max_mtu = 23,

/ / /间隔应该是由于预期的连接d 3.5s
///仅限外围设备:*******************************************************************
///在BLE双槽(1.25ms)中测量的连接间隔的从属的最低限度
/// use the macro MS_TO_DOUBLESLOTS to convert from milliseconds (ms) to double slots
.con_intv_min = ms_to_doubleslots(3200),

///从位于BLE双槽(1.25ms)中测量的连接间隔的最优选的最大值
/// use the macro MS_TO_DOUBLESLOTS to convert from milliseconds (ms) to double slots
.con_intv_max = MS_TO_DOUBLESLOTS(3800),

///从属喜欢连接延迟。它在跳过的连接事件中测量
.con_latency = 0,

///从机器单元(10 ms)测量的Slave优选链接监控超时
///使用宏观MS_TO_TIMERUNITS从毫秒(MS)转换为定时器单位
.superv_to = ms_to_timerUnits(8000),

/// Privacy settings bit field (0b1 = enabled, 0b0 = disabled)
/// - [bit 0]: Privacy Support
/// - [位1]:多键支持(仅限外围设备);如果已启用,隐私标志是
/// 只读。
/// - [bit 2]: Reconnection address visible.
.flags = 0.
};

/*
****************************************************************************************
*
*Parameter update configuration
*
****************************************************************************************
* /
static const struct connection_param_configuration user_connection_param_conf = {
/ / /间隔应该是由于预期的连接d 3.5s
///在BLE双槽(1.25ms)中测量的连接间隔最小值
/// use the macro MS_TO_DOUBLESLOTS to convert from milliseconds (ms) to double slots
.intv_min = ms_to_doubleslots(3200),

///在BLE双槽(1.25ms)中测量的连接间隔最大值
/// use the macro MS_TO_DOUBLESLOTS to convert from milliseconds (ms) to double slots
.intv_max = ms_to_doubleslots(3800),

///在连接事件中测量的延迟
.latency = 0,

///在定时器单元(10ms)中测量的监控超时
///使用宏观MS_TO_TIMERUNITS从毫秒(MS)转换为定时器单位
.time_out = ms_to_timerUnits(5000),

///在BLE双槽(1.25ms)中测量的最小连接事件持续时间
/// use the macro MS_TO_DOUBLESLOTS to convert from milliseconds (ms) to double slots
.ce_len_min = ms_to_doubleslots(0),

///在BLE双槽(1.25ms)中测量的最大连接事件持续时间
/// use the macro MS_TO_DOUBLESLOTS to convert from milliseconds (ms) to double slots
.ce_len_max = ms_to_doubleslots(0),
};

我的问题是1)对话芯片的最长允许的连接间隔是什么?(4s?)和2)我是否需要更改其他参数以设置更长的间隔,例如3.8s?谢谢!

设备:
mt_dialog.
离线
最后一次露面:2个月2周前
职员
加入:2015-06-08 11:34
嗨敏感,

嗨敏感,

与BLE规范提到4.0秒是可以设置连接间隔的最长时间,并且所有您所要做的就是更改user_config.h文件中的user_connection_param_conf结构。关于这些的一些注释,连接间隔由连接主站设置而不是由从设备设置,因此您的手机将决定初始连接间隔,而不是作为从设备充当的580个设备。从设备无法设置连接间隔,它只能向主站指示它想要的连接间隔,并且通过参数更新请求完成,因此BLE_APP_PERITIVELAL示例将发出该命令,如果主站接受从站指示的参数,连接间隔将切换到从站的优选值。此外,当您确保WatchDog未定义或在睡眠模式下运行时,如果使用活动模式和看门狗定义,则在参数更新后,设备将最终到达NMI_Handler,由于支出超过2.6WFI()指令的秒数。

谢谢mt_dialog.

感伤
离线
最后一次露面:2 years 11 months ago
加入:2016-11-28 15:55
我发现这个问题可能是

我发现这个问题可能与punthrough应用程序有关。当我使用自定义Android应用程序时,我可以将连接间隔更改为最多4个。

感伤
离线
最后一次露面:2 years 11 months ago
加入:2016-11-28 15:55
谢谢mt,我会检查一下

谢谢mt,我会检查一下code on the Android side.