On 8/12/2011 11:44, Achim Scheidl wrote:
Hi Mark,
oh yes, it is....
I have 4 DS2482-100 bus-master connected via I2C and several 1-Wire
devices connected to each. So OWFS shows me all devices together,
independent of the bus-master in the root /. and in addition it shows
bus.0 to bus.3.
And - I guess that is what you want - if I dive into bus.0 it shows
the devices again, but now limited to that one only connected to bus.0.
So you can ignore the devices shown in the root and go through the
bus.x directories showing their content, than you are able to show
where they are connected...
Achim,
I am getting different results, depending on what I use to read the root
of the owfs.
I *do not *see all the devices which exist beyond the first DS2408 in
the root of the mounted owfs directory through my program or an ls
/mnt/1-wire. I also only see bus.0. However, when I use the owfs
utility owget, I see the two buses.
My physical network looks like this:
USB /dev/ttyUSB0 -> USB TO SERIAL ADAPTER -> [DS2480B] ->
[DS2413 (0x3A)]
USB /dev/ttyUSB0 -> USB TO SERIAL ADAPTER -> [DS2480B] ->
[DS2409 (0x1F)] ->{main} -> {sensors}
USB /dev/ttyUSB0 -> USB TO SERIAL ADAPTER -> [DS2480B] ->
[DS2409 (0x1F)] ->{aux} -> {sensors}
USB /dev/ttyUSB1 -> USB TO SERIAL ADAPTER -> [DS2480B] ->
[DS2413 (0x3A)]
USB /dev/ttyUSB1 -> USB TO SERIAL ADAPTER -> [DS2480B] ->
[DS2409 (0x1F)] ->{main} -> {sensors}
USB /dev/ttyUSB1 -> USB TO SERIAL ADAPTER -> [DS2480B] ->
[DS2409 (0x1F)] ->{aux} -> {sensors}
Here's how I load owserver (and owfs):
#/usr/bin/owserver --device=/dev/ttyUSB0 /dev/ttyUSB1 -p 4304
--allow_other
#/usr/bin/owfs -slocalhost:4304 --mountpoint=/mnt/1-wire/
--allow_other
When I ls /mnt/1-wire I see:
1F.5A1D02000000 1F.F79002000000 3A.953300000000 3A.F59800000000
bus.0 settings statistics structure system uncached
And in my application:
OW_init(-s localhost:4304);
OW_get("/", &get_buffer, &get_length);
printf("\n%s\n",get_buffer);
3A.953300000000/,1F.F79002000000/,3A.F59800000000/,1F.5A1D02000000/,bus.0/,uncached/,settings/,system/,statistics/,structure/
When I run *owget* at the command line:
owget -s localhost:4304
/3A.F59800000000
/1F.5A1D02000000
/3A.953300000000
/1F.F79002000000
/bus.1
/bus.0
/uncached
/settings
/system
/statistics
/structure
I'm examining the sources for owget now, and note that the methods used
are outside the scope of owcapi. They appear to circumvent owserver and
the userspace directory structure entirely.
Here's the debug produced when I run my test program. Maybe someone can
make sense of this?
DEBUG: owcapi.c:OW_init(49) OW_init(-s localhost:4304)
DEBUG: owcapi.c:OW_init(50) Calling API_setup(6)
DEBUG: ow_cache.c:FlipTree(301) Flipping cache tree (purging
timed-out data)
DEBUG: ow_cache.c:FlipTree(319) flip cache. tdestroy() will be called.
DEBUG: ow_avahi_link.c:OW_Load_avahi_library(75) Avahi support:
libavahi-client loaded successfully
DEBUG: ow_avahi_link.c:OW_Load_avahi_library(77) Avahi library
function found: avahi_client_errno
DEBUG: ow_avahi_link.c:OW_Load_avahi_library(78) Avahi library
function found: avahi_client_free
DEBUG: ow_avahi_link.c:OW_Load_avahi_library(79) Avahi library
function found: avahi_client_new
DEBUG: ow_avahi_link.c:OW_Load_avahi_library(80) Avahi library
function found: avahi_client_get_domain_name
DEBUG: ow_avahi_link.c:OW_Load_avahi_library(81) Avahi library
function found: avahi_entry_group_add_service
DEBUG: ow_avahi_link.c:OW_Load_avahi_library(82) Avahi library
function found: avahi_entry_group_commit
DEBUG: ow_avahi_link.c:OW_Load_avahi_library(83) Avahi library
function found: avahi_entry_group_is_empty
DEBUG: ow_avahi_link.c:OW_Load_avahi_library(84) Avahi library
function found: avahi_entry_group_new
DEBUG: ow_avahi_link.c:OW_Load_avahi_library(85) Avahi library
function found: avahi_entry_group_reset
DEBUG: ow_avahi_link.c:OW_Load_avahi_library(87) Avahi library
function found: avahi_service_resolver_free
DEBUG: ow_avahi_link.c:OW_Load_avahi_library(88) Avahi library
function found: avahi_service_resolver_new
DEBUG: ow_avahi_link.c:OW_Load_avahi_library(89) Avahi library
function found: avahi_service_browser_free
DEBUG: ow_avahi_link.c:OW_Load_avahi_library(90) Avahi library
function found: avahi_service_browser_new
DEBUG: ow_avahi_link.c:OW_Load_avahi_library(102) Avahi support:
libavahi-common loaded successfully.
DEBUG: ow_avahi_link.c:OW_Load_avahi_library(104) Avahi library
function found: avahi_simple_poll_free
DEBUG: ow_avahi_link.c:OW_Load_avahi_library(105) Avahi library
function found: avahi_simple_poll_get
DEBUG: ow_avahi_link.c:OW_Load_avahi_library(106) Avahi library
function found: avahi_simple_poll_loop
DEBUG: ow_avahi_link.c:OW_Load_avahi_library(107) Avahi library
function found: avahi_simple_poll_new
DEBUG: ow_avahi_link.c:OW_Load_avahi_library(108) Avahi library
function found: avahi_simple_poll_quit
DEBUG: ow_avahi_link.c:OW_Load_avahi_library(109) Avahi library
function found: avahi_strerror
CALL: ow_parsename.c:FS_ParsedName_anywhere(95) path=[]
DEBUG: owlib.c:SetupTemperatureLimits(79) Globals temp limits 0C 100C
(for simulated adapters)
DEBUG: ow_net_client.c:ClientAddr(83) IP address=[localhost] port=[4304]
DEBUG: owcapi.c:OW_init(63) OW_init() OK
CALL: ow_parsename.c:FS_ParsedName_anywhere(95) path=[/]
DEBUG: ow_parsename.c:FS_ParsedName_destroy(59) /
[-debug- InitVars line 107] OW_init(-s localhost:4304):returns 0
[-debug- InitVars line 109] OW interface registered OK
[-debug- InitVars line 110] Generating the owfs device list
[-debug- LoadDeviceList line 1286] LoadDeviceList()
DEBUG: ow_parseobject.c:OWQ_create(164) /
CALL: ow_parsename.c:FS_ParsedName_anywhere(95) path=[/]
DEBUG: ow_dir.c:FS_dir(63) path=/
CALL: ow_dir.c:FS_dir_both(98) path=/
CALL: ow_server_message.c:ServerDIR(236) SERVER(0) path=/
path_to_server=/
DEBUG: ow_server_message.c:WriteToServer(704) version=0 payload=2
size=0 type=4 SG=104 offset=0
DEBUG: ow_tcp_read.c:tcp_read(64) attempt 24 bytes Time: 2.000000 seconds
DEBUG: ow_tcp_read.c:tcp_read(114) read: 24 - 0 = 24
DEBUG: ow_tcp_read.c:tcp_read(64) attempt 17 bytes Time: 2.000000 seconds
DEBUG: ow_tcp_read.c:tcp_read(114) read: 17 - 0 = 17
DEBUG: ow_server_message.c:Directory_Element(381) got=[/3A.953300000000]
CALL: ow_parsename.c:FS_ParsedName_anywhere(95) path=[/3A.953300000000]
DEBUG: ow_cache.c:Cache_Add_Device(554) Adding device location 3A 95
33 00 00 00 00 0F bus=0
DEBUG: ow_cache.c:Cache_Add_Common(643) Add to cache sn 3A 95 33 00
00 00 00 0F pointer=0x40474b6c index=0 size=4
DEBUG: ow_parsename.c:FS_ParsedName_destroy(59) /3A.953300000000
DEBUG: ow_tcp_read.c:tcp_read(64) attempt 24 bytes Time: 2.000000 seconds
DEBUG: ow_tcp_read.c:tcp_read(114) read: 24 - 0 = 24
DEBUG: ow_tcp_read.c:tcp_read(64) attempt 17 bytes Time: 2.000000 seconds
DEBUG: ow_tcp_read.c:tcp_read(114) read: 17 - 0 = 17
DEBUG: ow_server_message.c:Directory_Element(381) got=[/1F.F79002000000]
CALL: ow_parsename.c:FS_ParsedName_anywhere(95) path=[/1F.F79002000000]
DEBUG: ow_cache.c:Cache_Add_Device(554) Adding device location 1F F7
90 02 00 00 00 FE bus=0
DEBUG: ow_cache.c:Cache_Add_Common(643) Add to cache sn 1F F7 90 02
00 00 00 FE pointer=0x40474b6c index=0 size=4
DEBUG: ow_parsename.c:FS_ParsedName_destroy(59) /1F.F79002000000
DEBUG: ow_tcp_read.c:tcp_read(64) attempt 24 bytes Time: 2.000000 seconds
DEBUG: ow_tcp_read.c:tcp_read(114) read: 24 - 0 = 24
DEBUG: ow_tcp_read.c:tcp_read(64) attempt 17 bytes Time: 2.000000 seconds
DEBUG: ow_tcp_read.c:tcp_read(114) read: 17 - 0 = 17
DEBUG: ow_server_message.c:Directory_Element(381) got=[/3A.F59800000000]
CALL: ow_parsename.c:FS_ParsedName_anywhere(95) path=[/3A.F59800000000]
DEBUG: ow_cache.c:Cache_Add_Device(554) Adding device location 3A F5
98 00 00 00 00 8F bus=0
DEBUG: ow_cache.c:Cache_Add_Common(643) Add to cache sn 3A F5 98 00
00 00 00 8F pointer=0x40474b6c index=0 size=4
DEBUG: ow_parsename.c:FS_ParsedName_destroy(59) /3A.F59800000000
DEBUG: ow_tcp_read.c:tcp_read(64) attempt 24 bytes Time: 2.000000 seconds
DEBUG: ow_tcp_read.c:tcp_read(114) read: 24 - 0 = 24
DEBUG: ow_tcp_read.c:tcp_read(64) attempt 17 bytes Time: 2.000000 seconds
DEBUG: ow_tcp_read.c:tcp_read(114) read: 17 - 0 = 17
DEBUG: ow_server_message.c:Directory_Element(381) got=[/1F.5A1D02000000]
CALL: ow_parsename.c:FS_ParsedName_anywhere(95) path=[/1F.5A1D02000000]
DEBUG: ow_cache.c:Cache_Add_Device(554) Adding device location 1F 5A
1D 02 00 00 00 CF bus=0
DEBUG: ow_cache.c:Cache_Add_Common(643) Add to cache sn 1F 5A 1D 02
00 00 00 CF pointer=0x40474b6c index=0 size=4
DEBUG: ow_parsename.c:FS_ParsedName_destroy(59) /1F.5A1D02000000
DEBUG: ow_tcp_read.c:tcp_read(64) attempt 24 bytes Time: 2.000000 seconds
DEBUG: ow_tcp_read.c:tcp_read(114) read: 24 - 0 = 24
DEBUG: ow_cache.c:Cache_Add_Dir(477) Adding directory for 00 00 00 00
00 00 00 00 elements=4
DEBUG: ow_cache.c:Cache_Add_Common(643) Add to cache sn 00 00 00 00
00 00 00 00 pointer=0x40474b7c index=0 size=32
CALL: ow_parsename.c:FS_ParsedName_anywhere(95) path=[/bus.0]
DEBUG: ow_parsename.c:FS_ParsedName_destroy(59) /bus.0
CALL: ow_parsename.c:FS_ParsedName_anywhere(95) path=[/uncached]
DEBUG: ow_parsename.c:FS_ParsedName_destroy(59) /uncached
CALL: ow_parsename.c:FS_ParsedName_anywhere(95) path=[/settings]
DEBUG: ow_parsename.c:FS_ParsedName_destroy(59) /settings
CALL: ow_parsename.c:FS_ParsedName_anywhere(95) path=[/system]
DEBUG: ow_parsename.c:FS_ParsedName_destroy(59) /system
CALL: ow_parsename.c:FS_ParsedName_anywhere(95) path=[/statistics]
DEBUG: ow_parsename.c:FS_ParsedName_destroy(59) /statistics
CALL: ow_parsename.c:FS_ParsedName_anywhere(95) path=[/structure]
DEBUG: ow_parsename.c:FS_ParsedName_destroy(59) /structure
DEBUG: ow_dir.c:FS_dir_both(193) ret=0
DEBUG: ow_parsename.c:FS_ParsedName_destroy(59) /
------------------------------------------------------------------------------
FREE DOWNLOAD - uberSVN with Social Coding for Subversion.
Subversion made easy with a complete admin console. Easy
to use, easy to manage, easy to install, easy to extend.
Get a Free download of the new open ALM Subversion platform now.
http://p.sf.net/sfu/wandisco-dev2dev
_______________________________________________
Owfs-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/owfs-developers