Skip to content

Commit

Permalink
esp-idf: Corrected check of Class of Device for discovered devices
Browse files Browse the repository at this point in the history
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 #6548
  • Loading branch information
rahult-github committed Apr 5, 2021
1 parent a921852 commit c3f3dda
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit c3f3dda

Please sign in to comment.