在《TI BLE5-Stack User’s Guide》里的“GAP Constraints”章节里有说到:
The data length of the advertising data and the scan response data for Extended Advertising is limited to 1650 bytes. The connectable undirected advertising data is limited to 212 bytes. The connectable directed advertising data is limited to 206 bytes.
该怎么把 adv data 或 scan rsp data 扩展到 31 byte 以上?目前我好像只能使用 31 byte 的长度。
Viki Shi:
请问你测试的芯片及SDK分别是什么?在最新的CC26X2上,data length extension已经默认开启了。以下代码来自simple peripheral
// Set default values for Data Length Extension// Extended Data Length Feature is already enabled by default{// Set initial values to maximum, RX is set to max. by default(251 octets, 2120us)// Some brand smartphone is essentially needing 251/2120, so we set them here.#define APP_SUGGESTED_PDU_SIZE 251 //default is 27 octets(TX)#define APP_SUGGESTED_TX_TIME 2120 //default is 328us(TX)// This API is documented in hci.h// See the LE Data Length Extension section in the BLE5-Stack User's Guide for information on using this command:// software-dl.ti.com/.../HCI_LE_WriteSuggestedDefaultDataLenCmd(APP_SUGGESTED_PDU_SIZE, APP_SUGGESTED_TX_TIME);文档请参考:http://dev.ti.com/tirex/explore/content/simplelink_cc13x2_26x2_sdk_4_10_00_78/docs/ble5stack/ble_user_guide/html/ble-stack-common/link-layer-cc13x2_26x2.html#le-data-length-extension-dle
Jesse Huang:
回复 Viki Shi:
芯片是:CC2640R2F SDK:simplelink_cc2640r2_sdk_4_10_00_10 你好像理解错我的问题了,我是问如何扩展广播数据包里面的数据。蓝牙5.0的广播数据包不是可以广播很多数据的吗?
Viki Shi:
回复 Jesse Huang:
可以的,但是目前很多手机不一定支持AE。修改方法参考这边,修改AdvData的buffer等参数即可:dev.ti.com/…/node
这边有个类似问题供参考:e2e.ti.com/…/2692963