Re: Digi Watchport/T temperature sensor as /dev/ttyU

From: O. Hartmann <ohartman_at_zedat.fu-berlin.de>
Date: Fri, 26 Aug 2016 19:52:56 +0200
Am Fri, 26 Aug 2016 15:53:55 +0200
Hans Petter Selasky <hps_at_selasky.org> schrieb:

> On 08/26/16 15:38, O. Hartmann wrote:
> > It is a USB interface PCB with an AT90USB162 microcontroler chip.
> > Attached to a FreeBSD 12-CURRENT system, it reports itself as a UHID device.
> > there is also a software package available - for Windows and Linux, but it
> > doesn't work for FreeBSD, the package compiles and produces a cmdline binary,
> > but it fails reading the sensor data - the uhid driver seems to be unloaded
> > during the call. I have no skills in writing low-level USB software, so my
> > explanation is slopy, sorry. But there is hope I can use this one.  
> 
> Hi,
> 
> Could you send a link to this Linux software?
> 
> It should work basically!
> 
> Is your libusb up-to-date?
> 
> You can trace USB activity using "usbdump -i usbusX -f Y -s 65536 -vvv".
> 
> Maybe some command failed.
> 
> Did you try "usbhidaction" to decode the data received?
> 
> --HPS
> 
> 
> _______________________________________________
> freebsd-current_at_freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "freebsd-current-unsubscribe_at_freebsd.org"

Hello,

I would already have, but the site was offline due to maintenance cycles this noon. It is
in German ;-)

The software can be downloaded via

http://www.led-genial.de/mediafiles//Sonstiges/TempSensorTester.zip

Please do not misunderstand me: I just did a dirty test and it worked half way, but never
got values from the temperature sensor.

Since the device is recognized by FreeBSD as a UHID device, I guess there is a much more
convenient and standardized way to look for the device and pick up data for, say ICINGA-2
or other measurements. The software provided works well on Linux. On FreeBSD, running the
binary as root, firt unloads the uhid kernel module. So I guess the procedure is
Linux'ish and needs to be rewritten for proper *BSD usage.

Anyway - this part is more bringing up my personal thoughts and intentions and not so
much related to the initial stuff I asked the list for - this PCB in question is much to
expensive for a simple temp sensor via 1-wire protocol, so I'm looking for something much
cheaper. There are offerings for very small Arduino PCBs with USB port and I2C or 1-wire
connectors for approx. 3 - 5 EUR. For a server-based USB attached DS18B20 sensor which
could be simply interrogated by some simple C code via tty/uhid or something high level
would be very nice. The digi Watchport provided this with Linux - the access was done via
Perl.

Looking for a small and autonomous sensor station I stumbled over a lot of useful Linux
stuff realized via Raspberry Pi. There is very little for FreeBSD and I hesitate buying a
nice RaspberryPi 3 B or ODROID-C2 for that purpose. For autonomous monitoring of a server
room we use very expensive (~300 EUR each) web based devices. It is a little box with a
DS18B20, I guess and fancy LEDs as well as a NIC. attached to the network, you can
configure the device and there is some rrdtool-like graphical output. 

I think, with the fancy framework of FreeBSD it should be possible to adapt NanoBSD with
small nginx or reduced Apache to perform the stuff ...

So, sorry for listening to my little-boy's dreaming

Kind regards,

Oliver

Received on Fri Aug 26 2016 - 15:53:04 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:07 UTC