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

CC2640R2F怎样在LE Coded S=8phy上扫描

如题,正在使用CC2640R2F, SDK2.2, simplecentral。

想要使用最长距离的广播模式,因此配置了在LE Coded S=8phy上面广播,然后使用simplecentral扫描,但现在只在把phy配成SCAN_PRIM_PHY_CODED就会打开扫描失败。

代码如下:

static void SimpleCentral_processGapMsg(gapEventHdr_t *pMsg)
{switch (pMsg->opcode){case GAP_DEVICE_INIT_DONE_EVENT:{uint8_t temp8;uint16_t temp16;gapDeviceInitDoneEvent_t *pPkt = (gapDeviceInitDoneEvent_t *)pMsg;// Setup scanning// For more information, see the GAP section in the User's Guide:// <a href="software-dl.ti.com/.../a>// Register callback to process Scanner eventsGapScan_registerCb(SimpleCentral_scanCb, NULL);// Set Scanner Event MaskGapScan_setEventMask(GAP_EVT_SCAN_ENABLED | GAP_EVT_SCAN_DISABLED |GAP_EVT_ADV_REPORT);// Set Scan PHY parametersGapScan_setPhyParams(DEFAULT_SCAN_PHY, SCAN_TYPE_ACTIVE,SCAN_PARAM_USER_INTERVAL, SCAN_PARAM_USER_INTERVAL);//SCAN_PARAM_DFLT_INTERVAL, SCAN_PARAM_DFLT_INTERVAL);// Set Advertising report fields to keeptemp16 = SC_ADV_RPT_FIELDS;GapScan_setParam(SCAN_PARAM_RPT_FIELDS, &temp16);// Set Scanning Primary PHYtemp8 = SCAN_PRIM_PHY_CODED;//DEFAULT_SCAN_PHY;//set coded phyGapScan_setParam(SCAN_PARAM_PRIM_PHYS, &temp8);// Set LL Duplicate Filtertemp8 = SCAN_FLT_DUP_ENABLE;GapScan_setParam(SCAN_PARAM_FLT_DUP, &temp8);// Set PDU type filter -// Only 'Connectable' and 'Complete' packets are desired.// It doesn't matter if received packets are// whether Scannable or Non-Scannable, whether Directed or Undirected,// whether Scan_Rsp's or Advertisements, and whether Legacy or Extended.temp16 = SCAN_FLT_PDU_CONNECTABLE_ONLY | SCAN_FLT_PDU_COMPLETE_ONLY;GapScan_setParam(SCAN_PARAM_FLT_PDU_TYPE, &temp16);scMaxPduSize = pPkt->dataPktLen;
#if defined(BLE_V42_FEATURES) && (BLE_V42_FEATURES & PRIVACY_1_2_CFG)if (addrMode > ADDRMODE_RANDOM){// Update the current RPA.memcpy(rpa, GAP_GetDevAddress(FALSE), B_ADDR_LEN);Display_print_user(dispHandle, SC_ROW_RPA, 0, "RP Addr: %s",Util_convertBdAddr2Str(rpa));// Create one-shot clock for RPA check event.Util_constructClock(&clkRpaRead, SimpleCentral_clockHandler,SC_READ_RPA_PERIOD, 0, true, SC_EVT_READ_RPA);}
#endif // PRIVACY_1_2_CFGUtil_constructClock(&clkScanOpen, SimpleCentral_clockHandler,SC_SCAN_PERIOD, 0, false, SC_EVT_OPEN_SCAN);SimpleCentral_doDiscoverDevices(1);//GapScan_enableDisplay_print_user0(dispHandle, 7, 0, "waiting for methane alarm data...");break;}
...}
}

日志程序:

status = GapScan_enable(scanPeriod, scanDuration, 0);if( status == SUCCESS)//{SC_Log_info0("GapScan enable doDiscoverDevices");//}else{SC_Log_info1("GapScan enable failed: %02x",status);}

错误日志:

麻烦大神给看下这是什么问题,应该怎么配置

Viki Shi:

E2E工程师已经跟进你的问题,请这边查看: e2e.ti.com/…/2811911

赞(0)
未经允许不得转载:TI中文支持网 » CC2640R2F怎样在LE Coded S=8phy上扫描
分享到: 更多 (0)