Ci-dessous, les différences entre deux révisions de la page.
Prochaine révision | Révision précédente | ||
maison2:configuration_open_wrt:owfs [03/2012] – modification externe 127.0.0.1 | maison2:configuration_open_wrt:owfs [09/2013] (Version actuelle) – [TEST] 86.68.156.71 | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
- | ====== current status ====== | + | ====== current status |
* owcapi 2.6p8-4 -> | * owcapi 2.6p8-4 -> | ||
* owfs 2.6p8-4 -> | * owfs 2.6p8-4 -> | ||
Ligne 26: | Ligne 26: | ||
</ | </ | ||
+ | ===== 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 " | ||
+ | #0 a cause du boutonde sonnette et des capteurs aqua(niveau) | ||
+ | # cache for values that change on command | ||
+ | timeout_stable = 0 # seconds " | ||
+ | #0 a cause de la sonnette et des pompes aqua | ||
+ | # cache for directory lists (non-alarm) | ||
+ | timeout_directory = 60 # seconds " | ||
+ | # cache for 1-wire device location | ||
+ | timeout_presence = 60 # seconds " | ||
+ | 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 =/ | ||
+ | error_print = 0 # 0-mixed 1-syslog 2-stderr 3-suppressed | ||
+ | error_level = 9 # increasing noise | ||
+ | # | ||
+ | # Display | ||
+ | # format = f[.]i[[maison2: | ||
+ | format = f.i.c | ||
+ | # | ||
+ | # Cache | ||
+ | cache_size = 100000 # maximum cache size (in bytes) or 0 for no limit (default 0) # | ||
+ | |||
+ | |||
+ | |||
+ | File: / | ||
+ | #!/bin/sh | ||
+ | |||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | |||
+ | </ | ||
+ | ===== 1 wire error ===== | ||
+ | on ajoute un menu sous webif grace a script suivant (/ | ||
+ | <code bash> | ||
+ | # | ||
+ | <? | ||
+ | . / | ||
+ | header " | ||
+ | cat <<EOF | ||
+ | <h2>1 wire statistics</ | ||
+ | / | ||
+ | EOF | ||
+ | cd / | ||
+ | echo "< | ||
+ | tmp=$(grep | ||
+ | echo $tmp | ||
+ | |||
+ | cd / | ||
+ | echo "< | ||
+ | echo "< | ||
+ | echo "< | ||
+ | |||
+ | cd / | ||
+ | echo "< | ||
+ | echo "< | ||
+ | echo "< | ||
+ | |||
+ | cd / | ||
+ | echo "< | ||
+ | echo "< | ||
+ | echo "< | ||
+ | echo "< | ||
+ | echo "< | ||
+ | ?> | ||
+ | <? footer ?> | ||
+ | <!-- | ||
+ | ## | ||
+ | --> | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | fred@Xubuntu: | ||
+ | CRC8_errors: | ||
+ | CRC8_tries: | ||
+ | ne fonctionne pas avec 20 a la place de 2 .... | ||
+ | |||
+ | mieux : | ||
+ | fred@Xubuntu: | ||
+ | CRC8_errors: | ||
+ | CRC8_tries: | ||
+ | max_delay: | ||
+ | |||
+ | maintenant il faudrait substituer les retour chariot par des <BR> | ||
+ | |||
+ | </ | ||
+ | |||
+ | |||
+ | |||
+ | ====== TEST ====== | ||
+ | < | ||
+ | root@OpenWrt: | ||
+ | |||
+ | root@OpenWrt: | ||
+ | root@OpenWrt: | ||
+ | 1, | ||
+ | |||
+ | pour lire une entree: | ||
+ | root@WL500GP: | ||
+ | sensed passe a 1 quand l’entrée physique est a 5V | ||
+ | |||
+ | les led etant commandé en low side quand on a PIO.X=1 on a sensed.X=0 et inversement | ||
+ | |||
+ | </ | ||
===== test du lien serie ===== | ===== test du lien serie ===== | ||
< | < | ||
Ligne 109: | Ligne 228: | ||
</ | </ | ||
- | ===== 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 " | ||
- | #0 a cause du boutonde sonnette et des capteurs aqua(niveau) | ||
- | # cache for values that change on command | ||
- | timeout_stable = 0 # seconds " | ||
- | #0 a cause de la sonnette et des pompes aqua | ||
- | # cache for directory lists (non-alarm) | ||
- | timeout_directory = 60 # seconds " | ||
- | # cache for 1-wire device location | ||
- | timeout_presence = 60 # seconds " | ||
- | 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 =/ | ||
- | error_print = 0 # 0-mixed 1-syslog 2-stderr 3-suppressed | ||
- | error_level = 9 # increasing noise | ||
- | # | ||
- | # Display | ||
- | # format = f[.]i[[maison2: | ||
- | format = f.i.c | ||
- | # | ||
- | # Cache | ||
- | cache_size = 100000 # maximum cache size (in bytes) or 0 for no limit (default 0) # | ||
- | |||
- | |||
- | |||
- | File: / | ||
- | #!/bin/sh | ||
- | |||
- | / | ||
- | / | ||
- | / | ||
- | / | ||
- | |||
- | </ | ||
====== adresse des différents éléments 1 wire ====== | ====== adresse des différents éléments 1 wire ====== | ||
Ligne 189: | Ligne 260: | ||
</ | </ | ||
- | ====== | + | ====== |
- | < | + | |
- | root@OpenWrt: | + | |
- | + | ||
- | root@OpenWrt: | + | |
- | root@OpenWrt: | + | |
- | 1, | + | |
avec la configuration par défaut on ne détecte pas ou mal le réseau 1w complet de la maison. | avec la configuration par défaut on ne détecte pas ou mal le réseau 1w complet de la maison. | ||
Ligne 208: | Ligne 273: | ||
le réseau est visible et stable | le réseau est visible et stable | ||
+ | |||
+ | ===== modification owfs ===== | ||
+ | |||
+ | apres avoir installé le package owfs-2.6p8 de facon [[maison2: | ||
+ | * on place {{: | ||
+ | * on place le {{: | ||
+ | * sous ~/ | ||
+ | {{: | ||
+ | < | ||
+ | on modifie ~/ | ||
+ | on modifie ~/ | ||
+ | ~/ | ||
+ | wget http:// | ||
+ | wget http:// | ||
+ | ipkg install -force-overwrite libow_2.6p8-4FS2_mipsel.ipk | ||
</ | </ | ||
+ | |||
+ | ====== 1 Wire in C ====== | ||
+ | |||
+ | ===== utilisation de OWCAPI ===== | ||
+ | je n' | ||
+ | * {{: | ||
+ | * [[http:// | ||
+ | * [[http:// | ||
+ | |||
+ | ===== on passe par le system de fichier que crée OWFS ===== | ||
+ | |||
+ | * {{: | ||
+ | |||
+ | * [[http:// | ||
+ | |||