微波EDA网,见证研发工程师的成长!
首页 > 研发问答 > 无线和射频 > 射频无线通信设计 > CC2540 用Btool 查看connection setting发现都是一样的?为什么

CC2540 用Btool 查看connection setting发现都是一样的?为什么

时间:10-02 整理:3721RD 点击:

想用btool看一下cc2540的connection setting,

但是我尝试用BT00l去看cc2540的connection setting发现都是一样的,而且和我的设定也不一样。我的设定如下

// Minimum connection interval (units of 1.25ms, 80=100ms) if automatic parameter update request is enabled
#define DEFAULT_DESIRED_MIN_CONN_INTERVAL 20

// Maximum connection interval (units of 1.25ms, 800=1000ms) if automatic parameter update request is enabled
#define DEFAULT_DESIRED_MAX_CONN_INTERVAL 20

// Slave latency to use if automatic parameter update request is enabled
#define DEFAULT_DESIRED_SLAVE_LATENCY 0

// Supervision timeout value (units of 10ms, 1000=10s) if automatic parameter update request is enabled
#define DEFAULT_DESIRED_CONN_TIMEOUT 500

// Whether to enable automatic parameter update request when a connection is formed
#define DEFAULT_ENABLE_UPDATE_REQUEST TRUE

我尝试的去改#define DEFAULT_DESIRED_MAX_CONN_INTERVAL,btool的显示也没有任何变化.

难道btool里面的这个connection setting不是我设备的设定吗?请高手给指点一下,谢谢!


你的从机程序使用的是sdk的哪个例程?
有update para吗?

我用的是simpleBLEPeripheral这个工程,改动了一点,我的疑问是btool抓的connection setting和我的初始化设定不一样,我的工程里面没有动态的改变connection setting.
GAPRole_SetParameter( GAPROLE_PARAM_UPDATE_ENABLE, sizeof( uint8 ), &enable_update_request );

Update_Para的说明在peripheral.c函数里面
static uint8_t  gapRole_ParamUpdateEnable = FALSE;
// Check whether update parameter request is enabled
if (gapRole_ParamUpdateEnable == TRUE)
{
// Get the minimum time upon connection establishment before the
// peripheral can start a connection update procedure.
uint16_t timeout = GAP_GetParamValue(TGAP_CONN_PAUSE_PERIPHERAL);
Util_restartClock(&startUpdateClock, timeout*1000);
}
你需要把定义改为TRUE

Copyright © 2017-2020 微波EDA网 版权所有

网站地图

Top