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.

CC254x作为从机,与iOS设备进行连接参数更新操作的问题

开发库版本1.3.2,根据iOSBluetoothDesignGuidelines.pdf文档,进行了如下设置(因为我的从机需要和iOS设备进行频繁的连接通信),希望本机(Slave)启动后能够发起修改请求,但是怎样才能得知修改成功,并且iOS设备已经接受了这个请求? iOS设备编程是否需要调用特别的函数来接受从机的连接参数更新的申请?目前发现连接事件的周期很慢,更新没有成功,不知道是从机没有正确发起更新,还是iOS设备没有接受该更新?谢谢指教!

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

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

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

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

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

// Connection Pause Peripheral time value (in seconds)
#define DEFAULT_CONN_PAUSE_PERIPHERAL         6

  • 史蒂文,

    你的参数设置非常棒,完全满足了苹果的要求。恭喜!

    一般情况下,没有特殊工具的情况下,只要之后连接没有断开,一切使用正常,就说明更新成功了。

    当然,你可以用packet sniffer 抓包看一下,能看到参数更新的空中交互,一目了然,马上知道是否更新成功。

    最后,通过看代码也能知道更新是否成功,更新之后会收到GAP_LINK_PARAM_UPDATE_EVENT 在peripheral.c 中。