-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
how to get MAC Address from paired Bluetooth devices using google chrome API #622
Comments
You can't get MAC address from the Web Bluetooth API yet. |
Hello, now 2020, can I get the MAC address ? |
What about now? |
now? |
Ping |
It is still not yet possible unless you're in control of the Bluetooth device, in which case, you can have a custom Bluetooth characteristic whose value is the MAC address. |
Is this still an issue? I see that we get fed unique IDs for devices (https://developer.mozilla.org/en-US/docs/Web/API/BluetoothDevice) but still no MAC address. This is probably the wrong place to be requesting it though. I imagine the request has to go into the Chromium issue tracker over here? https://bugs.chromium.org/p/chromium/issues/wizard I imagine it may even be refused on security grounds. The fact we get unique IDs given to us which are not MAC addresses when the latter would be such an obvious thing to include implies it could be a deliberate decision. Further discussion over here seems to back this up: WebBluetoothCG/web-bluetooth#583 |
Hello, now 2023, can I get the MAC address ? |
@gischy Nope. It's a security decision, it seems. Annoyingly the "unique ID" you get for a device instead also changes every session, which means if you're trying to implement an app that can recognise devices the user has previously connected, they are specifically blocking you from doing that unless you can query the device directly for its identity. Again, a security feature I suspect, to stop websites fingerprinting users based on nearby BLE devices. You CAN get the mac address if you're using Electron since instead of a popup window it will report the MAC with the device name in an event when scanning, and you can feed this back into your application once the user has selected one of the devices. I just bung it in the BluetoothRemoteGATTServer object and now I have a proper ID for the device I've connected to. |
hello, now 2024, curently still not supported for get MAC Address from paired Bluetooth devices using google chrome API. |
@DexterVu have you found any solution |
Hi, I am trying using Google chrome API
examble here-> "Web Bluetooth / Device Info Sample".
but unfortunately the "BluetoothDevice" object contain only {id, name, gatt}.
I need to get the MAC Address value as the following:
The text was updated successfully, but these errors were encountered: