This feature is not Baseline because it does not work in some of the most widely-used browsers.
Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.
Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.
Note: This feature is available in Dedicated Web Workers.
The setSignals() method of the SerialPort interface sets control signals on the port and returns a Promise that resolves when they are set.
setSignals() setSignals(options)
options OptionalAn object with any of the following values:
dataTerminalReadyA boolean indicating whether to invoke the operating system to either assert (if true) or de-assert (if false) the "data terminal ready" or "DTR" signal on the serial port.
requestToSendA boolean indicating whether to invoke the operating system to either assert (if true) or de-assert (if false) the "request to send" or "RTS" signal on the serial port.
breakA boolean indicating whether to invoke the operating system to either assert (if true) or de-assert (if false) the "break" signal on the serial port.
A Promise.
InvalidStateError DOMException
Returned if the port is not open. Call SerialPort.open() to avoid this error.
NetworkError DOMException
Returned if the signals on the device could not be set.
| Specification |
|---|
| Web Serial API> # dom-serialport-setsignals> |
| Desktop | Mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Opera | Safari | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | WebView Android | WebView on iOS | |
setSignals |
89 | 89 | No | 75 | No | No | No | No | No | No | No | No |
© 2005–2025 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/SerialPort/setSignals