Hi ,
I use nRF connect app to create an advertisement.
But this device cannot be scanned using cc2640r2f.(phone and PC can scan it)
What settings do I need to modify?
SDK:cc2640r2_sdk_1_40_00_45
Please refer to the following for scan code.
case GAP_DEVICE_INFO_EVENT: { #ifdef DEV_DISC_BY_SVC_UUID //if(str_cmp(addrBuf,pEvent->deviceInfo.addr,6)==1) //if(pEvent->deviceInfo.addrType==0x00) if(pEvent->deviceInfo.addrType==0x00 || 0x01 || 0x02 || 0x03) { //if ( simpleBLEFindSvcUuid( WANTED_SERVICE_UUID, // pEvent->deviceInfo.pEvtData, // pEvent->deviceInfo.dataLen ) ) //{ //simpleBLEAddDeviceInfo( pEvent->deviceInfo.addr, pEvent->deviceInfo.addrType ); scanIndexID++; TLwrite(&pEvent->deviceInfo.addrType,1); SerialPrintString("\r\n"); memcpy(addrBuf, pEvent->deviceInfo.addr, 6); memcpy(devList[scanIndexID-1].addr, pEvent->deviceInfo.addr, B_ADDR_LEN); devList[scanIndexID-1].rssi = pEvent->deviceInfo.rssi; devList[scanIndexID-1].addrType = pEvent->deviceInfo.addrType; // Convert address to string uint8_t *pAddr = (uint8_t*)Util_convertBdAddr2Str(pEvent->deviceInfo.addr); // Copy converted string to static device list memcpy(devList[scanIndexID-1].strAddr, pAddr, B_STR_ADDR_LEN); //} } else { if(pEvent->deviceInfo.eventType==0x04) { devList[scanIndexID-1].eventType = pEvent->deviceInfo.eventType; #ifndef TRANSPARENT memcpy(devList[scanIndexID-1].advBuf, pEvent->deviceInfo.pEvtData, pEvent->deviceInfo.dataLen); #endif } }
Thanks.