SerialPort: setSignals() method
The setSignals()
method of the SerialPort
interface sets control signals on the port and returns a Promise
that resolves when they are set.
Syntax
setSignals()
setSignals(options)
Parameters
options
Optional
-
An object with any of the following values:
-
dataTerminalReady
-
A 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.
-
requestToSend
-
A 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.
-
break
-
A 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.
Return value
Exceptions
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.
Specifications
Browser compatibility
|
Desktop |
Mobile |
|
Chrome |
Edge |
Firefox |
Internet Explorer |
Opera |
Safari |
WebView Android |
Chrome Android |
Firefox for Android |
Opera Android |
Safari on IOS |
Samsung Internet |
setSignals |
89 |
89 |
No |
No |
75 |
No |
No |
No |
No |
No |
No |
No |