Part Number:LAUNCHXL-CC26X2R1
Tool/software: Code Composer Studio
Hi,
The target here is to print out the scanRsp data of type `GapScan_Evt_AdvRpt_t` in SC_EVT_ADV_REPORT, from a legacy BLE 4.x peripheral.
I have loaded the central example project from latest simple link 3_10_00_53.
Then followed the following steps to print the 1M PHY ScanRsp,
http://dev.ti.com/tirex/content/simplelink_academy_cc13x2sdk_2_20_03_05/modules/ble5stack/ble_scan_adv_basic/ble_scan_adv_basic.html
We are using a custom peripheral, with legacy scanRsp (scanable).
so I changed `SCAN_TYPE_PASSIVE` to `SCAN_TYPE_ACTIVE`, and
#define DEFAULT_SCAN_PHY LL_PHY_NONE
Looking at `evtType` , it seems to hold the value 0x13, which according to LL_ae.h is a bitfield of CONNECTABLE + SCANNABLE + LEGACY
so I added printing the ADV_RPT_EVT_TYPE_LEGACY
static uint8_t roww = 0;
//Print scan response data or advertising data
if(0!=(pAdvRpt->evtType & ADV_RPT_EVT_TYPE_LEGACY))
{
Display_print1(dispHandle, (TBM_ROW_APP + 10 + (roww++)), 0, "ADV_RPT_EVT_TYPE_LEGACY: %s",
Util_convertBdAddr2Str(pAdvRpt->addr));
Display_print1(dispHandle, (TBM_ROW_APP + 10 + (roww++)), 0, "ADV_RPT_EVT_TYPE_LEGACY: %s",
Util_convertBytes2Str(pAdvRpt->pData, pAdvRpt->dataLen));
}
else if(pAdvRpt->evtType == ADV_RPT_EVT_TYPE_SCAN_RSP)
{
Display_print1(dispHandle, (TBM_ROW_APP + 10 + (roww++)), 0, "ScanResponseAddr: %s",
Util_convertBdAddr2Str(pAdvRpt->addr));
Display_print1(dispHandle, (TBM_ROW_APP + 10 + (roww++)), 0, "ScanResponseData: %s",
Util_convertBytes2Str(pAdvRpt->pData, pAdvRpt->dataLen));
}
else
{
Display_print2(dispHandle, (TBM_ROW_APP + 10 + (roww++)), 0, "Advertising Addr: %s RSSI: %d",
Util_convertBdAddr2Str(pAdvRpt->addr), pAdvRpt->rssi);
Display_print1(dispHandle, (TBM_ROW_APP + 10 + (roww++)), 0, "Advertising Data: %s",
Util_convertBytes2Str(pAdvRpt->pData, pAdvRpt->dataLen));
}
but it doesn't have the scan response... could you please let me know what is still missing here?
Jerome