Search code examples
arduinodebianbeagleboneblack1wire

ds18b20 One wire address format translate from arduino to debian


I recorded all the addresses of most of my ds18b20's with arduino, and they look different when plugged into Beaglebone Black running debian. Is there a way I can translate them to how they look on debian? I can't test them all since most are installed in my prototype..

arduino = '0x28, 0x9D, 0xB6, 0xAB, 0x05, 0x00, 0x00, 0x3E'

debian = '28-000005abb69d'


Solution

  • It's just converting the address.

    0x28 is the sensor type (Programmable Digital Thermometer).

    0x3E is the 1-Wire check-sum (slightly different than a normal CRC8).

    0x9D, 0xB6, 0xAB, 0x05, 0x00, 0x00 is the actual address in big-endian mode.

    As a note, the raw address is typically formatted as [CRC][Serial][Family Code], so it's strange that your Arduino is presenting it in a flipped format [Family Code][Serial][CRC], but not flipping the value within the serial attribute.