Questions tagged [webusb]
WebUSB is a USB API for the web. Use this tag for questions about using the WebUSB API on any browser.
180
questions
0
votes
1
answer
39
views
WebUsb cutting Thermal print receipt
I'm working on a point-of-sale web application
I was able to detect and print from the web using this code
<html>
<body>
<textarea id="printContent"></textarea>
&...
0
votes
0
answers
7
views
VSCode Extension not detecting connected microcontroller on VSCode Server
I have built a VSCode extension that uses dapjs and webusb to program the connected microcontroller board. While the extension works in local, When I package it and install on VSCode Server via .vsix ...
0
votes
1
answer
14
views
Intercept navigator.usb.requestDevice dialog with puppeteer
Is it possible to intercept the dialog created after requesting a usb device via navigator.usb.requestDevice? I tried page.on("dialog", dialog => () from the puppeteer script and ...
-1
votes
0
answers
31
views
webUSB 2022 to seeeduino XIAO without using a library?
The XIAO is webUSB ready, but I havn't seen a javascript webpage that can read and write to it. Any suggestions?
1
vote
1
answer
34
views
Enable webUSB across cross-origin iframes without sharing permissions
I'm trying to work with webUSB on a page that contains sandboxed iframes from different origins. My goal is that the top level page and each of the embedded contexts can all use webUSB, but don't ...
1
vote
0
answers
54
views
WebUSB: can't open device
I am trying to open a device through WebUSB on Chromium but device.open fails with DOMException: Access denied..
Looking at chrome://device-log, this errors seems to come from chrome being denied file ...
-1
votes
1
answer
40
views
Can webusb connect a website to a Kmtronic Usb one relay device in a ChromeOs chromebox?
Hi I am trying to give a website direct on/off control of a usb relay on a chrome os device. In the past I just used some terminal scripts to run on start-up on a ubuntu device but chrome os is giving ...
0
votes
1
answer
203
views
access web serial api in android chrome browser
using web serial API in windows, mac os, and Linux chrome browser I can receive and send data. but in the android chrome browser, I am not able to send or receive data from a serial device.
so which ...
1
vote
1
answer
81
views
Can Chrome extensions communicate with USB-devices?
Chrome Apps can use the Chrome.usb and Chrome.hid apis.
These are deprecated, when writing Chrome extensions.
Is it possible to use web.usb or web.hid in the popup html?
In my popup.js this
if ("...
0
votes
1
answer
43
views
WebUSB navigator.usb.getDevices() empty after coming from the system prompt
On my hardware I defined the landing page URL, so my OS shows the little prompt directly when I plug it in and when I click on it, it opens the URL. So far so good.
But now on the landing page I need ...
0
votes
2
answers
228
views
WebHID: no compatible device found, but device shows up in Chrome device log?
For starters I used navigator.hid.requestDevice without any filters. So I can see which devices are available before adding a custom filter, but my device doesn't show up in the HID browser device ...
1
vote
1
answer
78
views
Chrome WebUSB controlTransferOut Results in "Transfer failed: A device attached to the system is not functioning. (0x1F)"
I'm developing a consumer USB device that will be configured via a web interface.
The first interface is a HID Gamepad. The second is a vendor interface where configuration will be handled.
Running ...
0
votes
1
answer
157
views
Connecting thermal printer on clients side via webusbapi and zadig
I'm trying to connect thermal printer on clients side through web app. (Frontend angular, backend c#)
First I got Access denied, and then after Zadig I managed to open connection to thermal printer, ...
0
votes
1
answer
172
views
web serial api readable stream code not work well
while (true) {
let { value, done } = await reader.read();
if (done) {
// |reader| has been canceled.
console.log("brack");
break;
}
console.log(value);
...
0
votes
1
answer
112
views
access mass storage device on web browser with WEBUSB API
how to display all mass storage device (e.g.-pen drive, etc..) data in a web browser.
I have successfully accessed comport device in the browser using serial API, but how to access the mass storage ...
1
vote
2
answers
131
views
Understanding the WebUSB connection workflow
I am working on an Chrome webapp that uses WebUSB running on an Android device, and am trying to understand how the connection management works.
If I am reading the spec right, if you don't already ...
1
vote
1
answer
51
views
Nano Ledger S in Angular
Today I ran into a problem while trying to connect my NANO Ledger S to my angular app.
I've tried installing this package yet it does not seem to work due to the package throwing some errors.
Module '&...
0
votes
1
answer
783
views
Read USB serial port data with web serial api in javascript
-I work on temperature and humidity reading device development. we have our own temperature and humidity reader device(USB-based COM(serial) port device). currently, we fetch the with standalone ...
-1
votes
1
answer
78
views
WebUSB for connecting to custom hardware
I would like to talk to a custom piece of hardware via my web application using WebUSB
The hardware is already able to communicate to a python script running on a laptop via USB
Now I have 2 questions ...
0
votes
1
answer
57
views
WebUSB `USBTransferInResult`s seem to contain partial interrupt transfers
I'm using the WebUSB API in Chrome. I can pair with the device, claim an interface, and begin listening to an inbound interrupt endpoint that transfers three bytes every time I press a button, and ...
0
votes
1
answer
152
views
There is no prompt to select USB device using navigator.usb.requestDevice() on Zebra Enterprise Browser
I am trying to use Web USB API to communicate with USB relay. The web page is running on Zebra device. It is working fine in Chromium. I am getting a prompt to select USB device.
device = await ...
-1
votes
1
answer
315
views
WebUSB access mass storage USB serial number
I am trying to access a USB mass storage device using the WebUSB interface. I have read that USB mass storage devices cannot be accessed:
"For example, if the device is a USB mass storage device ...
0
votes
1
answer
309
views
Availability of WebHID/WebUSB APIs on iOS
I know WebHID/WebUSB are generally available in Google Chrome (https://caniuse.com/webhid and https://caniuse.com/?search=webusb) but are these APIs available also on the iOS version of Google Chrome? ...
0
votes
0
answers
101
views
Best practise for creating an client server app to access usb devices remotly
I would Like to create a client server app to provide access for the client webapp to the usb devices (headsets) on a server (raspberry). In Order to have a Headset farm that can be accessed via the ...
1
vote
0
answers
225
views
How do I read data from usb serial port?
I'm trying to read data from the USB serial port. It is a thermometer scanner. The connection was successful but I don't know how to read the result data. I'm getting the result like the image below. ...
0
votes
0
answers
123
views
How to get data in PWA from another app using socket?
There is a task to make an electron desktop app using a UDP socket in order to work with our custom hardware available on Android by PWA.
Our team is in charge of developing this app and the hardware ...
1
vote
1
answer
74
views
Google Cloud Platform and WebUSB API
I am in the process of converting a Windows .NET desktop application (running on hundreds of PCs) that sends and receives USB data to an Azure Service. I am investigating migrating the current ...
1
vote
1
answer
142
views
Web usb looses its pairing on browser restart
I have an app that I developed and it uses webusb to print to a Hp Thermal printer. The app works ok and prints just fine. The issue is that whenever I restart the browser the pairing is lost and then ...
1
vote
1
answer
226
views
Is there a way to bypass WebHid USB limitation on Chrome browser?
Chrome 89 launched WebHid API with limitations for security.
Limitations includes:
Javascript cannot receive USB Hid data when browser tab switched.
Javascript cannot receive USB Hid data when user ...
0
votes
1
answer
123
views
WebUSB : DOMException Acces denied
I am trying to connect to Android phone using WebUSB with USB debugging OFF. But It return an error DOMException Acces denied.
Basically, I want my PC to connect as USB client (like Keyboard or any ...
0
votes
1
answer
224
views
i am trying to read values through web usb in new chrome version but it is showing DOMException: a transfer error has occurred
I am trying to read values through webusb to my app in chrome version(89,90,91,92), but it is showing an error (see screen shot).
Please help me to resolve this error. In a previous version I have ...
0
votes
1
answer
149
views
How to find correct USB device configuration and interface for use in WebUSB?
In WebUSB to connect to a device we must select a configuration and interface.
There's also the option to using an alternate interface.
How can I know which ones to use?
Do I need to know this ...
0
votes
1
answer
365
views
Get list of available USB devices in WebUSB API
In WebUSB API is there a way to get a list of all available devices?
The situation I have here is that a computer can have more than one identical device, lets say it has 2 identical printers. I want ...
1
vote
1
answer
229
views
IFrame policy for WebUSB in Google Colab
Is it possible to add support for the "usb" policy when Google Colab creates an IFrame for a code cell, for example:
import IPython
from google.colab import output
IPython.core.display....
-3
votes
1
answer
227
views
Is there a working code example of webUSB for an Arduino Uno R3 using the CH340 driver? [closed]
In a web page am able to find the device, but when I attempt to open the connection with .open() I get "access denied".
Through research I came across the winUsb driver, which allows me to ...
0
votes
1
answer
71
views
WebUSB `USBDevice.configurations` differs across platforms
I'm setting up a connection between a webpage and a thermal printer over WebUSB.
On my laptop (Mac, Chrome 91), the result is as expected: a device shows up, I can open it and select some ...
1
vote
2
answers
742
views
When should one use WebHID as opposed to WebUSB?
I have a proprietary USB device that has a flashing functionality over USB. I would like to replicate this flashing functionality from within the browser, but I am not certain what API to use.
...
0
votes
2
answers
589
views
Tried to connect a device to web via webusb but.. Failed to claim interface: Access denied (insufficient permissions)
I am using the webusb API in Google Chrome to try to connect a device to the browser. It worked with webserial API, but I am having trouble getting it to work with webusb API.
I am using HTTPS (...
1
vote
1
answer
386
views
WEBHID API: Inputreport not triggering with barcode scanner
Im pretty much using the Nintendo Switch Joy-Con controllers demo which I've modified a little to make it work with my barcode scanner. And it just wont work and if it does work it works once in 100 ...
1
vote
2
answers
385
views
Difference between WebUSB and WebSerial
I am working on a project that involve accessing USB port using browser.I have seen WebUSB API and WebSerial API. Though I can't seem to get what is the difference between them? Can someone highlight ...
0
votes
2
answers
241
views
WebUSB print HTML formatted content
I am able to use JavaScript with WebUSB to print text only to a POS printer. Anyone knows how to print HTML or image? Plain text printing is useless. An article from this link https://www.visuality.pl/...
1
vote
1
answer
119
views
Detecting the device which is inputing data in JavaScript
I have been working on a functionality which objetive is to read barcodes & qr codes. The problem is:
I have two barcode scanners connected to my PC and would like to know from which one the data ...
0
votes
1
answer
70
views
How to transferOut PDF data from HTML File Input with WebUSB
I've been using WebUSB with Zebra printers for a long time. That works great using TextEncoder. I can't figure out how to get this working with PDF files though.
I've got a Brother printer connected. ...
3
votes
1
answer
1k
views
WebUSB API not able to find compatible device
I am trying to access my USB device through web pages (over HTTPS).
My USB device is up and running and has also enabled Experimental Web Platform features chrome://flags/#enable-experimental-web-...
0
votes
2
answers
701
views
Using WebUSB API to read data from a barcode scanner
I'm trying to use WebUSB API to read data from a usb barcode device.
(Specifically I use a Datalogic QuickScan Lite qw2100. And I have configured the scanner to use the USB-COM-STD Interface.)
Using ...
2
votes
1
answer
653
views
Web USB: An operation that changes interface state is in progress error
Suddenly I get an error on a web usb device that connects with my Angular app.
The error reads: An operation that changes interface state is in progress.
Edit: more code:
Selecting device & ...
0
votes
1
answer
345
views
WebUSB can not claim device on some android devices
I have a PWA using Web Serial on those devices where it is supported (Chromium based Desktop Browsers), on all other devices (basically Android) I try to fall back to Web USB via web serial polyfill.
...
3
votes
1
answer
1k
views
WebUSB API and PC/SC Smart Card readers
Is it within the scope of the WebUSB API (drafted there) to be able to use PC/SC devices such as Smart Card readers, perhaps under the assumption they are CCID-compliant (many are close to that and do ...
1
vote
1
answer
579
views
WebUsb API on Android
I'm developing a PWA that should communicate with a custom device by usb through an Android 9.0 tablet.
When I'm first trying to claim an interface the PWA cannot claim it because it's says that the ...
1
vote
1
answer
488
views
How to convert SVG into ArrayBuffer to send to a webusb device
I have a WEBUSB printer connected to chrome which can print data send from my angular application.
I am able to create a BARCODE in a form of SVG using ngx-barcode. But in which format I should send ...