kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
From: jim.cromie@gmail.com
To: Trevor Woerner <twoerner@gmail.com>
Cc: kernelnewbies <kernelnewbies@kernelnewbies.org>
Subject: Re: are 1-wire devices "discoverable"?
Date: Thu, 18 Mar 2021 19:14:19 -0600	[thread overview]
Message-ID: <CAJfuBxx0_+49UZA9DnsZHw7WeWi6VjXB6Uj7_EXA6zoJJ5vCew@mail.gmail.com> (raw)
In-Reply-To: <20210213185821.GA28820@localhost>


[-- Attachment #1.1: Type: text/plain, Size: 2017 bytes --]

On Sat, Feb 13, 2021 at 11:58 AM Trevor Woerner <twoerner@gmail.com> wrote:

> Hi,
>

> It's true that you do need a device tree overlay to tell the kernel that
> you
> want to use the 1-wire bus, and you have to tell the kernel which GPIO pin
> you
> want to use as the 1 wire, but after that, attaching DS18B20 devices to a
> running system works quite magically.[4]
>
> Each DS18B20 has a unique 64-bit number burned into it, the first 8 bits
> specify the device type (i.e. the DS18B20), the next 48 bits are a unique
> serial number, and the last 8 bits are a CRC of the previous 56 bits. Due
> to
> the inclusion of the 8-bit device type, when I plug a DS18B20 into my
> board,
> the kernel automatically creates a sysfs entry for it with a "temperature"
> file that I can read to obtain the temperature in Celcius.
>
>
so, this device looks discoverable on a bus,
once you know the bus is there.
thats the 1st distinction to make.
there are degrees/features.
Id also ask:
is that ID at a standard location ?
via some base transaction that all devices support ?

in my own house, I can find a switch in the dark.
I dont have Alexa listening to render help.





> I don't know if that qualifies as "discoverable"? It's certainly a lot more
> discoverable than I2C or SPI, although maybe not quite as discoverable as,
> say, PCI. Specifying the 1 wire is not discoverable, but plugging 1-wire
> devices into my board is maybe something that could be described as
> discoverable?
>
> Best regards,
>         Trevor
>
> [1] https://www.youtube.com/watch?v=a9CZ1Uk3OYQ
> [2]
> https://twoerner.blogspot.com/2020/12/temperature-readings-with-ds18b20-and.html
> [3]
> https://twoerner.blogspot.com/2021/01/sensing-temperature-with-raspberrypi.html
> [4]
> https://twoerner.blogspot.com/2020/12/multiple-ds18b20-temperature-probes.html
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies@kernelnewbies.org
> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>

[-- Attachment #1.2: Type: text/html, Size: 3536 bytes --]

[-- Attachment #2: Type: text/plain, Size: 170 bytes --]

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

      reply	other threads:[~2021-03-19  1:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-13 18:58 are 1-wire devices "discoverable"? Trevor Woerner
2021-03-19  1:14 ` jim.cromie [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAJfuBxx0_+49UZA9DnsZHw7WeWi6VjXB6Uj7_EXA6zoJJ5vCew@mail.gmail.com \
    --to=jim.cromie@gmail.com \
    --cc=kernelnewbies@kernelnewbies.org \
    --cc=twoerner@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).