Skip to content

Commit

Permalink
Bluetooth: host: Include scan response with name when non-connectable
Browse files Browse the repository at this point in the history
When using BT_LE_ADV_NCONN_NAME then the advertising name will not be
included in the advertising data. This is because the host always puts
the device name in the scan response. But since the scan data was
otherwise empty the advertising type was set to ADV_NONCONN_IND.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
  • Loading branch information
joerchan authored and jhedberg committed Mar 20, 2020
1 parent 91f6d98 commit ffa10eb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion subsys/bluetooth/host/hci_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -6109,7 +6109,7 @@ int bt_le_adv_start_internal(const struct bt_le_adv_param *param,
return err;
}

if (sd) {
if (sd || (param->options & BT_LE_ADV_OPT_USE_NAME)) {
set_param.type = BT_LE_ADV_SCAN_IND;
} else {
set_param.type = BT_LE_ADV_NONCONN_IND;
Expand Down

0 comments on commit ffa10eb

Please sign in to comment.