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

# HwGetModemStatus

Gets the current status of the modem from the hardware.

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

## Parameters

`cts`

On return, a Boolean variable containing the state of the clear-to-send bit. Set this value to `YES` when the bit is set.

`dsr`

On return, a Boolean variable containing the state of the data-set-ready bit. Set this value to `YES` when the bit is set.

`ri`

On return, a Boolean variable containing the state of the ring-indicator bit. Set this value to `YES` when the bit is set.

`dcd`

On return, a Boolean variable containing the state of the data-carrier-detect bit. Set this value to `YES` when the bit is set.

## 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

Override this method and use it to retrieve the current modem status from your hardware. Set the values of each parameter to an appropriate value based on whether the indicated bit is set.

---

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)