Re: [Owfs-developers] no sooner has he got it going, than he wants to stop it...

2006-12-04 Thread Paul Alfille

On 12/4/06, chris [EMAIL PROTECTED] wrote:


After a joyous Sunday where I didn't have to go into the attic to look at
the
thermometers on my solar tank but could sit in the comparitive comfort of
the



Perhaps a little writeup or URL for the website at some point?

living room watching over owhttpd it began to become apparent that although

I
could start all this wonderful stuff, what I really wanted to do was run
owserver.



Yes, owserver is far more flexible.  There is no real performance hit, too.
(Network communication is much faster than 1-wire).

To this end I wondered what the correct way to stop ow process's was? Do I

just kill -9 PID or is there some subtler way of letting the little angels
know their number was up?



You shouldn't need the -9
Just kill PID should be sufficient (and supposedly more graceful).

Will umount /mnt/owfs stop owfs cleanly?


Yes. Unless they've changed FUSE recently, umount /mnt/owfs unmounts and
stops the process nicely.

See I said I'd be back.


Wonderful.


Paul Alfille
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] owpython ... on Windows??

2006-12-04 Thread Paul Alfille

On 12/4/06, chris [EMAIL PROTECTED] wrote:


I understand that owfs is unlikely to run on windows but is it possible to
tun



Au-contraire! (Though the windows port is not yet of the same quality. There
have been reports of memory leaks that need to be investigated).

owpython on a windows box connected to owserver without  resorting to


Ahh! You want to communicate (with owserver?) via python, but not use the
libow library (which builds under cygwin).
This has been done for other languages:

owshell -- uses C to talk to the owserver directly. Perhaps a little
complex, since it includes the Bonjour code and came from a stripped version
of libow in the first place.

owsim -- a work in progress that uses Tcl to talk to owserver. Tcl has great
network support and we essentially parse the owserver protocol in Tcl code.

I suspect that you could do the same in python. Probably a few days project
for a python expert. The owserver network protocol is documented on the
website: http://www.owfs.org/index.php?page=owserver-protocol
(And in the code, of course).

For TCL
network basics:
http://owfs.cvs.sourceforge.net/owfs/owfs/module/simulants/ownet.tcl?revision=1.5view=markup
server code:
http://owfs.cvs.sourceforge.net/owfs/owfs/module/simulants/owhandler.tcl?revision=1.8view=markup
(Note that owsim is a owserver, rather than client).

excellent but rather cumbersome methods like cygwin?


I am keen to be able to monitor the one wire network in several places all
of
which are windows devices with users who are even more simplistic than
myself
( if that can be believed, my only defence is that some of them are 6
years
old)



You underestimate your progeny! If they can hack python, they are probably
os agnostic.

owpython seems only to be availabe as an rpm, can I just copy the source

across to site-packages or are you now wondering how to get this rather
irritating newbie of your fine list?



I presume you want to display (and perhaps control) your system on
distributed computers, with more than one platform. Have you considered
building a web app? Your cgi code can use python or bash or whatever. You
can expose whatever you want, even full owhttpd. It would be easier to
develope and use a central http server, trusting that all other machines can
easily load a browser.

Chris


p.s. I my style irritates please tell me, and I will assume a less fatous
tone
from here on.



I fear the prior state of the art in prose has given you unwarranted concern
about our playfulness. Besides, we believe in cultural diversity. And we
have great sympathy for non-native American speakers.

Paul Alfille
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] owpython ... on Windows??

2006-12-04 Thread chris
On Monday 04 December 2006 12:02, Paul Alfille wrote:
 On 12/4/06, chris [EMAIL PROTECTED] wrote:
  I understand that owfs is unlikely to run on windows but is it possible
  to tun

 Au-contraire! (Though the windows port is not yet of the same quality.
 There have been reports of memory leaks that need to be investigated).

 owpython on a windows box connected to owserver without  resorting to


 Ahh! You want to communicate (with owserver?) via python, but not use the
 libow library (which builds under cygwin).
 This has been done for other languages:

 owshell -- uses C to talk to the owserver directly. Perhaps a little
 complex, since it includes the Bonjour code and came from a stripped
 version of libow in the first place.

 owsim -- a work in progress that uses Tcl to talk to owserver. Tcl has
 great network support and we essentially parse the owserver protocol in Tcl
 code.

 I suspect that you could do the same in python. Probably a few days project
 for a python expert. The owserver network protocol is documented on the
 website: http://www.owfs.org/index.php?page=owserver-protocol
 (And in the code, of course).

 For TCL
 network basics:
 http://owfs.cvs.sourceforge.net/owfs/owfs/module/simulants/ownet.tcl?revisi
on=1.5view=markup server code:
 http://owfs.cvs.sourceforge.net/owfs/owfs/module/simulants/owhandler.tcl?re
vision=1.8view=markup (Note that owsim is a owserver, rather than client).

 excellent but rather cumbersome methods like cygwin?


Yep that is the sort of line I'd like to be able to take. I'm very messy at 
code, but where's theres a will, I'm building a higher object model using 
Django http://www.djangoproject.com which constructs database models from 
python class models. 



  I am keen to be able to monitor the one wire network in several places
  all of
  which are windows devices with users who are even more simplistic than
  myself
  ( if that can be believed, my only defence is that some of them are 6
  years
  old)

 You underestimate your progeny! If they can hack python, they are probably
 os agnostic.

They mostly use it to cheat on maths homework. Niether have realised 
multiplication is a lookup.


 owpython seems only to be availabe as an rpm, can I just copy the source

I really don't want to have to re-write too much cos I'm lazy, and the more I 
write the more errors I know are there.

A Sensor object is a lovely concept in itself.


 I presume you want to display (and perhaps control) your system on
 distributed computers, with more than one platform. Have you considered
 building a web app? Your cgi code can use python or bash or whatever. You
 can expose whatever you want, even full owhttpd. It would be easier to
 develope and use a central http server, trusting that all other machines
 can easily load a browser.

There's an attempt to generate a distributed model for community energy use 
monitoring that's running out of a forum: 
http://navitron.org.uk/forum/index.php?topic=678.0

I'm keen to plug into Visual Python for object representations of solar rigs. 
have a look at http://www.spritenote.co.uk/solar.html for an idea of what I'm 
up to.
I've got a pretty awful object model running which might allow auto assembly 
of this sort of system.




 Besides, we believe in cultural diversity.
 And we have great sympathy for non-native American speakers.

 Paul Alfille

Hadn't considered the language implications of the style. And isn't the 
language English :D.. or is it actually written in Navaho?

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] owpython ... on Windows??

2006-12-04 Thread Paul Alfille

Ok, communication is via tcp.

1. open port
2. send a message
3. wait for response (single response except for directories).
4. close port

Message has format:
6 words (24 bytes) fixed header
variable length payload
Words must be sent in network order (bigendian I believe)
Header is:
 Version (use 0)
 Payload (size of variable length in bytes)
 Type (see below)
 SG (basically temperature scale)
 Size (for writes, size of data portion of payload)
 Offset (for reads and writes, usually 0)
Type
 0 error
 1 nop
 2 read
 3 write
 4 dir
 5 size (not used any more)
 6 presence

Basically, you set up the header, and follow it with payload, and send the
whole thing.
Payload is typically the path e.g. /10.12300432433/temperature
Possibly followed with a value for writes.

You get back about the same thing. The fields are slightly different (error
codes, data length) but the value is in the payload.

If you want to do this, I'm sure people would be glad to assist. It
certainly sounds like an interesting project.

Paul Alfille


On 12/4/06, chris [EMAIL PROTECTED] wrote:


On Monday 04 December 2006 12:02, Paul Alfille wrote:
 On 12/4/06, chris [EMAIL PROTECTED] wrote:
  I understand that owfs is unlikely to run on windows but is it
possible
  to tun

 Au-contraire! (Though the windows port is not yet of the same quality.
 There have been reports of memory leaks that need to be investigated).

 owpython on a windows box connected to owserver without  resorting to


 Ahh! You want to communicate (with owserver?) via python, but not use
the
 libow library (which builds under cygwin).
 This has been done for other languages:

 owshell -- uses C to talk to the owserver directly. Perhaps a little
 complex, since it includes the Bonjour code and came from a stripped
 version of libow in the first place.

 owsim -- a work in progress that uses Tcl to talk to owserver. Tcl has
 great network support and we essentially parse the owserver protocol in
Tcl
 code.

 I suspect that you could do the same in python. Probably a few days
project
 for a python expert. The owserver network protocol is documented on the
 website: http://www.owfs.org/index.php?page=owserver-protocol
 (And in the code, of course).

 For TCL
 network basics:

http://owfs.cvs.sourceforge.net/owfs/owfs/module/simulants/ownet.tcl?revisi
on=1.5view=markup server code:

http://owfs.cvs.sourceforge.net/owfs/owfs/module/simulants/owhandler.tcl?re
vision=1.8view=markup (Note that owsim is a owserver, rather than
client).

 excellent but rather cumbersome methods like cygwin?


Yep that is the sort of line I'd like to be able to take. I'm very messy
at
code, but where's theres a will, I'm building a higher object model using
Django http://www.djangoproject.com which constructs database models from
python class models.



  I am keen to be able to monitor the one wire network in several places
  all of
  which are windows devices with users who are even more simplistic than
  myself
  ( if that can be believed, my only defence is that some of them are 6
  years
  old)

 You underestimate your progeny! If they can hack python, they are
probably
 os agnostic.

They mostly use it to cheat on maths homework. Niether have realised
multiplication is a lookup.


 owpython seems only to be availabe as an rpm, can I just copy the source

I really don't want to have to re-write too much cos I'm lazy, and the
more I
write the more errors I know are there.

A Sensor object is a lovely concept in itself.


 I presume you want to display (and perhaps control) your system on
 distributed computers, with more than one platform. Have you considered
 building a web app? Your cgi code can use python or bash or whatever.
You
 can expose whatever you want, even full owhttpd. It would be easier to
 develope and use a central http server, trusting that all other machines
 can easily load a browser.

There's an attempt to generate a distributed model for community energy
use
monitoring that's running out of a forum:
http://navitron.org.uk/forum/index.php?topic=678.0

I'm keen to plug into Visual Python for object representations of solar
rigs.
have a look at http://www.spritenote.co.uk/solar.html for an idea of what
I'm
up to.
I've got a pretty awful object model running which might allow auto
assembly
of this sort of system.




 Besides, we believe in cultural diversity.
 And we have great sympathy for non-native American speakers.

 Paul Alfille

Hadn't considered the language implications of the style. And isn't the
language English :D.. or is it actually written in Navaho?

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share
your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Owfs-developers mailing 

[Owfs-developers] Problems compiling CVS

2006-12-04 Thread Jan Kandziora
Hi all,

I have a problem compiling the last week's CVS (owfs-2.5p7) with owtcl 
support. I always get an error if SWIG is enabled, and disabling it disables 
owtcl, too. Here's what I tried:

$ aclocal  autoheader  autoconf  libtoolize -f -c  automake -a -c
$ ./configure --disable-perl --disable-python
$ make
.
.
.
Making all in swig
make[2]: Entering directory `/vault/1/Software/sources/owfs/module/swig'
Making all in perl5
make[3]: Entering directory `/vault/1/Software/sources/owfs/module/swig/perl5'
perl Makefile.PL MAKEFILE=Makefile.perl
Warning: -L../../owlib/src/c/.libs changed to 
-L/vault/1/Software/sources/owfs/module/swig/perl5/../../owlib/src/c/.libs
Writing Makefile.perl for OW
/usr/bin/swig -perl5 -o ow_wrap.c ../ow.i
make -fMakefile.perl
make[4]: Entering directory `/vault/1/Software/sources/owfs/module/swig/perl5'
Skip blib/lib/OW.pm (unchanged)
gcc -c  -I../../../src/include -I../../owlib/src/include  -D_REENTRANT 
-D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBUGGING -fno-strict-aliasing -pipe 
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -march=i586 -mcpu=i686 
-fmessage-length=0 -Wall -g -Wall -pipe   -DVERSION=\2.5p7\ 
-DXS_VERSION=\2.5p7\ -fPIC 
-I/usr/lib/perl5/5.8.6/i586-linux-thread-multi/CORE  -DSKIP_SEARCH_H 
-DHAVE_CONFIG_H ow_wrap.c
ow_wrap.c: In function `boot_OW':
ow_wrap.c:1163: warning: unused variable `items'
ow_wrap.c: At top level:
ow_wrap.c:183: warning: `SWIG_Perl_TypeDynamicCast' defined but not used
ow_wrap.c:195: warning: `SWIG_Perl_TypeName' defined but not used
ow_wrap.c:201: warning: `SWIG_Perl_TypeQuery' defined but not used
ow_wrap.c:487: warning: `SWIG_Perl_ConvertPtr' defined but not used
ow_wrap.c:577: warning: `SWIG_Perl_NewPointerObj' defined but not used
ow_wrap.c:596: warning: `SWIG_Perl_ConvertPacked' defined but not used
ow_wrap.c:619: warning: `SWIG_Perl_SetErrorSV' defined but not used
ow_wrap.c:624: warning: `SWIG_Perl_SetErrorf' defined but not used
ow_wrap.c:988: warning: `swig_magic_readonly' defined but not used
Running Mkbootstrap for OW ()
chmod 644 OW.bs
rm -f blib/arch/auto/OW/OW.so
LD_RUN_PATH=/vault/1/Software/sources/owfs/module/swig/perl5/../../owlib/src/c/.libs:/usr/lib
 
cc  -shared -Wl,-L../../owlib/src/c/.libs -Wl,-rpath=/opt/owfs/lib ow_wrap.o  
-o blib/arch/auto/OW/OW.so   
-L/vault/1/Software/sources/owfs/module/swig/perl5/../../owlib/src/c/.libs 
-low -lpthread -ldl -lusb
chmod 755 blib/arch/auto/OW/OW.so
cp OW.bs blib/arch/auto/OW/OW.bs
chmod 644 blib/arch/auto/OW/OW.bs
make[4]: Leaving directory `/vault/1/Software/sources/owfs/module/swig/perl5'
make[3]: Leaving directory `/vault/1/Software/sources/owfs/module/swig/perl5'
Making all in python
make[3]: Entering directory 
`/vault/1/Software/sources/owfs/module/swig/python'
Making all in ow
make[4]: Entering directory 
`/vault/1/Software/sources/owfs/module/swig/python/ow'
make[4]: Für das Ziel »all« ist nichts zu tun.
make[4]: Leaving directory 
`/vault/1/Software/sources/owfs/module/swig/python/ow'
make[4]: Entering directory 
`/vault/1/Software/sources/owfs/module/swig/python'
/usr/bin/swig -python -o ow_wrap.c ../ow.i
python setup.py build
Traceback (most recent call last):
  File setup.py, line 28, in ?
from distutils.core import setup, Extension
ImportError: No module named distutils.core
make[4]: *** [OW.py] Fehler 1
make[4]: Leaving directory `/vault/1/Software/sources/owfs/module/swig/python'
make[3]: *** [all-recursive] Fehler 1
make[3]: Leaving directory `/vault/1/Software/sources/owfs/module/swig/python'
make[2]: *** [all-recursive] Fehler 1
make[2]: Leaving directory `/vault/1/Software/sources/owfs/module/swig'
make[1]: *** [all-recursive] Fehler 1
make[1]: Leaving directory `/vault/1/Software/sources/owfs/module'
make: *** [all-recursive] Fehler 1
$


What's wrong?

Kind regards

Jan

-- 
Even more amazing was the realization that God has internet access.
I wonder if He has a full newsfeed?
-- Matt Welsh

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] Problems compiling CVS

2006-12-04 Thread Jan Kandziora
Am Montag, 4. Dezember 2006 16:22 schrieb Jan Kandziora:
 Hi all,

Forget the previous posting.

$ ./configure --disable-owperl --disable-owpython --disable-owphp
^^   ^^
did the trick.

Kind regards

Jan
-- 
People get annoyed when you try to debug them.
-- Larry Wall

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


[Owfs-developers] owtcl: Changed semantics?

2006-12-04 Thread Jan Kandziora
Hi all,

it seems owtcl return values were changed:

% OW::get uncached
bus.7/,bus.6/,bus.5/,bus.4/,bus.3/,bus.2/,bus.1/,bus.0/,01.7ABFA608/

Before there were spaces between the components of a reply. Is this change 
intended? Any more surprises?

Kind regards

Jan
-- 
Es ist zehn Uhr abends... Wissen Sie, wo ihre Quellcodes sind?

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] owtcl: Changed semantics?

2006-12-04 Thread Alfille, Paul H.,M.D.
I think Serg is using owcapi semantics, now.

Paul Alfille

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Jan
Kandziora
Sent: Monday, December 04, 2006 11:25 AM
To: owfs-developers@lists.sourceforge.net
Subject: [Owfs-developers] owtcl: Changed semantics?

Hi all,

it seems owtcl return values were changed:

% OW::get uncached
bus.7/,bus.6/,bus.5/,bus.4/,bus.3/,bus.2/,bus.1/,bus.0/,01.7ABFA608/

Before there were spaces between the components of a reply. Is this change 
intended? Any more surprises?

Kind regards

Jan
-- 
Es ist zehn Uhr abends... Wissen Sie, wo ihre Quellcodes sind?

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] Problems compiling CVS

2006-12-04 Thread Alfille, Paul H.,M.D.
Well it would be better if owpython dependencies were better tested in the
autoconf script. I always get clashes with the zend headers.

Paul Alfille

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Jan
Kandziora
Sent: Monday, December 04, 2006 10:40 AM
To: owfs-developers@lists.sourceforge.net
Subject: Re: [Owfs-developers] Problems compiling CVS

Am Montag, 4. Dezember 2006 16:22 schrieb Jan Kandziora:
 Hi all,

Forget the previous posting.

$ ./configure --disable-owperl --disable-owpython --disable-owphp
^^   ^^
did the trick.

Kind regards

Jan
-- 
People get annoyed when you try to debug them.
-- Larry Wall

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] owtcl: Changed semantics?

2006-12-04 Thread Serg Oskin
It is semantics owcapi.
Use form
OW::get [path] -list
which returns tcl-list.
In manpage has described. In Changelog did not write, sorry.

Serg.

Jan Kandziora wrote:
 Hi all,
 
 it seems owtcl return values were changed:
 
 % OW::get uncached
 bus.7/,bus.6/,bus.5/,bus.4/,bus.3/,bus.2/,bus.1/,bus.0/,01.7ABFA608/
 
 Before there were spaces between the components of a reply. Is this change 
 intended? Any more surprises?
 
 Kind regards
 
   Jan

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


[Owfs-developers] owtcl in owfs2.5p7: Segmentation fault

2006-12-04 Thread Jan Kandziora
Hi all,

I finally could experiment a bit with last week's CVS and owtcl. 
Unfortunately, it breaks on scanning a specific bus when no key is connected.

janskiste:~ # tclsh
% package require ow
0.1
% OW::init /dev/i2c-1
% OW::get uncached
bus.7/,bus.6/,bus.5/,bus.4/,bus.3/,bus.2/,bus.1/,bus.0/
% OW::get bus.0/uncached
Segmentation fault

Now I put an ibutton to the bus.0

janskiste:~ # tclsh
% package require ow
0.1
% OW::init /dev/i2c-1
% OW::get uncached
bus.7/,bus.6/,bus.5/,bus.4/,bus.3/,bus.2/,bus.1/,bus.0/,01.7ABFA608/
% OW::get bus.0/uncached
01.7ABFA608/
%

As I found out, it's a owtcl problem with zero-sized replies from owlib. 
Proposed patch:


--- module/swig/tcl/ow.c.orig   2006-12-04 17:55:23.0 +0100
+++ module/swig/tcl/ow.c2006-12-04 18:56:02.0 +0100
@@ -187,6 +187,11 @@
 goto common_exit;
   }

+   if (buf==NULL) {
+tcl_return = TCL_OK;
+goto common_exit;
+  }
+
   buf[s] = 0;
   if (lst) {
 if (strchr(buf, ',')) {


Kind regards

Jan
-- 
You have acquired a scroll entitled 'irk gleknow mizk'(n).--More--

This is an IBM Manual scroll.--More--

You are permanently confused.
-- Dave Decot

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] owtcl: Changed semantics?

2006-12-04 Thread Jan Kandziora
Am Montag, 4. Dezember 2006 18:29 schrieb Serg Oskin:
 It is semantics owcapi.
 Use form
 OW::get [path] -list
 which returns tcl-list.
 In manpage has described. In Changelog did not write, sorry.

Ah, I see. Anyway, thanks for fixing the *.ALL behaviour to return a tcl list, 
too.

Kind regards

Jan
-- 
Microsoft and its customer are addicted to backwards compatibility
in a way that makes a heroin addict look silly.

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] owtcl in owfs2.5p7: Segmentation fault

2006-12-04 Thread Jan Kandziora
Am Montag, 4. Dezember 2006 18:59 schrieb Jan Kandziora:

Schnipp

I found another bug in owtcl. If an invalid request is forwarded to owlib, it 
doesn't change the reply buffer pointer at all, not even to NULL.
This e.g. leads to:


% OW::get bus.0/uncached/68689/present
*** glibc detected *** free(): invalid pointer: 0x080552d8 ***
Aborted
janskiste:~ #


To avoid having a patch of a patch, I made a collaboration patch for both 
problems:

--- module/swig/tcl/ow.c.orig   2006-12-04 17:55:23.0 +0100
+++ module/swig/tcl/ow.c2006-12-04 22:28:12.0 +0100
@@ -178,15 +178,21 @@
 }
   }

+  buf=NULL;
   r = OW_get(path, buf, ss);
   s = ss ; // to get around OW_get uses size_t
   if ( r0 ) {
 owtcl_ErrorMsg(interp, strerror(-r));
-free(buf);
+if (buf) free(buf);
 tcl_return = TCL_ERROR;
 goto common_exit;
   }

+  if (buf==NULL) {
+tcl_return = TCL_OK;
+goto common_exit;
+  }
+
   buf[s] = 0;
   if (lst) {
 if (strchr(buf, ',')) {

Kind regards

Jan
-- 
Wie kann eigentlich eine 1:1-Kopie nicht wörtlich sein?
Wahrscheinlich hat das Fernsehen meine Phantasie zerstört.
(Das habe ich jetzt nicht-wörtlich von den Simpsons geklaut,
selbst wäre ich zu einem solchen Gedanken natürlich nicht imstande.)

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] Problems compiling CVS

2006-12-04 Thread Gregg Levine
Hello!
Oh? Show me? I haven't had a problem building CVS since you pointed
out that CVS command. It actually builds here without any problems.

Also which release of SWIG is considered appropriate to building
anything for OWFS?

-- 
Gregg C Levine [EMAIL PROTECTED]
This signature was once found posting rude
 messages in English in the Moscow subway.

On 12/4/06, Alfille, Paul H.,M.D. [EMAIL PROTECTED] wrote:
 Well it would be better if owpython dependencies were better tested in the
 autoconf script. I always get clashes with the zend headers.

 Paul Alfille

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of Jan
 Kandziora
 Sent: Monday, December 04, 2006 10:40 AM
 To: owfs-developers@lists.sourceforge.net
 Subject: Re: [Owfs-developers] Problems compiling CVS

 Am Montag, 4. Dezember 2006 16:22 schrieb Jan Kandziora:
  Hi all,
 
 Forget the previous posting.

 $ ./configure --disable-owperl --disable-owpython --disable-owphp
 ^^   ^^
 did the trick.

 Kind regards

 Jan
 --
 People get annoyed when you try to debug them.
 -- Larry Wall

 -
 Take Surveys. Earn Cash. Influence the Future of IT
 Join SourceForge.net's Techsay panel and you'll get the chance to share your
 opinions on IT  business topics through brief surveys - and earn cash
 http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
 ___
 Owfs-developers mailing list
 Owfs-developers@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/owfs-developers

 -
 Take Surveys. Earn Cash. Influence the Future of IT
 Join SourceForge.net's Techsay panel and you'll get the chance to share your
 opinions on IT  business topics through brief surveys - and earn cash
 http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
 ___
 Owfs-developers mailing list
 Owfs-developers@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/owfs-developers


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] Problems compiling CVS

2006-12-04 Thread Christian Magnusson

Which python version do you have... Can you check with python -V...

Do you have the python module distutils on your computer?

ls -l /usr/lib/python*/distutils/__init__.py
ls -l /usr/lib/python*/distutils/core.py
ls -l /usr/lib/python*/distutils/extension.py

/Christian



On Mon, 2006-12-04 at 16:22 +0100, Jan Kandziora wrote:
 Hi all,
 
 I have a problem compiling the last week's CVS (owfs-2.5p7) with owtcl 
 support. I always get an error if SWIG is enabled, and disabling it disables 
 owtcl, too. Here's what I tried:
 
 $ aclocal  autoheader  autoconf  libtoolize -f -c  automake -a -c
 $ ./configure --disable-perl --disable-python
 $ make
 .
 .
 .
 Making all in swig
 make[2]: Entering directory `/vault/1/Software/sources/owfs/module/swig'
 Making all in perl5
 make[3]: Entering directory `/vault/1/Software/sources/owfs/module/swig/perl5'
 perl Makefile.PL MAKEFILE=Makefile.perl
 Warning: -L../../owlib/src/c/.libs changed to 
 -L/vault/1/Software/sources/owfs/module/swig/perl5/../../owlib/src/c/.libs
 Writing Makefile.perl for OW
 /usr/bin/swig -perl5 -o ow_wrap.c ../ow.i
 make -fMakefile.perl
 make[4]: Entering directory `/vault/1/Software/sources/owfs/module/swig/perl5'
 Skip blib/lib/OW.pm (unchanged)
 gcc -c  -I../../../src/include -I../../owlib/src/include  -D_REENTRANT 
 -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBUGGING -fno-strict-aliasing -pipe 
 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -march=i586 -mcpu=i686 
 -fmessage-length=0 -Wall -g -Wall -pipe   -DVERSION=\2.5p7\ 
 -DXS_VERSION=\2.5p7\ -fPIC 
 -I/usr/lib/perl5/5.8.6/i586-linux-thread-multi/CORE  -DSKIP_SEARCH_H 
 -DHAVE_CONFIG_H ow_wrap.c
 ow_wrap.c: In function `boot_OW':
 ow_wrap.c:1163: warning: unused variable `items'
 ow_wrap.c: At top level:
 ow_wrap.c:183: warning: `SWIG_Perl_TypeDynamicCast' defined but not used
 ow_wrap.c:195: warning: `SWIG_Perl_TypeName' defined but not used
 ow_wrap.c:201: warning: `SWIG_Perl_TypeQuery' defined but not used
 ow_wrap.c:487: warning: `SWIG_Perl_ConvertPtr' defined but not used
 ow_wrap.c:577: warning: `SWIG_Perl_NewPointerObj' defined but not used
 ow_wrap.c:596: warning: `SWIG_Perl_ConvertPacked' defined but not used
 ow_wrap.c:619: warning: `SWIG_Perl_SetErrorSV' defined but not used
 ow_wrap.c:624: warning: `SWIG_Perl_SetErrorf' defined but not used
 ow_wrap.c:988: warning: `swig_magic_readonly' defined but not used
 Running Mkbootstrap for OW ()
 chmod 644 OW.bs
 rm -f blib/arch/auto/OW/OW.so
 LD_RUN_PATH=/vault/1/Software/sources/owfs/module/swig/perl5/../../owlib/src/c/.libs:/usr/lib
  
 cc  -shared -Wl,-L../../owlib/src/c/.libs -Wl,-rpath=/opt/owfs/lib ow_wrap.o  
 -o blib/arch/auto/OW/OW.so   
 -L/vault/1/Software/sources/owfs/module/swig/perl5/../../owlib/src/c/.libs 
 -low -lpthread -ldl -lusb
 chmod 755 blib/arch/auto/OW/OW.so
 cp OW.bs blib/arch/auto/OW/OW.bs
 chmod 644 blib/arch/auto/OW/OW.bs
 make[4]: Leaving directory `/vault/1/Software/sources/owfs/module/swig/perl5'
 make[3]: Leaving directory `/vault/1/Software/sources/owfs/module/swig/perl5'
 Making all in python
 make[3]: Entering directory 
 `/vault/1/Software/sources/owfs/module/swig/python'
 Making all in ow
 make[4]: Entering directory 
 `/vault/1/Software/sources/owfs/module/swig/python/ow'
 make[4]: Für das Ziel »all« ist nichts zu tun.
 make[4]: Leaving directory 
 `/vault/1/Software/sources/owfs/module/swig/python/ow'
 make[4]: Entering directory 
 `/vault/1/Software/sources/owfs/module/swig/python'
 /usr/bin/swig -python -o ow_wrap.c ../ow.i
 python setup.py build
 Traceback (most recent call last):
   File setup.py, line 28, in ?
 from distutils.core import setup, Extension
 ImportError: No module named distutils.core
 make[4]: *** [OW.py] Fehler 1
 make[4]: Leaving directory `/vault/1/Software/sources/owfs/module/swig/python'
 make[3]: *** [all-recursive] Fehler 1
 make[3]: Leaving directory `/vault/1/Software/sources/owfs/module/swig/python'
 make[2]: *** [all-recursive] Fehler 1
 make[2]: Leaving directory `/vault/1/Software/sources/owfs/module/swig'
 make[1]: *** [all-recursive] Fehler 1
 make[1]: Leaving directory `/vault/1/Software/sources/owfs/module'
 make: *** [all-recursive] Fehler 1
 $
 
 
 What's wrong?
 
 Kind regards
 
   Jan
 
 -- 
 Even more amazing was the realization that God has internet access.
 I wonder if He has a full newsfeed?
   -- Matt Welsh
 
 -
 Take Surveys. Earn Cash. Influence the Future of IT
 Join SourceForge.net's Techsay panel and you'll get the chance to share your
 opinions on IT  business topics through brief surveys - and earn cash
 http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
 ___
 Owfs-developers mailing list
 Owfs-developers@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/owfs-developers


-
Take Surveys. Earn Cash. 

Re: [Owfs-developers] Problems compiling CVS

2006-12-04 Thread Peter Kropf
Can you provide some more details? Log file? What clashes with the zend headers?

- Peter


On 12/4/06, Alfille, Paul H.,M.D. [EMAIL PROTECTED] wrote:
 Well it would be better if owpython dependencies were better tested in the
 autoconf script. I always get clashes with the zend headers.

 Paul Alfille

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of Jan
 Kandziora
 Sent: Monday, December 04, 2006 10:40 AM
 To: owfs-developers@lists.sourceforge.net
 Subject: Re: [Owfs-developers] Problems compiling CVS

 Am Montag, 4. Dezember 2006 16:22 schrieb Jan Kandziora:
  Hi all,
 
 Forget the previous posting.

 $ ./configure --disable-owperl --disable-owpython --disable-owphp
 ^^   ^^
 did the trick.

 Kind regards

 Jan
 --
 People get annoyed when you try to debug them.
 -- Larry Wall

 -
 Take Surveys. Earn Cash. Influence the Future of IT
 Join SourceForge.net's Techsay panel and you'll get the chance to share your
 opinions on IT  business topics through brief surveys - and earn cash
 http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
 ___
 Owfs-developers mailing list
 Owfs-developers@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/owfs-developers

 -
 Take Surveys. Earn Cash. Influence the Future of IT
 Join SourceForge.net's Techsay panel and you'll get the chance to share your
 opinions on IT  business topics through brief surveys - and earn cash
 http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
 ___
 Owfs-developers mailing list
 Owfs-developers@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/owfs-developers


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


[Owfs-developers] allow_other

2006-12-04 Thread Justin
I have a custom 2.6.18 kernel on a 64bit system.  Using owfs 2.5p7 and
fuse 2.6.1

I can successfully mount my OW device (in a DS9490 holder) as root and
access the device.  But no matter what I do, the allow_other option is
not getting through.

cat /proc/mounts always shows:

OWFS /mymount fuse rw,nosuid,nodev,user_id=0,group_id=0 0 0

Similarly, allow_root doesn't get through.  (I understand they are
mutually exclusive).

Could this be an issue with my custom kernel?  Is it a 64bit issue perhaps?

I have user_allow_other in /etc/fuse.conf

Among the many forms I have tried:

/opt/owfs/bin/owfs -u --fuse_opt '-o allow_other' /mymount/
/opt/owfs/bin/owfs -u --fuse_opt \-o allow_other\ /mymount/

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] DS2408 LCD - can't get it to work

2006-12-04 Thread Ben Griffith

Thanks Paul!  It works!  Now I know my wiring was correct after all.

But... I think something might be broken with reading temperatures from
DS18S20s.  With version 2.5p7 I can read temperatures fine, but with the CVS
version if I try to use cat to view a temperature it returns Invalid
argument.  I've switched back and forth between the two versions several
times to verify...  With 2.5p7, catting the temperature works, and with CVS
it doesn't.  Same results using owperl from within MisterHouse.

-Ben


On 12/4/06, Paul Alfille [EMAIL PROTECTED] wrote:


Ok. CVS version will show on screen -- 1 line only so far.

A combination of software fixes, and then, after hours of frustration, I
took a screwdriver to the contrast pot. Screwdriver was not uploaded to
the CVS, but the code was.

This is for the Hobby Boards screen -- under
http://localhost:3001/29.73360100/LCD_H/screen for example.

Paul Alfille

On 12/4/06, Paul Alfille [EMAIL PROTECTED] wrote:

 Working on it.

 On 12/2/06, [EMAIL PROTECTED] [EMAIL PROTECTED]  wrote:
 
   Any chance to look into the 1-wire LCD functions yet?
 
  -Scott
 
 
 


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share
your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV

___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers



-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] owpython ... on Windows??

2006-12-04 Thread Peter Kropf
I was poking around the owserver protocol from Python to see if a
simple standalone python module can be created that doesn't have any
dependencies on the core ow libraries. I ran into a bit of a problem
with the protocol that's being used. Here's a hex dump of the data
that's returned when I request a directory of the root.

:    002a    0102  ...*
0010:  0005   6275 732e 3000 ec28  bus.0..(
0020:          
0030:          
0040:     002a     .*..
0050: 0102  0008   7365 7474 696e  ..settin
0060: 6773         gs..
0070:          
0080:      002a    ...*
0090:  0102  0006   7379 7374  syst
00a0: 656d         em..
00b0:          
00c0:       002a   .*..
00d0:   0102  000a   7374  ..st
00e0: 6174 6973 7469 6373      atistics
00f0:          
0100:        002a  ...*
0110:    0102  0010    
0120: 2f31 302e 4237 4236 3444 3030 3038 3030  /10.B7B64D000800
0130:          
0140:          
0150: 002a    0102  0010   .*..
0160:  2f32 362e 4146 3245 3135 3030 3030  ../26.AF2E15
0170: 3030         00..
0180:          
0190:  002a    0102  0010  ...*
01a0:   2f38 312e 4134 3443 3233 3030  /81.A44C2300
01b0: 3030 3030        
01c0:          
01d0:       0102   
01e0:   c002   ..


It shows (hex - decimal):
version: 0x0 - 0
payload length: 0x2a - 42
type: 0x0 - 0
format flags: 0x102 - 258
size of data: 0x5 - 5
offset - 0x0 - 0

The payload doesn't look quite right since there's a whole lot more
that's received from the server, 486 bytes total. The size of data
seems to correspond to the length of the first entry name w/ trailing
null - bus.0. But the rest doesn't make much sense to me. In looking
at the hex dump of the data, I see the various values that I would
expect in settings, system, statistics, etc. But I also see a whole
lot more data that seems to be extra.

I tried reading through the C headers and source but had trouble
making heads or tails of the code that would be putting the buffer
together to send over the network. I'm a wee bit lost here. So if
anyone has a good idea of what's going on, let me know.

Thanks!

- Peter


On 12/4/06, Paul Alfille [EMAIL PROTECTED] wrote:
 Ok, communication is via tcp.

  1. open port
  2. send a message
  3. wait for response (single response except for directories).
  4. close port

  Message has format:
   6 words (24 bytes) fixed header
   variable length payload
   Words must be sent in network order (bigendian I believe)
   Header is:
Version (use 0)
Payload (size of variable length in bytes)
Type (see below)
SG (basically temperature scale)
Size (for writes, size of data portion of payload)
Offset (for reads and writes, usually 0)
  Type
0 error
1 nop
2 read
3 write
4 dir
5 size (not used any more)
6 presence

  Basically, you set up the header, and follow it with payload, and send the
 whole thing.
  Payload is typically the path e.g. /10.12300432433/temperature
  Possibly followed with a value for writes.

  You get back about the same thing. The fields are slightly different (error
 codes, data length) but the value is in the payload.

  If you want to do this, I'm sure people would be glad to assist. It
 certainly sounds like an interesting project.

  Paul Alfille



 On 12/4/06, chris [EMAIL PROTECTED] wrote:
  On Monday 04 December 2006 12:02, Paul Alfille wrote:
   On 12/4/06, chris [EMAIL PROTECTED] wrote:
I understand that owfs is unlikely to run on windows but is it
 possible
to tun
  
   Au-contraire! (Though the windows port is not yet of the same quality.
   There have been reports of memory leaks that need to be investigated).
  
   owpython on a windows box connected to owserver without  resorting to
  
  
   Ahh! You want to communicate (with owserver?) via python, but not