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

Can I use one custom random static bd_addr before provision? #15504

Closed
summer20100514 opened this issue Apr 17, 2019 · 3 comments
Closed

Can I use one custom random static bd_addr before provision? #15504

summer20100514 opened this issue Apr 17, 2019 · 3 comments

Comments

@summer20100514
Copy link

I want to change the bluetooth advertisement id_addr before provision, and I read the source code but find that the advertisement use BT_ID_DEFAULT which can't be deleted or changed and is initialized by read out static addr. Is it true? Can I use one custom random static bd_addr in other way? @jhedberg @Vudentz

@carlescufi
Copy link
Member

Yes, just use:

bt_set_id_addr() before you call bt_enable() and then the flag BT_LE_ADV_OPT_USE_IDENTITY when you call bt_le_adv_start()

@summer20100514
Copy link
Author

@carlescufi problem solved! thank you!

@szundi
Copy link

szundi commented Mar 30, 2020

Yes, just use:

bt_set_id_addr() before you call bt_enable() and then the flag BT_LE_ADV_OPT_USE_IDENTITY when you call bt_le_adv_start()

Worked like a charm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants