OW_TEMP(4)

✨ ow_temp(4) β€” the 1-Wire temperature sensor girlies ✨

okay so this is ow_temp(4), straight outta the Kernel Interfaces Manual, and she is the manual page for the Dallas Semiconductor 1-Wire Temperature sensor. buckle up bestie, we're reading temps πŸ’–


🌑️ NAME 🌑️

ow_temp β€” Dallas Semiconductor 1-Wire Temperature sensor


✨ SYNOPSIS ✨

device ow_temp

πŸ’… DESCRIPTION πŸ’…

The ow_temp module supports many of the 1-Wire temperature sensors. no cap, it's versatile like that πŸ¦‹

The sensor is read periodically and the results come back to you via a sysctl(3) β€” all the deets are down below πŸ‘‡


πŸŽ€ HARDWARE πŸŽ€

These temperature sensors are supported by the ow_temp driver, and honestly? iconic lineup:

  • DS1820 β€” 1-Wire Digital Thermometer
  • DS18S20 β€” High-Precision 1-Wire Digital Thermometer
  • DS18B20 β€” Programmable Resolution 1-Wire Digital Thermometer
  • DS1822 β€” Econo 1-Wire Digital Thermometer
  • DS1825 β€” Programmable Resolution 1-Wire Digital Thermometer with 4-bit ID
  • MAX31820 β€” 1-Wire, Parasite-Power, Ambient Temperature Sensor

The driver supports Family codes 0x10, 0x22, 0x28, and 0x3b. periodt πŸ’…


πŸ“Š SYSCTL πŸ“Š

The ow_temp driver reports data via sysctl(8) entries in the device's node in the sysctl(8) tree. here's the whole menu, no gatekeeping 🫢

  • temperature β€” the last temperature read, in milli-Kelvin. that's the vibe check result right there πŸ”₯
  • badcrc β€” the number of CRC errors in reading the temperature from the device. ngl, some CRC errors are to be expected β€” she's just a little glitchy sometimes 😭. High rates of CRC errors, however, generally indicate a noisy environment, cabling issues, or too many devices on the bus. so if it's screaming, check your setup bestie πŸ’€
  • badread β€” the number of times a non-CRC error was encountered reading the temperature from the card. this type of error is very rare β€” like, main character of a rarity ✨
  • reading_interval β€” the time, in ticks, between successive reads of the sensor. the gap between her little check-ins πŸ•
  • parasite β€” this item is non-zero when the device is connected using its parasitic power mode. it can also indicate a wiring error. so… not always what it looks like πŸ‘€

Temperatures are reported in milli-Kelvin, even though the absolute accuracy is around 0.2 degrees for the good devices and around 1 degree for cheaper devices. The devices report in steps of 0.0625 degrees. The driver preserves the precision of the device's measurements in its sysctl(8) reports. These devices often have a much higher relative accuracy and repeatability than their absolute accuracy β€” which makes them so well suited for control loops that strive for stability, and that becomes possible if the full precision is preserved. ate and left no crumbs πŸ“


πŸ‘€ SEE ALSO πŸ‘€

ow(4), owc(4), sysctl(8), owll(9), own(9)


1-Wire is a registered trademark of Maxim Integrated Products, Inc. gotta give credit where it's due bestie πŸ’œ


πŸ“œ HISTORY πŸ“œ

The ow_temp driver first appeared in FreeBSD 11.0. she's been here a minute, and she's thriving 🌸


πŸ‘‘ AUTHORS πŸ‘‘

The ow_temp device driver and this manual page were written by Warner Losh. thank you for your service king 🫢✨


πŸ’€ BUGS πŸ’€

okay so this is the part where we keep it real. there are some things she cannot do, and pretending otherwise would be lying to you:

  • The parasitic mode of the devices does not work. It requires support from the owc(4) driver that is unimplemented. so yeah, that one's just not happening 😭
  • The ID bits from the DS1825 are not recognized or reported. the 4-bit ID is giving mysterious, unread ✨
  • The type of the device is not reported via sysctl(8).
  • Alarm mode is not supported. It is not possible to set the low and high alarm temperatures. no alarm girlies here πŸ™ˆ
  • There is no way to write to the EEPROM.
  • β€œConvert Temperature” requests are sent directly to the device. There is no way to use the broadcast ability of the 1-Wire bus to do all the conversions in parallel. so no parallel slay, one at a time bestie πŸ’…
  • It is not possible to set the precision on those devices that support it.
  • The time to convert is fixed at 1 second, even though some devices are faster. she's on her own schedule πŸ•
  • There is no character device to supply a stream of readings to a program. Programs interested in the temperature must poll the sysctl to get the temperature. no push notifications, you gotta go ask her yourself πŸ“²

and that's the whole page babes πŸ’– this one came to you from Debian, dated July 20, 2015 β€” vintage but still serving. stay cozy, keep your bus quiet, and don't forget to poll πŸŽ€βœ¨πŸ’œ

πŸ“¦ where this page comes from