OWFS Design
OWFS Features
OWFS Software
Examples & Usage
|
OWFS Device Names

-
Synopsis:
Each 1-wire device is uniquely named. The OWFS system allows
flexibility in naming scheme to ease integration with other software.
One of six naming schemes can be specified on the command line. In
addition, each element of the name is available as a file to allow
further customization.
-
1-wire names
-
Length
All 1-wire devices have a unique address laser-registered into the
chip. Dallas Semi guarntees that the address is unique. Although there
are theoretically 264 possible addresses, 8 bits are
reserved for a
check-sum (CRC8) and so are not independent. Also 8 bits correspond to
the chip type -- the family code. This leaves 248 -- ~1014
in each family.
-
Hexidecimal
OWFS, like most 1-wire software, uses hexidecimal notation for chip
addresses. This means each byte is 2 hex characters
0123456789ABCDEF -- uppercase.
-
Internal structure
| Family
code |
ID |
CRC8 |
8 bits
|
48 bits (unique
within family)
|
8 bits
|
-
Family Code
8 bit (1 byte or 2 Hex characters). Identifies the type of 1-wire
device. See the family code list for the
types. Family code 00 is recognized as an error.
-
ID
The middle 48 bits (6 byes or 12 hex characters). Guaranteed unique
within a family. A few types of chips have sequences of IDs reserved
for special manufacturing runs, but in general, there is no special
characteritics to the ID.
-
CRC
8 bit (1 byte or 2 hex characters) cyclic redundancy check-sum. It must
match the rest of the address and thus provides a check that the
address is correct.
OWFS handles the CRC transparently, checking that it is correct when
read from the bus before presenting it to you. The CRC does not have to
be included in a OWFS 1-wire device name. If it is included, it must be
correct.
-
OWFS formats
-
template for display
--format
f[.]i[[.]c]
where the elements are family id and crc.
Items in
[brackets] are optional.
Note that the format only applies to displayed 1-wire
addresses. Any of the six formats can be used as input since
there is no ambiguity.
The default display format is f.i
-
examples
for f in
fi f.i fic f.ic fi.c f.i.c ; \
do echo $f ; \
umount 1wire ; \
killall owfs ; \
/opt/owfs/bin/owfs --format $f -u 1wire ; \
ls -x 1wire ; \
echo ; \
done
|
fi
018660BE090000 10D11846000800
DS9490 stats_bus stats_cache
stats_directory stats_read
stats_write uncached
f.i
01.8660BE090000 10.D11846000800
DS9490 stats_bus stats_cache
stats_directory stats_read
stats_write uncached
fic
018660BE0900007E 10D11846000800D5
DS9490 stats_bus stats_cache
stats_directory
stats_read stats_write
uncached
f.ic
01.8660BE0900007E 10.D11846000800D5
DS9490 stats_bus stats_cache
stats_directory
stats_read
stats_write uncached
fi.c
018660BE090000.7E 10D11846000800.D5
DS9490 stats_bus stats_cache
stats_directory
stats_read
stats_write uncached
f.i.c
01.8660BE090000.7E 10.D11846000800.D5
DS9490 stats_bus stats_cache
stats_directory
stats_read
stats_write uncached
|
-
Name-related files
Parts of the 1-wire name can be extracted using file contents, as well.
This is a convenience in extracting address components without
extensive parsing magic.
There is a performance cost -- OWFS tests for the chip's existence
before returning it's name, even though the contents are computed. This
seems to better correspond with expectations.
-
address
full 64 bit address in hex
-
crc8
8 bit crc portion of address
-
family
8 bit family code
-
id
mid 48 bit portion of address
-
present
device presence
-
type
chip name corresponding to family code
|
# grep '.'
1wire/01*/*
1wire/01.8660BE090000.7E/address:018660BE0900007E
1wire/01.8660BE090000.7E/crc8:7E
1wire/01.8660BE090000.7E/family:01
1wire/01.8660BE090000.7E/id:8660BE090000
1wire/01.8660BE090000.7E/present:1
1wire/01.8660BE090000.7E/type:DS2401
|
-
Non-OWFS names
|