You open a HID device by calling its open() method, which requests that the operating system opens the device and returns a Promise . Because HID devices are not opened automatically, you must call this method on a HIDDevice returned by HID.requestDevice() before you can transfer data .
The practical detail is to await the Promise before sending or receiving data. For example:
await device.open();
This information comes from the MDN Web Docs page for the HIDDevice.open() method . The source describes the WebHID API, which is marked as experimental and available in a secure context .