From c3f3dda7df95c1aca4f189f5f301de496db88631 Mon Sep 17 00:00:00 2001 From: Rahul Tank Date: Tue, 16 Feb 2021 19:08:22 +0530 Subject: [PATCH] esp-idf: Corrected check of Class of Device for discovered devices Current code stopped inquiry if major class is not Phone. Modified the condition to consider for both Phone and Audio to cover majority of real world devices. Closes https://github.com/espressif/esp-idf/issues/6548 --- .../bluedroid/classic_bt/bt_discovery/main/bt_discovery.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/bluetooth/bluedroid/classic_bt/bt_discovery/main/bt_discovery.c b/examples/bluetooth/bluedroid/classic_bt/bt_discovery/main/bt_discovery.c index cb8a687f02..47e6b0d9b7 100644 --- a/examples/bluetooth/bluedroid/classic_bt/bt_discovery/main/bt_discovery.c +++ b/examples/bluetooth/bluedroid/classic_bt/bt_discovery/main/bt_discovery.c @@ -149,7 +149,8 @@ static void update_device_info(esp_bt_gap_cb_param_t *param) } if (!esp_bt_gap_is_valid_cod(cod) || - !(esp_bt_gap_get_cod_major_dev(cod) == ESP_BT_COD_MAJOR_DEV_PHONE)) { + (!(esp_bt_gap_get_cod_major_dev(cod) == ESP_BT_COD_MAJOR_DEV_PHONE) && + !(esp_bt_gap_get_cod_major_dev(cod) == ESP_BT_COD_MAJOR_DEV_AV))) { return; }