Questions tagged [serialapi]
4 questions
5
votes
1 answer
Web Serial API - Uncaught (in promise) DOMException: Failed to open serial port / required member baudRate is undefined
The code below works on my Xubuntu machine, but now I'm on Kubuntu and it isn't working anymore - it won't open the port.
The Arduino IDE works fine (can write code to the board) and I'm able to select the device (Arduino Uno) in Chrome, but the…

uber
- 4,163
- 5
- 26
- 55
4
votes
1 answer
WebUSB API vs Serial API
Both WebUSB and Web Serial API can be used to communicate with devices connected to your computer with a USB plug trough a Web browser.
I am totally new to programming with hardware/microcontrollers (only web development before), but I have tried…

Michael Johansen
- 964
- 6
- 18
0
votes
1 answer
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);
console.log()
}
} catch (error) {
// Handle…

Tejas Chauhan
- 69
- 3
- 9
0
votes
3 answers
Is there a way to get Chrome to “forget” a device to test navigator.usb.requestDevice, navigator.serial.requestPort?
I'm hoping to migrate from using WebUSB to SerialAPI (which is explained nicely here).
Current Code:
try {
let device = await navigator.usb.requestDevice({
filters: [{
usbVendorId: RECEIVER_VENDOR_ID
}]
})
…

MikeiLL
- 6,282
- 5
- 37
- 68