OWFS instalation on Ubuntu 6.06

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: , , ,

23 thoughts on “OWFS instalation on Ubuntu 6.06”

  1. I found the perl modules [owperl] were not in the @INC for perl using the ‘out of the box’ make install so had to add the following symbolic links:

    ln -s /opt/owfs/bin/OW.pm /usr/local/lib/perl/5.8.7/OW.pm
    ln -s /opt/owfs/local/lib/perl/5.8.7/auto/OW /usr/local/lib/perl/5.8.7/auto/OW

    I guess I could have moved them to the correct place rather than linking them, but tend to do ‘out of the box’ installs as much as possible.

  2. I’m having difficulty installing OWFS on 6.10. You mention that there are a few catches. Could you be more specific on any additional steps I should take?

  3. The two I have on my mind are:

    a) reinstall all packages mentioned in the first point (somehow upgrading Ubuntu to 6.10 didn’t do it automatically)
    b) get the newest OWFS source – the one mentioned in this article does not compile under Ubuntu 6.10 (at least it didn’t on mine)

  4. works fine with 7.04 Feisty Fawn

    i have only use a newer version (owfs-2.6p5.tar.gz)

    greetings

  5. Compiling and running works fine on my Ubuntu 7.04 as well. However, I have a DS9490R USB adapter, and I can’t quite figure out on which device to look for the 1-wire network. I have no /dev/ttyS*, and no /dev/ttyUSB* either. Only /dev/tty — /dev/ttyzf. Does anyone know which options I should pass to owfs to make it find my network?

  6. I have OWFS installed with ubuntu 7.1 ( or whatever is the newest as of 10/27 ).

    When I run OWFS -u -m /mnt/1-wire I see ‘stuff’ appear in that directory. However the device Id of the dir begins with 81. As far as I can tell, there is no 1-wire device with that device ID.

    If I unplug my DS9490R I see nothing. I umount the dir, plug the USB adapter back in, re-run owfs, and all I see is the 81. device. I have the 1-wire development kit plugged into the DS9490R so I should see a DS28E04S-100 at the other end of the 1-wire network.

    Also, just to do an ‘ls /mnt/1-wire’ , I must do it as root….why?

    What am I doing wrong?

    s

  7. Ok, I figured that one out.

    The eval kit has jumpers to enable the separate chips. Once I got those installed, I can see any chip I plug into either the tsoc socket or the 3-pin header.

    I still have the other problem where I cant see the dir unless I am root.

    Anyone?

    Stu

  8. For USB DS9490 on ubuntu 7.04, kernel 2.6.20, I appended these to /etc/modprobe.d/blacklist:
    blacklist wire
    blacklist ds2490

    to stop the kernel w1_master_driver from opening the device. w1_master_driver causes tons of stutters to all programs (I think because it tries to do way too much in a kernel call).

    A few posters wondered about which usb device to use. I just did “-u” on commandlines and ow.init(“u”) in python and it worked. I never had to name my device.

  9. There now appears to be apt-get source for OWFS for several flavors of Debian and Ubuntu. I am just about to try this, found discussion in Nabble:

    http://www.nabble.com/Ubuntu…I’ve-been-spoilt-with-the-NSLU2-packaging…help-!-td12696120.html

    There also appear to be repos for Gutsy, though it’s not mentioned in that post:

    deb http://ppa.launchpad.net/smurf/ubuntu gutsy main universe
    deb-src http://ppa.launchpad.net/smurf/ubuntu gutsy main universe

  10. When I type this command “/opt/owfs/bin/owfs /dev/ttyS0 /var/1-Wire/mnt” there is a problem.
    the screen shows” can’t find out libusb-0.1.4 directory in shared libraries
    Should I copy the libusb-0.1.4 in the /opt/owfs/lib/ ? or could you tell me what file I should include?
    My system is Ubuntu 7.10

  11. Update: also need to install package “make”
    used “sudo” for each command, ran “sudo make” and “sudo make install”

    also (as noted at http://owfs.org/index.php?page=ubuntu), need to:
    sudo chmod 4755 /bin/fusermount
    otherwise, the mounted directory has question marks for the owner, group, and permissions
    Note that thre mare be security concerns regarding making fusermount suid. However, the only change from the chmod was to add user execute permission. Before: -rwsr-xr–, after -rwsr-xr-x .

  12. On further testing, I am not sure that it is necessary to run the sudo chmod command. The mounted directory has question marks for the user, group, and permissions when ls -l from a regular user, but sudo ls -l shows the correct info. Thus, the root user can read the directory without problem.

  13. There is a problem with owfs-2.7p4 and owfs-2.7p3 on Ubuntu:

    I have an owfs network with a usb adapter connected to nine DS2409’s, with sensors on the main and aux limbs of the DS2409’s. I have been using this arrangement for many months under Fedora with owfs-2.7p2. I just upgraded to Ubuntu Server 8.04 and owfs-2.7p4.

    However, whenever I go to one of my DS2409’s aux limbs and issue an “ls”, there is no output until I open another window and do an ls of another limb; that “releases” the first “ls”, which then shows not only the content of the actual aux limb, but multiple echos of all of the DS2409’s (which are not even on that limb, as they are all at the top level of the 1-wire network).

    I tried several approaches to resolve this, including the module.d/blacklist suggestion above; nothing worked until I downgraded back to 2.7p2, which fixed the problem. I then tried 2.7p3, but the problem recurred. Once I was back to 2.7p2, I removed the blacklist entries, and I am not having any problems.

    Thus, this appears to be a problem introduced in 2.7p3 . Note that I am using owserver and having owfs (and owhttpd) access the 1-wire network through owserver.

    With owhttpd, showing that directory produces a never ending listing (continually growing until I close the browser window) showing first the contents of the actual aux limb, and then repeatedly showing all of the DS2409’s in sequence, over and over.

    The problem occurs with either owfs or owhttpd accessing the 1-wire network, so the problem is not with fuse or the fuse mounting code in owfs. It does not occur on all limbs of all of the DS2409’s; the one limb that always produces it (1F.E1C004000000/aux) has a DS18S20, three DS2438’s, and a DS18B20.

    If I do not use owserver, but rather use owfs to access the 1-wire network directly, the problem also occurs. Thus, the problem is not with owserver itself, but with the common code used to access the 1-wire network.

    Note that I am starting owserver with /opt/owfs/bin/owserver -u -F -p 4001 to access the usb network.

  14. Hi Thomasz

    I just want to let you Know, that i build the driver for a DS9490R with following your instruction from this page on my Fedora x86_64. Many thanks for sharing your experiance.

    :smile:
    Best regards

    Reini

Leave a Reply

Your email address will not be published. Required fields are marked *