PLEASE NOTE: This article is obsolete or related to a discontinued product.

Dallas 1 wire device interfacing with owfs

This article explains how to install the owfs in the FOX board SDK to interface Dallas 1 wire devices

What is 1-wire ?

"1-Wire is a computer bus system designed by Dallas Semiconductor that provides low-speed data, signaling and power over a single wire. 1-Wire is similar in concept to I2C, but with lower data rates and a much lower cost (http://en.wikipedia.org/wiki/1-Wire)

1-Wire bus is a copyright of Dallas Semiconductor please access to 1-wire home page (http://www.maxim-ic.com/1-Wire.cfm) for more info.

What is owfs ?

Owfs is a method under linux to allow 1-wire devices to appear like files in a directory. You can then enter a command like "cat */temperature" to have all the temperatures sensors measure and print their data. For instance, the collection of temperature sensors above are all on one bus, individually addressable, and will reconfigure on the fly as items are added or removed.

Owfs is a project of Paul H. Alfille and The owfs Team please access to Owfs home page (http://owfs.sourceforge.net/) for more info.

Ho to install owfs in the FOX board SDK

  • Read Configure the Phrozen SDK to install the FOX Board SDK
  • Download tar-files from http://home.mag.cx/fox/source/ then:
    patch -p1 < /path/fox_owfs_diff.txt
    cp /path/packages-apps-owfs-R1_0_0.tar.gz distfiles/
    cp /path/packages-apps-owfs-R1_0_0.tar.gz.md5 distfiles/
    cp /path/apps-owfs-IR2_2_0-1.tar.gz distfiles/
    cp /path/apps-owfs-IR2_2_0-1.tar.gz.md5 distfiles/
    cp /path/apps-fuse-IR2_4_1-1.tar.gz distfiles/
    cp /path/apps-fuse-IR2_4_1-1.tar.gz.md5 distfiles/
    cp /path/apps-kmod-fuse-IR2_4_1-1.tar.gz distfiles/
    cp /path/apps-kmod-fuse-IR2_4_1-1.tar.gz.md5 distfiles/
    
  • Enable general->owfs, fuse, kmod-fuse and save config
    make menuconfig
    
  • Delete all old compiled owfs and fuse binaries
    rm -rf apps/owfs* apps/fuse* apps/kmod-fuse* packages/apps/owfs*
    ./configure
    make
    
  • Flash the FOX card with the generated image called "fimage". Read How to reflash a FOX Board
  • Start owserver, owhttpd and owfs with the script run-owfs
    run-owfs
    Using /lib/modules/2.4.31/fuse.o
    ls -l /tmp/1wire/
    
    drwxr-xr-x    1 root     root            1 Nov  7 10:59 10.061847000800
    drwxr-xr-x    1 root     root            1 Nov  7 10:59 10.1A9246000800
    drwxr-xr-x    1 root     root            1 Nov  7 10:59 10.233B40000800
    drwxr-xr-x    1 root     root            1 Nov  7 10:59 10.2BD346000800
    drwxr-xr-x    1 root     root            1 Nov  7 10:59 10.4D8746000800
    drwxr-xr-x    1 root     root            1 Nov  7 10:59 10.5D1947000800
    drwxr-xr-x    1 root     root            1 Nov  7 10:59 10.6D0150000800
    drwxr-xr-x    1 root     root            1 Nov  7 10:59 10.762047000800
    drwxr-xr-x    1 root     root            1 Nov  7 10:59 10.A22840000800
    drwxr-xr-x    1 root     root            1 Nov  7 10:59 10.B3E166000800
    drwxr-xr-x    1 root     root            1 Nov  7 10:59 10.E2C746000800
    drwxr-xr-x    1 root     root            1 Nov  7 10:59 10.E54347000800
    drwxr-xr-x    1 root     root            1 Nov  7 10:59 1F.7DC202000000
    drwxr-xr-x    1 root     root            1 Nov  7 10:59 FF.720200000100
    drwxr-xr-x    1 root     root            1 Jan  1  2000 bus.0
    drwxr-xr-x    1 root     root            1 Jan  1  2000 settings
    drwxr-xr-x    1 root     root            1 Jan  1  2000 statistics
    drwxr-xr-x    1 root     root            1 Jan  1  2000 structure
    drwxr-xr-x    1 root     root            1 Jan  1  2000 system
    drwxr-xr-x    1 root     root            1 Jan  1  2000 uncached
    
    cat /tmp/1wire/10.2BD346000800/temperature
       18.125
    
    

It should also be possible to visit the URL http://192.168.0.90:3001/ to see the devices through owhttpd which listens to port 3001.

Thanks to Christian Magnusson for the owsf porting on the FOX Board (http://home.mag.cx) for more info.