Difference between revisions of "WebUSB"

From SEGGER Wiki
Jump to: navigation, search
(Web browser support)
 
(4 intermediate revisions by 3 users not shown)
Line 1: Line 1:
  +
[[Category:Knowledge Base]]
 
The Universal Serial Bus (USB) is the de-facto standard for peripherals connected to a computer.
 
The Universal Serial Bus (USB) is the de-facto standard for peripherals connected to a computer.
 
A wide range of of useful USB devices exist, most of them provide standard services like keyboard, mice, audio, video and storage devices. These are supported by standard device class drivers implemented in the computers operating system.
 
A wide range of of useful USB devices exist, most of them provide standard services like keyboard, mice, audio, video and storage devices. These are supported by standard device class drivers implemented in the computers operating system.
Line 11: Line 12:
   
 
= Web browser support =
 
= Web browser support =
As of today (June 2019), the following web browsers support WebUSB:
+
At the time of writing (June 2019), the following web browsers support WebUSB:
 
* Google Chrome
 
* Google Chrome
 
* Microsoft Edge
 
* Microsoft Edge
  +
* Opera (security features must be disabled ( opera://flags/#enable-experimental-web-platform-features ))
* Opera
 
  +
  +
= Sample use cases =
  +
There are several use cases where WebUSB allows an easy and cross-platform solution:
  +
* Single-click firmware updates via web browser (no separate utility to be installed)
  +
* Easy configuration of a USB device. (no separate utility to be installed) E.g. printers, headphones, ...
   
 
= References =
 
= References =

Latest revision as of 15:20, 25 June 2019

The Universal Serial Bus (USB) is the de-facto standard for peripherals connected to a computer. A wide range of of useful USB devices exist, most of them provide standard services like keyboard, mice, audio, video and storage devices. These are supported by standard device class drivers implemented in the computers operating system.

However, there are many devices that do not fit into one of the standardized device classes. In order to access these devices, proprietary device drivers and operating system dependent code are usually necessary. This prevents these devices from being used by web applications.

WebUSB provides a way for websites to connect to users' USB devices. A web browser that implements WebUSB enables a web application to expose USB device services using JavaScript without the need to install any drivers on the user side. With the WebUSB API, hardware manufacturers will be able to build cross-platform JavaScript SDKs for their devices.

As a sample application, a vendor of an USB device may provide a web page to configure the USB device or even to update the firmware of the device.

Web browser support

At the time of writing (June 2019), the following web browsers support WebUSB:

  • Google Chrome
  • Microsoft Edge
  • Opera (security features must be disabled ( opera://flags/#enable-experimental-web-platform-features ))

Sample use cases

There are several use cases where WebUSB allows an easy and cross-platform solution:

  • Single-click firmware updates via web browser (no separate utility to be installed)
  • Easy configuration of a USB device. (no separate utility to be installed) E.g. printers, headphones, ...

References

  • WebUSB API Specification: [1]
  • List of browsers that support WebUSB: [2]
  • Demo application using WebUSB with SEGGER's emUSB-Device USB stack: [3]