---
title: HwActivate
framework: usbserialdriverkit
role: symbol
role_heading: Instance Method
path: usbserialdriverkit/iouserusbserial/hwactivate
---

# HwActivate

Opens the communication channel to the device.

## Declaration

```occ
virtual kern_return_t HwActivate();
```

## Return Value

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

## Discussion

Discussion Override this method and use it to prepare your device’s hardware for serial communication. Always call the super version of the method at the beginning of your implementation.

## See Also

### Activating and Deactivating the Service

- [HwDeactivate](usbserialdriverkit/iouserusbserial/hwdeactivate.md)
