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

Access device MAC address #583

Open
Milooooo1 opened this issue Apr 14, 2022 · 4 comments
Open

Access device MAC address #583

Milooooo1 opened this issue Apr 14, 2022 · 4 comments

Comments

@Milooooo1
Copy link

Hi! I am working on an application where I need the mac address of my device so that I can synchronize it with another device (For the people interested, the device I am talking about is an Xsens DOT sensor).

However from reading issue 417 its clear to me we do not have access to the device its MAC address. My question is if this is able to be added to the Web Bluetooth API? So far I've found out that the Windows Bluetooth API and Android Bluetooth API do allow you to get the device its MAC address where macOS and IOS do not. I've found nothing about chromeOS.

@nondebug
Copy link

I think the Bluetooth device address (and MAC address) cannot be exposed through the API because some platforms do not provide the device address or provide a synthetic identifier that is not useful for re-identification.

In general, web platform APIs should not expose persistent device identifiers that cannot be reset by clearing the browser's local state. See Mitigating Browser Fingerprinting in Web Specifications. Bluetooth device addresses are typically permanent identifiers set in hardware. The device address is intended to be globally unique, making it a significant risk for active fingerprinting.

To mitigate fingerprinting while still allowing re-identification of previously connected devices, we should develop an opaque, persistent identifier that can be invalidated when local state is cleared. This would also enable us to expose an identifier on platforms where the device address is obscured.

I think this may not be sufficient for your use case. Can you describe more about how you intend to use the identifier for synchronizing devices?

@Milooooo1
Copy link
Author

Thank you for the detailed answer @nondebug. I understand why it's not possible to access such an identifier. The problem is that according to the Xsens documentation specifically calls for the MAC address of the root sensor this can be seen in the full document which you can download here or in the screenshot below.
Screenshot_2022-04-14-20-59-38-49_e2d5b3f32b79de1d45acd1fad96fbb0f

@nondebug
Copy link

Ah, so the Xsens sensor needs the actual MAC address. In that case you will need to find a workaround, for instance looking up the device address in chrome://bluetooth-internals on platforms where the address is provided.

@KOLANICH
Copy link

I vote against exposing MAC. If it is strictly needed, add a text field asking user to type/copy from the needed place in settings.

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