-
Notifications
You must be signed in to change notification settings - Fork 260
02 1WIRE
Geo edited this page Feb 7, 2026
·
32 revisions
This mode allows communication with devices using the 1-Wire protocol, such as iButtons, EEPROM or temperature sensors (e.g. DS18B20).
It supports basic scanning, reading, writing, and sniffing features.
Arguments in < > are required, while arguments in [ ] are optional.
| Command | Description |
|---|---|
scan |
Detects and lists all devices found on the 1-Wire bus with their ROM IDs |
ping |
Sends a reset pulse and checks for presence response from a device |
sniff |
Passively monitors the data line, detecting timing patterns (reset, presence, bits) |
read |
Reads both the ROM ID and scratchpad of a connected device |
write id [8 bytes] |
Programs a new ROM ID to a supported device, prompt for 8 bytes if not given |
write sp [8 bytes] |
Writes 8 bytes to the scratchpad memory (via 0x0F command), , prompt for 8 bytes if not given |
ibutton |
Open an interactive shell to copy, read and write iButtons (RW1990) |
eeprom |
Open an interactive shell to dump, read write, analyze and erase EEPROM (DS24/28) |
temp |
Reads and decodes the temperature from a connected DS18B20 sensor |
config |
Lets you change the data pin used for 1-Wire communication |
[0xAA r:8] ... |
Allows sending manual 1-Wire instructions with precise control over command flow |
The eeprom command provides an interactive environment to explore, manage, and erase 1-Wire EEPROM chips.
- 🔍 Probe EEPROM – Detects the connected 1-Wire EEPROM and identifies its model and size.
- 📊 Analyze EEPROM – Scans the contents for data summary.
- 📖 Read bytes – Reads a sequence of bytes starting at a given memory address.
- ✏️ Write bytes – Writes one or more bytes to a specific address, with automatic page handling.
- 🗃️ Dump EEPROM – Outputs the entire EEPROM contents in hex dump format.
- 💣 Erase EEPROM – Wipes the chip by writing 0x00 across all pages.
- 🚪 Exit Shell – Leaves the 1-Wire EEPROM shell and returns to the previous menu.
| Model | Capacity | Page Size | Family Code | CRC16 | Notes |
|---|---|---|---|---|---|
| DS2431 | 128 B | 8 B | 0x2D |
✅ | 1 Kbit – 4 pages of 8 bytes |
| DS2433 | 512 B | 32 B | 0x23 |
✅ | 4 Kbit – 16 pages of 32 bytes |
| DS28EC20 | 2560 B | 32 B | 0x43 |
✅ | 20 Kbit – 80 pages of 32 bytes |
- Only one device should be present on the 1-Wire bus during operations.
- Pull-up resistor is required on the DQ (IO) line.
-
- You can use
scanto discover devices like DS18B20 or iButtons. - The
readcommand shows the device's ID and scratchpad if supported. - The
write idandwrite spcommands expect 8 bytes in hex format (e.g.write id 0x01 0x02 0x03 0x04 0x05 0x0 0x07 0x08). - Without data provided, the
write id|spcommands will prompt for 8 bytes. - The
ibuttonimplementation follows the official Dallas 1-Wire protocol for ID programming, including the proper timing sequence and command structure. - Prefers USB Serial over WiFi web to copy ibuttons, the timing is critical and the web server could disturb the copy.
-
sniffis useful when passively monitoring a 1-Wire bus connected to another master device. It attempts to automatically detect known 1-Wire timing patterns, including reset pulses, presence responses, and bit-slots, to reconstruct readable transactions. -
ibuttonOperations on Rom ID for classic iButtons. Works with RW1990 tag (rewrittable) - The instruction syntax (
[0x... r:N]) allows precise control of low-level communication, including bit-level reads, delays, and raw hex sequences.
mode 1wire
scan
read
sniff
write id 0x1 0x2 0x3 0x4 0x5 0x6 0x7 0x8
write id # Prompt for 8 bytes: AA BB 01...
write sp
write sp 0xDE 0xCD 0xAA 0x4 0x5 0x6 0x7 0x8
temp
ibutton # open interactive shell
eeprom # open interactive shell
[0x33 r:8] # Send read cmd and read 8 bytes



⚠️ Voltage Warning: Devices should only operate at 3.3V or 5V.
Do not connect peripherals using other voltage levels — doing so may damage your ESP32.