Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to select between advertising packet/scan response for BT LE device name #27692

Closed
kurddt opened this issue Aug 20, 2020 · 2 comments · Fixed by #32543
Closed

Allow to select between advertising packet/scan response for BT LE device name #27692

kurddt opened this issue Aug 20, 2020 · 2 comments · Fixed by #32543
Assignees
Labels
area: Bluetooth Host area: Bluetooth Enhancement Changes/Updates/Additions to existing features

Comments

@kurddt
Copy link
Contributor

kurddt commented Aug 20, 2020

Currently when starting legacy advertising and setting BT_LE_ADV_OPT_USE_NAME option, the device name is set inside the scan response if one is provided when calling bt_le_adv_start else inside the advertising packet.

So there is not user-friendly way to send the same in the advertising packet if BT_LE_ADV_OPT_USE_NAME and scan response are used.

It would be nice to have an additional flag to select where to put the name

A workaround to achieve the desired result is to no use BT_LE_ADV_OPT_USE_NAME and set explicitly the device name in the advertising packet

@kurddt kurddt added the Enhancement Changes/Updates/Additions to existing features label Aug 20, 2020
@joerchan joerchan self-assigned this Aug 20, 2020
@joerchan
Copy link
Contributor

joerchan commented Dec 8, 2020

@jhedberg Currently bt_set_name would clear the rest of the Scan Response data.
Should we perhaps change that and instead document that the application will have to toggle advertising (in order to provide the scan response data pointer again) when setting the name this way and using the USE_NAME option?

Should we add the option to select the advertising name in the advertising packet instead? I remember you had some opinions on this.
If we don't want to do this we should close this issue.

@jhedberg
Copy link
Member

jhedberg commented Dec 8, 2020

@joerchan I don't have a strong opinion either way wrt bt_set_name(), however that seems orthogonal to this particular issue. My gut feeling is that putting the name in the advertising data rather than the scan response is such a minority use case that we can require apps to just do the manual work in that case. I'm open to be convinced to change my mind, however 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Bluetooth Host area: Bluetooth Enhancement Changes/Updates/Additions to existing features
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants