====== Measurement Computing USB-TEMP-AI ======
===== Initial Testing =====
//2016/07/28 13:50//
* Booted the CERN SL Kernel 2.6.33.9-rt31.79.el6rt.x86_64 dev system
* Plugged the USB device into the CPU directly
* Kernel recognized the device as:
usb 2-1.7: new full speed USB device using ehci_hcd and address 3
usb 2-1.7: New USB device found, idVendor=09db, idProduct=00bc
usb 2-1.7: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 2-1.7: Product: USB-TEMP-AI
usb 2-1.7: Manufacturer: MCC
usb 2-1.7: SerialNumber: 00107479
generic-usb 0003:09DB:00BC.0003: hiddev96,hidraw2: USB HID v1.01 Device [MCC USB-TEMP-AI] on usb-0000:00:1d.0-1.7/input0
For generic programming, we are going to want to use the UL library.
Looking in this FTP site for code: [[ftp://lx10.tx.ncsu.edu/pub/Linux/drivers/USB/]]
Requires **libusb**, found an online page suggesting check this:
rpm -qa | grep -i libusb
libusb1-1.0.9-0.6.rc1.el6.x86_64
libusb-0.1.12-23.el6.x86_64
==== Prerequisites ====
- Installed these packages
sudo yum install libusb-devel libudev-devel libusb1 libusb1-devel
- Grabbed this
mkdir ~/code
cd ~/code
git clone git://github.com/signal11/hidapi.git
- Compile and install
cd ~/code/hidapi/
./bootstrap
./configure
make
sudo make install
- Install the **udev** rules for the system
- **Now located in the MCCLinuxDrivers directory**
- Download the rules from their site
cd /tmp
wget https://raw.githubusercontent.com/wjasper/Linux_Drivers/master/60-mcc.rules
wget https://raw.githubusercontent.com/wjasper/Linux_Drivers/master/61-mcc.rules
- Copy the files into the **udev** configuration
sudo cp ~/src/MCCLinuxDrivers/6*-mcc.rules /etc/udev/rules.d/
sudo chmod 644 /etc/udev/rules.d/6*-mcc.rules
sudo chown root:root /etc/udev/rules.d/6*-mcc.rules
- Restart **udev**
sudo /sbin/udevadm control --reload
sudo /sbin/udevadm control --reload-rules
==== Measurement Computing Library ====
- Download code
cd ~/code
git clone https://github.com/wjasper/Linux_Drivers.git
- Build and install
cd ~/src/MCCLinuxDrivers/USB/mcc-libusb
make
sudo make install
sudo ldconfig
- Had to add **/usr/local/lib** to an **ldconfig** script
- Modify **/etc/ld.so.conf.d/lvisf.conf**
sudo nano /etc/ld.so.conf.d/lvisf.conf
- Append this line to the file if it isn't already there into **/etc/ld.so.conf.d/lvisf.conf**
/usr/local/lib
- It looks like this for me now --- //[[david.rabine@nasa.gov|David Lloyd Rabine]] 2016/07/28 15:07//
/home/lvis/src/spectrum/shared/linux/pc64/lib
/home/lvis/src/MIC3753/linux_driver_source_3.2.7.0_64bit/libs
/opt/lvisf/src/lvisF/build/lib/msgService
/opt/lvisf/src/lvisF/build/lib/shmem
/usr/local/lib
- Now run **ldconfig** to get the library to be in our path
sudo ldconfig
==== Functionality Test ====
- To where the code is installed at the moment
cd /home/lvis/src/MCCLinuxDrivers/USB/mcc-libusb
- Run the test program
./test-usb-temp-ai
- Appears to work! 8-)
[lvis@lvisf-centos65 mcc-libusb]$ ./test-usb-temp-ai
USB TEMP-AI is found.
USB-TEMP-AI Testing
----------------
Hit 'b' to blink LED
Hit 'c' to calibrate
Hit 'd' to test DIO
Hit 'e' to exit
Hit 'f' for burnout status
Hit 'g' to get serial number
Hit 'i' for information
Hit 'R' to reset
Hit 'r' to measure temperature (RTD)
Hit 'p' read the CJC
Hit 's' to get status
Hit 'S' to measure temperature (Semiconductor)
Hit 't' to measure temperature (Thermocouple)
Hit 'T' to measure temperature (Thermistor)
Hit 'x' to measure temperature (Thermocouple) multiple channels
g
Serial Number = 00107479
p
CJC 0 = 29.86 degress Celsius or 85.75 degrees Fahrenheit.
r
Sampling RTD
Enter channel number [0-7]: 0
1. 2-wire with 1 sensor.
2. 2-wire with 2 sensors.
3. 3-wire.
4. 4-wire.
Enter connector type [1-4]:
4
Connection-type = 4 wire.
R0 = 0.000000 A = 1.000000e+00 B = 0.000000e+00 C = 0.000000e+00
Channel: 0 -9999.00 degrees Celsius or -17966.20 degrees Fahrenheit.
Channel: 0 -9999.00 degrees Celsius or -17966.20 degrees Fahrenheit.
Channel: 0 -9999.00 degrees Celsius or -17966.20 degrees Fahrenheit.
Channel: 0 -9999.00 degrees Celsius or -17966.20 degrees Fahrenheit.