Мой дом.

 

Пакет OWFS

Установка... Я сделал локальный репозиторий с версией OWFS 2.7p14-1.

 

Вот еще: http://moais.imag.fr/membres/vincent.danjean/deb.html

Далее:

apt-get install fuseowfs owfs


modprobe fuse                -  Завести фьюзы

owfs -u /mnt/1-wire             - Монтировать 1-wire
owfs --allow_other -u /mnt/1-wire    - или так.

ls -lah /mnt/1-wire             - посмотреть сеть

 

Запустить OWFS:

modprobe fuse
owfs --allow_other -u /mnt/1-wire


"Дернуть" ногой DS2408:

echo "0" > /mnt/1-wire/29.A15808000000/PIO.1
echo "1" > /mnt/1-wire/29.A15808000000/PIO.1

 

Посмотреть состояние линий:

more /mnt/1-wire/29.A15808000000/sensed.ALL
или
cat /mnt/1-wire/29.A15808000000/sensed.ALL


Посмотреть температуру:

cat /mnt/1-wire/28.74A93C020000/temperature
или
more /mnt/1-wire/28.74A93C020000/temperature

---------------------------------------------------------------------

Инструкция по установке OWFS на Debian squeeze

  http://archive.pfb.no/2010/04/01/owfs-on-debian-squeeze/

 

OWFS on Debian squeeze

NB! This is the new post on how to install OWFS on Debian 6.0 squeeze. For the current Debian 5.0 lenny version see here: OWFS on Debian 5.0 (lenny). Also, it may give useful tips if problems occur.

If you are using a kernel newer than 2.6.18, which Debian 6.0 is, libusb-0.1.12 must be used because usbdevfs/usbfs is no longer used. It displayed usb devices under /proc/bus/usb but the udev system is only linking usb devices to /dev/bus/usb.

Newer kernel versions does not have /proc/bus/usb/devices (because of a cleanup of the /proc file system). Because earlier versions of libusb only checks /dev/bus/usb if /proc/bus/usb does not exist, it would fail in most cases because /proc/bus/usb does exist but it is empty.
Since we are using libusb to access our 1-wire network, for the search for usb devices would fail if we does not have the correct libusb version installed.

Reference: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=336596

Installation
First we need to remove the modules that are loaded into the kernel. They do not work the way we want with OWFS.

:~$ sudo nano /etc/modprobe.d/blacklist

Add the following to the end of the file:

# 1-wire talks via libusb
blacklist ds9490r
blacklist ds2490
blacklist wire

Unload blacklisted modules manually, in case if they have been loaded already:

:~$ sudo modprobe -r ds9490r
:~$ sudo modprobe -r ds2490
:~$ sudo modprobe -r wire

Now we need to install some essential packages in order to build OWFS.

:~$ sudo aptitude install build-essential
:~$ sudo aptitude install automake autoconf autotools-dev \
gcc g++ libtool fuse-utils libfuse-dev \
swig python2.5-dev tcl8.4-dev php5-dev

Now we need to fetch the owfs package and the libusb package.

http://downloads.sourceforge.net/project/owfs/owfs/2.7p32/owfs-2.7p32.tar.gz?use_mirror=surfnet
wget http://downloads.sourceforge.net/project/libusb/libusb-0.1%20%28LEGACY%29/0.1.12/libusb-0.1.12.tar.gz?use_mirror=mesh

Updated versions can be found at http://sourceforge.net/projects/owfs/files/ and http://sourceforge.net/projects/libusb/files/.

:~$ tar -xvzf libusb-0.1.12.tar.gz
:~$ cd libusb-0.1.12
:~/libusb-0.1.12$ ./configure --without-x
:~/libusb-0.1.12$ make
:~/libusb-0.1.12$ sudo make install

Running:

libub-config --version

should now return 0.1.12

:~$ tar -xvzf owfs-2.7p32.tar.gz
:~$ cd owfs-2.7p32
:~/owfs-2.7p32$ ./configure --enable-debian
:~/owfs-2.7p32$ make
:~/owfs-2.7p32$ sudo make install
:~$ sudo pico /etc/udev/rules.d/56-owfs.rules

Paste the code below.

##########################################################
SUBSYSTEM!="usb_device", ACTION!="add", GOTO="owfs_rules_end"

# DS2490 1-Wire adapter
SYSFS{idVendor}=="04fa", SYSFS{idProduct}=="2490", MODE="0666", GROUP="owfs"

LABEL="owfs_rules_end"
##########################################################

Now we need to add the group that should have access to owfs, and add our own username to that group.
We careful to use the same group as shown in the code above. Second we need to create the place were we want to mount owfs.

:~$ sudo addgroup owfs
:~$ sudo sudo usermod -a -G owfs USERNAME
:~$ sudo mkdir /mnt/1wire
:~$ sudo /opt/owfs/bin/owfs -u --allow_other --mountpoint=/mnt/1wire/

-u is the command for using the usb interface.
Voila!

If you would like to mount the 1-wire network at startup, then simply add this script (owfs.tar.gz) to
/etc/init.d/.

:~$ sudo chmod +x /etc/init.d/owfs.sh
:~$ sudo update-rc.d owfs.sh defaults

If it is not able to load the USB device, simply add error_level to the command line.
This would probably give you more detailed information about what goes wrong in the mounting process.

:~$ sudo /opt/owfs/bin/owfs --error_level 6 --error_print 2 -u --allow_other --mountpoint=/mnt/1wire/



Сделать бесплатный сайт с uCoz