Roberto Spadim | 1 Sep 2008 07:48
Picon

Re: 85C problem with DS18B20

many years ago.... i get this problem, i did this in php code:

read
if value = 85c, read again
then i get the right value

this worked only for 18?20 maybe a startup problem, but this workaround worked (read a 9bits first and after a 12bit maybe faster if you want 85c value, but if you don't want, only one 12bit value (!=85c) are faster than 2 reads)

bye

2008/8/30 Paul Alfille <paul.alfille <at> gmail.com>
Do you want to try this patch and see if it helps? Essentially we are filtering for 85C and retrying unpowered.
Index: module/owlib/src/c/ow_1820.c
===================================================================
RCS file: /cvsroot/owfs/owfs/module/owlib/src/c/ow_1820.c,v
retrieving revision 1.101
diff -B -b -w -i -U3 -r1.101 ow_1820.c
--- module/owlib/src/c/ow_1820.c    18 Jun 2008 15:05:44 -0000    1.101
+++ module/owlib/src/c/ow_1820.c    30 Aug 2008 18:41:15 -0000
<at> <at> -578,6 +578,7 <at> <at>
     BYTE pow;
     int res = Resolutions[resolution - 9].config;
     UINT delay = Resolutions[resolution - 9].delay;
+    UINT longdelay = delay * 1.5 ; // failsafe
     BYTE mask = Resolutions[resolution - 9].mask;
     int oldres;
     struct transaction_log tunpowered[] = {
<at> <at> -590,6 +591,12 <at> <at>
         TRXN_WRITE1(convert),
         TRXN_END,
     };
+    // failsafe
+    struct transaction_log tunpowered_long[] = {
+        TRXN_START,
+        {convert, convert, longdelay, trxn_power},
+        TRXN_END,
+    };
     //LEVEL_DATA("OW_22temp\n");
     /* powered? */
     if (OW_power(&pow, pn)) {
<at> <at> -614,6 +621,7 <at> <at>
     }
 
     /* Conversion */
+    // first time
     if (!pow) {                    // unpowered, deliver power, no communication allowed
         LEVEL_DEBUG("Unpowered temperature conversion -- %d msec\n", delay);
         if (BUS_transaction(tunpowered, pn)) {
<at> <at> -634,12 +642,35 <at> <at>
     if (OW_r_scratchpad(data, pn)) {
         return 1;
     }
-    //printf("Temperature Got bytes %.2X %.2X\n",data[0],data[1]) ;
+    if ( data[1]!=0x05 && data[0]!=0x50 ) { // not 85C
+        temp[0] = (_FLOAT) ((int16_t) ((data[1] << 8) | (data[0] & mask))) * .0625;
+        return 0;
+    }
+
+    // second time
+    LEVEL_DEBUG("Temp error. Try unpowered temperature conversion -- %d msec\n", delay);
+    if (BUS_transaction(tunpowered, pn)) {
+            return 1;
+    }
+    if (OW_r_scratchpad(data, pn)) {
+        return 1;
+    }
+    if ( data[1]!=0x05 && data[0]!=0x50 ) { // not 85C
+        temp[0] = (_FLOAT) ((int16_t) ((data[1] << 8) | (data[0] & mask))) * .0625;
+        return 0;
+    }
 
-    //*temp = .0625*(((char)data[1])<<8|data[0]) ;
-    // Torsten Godau <tg <at> solarlabs.de> found a problem with 9-bit resolution
+    // third and last time
+    LEVEL_DEBUG("Temp error. Try unpowered long temperature conversion -- %d msec\n", longdelay);
+    if (BUS_transaction(tunpowered_long, pn)) {
+            return 1;
+    }
+    if (OW_r_scratchpad(data, pn)) {
+        return 1;
+    }
     temp[0] = (_FLOAT) ((int16_t) ((data[1] << 8) | (data[0] & mask))) * .0625;
     return 0;
+
 }
 
 /* Limits Tindex=0 high 1=low */


On Sat, Aug 30, 2008 at 12:55 PM, Christof Egner <cegner <at> configo.de> wrote:
Hello,

I'm using several DS18B20 in powered mode connected to a DS9490R USB
adapter. OWFS version is 2.7p4 (I have tried today's CVS version, too).

The temperature is always showing 85C, which seems to be some kind of
error code. But reading the sensors with digitemp works.

I saw some older post regarding this topic, but I couldn't find a
general solution.

Is there a patch available? Any hints?


Regards,
Christof

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Owfs-developers mailing list
Owfs-developers <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers

E-mail verificado pelo Terra Anti-Spam.
Para classificar esta mensagem como spam ou não spam, clique aqui.
Verifique periodicamente a pasta Spam para garantir que apenas mensagens
indesejadas sejam classificadas como Spam.

Esta mensagem foi verificada pelo E-mail Protegido Terra.
Atualizado em 30/08/2008

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Owfs-developers mailing list
Owfs-developers <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Owfs-developers mailing list
Owfs-developers <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers
Paul Alfille | 1 Sep 2008 12:43
Picon

Re: 85C problem with DS18B20

Can you run with full logging (error_level=9) and see if it takes 2 or 3 attempts every time? I wonder if it's the attempts, or the code for powered reads that is the problem.

Paul

On Sun, Aug 31, 2008 at 6:42 AM, Christof Egner <cegner <at> configo.de> wrote:
Hello Paul,

thanks for your patch, it works great!


Best Regards
Christof

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Owfs-developers mailing list
Owfs-developers <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Owfs-developers mailing list
Owfs-developers <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers
Christof Egner | 1 Sep 2008 13:05
Picon
Favicon

Re: 85C problem with DS18B20

Hello Paul,

please see the log below.

Best Regards
Christof

CONNECT: fuse mount point: /mnt/
CONNECT: GetAddrInfo error Servname not supported for ai_socktype
CONNECT: Cannot open server at all
   CALL: PARSENAME path=[]
CONNECT: Adapter found: 002/002
DEFAULT: Opened USB DS9490 adapter at 002/002.
   DATA: DS9490_setup_adapter: done (ret=0)
  DEBUG: Start of directory path= device=00 00 00 00 00 00 00 00
  DEBUG: Selecting a path (and device) path= SN=00 00 00 00 00 00 00 00
last path=00 00 00 00 00 00 00 00
  DEBUG: Clearing root branch
   DATA: DS9490_reset
   DATA: DS9490_reset: ok
  DEBUG:   Transaction send = 0
  DEBUG:   Transaction end = 0
   DATA: DS9490_reset
   DATA: DS9490_reset: ok
  DEBUG: Index 0
  DEBUG: Got 16 bytes from USB search
  DEBUG: DS9490 directory gulp. Adding element 0:28 BB 60 7E 01 00 00 E6
  DEBUG: DS9490 directory gulp. Adding element 1:81 DF E1 2A 00 00 00 36
  DEBUG: DS9490_next_both SN found: 28 BB 60 7E 01 00 00 E6
  DEBUG: BUS_next return = 0 28 BB 60 7E 01 00 00 E6
  DEBUG: Selecting a path (and device) path= SN=00 00 00 00 00 00 00 00
last path=00 00 00 00 00 00 00 00
   DATA: DS9490_reset
   DATA: DS9490_reset: ok
  DEBUG: Index 1
  DEBUG: DS9490_next_both SN found: 81 DF E1 2A 00 00 00 36
  DEBUG: BUS_next return = 0 81 DF E1 2A 00 00 00 36
CONNECT: Good DS1421 tag found for 002/002
DEFAULT: Set DS9490 002/002 unique id to 81 DF E1 2A 00 00 00 36
  DEBUG: fuse_mnt_opt=[(null)]
  DEBUG: fuse_open_opt=[(null)]
pandora:~#
pandora:~#
pandora:~# umount /mnt/
pandora:~# /opt/owfs/bin/owfs -u all --error_level=9 --error_print 2
--foreground /mnt/
CONNECT: fuse mount point: /mnt/
CONNECT: GetAddrInfo error Servname not supported for ai_socktype
CONNECT: Cannot open server at all
   CALL: PARSENAME path=[]
CONNECT: Adapter found: 002/002
DEFAULT: Opened USB DS9490 adapter at 002/002.
   DATA: DS9490_setup_adapter: done (ret=0)
  DEBUG: Start of directory path= device=00 00 00 00 00 00 00 00
  DEBUG: Selecting a path (and device) path= SN=00 00 00 00 00 00 00 00
last path=00 00 00 00 00 00 00 00
  DEBUG: Clearing root branch
   DATA: DS9490_reset
   DATA: DS9490_reset: ok
  DEBUG:   Transaction send = 0
  DEBUG:   Transaction end = 0
   DATA: DS9490_reset
   DATA: DS9490_reset: ok
  DEBUG: Index 0
  DEBUG: Got 16 bytes from USB search
  DEBUG: DS9490 directory gulp. Adding element 0:28 BB 60 7E 01 00 00 E6
  DEBUG: DS9490 directory gulp. Adding element 1:81 DF E1 2A 00 00 00 36
  DEBUG: DS9490_next_both SN found: 28 BB 60 7E 01 00 00 E6
  DEBUG: BUS_next return = 0 28 BB 60 7E 01 00 00 E6
  DEBUG: Selecting a path (and device) path= SN=00 00 00 00 00 00 00 00
last path=00 00 00 00 00 00 00 00
   DATA: DS9490_reset
   DATA: DS9490_reset: ok
  DEBUG: Index 1
  DEBUG: DS9490_next_both SN found: 81 DF E1 2A 00 00 00 36
  DEBUG: BUS_next return = 0 81 DF E1 2A 00 00 00 36
CONNECT: Good DS1421 tag found for 002/002
DEFAULT: Set DS9490 002/002 unique id to 81 DF E1 2A 00 00 00 36
  DEBUG: fuse_mnt_opt=[(null)]
  DEBUG: fuse_open_opt=[(null)]
unique: 1, opcode: INIT (26), nodeid: 0, insize: 56
INIT: 7.9
flags=0x0000000b
max_readahead=0x00020000
   INIT: 7.8
   flags=0x00000001
   max_readahead=0x00020000
   max_write=0x00020000
   unique: 1, error: 0 (Success), outsize: 40

unique: 2, opcode: GETATTR (3), nodeid: 1, insize: 56
   CALL: FSTAT path=/
   CALL: PARSENAME path=[/]
   CALL: ATTRIBUTES path=/
  DEBUG: ParsedName_destroy /
   unique: 2, error: 0 (Success), outsize: 112
unique: 3, opcode: ACCESS (34), nodeid: 1, insize: 48
ACCESS / 01
   unique: 3, error: -38 (Function not implemented), outsize: 16
unique: 4, opcode: OPENDIR (27), nodeid: 1, insize: 48
   unique: 4, error: 0 (Success), outsize: 32
unique: 5, opcode: GETATTR (3), nodeid: 1, insize: 56
   CALL: FSTAT path=/
   CALL: PARSENAME path=[/]
   CALL: ATTRIBUTES path=/
  DEBUG: ParsedName_destroy /
   unique: 5, error: 0 (Success), outsize: 112
unique: 6, opcode: READDIR (28), nodeid: 1, insize: 80
   CALL: GETDIR path=/
   CALL: PARSENAME path=[/]
  DEBUG: In FS_dir(/)
   CALL: DIRECTORY path=/
  DEBUG: Cache_Get_Dir 00 00 00 00 00 00 00 00
   CALL: SERVER(1)DIR path=/ path_busless=/
  DEBUG: Client address not yet parsed
  DEBUG: Client address not yet parsed
  DEBUG: Get from cache sn 00 00 00 00 00 00 00 00 pointer=0x8717728
extension=0
  DEBUG: dir not found in cache
  DEBUG: Start of directory path=/ device=00 00 00 00 00 00 00 00
  DEBUG: Selecting a path (and device) path=/ SN=00 00 00 00 00 00 00 00
last path=00 00 00 00 00 00 00 00
   DATA: DS9490_reset
   DATA: DS9490_reset: ok
  DEBUG: Index 0
  DEBUG: Got 16 bytes from USB search
  DEBUG: DS9490 directory gulp. Adding element 0:28 BB 60 7E 01 00 00 E6
  DEBUG: DS9490 directory gulp. Adding element 1:81 DF E1 2A 00 00 00 36
  DEBUG: DS9490_next_both SN found: 28 BB 60 7E 01 00 00 E6
  DEBUG: BUS_next return = 0 28 BB 60 7E 01 00 00 E6
  DEBUG: Cache_Add_Device 28 BB 60 7E 01 00 00 E6 bus=0
  DEBUG: Add to cache sn 28 BB 60 7E 01 00 00 E6 pointer=(nil) index=-1
size=4
  DEBUG: Selecting a path (and device) path=/ SN=00 00 00 00 00 00 00 00
last path=00 00 00 00 00 00 00 00
   DATA: DS9490_reset
   DATA: DS9490_reset: ok
  DEBUG: Index 1
  DEBUG: DS9490_next_both SN found: 81 DF E1 2A 00 00 00 36
  DEBUG: BUS_next return = 0 81 DF E1 2A 00 00 00 36
  DEBUG: Cache_Add_Device 81 DF E1 2A 00 00 00 36 bus=0
  DEBUG: Add to cache sn 81 DF E1 2A 00 00 00 36 pointer=(nil) index=-1
size=4
  DEBUG: Selecting a path (and device) path=/ SN=00 00 00 00 00 00 00 00
last path=00 00 00 00 00 00 00 00
   DATA: DS9490_reset
   DATA: DS9490_reset: ok
  DEBUG: Index 2
  DEBUG: BUS_next return = -19 81 DF E1 2A 00 00 00 36
  DEBUG: Cache_Add_Dir 81 DF E1 2A 00 00 00 36 elements=2
  DEBUG: Add to cache sn 00 00 00 00 00 00 00 00 pointer=0x8717728
index=0 size=16
  DEBUG: FS_dir_both out ret=0
  DEBUG: ParsedName_destroy /
   unique: 6, error: 0 (Success), outsize: 472
unique: 7, opcode: READDIR (28), nodeid: 1, insize: 80
   unique: 7, error: 0 (Success), outsize: 16
unique: 8, opcode: RELEASEDIR (29), nodeid: 1, insize: 64
   unique: 8, error: 0 (Success), outsize: 16
unique: 9, opcode: OPENDIR (27), nodeid: 1, insize: 48
   unique: 9, error: 0 (Success), outsize: 32
unique: 10, opcode: GETATTR (3), nodeid: 1, insize: 56
   CALL: FSTAT path=/
   CALL: PARSENAME path=[/]
   CALL: ATTRIBUTES path=/
  DEBUG: ParsedName_destroy /
   unique: 10, error: 0 (Success), outsize: 112
unique: 11, opcode: READDIR (28), nodeid: 1, insize: 80
   CALL: GETDIR path=/
   CALL: PARSENAME path=[/]
  DEBUG: In FS_dir(/)
   CALL: DIRECTORY path=/
  DEBUG: Cache_Get_Dir 00 00 00 00 00 00 00 00
  DEBUG: Get from cache sn 00 00 00 00 00 00 00 00 pointer=0x8717728
extension=0
  DEBUG: dir found in cache
   CALL: SERVER(1)DIR path=/ path_busless=/
  DEBUG: Client address not yet parsed
  DEBUG: Client address not yet parsed
  DEBUG: FS_dir_both out ret=0
  DEBUG: ParsedName_destroy /
   unique: 11, error: 0 (Success), outsize: 472
unique: 12, opcode: READDIR (28), nodeid: 1, insize: 80
   unique: 12, error: 0 (Success), outsize: 16
unique: 13, opcode: RELEASEDIR (29), nodeid: 1, insize: 64
   unique: 13, error: 0 (Success), outsize: 16
unique: 14, opcode: LOOKUP (1), nodeid: 1, insize: 49
LOOKUP /uncached
   CALL: FSTAT path=/uncached
   CALL: PARSENAME path=[/uncached]
   CALL: ATTRIBUTES path=/uncached
  DEBUG: ParsedName_destroy /uncached
   NODEID: 2
   unique: 14, error: 0 (Success), outsize: 136
unique: 15, opcode: GETATTR (3), nodeid: 1, insize: 56
   CALL: FSTAT path=/
   CALL: PARSENAME path=[/]
   CALL: ATTRIBUTES path=/
  DEBUG: ParsedName_destroy /
   unique: 15, error: 0 (Success), outsize: 112
unique: 16, opcode: OPENDIR (27), nodeid: 2, insize: 48
   unique: 16, error: 0 (Success), outsize: 32
unique: 17, opcode: READDIR (28), nodeid: 2, insize: 80
   CALL: GETDIR path=/uncached
   CALL: PARSENAME path=[/uncached]
  DEBUG: In FS_dir(/uncached)
   CALL: DIRECTORY path=/uncached
   CALL: SERVER(1)DIR path=/uncached path_busless=/uncached
  DEBUG: Client address not yet parsed
  DEBUG: Client address not yet parsed
  DEBUG: Start of directory path=/uncached device=00 00 00 00 00 00 00 00
  DEBUG: Selecting a path (and device) path=/uncached SN=00 00 00 00 00
00 00 00 last path=00 00 00 00 00 00 00 00
   DATA: DS9490_reset
   DATA: DS9490_reset: ok
  DEBUG: Index 0
  DEBUG: Got 16 bytes from USB search
  DEBUG: DS9490 directory gulp. Adding element 0:28 BB 60 7E 01 00 00 E6
  DEBUG: DS9490 directory gulp. Adding element 1:81 DF E1 2A 00 00 00 36
  DEBUG: DS9490_next_both SN found: 28 BB 60 7E 01 00 00 E6
  DEBUG: BUS_next return = 0 28 BB 60 7E 01 00 00 E6
  DEBUG: Cache_Add_Device 28 BB 60 7E 01 00 00 E6 bus=0
  DEBUG: Add to cache sn 28 BB 60 7E 01 00 00 E6 pointer=(nil) index=-1
size=4
  DEBUG: Selecting a path (and device) path=/uncached SN=00 00 00 00 00
00 00 00 last path=00 00 00 00 00 00 00 00
   DATA: DS9490_reset
   DATA: DS9490_reset: ok
  DEBUG: Index 1
  DEBUG: DS9490_next_both SN found: 81 DF E1 2A 00 00 00 36
  DEBUG: BUS_next return = 0 81 DF E1 2A 00 00 00 36
  DEBUG: Cache_Add_Device 81 DF E1 2A 00 00 00 36 bus=0
  DEBUG: Add to cache sn 81 DF E1 2A 00 00 00 36 pointer=(nil) index=-1
size=4
  DEBUG: Selecting a path (and device) path=/uncached SN=00 00 00 00 00
00 00 00 last path=00 00 00 00 00 00 00 00
   DATA: DS9490_reset
   DATA: DS9490_reset: ok
  DEBUG: Index 2
  DEBUG: BUS_next return = -19 81 DF E1 2A 00 00 00 36
  DEBUG: Cache_Add_Dir 81 DF E1 2A 00 00 00 36 elements=2
  DEBUG: Add to cache sn 00 00 00 00 00 00 00 00 pointer=0x8717728
index=0 size=16
  DEBUG: FS_dir_both out ret=0
  DEBUG: ParsedName_destroy /uncached
   unique: 17, error: 0 (Success), outsize: 440
unique: 18, opcode: READDIR (28), nodeid: 2, insize: 80
   unique: 18, error: 0 (Success), outsize: 16
unique: 19, opcode: RELEASEDIR (29), nodeid: 2, insize: 64
   unique: 19, error: 0 (Success), outsize: 16
unique: 20, opcode: OPENDIR (27), nodeid: 2, insize: 48
   unique: 20, error: 0 (Success), outsize: 32
unique: 21, opcode: GETATTR (3), nodeid: 2, insize: 56
   CALL: FSTAT path=/uncached
   CALL: PARSENAME path=[/uncached]
   CALL: ATTRIBUTES path=/uncached
  DEBUG: ParsedName_destroy /uncached
   unique: 21, error: 0 (Success), outsize: 112
unique: 22, opcode: READDIR (28), nodeid: 2, insize: 80
   CALL: GETDIR path=/uncached
   CALL: PARSENAME path=[/uncached]
  DEBUG: In FS_dir(/uncached)
   CALL: DIRECTORY path=/uncached
DEFAULT: Bad Adapter adapter reconnected
   CALL: SERVER(1)DIR path=/uncached path_busless=/uncached
  DEBUG: Client address not yet parsed
  DEBUG: Client address not yet parsed
  DEBUG: Start of directory path=/uncached device=00 00 00 00 00 00 00 00
  DEBUG: Selecting a path (and device) path=/uncached SN=00 00 00 00 00
00 00 00 last path=00 00 00 00 00 00 00 00
   DATA: DS9490_reset
   DATA: DS9490_reset: ok
  DEBUG: Index 0
  DEBUG: Got 16 bytes from USB search
  DEBUG: DS9490 directory gulp. Adding element 0:28 BB 60 7E 01 00 00 E6
  DEBUG: DS9490 directory gulp. Adding element 1:81 DF E1 2A 00 00 00 36
  DEBUG: DS9490_next_both SN found: 28 BB 60 7E 01 00 00 E6
  DEBUG: BUS_next return = 0 28 BB 60 7E 01 00 00 E6
  DEBUG: Cache_Add_Device 28 BB 60 7E 01 00 00 E6 bus=0
  DEBUG: Add to cache sn 28 BB 60 7E 01 00 00 E6 pointer=(nil) index=-1
size=4
  DEBUG: Selecting a path (and device) path=/uncached SN=00 00 00 00 00
00 00 00 last path=00 00 00 00 00 00 00 00
   DATA: DS9490_reset
   DATA: DS9490_reset: ok
  DEBUG: Index 1
  DEBUG: DS9490_next_both SN found: 81 DF E1 2A 00 00 00 36
  DEBUG: BUS_next return = 0 81 DF E1 2A 00 00 00 36
  DEBUG: Cache_Add_Device 81 DF E1 2A 00 00 00 36 bus=0
  DEBUG: Add to cache sn 81 DF E1 2A 00 00 00 36 pointer=(nil) index=-1
size=4
  DEBUG: Selecting a path (and device) path=/uncached SN=00 00 00 00 00
00 00 00 last path=00 00 00 00 00 00 00 00
   DATA: DS9490_reset
   DATA: DS9490_reset: ok
  DEBUG: Index 2
  DEBUG: BUS_next return = -19 81 DF E1 2A 00 00 00 36
  DEBUG: Cache_Add_Dir 81 DF E1 2A 00 00 00 36 elements=2
  DEBUG: Add to cache sn 00 00 00 00 00 00 00 00 pointer=0x8717728
index=0 size=16
  DEBUG: FS_dir_both out ret=0
  DEBUG: ParsedName_destroy /uncached
   unique: 22, error: 0 (Success), outsize: 440
unique: 23, opcode: READDIR (28), nodeid: 2, insize: 80
   unique: 23, error: 0 (Success), outsize: 16
unique: 24, opcode: RELEASEDIR (29), nodeid: 2, insize: 64
   unique: 24, error: 0 (Success), outsize: 16
unique: 25, opcode: LOOKUP (1), nodeid: 2, insize: 56
LOOKUP /uncached/28.BB607E010000
   CALL: FSTAT path=/uncached/28.BB607E010000
   CALL: PARSENAME path=[/uncached/28.BB607E010000]
  DEBUG: Cache_Get_Device 28 BB 60 7E 01 00 00 E6
  DEBUG: Get from cache sn 28 BB 60 7E 01 00 00 E6 pointer=(nil)
index=-1 size=4
  DEBUG: value found in cache
   CALL: ATTRIBUTES path=/uncached/28.BB607E010000
  DEBUG: ParsedName_destroy /uncached/28.BB607E010000
   NODEID: 3
   unique: 25, error: 0 (Success), outsize: 136
unique: 26, opcode: GETATTR (3), nodeid: 1, insize: 56
   CALL: FSTAT path=/
   CALL: PARSENAME path=[/]
   CALL: ATTRIBUTES path=/
  DEBUG: ParsedName_destroy /
   unique: 26, error: 0 (Success), outsize: 112
unique: 27, opcode: LOOKUP (1), nodeid: 1, insize: 49
LOOKUP /uncached
   CALL: FSTAT path=/uncached
   CALL: PARSENAME path=[/uncached]
   CALL: ATTRIBUTES path=/uncached
  DEBUG: ParsedName_destroy /uncached
   NODEID: 2
   unique: 27, error: 0 (Success), outsize: 136
unique: 28, opcode: OPENDIR (27), nodeid: 3, insize: 48
   unique: 28, error: 0 (Success), outsize: 32
unique: 29, opcode: READDIR (28), nodeid: 3, insize: 80
   CALL: GETDIR path=/uncached/28.BB607E010000
   CALL: PARSENAME path=[/uncached/28.BB607E010000]
  DEBUG: Cache_Get_Device 28 BB 60 7E 01 00 00 E6
  DEBUG: Get from cache sn 28 BB 60 7E 01 00 00 E6 pointer=(nil)
index=-1 size=4
  DEBUG: value found in cache
  DEBUG: In FS_dir(/uncached/28.BB607E010000)
   CALL: DIRECTORY path=/uncached/28.BB607E010000
  DEBUG: FS_dir_both out ret=0
  DEBUG: ParsedName_destroy /uncached/28.BB607E010000
   unique: 29, error: 0 (Success), outsize: 888
unique: 30, opcode: READDIR (28), nodeid: 3, insize: 80
   unique: 30, error: 0 (Success), outsize: 16
unique: 31, opcode: RELEASEDIR (29), nodeid: 3, insize: 64
   unique: 31, error: 0 (Success), outsize: 16
unique: 32, opcode: OPENDIR (27), nodeid: 3, insize: 48
   unique: 32, error: 0 (Success), outsize: 32
unique: 33, opcode: GETATTR (3), nodeid: 3, insize: 56
   CALL: FSTAT path=/uncached/28.BB607E010000
   CALL: PARSENAME path=[/uncached/28.BB607E010000]
  DEBUG: Cache_Get_Device 28 BB 60 7E 01 00 00 E6
  DEBUG: Get from cache sn 28 BB 60 7E 01 00 00 E6 pointer=(nil)
index=-1 size=4
  DEBUG: value found in cache
   CALL: ATTRIBUTES path=/uncached/28.BB607E010000
  DEBUG: ParsedName_destroy /uncached/28.BB607E010000
   unique: 33, error: 0 (Success), outsize: 112
unique: 34, opcode: READDIR (28), nodeid: 3, insize: 80
   CALL: GETDIR path=/uncached/28.BB607E010000
   CALL: PARSENAME path=[/uncached/28.BB607E010000]
  DEBUG: Cache_Get_Device 28 BB 60 7E 01 00 00 E6
  DEBUG: Get from cache sn 28 BB 60 7E 01 00 00 E6 pointer=(nil)
index=-1 size=4
  DEBUG: value found in cache
  DEBUG: In FS_dir(/uncached/28.BB607E010000)
   CALL: DIRECTORY path=/uncached/28.BB607E010000
  DEBUG: FS_dir_both out ret=0
  DEBUG: ParsedName_destroy /uncached/28.BB607E010000
   unique: 34, error: 0 (Success), outsize: 888
unique: 35, opcode: READDIR (28), nodeid: 3, insize: 80
   unique: 35, error: 0 (Success), outsize: 16
unique: 36, opcode: RELEASEDIR (29), nodeid: 3, insize: 64
   unique: 36, error: 0 (Success), outsize: 16
unique: 37, opcode: OPENDIR (27), nodeid: 3, insize: 48
   unique: 37, error: 0 (Success), outsize: 32
unique: 38, opcode: GETATTR (3), nodeid: 3, insize: 56
   CALL: FSTAT path=/uncached/28.BB607E010000
   CALL: PARSENAME path=[/uncached/28.BB607E010000]
  DEBUG: Cache_Get_Device 28 BB 60 7E 01 00 00 E6
  DEBUG: Get from cache sn 28 BB 60 7E 01 00 00 E6 pointer=(nil)
index=-1 size=4
  DEBUG: value found in cache
   CALL: ATTRIBUTES path=/uncached/28.BB607E010000
  DEBUG: ParsedName_destroy /uncached/28.BB607E010000
   unique: 38, error: 0 (Success), outsize: 112
unique: 39, opcode: READDIR (28), nodeid: 3, insize: 80
   CALL: GETDIR path=/uncached/28.BB607E010000
   CALL: PARSENAME path=[/uncached/28.BB607E010000]
  DEBUG: Cache_Get_Device 28 BB 60 7E 01 00 00 E6
  DEBUG: Get from cache sn 28 BB 60 7E 01 00 00 E6 pointer=(nil)
index=-1 size=4
  DEBUG: value found in cache
  DEBUG: In FS_dir(/uncached/28.BB607E010000)
   CALL: DIRECTORY path=/uncached/28.BB607E010000
  DEBUG: FS_dir_both out ret=0
  DEBUG: ParsedName_destroy /uncached/28.BB607E010000
   unique: 39, error: 0 (Success), outsize: 888
unique: 40, opcode: READDIR (28), nodeid: 3, insize: 80
   unique: 40, error: 0 (Success), outsize: 16
unique: 41, opcode: RELEASEDIR (29), nodeid: 3, insize: 64
   unique: 41, error: 0 (Success), outsize: 16
unique: 42, opcode: LOOKUP (1), nodeid: 3, insize: 52
LOOKUP /uncached/28.BB607E010000/temperature
   CALL: FSTAT path=/uncached/28.BB607E010000/temperature
   CALL: PARSENAME path=[/uncached/28.BB607E010000/temperature]
  DEBUG: Cache_Get_Device 28 BB 60 7E 01 00 00 E6
  DEBUG: Get from cache sn 28 BB 60 7E 01 00 00 E6 pointer=(nil)
index=-1 size=4
  DEBUG: value found in cache
   CALL: ATTRIBUTES path=/uncached/28.BB607E010000/temperature
  DEBUG: ParsedName_destroy /uncached/28.BB607E010000/temperature
   NODEID: 4
   unique: 42, error: 0 (Success), outsize: 136
unique: 43, opcode: OPEN (14), nodeid: 4, insize: 48
   CALL: OPEN path=/uncached/28.BB607E010000/temperature
   unique: 43, error: 0 (Success), outsize: 32
OPEN[0] flags: 0x8000 /uncached/28.BB607E010000/temperature
unique: 44, opcode: READ (15), nodeid: 4, insize: 80
READ[0] 4096 bytes from 0
   CALL: READ path=/uncached/28.BB607E010000/temperature size=4096 offset=0
  DEBUG: FS_OWQ_create of /uncached/28.BB607E010000/temperature
   CALL: PARSENAME path=[/uncached/28.BB607E010000/temperature]
  DEBUG: Cache_Get_Device 28 BB 60 7E 01 00 00 E6
  DEBUG: Get from cache sn 28 BB 60 7E 01 00 00 E6 pointer=(nil)
index=-1 size=4
  DEBUG: value found in cache
  DEBUG: READ_POSTPARSE /uncached/28.BB607E010000/temperature
  DEBUG: READ_POSTPOSTPARSE /uncached/28.BB607E010000/temperature
  DEBUG: FS_r_given_bus
OWQ OneWireQuery structure of /uncached/28.BB607E010000/temperature
    OneWireQuery size=4096 offset=0, extension=0
Byte buffer OneWireQuery buffer, length=4096

<.T...T..P.r.P.r.........address......... <at> ...............crc8............`...............die.............................family..........................fasttemp........................id..............................locator.........................power...........
...............present.........H...............r_address...............h...............r_id............................r_locator...............................temperature.............................temperature10...........................temperature11...........0...............temperature12...........X...............temperature9............x...............temphigh........................templow.........................trim............................trimblanket.............................trimvalid...............(...............type............H...............................h........................................................................................................................................................................................T...T..X.r.X.r..................
 ..............................................................................................................................................................................................
................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
 ..............................................................................................................................................................................................
................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
 ..............................................................................................................................................................................................
................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
 .............................................................>
    OneWireQuery I=0 U=0 F=4.86854E-270 Y=0 D=Thu Jan  1 01:00:00 1970

--- OneWireQuery done
  DEBUG: Selecting a path (and device)
path=/uncached/28.BB607E010000/temperature SN=28 BB 60 7E 01 00 00 E6
last path=00 00 00 00 00 00 00 00
   DATA: DS9490_reset
   DATA: DS9490_reset: ok
  DEBUG:   Transaction select = 0
  DEBUG:   Transaction send = 0
  DEBUG:   Transaction readin = 0
  DEBUG:   Transaction end = 0
  DEBUG: Cache_Add_Internal 28 BB 60 7E 01 00 00 E6 size=1
  DEBUG: Add to cache sn 28 BB 60 7E 01 00 00 E6 pointer=0xb7f9a288
index=-2 size=1
  DEBUG: Cache_Get_Internal 28 BB 60 7E 01 00 00 E6 size=4
  DEBUG: Get from cache sn 28 BB 60 7E 01 00 00 E6 pointer=0xb7f9a284
index=-2 size=4
  DEBUG: value not found in cache
  DEBUG: Selecting a path (and device)
path=/uncached/28.BB607E010000/temperature SN=28 BB 60 7E 01 00 00 E6
last path=00 00 00 00 00 00 00 00
   DATA: DS9490_reset
   DATA: DS9490_reset: ok
  DEBUG:   Transaction select = 0
  DEBUG:   Transaction send = 0
  DEBUG:   Transaction readin = 0
  DEBUG:   Transaction CRC8 = 0
  DEBUG:   Transaction end = 0
  DEBUG: Unpowered temperature conversion -- 1000 msec
  DEBUG: Selecting a path (and device)
path=/uncached/28.BB607E010000/temperature SN=28 BB 60 7E 01 00 00 E6
last path=00 00 00 00 00 00 00 00
   DATA: DS9490_reset
   DATA: DS9490_reset: ok
  DEBUG:   Transaction select = 0
   DATA: DS9490_Powerbyte
   DATA: DS9490_HaltPulse
   DATA: DS9490_HaltPulse: loop
   DATA: DS9490_HaltPulse: ok
  DEBUG:   Transaction power (1000 usec) = 0
  DEBUG:   Transaction end = 0
  DEBUG: Selecting a path (and device)
path=/uncached/28.BB607E010000/temperature SN=28 BB 60 7E 01 00 00 E6
last path=00 00 00 00 00 00 00 00
   DATA: DS9490_reset
   DATA: DS9490_reset: ok
  DEBUG:   Transaction select = 0
  DEBUG:   Transaction send = 0
  DEBUG:   Transaction readin = 0
  DEBUG:   Transaction CRC8 = 0
  DEBUG:   Transaction end = 0
  DEBUG: Cache_Add 28 BB 60 7E 01 00 00 E6 size=8
  DEBUG: Add to cache sn 28 BB 60 7E 01 00 00 E6 pointer=0xb7f9a75c
index=0 size=8
  DEBUG: Cache_Add 28 BB 60 7E 01 00 00 E6 size=8
  DEBUG: Add to cache sn 28 BB 60 7E 01 00 00 E6 pointer=0xb7f9a6f0
index=0 size=8
  DEBUG: FS_r_given_bus FS_r_local return=0
Byte buffer Fowq_output_offset_and_size, length=12
   <     25.4375>
  DEBUG: FS_r_given_bus return 12
  DEBUG: READ_POSTPOSTPARSE: /uncached/28.BB607E010000/temperature return 12
  DEBUG: READ_POSTPARSE /uncached/28.BB607E010000/temperature return 12
  DEBUG: FS_OWQ_destroy of /uncached/28.BB607E010000/temperature
  DEBUG: ParsedName_destroy /uncached/28.BB607E010000/temperature
   READ[0] 12 bytes
   unique: 44, error: 0 (Success), outsize: 28
unique: 45, opcode: READ (15), nodeid: 4, insize: 80
READ[0] 4096 bytes from 12
   CALL: READ path=/uncached/28.BB607E010000/temperature size=4096 offset=12
  DEBUG: FS_OWQ_create of /uncached/28.BB607E010000/temperature
   CALL: PARSENAME path=[/uncached/28.BB607E010000/temperature]
  DEBUG: Cache_Get_Device 28 BB 60 7E 01 00 00 E6
  DEBUG: Get from cache sn 28 BB 60 7E 01 00 00 E6 pointer=(nil)
index=-1 size=4
  DEBUG: value found in cache
  DEBUG: READ_POSTPARSE /uncached/28.BB607E010000/temperature
  DEBUG: READ_POSTPOSTPARSE /uncached/28.BB607E010000/temperature
  DEBUG: FS_r_given_bus
OWQ OneWireQuery structure of /uncached/28.BB607E010000/temperature
    OneWireQuery size=4096 offset=12, extension=0
Byte buffer OneWireQuery buffer, length=4096

<.T...T..P.r.P.r.........address......... <at> ...............crc8............`...............die.............................family..........................fasttemp........................id..............................locator.........................power...........
...............present.........H...............r_address...............h...............r_id............................r_locator...............................temperature.............................temperature10...........................temperature11...........0...............temperature12...........X...............temperature9............x...............temphigh........................templow.........................trim............................trimblanket.............................trimvalid...............(...............type............H...............................h........................................................................................................................................................................................T...T..X.r.X.r..................
 ..............................................................................................................................................................................................
................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
 ..............................................................................................................................................................................................
................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
 ..............................................................................................................................................................................................
................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
 .............................................................>
    OneWireQuery I=0 U=0 F=-4.18148E-48 Y=0 D=Thu Jan  1 01:00:00 1970

--- OneWireQuery done
  DEBUG: FS_r_local: file_length=12 offset=12 size=4096
  DEBUG: FS_r_given_bus FS_r_local return=0
  DEBUG: FS_r_local: file_length=12 offset=12 size=4096
  DEBUG: FS_r_given_bus return 0
  DEBUG: READ_POSTPOSTPARSE: /uncached/28.BB607E010000/temperature return 0
  DEBUG: READ_POSTPARSE /uncached/28.BB607E010000/temperature return 0
  DEBUG: FS_OWQ_destroy of /uncached/28.BB607E010000/temperature
  DEBUG: ParsedName_destroy /uncached/28.BB607E010000/temperature
   READ[0] 0 bytes
   unique: 45, error: 0 (Success), outsize: 16
unique: 46, opcode: FLUSH (25), nodeid: 4, insize: 64
FLUSH[0]
   unique: 46, error: -38 (Function not implemented), outsize: 16
unique: 47, opcode: RELEASE (18), nodeid: 4, insize: 64
RELEASE[0] flags: 0x8000
   CALL: RELEASE path=/uncached/28.BB607E010000/temperature
   unique: 47, error: 0 (Success), outsize: 16

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
Stuart Poulton | 1 Sep 2008 21:07
Picon
Picon

Branches, hubs, and multiple master

Hi.

I've not looked to well at the docs, but in a system with multiple master, a hub, or even an DS2482-800 is it possible to see which adaptor / port a device is connected to, and hence build a tree type view of the 1-wire net ?

Cheers

Stuart
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Owfs-developers mailing list
Owfs-developers <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers
Paul Alfille | 2 Sep 2008 04:27
Picon

Re: Branches, hubs, and multiple master

Yes, the "bus.0" entries can be used to explore the topology.

On Mon, Sep 1, 2008 at 3:07 PM, Stuart Poulton <stuart.poulton <at> astro.le.ac.uk> wrote:
Hi.

I've not looked to well at the docs, but in a system with multiple master, a hub, or even an DS2482-800 is it possible to see which adaptor / port a device is connected to, and hence build a tree type view of the 1-wire net ?

Cheers

Stuart

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Owfs-developers mailing list
Owfs-developers <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Owfs-developers mailing list
Owfs-developers <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers
Stuart Poulton | 2 Sep 2008 12:34
Picon
Picon

Re: Branches, hubs, and multiple master

Thanks Paul,

Any more details on how this works please ?

Cheers

Stuart

On Mon, 2008-09-01 at 22:27 -0400, Paul Alfille wrote:
> Yes, the "bus.0" entries can be used to explore the topology.
> 
> On Mon, Sep 1, 2008 at 3:07 PM, Stuart Poulton
> <stuart.poulton <at> astro.le.ac.uk> wrote:
>         Hi.
>         
>         
>         I've not looked to well at the docs, but in a system with
>         multiple master, a hub, or even an DS2482-800 is it possible
>         to see which adaptor / port a device is connected to, and
>         hence build a tree type view of the 1-wire net ?
>         
>         
>         Cheers
>         
>         
>         Stuart
>         
>         -------------------------------------------------------------------------
>         This SF.Net email is sponsored by the Moblin Your Move
>         Developer's challenge
>         Build the coolest Linux based applications with Moblin SDK &
>         win great prizes
>         Grand prize is a trip for two to an Open Source event anywhere
>         in the world
>         http://moblin-contest.org/redirect.php?banner_id=100&url=/
>         _______________________________________________
>         Owfs-developers mailing list
>         Owfs-developers <at> lists.sourceforge.net
>         https://lists.sourceforge.net/lists/listinfo/owfs-developers
>         
> 
> 
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________ Owfs-developers mailing list
Owfs-developers <at> lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/owfs-developers

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
Paul Alfille | 2 Sep 2008 14:04
Picon

Re: Branches, hubs, and multiple master

Bus Topology

There's a picture at http://owfs.org/index.php?page=divide-and-conqueror that may help.

Basically, OWFS has a list (internally) of it's bus connections. They could be a serial DS9097U, USB DS9490R, i2c DS2481-100 or a network connection to owserver.

By default, all these bus connections are combined, to give a single view of the available devices. This makes it easy, and means that you don't have to search and code the topology your self.

When searching for a device, all the busses must be searched (concurrently). The device's location is saved, however, the make subsequent calls for reading and writing more efficient.

Just because there might be a need to examine the actual location of devices, the underlying structure can be seen.

All the devices on the first bus are found under /bus.0/... The second under /bus.1/... And so on.
Since assigning the bus numbers can be arbitrary (the order on the command line), there is an entry /bus.0/interface that gives the type, name, etc... (And also bus.1/interface ...)

So if you run
owhttpd -d /dev/ttyS1 -u -s 4304
# bus.0 is the serial adapter
# bus.1 is USB
# bus.2 is a network connection to owserver (bus see below for the added complexity of owserver)

The DS2482-800 has 8 channels, so gets 8 bus numbers. They are only partially independent, but OWFS hides that detail.

All this works great for local bus masters (like the serail, usb, and i2c ones). network connections to owserver add a little complexity.

owserver has it's own bus.0, bus.1 ... so a connection by owhttpd to owserver would look like /bus.0/bus.0 /bus.0/bus.1 ... The first bus.0 is the tcp connection to owserver. The second bus.x is owserver's buses.

This can be layered to any level of complexity, There is protection against loops in the topology however.

It's easy to search down the bus paths to get lists of devices. There isn't an easy way to reverse that process. I.e. given a device name, find it and report it's path. We could implement it (the information is held internally) but I didn't know if there was a need.

Does this clarify at all?

Paul Alfille

On Tue, Sep 2, 2008 at 6:34 AM, Stuart Poulton <stuart.poulton <at> astro.le.ac.uk> wrote:
Thanks Paul,

Any more details on how this works please ?

Cheers

Stuart

On Mon, 2008-09-01 at 22:27 -0400, Paul Alfille wrote:
> Yes, the "bus.0" entries can be used to explore the topology.
>
> On Mon, Sep 1, 2008 at 3:07 PM, Stuart Poulton
> <stuart.poulton <at> astro.le.ac.uk> wrote:
>         Hi.
>
>
>         I've not looked to well at the docs, but in a system with
>         multiple master, a hub, or even an DS2482-800 is it possible
>         to see which adaptor / port a device is connected to, and
>         hence build a tree type view of the 1-wire net ?
>
>
>         Cheers
>
>
>         Stuart
>
>         -------------------------------------------------------------------------
>         This SF.Net email is sponsored by the Moblin Your Move
>         Developer's challenge
>         Build the coolest Linux based applications with Moblin SDK &
>         win great prizes
>         Grand prize is a trip for two to an Open Source event anywhere
>         in the world
>         http://moblin-contest.org/redirect.php?banner_id=100&url=/
>         _______________________________________________
>         Owfs-developers mailing list
>         Owfs-developers <at> lists.sourceforge.net
>         https://lists.sourceforge.net/lists/listinfo/owfs-developers
>
>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________ Owfs-developers mailing list Owfs-developers <at> lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/owfs-developers


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Owfs-developers mailing list
Owfs-developers <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Owfs-developers mailing list
Owfs-developers <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers
Stuart Poulton | 2 Sep 2008 18:14
Picon
Picon

Re: Branches, hubs, and multiple master

Thanks Paul,

What a great explanation. Clearly I need to get more than one adaptor onto the system to really test things out.

I can see some use in being able to find which bus a device is on, however for the application I'm looking at I can do this in software.

More investigations to do. How much of the topology can be found using say php routines ?

Cheers

Stuart

On 2 Sep 2008, at 13:04, Paul Alfille wrote:

Bus Topology

There's a picture at http://owfs.org/index.php?page=divide-and-conqueror that may help.

Basically, OWFS has a list (internally) of it's bus connections. They could be a serial DS9097U, USB DS9490R, i2c DS2481-100 or a network connection to owserver.

By default, all these bus connections are combined, to give a single view of the available devices. This makes it easy, and means that you don't have to search and code the topology your self.

When searching for a device, all the busses must be searched (concurrently). The device's location is saved, however, the make subsequent calls for reading and writing more efficient.

Just because there might be a need to examine the actual location of devices, the underlying structure can be seen.

All the devices on the first bus are found under /bus.0/... The second under /bus.1/... And so on.
Since assigning the bus numbers can be arbitrary (the order on the command line), there is an entry /bus.0/interface that gives the type, name, etc... (And also bus.1/interface ...)

So if you run
owhttpd -d /dev/ttyS1 -u -s 4304
# bus.0 is the serial adapter
# bus.1 is USB
# bus.2 is a network connection to owserver (bus see below for the added complexity of owserver)

The DS2482-800 has 8 channels, so gets 8 bus numbers. They are only partially independent, but OWFS hides that detail.

All this works great for local bus masters (like the serail, usb, and i2c ones). network connections to owserver add a little complexity.

owserver has it's own bus.0, bus.1 ... so a connection by owhttpd to owserver would look like /bus.0/bus.0 /bus.0/bus.1 ... The first bus.0 is the tcp connection to owserver. The second bus.x is owserver's buses.

This can be layered to any level of complexity, There is protection against loops in the topology however.

It's easy to search down the bus paths to get lists of devices. There isn't an easy way to reverse that process. I.e. given a device name, find it and report it's path. We could implement it (the information is held internally) but I didn't know if there was a need.

Does this clarify at all?

Paul Alfille

On Tue, Sep 2, 2008 at 6:34 AM, Stuart Poulton <stuart.poulton <at> astro.le.ac.uk> wrote:
Thanks Paul,

Any more details on how this works please ?

Cheers

Stuart

On Mon, 2008-09-01 at 22:27 -0400, Paul Alfille wrote:
> Yes, the "bus.0" entries can be used to explore the topology.
>
> On Mon, Sep 1, 2008 at 3:07 PM, Stuart Poulton
> <stuart.poulton <at> astro.le.ac.uk> wrote:
>         Hi.
>
>
>         I've not looked to well at the docs, but in a system with
>         multiple master, a hub, or even an DS2482-800 is it possible
>         to see which adaptor / port a device is connected to, and
>         hence build a tree type view of the 1-wire net ?
>
>
>         Cheers
>
>
>         Stuart
>
>         -------------------------------------------------------------------------
>         This SF.Net email is sponsored by the Moblin Your Move
>         Developer's challenge
>         Build the coolest Linux based applications with Moblin SDK &
>         win great prizes
>         Grand prize is a trip for two to an Open Source event anywhere
>         in the world
>         http://moblin-contest.org/redirect.php?banner_id=100&url=/
>         _______________________________________________
>         Owfs-developers mailing list
>         Owfs-developers <at> lists.sourceforge.net
>         https://lists.sourceforge.net/lists/listinfo/owfs-developers
>
>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________ Owfs-developers mailing list Owfs-developers <at> lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/owfs-developers


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Owfs-developers mailing list
Owfs-developers <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/_______________________________________________
Owfs-developers mailing list
Owfs-developers <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Owfs-developers mailing list
Owfs-developers <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers
Paul Alfille | 2 Sep 2008 19:20
Picon

Re: Branches, hubs, and multiple master

All the programs either link in the libow code or query owserver, so they should all be able to use the bus.x entries, unless the particular implementation adds a layer that filters out this function.

I don't know about owphp specifically.


Paul

On Tue, Sep 2, 2008 at 12:14 PM, Stuart Poulton <Stuart.Poulton <at> astro.le.ac.uk> wrote:
More investigations to do. How much of the topology can be found using say php routines ?

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Owfs-developers mailing list
Owfs-developers <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers
Paul Alfille | 4 Sep 2008 12:27
Picon

Fwd: NSLU2 and OWFS



---------- Forwarded message ----------
From: Joaquim Manuel Medeira Rodrigues <quim <at> xelb.net>
Date: Thu, Sep 4, 2008 at 4:44 AM
Subject: NSLU2 and OWFS
To: palfille <at> earthlink.net


Hi,

I've been looking to your 'NSLU2 and OWFS' excelent page on
'http://owfs.sourceforge.net/' and i would like to ask you some questions:

- Do you think that owfs packages will work on other Unslung 6.8 supported
devices like Iomega NAS 100d, D-Link DSM-G600, Freecom FSG-3 and others,
basically the devices listed on http://www.nslu2-linux.org/? (As long as
they have usb ports :) )
- There are some examples on 'http://owfs.sourceforge.net/'. Were you able
to read and write to the network without any problems or does it have any
limitation? (acess is always trasparent to the devices as long as you can
see them)?
- I'm considering buying the NSLU2 but basically i would like to know if i
could consider other similar devices.

Thanks
Joaquim


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Owfs-developers mailing list
Owfs-developers <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers

Gmane