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 <[EMAIL PROTECTED]
> 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
> <[EMAIL PROTECTED]> 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
> [email protected]
> 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 [email protected] 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
[email protected]
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
[email protected]
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/owfs-developers