HAT-control is sw that is used to control HAT (Hardware Accessory for Testing) device. HAT device is low-cost test hardware to PC USB interface, which allows accurate measurements from DUT. Device has two switchable power outputs and two switchable USB paths. The power and data lines of the USB can switched on or off separately. HAT device has also four sensor inputs for different sensors. Currently only current measurement sensor is available, but other sensors will be available soon. Sensor inputs without sensor HW can be directly used to measure voltage levels if needed.
HAT-control sw can be installed to Ubuntu 10.04. It should work also other distributions, but it is not tested yet.
HAT SW dependences:
1. Install libusb-1.0.x package:
sudo apt-get install libusb-1.0
1. Get exodriver sources:
git clone https://github.com/labjack/exodriver.git
2. Go liblabjackusb folder
$ cd exodriver/liblabjackusb
3. Build library
4. Install library
$ sudo make install
5. Liblabjackusb needs access to the /dev/bus/usb. Run following commands in labjack-exodriver root folder.
$ cd .. $ sudo cp 10-labjack.rules /etc/udev/rules.d $ sudo udevadm control --reload-rules
Building HAT SW
1. Build HAT SW:
Using HAT SW to control usb and power switches.
1. Connect HAT device to USB port and start HAT driver.
$ hat_drv &
Driver should print 'hat_drv: HAT driver started succesfully', if it has started succesfully. It also shows serial numeber of the controller device.
2. Use hat_ctrl SW to control HAT device. For example switch power output 1 on
$ hat_ctrl -pwr1=on
Get all parameters just type
$ hat_ctrl --help