TI中文支持网
TI专业的中文技术问题搜集分享网站

CC2340R5: syscfg使能 add advertisement Channel Number之后,如何在BLEAPPUTIL_ADV_REPORT事件到达后拿到这个Channel Number?

Part Number:CC2340R5

OBSERVER角色,syscfg使能 add advertisement Channel Number之后,如何在BLEAPPUTIL_ADV_REPORT事件到达后拿到这个Channel Number?

在scanMsg->pBuf->pAdvReport对象中哪个参数是Channel Number?

代码片段如下:

void Observer_ScanEventHandler(uint32 event, BLEAppUtil_msgHdr_t *pMsgData){

    BLEAppUtil_ScanEventData_t *scanMsg = (BLEAppUtil_ScanEventData_t *)pMsgData;
    switch (event){
          case BLEAPPUTIL_ADV_REPORT:{

              scanMsg->pBuf->pAdvReport.pData

Galaxy Yue:

你好,可以查看一下该link关于扫描的部分

https://dev.ti.com/tirex/explore/node?node=A__AWGBpOjezYNvPbjzZTCkqw__SIMPLELINK-ACADEMY-CC23XX__gsUPh5j__LATEST

Advertising data packets are transmitted in channels 37, 38, and 39.

可以使用此API读取试一下

https://software-dl.ti.com/simplelink/esd/simplelink_cc13x2_26x2_sdk/4.40.00.44/exports/docs/ble5stack/ble_user_guide/doxygen/ble/html/struct_gap_scan___read_adv_size_list_evt__t.html

,

led share:

你好,我看了你的链接信息,它和basic_ble例程一样,指出了scanMsg->pBuf->pAdvReportData的结构:

typedef struct { /** * Bits 0 to 4 indicate connectable, scannable, directed, scan response, and * legacy respectively */ uint8_t evtType; /// Public, random, public ID, random ID, or anonymous uint8_t addrType; /// Address of the advertising device uint8_t addr[B_ADDR_LEN]; /// PHY of the primary advertising channel uint8_t primPhy; /// PHY of the secondary advertising channel uint8_t secPhy; /// SID (0x00-0x0f) of the advertising PDU. 0xFF means no ADI field in the PDU uint8_t advSid; /// -127 dBm <= TX power <= 126 dBm int8_t txPower; /// -127 dBm <= RSSI <= 20 dBm int8_t rssi; /// Type of TargetA address in the directed advertising PDU uint8_t directAddrType; /// TargetA address uint8_t directAddr[B_ADDR_LEN]; /// Periodic advertising interval. 0 means no periodic advertising. uint16_t periodicAdvInt; /// Length of the data uint16_t dataLen; /// Pointer to advertising or scan response data uint8_t *pData;} bleStk_GapScan_Evt_AdvRpt_t;

但我不知道哪个参数代表channel Number? 能更明确直接一些吗?

,

Galaxy Yue:

led share 说:参数代表channel Number

这个参数没有被披露出来

led share 说:uint8_t primPhy; /// PHY of the secondary advertising channel

这个

 primPhy参数表示主要广播通道的PHY,

PHY 1M=Channel 37

PHY 2M=Channel 38

PHY 3M=Channel 39

,

led share:

Channel Number后续有披露的计划吗?我们需要这个功能,需要知道收到广播包是在37,38,39这3个通道的具体哪个通道上接收的

,

Galaxy Yue:

led share 说:Channel Number后续有披露的计划吗

目前暂不清楚 

,

Galaxy Yue:

led share 说:Channel Number后续有披露的计划吗

目前暂不清楚 

,

led share:

遗憾。您是否已经向CC2340R5 SDK的开发者们询问该功能的支持情况呢?

,

Galaxy Yue:

可以关注下后续SDK的更新,或者可以选择定制API

https://www.ti.com/ordering-resources/api-buying.html

赞(0)
未经允许不得转载:TI中文支持网 » CC2340R5: syscfg使能 add advertisement Channel Number之后,如何在BLEAPPUTIL_ADV_REPORT事件到达后拿到这个Channel Number?
分享到: 更多 (0)