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