TECHNICAL SOLUTIONS

How to control use of the Web Bluetooth API in Microsoft Edge


Web pages can communicate directly from a paired device via Web Bluetooth API. So, instead of downloading a mobile app and having it sync with devices, you can use this technology for communicating with nearby Bluetooth devices. However, not all browsers are compatible with Web Bluetooth yet. The ones that are, like Microsoft Edge, allow you to easily access a USB device. Here’s a short tutorial describing how to control the use of Web Bluetooth API in Edge.

Microsoft-Edge-new-Chromium-Logo

Control use of Web Bluetooth API in Edge browser

Microsoft Edge browser allows its users to define a list of sites, based on URL patterns, that can ask the user for access to a USB device. If you don’t configure this policy, the user’s personal configuration is used for all sites or the global default value from the DefaultWebUsbGuardSetting policy is used.

  1. Open Registry Editor.
  2. Go to the MicrosoftEdge key
  3. Double-click DefaultWebUsbGuardSetting entry.
  4. Enter the value 2 to not allow any site to request access to USB devices via the WebUSB API.
  5. Change the value to 3 to allow sites to ask the user to grant access to a connected USB device.
  6. Close the Registry Editor.
  7. Restart your PC.

Please note that the method involves making changes to the Registry Editor. Serious changes can occur if you make changes to the Registry Editor incorrectly. Create a System Restore point before proceeding further.

Press Win+R in combination to open the Run dialog box.

Type Regedit in the empty field of the box and hit Enter key.

When the Registry Editor opens, navigate to the following path address –

HKEY_LOCAL_MACHINE SoftwarePoliciesMicrosoftEdge.

In the right-pane, double-click the DefaultWebUsbGuardSetting entry. If the entry doesn’t exist, you’ll need to create one.

Web Bluetooth API in Edge

When the Edit String box appears, enter the value 2 to block or prevent any site to request access to USB devices via the WebUSB API.

Web Guard Setting

Similarly, to allow sites to ask the user to grant access to a connected USB device, change the value from 2 to 3.

When done, close the Registry Editor and exit.

Restart your PC to allow the changes to take effect.

For your information, the Group Policy options for mapping Control use of the Web Bluetooth API setting are as follows:

  • BlockWebBluetooth (2) = Do not allow any site to request access to Bluetooth devices via the Web Bluetooth API
  • AskWebBluetooth (3) = Allow sites to ask the user to grant access to a nearby Bluetooth device

Hope that helps!

Web Bluetooth API in Edge

Source link

Leave a Reply

Your email address will not be published. Required fields are marked *