xref: /freebsd/share/man/man4/ow_temp.4 (revision ae1f3df43466466a21c7da0df93ecb58a3e53d74)
1*ae1f3df4SWarner Losh.\"
2*ae1f3df4SWarner Losh.\" Copyright (c) 2015 M. Warner Losh
3*ae1f3df4SWarner Losh.\" All rights reserved.
4*ae1f3df4SWarner Losh.\"
5*ae1f3df4SWarner Losh.\" Redistribution and use in source and binary forms, with or without
6*ae1f3df4SWarner Losh.\" modification, are permitted provided that the following conditions
7*ae1f3df4SWarner Losh.\" are met:
8*ae1f3df4SWarner Losh.\" 1. Redistributions of source code must retain the above copyright
9*ae1f3df4SWarner Losh.\"    notice, this list of conditions and the following disclaimer.
10*ae1f3df4SWarner Losh.\" 2. The name of the author may not be used to endorse or promote products
11*ae1f3df4SWarner Losh.\"    derived from this software without specific prior written permission.
12*ae1f3df4SWarner Losh.\"
13*ae1f3df4SWarner Losh.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14*ae1f3df4SWarner Losh.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15*ae1f3df4SWarner Losh.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16*ae1f3df4SWarner Losh.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17*ae1f3df4SWarner Losh.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18*ae1f3df4SWarner Losh.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19*ae1f3df4SWarner Losh.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20*ae1f3df4SWarner Losh.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21*ae1f3df4SWarner Losh.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22*ae1f3df4SWarner Losh.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23*ae1f3df4SWarner Losh.\" SUCH DAMAGE.
24*ae1f3df4SWarner Losh.\"
25*ae1f3df4SWarner Losh.\" $FreeBSD$
26*ae1f3df4SWarner Losh.\"
27*ae1f3df4SWarner Losh.Dd July 20, 2015
28*ae1f3df4SWarner Losh.Dt OW_TEMP 4
29*ae1f3df4SWarner Losh.Os
30*ae1f3df4SWarner Losh.Sh NAME
31*ae1f3df4SWarner Losh.Nm ow_temp
32*ae1f3df4SWarner Losh.Nd Dallas Semiconductor 1-Wire Temperature sensor
33*ae1f3df4SWarner Losh.Sh SYNOPSIS
34*ae1f3df4SWarner Losh.Cd device ow_temp
35*ae1f3df4SWarner Losh.Sh DESCRIPTION
36*ae1f3df4SWarner LoshThe
37*ae1f3df4SWarner Losh.Nm
38*ae1f3df4SWarner Loshmodule supports many of the 1-Wire temperature sensors.
39*ae1f3df4SWarner Losh.Pp
40*ae1f3df4SWarner LoshThe sensor is read periodically and the results returned via a
41*ae1f3df4SWarner Losh.Xr sysctl 3
42*ae1f3df4SWarner Loshas described below.
43*ae1f3df4SWarner Losh.Sh HARDWARE
44*ae1f3df4SWarner LoshThese temperature sensors are supported by the
45*ae1f3df4SWarner Losh.Nm
46*ae1f3df4SWarner Loshdriver:
47*ae1f3df4SWarner Losh.Bl -tag -width MAX31820 -compact
48*ae1f3df4SWarner Losh.It DS1820
49*ae1f3df4SWarner Losh1-Wire Digital Thermometer
50*ae1f3df4SWarner Losh.It DS18S20
51*ae1f3df4SWarner LoshHigh-Precision 1-Wire Digital Thermometer
52*ae1f3df4SWarner Losh.It DS18B20
53*ae1f3df4SWarner LoshProgrammable Resolution 1-Wire Digital Thermometer
54*ae1f3df4SWarner Losh.It DS1822
55*ae1f3df4SWarner LoshEcono 1-Wire Digital Thermometer
56*ae1f3df4SWarner Losh.It DS1825
57*ae1f3df4SWarner LoshProgrammable Resolution 1-Wire Digital Thermometer with 4-bit ID
58*ae1f3df4SWarner Losh.It MAX31820
59*ae1f3df4SWarner Losh1-Wire, Parasite-Power, Ambient Temperature Sensor
60*ae1f3df4SWarner Losh.El
61*ae1f3df4SWarner Losh.Pp
62*ae1f3df4SWarner LoshThe driver supports Family codes 0x10, 0x22, 0x28, and 0x3b.
63*ae1f3df4SWarner Losh.Sh SYSCTL
64*ae1f3df4SWarner LoshThe
65*ae1f3df4SWarner Losh.Nm
66*ae1f3df4SWarner Loshdriver reports data via
67*ae1f3df4SWarner Losh.Xr sysctl 8
68*ae1f3df4SWarner Loshentries in the device's node in the
69*ae1f3df4SWarner Losh.Xr sysctl 8
70*ae1f3df4SWarner Loshtree:
71*ae1f3df4SWarner Losh.Bl -tag -width xxxxxxxxxx
72*ae1f3df4SWarner Losh.It temperature
73*ae1f3df4SWarner LoshThe last temperature read, in milli-Kelvin.
74*ae1f3df4SWarner Losh.It badcrc
75*ae1f3df4SWarner LoshThe number of CRC errors in reading the temperature form the
76*ae1f3df4SWarner Loshdevice.
77*ae1f3df4SWarner LoshSome CRC errors are to be expected.
78*ae1f3df4SWarner LoshHigh rates of CRC errors, however, generally indicate a noisy
79*ae1f3df4SWarner Loshenvironment, cabling issues, or too many devices on the bus.
80*ae1f3df4SWarner Losh.It badread
81*ae1f3df4SWarner LoshThe number of times a non-CRC error was encountered reading the temperature
82*ae1f3df4SWarner Loshfrom the card.
83*ae1f3df4SWarner LoshThis type of error is very rare.
84*ae1f3df4SWarner Losh.It reading_interval
85*ae1f3df4SWarner LoshThe time, in ticks, between successive reads of the sensor.
86*ae1f3df4SWarner Losh.It parasite
87*ae1f3df4SWarner LoshThis item is non-zero when the device is connected using its parasitic
88*ae1f3df4SWarner Loshpower mode.
89*ae1f3df4SWarner LoshIt can also indicate a wiring error.
90*ae1f3df4SWarner Losh.El
91*ae1f3df4SWarner Losh.Pp
92*ae1f3df4SWarner LoshTemperatures are reported in milli-Kelvin, even though the absolute
93*ae1f3df4SWarner Loshaccuracy is around 0.2 degrees for the good devices and around 1
94*ae1f3df4SWarner Loshdegree for cheaper devices.
95*ae1f3df4SWarner LoshThe devices report in steps of 0.0625 degrees.
96*ae1f3df4SWarner LoshThe driver preserves the precision of the device's measurements
97*ae1f3df4SWarner Loshin its
98*ae1f3df4SWarner Losh.Xr sysctl 8
99*ae1f3df4SWarner Loshreports.
100*ae1f3df4SWarner LoshThese devices often have a much higher relative accuracy and
101*ae1f3df4SWarner Loshrepeatability than their absolute accuracy.
102*ae1f3df4SWarner LoshThis makes them well suited for control loops that strive for
103*ae1f3df4SWarner Loshstability and become possible if the full precision is preserved.
104*ae1f3df4SWarner Losh.Sh SEE ALSO
105*ae1f3df4SWarner Losh.Xr ow 4 ,
106*ae1f3df4SWarner Losh.Xr owc 4 ,
107*ae1f3df4SWarner Losh.Xr sysctl 8 ,
108*ae1f3df4SWarner Losh.Xr owll 9 ,
109*ae1f3df4SWarner Losh.Xr own 9
110*ae1f3df4SWarner Losh.Sh LEGAL
111*ae1f3df4SWarner Losh.Tn 1-Wire
112*ae1f3df4SWarner Loshis a registered trademark of Maxim Integrated Products, Inc.
113*ae1f3df4SWarner Losh.Sh HISTORY
114*ae1f3df4SWarner LoshThe
115*ae1f3df4SWarner Losh.Nm
116*ae1f3df4SWarner Loshdriver first appeared in
117*ae1f3df4SWarner Losh.Fx 11.0 .
118*ae1f3df4SWarner Losh.Sh AUTHORS
119*ae1f3df4SWarner LoshThe
120*ae1f3df4SWarner Losh.Nm
121*ae1f3df4SWarner Loshdevice driver and this manual page were written by
122*ae1f3df4SWarner Losh.An Warner Losh .
123*ae1f3df4SWarner Losh.Sh BUGS
124*ae1f3df4SWarner LoshThe parasitic mode of the devices does not work.
125*ae1f3df4SWarner LoshIt requires support from the
126*ae1f3df4SWarner Losh.Xr owc 4
127*ae1f3df4SWarner Loshdriver that is unimplemented.
128*ae1f3df4SWarner Losh.Pp
129*ae1f3df4SWarner LoshThe ID bits from the
130*ae1f3df4SWarner Losh.Em DS1825
131*ae1f3df4SWarner Loshare not recognized or reported.
132*ae1f3df4SWarner Losh.Pp
133*ae1f3df4SWarner LoshThe type of the device is not reported via
134*ae1f3df4SWarner Losh.Xr sysctl 8 .
135*ae1f3df4SWarner Losh.Pp
136*ae1f3df4SWarner LoshAlarm mode is not supported.
137*ae1f3df4SWarner LoshIt is not possible to set the low and high alarm temperatures.
138*ae1f3df4SWarner Losh.Pp
139*ae1f3df4SWarner LoshThere is no way to write to the EEPROM.
140*ae1f3df4SWarner Losh.Pp
141*ae1f3df4SWarner Losh.Dq Convert Temperature
142*ae1f3df4SWarner Loshrequests are sent directly to the device.
143*ae1f3df4SWarner LoshThere is no way to use the broadcast ability of the 1-Wire bus to do
144*ae1f3df4SWarner Loshall the conversions in parallel.
145*ae1f3df4SWarner Losh.Pp
146*ae1f3df4SWarner LoshIt is not possible to set the precision on those devices that support
147*ae1f3df4SWarner Loshit.
148*ae1f3df4SWarner Losh.Pp
149*ae1f3df4SWarner LoshThe time to convert is fixed at 1 second, even though some devices are
150*ae1f3df4SWarner Loshfaster.
151*ae1f3df4SWarner Losh.Pp
152*ae1f3df4SWarner LoshThere is no character device to supply a stream of readings to a
153*ae1f3df4SWarner Loshprogram.
154*ae1f3df4SWarner LoshPrograms interested in the temperature must poll the sysctl to get the
155*ae1f3df4SWarner Loshtemperature.
156