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

Question: meaning advertisedDevice::getAddressType() #67

Closed
Jeroen88 opened this issue May 30, 2020 · 2 comments
Closed

Question: meaning advertisedDevice::getAddressType() #67

Jeroen88 opened this issue May 30, 2020 · 2 comments

Comments

@Jeroen88
Copy link

Jeroen88 commented May 30, 2020

Not an issue but a question: how should I interpret the value returned by getAddressType()? I found this post. That post explains that the address type is coded into bits, but I am not sure if this is indeed the value the function returns. If so then the return value is as follows:

  • Public device address: 0
  • Static device address: 111, so 7
  • Non-resolvable device address: 001, so 1
  • Resolvable device address: 101, so 5

Is this actually the value returned?

@h2zero
Copy link
Owner

h2zero commented May 30, 2020

From ble.h:

#define BLE_ADDR_PUBLIC      (0x00)
#define BLE_ADDR_RANDOM      (0x01)
#define BLE_ADDR_PUBLIC_ID   (0x02)
#define BLE_ADDR_RANDOM_ID   (0x03)

Mainly you will only see the first 2.

@Jeroen88
Copy link
Author

Thnx @h2zero!

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

2 participants