使用CC2652R,协议栈 simplelink_cc13x2_26x2_sdk_4_40_04_04,使用RTLS_aoa过程中,我修改了slave节点的广播名称(F8:8A:5E:2C:44:7E未修改,D0:2E:AB:2D:B2:22,D0:2E:AB:2D:AD:C3已修改),将RTLSSLAVE修改为MLSLAVE,采用rtls_ui开启扫描,结果依然可以扫到,这是什么原因?
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.
我修改了slave节点的广播名称
请问您是如何修改的?能否详细说一下,我对您的描述有些疑惑
GapScan_Evt_AdvRpt_t* pAdvRpt = (GapScan_Evt_AdvRpt_t*) (pMsg->pData); char slaveScanRsp[] = {'R','T','L','S','S','l','a','v','e'}; // Filter results by the slave's scanRsp array if (memcmp(&pAdvRpt->pData[2], slaveScanRsp, sizeof(slaveScanRsp)) == 0) { RTLSMaster_addDeviceInfo(pAdvRpt); }
在 rtls_master.c 内有上面的代码,会比较&pAdvRpt->pData[2], slaveScanRsp 所指的内存区间的字符。若是可以的话,建议您在线debug一下,看执行到该处代码时的执行情况
您需要修改的是
// Scan Response Data
static uint8_t scanRspData[] =
{
10, // length of this data
GAP_ADTYPE_LOCAL_NAME_COMPLETE, // Type of this data
'M',
'T',
'L',
'S',
'S',
'l',
'a',
'v',
'e',
// connection interval range
5, // length of this data
GAP_ADTYPE_SLAVE_CONN_INTERVAL_RANGE,
LO_UINT16(DEFAULT_DESIRED_MIN_CONN_INTERVAL), // 100ms
HI_UINT16(DEFAULT_DESIRED_MIN_CONN_INTERVAL),
LO_UINT16(DEFAULT_DESIRED_MAX_CONN_INTERVAL), // 1s
HI_UINT16(DEFAULT_DESIRED_MAX_CONN_INTERVAL),
// Tx power level
2, // length of this data
GAP_ADTYPE_POWER_LEVEL,
0 // 0dBm
};
而不是 advertData
您可以直接在slave内例程内分别修改scanRspData 以及 advertData,而后通过手机上的BLE TOOL或者TI的simplelink starter来查看显示的名称