Skillnad mellan versioner av "OWFS with i2c support on Raspberry Pi (English version)"

Hoppa till navigeringHoppa till sök
(Ersätter sidans innehåll med 'This guide has moved to')
Rad 1: Rad 1:
This guide will help you to get [[OWFS]] working on [[Raspberry Pi]]'s i2c GPIO port.
This guide has moved to
{| align="right"
  | __TOC__
To get full OWFS support using the i2c bus the Raspberry Pi.
* [ Raspian Wheezy]
* [ OWFS] (Latest tested version is 2.9p1)
* [ Raspberry Pi]
* [ R-Pi i2c 1wire expansion module]
This guide is written based on a clean install of [ Raspbian Wheezy] (2013-05-25).
Make sure that the i2c-bus module is not included in the blacklist file.
sudo nano /etc/modprobe.d/raspi-blacklist.conf
Add "#" before
blacklist i2c-bcm2708
The row will look like this:
#blacklist i2c-bcm2708
Make sure that the i2c-dev module is included in /etc/modules
sudo nano /etc/modules
Add "i2c-dev" on it's own row in the file.
==Installation of OWFS==
First you'll have to install som neccecary and usefull packages.
sudo apt-get update
sudo apt-get install automake autoconf autotools-dev gcc-4.7 libtool libusb-dev libfuse-dev swig python2.7-dev tcl8.5-dev php5-dev i2c-tools
Answer Yes on any question during the install.
Download the latest version of OWFS (currently 2.8p20)
cd /usr/src
sudo wget  -O owfs-latest.tgz
Unpack OWFS
  sudo tar xzvf owfs-latest.tgz
Configure OWFS
cd owfs-2.8pXX
sudo ./configure
If everything goes as planned you'll get a result like this:
Current configuration:
    Deployment location: /opt/owfs
Compile-time options:
                  Caching is enabled
                      USB is DISABLED
                      I2C is enabled
                    HA7Net is enabled
                        W1 is enabled
            Multithreading is enabled
    Parallel port DS1410E is enabled
        TAI8570 barometer is enabled
              Thermocouple is enabled
          Zeroconf/Bonjour is enabled
              Debug-output is enabled
                Profiling is DISABLED
Tracing memory allocation is DISABLED
1wire bus traffic reports is DISABLED
Module configuration:
                    owlib is enabled
                  owshell is enabled
                      owfs is enabled
                  owhttpd is enabled
                    owftpd is enabled
                  owserver is enabled
                owexternal is enabled
                    ownet is enabled
                  ownetlib is enabled
                    owtap is enabled
                    owmon is enabled
                    owcapi is enabled
                      swig is enabled
                    owperl is enabled
                    owphp is DISABLED
                  owpython is DISABLED
                    owtcl is enabled
Compile OWFS, it will take approx 30 minutes
sudo make
Install OWFS, it will take a couple of minutes
sudo make install
Create a mountpoint for the 1wire folder.
sudo mkdir /mnt/1wire
To make it possible to access the 1wire devices without root privileges you'll have to modify the FUSE settings.
Open the fuse configuration file:
sudo nano /etc/fuse.conf
Now you can start OWFS!
sudo /opt/owfs/bin/owfs --i2c=ALL:ALL --allow_other /mnt/1wire/
If you're using the USB adapter (DS9490R), just replace "--i2c=ALL:ALL" with "-u"
Make sure everything works as it should by checking the contents of the 1wire folder or by reading a sensor: (Change path according to your sensor id)
cat /mnt/1wire/10.F6877C010800/temperature
You should get the current temperature as result.
[[File:Owfs_ls_example.png|thumb|Example of how the output of "ls" in the 1wire folder can look like.]]
==Make sure OWFS is started automatically at boot==
Create the startup script in '''/etc/init.d/'''
cd /etc/init.d
sudo nano
Add the folowing to the file (remove the first space on each row):
# Provides:          start1wire
# Required-Start:    $local_fs $syslog
# Required-Stop:    $local_fs $syslog
# Default-Start:    2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Start OWFS at boot time
# Description:      Start OWFS at boot time
# Starts OWFS
/opt/owfs/bin/owfs --i2c=ALL:ALL --allow_other /mnt/1wire
If you're using the USB adapter (DS9490R), just replace "--i2c=ALL:ALL" with "-u"
To make the script executable, run the following command:
sudo chmod +x
Add the script to the default runlevel.
sudo update-rc.d defaults
Congratulations, if you've made it this far you've installed OWFS with i2c support and made sure that it starts automatically when the Raspberry Pi boots.
* [[OWFS_HowTo]]

Nuvarande version från 26 september 2014 kl. 20.21