SerialPort.setSignals()

Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.

The setSignals() method of the SerialPort interface sets control signals on the port and returns a Promise that resolves when they are set.

Syntax

var promise = SerialPort.setSignals(options);

Parameters

optionsOptional

An object with any of the following values:

clearToSend

A boolean indicating to the other end of a serial connection that is is clear to send data.

dataCarrierDetect

A boolean that toggles the control signal needed to communicate over a serial connection.

dataSetReady

A boolean indicating whether the device is ready to send and receive data.

ringIndicator

A boolean indicating whether a ring signal should be sent down the serial connection.

Return value

A Promise.

Exceptions

DOMException "InvalidStateError"

Indicates that the port is not open. Call SerialPort.open() to avoid this error.

DOMException NetworkError

Indicates that one of 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
No
No
No
No
No
No
No
No

© 2005–2021 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