Hitec Usb Interface Driver

Posted on
  1. Hitec Usb Interface Driver Updater
  2. Hitec Usb Interface Driver Installer
  3. Hitec Usb Interface Drivers
  4. Hitec Usb Interface Driver Software
  1. If you have a USB Hub, try removing the USB hub and plug the usb interface cable directly to your pc. Hubs can sometimes confuse matters when installing drivers. Make sure you are plugging directly into the PC. The ONLY valid cab Id's for the USB interface when used with the Power Cab are 3,4, and 5.
  2. USB Wire Cable FMS Simulator Adapter for Esky JR Futaba: Y2kGTP: Non R/C Items (FS/W) 3: May 06, 2010 04:52 PM: Help! Futaba T10CHG (with FMS usb cable) configuration: skilla86: Simulators: 1: May 05, 2010 03:01 AM: Help! GWS USB cable and Hitec Eclipse 7: LeeT: Simulators: 1: Dec 12, 2009 08:14 PM: Discussion: Hitec USB cable driver: mmormota.
  3. I recently bought a Hitecastro USB EQ Direct Interface. Like most things, I did a dry run, rebuilt a WinXP laptop (Samsung NC20) and connected up ASCOM, EQMOD and the adaptor. Scope moved as expected and I thought I was already for some outdoor fun with my HEQ5pro and the direct lead.
-->

USB IDs for a multi-interface (composite) USB device; Example 1: Single Interface HID USB Device. This example shows how the hardware IDs and compatible IDs are generated for a single-interface USB device on a system running Windows 2000 or Windows XP. When the device is originally enumerated by the USB stack, the USBHUB driver extracts.

In this topic, you will learn about how to select a configuration in a universal serial bus (USB) device.

To select a configuration for a USB device, the client driver for the device must choose at least one of the supported configurations and specify the alternate settings of each interface to use. The client driver packages those choices in a select-configuration request and sends the request to the Microsoft-provided USB driver stack, specifically the USB bus driver (USB hub PDO). The USB bus driver selects each interface in the specified configuration and sets up a communication channel, or pipe, to each endpoint within the interface. After the request completes, the client driver receives a handle for the selected configuration, and pipe handles for the endpoints that are defined in the active alternate setting for each interface. The client driver can then use the received handles to change configuration settings and to send I/O read and write requests to a particular endpoint.

A client driver sends a select-configuration request in a USB Request Block (URB) of the type URB_FUNCTION_SELECT_CONFIGURATION. The procedure in this topic describes how to use the USBD_SelectConfigUrbAllocateAndBuild routine to build that URB. The routine allocates memory for an URB, formats the URB for a select-configuration request, and returns the address of the URB to the client driver.

Alternately, you can allocate an URB structure and then format the URB manually or by calling the UsbBuildSelectConfigurationRequest macro.

Prerequisites

  • In Windows 8, USBD_SelectConfigUrbAllocateAndBuild replaces USBD_CreateConfigurationRequestEx.
  • Before sending a select-configuration request, you must have a USBD handle for your client driver's registration with the USB driver stack. To create a USBD handle call USBD_CreateHandle.
  • Make sure you have obtained the configuration descriptor (USB_CONFIGURATION_DESCRIPTOR structure) of the configuration to select. Typically, you submit an URB of the type URB_FUNCTION_GET_DESCRIPTOR_FROM_DEVICE (see _URB_CONTROL_DESCRIPTOR_REQUEST) to retrieve information about device configuration. For more information, see USB Configuration Descriptors.
Interface

Instructions

Step 1: Create an array of USBD_INTERFACE_LIST_ENTRY structures.

  1. Get the number of interfaces in the configuration. This information is contained in the bNumInterfaces member of the USB_CONFIGURATION_DESCRIPTOR structure.

  2. Create an array of USBD_INTERFACE_LIST_ENTRY structures. The number of elements in the array must be one more than the number of interfaces. Initialize the array by calling RtlZeroMemory.

    The client driver specifies alternate settings in each interface to enable, in the array of USBD_INTERFACE_LIST_ENTRY structures.

    • The InterfaceDescriptor member of each structure points to the interface descriptor that contains the alternate setting.
    • The Interface member of each structure points to an USBD_INTERFACE_INFORMATION structure that contains pipe information in its Pipes member. Pipes stores information about each endpoint defined in the alternate setting.
  3. Obtain an interface descriptor for each interface (or its alternate setting) in the configuration. You can obtain those interface descriptors by calling USBD_ParseConfigurationDescriptorEx.

    **About Function Drivers for a USB Composite Device: **

    If the USB device is a composite device, the configuration is selected by the Microsoft-provided USB Generic Parent Driver (Usbccgp.sys). A client driver, which is one of the function drivers of the composite device, cannot change the configuration but the driver can still send a select-configuration request through Usbccgp.sys.

    Before sending that request, the client driver must submit a URB_FUNCTION_GET_DESCRIPTOR_FROM_DEVICE request. In response, Usbccgp.sys retrieves a partial configuration descriptor that only contains interface descriptors and other descriptors that pertain to the specific function for which the client driver is loaded. The number of interfaces reported in the bNumInterfaces field of a partial configuration descriptor is less than the total number of interfaces defined for the entire USB composite device. In addition, in a partial configuration descriptor, an interface descriptor's bInterfaceNumber indicates the actual interface number relative to the entire device. For example, Usbccgp.sys might report a partial configuration descriptor with bNumInterfaces value of 2 and bInterfaceNumber value of 4 for the first interface. Note that the interface number is greater than the number of interfaces reported.

    While enumerating interfaces in a partial configuration, avoid searching for interfaces by calculating interface numbers based on the number of interfaces. In the preceding example, if USBD_ParseConfigurationDescriptorEx is called in a loop that starts at zero, ends at (bNumInterfaces - 1), and increments the interface index (specified in the InterfaceNumber parameter) in each iteration, the routine fails to get the correct interface. Instead, make sure that you search for all interfaces in the configuration descriptor by passing -1 in InterfaceNumber. For implementation details, see the code example in this section.

    For information about how Usbccgp.sys handles a select-configuration request sent by a client driver, see Configuring Usbccgp.sys to Select a Non-Default USB Configuration.

  4. For each element (except the last element) in the array, set the InterfaceDescriptor member to the address of an interface descriptor. For the first element in the array, set the InterfaceDescriptor member to the address of the interface descriptor that represents the first interface in the configuration. Similarly for the nth element in the array, set the InterfaceDescriptor member to the address of the interface descriptor that represents the nth interface in the configuration.

  5. The InterfaceDescriptor member of the last element must be set to NULL.

Step 2: Get a pointer to an URB allocated by the USB driver stack.

Next, call USBD_SelectConfigUrbAllocateAndBuild by specifying the configuration to select and the populated array of USBD_INTERFACE_LIST_ENTRY structures. The routine performs the following tasks:

  • Creates an URB and fills it with information about the specified configuration, its interfaces and endpoints, and sets the request type to URB_FUNCTION_SELECT_CONFIGURATION.

  • Within that URB, allocates a USBD_INTERFACE_INFORMATION structure for each interface descriptor that the client driver specifies.

  • Sets the Interface member of the nth element of the caller-provided USBD_INTERFACE_LIST_ENTRY array to the address of the corresponding USBD_INTERFACE_INFORMATION structure in the URB.

  • Initializes the InterfaceNumber, AlternateSetting, NumberOfPipes, Pipes[i].MaximumTransferSize, and Pipes[i].PipeFlags members.

    Note In Windows 7 and ealier, the client driver created an URB for a select-configuration request by calling USBD_CreateConfigurationRequestEx. In Windows 2000 USBD_CreateConfigurationRequestEx initializes Pipes[i].MaximumTransferSize to the default maximum transfer size for a single URB read/write request. The client driver can specify a different maximum transfer size in the Pipes[i].MaximumTransferSize. The USB stack ignores this value in Windows XP, Windows Server 2003, and later versions of the operating system. For more information about MaximumTransferSize, see 'Setting USB Transfer and Packet Sizes' in USB Bandwidth Allocation.

Step 3: Submit the URB to the USB driver stack.

To submit the URB to the USB driver stack, the client driver must send an IOCTL_INTERNAL_USB_SUBMIT_URB I/O control request . For information about submitting an URB, see How to Submit an URB.

After receiving the URB, the USB driver stack fills the rest of the members of each USBD_INTERFACE_INFORMATION structure. In particular, the Pipes array member is filled with information about the pipes associated with the endpoints of the interface.

Step 4: On request completion, inspect the USBD_INTERFACE_INFORMATION structures and the URB.

Hitec Usb Interface Driver Updater

After the USB driver stack completes the IRP for the request, the stack returns the list of alternate settings and the related interfaces in the USBD_INTERFACE_LIST_ENTRY array.

  1. The Pipes member of each USBD_INTERFACE_INFORMATION structure points to an array of USBD_PIPE_INFORMATION structures that contains information about the pipes associated with each endpoint of that particular interface. The client driver can obtain pipe handles from Pipes[i].PipeHandle and use them to send I/O requests to specific pipes. The Pipes[i].PipeType member specifies the type of endpoint and transfer supported by that pipe.

  2. Within the UrbSelectConfiguration member of the URB, the USB driver stack returns a handle that you can use to select an alternate interface setting by submitting another URB of the type URB_FUNCTION_SELECT_INTERFACE (select-interface request). To allocate and build the URB structure for that request, call USBD_SelectInterfaceUrbAllocateAndBuild.

    The select-configuration request and select-interface request might fail if there is insufficient bandwidth to support the isochronous, control, and interrupt endpoints within the enabled interfaces. In that case, the USB bus driver sets the Status member of the URB header to USBD_STATUS_NO_BANDWIDTH.

The following example code shows how to create an array of USBD_INTERFACE_LIST_ENTRY structures and call USBD_SelectConfigUrbAllocateAndBuild. The example sends the request synchronously by calling SubmitUrbSync. To see the code example for SubmitUrbSync, see How to Submit an URB.

Remarks

Disabling a Configuration for a USB Device:

To disable a USB device, create and submit a select-configuration request with a NULL configuration descriptor. For that type of request, you can reuse the URB that you created for request that selected a configuration in the device. Alternately, you can allocate a new URB by calling USBD_UrbAllocate. Before submitting the request you must format the URB by using the UsbBuildSelectConfigurationRequest macro as shown in the following example code.

Related topics

Configuring Usbccgp.sys to Select a Non-Default USB Configuration
USB device configuration
Allocating and Building URBs

-->

This topic describes the steps for issuing a select-interface request to activate an alternate setting in a USB interface. The client driver must issue this request after selecting a USB configuration. Selecting a configuration, by default, also activates the first alternate setting in each interface in that configuration.

Each USB configuration must support one or more multiple USB interfaces. Each interface exposes one or more endpoints that are used to transfer data to and from the device. USB interfaces must have a device-defined, interface index that is used to identify the interface. The interface must also have one or more alternate settings that group the endpoints of the interface. As part of device configuration, the client driver must select one of the alternate settings in the interface. Because endpoints can be shared among alternate settings, only one setting can be active at a given time. After the alternate setting is active, its endpoints become available for data transfers.

For a multiple interface device, two interfaces can be active at a given time. The client driver must activate an alternate setting in each interface. Endpoints are not shared among interfaces and therefore, each simultaneous data transfers can be performed on each interface.

Alternate settings are device-defined and identified with a number called the setting index. The alternate setting at index 0 is called the default alternate setting in this documentation set. An alternate setting is described in a USB_INTERFACE_DESCRIPTOR structure. The structure contains the interface index with which the setting is associated and the number of endpoints defined by the setting. It also contains information about the class specification to which the functionality of the interface conforms. The way, in which endpoints are grouped, depends on the functionality of the device.

For example, an interface exposes two isochronous and two bulk endpoints through three alternate settings (index 0, 1, 2). The Alternate Setting 0 does not define any endpoint; Alternate Setting 1 defines the bulk endpoints; Alternate Setting 2 defines the isochronous endpoints. Because Alternate Setting 0 has no endpoint, the client driver can select this setting to disable data transfer in order to conserve bandwidth. When either of the other settings is active, the device is ready for data transfers. Alternate Setting 1 can be used to transfer bulk data. Alternate Setting 2 can be selected when the device is in streaming mode. Therefore, alternate settings give the client driver the flexibility of changing the device configuration as and when required. In this example, the client driver can switch the device functionality from a bulk transfer to streaming, just by selecting an alternate setting.

Alternate settings can also be used to set bandwidth requirements. For an example, see the USB Device Layout.

Hitec Usb Interface Driver Installer

Windows Driver Foundation (WDF) provides methods in Kernel-Mode Driver Framework and User-Mode Driver Framework that the client driver can call to select a different alternate setting. KMDF client driver can select a setting by specifying the setting index, interface descriptor of the setting, or by submitting an URB that contains the request. UMDF client driver can only select an alternate setting by specifying its setting index.

After a select-configuration request completes successfully, the previously active alternate setting is deactivated.

What you need to know

Technologies

Prerequisites

Before the client driver can select an alternate setting, make sure these requirements are met:

  • The client driver must have created the framework USB target device object.

    • A KMDF client driver must obtain a WDFUSBDEVICE handle by calling the WdfUsbTargetDeviceCreateWithParameters method. For more information, see 'Device source code' in Understanding the USB client driver code structure (KMDF).
    • A UMDF client driver must obtain an IWDFUsbTargetDevice pointer by querying the framework target device object. For more information, see 'IPnpCallbackHardware implementation and USB-specific tasks' in Understanding the USB client driver code structure (UMDF)

    If you are using the USB templates that are provided with Microsoft Visual Studio Professional 2012, the template code performs those tasks. The template code obtains the handle to the target device object and stores in the device context.

  • The device must have an active configuration.

    • A KMDF client driver must call the WdfUsbTargetDeviceSelectConfig method.
    • For a UMDF client driver, the framework selects the first configuration and the default alternate setting for each interface in that configuration.

    If you are using USB templates, the code selects the first configuration and the default alternate setting in each interface.

Instructions

Select an alternate setting - KMDF client driver

  1. Get a WDFUSBINTERFACE handle to the interface that has the alternate setting.

    To get handle, first get the number of the interfaces of the selected configuration by calling WdfUsbTargetDeviceGetNumInterfaces and then enumerate interfaces in a loop. In each iteration call the WdfUsbTargetDeviceGetInterface method and increment the index (starting at zero).

    Note During device enumeration, the USB driver stack assigns numbers to the alternate settings. The interface numbers are zero-based and sequential. Those numbers might be different to the device-defined setting index. To obtain the device-defined setting index, call the WdfUsbInterfaceGetInterfaceNumber method.

  2. Initiate a select-interface request by calling the WdfUsbInterfaceSelectSetting method. In the Params parameter of the call, choose one of these options:

    • Specify the alternate setting number assigned by the USB driver stack. Typically, you pass the same index that you used in step 1 to enumerate the settings.

    • Specify a pointer the interface descriptor that describes the alternate setting. The driver can then get interface descriptors while enumerating alternate settings in the interface by calling the WdfUsbInterfaceGetDescriptor method. After the enumeration completes, the driver gets information about all of the enumerated alternate settings in the USB_INTERFACE_DESCRIPTOR structure.

    • Specify a pointer to an URB that contains all the information required for the select-interface request.

      1. Allocate an array of USBD_INTERFACE_LIST_ENTRY structures. The number of elements in this array depends on the number of interfaces in the selected configuration. For information about initializing this array, see How to Select a Configuration for a USB Device.
      2. Allocate an URB for the select interface request by calling the USBD_SelectInterfaceUrbAllocateAndBuild routine. In this call specify the interface list array and the configuration handle that was obtained after selecting a configuration. You can get that handle by calling the WdfUsbTargetDeviceWdmGetConfigurationHandle method.
      3. Call WdfUsbInterfaceSelectSetting and specify the URB.

      **WDM drivers: **To submit the URB, associate the URB with an IRP, and submit the IRP to the USB driver stack. For more information, see How to Submit an URB.

    The options in the list provide the client driver with the flexibility for specifying the selection criteria. If you are already aware of the endpoint capabilities of the alternate setting, choose the first option (with the alternate setting number) in the list. Otherwise, choose the second option that specifies the interface descriptor. Inspect USB_INTERFACE_DESCRIPTOR structures for all alternate settings. For each setting, enumerate its endpoints and their characteristics such as, the endpoint type, maximum packet size, and so on. When you find the set of endpoints that you need for data transfers, call WdfUsbInterfaceSelectSetting by specifying a pointer to that interface descriptor. Typically, you will not require the third option unless you are a WDM-based client driver that can only send requests to the USB driver stack by submitting URBs.

    Based on the information supplied by the client driver, the USB driver stack then builds a standard control request (SET INTERFACE) and sends it to the device. Download cooking simulator for free. If the request completes successfully, the USB driver stack obtains pipes handles to the endpoints of the alternate setting.

    After selecting an alternate setting, the client driver must always get the pipe handles for endpoints in the new setting. Failure to do so might cause the driver to send data transfer requests by using stale pipe handles. For information about retrieving pipe handles, see How to enumerate USB pipes.

Hitec Usb Interface Drivers

Select an alternate setting - UMDF client driver

  1. Get the number of USB interfaces that the active configuration supports by calling the IWDFUsbTargetDevice::GetNumInterfaces method.

  2. Get an IWDFUsbInterface pointer for each interface in the configuration.

    Enumerate all interfaces by calling the IWDFUsbTargetDevice::RetrieveUsbInterface method in a loop until the function returns NULL. With each iteration, increment the member index (zero-based). The loop retrieves IWDFUsbInterface pointers to all the enumerated interfaces.

  3. For each interface, get the WinUSB handle by calling IWDFUsbInterface::GetWinUsbHandle. This handle is required by the next step.

  4. Call WinUsb_GetAssociatedInterface to obtain a handle to the interface. In the AssociatedInterfaceIndex parameter, specify the index in step 2.

  5. Determine the number of alternate settings in the interface.

    Call the WinUsb_QueryInterfaceSettings function in a loop and increment the index (zero-based) in each iteration. When all settings are enumerated, the function returns ERROR_NO_MORE_ITEMS. The function also returns interface descriptors for each setting.

  6. By using the value received in the bNumEndpoints member of each interface descriptor, and enumerate its endpoints. Inspect the endpoint descriptors and determine which setting meets your requirement.

  7. Initiate a select-interface request by calling the WinUsb_SetCurrentAlternateSetting function. In the call, specify the alternate setting number associated with the index in step 4.

  8. Release the interface handle obtained in step 4 by calling the WinUsb_Free function.

  9. Release the WinUSB handle obtained in step 3 by calling the WinUsb_Free function.

  10. If you are finished using IWDFUsbInterface methods, release all interface pointers retrieved in step 2.

Hitec Usb Interface Driver Software

Remarks

For a KMDF client driver, in its WdfUsbInterfaceSelectSetting call, the driver can supply a pointer to a driver-defined pipe context. The client driver can store information about pipes in the pipe context. For more information about pipe information, see How to enumerate USB pipes.

Related topics