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

Defined BLE setPrivateAddress() #2690

Merged
merged 1 commit into from
May 11, 2019
Merged

Defined BLE setPrivateAddress() #2690

merged 1 commit into from
May 11, 2019

Conversation

WhyKickAmooCow
Copy link
Contributor

@WhyKickAmooCow WhyKickAmooCow commented Apr 21, 2019

Implemented the function used to change the advertised BLE address.

As per the specification, there are multiple address types that can be user set (Random, Static, etc.). Currently this library only uses the address issued to the device during manufacture. This pull request adds the functionality of user changeable BLE addresses.

There is currently no implementation of this function that I am aware of, so use in projects should be minimal, if at all. Changing the functions signature should not break any significant number of projects.

@me-no-dev
Copy link
Member

could you please explain to me and to everyone in this PR's description exactly what this function does and what your change improves. Also, I am not sure that changing the original function's signature is a good thing. Maybe a new function should be added for this? Code that uses it will now break.

@me-no-dev
Copy link
Member

Any comments on this @WhyKickAmooCow

@WhyKickAmooCow
Copy link
Contributor Author

Given the function's content, maybe you are right in saying that a different function may be better. I would suggest something like "setRandomAddress()".

@me-no-dev
Copy link
Member

How about setDeviceAddress? Since the address will be manually set.

@WhyKickAmooCow
Copy link
Contributor Author

Of course I miss the obvious choice. This will be probably the best option as address types other than random may be set, and that it makes is clear that it is setting the device address.

As according the BLE spec, as far as I am aware even if you manually set the address, it is still of the random type. So random address would still be appropriate for the most part, but setDeviceAddress would still be better.

@me-no-dev
Copy link
Member

I have the feeling that the meaning of "random" is rather different. More like the different types of MAC addresses for networking. They also have a few different classes. So the address is not really random every time, but is of type "random" (which means something else). Do I get this correctly?

@chegewara
Copy link
Contributor

In ble specs there is 4 types of address:

  • 1 public, which is burned in esp32 efuse,
  • 3 random, esp-idf is using only 1 random type as far as i know (public random).

Implemented the ability to change the ESP32s BLE device address as
according the the BLE specification. This address is used when
advertising the ESP32 over BLE.
@me-no-dev me-no-dev merged commit bea7bd1 into espressif:master May 11, 2019
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

Successfully merging this pull request may close these issues.

3 participants