11/24/2021

Drivers Cosmed USB Devices

-->

Summary

  • Opening the device and obtaining WinUSB handle.
  • Getting information about the device, configuration, and interface settings of all interfaces, and their endpoints.
  • Reading and writing data to bulk and interrupt endpoints.

Drivers Cosmed USB Devices

Usb driver download - Best answers Download usb driver - Best answers Spvd-012.1 usb driver for windows 10 - Forum - Drivers.

Important APIs

This topic includes a detailed walkthrough of how to use WinUSB Functions to communicate with a USB device that is using Winusb.sys as its function driver.

If you are using Microsoft Visual Studio 2013, create your skeleton app by using the WinUSB template. In that case, skip steps 1 through 3 and proceed from step 4 in this topic. The template opens a file handle to the device and obtains the WinUSB handle required for subsequent operations. That handle is stored in the app-defined DEVICE_DATA structure in device.h.

Share data with multiple COSMED devices in any small and large network environment (LAN/WAN) Connector OMNIA - Connector. Integrate test results within your Hospital Information System (HIS) SDK OMNIA Control Protocol (OCP) Integrate seamlessly OMNIA to a third-party application software. Follow these steps to reinstall the Apple Mobile Device USB driver: Disconnect your device from your computer. Unlock your iOS or iPadOS device and go to the Home screen. Then reconnect your device. If iTunes opens, close it. Press the Windows and R key on your keyboard to open the Run command. In the Run window, enter:%ProgramFiles% Common Files Apple Mobile Device Support Drivers; Click OK. Right-click (or tap and hold) USB Root Hub (USB 3.0) and select Properties. Select the Driver tab, then select Update Driver. Select Browse my computer for driver software Let me pick from a list of available drivers on my computer. Select USB Root Hub (USB 3.0), then select Next. Where can I download the USB drivers for my device? Motorola Device Manager contains USB drivers and software to connect your Motorola phone or tablet to your computer using a USB cable.

For more information about the template, see Write a Windows desktop app based on the WinUSB template.

Note WinUSB functions require Windows XP or later. You can use these functions in your C/C++ application to communicate with your USB device. Microsoft does not provide a managed API for WinUSB.

Prerequisites

Cosmed

The following items apply to this walkthrough:

  • This information applies to Windows 8.1, Windows 8, Windows 7, Windows Server 2008, Windows Vista versions of Windows.
  • You have installed Winusb.sys as the device's function driver. For more information about this process, see WinUSB (Winusb.sys) Installation.
  • The examples in this topic are based on the OSR USB FX2 Learning Kit device. You can use these examples to extend the procedures to other USB devices.

Step 1: Create a skeleton app based on the WinUSB template

To access a USB device, start by creating a skeleton app based on the WinUSB template included in the integrated environment of Windows Driver Kit (WDK) (with Debugging Tools for Windows) and Microsoft Visual Studio.You can use the template as a starting point.

For information about the template code, how to create, build, deploy, and debug the skeleton app, see Write a Windows desktop app based on the WinUSB template.

Drivers Cosmed USB Devices

The template enumerates devices by using SetupAPI routines, opens a file handle for the device, and creates a WinUSB interface handle required for subsequent tasks. For example code that gets the device handle and opens the device, see Template code discussion.

Step 2: Query the Device for USB Descriptors

Devices

Next, query the device for USB-specific information such as device speed, interface descriptors, related endpoints, and their pipes. The procedure is similar to the one that USB device drivers use. However, the application completes device queries by calling WinUsb_GetDescriptor.

The following list shows the WinUSB functions that you can call to get USB-specific information:

  • Additional device information.

    Call WinUsb_QueryDeviceInformation to request information from the device descriptors for the device. To get the device's speed, set DEVICE_SPEED (0x01) in the InformationType parameter. The function returns LowSpeed (0x01) or HighSpeed (0x03).

  • Interface descriptors

    Call WinUsb_QueryInterfaceSettings and pass the device's interface handles to obtain the corresponding interface descriptors. The WinUSB interface handle corresponds to the first interface. Some USB devices, such as the OSR Fx2 device, support only one interface without any alternative setting. Therefore, for these devices the AlternateSettingNumber parameter is set to zero and the function is called only one time. WinUsb_QueryInterfaceSettings fills the caller-allocated USB_INTERFACE_DESCRIPTOR structure (passed in the UsbAltInterfaceDescriptor parameter) with information about the interface. For example, the number of endpoints in the interface is set in the bNumEndpoints member of USB_INTERFACE_DESCRIPTOR.

    For devices that support multiple interfaces, call WinUsb_GetAssociatedInterface to obtain interface handles for associated interfaces by specifying the alternative settings in the AssociatedInterfaceIndex parameter.

  • Endpoints

    Call WinUsb_QueryPipe to obtain information about each endpoint on each interface. WinUsb_QueryPipe populates the caller-allocated WINUSB_PIPE_INFORMATION structure with information about the specified endpoint's pipe. The endpoints' pipes are identified by a zero-based index, and must be less than the value in the bNumEndpoints member of the interface descriptor that is retrieved in the previous call to WinUsb_QueryInterfaceSettings. The OSR Fx2 device has one interface that has three endpoints. For this device, the function's AlternateInterfaceNumber parameter is set to 0, and the value of the PipeIndex parameter varies from 0 to 2.

    To determine the pipe type, examine the WINUSB_PIPE_INFORMATION structure's PipeInfo member. This member is set to one of the USBD_PIPE_TYPE enumeration values: UsbdPipeTypeControl, UsbdPipeTypeIsochronous, UsbdPipeTypeBulk, or UsbdPipeTypeInterrupt. The OSR USB FX2 device supports an interrupt pipe, a bulk-in pipe, and a bulk-out pipe, so PipeInfo is set to either UsbdPipeTypeInterrupt or UsbdPipeTypeBulk. The UsbdPipeTypeBulk value identifies bulk pipes, but does not provide the pipe's direction. The direction information is encoded in the high bit of the pipe address, which is stored in the WINUSB_PIPE_INFORMATION structure's PipeId member. The simplest way to determine the direction of the pipe is to pass the PipeId value to one of the following macros from Usb100.h:

    • The USB_ENDPOINT_DIRECTION_IN (PipeId) macro returns TRUE if the direction is in.
    • The USB_ENDPOINT_DIRECTION_OUT(PipeId) macro returns TRUE if the direction is out.

    The application uses the PipeId value to identify which pipe to use for data transfer in calls to WinUSB functions, such as WinUsb_ReadPipe (described in the 'Issue I/O Requests' section of this topic), so the example stores all three PipeId values for later use.

The following example code gets the speed of the device that is specified by the WinUSB interface handle.

The following example code queries the various descriptors for the USB device that is specified by the WinUSB interface handle. The example function retrieves the types of supported endpoints and their pipe identifiers. The example stores all three PipeId values for later use.

Step 3: Send Control Transfer to the Default Endpoint

Next, communicate with the device by issuing control request to the default endpoint.

All USB devices have a default endpoint in addition to the endpoints that are associated with interfaces. The primary purpose of the default endpoint is to provide the host with information that it can use to configure the device. However, devices can also use the default endpoint for device-specific purposes. For example, the OSR USB FX2 device uses the default endpoint to control the light bar and seven-segment digital display.

Control commands consist of an 8-byte setup packet, which includes a request code that specifies the particular request, and an optional data buffer. The request codes and buffer formats are vendor defined. In this example, the application sends data to the device to control the light bar. The code to set the light bar is 0xD8, which is defined for convenience as SET_BARGRAPH_DISPLAY. For this request, the device requires a 1-byte data buffer that specifies which elements should be lit by setting the appropriate bits.

The application can set this through the user interface (UI), such as by providing a set of eight check box controls to specify which elements of the light bar should be lit. The specified elements correspond to the appropriate bits in the buffer. To avoid UI code, the example code in this section sets the bits so that alternate lights get lit up.

Use the following steps to issue a control request.

  1. Allocate a 1-byte data buffer and load the data into the buffer that specifies the elements that should be lit by setting the appropriate bits.

  2. Construct a setup packet in a caller-allocated WINUSB_SETUP_PACKET structure. Initialize the members to represent the request type and data as follows:

    • The RequestType member specifies request direction. It is set to 0, which indicates host-to-device data transfer. For device-to-host transfers, set RequestType to 1.
    • The Request member is set to the vendor-defined code for this request, 0xD8. It is defined for convenience as SET_BARGRAPH_DISPLAY.
    • The Length member is set to the size of the data buffer.
    • The Index and Value members are not required for this request, so they are set to zero.
  3. Call WinUsb_ControlTransfer to transmit the request to the default endpoint by passing the device's WinUSB interface handle, the setup packet, and the data buffer. The function receives the number of bytes that were transferred to the device in the LengthTransferred parameter.

The following code example sends a control request to the specified USB device to control the lights on the light bar.

Step 4: Issue I/O Requests

Drivers Cosmed Usb Devices Bluetooth

Next, send data to the device's bulk-in and bulk-out endpoints that can be used for read and write requests, respectively. On the OSR USB FX2 device, these two endpoints are configured for loopback, so the device moves data from the bulk-in endpoint to the bulk-out endpoint. It does not change the value of the data or add any new data. For loopback configuration, a read request reads the data that was sent by the most recent write request. WinUSB provides the following functions for sending write and read requests:

To send a write request

  1. Allocate a buffer and fill it with the data that you want to write to the device. There is no limitation on the buffer size if the application does not set RAW_IO as the pipe's policy type. WinUSB divides the buffer into appropriately sized chunks, if necessary. If RAW_IO is set, the size of the buffer is limited by the maximum transfer size supported by WinUSB.
  2. Call WinUsb_WritePipe to write the buffer to the device. Pass the WinUSB interface handle for the device, the pipe identifier for the bulk-out pipe (as described in the Query the Device for USB Descriptors section of this topic), and the buffer. The function returns the number of bytes that are actually written to the device in the bytesWritten parameter. The Overlapped parameter is set to NULL to request a synchronous operation. To perform an asynchronous write request, set Overlapped to a pointer to an OVERLAPPED structure.

Write requests that contain zero-length data are forwarded down the USB stack. If the transfer length is greater than a maximum transfer length, WinUSB divides the request into smaller requests of maximum transfer length and submits them serially.The following code example allocates a string and sends it to the bulk-out endpoint of the device.

To send a read request

  • Call WinUsb_ReadPipe to read data from the bulk-in endpoint of the device. Pass the WinUSB interface handle of the device, the pipe identifier for the bulk-in endpoint, and an appropriately sized empty buffer. When the function returns, the buffer contains the data that was read from the device. The number of bytes that were read is returned in the function's bytesRead parameter. For read requests, the buffer must be a multiple of the maximum packet size.

Zero-length read requests complete immediately with success and are not sent down the stack. If the transfer length is greater than a maximum transfer length, WinUSB divides the request into smaller requests of maximum transfer length and submits them serially. If the transfer length is not a multiple of the endpoint's MaxPacketSize, WinUSB increases the size of the transfer to the next multiple of MaxPacketSize. If a device returns more data than was requested, WinUSB saves the excess data. If data remains from a previous read request, WinUSB copies it to the beginning of the next read request and completes the request, if necessary.The following code example reads data from the bulk-in endpoint of the device.

Step 5: Release the Device Handles

After you have completed all the required calls to the device, release the file handle and the WinUSB interface handle for the device. For this, call the following functions:

  • CloseHandle to release the handle that was created by CreateFile, as described in the step 1.
  • WinUsb_Free to release the WinUSB interface handle for the device, which is returned by WinUsb_Initialize.

Step 6: Implement Main

The following code example shows the main function of your console application.

Next steps

Drivers Cosmed Usb Devices Pc Camera

If your device supports isochronous endpoints, you can use WinUSB Functions to send transfers. This feature is only supported in Windows 8.1.

For more information, see Send USB isochronous transfers from a WinUSB desktop app.

Related topics

Drivers Cosmed Usb Devices Dongle

WinUSB
WinUSB Architecture and Modules
WinUSB (Winusb.sys) Installation
WinUSB Functions for Pipe Policy Modification
WinUSB Power Management
WinUSB Functions
Write a Windows desktop app based on the WinUSB template

Drivers Cosmed Usb Devices Device

  • August 22, 2019 2.9.8

    Device driver for all The Imaging Source USB cameras except the 33U, 37U, 38U and AFU auto focus series.

    Version

    2.9.8

    Released

    August 22, 2019

    Type

    ZIP

    Filesize

    3MB

    Requirements

    • Intel Core i3 or similar, 2 GB RAM
    • USB 3.0 controller
    • Graphics card with 24 or 32 bit
    • Windows 7 (32 & 64 bit), Windows 8 (32 & 64 bit), Windows 10 (32 & 64 bit)
    • DirectX 9.0c or higher

    Changelog

    1. Added several internal interfaces for particular sensors (J003).
  • January 25, 2019 2.9.6

    Device driver for all The Imaging Source USB cameras except the 33U, 37U, 38U and AFU auto focus series.

    Version

    2.9.6

    Released

    January 25, 2019

    Type

    ZIP

    Filesize

    3MB

    Requirements

    • Intel Core i3 or similar, 2 GB RAM
    • USB 3.0 controller
    • Graphics card with 24 or 32 bit
    • Windows 7 (32 & 64 bit), Windows 8 (32 & 64 bit), Windows 10 (32 & 64 bit)
    • DirectX 9.0c or higher

    Changelog

    1. Added missing Tonemapping Auto property.
  • May 4, 2018 2.9.5

    Device driver for all The Imaging Source USB cameras except the 33U, 37U, 38U and AFU auto focus series.

    Version

    2.9.5

    Released

    May 4, 2018

    Type

    ZIP

    Filesize

    3MB

    Requirements

    • Intel Core i3 or similar, 2 GB RAM
    • USB 3.0 controller
    • Graphics card with 24 or 32 bit
    • Windows 7 (32 & 64 bit), Windows 8 (32 & 64 bit), Windows 10 (32 & 64 bit)
    • DirectX 9.0c or higher

    Changelog

    1. Enabled tonemapping for 8bit video formats, e.g. Y800, RGB24 and RGB32.
  • November 21, 2017 2.9.4

    Device driver for all The Imaging Source USB cameras except the 33U, 37U, 38U and AFU auto focus series.

    Version

    2.9.4

    Released

    November 21, 2017

    Type

    ZIP

    Filesize

    3.2MB

    Requirements

    • Intel Core i3 or similar, 2 GB RAM
    • USB 3.0 or USB 2.0 controller (depends upon camera model)
    • Graphics card with 24 or 32 bit
    • Windows XP, Windows Vista, Windows 7 (32 & 64 bit), Windows 8 (32 & 64 bit), Windows 10 (32 & 64 bit)
    • DirectX 9.0c or higher

    Changelog

    1. Repaired not working J003 mono sensor pattern fix on particular video formats.
    2. This driver version is the last that works in Windows XP.
  • January 9, 2017 2.9.3

    Device driver for all The Imaging Source USB cameras except the 33U, 37U, 38U and AFU auto focus series.

    Version

    2.9.3

    Released

    January 9, 2017

    Type

    ZIP

    Filesize

    3.2MB

    Requirements

    • Intel Core i3 or similar, 2 GB RAM
    • USB 3.0 or USB 2.0 controller (depends upon camera model)
    • Graphics card with 24 or 32 bit
    • Windows XP, Windows Vista, Windows 7 (32 & 64 bit), Windows 8 (32 & 64 bit), Windows 10 (32 & 64 bit)
    • DirectX 9.0c or higher

    Changelog

    1. Added a pattern fix for J003 mono sensors.
  • January 9, 2017 2.9.1

    Device driver for all The Imaging Source USB cameras except the 33U, 37U, 38U and AFU auto focus series.

    Version

    2.9.1

    Released

    January 9, 2017

    Type

    ZIP

    Filesize

    3.2MB

    Requirements

    • Intel Core i3 or similar, 2 GB RAM
    • USB 3.0 or USB 2.0 controller (depends upon camera model)
    • Graphics card with 24 or 32 bit
    • Windows XP, Windows Vista, Windows 7 (32 & 64 bit), Windows 8 (32 & 64 bit), Windows 10 (32 & 64 bit)
    • DirectX 9.0c or higher

    Changelog

    1. Fixed the driver signature Code 52 error on new Windows 10 v1607 systems.
  • January 15, 2016 2.8.9

    Device driver for all The Imaging Source USB cameras except the 33U, 37U, 38U and AFU auto focus series.

    Version

    2.8.9

    Released

    January 15, 2016

    Type

    ZIP

    Filesize

    2.3MB

    Requirements

    • Intel Core i3 or similar, 2 GB RAM
    • USB 3.0 or USB 2.0 controller (depends upon camera model)
    • Graphics card with 24 or 32 bit
    • Windows XP, Windows Vista, Windows 7 (32 & 64 bit), Windows 8 (32 & 64 bit), Windows 10 (32 & 64 bit)
    • DirectX 9.0c or higher

    Changelog

    1. Changed certificates so that the driver can also be installed in Vista.
  • November 9, 2015 2.8.7

    Device driver for all The Imaging Source USB cameras except the 33U, 37U, 38U and AFU auto focus series.

    Version

    2.8.7

    Released

    November 9, 2015

    Type

    ZIP

    Filesize

    2.3MB

    Requirements

    • Intel Core i3 or similar, 2 GB RAM
    • USB 3.0 or USB 2.0 controller (depends upon camera model)
    • Graphics card with 24 or 32 bit
    • Windows XP, Windows Vista, Windows 7 (32 & 64 bit), Windows 8 (32 & 64 bit), Windows 10 (32 & 64 bit)
    • DirectX 9.0c or higher

    Changelog

    1. Fixed an error which can appear when using sharpness on older CPUs.
  • October 20, 2015 2.8.5

    Device driver for all The Imaging Source USB cameras except the 33U, 37U, 38U and AFU auto focus series.

    Version

    2.8.5

    Released

    October 20, 2015

    Type

    ZIP

    Filesize

    2.3MB

    Requirements

    • Intel Core i3 or similar, 2 GB RAM
    • USB 3.0 or USB 2.0 controller (depends upon camera model)
    • Graphics card with 24 or 32 bit
    • Windows XP, Windows Vista, Windows 7 (32 & 64 bit), Windows 8 (32 & 64 bit), Windows 10 (32 & 64 bit)
    • DirectX 9.0c or higher

    Changelog

    1. Fixed a bug which can appear on LivePause call.
  • July 15, 2015 2.8.0

    Device driver for all The Imaging Source USB cameras except the 33U, 37U, 38U and AFU auto focus series.

    Version

    2.8.0

    Released

    July 15, 2015

    Type

    ZIP

    Filesize

    2.4MB

    Requirements

    • Intel Core i3 or similar, 2 GB RAM
    • USB 3.0 or USB 2.0 controller (depends upon camera model)
    • Graphics card with 24 or 32 bit
    • Windows XP, Windows Vista, Windows 7 (32 & 64 bit), Windows 8 (32 & 64 bit), Windows 10 (32 & 64 bit)
    • DirectX 9.0c or higher

    Changelog

    1. Support of DFK ECU010-L34 with serial number property.
    2. Added tone mapping.
  • February 17, 2015 2.7.33

    Device driver for all The Imaging Source USB cameras except the 33U, 37U, 38U and AFU auto focus series.

    Version

    2.7.33

    Released

    February 17, 2015

    Type

    ZIP

    Filesize

    2.4MB

    Requirements

    • Intel Core i3 or similar, 2 GB RAM
    • USB 3.0 or USB 2.0 controller (depends upon camera model)
    • Graphics card with 24 or 32 bit
    • Windows XP, Windows Vista, Windows 7 (32 & 64 bit), Windows 8 (32 & 64 bit), Windows 10 (32 & 64 bit)
    • DirectX 9.0c or higher

    Changelog

    1. The Auto Focus Onepush Running flag now resets correctly after the auto focus has finished.
  • February 5, 2015 2.7.32

    Device driver for all The Imaging Source USB cameras except the 33U, 37U, 38U and AFU auto focus series.

    Version

    2.7.32

    Released

    February 5, 2015

    Type

    ZIP

    Filesize

    2.4MB

    Requirements

    • Intel Core i3 or similar, 2 GB RAM
    • USB 3.0 or USB 2.0 controller (depends upon camera model)
    • Graphics card with 24 or 32 bit
    • Windows XP, Windows Vista, Windows 7 (32 & 64 bit), Windows 8 (32 & 64 bit), Windows 10 (32 & 64 bit)
    • DirectX 9.0c or higher

    Changelog

    1. Video format MJPG (2592x1944) of DFK AFU050-L34 camera can now be used.
  • January 14, 2015 2.7.31

    Device driver for all The Imaging Source USB cameras except the 33U, 37U, 38U and AFU auto focus series.

    Version

    2.7.31

    Released

    January 14, 2015

    Type

    ZIP

    Filesize

    2.3MB

    Requirements

    • Intel Core i3 or similar, 2 GB RAM
    • USB 3.0 or USB 2.0 controller (depends upon camera model)
    • Graphics card with 24 or 32 bit
    • Windows XP, Windows Vista, Windows 7 (32 & 64 bit), Windows 8 (32 & 64 bit), Windows 10 (32 & 64 bit)
    • DirectX 9.0c or higher

    Changelog

    1. Support for IMX236 based cameras.
    2. Support for RGB64 color formats.
    3. Several performance improvements.
  • June 6, 2014 2.7.9.1152

    Device driver for all The Imaging Source USB cameras except the 33U, 37U, 38U and AFU auto focus series.

    Version

    2.7.9.1152

    Released

    June 6, 2014

    Type

    ZIP

    Filesize

    2.1MB

    Requirements

    • Intel Core i3 or similar, 2 GB RAM
    • USB 3.0 or USB 2.0 controller (depends upon camera model)
    • Graphics card with 24 or 32 bit
    • Windows XP, Windows Vista, Windows 7 (32 & 64 bit), Windows 8 (32 & 64 bit), Windows 10 (32 & 64 bit)
    • DirectX 9.0c or higher

    Changelog

    1. Added new properties: Brightness, sharpness, de-noise, saturation, hue and contrast.
    2. Added new property: Highlight reduction.
    3. Added new property: White balance temperature controls.
    4. Pixelfix for Y16 cameras now works as expected.
    5. VideoControl_ExternalTrigger (DirectShow property) can now be set as expected.
  • January 1, 2014 2.6.5.1014

    Device driver for all The Imaging Source USB cameras except the 33U, 37U, 38U and AFU auto focus series.

    Version

    2.6.5.1014

    Released

    January 1, 2014

    Type

    ZIP

    Filesize

    1.9MB

    Requirements

    • Intel Pentium IV or similar, 2 GB RAM
    • USB 3.0 or USB 2.0 controller (depends upon camera model)
    • Graphics card with 24 or 32 bit
    • Windows XP, Windows Vista, Windows 7 (32 & 64 bit), Windows 8 (32 & 64 bit)
    • DirectX 9.0c or higher

    Changelog

    1. Fixed missing auto-gain for DFK AFU130.
    2. Fixed focus when start value is out of auto_focus_range.
    3. Fixed problem with AUTOFOCUS_ROI_RIGHT: minimum possibly wrong.
    4. Fixed auto focus ROI not working for 21*UC cameras.
    5. Fixed crash on load/connect with certain cameras 22/72xUC.
    6. Fixed previous exposure settings not being loaded on reconnect.
    7. Complete reworking of internal property system.
    8. Fixed Windows XP driver load crash.
    9. Fixed drop counter to be accessible from DirectShow.
    10. Fixed Windows 8 problem with certain video formats needing converters with standard DirectShow filters (e.g. Y800, capturing to an Y800 avi file was not possible).
    11. Fixed a problem with Windows 8 usbxhci driver not allowing transfers larger then 4 MB.
  • February 26, 2013 2.4.14.851

    Device driver for all The Imaging Source USB cameras except the 33U, 37U, 38U and AFU auto focus series.

    Version

    2.4.14.851

    Released

    February 26, 2013

    Type

    ZIP

    Filesize

    1.9MB

    Requirements

    • Intel Pentium IV or similar, 2 GB RAM
    • USB 3.0 or USB 2.0 controller (depends upon camera model)
    • Graphics card with 24 or 32 bit
    • Windows XP, Windows Vista, Windows 7 (32 & 64 bit), Windows 8 (32 & 64 bit)
    • DirectX 9.0c or higher

    Changelog

    1. WHQL certification.