---
title: SetModemStatus
framework: serialdriverkit
role: symbol
role_heading: Instance Method
path: serialdriverkit/iouserserial/setmodemstatus
---

# SetModemStatus

Sets the modem status to the specified values.

## Declaration

```occ
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

Return Value kIOReturnSuccess on success, or another value if an error occurs. See Error Codes.

## Discussion

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

## See Also

### Programming the Modem

- [HwGetModemStatus](serialdriverkit/iouserserial/hwgetmodemstatus.md)
- [HwResetFIFO](serialdriverkit/iouserserial/hwresetfifo.md)
- [HwSendBreak](serialdriverkit/iouserserial/hwsendbreak.md)
- [HwProgramBaudRate](serialdriverkit/iouserserial/hwprogrambaudrate.md)
- [HwProgramLatencyTimer](serialdriverkit/iouserserial/hwprogramlatencytimer.md)
- [HwProgramMCR](serialdriverkit/iouserserial/hwprogrammcr.md)
- [HwProgramUART](serialdriverkit/iouserserial/hwprogramuart.md)
- [Hardware Constants](serialdriverkit/hardware-constants.md)
