Site Search:

USB DAQ Products Support LibUSB and CDC

FacebooktwitterredditlinkedinmailFacebooktwitterredditlinkedinmail

The native communication mode of most of our newer USB data acquisition (USB DAQ) products is LibUSB, a cross-platform standard that supports many USB products. LibUSB is supported out-of-the-box by our WinDaq data acquisition and .Net class software that is included with the hardware, so there’s little need to change USB modes. However, for those who want to program these new USB products themselves (especially from the protocol level), the so-called USB CDC mode may offer some advantages. Not the least of these is simply communicating with the device over a COM port instead of through the LibUSB library. The Communication Device Class (CDC) allows the USB port of supported devices to appear like a traditional RS-232 port, which is ubiquitous across OS platforms and development languages. Fortunately, our USB data acquisition products can be configured for either standard. The following procedures explain how you can transition from the default LibUSB to the CDC mode and back again for all the products found here (except model DI-245, which lacks LibUSB support and always hooks a COM port.)

  1. Disconnect and reconnect the USB cable to the device, waiting for the LED to blink green (LibUSB) or yellow (CDC).
  2. Press and hold down the button on the side of the instrument within the first 5 seconds of the device turning from white to green or yellow. With the button held down, the LED will turn solid white. Release the button when the Active LED turns RED.
  3. The LED begins flashing yellow indicating that it’s in the CDC mode, or green indicating the LibUSB mode.
  4. The instrument will hook a COM port if the LED is yellow, or be an active LibUSB device if green.

The DI-2008 is an outlier*. Here’s the procedure to transition from the default LibUSB to the CDC mode and back again using the DI-2008 (note that it transitions directly to YELLOW for the CDC mode, or GREEN for LibUSB).

  1. Disconnect and reconnect the USB cable to the device.
  2. Immediately begin pressing the button on the side of the instrument about twice per second.
  3. The LED begins flashing yellow indicating that it’s in the CDC mode, or green indicating the LibUSB mode.
  4. The instrument will hook a COM port if the LED is yellow, or be an active LibUSB device if green.

* This procedure also applies to any instrument using firmware rev. 1.21 or earlier.

The instrument remembers its configuration, so you only need to perform this maneuver once. Repeat it to revert to previously active mode: CDC to LibUSB (active LED flashes GREEN), or LibUSB to CDC (active LED flashes YELLOW.)  Also, when in the CDC mode COM port interface variables (aside from port name) are “don’t care:” Baud, Data bits, Parity, etc.

Here’s how Windows Device Manager detects the presence of model DI-1100 (for example) for each supported mode:

Comparison of how Windows’ Device Manager detects model DI-1100 when the instrument is programmed for LibUSB or CDC modes.

 

Follow Us
FacebooktwitterlinkedinyoutubeFacebooktwitterlinkedinyoutube

 Categories: Data Acquisition, USB

 Tags: , , , , ,

 Bookmark the permalink

 RSS Feed (comments for this post)

 Post a comment

 Trackback URL

5 Comments

  1. Avatar
    Tom Spitznas
    Posted April 26, 2019 at 3:35 pm Permalink

    Thank you so much for your immediate response.
    This worked perfectly. Thank you again.

    • Posted May 30, 2019 at 3:54 pm Permalink

      Tom,

      Thanks for the heads-up! Glad to hear you’re up and running.

      Regards,
      Shawn MacDonald
      Application Engineer
      DATAQ Instruments Inc.

  2. Avatar
    Peter Ball
    Posted June 22, 2020 at 11:14 am Permalink

    what are the settings i would use for CDC serial communication (Baud)?

  3. Posted May 12, 2021 at 10:38 pm Permalink

    Wondering if the USB-serial is implemented with a chipset such as FTDI?

    I have a openWRT linux powered box I would very much like to connect a DI-1100 to via USB as a usb serial device if possible?

    Many thanks!
    Sean

Post a Comment

You must be logged in to post a comment.