Open Code SarmaLink USB Themperature sensor

 

SarmaLink compatible thermometers do not require any driver installation. Windows and Linux recognizes them as USB human interface device or HID and provide necessary API functions. The hardware is derived from a very nice DIY project with schematics and source at radiokot site and based on V-USB Driver from Objective Development. The original package provides host computer code in Delphi 7. Below you can find simple source for C# (.NET 2.0 on windows systems) and C/C++ for Linux (tested on Ubuntu 11). These can be used to integrate USB thermometers in a larger sensor network or your own software. You may need to adjust the ManufacturerString and ProductString to meet the PID, VID licensing conditions of Objective Development. Also unique SerialNumberString can be used to identify the sensor if you have multiple devices connected to the same computer.
C# source was written in Microsoft Visual C# 2008 express edition SingleTerm_20120527_src.zip.
Tested on XP 32bit and probably works in W7 and Vista or even W2k with .NET installed
And binary windows executable can be downloaded here SingleTerm_20120527_bin.zip.
It produces result similar to this (with two USB thermometers connected)

=========================== FOUND HID DEVICE ===========================
MemberIndex = 0
ProductID = 36
VendorID = 1008
ProductString = "HP Basic USB Keyboard"
ManufacturerString = "CHICONY"
SerialNumberString = "?"
=========================== FOUND HID DEVICE ===========================
MemberIndex = 1
ProductID = 49242
VendorID = 1133
ProductString = "USB Optical Mouse"
ManufacturerString = "Logitech"
SerialNumberString = "?"
=========================== FOUND HID DEVICE ===========================
MemberIndex = 2
ProductID = 1503
VendorID = 5824
ProductString = "HCDTER02"
ManufacturerString = "aberlabs.com"
SerialNumberString = "tr00220"
THERMOMETER IT IS
t = 30.875
=========================== FOUND HID DEVICE ===========================
MemberIndex = 3
ProductID = 1503
VendorID = 5824
ProductString = "HCDTER02"
ManufacturerString = "aberlabs.com"
SerialNumberString = "tr00237"
THERMOMETER IT IS
t = 25.4375

On Linux systems the same can be achieved using HIDAPI library from Signal 11.
Here is a modified archive with changes in hidtest/hidtest.cpp file to send commands to the thermometerhidapi_HCDTER02.tgz.
Note the differences in report byte array indexing.
In C# program
report[1] = 21;
HID.HidD_SetFeature(HidDeviceObject, report, REPORT_LEN);
in Hidapi the same is done by
buf[0] = 21;
res =  hid_send_feature_report(handle, buf,  REPORT_LEN);

The Linux version has been tested on Ubuntu 11 server but probably can be ported to less costly systems such asOpenWRT on WR703N.