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 SerialPort.getSignals() method of the SerialPort interface returns a Promise that resolves with an object containing the current state of the port's control signals.
getSignals()
None.
Returns a Promise that resolves with an object containing the following members:
clearToSendA boolean indicating to the other end of a serial connection that is clear to send data.
dataCarrierDetectA boolean that toggles the control signal needed to communicate over a serial connection.
dataSetReadyA boolean indicating whether the device is ready to send and receive data.
ringIndicatorA boolean indicating whether a ring signal should be sent down the serial connection.
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 read.
| Specification |
|---|
| Web Serial API> # dom-serialport-getsignals> |
| Desktop | Mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Opera | Safari | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | WebView Android | WebView on iOS | |
getSignals |
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/getSignals