This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How can i get some event report?(like BLE_GAP_EVT_ADV_REPORT)

HI , ALL

i added a event in the function 'on_ble_evt' like followings:

case BLE_GAP_EVT_ADV_REPORT:

    printf("Start Advertising\r\n");

    break;

At first i think that when a device start advertising ,then my device will print this string on my com port tool(i had init the uart fifo function , and it's nothing wrong from my test.).

But when i load my programme in my board and nothing print.

so i wanna know that when can i get the report event like BLE_GAP_EVT_ADV_REPORT, BLE_GAP_EVT_SCAN_REQ_REPORT and so on.

P.S: The descrption in the sdk document is too simple to solve my problem.

Parents
  • The documentation is very good for all this stuff. The structures are defined, there are message sequence charts which show you exactly when every type of event is sent and whether it's for a peripheral or a central.

    BLE_GAP_EVT_ADV_REPORT is to tell scanners when they receive an advertisement report.

    Since you explicitly have to turn advertising on and off with sd_ble_gap_adv_start() and sd_ble_gap_adv_stop() on the peripheral there's no need for an event to tell you about it, the only event there is for advertising tells you when it times out.

Reply
  • The documentation is very good for all this stuff. The structures are defined, there are message sequence charts which show you exactly when every type of event is sent and whether it's for a peripheral or a central.

    BLE_GAP_EVT_ADV_REPORT is to tell scanners when they receive an advertisement report.

    Since you explicitly have to turn advertising on and off with sd_ble_gap_adv_start() and sd_ble_gap_adv_stop() on the peripheral there's no need for an event to tell you about it, the only event there is for advertising tells you when it times out.

Children
No Data
Related