Questions tagged [web-serial-api]

36 questions
4
votes
1 answer

How can I close a Web Serial port that I've piped through a TransformStream?

I have a Web Serial port that I want to read some data from. I'd like to use TransformStreams to do some processing (e.g. decode bytes to strings, separate out logical messages, etc) by using pipeThrough to transform the data. However, once I do…
ddulaney
  • 843
  • 7
  • 19
3
votes
1 answer

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 API is used to read and write data to serial…
Tejas Chauhan
  • 69
  • 3
  • 9
2
votes
1 answer

web serial api shows "no compatible devices found" despite being given the vendorId

Windows 8.1, Chrome v91.0.4472.164. I have verified the vendor and product ids against the device manager. The device is a Arduino UNO using the Ch340 driver, it is listed in the device manager under Ports(COM & LPT) as "USB-SERIAL CH340(COM7)" My…
CarbonMan
  • 4,350
  • 12
  • 54
  • 75
1
vote
0 answers

Google Chrome Web Serial API: Will it work after the computer go to sleep/idle?

I'm implementing a QR Code reader (via a Honeywell 7580g reader) for check-ins. This uses the reader as a serial connection, not as a keyboard input. Users will show their QR Code to the reader, and then through the web serial connection, the app…
Pablo Cantero
  • 6,239
  • 4
  • 33
  • 44
1
vote
2 answers

chromium on ubuntu serial web api no compatible devices found

I want to use web serial api in chromium to be able to communicate with Arduino, however I get the message no compatible devices found. When I use Arduino IDE or python I can find it, but with chromium no. UBUNTU DISTRIB_RELEASE=22.04 Chromium…
1
vote
1 answer

How do you get the serial port of a printer device?

I'm using WebSerial API to use thermal-printer in chrome browser, and want to access only 'COM1' port without requestPort. Can I access to specific port and using that port?
sunny
  • 31
  • 1
1
vote
0 answers

Chrome Web Serial API From Chrome Extension

In a Chrome extension, we are trying to communicate with a microcontroller via the Web Serial API. The source code to the extension is on GitHub: https://github.com/capstone-coi/COI The extension, thus far, creates a pop-up containing a button to…
1
vote
0 answers

Web Serial API: how to flush and get length of data in buffer?

Is it possible to test whether data is available in the input stream (port.readable)? And how can it be flushed (read until ...? cancel() a reader?)? Docs: https://web.dev/serial/ ->…
handle
  • 5,859
  • 3
  • 54
  • 82
1
vote
0 answers

Web Serial API Not Persisting Port Access

I'm building a PWA with Nuxt.js that uses the Web Serial API to communicate with our proprietary hardware. It works as expected (i.e. the port will be available without user action the next time you load the web app unless the browser security is…
Sveetly
  • 13
  • 1
  • 3
1
vote
2 answers

Web Serial Api ->{value,done} -> the done is not getting true even after reading the whole data sent by the serial port device

const { value, done } = await reader.read(); There is this above line used in the docs (https://web.dev/serial/) to read the data coming from the serial port. Docs say that the done will turn out to be true when all of the data sent by the serial…
1
vote
0 answers

Chrome Web Serial no compatible device found on MacOS

I am trying to connect to an ANT+ usb stick using Web Serial API in Google Chrome. On linux (Ubuntu) it works out of the box, but on MacOS (v12.1) the device doesn’t show up into the search box. It does show up when using the web-serial-polyfill,…
codedesign
  • 11
  • 4
1
vote
1 answer

How would I send a file with Web Serial API?

I am a total newb, I just started looking into this today. I have a a chromebook running chrome Version 96.0.4664.111 (Official Build) (64-bit), and a raspberry pi pico which I have loaded python bootloader on (drag & drop). I am trying to access…
1
vote
1 answer

Web serial api , Port open without user gesture

In web serial api, I am able to open ports on button click. Is there any way to open port once the port is connected ? onconnect event does not open port, asking for user gesture...I need automatic open for mass production...
Sibin
  • 11
  • 3
1
vote
1 answer

Google Chrome Web Serial API: How do I address a Modbus device with a hex code?

It is my intention to address a device with Modbus via the Web Serial API built into Google Chrome. I want to address my device with a HEX code. The following screenshot proves that my device can be successfully addressed with a tool like this. The…
5-HT2A
  • 69
  • 1
  • 1
  • 7
1
vote
2 answers

Chrome & Web Serial API. How to get port without asking

I need your help. Is there a way to take control of a serial port, previously authorized, without using the popup window? (without port = await navigator.serial.requestPort();) Thank you and sorry for my english, italian speaking here.
Fra
  • 11
  • 2
1
2 3