Hi,all.
I made observer with using ble_app_uart(central).
And, I transmit UUID with using uart.
Test result, I confirmed that the previous value of p_adv_report-> data was not erased.
As above, Some part don't erase.
Below is my code.
////////////////////////////////////////////////////////////////
static void on_ble_evt (ble_evt_t * p_ble_evt) { const ble_gap_evt_t * p_gap_evt = &p_ble_evt->evt.gap_evt;
switch (p_ble_evt->header.evt_id)
{
case BLE_GAP_EVT_ADV_REPORT:
{
const ble_gap_evt_adv_report_t * p_adv_report = &p_gap_evt->params.adv_report;
for(int8_t i=0;i<BLE_GAP_ADV_MAX_SIZE;i++)
{
app_uart_put(p_adv_report->data[i]);
}
memset(&p_ble_evt->evt.gap_evt.params.adv_report.data,0,sizeof(p_ble_evt->evt.gap_evt.params.adv_report.data));
sd_ble_gap_scan_stop();
}
break; // BLE_GAP_EVT_ADV_REPORT
default:
break;
}
}
//////////////////////////////////////////////////////////////
What part of me was wrong?
Please, Help me.