From b8690f7ea41390259cfa12f12080fa414d3c8dfb Mon Sep 17 00:00:00 2001 From: Nazar Palamar Date: Wed, 10 Jul 2024 15:51:35 +0300 Subject: [PATCH] Bluetooth: Samples: update response_cb in periodical_adv_rps MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove print "Failed to receive response...", if receive BT_HCI_LE_ADV_EVT_TYPE_DATA_STATUS_RX_FAILED. Problem: with cyw920829m2evk_02 device periodic_adv_rsp returns multiple messages “Failed to receive response….” in the terminal log. This happens because controller generates HCI LE Periodic Advertising Response Report event for each RspSlot. Because no RSP_DATA is observed in the OTA, which is no scan device to transmit RSP_DATA, no RSP_DATA can be received. Therefore, Data Status is 0xFF in all of these events, which finally cause the messages “Failed to receive response….” Data_Status = 0xFF is expected because nothing is received for that Rsp Slot. Per spec, it’s not mandatory to generate these events, So another vendors (e.g. Nordic) might skip the HCI event generation if Data_Status = 0xFF. Signed-off-by: Nazar Palamar --- samples/bluetooth/periodic_adv_rsp/src/main.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/samples/bluetooth/periodic_adv_rsp/src/main.c b/samples/bluetooth/periodic_adv_rsp/src/main.c index 7595aa3ca1a..91039569398 100644 --- a/samples/bluetooth/periodic_adv_rsp/src/main.c +++ b/samples/bluetooth/periodic_adv_rsp/src/main.c @@ -92,9 +92,6 @@ static void response_cb(struct bt_le_ext_adv *adv, struct bt_le_per_adv_response if (buf) { printk("Response: subevent %d, slot %d\n", info->subevent, info->response_slot); bt_data_parse(buf, print_ad_field, NULL); - } else { - printk("Failed to receive response: subevent %d, slot %d\n", info->subevent, - info->response_slot); } }