Here is small help and instruction howto install OWFS on new, out of the box Ubuntu 6.06 server edition.
1. Dependencies
First off all we need to take care of some needed packets:
comp# apt-get install \
automake \
autoconf \
autotools-dev \
gcc \
g++ \
libtool \
libusb-dev \
fuse-utils \
libfuse-dev \
swig \
python2.4-dev \
tcl8.4-dev \
php5-dev
Agree for all additional needed packages apt will want to install
2. OWFS
Thanks to having fuse libraries already instaled we can go directly to the final step. First download the sourse.
comp# cd /usr/src
comp# wget http://umn.dl.sourceforge.net/sourceforge/owfs/owfs-2.4p3.tar.gz
Then extaract the file
comp# tar zxpf owfs-2.4p3.tar.gz
Compile and install
comp# cd owfs-2.4p3
comp# ./configure
comp# make && make install
3. Mounting one wire file system
First make sure that fuse kernel module is loaded
comp# modprobe fuse
It good to put it in /etc/modules file to have it automatically loaded during every system startup.
Then create the directory where 1-Wire filesystem will be mounted.
comp# mkdir /var/1-Wire/mnt
Finally we can connect our sensors to that point. In this case 1-Wire hardware is connected to the COM1 (ttyS0).
comp# /opt/owfs/bin/owfs /dev/ttyS0 /var/1-Wire/mnt
Now check if there are files and directories representing our sensors structure:
comp# ls /var/1-Wire/mnt
09.CF9EC8010000
10.64502F000800
alarm
bus.0
simultaneous
statistics
structure
system
uncached
Looks like everything is ok. The 10.64502F000800 (and all xx.yyyyyyyyyyyy) directory represents device on our 1-Wire architecture. First two characters define device family (10 – temperature sensor) the 12 characters after dot represents unique device serial number. You can go into that directory and check more properties of that particular sensor:
comp:/var/1-Wire/mnt/10.64502F000800# ls
address
family
power
r_id
temphigh
trimblanket
crc8
id
present
r_locator
templow
trimvalid
die
locator
r_address
temperature
trim
type
For detailed description of all parameters visit OWFS web site. To make sure our system is working – one last check:
comp:/var/1-Wire/mnt/10.64502F000800# cat temperature
75.3125
Looks good. Now it’s time to run some data collection thing to make those thing more usefull.
Technorati Tags: OWFS, 1-Wire, sensors, 1-Wire architecture