Part Number:CC2640R2F
CC2640R2F 如何使用例程 simplelink_cc2640r2_sdk_5_30_00_03\examples\rtos\CC2640R2_LAUNCHXL\ble5stack\simple_broadcaster 收发 extended advertising
Galaxy Yue:
你好,
以下部分将介绍如何使用 LE Advertising Extension 功能,建议您从GAP ROLES往下阅读
software-dl.ti.com/…/gap-cc2640.html
,
peng lu:
broadcast 可以发送不可连接的只能扫描的 255字节的广播包吗?
,
Galaxy Yue:
拓展功能使得广告数据量已从 31 字节扩展到 1650 字节。
peng lu 说:broadcast 可以发送不可连接的只能扫描的 255字节的广播包吗
可以
,
peng lu:
Extended advertisements introduces use the secondary advertising channels which uses the data channels to send extensive data in addition to the primary advertising channels (Ch. 37, 38, and 39) used in legacy advertisement. 扩展广播发送的是二级PHY, legacy 广播是 37-39通道
SDK 3.1 ble5_simple_peripheral_cc2640r2lp_app 例程创建了两个广播集GAPADV_PARAMS_LEGACY_SCANN_CONN 和 GAPADV_PARAMS_AE_LONG_RANGE_CONN
问:这里 long range 广播就是extended 广播吗? 为什么 广播通道也设置的是primChanMap = GAP_ADV_CHAN_ALL(37-39)
我重修改 LONG RANGE 模式下的广播数据
static uint8_t advertDatalong[60] ={ 1,2,3,4,5,6,7,8,9,10, 1,2,3,4,5,6,7,8,9,10, 1,2,3,4,5,6,7,8,9,10, 1,2,3,4,5,6,7,8,9,10, 1,2,3,4,5,6,7,8,9,10, 1,2,3,4,5,6,7,8,9,10};
// Use long range params to create long range set #2 GapAdv_params_t advParamLongRange = GAPADV_PARAMS_AE_LONG_RANGE_CONN;
// Create Advertisement set #2 and assign handle status = GapAdv_create(&SimplePeripheral_advCallback, &advParamLongRange, &advHandleLongRange); SIMPLEPERIPHERAL_ASSERT(status == SUCCESS);
// Load advertising data for set #2 that is statically allocated by the app status = GapAdv_loadByHandle(advHandleLongRange, GAP_ADV_DATA_TYPE_ADV, 60, advertDatalong); SIMPLEPERIPHERAL_ASSERT(status == SUCCESS);
// Set event mask for set #2 status = GapAdv_setEventMask(advHandleLongRange, GAP_ADV_EVT_MASK_START_AFTER_ENABLE | GAP_ADV_EVT_MASK_END_AFTER_DISABLE | GAP_ADV_EVT_MASK_SET_TERMINATED);
// Enable long range advertising for set #2 status = GapAdv_enable(advHandleLongRange, GAP_ADV_ENABLE_OPTIONS_USE_MAX , 0); SIMPLEPERIPHERAL_ASSERT(status == SUCCESS); Display_printf(dispHandle, SP_ROW_IDA, 0, "%s Addr: %s", (addrMode <= ADDRMODE_RANDOM) ? "Dev" : "ID", Util_convertBdAddr2Str(pPkt->devAddr));
另外我用另外一块cc2640r2f板子烧写了sdk ble5_simple_central_cc2640r2lp_app;没有收到相关广播
能否给个参考
,
peng lu:
这个连接我阅读,没有发现extended 广播,有什么特别设置。可以给个broadcaster 发送extended 广播的配置吗
,
Galaxy Yue:
你可以升高一下SDK版本
另外,拓展功能仅在BLE 5实现
参考一下这个link
https://e2e.ti.com/support/wireless-connectivity/bluetooth-group/bluetooth/f/bluetooth-forum/951209/cc2640r2f-ble-5-0-long-range-issue-with-le-codec-phy-advertisement
,
peng lu:
已经使用了5.30 最高版本。你给出的参考连接并没有解决问题。我现在使用的是5.3的SDK
Extended advertisements introduces use the secondary advertising channels which uses the data channels to send extensive data in addition to the primary advertising channels (Ch. 37, 38, and 39) used in legacy advertisement. 扩展广播发送的是二级PHY, legacy 广播是 37-39通道
ADV_EXT_IND PDU 在 例程中无法设定
SDK 5.3 ble5_simple_peripheral_cc2640r2lp_app 例程创建了两个广播集GAPADV_PARAMS_LEGACY_SCANN_CONN 和 GAPADV_PARAMS_AE_LONG_RANGE_CONN
问:这里 long range 广播就是extended 广播吗? 为什么 广播通道也设置的是primChanMap = GAP_ADV_CHAN_ALL(37-39)
我重修改 LONG RANGE 模式下的广播数据
static uint8_t advertDatalong[60] ={1,2,3,4,5,6,7,8,9,10,1,2,3,4,5,6,7,8,9,10,1,2,3,4,5,6,7,8,9,10,1,2,3,4,5,6,7,8,9,10,1,2,3,4,5,6,7,8,9,10,1,2,3,4,5,6,7,8,9,10};
// Use long range params to create long range set #2GapAdv_params_t advParamLongRange = GAPADV_PARAMS_AE_LONG_RANGE_CONN;
// Create Advertisement set #2 and assign handlestatus = GapAdv_create(&SimplePeripheral_advCallback, &advParamLongRange,&advHandleLongRange);SIMPLEPERIPHERAL_ASSERT(status == SUCCESS);
// Load advertising data for set #2 that is statically allocated by the appstatus = GapAdv_loadByHandle(advHandleLongRange, GAP_ADV_DATA_TYPE_ADV,60, advertDatalong);SIMPLEPERIPHERAL_ASSERT(status == SUCCESS);
// Set event mask for set #2status = GapAdv_setEventMask(advHandleLongRange,GAP_ADV_EVT_MASK_START_AFTER_ENABLE |GAP_ADV_EVT_MASK_END_AFTER_DISABLE |GAP_ADV_EVT_MASK_SET_TERMINATED);
// Enable long range advertising for set #2status = GapAdv_enable(advHandleLongRange, GAP_ADV_ENABLE_OPTIONS_USE_MAX , 0);SIMPLEPERIPHERAL_ASSERT(status == SUCCESS);Display_printf(dispHandle, SP_ROW_IDA, 0, "%s Addr: %s",(addrMode <= ADDRMODE_RANDOM) ? "Dev" : "ID",Util_convertBdAddr2Str(pPkt->devAddr));
另外我用另外一块cc2640r2f板子烧写了sdk ble5_simple_central_cc2640r2lp_app;没有收到相关广播
能否给个配置 extended 广播参考
,
Galaxy Yue:
peng lu 说: long range 广播就是extended 广播
1.Long Range是BLE 5.0 新增加的特性,能够增加蓝牙的通信距离
2.广告扩展能够将广告数据从三个传统广告通道卸载到全套数据通道。即,以前只能在37/38/39信道上做广播,但现在可以在其他0-36的信道上同样发广播
peng lu 说:ADV_EXT_IND PDU 在 例程中无法设定
将primPhy设置成1M和LE CODE,才可以将广播转换成ADV_EXT_IND
没有例程,可以参考一下acadamic
https://www.ti2k.com/wp-content/uploads/ti2k/DeyiSupport_Bluetooth_node