Hi All!
I'm working a few weeks now with the NRF52 DK and having loads of fun!
Today I tried to make a central/scanner that scans for packages from a broadcaster. To make the broadcaster I followed the tutorial provided by Nordic ( devzone.nordicsemi.com/.../). This all seems to work fine: I can receive all packets, including the Scan Response Packet on my phone.
So with the advertiser working, I started working on the scanner side. I added a " case BLE_GAP_EVT_ADV_REPORT" inside on_ble_evt() and this works all fine.
case BLE_GAP_EVT_ADV_REPORT:
{ //
if (strlen(m_target_periph_name) != 0)
{
if (find_adv_name(&p_gap_evt->params.adv_report, m_target_periph_name))
{
NRF_LOG_INFO("Packet from device\r\n");
print_adv_data(&p_gap_evt->params.adv_report);
}
}
else
{
NRF_LOG_INFO("not from device\r \n");
}
}break;// BLE_GAP_ADV_REPORT
However, I want to be able to transmit more data, so I would like to process the Scan Response Packets as well. I think that I have to handle this with a case BLE_GAP_EVT_SCAN_REQ_REPORT. However, If I make a NRF_LOG_INFO() call inside that case statement, nothing happens. This gives me the idea that this is not the way to go.
I checked the scanner settings: m_scan_param.active = 1; m_scan_param.interval = SCAN_INTERVAL; m_scan_param.window = SCAN_WINDOW;
I hope some of you can help me a little further!
Cheers Rob