This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

cc2540 Btool connection setting

Other Parts Discussed in Thread: CC2540

各位前辈好!

我就想用btool看一下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

  • 你好!

    谢谢你的回复。

    我看了一下,我的定义是static uint8  gapRole_ParamUpdateEnable = FALSE;

  • 你好,

    建议你把下面的数值加大后尝试

    // 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

    下午我在 实验室也测试一下然后再反馈你。

  • 你好,

    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