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