raspberry-pi1wire

How does 1-wire decide what address to use?


I've been following this simple tutorial to get a temperature reading from a raspberrypi, http://blog.vokiel.com/raspberry-pi-odczyt-temperatury-przez-nodejs/?lang=en

Under w1/devices, what I'm calling the address is the file where the value of the 1-wire bus is stored.

For example, the tutorial says

/sys/bus/w1/devices/28-00000249bf39 $ cat w1_slave 
c3 01 4b 46 7f ff 0d 10 2f : crc=2f YES
c3 01 4b 46 7f ff 0d 10 2f t=28187

Where the address is 28-00000249bf39. On my device, the address is 28-000004acb882. How are these addresses set? Is it possible to define your own?


Solution

  • As the docs says:

    Each Device has a Unique 64-Bit Serial Code Stored in an On-Board ROM

    So you can't set your own.