SDK:simplelink_cc2640r2_sdk_3_10_00_15
例程:C:\ti\simplelink_cc2640r2_sdk_3_10_00_15\examples\rtos\CC2640R2_LAUNCHXL\blestack\multi_role
在这个例程的基础上做了一些修改,收到命令
GAP_LINK_ESTABLISHED_EVENT后,启动定时器1S后调用以下2个API
mr_doAdvertise(0);
mr_doConnUpdate(0);
关闭广播和请求更新连接参数,连接参数如下
// Minimum connection interval (units of 1.25ms, 80=100ms) for automatic
// parameter update request
#define DEFAULT_DESIRED_MIN_CONN_INTERVAL (uint32_t)((float)20/(1.25)) //16=20ms
// Maximum connection interval (units of 1.25ms, 800=1000ms) for automatic
// parameter update request
#define DEFAULT_DESIRED_MAX_CONN_INTERVAL (uint32_t)((float)500/(1.25))
#define DEFAULT_CONN_TIMEOUT 1000
#define DEFAULT_CONN_LATENCY 0
超时时间到之后就对断开,