Testing PCsensor's TEMPerHUM Part 4 - Linux (Software Logging)

Testing PCsensor's TEMPerHUM Part 4 - Linux (Software Logging)

Testing PCsensor's “TEMPerHUM”

Phase 4: Testing PCsensor's “TEMPerHUM” in Linux environment

In Phase 3 we talked about using TEMPerHUM temperature & humidity sensor in Linux GUI (graphical user interface)(graphical user interface). Now for those of you who prefer Linux CLI (command line interface), it would be needed to produce (or as it is said in Linux terminology, to make) an appropriate executable file by yourself because Pcsensor company did not want (or planned) to offer any Linux equivalent for TEMPerHUM software for Windows. Solutions that we found on the web were based on various source code packages provided by individual programmers, and it was expected that the end-users would produce the program executables on their own machines. So let us start with that funny game:

Please note that we used again Linux Debian 7.11 (“Wheezy”), as we did in our previous Linux tests. In addition, we compiled the same program packages on different computer hardware (a desktop and a laptop) because of possible variations in operating system capabilities regarding different CPU type & speed, the amount of RAM memory, etc. (However, if it is not specified in a particular paragraph, only a desktop installation is described.)

1. Usb-thermometer (https://github.com/petechap/usb-thermometer)

Desktop installation: Compiling usb-thermometer was successful but as seen bellow useless. According to the instructions, you need to have libusb-dev software package already installed on your computer. My Debian 9.11 desktop installation did not have libusb-dev so I installed it from Debian software repository:

root@localhost:/usr/local/src/usb-thermometer-master# apt-get install libusb-dev 
Reading package lists... Done 
Building dependency tree       
Reading state information... Done 
The following packages were automatically installed and are no longer required: 
Use 'apt-get autoremove' to remove them. 
The following NEW packages will be installed: 
  libusb-dev 
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. 
Need to get 40.8 kB of archives. 
After this operation, 239 kB of additional disk space will be used. 
Get:1 http://ftp.us.debian.org/debian/ wheezy/main libusb-dev i386 2:0.1.12-20+nmu1 [40.8 kB] 
Fetched 40.8 kB in 1min 48s (375 B/s)                                          
Selecting previously unselected package libusb-dev. 
(Reading database ... 319934 files and directories currently installed.) 
Unpacking libusb-dev (from .../libusb-dev_2%3a0.1.12-20+nmu1_i386.deb) ... 
Processing triggers for man-db ... 
Setting up libusb-dev (2:0.1.12-20+nmu1) ... 
root@localhost:/usr/local/src/usb-thermometer-master#

After installing libusb-dev, I executed make command:

root@localhost:/usr/local/src/usb-thermometer-master# make 
cc -DUNIT_TEST -o pcsensor pcsensor.c -lusb 
root@localhost:/usr/local/src/usb-thermometer-master# ./pcsensor 
Couldn't find the USB device, Exiting 
root@localhost:/usr/local/src/usb-thermometer-master#

Unfortunately, as shown in the last few lines above, the newly-built pcsensor executable did not return anything but an error message because it obviously expected the attached sensor hardware to be of the 'regular' USB type, which was not the case here (because this version of TEMPerHUM sensor was of so-called HID type, which meant it did not appear as a real USB device in Linux at all).

Laptop installation: Compiling usb-thermometer software package was successful but useless again. Before starting the compiling itself I ensured that my Debian 9.11 laptop installation was equipped with required libusb-dev software package: I used the APTonCD utility (installation disc creator for APT-cached packages) to transfer programs downloaded to the desktop machine (to avoid downloading them again over my slow dial-up access to the Internet).

root@localhost:/usr/local/src/usb-thermometer-master# make 
cc -DUNIT_TEST -o pcsensor pcsensor.c -lusb 
root@localhost:/usr/local/src/usb-thermometer-master# ./pcsensor 
Couldn't find the USB device, Exiting 
root@localhost:/usr/local/src/usb-thermometer-master# 

As shown above, the sensor did not provide any output because the software expected the device to be a 'real' USB device while it was of the HID type.

2. TEMPered (https://github.com/edorfaus/TEMPered)

Desktop and laptop installation: To compile this software there were two prerequisites: HIDAPI library and CMake build system. The author of TEMPered had suggested to build HIDAPI library from sources on GitHub: https://github.com/signal11/hidapi so I did so. (See the next paragraph.)

2.1. HIDAPI (https://github.com/signal11/hidapi)

On its side, the HIDAPI author had suggested that for building his library it was needed to install development packages libudev, libusb and optionally Fox-toolkit (for the test GUI). On Debian/Ubuntu systems these packages can be installed by running:

sudo apt-get install libudev-dev libusb-1.0-0-dev libfox-1.6-dev

(On my Debian 7.11 desktop installation, that step required to download some 4.2 MB of material from Debian repositories, which also included some extra files not listed in the above apt-get install command. On my slow dial-up connectivity it took some 20min 13s. Note: I already had all of the above installed on my Debian 7.11 laptop installation, so the next step was skipped on the laptop.)

root@localhost:/home/misko# apt-get install libudev-dev libusb-1.0-0-dev libfox-1.6-dev 
Reading package lists... Done 
Building dependency tree       
Reading state information... Done 
The following extra packages will be installed: 
  libcups2-dev libfox-1.6-0 libgl1-mesa-dev libglu1-mesa-dev libxcursor-dev 
  libxfixes-dev mesa-common-dev x11proto-fixes-dev 
Suggested packages: 
  libfox-1.6-doc 
The following NEW packages will be installed: 
  libcups2-dev libfox-1.6-0 libfox-1.6-dev libgl1-mesa-dev libglu1-mesa-dev 
  libudev-dev libusb-1.0-0-dev libxcursor-dev libxfixes-dev mesa-common-dev 
  x11proto-fixes-dev 
0 upgraded, 11 newly installed, 0 to remove and 0 not upgraded. 
Need to get 4,226 kB of archives. 
After this operation, 15.7 MB of additional disk space will be used. 
Do you want to continue [Y/n]? y 
Get:1 http://ftp.us.debian.org/debian/ wheezy/main libcups2-dev i386 1.5.3-5+deb7u6 [323 kB] 
Get:2 http://security.debian.org/ wheezy/updates/main libxfixes-dev i386 1:5.0-4+deb7u2 [23.3 kB] 
Get:3 http://ftp.us.debian.org/debian/ wheezy/main libcups2-dev i386 1.5.3-5+deb7u6 [323 kB] 
Get:4 http://ftp.us.debian.org/debian/ wheezy/main libfox-1.6-0 i386 1.6.45-1 [1,195 kB] 
Get:5 http://ftp.us.debian.org/debian/ wheezy/main mesa-common-dev i386 8.0.5-4+deb7u2 [277 kB] 
Get:6 http://ftp.us.debian.org/debian/ wheezy/main libgl1-mesa-dev i386 8.0.5-4+deb7u2 [32.7 kB] 
Get:7 http://ftp.us.debian.org/debian/ wheezy/main libglu1-mesa-dev i386 8.0.5-4+deb7u2 [220 kB] 
Get:8 http://ftp.us.debian.org/debian/ wheezy/main libudev-dev i386 175-7.2 [61.0 kB] 
Get:9 http://ftp.us.debian.org/debian/ wheezy/main libusb-1.0-0-dev i386 2:1.0.11-1 [185 kB] 
Get:10 http://ftp.us.debian.org/debian/ wheezy/main x11proto-fixes-dev all 1:5.0-2 [19.2 kB] 
Get:11 http://ftp.us.debian.org/debian/ wheezy/main libxcursor-dev i386 1:1.1.13-1+deb7u1 [33.8 kB] 
Get:12 http://ftp.us.debian.org/debian/ wheezy/main libfox-1.6-dev i386 1.6.45-1 [1,854 kB] 
Get:13 http://ftp.us.debian.org/debian/ wheezy/main libfox-1.6-dev i386 1.6.45-1 [1,854 kB] 
Get:14 http://ftp.us.debian.org/debian/ wheezy/main libfox-1.6-dev i386 1.6.45-1 [1,854 kB] 
Fetched 2,278 kB in 20min 13s (1,877 B/s)                                      
Selecting previously unselected package libcups2-dev. 
(Reading database ... 306320 files and directories currently installed.) 
Unpacking libcups2-dev (from .../libcups2-dev_1.5.3-5+deb7u6_i386.deb) ... 
Selecting previously unselected package libfox-1.6-0. 
Unpacking libfox-1.6-0 (from .../libfox-1.6-0_1.6.45-1_i386.deb) ... 
Selecting previously unselected package mesa-common-dev. 
Unpacking mesa-common-dev (from .../mesa-common-dev_8.0.5-4+deb7u2_i386.deb) ... 
Selecting previously unselected package libgl1-mesa-dev. 
Unpacking libgl1-mesa-dev (from .../libgl1-mesa-dev_8.0.5-4+deb7u2_i386.deb) ... 
Selecting previously unselected package libglu1-mesa-dev. 
Unpacking libglu1-mesa-dev (from .../libglu1-mesa-dev_8.0.5-4+deb7u2_i386.deb) ... 
Selecting previously unselected package libudev-dev. 
Unpacking libudev-dev (from .../libudev-dev_175-7.2_i386.deb) ... 
Selecting previously unselected package libusb-1.0-0-dev. 
Unpacking libusb-1.0-0-dev (from .../libusb-1.0-0-dev_2%3a1.0.11-1_i386.deb) ... 
Selecting previously unselected package x11proto-fixes-dev. 
Unpacking x11proto-fixes-dev (from .../x11proto-fixes-dev_1%3a5.0-2_all.deb) ... 
Selecting previously unselected package libxfixes-dev. 
Unpacking libxfixes-dev (from .../libxfixes-dev_1%3a5.0-4+deb7u2_i386.deb) ... 
Selecting previously unselected package libxcursor-dev:i386. 
Unpacking libxcursor-dev:i386 (from .../libxcursor-dev_1%3a1.1.13-1+deb7u1_i386.deb) ... 
Selecting previously unselected package libfox-1.6-dev. 
Unpacking libfox-1.6-dev (from .../libfox-1.6-dev_1.6.45-1_i386.deb) ... 
Processing triggers for man-db ... 
Setting up libcups2-dev (1.5.3-5+deb7u6) ... 
Setting up libfox-1.6-0 (1.6.45-1) ... 
Setting up mesa-common-dev (8.0.5-4+deb7u2) ... 
Setting up libgl1-mesa-dev (8.0.5-4+deb7u2) ... 
Setting up libglu1-mesa-dev (8.0.5-4+deb7u2) ... 
Setting up libudev-dev (175-7.2) ... 
Setting up libusb-1.0-0-dev (2:1.0.11-1) ... 
Setting up x11proto-fixes-dev (1:5.0-2) ... 
Setting up libxfixes-dev (1:5.0-4+deb7u2) ... 
Setting up libxcursor-dev:i386 (1:1.1.13-1+deb7u1) ... 
Setting up libfox-1.6-dev (1.6.45-1) ... 
update-alternatives: using /usr/bin/fox-config-1.6 to provide /usr/bin/fox-config (fox-config) in auto mode 
update-alternatives: using /usr/bin/reswrap-1.6 to provide /usr/bin/reswrap (reswrap) in auto mode 
root@localhost:/home/misko# 

2.2. CMAKE

Desktop installation: For installing CMAKE, I used Synaptic Package Manager that besides cmake itself added cmake-data and emacsen-common, alltogether circa 6.2 MB to download. It took some additional 25 min or so to get those packages over my slow dial-up line. (By the way, for that task I could have also used my Debian 7.11 laptop, which I usually use for downloading anything bigger than 1 MB, and much faster by my university's Wi-Fi access, and what I later copy to the slow desktop computer with slow dial-up at home, but that particular day it was very rainy so I did not want to go outside and burden myself by getting wet in the academic campus.)

Laptop installation: I have already had all CMAKE stuff on the laptop. (In fact, I used all three CMAKE packages downloaded to the desktop above as the 'source-files' for the laptop's Synaptic Package Manager, so that I would not need to download them twice.)

The HIDAPI author has suggested that those users who had downloaded a source package from the website manually (i.e. if they did not run git clone), they can can skip the ./bootstrap step and go directly to the ./configure step. However that possibility did not work here properly:

root@localhost:/usr/local/src/hidapi-master# ./configure --enable-testgui --prefix=/usr/local
bash: ./configure: No such file or directory 

… so I performed ./bootstrap at first:

root@localhost:/usr/local/src/hidapi-master# ./bootstrap 
+ autoreconf --install --verbose --force 
autoreconf: Entering directory `.' 
autoreconf: configure.ac: not using Gettext 
autoreconf: running: aclocal --force -I m4 
autoreconf: configure.ac: tracing 
autoreconf: running: libtoolize --copy --force 
libtoolize: putting auxiliary files in `.'. 
libtoolize: copying file `./ltmain.sh' 
libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'. 
libtoolize: copying file `m4/libtool.m4' 
libtoolize: copying file `m4/ltoptions.m4' 
libtoolize: copying file `m4/ltsugar.m4' 
libtoolize: copying file `m4/ltversion.m4' 
libtoolize: copying file `m4/lt~obsolete.m4' 
autoreconf: running: /usr/bin/autoconf --force 
autoreconf: running: /usr/bin/autoheader --force 
autoreconf: running: automake --add-missing --copy --force-missing 
configure.ac:25: installing `./ar-lib' 
configure.ac:26: installing `./config.guess' 
configure.ac:26: installing `./config.sub' 
configure.ac:22: installing `./install-sh' 
configure.ac:22: installing `./missing' 
hidtest/Makefile.am: installing `./depcomp' 
autoreconf: Leaving directory `.' 
root@localhost:/usr/local/src/hidapi-master#

… after that I executed ./configure again:

root@localhost:/usr/local/src/hidapi-master# ./configure --enable-testgui --prefix=/usr/local 
checking for a BSD-compatible install... /usr/bin/install -c 
checking whether build environment is sane... yes 
checking for a thread-safe mkdir -p... /bin/mkdir -p 
checking for gawk... no 
checking for mawk... mawk 
checking whether make sets $(MAKE)... yes 
checking for style of include used by make... GNU 
checking for gcc... gcc 
checking whether the C compiler works... yes 
checking for C compiler default output file name... a.out 
checking for suffix of executables... 
checking whether we are cross compiling... no 
checking for suffix of object files... o 
checking whether we are using the GNU C compiler... yes 
checking whether gcc accepts -g... yes 
checking for gcc option to accept ISO C89... none needed 
checking dependency style of gcc... gcc3 
checking for ar... ar 
checking the archiver (ar) interface... ar 
checking build system type... i686-pc-linux-gnu 
checking host system type... i686-pc-linux-gnu 
checking how to print strings... printf 
checking for a sed that does not truncate output... /bin/sed 
checking for grep that handles long lines and -e... /bin/grep 
checking for egrep... /bin/grep -E 
checking for fgrep... /bin/grep -F 
checking for ld used by gcc... /usr/bin/ld 
checking if the linker (/usr/bin/ld) is GNU ld... yes 
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B 
checking the name lister (/usr/bin/nm -B) interface... BSD nm 
checking whether ln -s works... yes 
checking the maximum length of command line arguments... 1572864 
checking whether the shell understands some XSI constructs... yes 
checking whether the shell understands "+="... yes 
checking how to convert i686-pc-linux-gnu file names to i686-pc-linux-gnu format... func_convert_file_noop 
checking how to convert i686-pc-linux-gnu file names to toolchain format... func_convert_file_noop 
checking for /usr/bin/ld option to reload object files... -r 
checking for objdump... objdump 
checking how to recognize dependent libraries... pass_all 
checking for dlltool... no 
checking how to associate runtime and link libraries... printf %s
 
checking for archiver @FILE support... @ 
checking for strip... strip 
checking for ranlib... ranlib 
checking command to parse /usr/bin/nm -B output from gcc object... ok 
checking for sysroot... no 
checking for mt... mt 
checking if mt is a manifest tool... no 
checking how to run the C preprocessor... gcc -E 
checking for ANSI C header files... yes 
checking for sys/types.h... yes 
checking for sys/stat.h... yes 
checking for stdlib.h... yes 
checking for string.h... yes 
checking for memory.h... yes 
checking for strings.h... yes 
checking for inttypes.h... yes 
checking for stdint.h... yes 
checking for unistd.h... yes 
checking for dlfcn.h... yes 
checking for objdir... .libs 
checking if gcc supports -fno-rtti -fno-exceptions... no 
checking for gcc option to produce PIC... -fPIC -DPIC 
checking if gcc PIC flag -fPIC -DPIC works... yes 
checking if gcc static flag -static works... yes 
checking if gcc supports -c -o file.o... yes 
checking if gcc supports -c -o file.o... (cached) yes 
checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes 
checking whether -lc should be explicitly linked in... no 
checking dynamic linker characteristics... GNU/Linux ld.so 
checking how to hardcode library paths into programs... immediate 
checking whether stripping libraries is possible... yes 
checking if libtool supports shared libraries... yes 
checking whether to build shared libraries... yes 
checking whether to build static libraries... yes 
checking for gcc... (cached) gcc 
checking whether we are using the GNU C compiler... (cached) yes 
checking whether gcc accepts -g... (cached) yes 
checking for gcc option to accept ISO C89... (cached) none needed 
checking dependency style of gcc... (cached) gcc3 
checking for g++... g++ 
checking whether we are using the GNU C++ compiler... yes 
checking whether g++ accepts -g... yes 
checking dependency style of g++... gcc3 
checking how to run the C++ preprocessor... g++ -E 
checking for ld used by g++... /usr/bin/ld 
checking if the linker (/usr/bin/ld) is GNU ld... yes 
checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes 
checking for g++ option to produce PIC... -fPIC -DPIC 
checking if g++ PIC flag -fPIC -DPIC works... yes 
checking if g++ static flag -static works... yes 
checking if g++ supports -c -o file.o... yes 
checking if g++ supports -c -o file.o... (cached) yes 
checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes 
checking dynamic linker characteristics... (cached) GNU/Linux ld.so 
checking how to hardcode library paths into programs... immediate 
checking for gcc... gcc 
checking whether we are using the GNU Objective C compiler... no 
checking whether gcc accepts -g... no 
checking dependency style of gcc... gcc3 
checking for pkg-config... /usr/bin/pkg-config 
checking pkg-config is at least version 0.9.0... yes 
checking whether make supports nested variables... yes 
checking operating system... i686-pc-linux-gnu 
 (Linux back-end) 
checking for libudev... yes 
checking for clock_gettime in -lrt... yes 
checking for libusb... yes 
checking for the pthreads library -lpthreads... no 
checking whether pthreads work without any flags... no 
checking whether pthreads work with -Kthread... no 
checking whether pthreads work with -kthread... no 
checking for the pthreads library -llthread... no 
checking whether pthreads work with -pthread... yes 
checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE 
checking if more special flags are required for pthreads... no 
checking for PTHREAD_PRIO_INHERIT... no 
checking for fox... no 
checking for fox... yes 
configure: creating ./config.status 
config.status: creating pc/hidapi-hidraw.pc 
config.status: creating pc/hidapi-libusb.pc 
config.status: creating Makefile 
config.status: creating hidtest/Makefile 
config.status: creating libusb/Makefile 
config.status: creating linux/Makefile 
config.status: creating mac/Makefile 
config.status: creating testgui/Makefile 
config.status: creating windows/Makefile 
config.status: creating config.h 
config.status: executing depfiles commands 
config.status: executing libtool commands 
root@localhost:/usr/local/src/hidapi-master# 

… there were no complaints so far, so I executed make:

root@localhost:/usr/local/src/hidapi-master# make 
make  all-recursive 
make[1]: Entering directory `/usr/local/src/hidapi-master' 
Making all in linux 
make[2]: Entering directory `/usr/local/src/hidapi-master/linux' 
  CC     hid.lo 
  CCLD   libhidapi-hidraw.la 
make[2]: Leaving directory `/usr/local/src/hidapi-master/linux' 
Making all in libusb 
make[2]: Entering directory `/usr/local/src/hidapi-master/libusb' 
  CC     hid.lo 
  CCLD   libhidapi-libusb.la 
make[2]: Leaving directory `/usr/local/src/hidapi-master/libusb' 
Making all in hidtest 
make[2]: Entering directory `/usr/local/src/hidapi-master/hidtest' 
  CXX    hidtest.o 
  CXXLD  hidtest-libusb 
  CXXLD  hidtest-hidraw 
make[2]: Leaving directory `/usr/local/src/hidapi-master/hidtest' 
Making all in testgui 
make[2]: Entering directory `/usr/local/src/hidapi-master/testgui' 
  CXX    test.o 
  CXXLD  hidapi-hidraw-testgui 
  CXXLD  hidapi-libusb-testgui 
make[2]: Leaving directory `/usr/local/src/hidapi-master/testgui' 
make[2]: Entering directory `/usr/local/src/hidapi-master' 
make[2]: Nothing to be done for `all-am'. 
make[2]: Leaving directory `/usr/local/src/hidapi-master' 
make[1]: Leaving directory `/usr/local/src/hidapi-master' 
root@localhost:/usr/local/src/hidapi-master# 

… no complaints there too, so I went to perform make install:

root@localhost:/usr/local/src/hidapi-master# make install 
Making install in linux 
make[1]: Entering directory `/usr/local/src/hidapi-master/linux' 
make[2]: Entering directory `/usr/local/src/hidapi-master/linux' 
 /bin/mkdir -p '/usr/local/lib' 
 /bin/bash ../libtool   --mode=install /usr/bin/install -c   libhidapi-hidraw.la '/usr/local/lib' 
libtool: install: /usr/bin/install -c .libs/libhidapi-hidraw.so.0.0.0 /usr/local/lib/libhidapi-hidraw.so.0.0.0 
libtool: install: (cd /usr/local/lib && { ln -s -f libhidapi-hidraw.so.0.0.0 libhidapi-hidraw.so.0 || { rm -f libhidapi-hidraw.so.0 && ln -s libhidapi-hidraw.so.0.0.0 libhidapi-hidraw.so.0; }; }) 
libtool: install: (cd /usr/local/lib && { ln -s -f libhidapi-hidraw.so.0.0.0 libhidapi-hidraw.so || { rm -f libhidapi-hidraw.so && ln -s libhidapi-hidraw.so.0.0.0 libhidapi-hidraw.so; }; }) 
libtool: install: /usr/bin/install -c .libs/libhidapi-hidraw.lai /usr/local/lib/libhidapi-hidraw.la 
libtool: install: /usr/bin/install -c .libs/libhidapi-hidraw.a /usr/local/lib/libhidapi-hidraw.a 
libtool: install: chmod 644 /usr/local/lib/libhidapi-hidraw.a 
libtool: install: ranlib /usr/local/lib/libhidapi-hidraw.a 
libtool: finish: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/sbin" ldconfig -n /usr/local/lib 
---------------------------------------------------------------------- 
Libraries have been installed in: 
   /usr/local/lib 

If you ever happen to want to link against installed libraries 
in a given directory, LIBDIR, you must either use libtool, and 
specify the full pathname of the library, or use the `-LLIBDIR' 
flag during linking and do at least one of the following: 
   - add LIBDIR to the `LD_LIBRARY_PATH' environment variable 
     during execution 
   - add LIBDIR to the `LD_RUN_PATH' environment variable 
     during linking 
   - use the `-Wl,-rpath -Wl,LIBDIR' linker flag 
   - have your system administrator add LIBDIR to `/etc/ld.so.conf' 

See any operating system documentation about shared libraries for 
more information, such as the ld(1) and ld.so(8) manual pages. 
---------------------------------------------------------------------- 
 /bin/mkdir -p '/usr/local/include/hidapi' 
 /usr/bin/install -c -m 644 ../hidapi/hidapi.h '/usr/local/include/hidapi' 
make[2]: Leaving directory `/usr/local/src/hidapi-master/linux' 
make[1]: Leaving directory `/usr/local/src/hidapi-master/linux' 
Making install in libusb 
make[1]: Entering directory `/usr/local/src/hidapi-master/libusb' 
make[2]: Entering directory `/usr/local/src/hidapi-master/libusb' 
 /bin/mkdir -p '/usr/local/lib' 
 /bin/bash ../libtool   --mode=install /usr/bin/install -c   libhidapi-libusb.la '/usr/local/lib' 
libtool: install: /usr/bin/install -c .libs/libhidapi-libusb.so.0.0.0 /usr/local/lib/libhidapi-libusb.so.0.0.0 
libtool: install: (cd /usr/local/lib && { ln -s -f libhidapi-libusb.so.0.0.0 libhidapi-libusb.so.0 || { rm -f libhidapi-libusb.so.0 && ln -s libhidapi-libusb.so.0.0.0 libhidapi-libusb.so.0; }; }) 
libtool: install: (cd /usr/local/lib && { ln -s -f libhidapi-libusb.so.0.0.0 libhidapi-libusb.so || { rm -f libhidapi-libusb.so && ln -s libhidapi-libusb.so.0.0.0 libhidapi-libusb.so; }; }) 
libtool: install: /usr/bin/install -c .libs/libhidapi-libusb.lai /usr/local/lib/libhidapi-libusb.la 
libtool: install: /usr/bin/install -c .libs/libhidapi-libusb.a /usr/local/lib/libhidapi-libusb.a 
libtool: install: chmod 644 /usr/local/lib/libhidapi-libusb.a 
libtool: install: ranlib /usr/local/lib/libhidapi-libusb.a 
libtool: finish: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/sbin" ldconfig -n /usr/local/lib 
---------------------------------------------------------------------- 
Libraries have been installed in: 
   /usr/local/lib 

If you ever happen to want to link against installed libraries 
in a given directory, LIBDIR, you must either use libtool, and 
specify the full pathname of the library, or use the `-LLIBDIR' 
flag during linking and do at least one of the following: 
   - add LIBDIR to the `LD_LIBRARY_PATH' environment variable 
     during execution 
   - add LIBDIR to the `LD_RUN_PATH' environment variable 
     during linking 
   - use the `-Wl,-rpath -Wl,LIBDIR' linker flag 
   - have your system administrator add LIBDIR to `/etc/ld.so.conf' 

See any operating system documentation about shared libraries for 
more information, such as the ld(1) and ld.so(8) manual pages. 
---------------------------------------------------------------------- 
 /bin/mkdir -p '/usr/local/include/hidapi' 
 /usr/bin/install -c -m 644 ../hidapi/hidapi.h '/usr/local/include/hidapi' 
make[2]: Leaving directory `/usr/local/src/hidapi-master/libusb' 
make[1]: Leaving directory `/usr/local/src/hidapi-master/libusb' 
Making install in hidtest 
make[1]: Entering directory `/usr/local/src/hidapi-master/hidtest' 
make[2]: Entering directory `/usr/local/src/hidapi-master/hidtest' 
make[2]: Nothing to be done for `install-exec-am'. 
make[2]: Nothing to be done for `install-data-am'. 
make[2]: Leaving directory `/usr/local/src/hidapi-master/hidtest' 
make[1]: Leaving directory `/usr/local/src/hidapi-master/hidtest' 
Making install in testgui 
make[1]: Entering directory `/usr/local/src/hidapi-master/testgui' 
make[2]: Entering directory `/usr/local/src/hidapi-master/testgui' 
 /bin/mkdir -p '/usr/local/bin' 
  /bin/bash ../libtool   --mode=install /usr/bin/install -c hidapi-hidraw-testgui hidapi-libusb-testgui '/usr/local/bin' 
libtool: install: /usr/bin/install -c .libs/hidapi-hidraw-testgui /usr/local/bin/hidapi-hidraw-testgui 
libtool: install: /usr/bin/install -c .libs/hidapi-libusb-testgui /usr/local/bin/hidapi-libusb-testgui 
make[2]: Nothing to be done for `install-data-am'. 
make[2]: Leaving directory `/usr/local/src/hidapi-master/testgui' 
make[1]: Leaving directory `/usr/local/src/hidapi-master/testgui' 
make[1]: Entering directory `/usr/local/src/hidapi-master' 
make[2]: Entering directory `/usr/local/src/hidapi-master' 
make[2]: Nothing to be done for `install-exec-am'. 
 /bin/mkdir -p '/usr/local/share/doc/hidapi' 
 /usr/bin/install -c -m 644 README.txt AUTHORS.txt LICENSE-bsd.txt LICENSE-gpl3.txt LICENSE-orig.txt LICENSE.txt '/usr/local/share/doc/hidapi' 
 /bin/mkdir -p '/usr/local/lib/pkgconfig' 
 /usr/bin/install -c -m 644 pc/hidapi-hidraw.pc pc/hidapi-libusb.pc '/usr/local/lib/pkgconfig' 
make[2]: Leaving directory `/usr/local/src/hidapi-master' 
make[1]: Leaving directory `/usr/local/src/hidapi-master' 
root@localhost:/usr/local/src/hidapi-master# 

… no complaints there too ...

root@localhost:/usr/local/src/hidapi-master# cd linux 
root@localhost:/usr/local/src/hidapi-master/linux# make -f Makefile-manual 
g++ -Wall -g hid.o ../hidtest/hidtest.o `pkg-config libudev --libs` -lrt -o hidtest-hidraw 
cc -Wall -g `pkg-config libudev --libs` -lrt -shared -fpic -Wl,-soname,libhidapi-hidraw.so.0 hid.o -o libhidapi-hidraw.so 
root@localhost:/usr/local/src/hidapi-master/linux# 

(The above two actions produced hidtest-hidraw executable.)

root@localhost:/usr/local/src/hidapi-master/linux# cd .. 
root@localhost:/usr/local/src/hidapi-master# cd testgui 
root@localhost:/usr/local/src/hidapi-master/testgui# make -f Makefile-manual 
g++ -Wall -g ../libusb/hid.o test.o -ludev -lrt -lpthread `fox-config --libs` `pkg-config libusb-1.0 --libs` -o testgui 
root@localhost:/usr/local/src/hidapi-master/testgui# 

(The above three steps produced testgui executable.)

… now I wanted to perform some tests with HIDAPI software:

root@localhost:/usr/local/src/hidapi-master/hidtest# ./hidtest-hidraw 
Device Found 
  type: 0c45 7402 
  path: /dev/hidraw0 
  serial_number: 
  Manufacturer: RDing 
  Product:      TEMPer1F_H1_V1.4 
  Release:      1 
  Interface:    0 

Device Found 
  type: 0c45 7402 
  path: /dev/hidraw1 
  serial_number: 
  Manufacturer: RDing 
  Product:      TEMPer1F_H1_V1.4 
  Release:      1 
  Interface:    1 

unable to open device 
root@localhost:/usr/local/src/hidapi-master/hidtest# ./hidtest-libusb 
Device Found 
  type: 0c45 7402 
  path: 0003:002e:00 
  serial_number: (null) 
  Manufacturer: RDing 
  Product:      TEMPer1F_H1_V1.4 
  Release:      1 
  Interface:    0 

Device Found 
  type: 0c45 7402 
  path: 0003:002e:01 
  serial_number: (null) 
  Manufacturer: RDing 
  Product:      TEMPer1F_H1_V1.4 
  Release:      1 
  Interface:    1 

unable to open device 
root@localhost:/usr/local/src/hidapi-master/hidtest# 

… then I tried the following (changed the directory):

root@localhost:/usr/local/src/hidapi-master/hidtest# cd .. 
root@localhost:/usr/local/src/hidapi-master# cd linux 
root@localhost:/usr/local/src/hidapi-master/linux# ./hidtest-hidraw 
Device Found 
  type: 0c45 7402 
  path: /dev/hidraw0 
  serial_number: 
  Manufacturer: RDing 
  Product:      TEMPer1F_H1_V1.4 
  Release:      1 
  Interface:    0 

Device Found 
  type: 0c45 7402 
  path: /dev/hidraw1 
  serial_number: 
  Manufacturer: RDing 
  Product:      TEMPer1F_H1_V1.4 
  Release:      1 
  Interface:    1 

unable to open device 
root@localhost:/usr/local/src/hidapi-master/linux# 

… then I tried this (changed the directory again):

root@localhost:/usr/local/src/hidapi-master/linux# cd .. 
root@localhost:/usr/local/src/hidapi-master# cd testgui 
root@localhost:/usr/local/src/hidapi-master/testgui# ./testgui 

… and it finally opened this window:

… then I tried connection to the first device listed (although both seemed the same):

… then I tried to “Send Output Report” (did not return anything back), following by “Send Feature Report” (it just closed that window prematurely), then re-opened that GUI again, following by “Get Feature Report” that returned some bytes see bellow:

… that was all with that GUI. (Connecting to the second device listed was possible but sending/receiving reports failed with some unclear error messages.)

Well, I got back to work with TEMPered package again:

root@localhost:/usr/local/src/hidapi-master/testgui# cd /usr/local/src/TEMPered-master 
root@localhost:/usr/local/src/TEMPered-master# 

root@localhost:/usr/local/src/TEMPered-master# make 

This 

Leave a comment

All comments are moderated before being published.

This site is protected by hCaptcha and the hCaptcha Privacy Policy and Terms of Service apply.