<!--
{
  "availability" : [
    "DriverKit: 19.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "USBDriverKit",
  "identifier" : "/documentation/USBDriverKit/IOUSBHostDevice/DeviceRequest",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "USBDriverKit"
    ],
    "preciseIdentifier" : "c:@S@IOUSBHostDevice@F@DeviceRequest#*$@S@IOService#c#c#s#s#s#*$@S@IOMemoryDescriptor#*s#i#"
  },
  "title" : "DeviceRequest"
}
-->

# DeviceRequest

Sends a synchronous request to the device on the default control endpoint.

```
virtual kern_return_t DeviceRequest(IOService *forClient, uint8_t bmRequestType, uint8_t bRequest, uint16_t wValue, uint16_t wIndex, uint16_t wLength, IOMemoryDescriptor *dataBuffer, uint16_t *bytesTransferred, uint32_t completionTimeoutMs);
```

## Parameters

`bmRequestType`

The characteristics of the device request. See the <doc://com.apple.documentation/documentation/iokit/usbmakebmrequesttype> macro for information about how to construct this request.

`bRequest`

The request you want to make.

`wValue`

Request-specific data.

`wIndex`

Request-specific data.

`wLength`

The number of bytes to transfer, if there’s a data stage.

`dataBuffer`

The memory descriptor to use for the request’s data phase, if any.

`bytesTransferred`

A pointer to a variable. On return, this variable contains the number of bytes that the method actually transferred during the data phase.

`completionTimeoutMs`

The timeout duration in milliseconds. If you specify `0`, the request never times out.

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

This method acquires the service’s workloop lock and performs a USB device request (USB 2.0, section 9.3). The method waits for the request to complete, and may call <doc://com.apple.documentation/documentation/kernel/iocommandgate/1573818-commandsleep> during that time.

---

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)