Outils pour utilisateurs

Outils du site


maison2:configuration_open_wrt:owfs

Ceci est une ancienne révision du document !


current status sur kamikaze 7.09

  • owcapi 2.6p8-4 → à tester mais plus supporté ?
  • owfs 2.6p8-4 → ok testé “ls” correct + led
  • owlib 2.6p8-4
  • owshell 2.6p8-4 → à tester
  • owfs owlib 2.7p5-9 → ok testé “ls” correct + led
  • owfs owlib 2.7p12 → “ls” tres lent …

owfs-2.6p8.zip

install

Update the ipkg repository and install the packages
/# echo "src owfs http://owfs.sourceforge.net/openwrt/kamikaze/packages" >> /etc/ipkg.conf

ipkg update

on install fuse a partir du web site
fuse-utils-2-4	2.4.2-2	 FUSE (utilities)
Install	kmod-fuse-2-4	2.4.34+2.4.2-brcm-2	FUSE (kernel module)
Install	libfuse-2-4

mais après on télécharge par ftp owfs et compagnie pour avoir la release 2.6 (stable)
root@OpenWrt:/tmp# opkg install owlib_2.6p8-4_mipsel.ipk owfs_2.6p8-4_mipsel.ipk

test du lien serie

============================================================================
root@OpenWrt:/dev# cat /proc/tty/driver/serial
serinfo:1.0 driver:5.05c revision:2001-07-08
0: uart:16550A port:B8000300 irq:3 baud:114583 tx:241 rx:0 RTS|DTR
1: uart:16550A port:B8000400 irq:3 baud:9593 tx:15 rx:0 CTS|DSR|CD
============================================================================

owfs --error_level=9 --error_print=2 --foreground -d /dev/tts/1  /tmp/1wire/
CONNECT: fuse mount point: /tmp/1wire/
   CALL: PARSENAME path=[]
  DEBUG: fuse_mnt_opt=[(null)]
  DEBUG: fuse_open_opt=[(null)]
fusermount: failed to open /dev/misc/fuse: No such file or directory
  DEBUG: owfs: ow_exit(0)
   CALL: Starting Library cleanup
   CALL: Clear Cache
   CALL: Closing input devices
  DEBUG: FreeIn: busmode=1
  DEBUG: COM_close: flush
  DEBUG: COM_close: restore
  DEBUG: COM_close: close
   CALL: Closing outout devices
   CALL: Finished Library cleanup

What do I do if /dev/fuse does not exist?
    275 -----------------------------------------
    276 
    277 Maybe the FUSE module is not loaded. As root, try:
    278 
    279     modprobe fuse
    280 
    281 If nothing changes, as root run:
    282 
    283     mknod /dev/fuse c 10 229
    284 
    285 What do I do if you don't have access to /dev/fuse?
    286 ---------------------------------------------------
    287 
    288 As root run:
    289 
    290     chmod o+rw /dev/fuse


If you don't use udev, you may get this error message:
fusermount: failed to open /dev/fuse: No such device or address
Before loading the fuse kernel module, create the device node manually:
mknod -m 666 /dev/fuse c 10 229

strace owfs -d /dev/ttyS1 /mnt/1-wire/ 

rapport anum suite a cette commande

PIC      164066.349 Data=E3 C1
DS       164068.504 Data=CD
PIC      164325.832 Data • • • FC
PIC      164346.333 Data=C1
PIC      164380.423 Data=17 45 5B 0F 91
DS       164381.512 Data=16 44 5A 00 93
PIC      164396.368 Data=C5
DS       164398.528 Data=CD
===> OK

:/etc/config/owserver : activer la ligne wrt54g
run-owfs

test OWFS

owfs --error_level=9 --error_print=2 -d /dev/tts/1  /tmp/1wire/
CONNECT: fuse mount point: /tmp/1wire/
   CALL: PARSENAME path=[]
  DEBUG: fuse_mnt_opt=[(null)]
  DEBUG: fuse_open_opt=[(null)]
===> OK uniquement OWFS est lancé

par contre pas de rafraichisement periodique

creation d'un fichier de configuration owfs.conf : owfs -c owfs.conf

# Sources
device = /dev/tts/1
# owfs specific
mountpoint = /tmp/1wire/
# Temperature scales
Celsius
# Timeouts (all in seconds)
# cache for values that change on their own
timeout_volatile = 0 # seconds "volatile" values remain in cache
#0 a cause du boutonde sonnette et des capteurs aqua(niveau)
# cache for values that change on command
timeout_stable = 0 # seconds "stable" values remain in cache
#0 a cause de la sonnette et des pompes aqua
# cache for directory lists (non-alarm)
timeout_directory = 60 # seconds "directory" values remain in cache
# cache for 1-wire device location
timeout_presence = 60 # seconds "device presence" (which bus)
timeout_serial = 10 # seconds to wait for serial response
timeout_usb = 250 # seconds to wait for USB response
timeout_network = 250 # seconds to wait for tcp/ip response
timeout_ftp = 250 # seconds inactivity before closing ftp session
#
# Process control 
pid_file =/var/run/owfs.pid 
error_print = 0 # 0-mixed 1-syslog 2-stderr 3-suppressed 
error_level = 9 # increasing noise 
# 
# Display 
# format = f[.]i[[maison2:c# 1-wire address f amily i d code c rc 
format = f.i.c
# 
# Cache 
cache_size = 100000 # maximum cache size (in bytes) or 0 for no limit (default 0) # 



File: /usr/bin/run-owfs
#!/bin/sh

/etc/init.d/owserver start force
/etc/init.d/owfs start force
/etc/init.d/owhttpd start force
/etc/init.d/owftpd start force

adresse des différents éléments 1 wire

10.3E8702010800    /*DS18S20: 8 CH marron*/
1D.20B709000000  /* capteur de pluie*/
29.488000000000    /*fils pilotes 2408*/
10.B48FB7000800   /*DS18S20: salon */
28.309FC1000000   /*DS18B20: ext */
10.CC610F010800   /*DS18S20: 6 couloir */
28.37A1B2000000  /*DS18B20 sur carte RS232/1W*/
10.F455B7000800   /*DS18S20: garage*/
28.B6AADB000000 /*DS18B20: 7 CH pama*/
10.FD1309010800     /*DS18S20: 9 CH froide*/
28.F4C4DB000000   /*DS18B20: 5 CH lucile*/

28.37A1B2000000 /* température platine WL500Gp */
1D.20B709000000 /* cpt pluie
29.488000000000 /* 2408 fils pilotes ANCIEN*/
29.12CA01000000 /* 2408 fils pilotes */

29.BEC001000000 /* 2408 ctrl jardin */

10.3E8702010800  28.309FC1000000  29.488000000000  statistics
10.B48FB7000800  28.37A1B2000000  29.BEC001000000  structure
10.CC610F010800  28.B6AADB000000  alarm            system
10.F455B7000800  28.ECDEC1000000  bus.0
10.FD1309010800  28.EF63C7010000  settings
1D.20B709000000  28.F4C4DB000000  simultaneous

TEST

root@OpenWrt:~/1wire/05.A12C27000000# echo 1 >> PIO

root@OpenWrt:~/1wire/29.488000000000# echo 255 >> PIO.BYTE
root@OpenWrt:~/1wire/29.488000000000# cat PIO.ALL
1,1,1,1,1,1,1,1

avec la configuration par défaut on ne détecte pas ou mal le réseau 1w complet de la maison.
	// default PDSRC = 1.37Vus
	// default W1LT = 10us
	// default DSO/WORT = 8us

avec la configuration :(\owfs-2.6p8\module\owlib\src\c\ow_ds9097U.c)
        // PDSRC = 1.37Vus
        // W1LT = 11us ,PARMSET_Write11us
	// DSO/WORT = 10us,PARMSET_SampOff10us
le réseau est visible et stable 
maison2/configuration_open_wrt/owfs.1333575130.txt.gz · Dernière modification : 04/2012 de fred