My Account

Wish List (0)

Saved Carts

Compare

Approved Re-Seller
Follow us on Facebook! Follow us on Twitter! Follow us on Instagram!

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

January 15, 2018

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\n 
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 project uses the CMake build system. 

This means that to build it, you should create a directory somewhere, 
cd to it, and run cmake there to generate the out-of-tree build 
structures - if necessary, reconfigure it for your system - and then 
run make in that directory. 

For more information on how to use CMake, see http://cmake.org/ 

As a convenience, the cmake target in this makefile will generate a 
build dir and run cmake in it for you, while distclean will remove it. 

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

… so I went to build that directory it asked for …

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

… then executed cmake ...

root@localhost:/usr/local/src/TEMPered-master# cmake 
cmake version 2.8.9 
Usage 

  cmake [options]  
  cmake [options] 

Options 
  -C          = Pre-load a script to populate the cache. 
  -D     = Create a cmake cache entry. 
  -U          = Remove matching entries from CMake cache. 
  -G        = Specify a makefile generator. 
  -Wno-dev                    = Suppress developer warnings. 
  -Wdev                       = Enable developer warnings. 
  -E                          = CMake command mode. 
  -i                          = Run in wizard mode. 
  -L[A][H]                    = List non-advanced cached variables. 
  --build              = Build a CMake-generated project binary tree. 
  -N                          = View mode only. 
  -P                    = Process script mode. 
  --find-package              = Run in pkg-config like mode. 
  --graphviz=[file]           = Generate graphviz of dependencies. 
  --system-information [file] = Dump information about this system. 
  --debug-trycompile          = Do not delete the try_compile build tree. 
                                Only useful on one try_compile at a time. 
  --debug-output              = Put cmake in a debug mode. 
  --trace                     = Put cmake in trace mode. 
  --warn-uninitialized        = Warn about uninitialized values. 
  --warn-unused-vars          = Warn about unused variables. 
  --no-warn-unused-cli        = Don't warn about command line options. 
  --check-system-vars         = Find problems with variable usage in system 
                                files. 
  --help-command cmd [file]   = Print help for a single command and exit. 
  --help-command-list [file]  = List available listfile commands and exit. 
  --help-commands [file]      = Print help for all commands and exit. 
  --help-compatcommands [file]= Print help for compatibility commands. 
  --help-module module [file] = Print help for a single module and exit. 
  --help-module-list [file]   = List available modules and exit. 
  --help-modules [file]       = Print help for all modules and exit. 
  --help-custom-modules [file]= Print help for all custom modules and exit. 
  --help-policy cmp [file]    = Print help for a single policy and exit. 
  --help-policies [file]      = Print help for all policies and exit. 
  --help-property prop [file] = Print help for a single property and exit. 
  --help-property-list [file] = List available properties and exit. 
  --help-properties [file]    = Print help for all properties and exit. 
  --help-variable var [file]  = Print help for a single variable and exit. 
  --help-variable-list [file] = List documented variables and exit. 
  --help-variables [file]     = Print help for all variables and exit. 
  --copyright [file]          = Print the CMake copyright and exit. 
  --help,-help,-usage,-h,-H,/?= Print usage information and exit. 
  --help-full [file]          = Print full help and exit. 
  --help-html [file]          = Print full help in HTML format. 
  --help-man [file]           = Print full help as a UNIX man page and exit. 
  --version,-version,/V [file]= Show program name/version banner and exit. 

Generators 

The following generators are available on this platform: 
  Ninja                       = Generates build.ninja files (experimental). 
  Unix Makefiles              = Generates standard UNIX makefiles. 
  CodeBlocks - Ninja          = Generates CodeBlocks project files. 
  CodeBlocks - Unix Makefiles = Generates CodeBlocks project files. 
  Eclipse CDT4 - Ninja        = Generates Eclipse CDT 4.0 project files. 
  Eclipse CDT4 - Unix Makefiles 
                              = Generates Eclipse CDT 4.0 project files. 
  KDevelop3                   = Generates KDevelop 3 project files. 
  KDevelop3 - Unix Makefiles  = Generates KDevelop 3 project files. 

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

… and after some tries and errors in changing working directories … :-)

root@localhost:/usr/local/src/TEMPered-master# cmake /usr/local/src/TEMPered-master/build 
CMake Error: The source directory "/usr/local/src/TEMPered-master/build" does not appear to contain CMakeLists.txt. 
Specify --help for usage, or press the help button on the CMake GUI. 
root@localhost:/usr/local/src/TEMPered-master# cd build 
root@localhost:/usr/local/src/TEMPered-master/build# cmake /usr/local/src/TEMPered-master 
-- The C compiler identification is GNU 4.7.2 
-- Check for working C compiler: /usr/bin/gcc 
-- Check for working C compiler: /usr/bin/gcc -- works 
-- Detecting C compiler ABI info 
-- Detecting C compiler ABI info - done 
-- Configuring done 
-- Generating done 
-- Build files have been written to: /usr/local/src/TEMPered-master/build 
root@localhost:/usr/local/src/TEMPered-master/build# 

root@localhost:/usr/local/src/TEMPered-master/build# make (Desktop installation)
Scanning dependencies of target tempered-shared 
[  6%] Building C object libtempered/CMakeFiles/tempered-shared.dir/type_hid/sht1x.c.o 
[ 13%] Building C object libtempered/CMakeFiles/tempered-shared.dir/type_hid/ntc.c.o 
/usr/local/src/TEMPered-master/libtempered/type_hid/ntc.c: In function ‘tempered_type_hid_read_sensor_group_ntc’: 
/usr/local/src/TEMPered-master/libtempered/type_hid/ntc.c:8:66: warning: unused parameter ‘group’ [-Wunused-parameter] 
/usr/local/src/TEMPered-master/libtempered/type_hid/ntc.c:9:41: warning: unused parameter ‘group_data’ [-Wunused-parameter] 
/usr/local/src/TEMPered-master/libtempered/type_hid/ntc.c: In function ‘tempered_type_hid_get_temperature_ntc’: 
/usr/local/src/TEMPered-master/libtempered/type_hid/ntc.c:20:60: warning: unused parameter ‘tempC’ [-Wunused-parameter] 
[ 20%] Building C object libtempered/CMakeFiles/tempered-shared.dir/type_hid/common.c.o 
[ 26%] Building C object libtempered/CMakeFiles/tempered-shared.dir/type_hid/si7005.c.o 
[ 33%] Building C object libtempered/CMakeFiles/tempered-shared.dir/type_hid/fm75.c.o 
[ 40%] Building C object libtempered/CMakeFiles/tempered-shared.dir/temper_type.c.o 
[ 46%] Building C object libtempered/CMakeFiles/tempered-shared.dir/core.c.o 
Linking C shared library libtempered.so 
[ 46%] Built target tempered-shared 
Scanning dependencies of target tempered-util-shared 
[ 53%] Building C object libtempered-util/CMakeFiles/tempered-util-shared.dir/calibration.c.o 
[ 60%] Building C object libtempered-util/CMakeFiles/tempered-util-shared.dir/temp-scale.c.o 
[ 66%] Building C object libtempered-util/CMakeFiles/tempered-util-shared.dir/dew-point.c.o 
Linking C shared library libtempered-util.so 
[ 66%] Built target tempered-util-shared 
Scanning dependencies of target hid-query 
[ 73%] Building C object utils/CMakeFiles/hid-query.dir/hid-query.c.o 
Linking C executable hid-query 
[ 73%] Built target hid-query 
Scanning dependencies of target tempered-exe 
[ 80%] Building C object utils/CMakeFiles/tempered-exe.dir/tempered.c.o 
Linking C executable tempered 
[ 80%] Built target tempered-exe 
Scanning dependencies of target enumerate 
[ 86%] Building C object examples/CMakeFiles/enumerate.dir/enumerate.c.o 
Linking C executable enumerate 
[ 86%] Built target enumerate 
Scanning dependencies of target read-all 
[ 93%] Building C object examples/CMakeFiles/read-all.dir/read-all.c.o 
Linking C executable read-all 
[ 93%] Built target read-all 
Scanning dependencies of target read-repeat 
[100%] Building C object examples/CMakeFiles/read-repeat.dir/read-repeat.c.o 
Linking C executable read-repeat 
[100%] Built target read-repeat 
root@localhost:/usr/local/src/TEMPered-master/build# 

… nothing complained so far …

root@localhost:/usr/local/src/TEMPered-master/build# make (Laptop installation)
Scanning dependencies of target tempered-shared 
[  6%] Building C object libtempered/CMakeFiles/tempered-shared.dir/type_hid/sht1x.c.o 
[ 13%] Building C object libtempered/CMakeFiles/tempered-shared.dir/type_hid/ntc.c.o 
/usr/local/src/TEMPered-master/libtempered/type_hid/ntc.c: In function ‘tempered_type_hid_read_sensor_group_ntc’: 
/usr/local/src/TEMPered-master/libtempered/type_hid/ntc.c:8:66: warning: unused parameter ‘group’ [-Wunused-parameter] 
/usr/local/src/TEMPered-master/libtempered/type_hid/ntc.c:9:41: warning: unused parameter ‘group_data’ [-Wunused-parameter] 
/usr/local/src/TEMPered-master/libtempered/type_hid/ntc.c: In function ‘tempered_type_hid_get_temperature_ntc’: 
/usr/local/src/TEMPered-master/libtempered/type_hid/ntc.c:20:60: warning: unused parameter ‘tempC’ [-Wunused-parameter] 
[ 20%] Building C object libtempered/CMakeFiles/tempered-shared.dir/type_hid/common.c.o 
[ 26%] Building C object libtempered/CMakeFiles/tempered-shared.dir/type_hid/si7005.c.o 
[ 33%] Building C object libtempered/CMakeFiles/tempered-shared.dir/type_hid/fm75.c.o 
[ 40%] Building C object libtempered/CMakeFiles/tempered-shared.dir/temper_type.c.o 
[ 46%] Building C object libtempered/CMakeFiles/tempered-shared.dir/core.c.o 
Linking C shared library libtempered.so 
[ 46%] Built target tempered-shared 
Scanning dependencies of target tempered-util-shared 
[ 53%] Building C object libtempered-util/CMakeFiles/tempered-util-shared.dir/calibration.c.o 
[ 60%] Building C object libtempered-util/CMakeFiles/tempered-util-shared.dir/temp-scale.c.o 
[ 66%] Building C object libtempered-util/CMakeFiles/tempered-util-shared.dir/dew-point.c.o 
Linking C shared library libtempered-util.so 
[ 66%] Built target tempered-util-shared 
Scanning dependencies of target hid-query 
[ 73%] Building C object utils/CMakeFiles/hid-query.dir/hid-query.c.o 
Linking C executable hid-query 
[ 73%] Built target hid-query 
Scanning dependencies of target tempered-exe 
[ 80%] Building C object utils/CMakeFiles/tempered-exe.dir/tempered.c.o 
Linking C executable tempered 
[ 80%] Built target tempered-exe 
Scanning dependencies of target enumerate 
[ 86%] Building C object examples/CMakeFiles/enumerate.dir/enumerate.c.o 
Linking C executable enumerate 
[ 86%] Built target enumerate 
Scanning dependencies of target read-all 
[ 93%] Building C object examples/CMakeFiles/read-all.dir/read-all.c.o 
Linking C executable read-all 
[ 93%] Built target read-all 
Scanning dependencies of target read-repeat 
[100%] Building C object examples/CMakeFiles/read-repeat.dir/read-repeat.c.o 
Linking C executable read-repeat 
[100%] Built target read-repeat 
root@localhost:/usr/local/src/TEMPered-master/build# 

… nothing complained so far too …

root@localhost:/usr/local/src/TEMPered-master/build# cd utils 
root@localhost:/usr/local/src/TEMPered-master/build/utils# 

(There were 2 new executables there: hid-query and tempered)

… now testing those two new executables …

root@localhost:/usr/local/src/TEMPered-master/build/utils# ./hid-query 
Too few parameters. 
Usage: hid-query --enum|-e 
 or  : hid-query --help|-h 
 or  : hid-query 

The first form enumerates the HID devices that are attached to the system. 
The second form prints this help message to stderr. 
The third form writes the given bytes to the given HID device, and waits for 
an answer, printing it to stdout. The optional datalen is an integer that 
specifies the number of bytes to write to the device (defaults to the higher 
of 8 and the number of bytes given, with the data zero-padded as necessary). 
The highest allowed data length is 256. 
The report ID will be the first byte written to the device, and if -r is not 
given will be defaulted to zero, as that is the value to use for devices 
that don't use numbered reports (such as the TEMPered devices) - so expect 
to see one more byte than you specified being written to the device. 
root@localhost:/usr/local/src/TEMPered-master/build/utils# 

… hid-query obviously did not want to run without any parameter ...

root@localhost:/usr/local/src/TEMPered-master/build/utils# ./hid-query --enum 
/dev/hidraw0 : 0c45:7402 interface 0 : RDing TEMPer1F_H1_V1.4 
/dev/hidraw1 : 0c45:7402 interface 1 : RDing TEMPer1F_H1_V1.4 
root@localhost:/usr/local/src/TEMPered-master/build/utils# 

… as seen above it returned some output, but the above listed hardware was not the exactly device I had here … so I tried tempered:

root@localhost:/usr/local/src/TEMPered-master/build/utils# ./tempered 
/dev/hidraw1: Could not open device: Unknown device subtype string: TEMPer1F_H1V1.5F 
root@localhost:/usr/local/src/TEMPered-master/build/utils# 

… the command did not work for some reason … tried again with ‘help’ option:

root@localhost:/usr/local/src/TEMPered-master/build/utils# ./tempered -h 
Usage: tempered [options] [device-path...] 

Known options: 
    -h 
    --help                 Show this help text 
    -e 
    --enumerate            Enumerate the found devices without reading them. 
    -s  
    --scale         Set the temperature scale to show measurements in. 
                           The can be the name or symbol of the scale, 
                           or a unique prefix of the name. 
                           Known scales: Celsius, Kelvin, Fahrenheit, Rankine, 
                           Newton 
    -c 
    --calibrate-temp Calibrate the measured temperature using the given 
                           calibration parameters. is a colon-separated 
                           list of floats, where each one given represents the 
                           factor for that power of the measured temperature, 
                           starting at power zero. ( a+b*T+c*T^2+d*T^3 ... ) 
root@localhost:/usr/local/src/TEMPered-master/build/utils# 

… then tried to enumerate the device ...

root@localhost:/usr/local/src/TEMPered-master/build/utils# ./tempered -e 
/dev/hidraw1 : TEMPer2HumiV1.x (USB IDs 0C45:7402) 
root@localhost:/usr/local/src/TEMPered-master/build/utils# 

… the output seemed pretty fine …

root@localhost:/usr/local/src/TEMPered-master/build/utils# cd ../examples 
root@localhost:/usr/local/src/TEMPered-master/build/examples# ls -l 
total 52 
drwxr-sr-x 5 root staff  4096 Sep 17 16:42 CMakeFiles 
-rw-r--r-- 1 root staff  1163 Sep 17 16:42 cmake_install.cmake 
-rwxr-xr-x 1 root staff  6625 Sep 17 16:44 enumerate 
-rw-r--r-- 1 root staff 10053 Sep 17 16:42 Makefile 
-rwxr-xr-x 1 root staff  9111 Sep 17 16:44 read-all 
-rwxr-xr-x 1 root staff  9338 Sep 17 16:44 read-repeat 
root@localhost:/usr/local/src/TEMPered-master/build/examples# ./enumerate 
Found device: 0c45:7402 1 | /dev/hidraw1 | TEMPer2HumiV1.x 
root@localhost:/usr/local/src/TEMPered-master/build/examples# ./read-all 
Device /dev/hidraw1 : USB IDs 0c45:7402, interface 1 
	Enumeration type name: TEMPer2HumiV1.x 
	Open failed, error: Unknown device subtype string: TEMPer1F_H1V1.5F 
root@localhost:/usr/local/src/TEMPered-master/build/examples# ./read-repeat 
Usage: read-repeat 
root@localhost:/usr/local/src/TEMPered-master/build/examples# ./read-repeat /dev/hidraw1 
Opening /dev/hidraw1 failed, error: Unknown device subtype string: TEMPer1F_H1V1.5F 
root@localhost:/usr/local/src/TEMPered-master/build/examples# 

… as seen, although compiling procedures finished pretty good, the TEMPered software did not work with my particular device attached to the desktop machine … and the same negative result I got also with the laptop computer.

3. temperhum (https://github.com/nomis/temperhum)

After unpacking .zip archive (downloaded from the website), the command make in the top-level source directory produced only a html version of the readme file, so I went to /src directory and rerun make from there:

root@localhost:/usr/local/src/temperhum-master# cd src 
root@localhost:/usr/local/src/temperhum-master/src# make 
cc -Wall -Wextra -Wshadow -D_POSIX_C_SOURCE=200112L -D_ISOC99_SOURCE -D_SVID_SOURCE -O2 -DDEBUG -c -o comms.o comms.c 
cc -Wall -Wextra -Wshadow -D_POSIX_C_SOURCE=200112L -D_ISOC99_SOURCE -D_SVID_SOURCE -O2 -DDEBUG -c -o readings.o readings.c 
cc -Wall -Wextra -Wshadow -D_POSIX_C_SOURCE=200112L -D_ISOC99_SOURCE -D_SVID_SOURCE -O2 -DDEBUG -c -o temperhum.o temperhum.c 
temperhum.c:22:17: fatal error: rrd.h: No such file or directory 
compilation terminated. 
make: *** [temperhum.o] Error 1 
root@localhost:/usr/local/src/temperhum-master/src# 

(Error related to missing rrd.h was probably caused by some software dependencies in desktop installation of Linux.)

Laptop installation:

root@localhost:/usr/local/src/temperhum-master# cd src 
root@localhost:/usr/local/src/temperhum-master/src# make 
cc -Wall -Wextra -Wshadow -D_POSIX_C_SOURCE=200112L -D_ISOC99_SOURCE -D_SVID_SOURCE -O2 -DDEBUG -c -o comms.o comms.c 
cc -Wall -Wextra -Wshadow -D_POSIX_C_SOURCE=200112L -D_ISOC99_SOURCE -D_SVID_SOURCE -O2 -DDEBUG -c -o readings.o readings.c 
cc -Wall -Wextra -Wshadow -D_POSIX_C_SOURCE=200112L -D_ISOC99_SOURCE -D_SVID_SOURCE -O2 -DDEBUG -c -o temperhum.o temperhum.c 
cc -Wall -Wextra -Wshadow -D_POSIX_C_SOURCE=200112L -D_ISOC99_SOURCE -D_SVID_SOURCE -O2 -DDEBUG -o temperhum comms.o readings.o temperhum.o -lm -lrt -lrrd 
cc -Wall -Wextra -Wshadow -D_POSIX_C_SOURCE=200112L -D_ISOC99_SOURCE -D_SVID_SOURCE -O2 -DDEBUG -c -o eeprom_dump.o eeprom_dump.c 
cc -Wall -Wextra -Wshadow -D_POSIX_C_SOURCE=200112L -D_ISOC99_SOURCE -D_SVID_SOURCE -O2 -DDEBUG -o eeprom_dump comms.o eeprom_dump.o -lrt 
cc -Wall -Wextra -Wshadow -D_POSIX_C_SOURCE=200112L -D_ISOC99_SOURCE -D_SVID_SOURCE -O2 -DDEBUG    test.c   -o test 
root@localhost:/usr/local/src/temperhum-master/src# 

… as shown, no visible complaints in laptop installation …

Now going to test the situation, as described in README.html …

root@localhost:/usr/local/src/temperhum-master/src# ls -1 /sys/bus/usb/devices/*/ttyUSB* -d|cut -d / -f 6|cut -d : -f 1 
ls: cannot access /sys/bus/usb/devices/*/ttyUSB*: No such file or directory 
root@localhost:/usr/local/src/temperhum-master/src# 

… as seen above, the second command failed to find USB device...

4. temper-python (https://github.com/padelt/temper-python)

root@localhost:/usr/local/src/temper-python-master# python3 setup.py install 
running install 
Checking .pth file support in /usr/local/lib/python3.2/dist-packages/ 
/usr/bin/python3 -E -c pass 
TEST PASSED: /usr/local/lib/python3.2/dist-packages/ appears to support .pth files 
running bdist_egg 
running egg_info 
creating temperusb.egg-info 
writing requirements to temperusb.egg-info/requires.txt 
writing temperusb.egg-info/PKG-INFO 
writing top-level names to temperusb.egg-info/top_level.txt 
writing dependency_links to temperusb.egg-info/dependency_links.txt 
writing entry points to temperusb.egg-info/entry_points.txt 
writing manifest file 'temperusb.egg-info/SOURCES.txt' 
reading manifest file 'temperusb.egg-info/SOURCES.txt' 
reading manifest template 'MANIFEST.in' 
writing manifest file 'temperusb.egg-info/SOURCES.txt' 
installing library code to build/bdist.linux-i686/egg 
running install_lib 
running build_py 
creating build 
creating build/lib 
creating build/lib/temperusb 
copying temperusb/snmp.py -> build/lib/temperusb 
copying temperusb/cli.py -> build/lib/temperusb 
copying temperusb/temper.py -> build/lib/temperusb 
copying temperusb/__init__.py -> build/lib/temperusb 
creating build/bdist.linux-i686 
creating build/bdist.linux-i686/egg 
creating build/bdist.linux-i686/egg/temperusb 
copying build/lib/temperusb/snmp.py -> build/bdist.linux-i686/egg/temperusb 
copying build/lib/temperusb/cli.py -> build/bdist.linux-i686/egg/temperusb 
copying build/lib/temperusb/temper.py -> build/bdist.linux-i686/egg/temperusb 
copying build/lib/temperusb/__init__.py -> build/bdist.linux-i686/egg/temperusb 
byte-compiling build/bdist.linux-i686/egg/temperusb/snmp.py to snmp.cpython-32.pyc 
byte-compiling build/bdist.linux-i686/egg/temperusb/cli.py to cli.cpython-32.pyc 
byte-compiling build/bdist.linux-i686/egg/temperusb/temper.py to temper.cpython-32.pyc 
byte-compiling build/bdist.linux-i686/egg/temperusb/__init__.py to __init__.cpython-32.pyc 
creating build/bdist.linux-i686/egg/EGG-INFO 
copying temperusb.egg-info/PKG-INFO -> build/bdist.linux-i686/egg/EGG-INFO 
copying temperusb.egg-info/SOURCES.txt -> build/bdist.linux-i686/egg/EGG-INFO 
copying temperusb.egg-info/dependency_links.txt -> build/bdist.linux-i686/egg/EGG-INFO 
copying temperusb.egg-info/entry_points.txt -> build/bdist.linux-i686/egg/EGG-INFO 
copying temperusb.egg-info/requires.txt -> build/bdist.linux-i686/egg/EGG-INFO 
copying temperusb.egg-info/top_level.txt -> build/bdist.linux-i686/egg/EGG-INFO 
zip_safe flag not set; analyzing archive contents... 
creating dist 
creating 'dist/temperusb-1.5.3-py3.2.egg' and adding 'build/bdist.linux-i686/egg' to it 
removing 'build/bdist.linux-i686/egg' (and everything under it) 
Processing temperusb-1.5.3-py3.2.egg 
creating /usr/local/lib/python3.2/dist-packages/temperusb-1.5.3-py3.2.egg 
Extracting temperusb-1.5.3-py3.2.egg to /usr/local/lib/python3.2/dist-packages 
Adding temperusb 1.5.3 to easy-install.pth file 
Installing temper-poll script to /usr/local/bin 
Installing temper-snmp script to /usr/local/bin 

Installed /usr/local/lib/python3.2/dist-packages/temperusb-1.5.3-py3.2.egg 
Processing dependencies for temperusb==1.5.3 
Searching for pyusb>=1.0.0rc1 
Reading http://pypi.python.org/simple/pyusb/ 
Download error on http://pypi.python.org/simple/pyusb/: [Errno -2] Name or service not known -- Some packages may not be found! 
Reading http://pypi.python.org/simple/pyusb/ 
Download error on http://pypi.python.org/simple/pyusb/: [Errno -2] Name or service not known -- Some packages may not be found! 
Couldn't find index page for 'pyusb' (maybe misspelled?) 
Scanning index of all packages (this may take a while) 
Reading http://pypi.python.org/simple/ 
Download error on http://pypi.python.org/simple/: [Errno -2] Name or service not known -- Some packages may not be found! 
No local packages or download links found for pyusb>=1.0.0rc1 
error: Could not find suitable distribution for Requirement.parse('pyusb>=1.0.0rc1') 
root@localhost:/usr/local/src/temper-python-master# 

As seen above, the installation was performed partially: There appeared two new executables in /usr/local/bin directory: temper-poll and temper-snmp. However they did not work properly because I executed the installation off-line (while not connected to the Internet), so the system couldn't download the last requirements. For example, temper-poll returned some errors:

root@localhost:/home/misko# temper-poll 
Traceback (most recent call last): 
  File "/usr/local/bin/temper-poll", line 5, in
    from pkg_resources import load_entry_point 
  File "/usr/lib/python3/dist-packages/pkg_resources.py", line 2708, in  
    working_set.require(__requires__) 
  File "/usr/lib/python3/dist-packages/pkg_resources.py", line 686, in require 
    needed = self.resolve(parse_requirements(requirements)) 
  File "/usr/lib/python3/dist-packages/pkg_resources.py", line 584, in resolve 
    raise DistributionNotFound(req) 
pkg_resources.DistributionNotFound: pyusb>=1.0.0rc1 
root@localhost:/home/misko#

To solve that issue, I executed the installation once again but this time while being on-line:

root@localhost:/home/misko# cd /usr/local/src 
root@localhost:/usr/local/src# cd temper-python-master 
root@localhost:/usr/local/src/temper-python-master# python3 setup.py install 
running install 
Checking .pth file support in /usr/local/lib/python3.2/dist-packages/ 
/usr/bin/python3 -E -c pass 
TEST PASSED: /usr/local/lib/python3.2/dist-packages/ appears to support .pth files 
running bdist_egg 
running egg_info 
writing requirements to temperusb.egg-info/requires.txt 
writing temperusb.egg-info/PKG-INFO 
writing top-level names to temperusb.egg-info/top_level.txt 
writing dependency_links to temperusb.egg-info/dependency_links.txt 
writing entry points to temperusb.egg-info/entry_points.txt 
reading manifest file 'temperusb.egg-info/SOURCES.txt' 
reading manifest template 'MANIFEST.in' 
writing manifest file 'temperusb.egg-info/SOURCES.txt' 
installing library code to build/bdist.linux-i686/egg 
running install_lib 
running build_py 
creating build/bdist.linux-i686/egg 
creating build/bdist.linux-i686/egg/temperusb 
copying build/lib/temperusb/snmp.py -> build/bdist.linux-i686/egg/temperusb 
copying build/lib/temperusb/cli.py -> build/bdist.linux-i686/egg/temperusb 
copying build/lib/temperusb/temper.py -> build/bdist.linux-i686/egg/temperusb 
copying build/lib/temperusb/__init__.py -> build/bdist.linux-i686/egg/temperusb 
byte-compiling build/bdist.linux-i686/egg/temperusb/snmp.py to snmp.cpython-32.pyc 
byte-compiling build/bdist.linux-i686/egg/temperusb/cli.py to cli.cpython-32.pyc 
byte-compiling build/bdist.linux-i686/egg/temperusb/temper.py to temper.cpython-32.pyc 
byte-compiling build/bdist.linux-i686/egg/temperusb/__init__.py to __init__.cpython-32.pyc 
creating build/bdist.linux-i686/egg/EGG-INFO 
copying temperusb.egg-info/PKG-INFO -> build/bdist.linux-i686/egg/EGG-INFO 
copying temperusb.egg-info/SOURCES.txt -> build/bdist.linux-i686/egg/EGG-INFO 
copying temperusb.egg-info/dependency_links.txt -> build/bdist.linux-i686/egg/EGG-INFO 
copying temperusb.egg-info/entry_points.txt -> build/bdist.linux-i686/egg/EGG-INFO 
copying temperusb.egg-info/requires.txt -> build/bdist.linux-i686/egg/EGG-INFO 
copying temperusb.egg-info/top_level.txt -> build/bdist.linux-i686/egg/EGG-INFO 
zip_safe flag not set; analyzing archive contents... 
creating 'dist/temperusb-1.5.3-py3.2.egg' and adding 'build/bdist.linux-i686/egg' to it 
removing 'build/bdist.linux-i686/egg' (and everything under it) 
Processing temperusb-1.5.3-py3.2.egg 
removing '/usr/local/lib/python3.2/dist-packages/temperusb-1.5.3-py3.2.egg' (and everything under it) 
creating /usr/local/lib/python3.2/dist-packages/temperusb-1.5.3-py3.2.egg 
Extracting temperusb-1.5.3-py3.2.egg to /usr/local/lib/python3.2/dist-packages 
temperusb 1.5.3 is already the active version in easy-install.pth 
Installing temper-poll script to /usr/local/bin 
Installing temper-snmp script to /usr/local/bin 

Installed /usr/local/lib/python3.2/dist-packages/temperusb-1.5.3-py3.2.egg 
Processing dependencies for temperusb==1.5.3 
Searching for pyusb>=1.0.0rc1 
Reading http://pypi.python.org/simple/pyusb/ 
Best match: PyUSB 1.0.0 
Downloading https://pypi.python.org/packages/8a/19/66fb48a4905e472f5dfeda3a1bafac369fbf6d6fc5cf55b780864962652d/PyUSB-1.0.0.tar.gz#md5=c8a571bfdba778555156af3facaea6fc 
Processing PyUSB-1.0.0.tar.gz 
Running pyusb-1.0.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-jt71ie/pyusb-1.0.0/egg-dist-tmp-xgyv_b 
zip_safe flag not set; analyzing archive contents... 
Adding pyusb 1.0.0 to easy-install.pth file 

Installed /usr/local/lib/python3.2/dist-packages/pyusb-1.0.0-py3.2.egg 
Finished processing dependencies for temperusb==1.5.3 
root@localhost:/usr/local/src/temper-python-master# 

(As seen above, this time there was no error msg.)

Now to test of temper-poll executable:

root@localhost:/usr/local/src/temper-python-master# temper-poll 
Found 1 devices 
Device #0: 27.0°C 80.6°F 51.9%RH 
root@localhost:/usr/local/src/temper-python-master# temper-poll -p 
Found 1 devices 
Device #0 (bus 2 - port 1): 27.0°C 80.7°F 52.0%RH 
root@localhost:/usr/local/src/temper-python-master# 

As shown above, that one software package (temper-python) was useful, by means it   recognized the sensor attached and was capable to read the monitored values from it. What remained was to find a solution for the monitoring to work continually and repeat automatically again and again, say every 1 minute or so, and also the monitored values to be continually sent to a file, in a format that the amateur radio APRS client could understand as ‘weather’ information.

Nevertheless, having in mind that most of APRS client software expect a ‘weather station’ to be a real USB device, and that PCsensor’s TEMPerHUM temperature & humidity sensor is obviously not a real USB device (but rather a HID device), it seems rational to consider some alternative approaches for better connectivity to a computer, such as to insert some additional electronics in between the sensor itself and the USB port of a computer. Probably a Raspberry Pi (or similar) board might be a solution ...

Last update: January 23, 2018

4 Comments

Leave a Comment

Leave a Reply

* Name:
* Comment:
* E-mail: (Not Published)
Website: (Site url with http://)
Verification code: