Giter Club home page Giter Club logo

aiousb's Introduction

AIOUSB

ACCES I/O Products' USB driver library

This project contains USB drivers and APIs for ACCES I/O Product's line of USB based data acquisition modules. This driver represents a large API collection for communicating with one or more of ACCES I/O Product's line of USB based data acquisition products. All of the core functionality that exists and is supported by the Windows software is implemented in this library for non-Windows based operating systems. This code base compiles using either GCC and Clang compilers to both shared and static libraries that be can used in applications that need to perform highspeed USB data acquisition.

The entire set of drivers are rely on functionality provided by the libusb-1.0 library. Please see the prequisites section to find out about required software for building the driver.

Currently, this project aims at providing full support to the following platforms:

  • Linux
  • Mac OS X
  • Free / Net BSD
  • POSIX compliant operating systems that can successfully compile and use libusb.

NOTE: At this moment using these drivers under Windows is not supported although several customers have successfully been able to build and deploy solutions based on this system. We expect to have Windows libusb support available in the near future.

Prerequisites

The functionality in this driver depends on the following installed packages.

  1. libusb-1.0
  2. cmake
  3. swig

Ubuntu / Debian

sudo apt-get install libusb-1.0 libusb-1.0-0-dev cmake swig

Fedora / Red Hat

sudo yum install libusb-1.0 cmake swig

Open SUSE

sudo zypper install libusb-1.0 cmake swig

Mac OS X

Homebrew
brew install libusb  cmake
Darwin Ports
sudo port install libusb cmake

##How to Build on UNIX systems

Building ACCES I/O Products' Driver library amounts to compiling C source files to produce C and C++ based shared ( .so ) or static (.a) libraries. The build process relies on either GNU make or Cmake. The first method of building ( see non-cmake users is a little more involved but will give you the ability to build wrapper language packs. Currently ,the simplified cmake system is easier to build and install the general libraries but we have been unable to use it to deploy the Swig based wrappers as we would have liked.

Non-CMake users

You will need to do the following

cd AIOUSB
source sourceme.sh
cd lib && make && cd -
cd classlib && make && cd -
cd samples/USB_SAMPLE_OF_CHOICE
make sample AIOUSBLIBDIR=${AIO_LIB_DIR} AIOUSBCLASSLIBDIR=${AIO_CLASSLIB_DIR} DEBUG=1

Build with CMake

cd AIOUSB
mkdir build
cd build
cmake ..
make
sudo make install

Installation

Linux Installation

  1. Install fxload either using the appropriate installation tool for your platform or by installing from https://github.com/accesio/fxload. Copy fxload to a standard location in your $PATH.

  2. sudo cp AIOUSB/Firmware/*.hex /usr/share/usb/

  3. sudo cp AIOUSB/Firmware/10-acces*.rules /etc/udev/rules.d

Mac Installation (work in progress!!)

  1. Build and Install fxload from https://github.com/accesio/fxload and copy fxload to a standard location in your $PATH.

  2. Determine the raw USB Device ID for your card by looking for the Vendor ID 1605 in your System Profiler. Set the variable PRODUCTID to be this value.

  3. Manually upload your corresponding firmware to your device by running the following:

fxload -t fx2lp -I AIOUSB/Firmware/CORRESPONDING_HEXFILE.hex -D 1605:${PRODUCTID}

Extra Language Support

In addition, to providing fully functional C Shared and Static libraries, this project also provides wrapper language support for the following languages:

  • Java
  • Perl
  • Python
  • Ruby
  • PHP
  • Octave
  • R

How to build Wrapper languages

CMake

This is the easiest way to build the wrapper languages. Perform the following

cmake  -DCMAKE_INSTALL_PREFIX=/some/path/Dir  -DBUILD_PERL=ON -DBUILD_JAVA=ON ..

This will build the languages for Perl and Java. The remaining languages that can be built are Python ( -DBUILD_PYTHON=ON ) , Ruby (-DBUILD_RUBY=ON), PHP (-DBUILD_PHP=ON) and R (-DBUILD_R=ON) while Octave is currently not ready yet. The installation of these wrapper scripts will default be written to the CMAKE_INSTALL_PREFIX. To better customize the installation, you should use

ccmake -DCMAKE_INSTALL_PREFIX=/some/path/Dir ..

or if you have installed cmake-gui, then

cmake-gui -DCMAKE_INSTALL_PREFIX=/some/path/Dir ..

Regular Make system

Perform this step AFTER you have already followed the instructions for building the aiousb libraries.

Perl

cd AIOUSB/lib/wrappers
make -f GNUMakefile inplace_perl
cd perl
sudo make install

Java

You must make sure that you have the Java Development Kit installed ( JDK ).

export CPATH=$CPATH:$JAVA_HOME/include # example /usr/lib/jvm/java-7-openjdk-i386/include
cd AIOUSB/lib/wrappers
make -f GNUMakefile inplace_java
sudo cp java/{AIOUSB.jar,libaiousb.jar} $JAR_FOLDER

Python

pyver=$(python  -c 'import platform; print platform.python_version()')
cd AIOUSB/lib/wrappers
make -f GNUMakefile inplace_python
sudo cp python/build/lib.linux-$(uname -m)-${pyver}/* /usr/lib/python${pyver}/

Ruby

cd AIOUSB/lib/wrappers
make -f GNUMakefile inplace_ruby

Octave

cd AIOUSB/lib/wrappers
make -f GNUMakefile inplace_octave

R

cd AIOUSB/lib/wrappers
make -f GNUMakefile inplace_R

Users who wish to build web applications around the ACCES I/O Product line might consider one of these for faster development cycles. Suggestions for additional languages and features are well received and can be made to suggestions AT accesio DOT com

Sincerely,

The ACCES I/O Development team.

aiousb's People

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.