Measurement Computing   Easy to Use | Easy to Integrate | Easy to Support catalog banner

Download and compile our third party Linux drivers for MCC USB...

Expand / Collapse
 

Download and compile our third party Linux drivers for MCC USB devices


6 steps to loading and running our Linux drivers and example data acquisition apps

 

Intended Audience

This document is intended for the application developer familiar with both MCC DAQ devices and Linux programming, and who is interested in acquiring data on a Linux platform. 

Step 1 – Download and install HIDAPI

HIDAPI is a library that allows an application to interface with Human Interface Devices. First you will need to download HIDAPI. The easiest way to do this is by using git open source version control software. Through your Terminal type the following:

git clone git://github.com/signal11/hidapi.git then press <Enter>

Note: If you do not have git installed you will be prompted to install it at this time. After the install has been completed run the hidapi command again to install the hidapi library.  

Tip: If you make a mistake or need to re-use a previous command you need not re-type the entire command again. Use the up and down arrows to scroll through previously used commands to make corrections for syntax errors or to re-use the command.

Step 2 - Download and Install development packages for libusb and libudev

libusb-1.0 is a C library that gives applications easy access to USB devices. To install libusb-1.0 type in:

                    sudo apt-get install libudev-dev <Enter>

                    sudo apt-get install libusb-1.0-0 libusb-1.0-0-dev <Enter>


Note: The sudo command gives you security privileges (superuser) so you will be prompted for your password.

Step 3 - Download and install autotools

autotools is a suite of programming tools designed to assist in making source-code packages portable to many Unix-like systems.

Type in: sudo apt-get install autotools-dev autoconf automake libtool <Enter>

Step 4 - Compile HIDAPI library

Navigate to your hidapi directory by typing in cd hidapi.  Next, type

./bootstrap <Enter>

./configure <Enter>

make <Enter>

sudo make install <Enter>


Step 5 - Download and compile the MCC USB Linux drivers

You need to be in your Root directory prior to downloading the Linux drivers.

cd <Enter>

You can download the latest MCC Linux drivers directly from GitHub by typing:

git clone https://github.com/wjasper/Linux_Drivers.git  <Enter>


After downloading the Linux drivers change to the Linux_Drivers directory.

cd Linux_Drivers  <Enter>

sudo cp 61-mcc.rules /etc/udev/rules.d <Enter> and then Reboot.

Note: On the Raspberry Pi (Raspian), rename the file 99-mcc.rules.

                 sudo cp 61-mcc.rules /etc/udev/rules.d/99-mcc.rules <Enter> and then Reboot.

You are now ready to compile the MCC LIBUSB programs.

cd Linux_Drivers/USB/mcc-libusb <Enter>

make <Enter>

sudo make install <Enter>

sudo  ldconfig <Enter>

Type ls <Enter> to list all of the files


Step 6 - Running Example test app with an MCC DAQ device

You are now ready to run some of the examples. If you are no longer in the mcc-libusb directory for USB DAQ devices, navigate back by typing cd mcc-libusb <Enter>.

            Plug in your MCC USB DAQ and type in the test name for the product you using.

            For example type ./test-usb2001tc <Enter>

            The application will display a list of tests that you can perform.

      Execute any one of the commands by typing the letter and then pressing <Enter>


Measurement Computing and the Measurement Computing logo are either trademarks or registered trademarks of Measurement Computing Corporation. 

Raspberry Pi is a trademark of the Raspberry Pi Foundation.
Linux® is the registered trademark of Linus Torvalds in the U.S. and other countries.
All other trademarks are the property of their respective holders. 

Acknowledgement 

A special thanks to Dr. Warren Jasper, PhD, PE, Professor and Textile Engineering Program Director at North Carolina State University. Dr. Jasper remains instrumental to the development and support of Linux drivers for Measurement Computing USB and PCI DAQ devices. We applaud his tireless efforts and dedication to the Linux community. Without his work and continued support, this article and application would not have been possible.



Rate this Article:
Tags:

Add Your Comments


For comments email TechSupport@mccdaq.com.

Details
Article ID: 50608

Last Modified:4/18/2018 3:38:39 PM

Article has been viewed 5,751 times.

Options