ESP32 Bit Pirate home
  • 1-Wire
  • iButton
  • Serial CLI
  • 5 min

Recipe · Beginner · 1-Wire

How to read an iButton ID

A drawer had three Dallas-style keys and no labels. I needed the ROM ID from each one, not a new Arduino sketch that would be deleted ten minutes later.

1-Wire iButton token.
For iButton work, contact quality matters as much as the command.

Wiring View

iButton BP iButton data1-Wire Data GPIOiButton caseBP GNDData pull-up3.3V
Generated from the wiring summary: iButton to BP.
Step 1

Check the 1-Wire bus

Start in 1-Wire mode and run a basic scan. The first time you enter the mode, Bit Pirate asks for the data GPIO automatically. The scan tells you whether the tag is being seen before you enter the iButton shell.

Step 2

Read the iButton ID

The firmware has a dedicated ibutton shell. Open it from 1-Wire mode, then choose Read ID from the interactive menu and hold the tag steady until the ROM ID prints.

What the result means

Record all eight bytes

The first byte is the family code, the middle bytes are the serial value, and the last byte is the CRC. Keep the full ROM ID together; shortening it makes later comparisons easy to mess up.

Troubleshooting

If the shell reports CRC errors or the scan appears and disappears, suspect contact pressure first. Clean the iButton, shorten the wires, verify the pull-up, and repeat the read until the same ROM ID appears twice.

  • The reader cup is not pressing firmly on both iButton contacts.
  • The data line has no pull-up to 3.3V.
  • Long loose wires are adding enough noise to cause CRC errors.
  • More than one 1-Wire device is connected during the read.

iButton ID read FAQ

What does the iButton ROM ID contain?

A 1-Wire iButton ROM contains a family code, serial number and CRC byte. Reading it as a unit helps document the device without touching writable memory areas.

What makes an iButton ROM ID useful in the lab?

The ROM ID combines a family code, serial number and CRC, so it is a compact identifier for comparing keys, documenting tests and confirming that the same device is being read across repeated sessions.

Should I use the iButton shell for normal key work?

Yes. The iButton shell keeps Dallas ROM ID read and RW1990 lab-copy workflows separate from generic 1-Wire bytecode, which makes repeated tests safer and easier to document.

Go deeper