<!--
{
  "availability" : [
    "DriverKit: 19.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SerialDriverKit",
  "identifier" : "/documentation/SerialDriverKit/IOUserSerial/SetModemStatus",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "SerialDriverKit"
    ],
    "preciseIdentifier" : "c:@S@IOUserSerial@F@SetModemStatus#b#b#b#b#"
  },
  "title" : "SetModemStatus"
}
-->

# SetModemStatus

Sets the modem status to the specified values.

```
virtual kern_return_t SetModemStatus(bool cts, bool dsr, bool ri, bool dcd);
```

## Parameters

`cts`

A Boolean value indicating the state of the clear-to-send bit. Specify `YES` to set the bit or `NO` to clear it.

`dsr`

A Boolean value indicating the state of the data-set-ready bit. Specify `YES` to set the bit or `NO` to clear it.

`ri`

A Boolean value indicating the state of the ring-indicator bit. Specify `YES` to set the bit or `NO` to clear it.

`dcd`

A Boolean value indicating the state of the data-carrier-detect bit. Specify `YES` to set the bit or `NO` to clear it.

## Return Value

<doc://com.apple.documentation/documentation/DriverKit/kIOReturnSuccess> on success, or another value if an error occurs. See <doc://com.apple.documentation/documentation/DriverKit/error-codes>.

## Discussion

Call this method to report the state of the device to the system.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)