Other Parts Discussed in Thread: CC2640
Hi,
I followed the tutorial from this link http://dev.ti.com/tirex/content/simplelink_academy_cc2640r2sdk_1_14_02_04/modules/blestack/ble_scan_adv_basic/ble_scan_adv_basic.html
and set up the cc2640 as a central role (simple_central example) with the modifications described in scanning task-1 and scanning task 2. My intention here is to detect beacons and print it out on the terminal for validation. I use an Android app to broadcast a beacon. I am currently performing passive scanning. Below is the code that does the printing which I got from the above link.
case GAP_DEVICE_INFO_EVENT:
{
// if filtering device discovery results based on service UUID
if (DEFAULT_DEV_DISC_BY_SVC_UUID == TRUE)
{
if (SimpleCentral_findSvcUuid(SIMPLEPROFILE_SERV_UUID,
pEvent->deviceInfo.pEvtData,
pEvent->deviceInfo.dataLen))
{
SimpleCentral_addDeviceInfo(pEvent->deviceInfo.addr,
pEvent->deviceInfo.addrType);
}
}
if(pEvent->deviceInfo.eventType == GAP_ADRPT_SCAN_RSP)
{
Display_print1(dispHandle, 4, 0, "ScanResponseAddr: %s", Util_convertBdAddr2Str(pEvent->deviceInfo.addr));
Display_print1(dispHandle, 5, 0, "ScanResponseData: %s", Util_convertBytes2Str(pEvent->deviceInfo.pEvtData, pEvent->deviceInfo.dataLen));
}
else
{
Display_print3(dispHandle, 6, 0, "Advertising Addr: %s RSSI: %d Advertising Type: %s", Util_convertBdAddr2Str(pEvent->deviceInfo.addr), pEvent->deviceInfo.rssi, AdvTypeStrings[pEvent->deviceInfo.eventType]);
Display_print1(dispHandle, 7, 0, "Advertising Data: %s", Util_convertBytes2Str(pEvent->deviceInfo.pEvtData, pEvent->deviceInfo.dataLen));
}
}
break;
When I run the above code, I do get some prints when I press the left button as shown below. After dumping the data on the terminal, I believe the scan ends and the GAP_DEVICE_DISCOVERY_EVENT is generated which prints Devices Found 0.
BLE Central 0x546C0EA04FE1 Devices Found 0 Discover -> Advertising Addr: 0x4787B10D49B2 RSSI: -90 Advertising Type: Connectable undirected Advertising Data: 02:01:1A:0A:FF:4C:00:10:05:03:1C:F5:FF:7E:4D:16:BB:6E:36:C2:76:01:00:00:00:00:00:00:26:A6:
Coming to the problem, I am unable to detect the beacon I am broadcasting using the Android app. I'd like to know how to do this and if there is any change I need to do with respect to above to start detecting beacons?