From owner-freebsd-usb@freebsd.org Mon Aug 29 08:15:49 2016 Return-Path: Delivered-To: freebsd-usb@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D61CBB77B13 for ; Mon, 29 Aug 2016 08:15:49 +0000 (UTC) (envelope-from anatoly@kazanfieldhockey.ru) Received: from kazanfieldhockey.ru (kazanfieldhockey.ru [78.138.152.250]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "kazanfieldhockey.ru", Issuer "kazanfieldhockey.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 6F8CF28C for ; Mon, 29 Aug 2016 08:15:48 +0000 (UTC) (envelope-from anatoly@kazanfieldhockey.ru) Received: from asd.localdomain (host-175-22.static.telecet.ru [87.117.175.22]) (authenticated bits=0) by kazanfieldhockey.ru (8.14.3/8.14.3) with ESMTP id u7T85UgM036131 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO) for ; Mon, 29 Aug 2016 11:05:35 +0300 (MSK) (envelope-from anatoly@kazanfieldhockey.ru) Date: Mon, 29 Aug 2016 11:09:39 +0300 From: Anatoly To: freebsd-usb@freebsd.org Subject: Re: Digi Watchport/T temperature sensor as /dev/ttyU Message-ID: <20160829110939.0db7bc6f@asd.localdomain> In-Reply-To: <20160826195256.67a63dbd.ohartman@zedat.fu-berlin.de> References: <20160722183556.2fc39fd7.ohartman@zedat.fu-berlin.de> <1469206374.84197.14.camel@freebsd.org> <20160723220430.34ce02fe.ohartman@zedat.fu-berlin.de> <1469306951.84197.31.camel@freebsd.org> <20160724080330.3a27e875.ohartman@zedat.fu-berlin.de> <20160724083859.4c0dd392@ernst.home> <20160724105134.184f0b7f.ohartman@zedat.fu-berlin.de> <1469379334.84197.40.camel@freebsd.org> <1469387555.84197.48.camel@freebsd.org> <20160826153842.586a559b@freyja.zeit4.iv.bundesimmobilien.de> <36ca2c4c-bf9d-ed12-0b14-a2afc861c5f7@selasky.org> <20160826195256.67a63dbd.ohartman@zedat.fu-berlin.de> X-Mailer: Claws Mail 3.7.5 (GTK+ 2.18.7; i386-portbld-freebsd7.3) Mime-Version: 1.0 Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: 8bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (kazanfieldhockey.ru [192.168.13.2]); Mon, 29 Aug 2016 11:05:35 +0300 (MSK) X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Aug 2016 08:15:49 -0000 В Fri, 26 Aug 2016 19:52:56 +0200 "O. Hartmann" пишет: > Am Fri, 26 Aug 2016 15:53:55 +0200 > Hans Petter Selasky 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@freebsd.org mailing list > > https://lists.freebsd.org/mailman/listinfo/freebsd-current > > To unsubscribe, send any mail to > > "freebsd-current-unsubscribe@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 By the way, it is possible to use RS-232 port lines for bit banging, so you can attach DS18(B)20 to RS-232 port with very simple adaptor (no MCU): https://github.com/bcl/digitemp Once I succefully tried to compile and run that software (DigiTemp v3.6.0) under FreeBSD 9.0, but never tested it with sensor yet.