RE: [Owfs-developers] More on Hanging Problems

2005-07-03 Thread Christian Magnusson

Hi again,

Even my friend Thomas who use owfs and temploggerd had an enumerated USB
adapter 2 days ago, and he doesn't have any light switches or anything
else close to the adapter. I think I finally have solved the problem
now.

I made some updates at work on a Fedora core 4 with a 2.6.11 kernel.
It worked pretty good, but when I tested the code on my server at home
with 2.4.22 I had some hard USB errors and even some kernel panics.

It seems like it's impossible to handle an usb-device with timeouts
and read-errors in a good way, so I have to close the usb-handle and
re-open it every time I get some communication problem. It doesn't take
much time at all, but it's not necessary to do that on the 2.6.11
kernel. If the adapter couldn't be found, then owfs will continue with
scanning the usb-bus every time until it's found again.

Anyway, the code need some more cleanup, but it works very good on my
two servers now You can disconnect a device and plugin it somewhere
else if you want, and it will be reconnected and used like before.
The 81 or 01 device is saved as a unique identifier to the adapter. If
those aren't found (if user have a single DS2490 chip), the last found
1-wire device is saved as an identifier.

/Christian


On Fri, 2005-07-01 at 17:50, Alfille, Paul H.,M.D. wrote:
 This works for newer DS9490s, the older ones used an 01 device.
 
 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] Behalf Of
 Christian Magnusson
 Sent: Friday, July 01, 2005 5:26 AM
 To: owfs-developers@lists.sourceforge.net
 Cc: Paul Alfille; [EMAIL PROTECTED]
 Subject: Re: [Owfs-developers] More on Hanging Problems
 
 
 
 I have done some testing with it, and have managed to reconnect the
 adapter even if it's unplugged manually. It's perhaps not a very
 nice solution, but it works at least.
 
 Right now it detects the 1-wire adapters as usual at startup. At the
 first 1-wire scan, the serial number of the ds1420 chip (81.00)
 is saved in the connin.usb struct.
 
 If the adapter fails at *_reset(), owserver tries to close the
 usb-handle, and reopen it as I did before (it solves most situations).
 
 If it's not possible to reopen the usb device, then I assume the USB
 adapter is unplugged (manually or by some EMP problem). It will then do
 a full usb device-scan (which is done at startup). If an USB adapter is
 found, I make a 1-wire scan on it. If the 1-wire device 81.00 is
 found, I use this usb-adapter in the future. It works even if you unplug
 it and reconnect it to some other usb-hub.
 
 It works pretty good for me, and I assume it will solve your problem
 too when it's a small glitch and the kernel thinks it's disconnected.
 
 I will cleanup the source and checkin the changes during the day. It
 will be nice to hear if it works for you too after that.
 
 Paul, do you have any comments about it?
 
 /Christian
 




---
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477alloc_id=16492op=click
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] RE: 1-wire on Linux...

2005-07-03 Thread Matthew Percival
G'Day,

Thanks for your replies: they are extremely helpful!

 4. Almost all the devices are supported, you don't need anything extra. This
 includes temperature, memory, switches, voltage, current, timers, counters and
 some LCD and humidity 3rd party devices.

The particular device I am going to use is not yet supported, but it
sounds like I should be able to add it easily enough --- at least, the
website makes it sound easy!

 5. Access to the data is via filesystem, web server, or perl/python/tcl/php

I have tried to compile the 2.1.0 version available for download, but
there seems to be some problems with the tarball.  Namely, there are an
awful lot of files missing!  I cannot get configure to complete because
many of the files used by automake are missing (the ones for perl, php,
python and tcl); if I use touch to fake these (as I do not plan on
compiling them at the moment), I still cannot get it to compile because
at least one header file is missing (I say `at least' because it would
be not so quick and easy to write a placeholder file and see if I can
compile any further).

I tried using a few different daily builds, and had other problems with
them, though I did manage to at least compile a (probably out of date)
version of owlib.  I tried downloading 2.1.0 from a different mirror
too, and still had the same problems.  Does anyone have a quick and easy
solution for this?

Thanks,

Matthew



---
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477alloc_id=16492op=click
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] RE: 1-wire on Linux...

2005-07-03 Thread Paul Alfille
On Sunday 03 July 2005 07:07 pm, Matthew Percival wrote:
 G'Day,

   Thanks for your replies: they are extremely helpful!

  4. Almost all the devices are supported, you don't need anything extra.
  This includes temperature, memory, switches, voltage, current, timers,
  counters and some LCD and humidity 3rd party devices.

   The particular device I am going to use is not yet supported, but it
 sounds like I should be able to add it easily enough --- at least, the
 website makes it sound easy!

  5. Access to the data is via filesystem, web server, or
  perl/python/tcl/php

   I have tried to compile the 2.1.0 version available for download, but
 there seems to be some problems with the tarball.  Namely, there are an
 awful lot of files missing!  I cannot get configure to complete because
 many of the files used by automake are missing (the ones for perl, php,
 python and tcl); if I use touch to fake these (as I do not plan on
 compiling them at the moment), I still cannot get it to compile because
 at least one header file is missing (I say `at least' because it would
 be not so quick and easy to write a placeholder file and see if I can
 compile any further).

Did you install FUSE first? http://fuse.sf.net

./configure --disable-owtcl --disable-owperl --disable-owphp 
--disable-owpython
   I tried using a few different daily builds, and had other problems with
 them, though I did manage to at least compile a (probably out of date)
 version of owlib.  I tried downloading 2.1.0 from a different mirror
 too, and still had the same problems.  Does anyone have a quick and easy
 solution for this?

   Thanks,

   Matthew



 ---
 SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
 from IBM. Find simple to follow Roadmaps, straightforward articles,
 informative Webcasts and more! Get everything you need to get up to
 speed, fast. http://ads.osdn.com/?ad_id=7477alloc_id=16492op=click
 ___
 Owfs-developers mailing list
 Owfs-developers@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/owfs-developers


---
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477alloc_id=16492op=click
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] RE: 1-wire on Linux...

2005-07-03 Thread Paul Alfille
It shouldn't be this difficult.

What platform are you running?

Paul

On Sunday 03 July 2005 07:07 pm, Matthew Percival wrote:
 G'Day,

   Thanks for your replies: they are extremely helpful!

  4. Almost all the devices are supported, you don't need anything extra.
  This includes temperature, memory, switches, voltage, current, timers,
  counters and some LCD and humidity 3rd party devices.

   The particular device I am going to use is not yet supported, but it
 sounds like I should be able to add it easily enough --- at least, the
 website makes it sound easy!

  5. Access to the data is via filesystem, web server, or
  perl/python/tcl/php

   I have tried to compile the 2.1.0 version available for download, but
 there seems to be some problems with the tarball.  Namely, there are an
 awful lot of files missing!  I cannot get configure to complete because
 many of the files used by automake are missing (the ones for perl, php,
 python and tcl); if I use touch to fake these (as I do not plan on
 compiling them at the moment), I still cannot get it to compile because
 at least one header file is missing (I say `at least' because it would
 be not so quick and easy to write a placeholder file and see if I can
 compile any further).

   I tried using a few different daily builds, and had other problems with
 them, though I did manage to at least compile a (probably out of date)
 version of owlib.  I tried downloading 2.1.0 from a different mirror
 too, and still had the same problems.  Does anyone have a quick and easy
 solution for this?

   Thanks,

   Matthew



 ---
 SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
 from IBM. Find simple to follow Roadmaps, straightforward articles,
 informative Webcasts and more! Get everything you need to get up to
 speed, fast. http://ads.osdn.com/?ad_id=7477alloc_id=16492op=click
 ___
 Owfs-developers mailing list
 Owfs-developers@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/owfs-developers


---
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477alloc_id=16492op=click
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] RE: 1-wire on Linux...

2005-07-03 Thread Matthew Percival
G'Day,

 It shouldn't be this difficult.
 
 What platform are you running?

I am not using a particularly standard environment.  Well, I am
building it on standard desktop, but the target machine is an OMAP5912
--- owfs/owhttpd will run on an ARM.  The board has hardware support for
1-wire, but I shall not be worrying about that just at the moment; later
on, I shall likely try to make use of this though.  We shall be adding a
DS2431 to the board, which is where the 1-wire will come into play.

This is perhaps sliding a little off topic, but would it be possible to
share the fuse.ko line in modules.dep?  I have to build this file
manually (depmod is not available), but have not been able to find out
what the line should look like for that module.

-- Matthew



---
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477alloc_id=16492op=click
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] RE: 1-wire on Linux...

2005-07-03 Thread Paul Alfille
So your download doesn't include relevant files like 
modules/owlib/src/include/*.h ?

Perhaps a CVS pull?

Then ./bootstrap
make install

and you're set.

Paul

On Sunday 03 July 2005 09:16 pm, Matthew Percival wrote:
 G'Day,

  It shouldn't be this difficult.
 
  What platform are you running?

   I am not using a particularly standard environment.  Well, I am
 building it on standard desktop, but the target machine is an OMAP5912
 --- owfs/owhttpd will run on an ARM.  The board has hardware support for
 1-wire, but I shall not be worrying about that just at the moment; later
 on, I shall likely try to make use of this though.  We shall be adding a
 DS2431 to the board, which is where the 1-wire will come into play.

   This is perhaps sliding a little off topic, but would it be possible to
 share the fuse.ko line in modules.dep?  I have to build this file
 manually (depmod is not available), but have not been able to find out
 what the line should look like for that module.

   -- Matthew



 ---
 SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
 from IBM. Find simple to follow Roadmaps, straightforward articles,
 informative Webcasts and more! Get everything you need to get up to
 speed, fast. http://ads.osdn.com/?ad_id=7477alloc_id=16492op=click
 ___
 Owfs-developers mailing list
 Owfs-developers@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/owfs-developers


---
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477alloc_id=16492op=click
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] RE: 1-wire on Linux...

2005-07-03 Thread Paul Alfille
On Sunday 03 July 2005 09:16 pm, Matthew Percival wrote:
 G'Day,

  It shouldn't be this difficult.
 
  What platform are you running?

   I am not using a particularly standard environment.  Well, I am
 building it on standard desktop, but the target machine is an OMAP5912
 --- owfs/owhttpd will run on an ARM.  The board has hardware support for
 1-wire, but I shall not be worrying about that just at the moment; later
 on, I shall likely try to make use of this though.  We shall be adding a
 DS2431 to the board, which is where the 1-wire will come into play.

Note ARM support probably will take some wizardry from Christian.


   This is perhaps sliding a little off topic, but would it be possible to
 share the fuse.ko line in modules.dep?  I have to build this file
 manually (depmod is not available), but have not been able to find out
 what the line should look like for that module.

/lib/modules/2.4.21-226-athlon/kernel/fs/fuse/fuse.ko
   -- Matthew




 ---
 SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
 from IBM. Find simple to follow Roadmaps, straightforward articles,
 informative Webcasts and more! Get everything you need to get up to
 speed, fast. http://ads.osdn.com/?ad_id=7477alloc_id=16492op=click
 ___
 Owfs-developers mailing list
 Owfs-developers@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/owfs-developers


---
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477alloc_id=16492op=click
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] RE: 1-wire on Linux...

2005-07-03 Thread Matthew Percival
G'Day,

 So your download doesn't include relevant files like 
 modules/owlib/src/include/*.h ?

Not all of them, but several; module/swig/ is mostly empty too.

 Perhaps a CVS pull?

I used CVS to make the difference: I figured the rest should be right,
so by adding the missing *.h files it should work.  That gets a compile,
but that is how I get up to the other problems (modules.dep so I can use
FUSE, and thus owfs, and it not finding libow.0, which keeps osfs AND
owhttpd from working)

Thanks,

Matthew



---
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477alloc_id=16492op=click
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] RE: 1-wire on Linux...

2005-07-03 Thread Matthew Percival
G'Day,

Thanks for all the help: I now seem to have the basics sorted out!

Firstly, with FUSE, I never would have guessed it was just a blank
line: I was sure there would be at least one other module to be loaded.
Secondly, to paths, by making --prefix=/usr/local and installing it onto
the build machine, then moving it to the target, I was able to get
things to work.  Using --prefix to install it to the NFS root or
manually installing both caused a variety of problems.

I am now able to mount owfs without any troubles --- at the moment,
that does not do much good, but it is reassuring to know that this much
works fine.  owhttpd does not seem to work though: when I run it on the
ARM machine, I cannot access it from a browser on this one (the build
machine).  The ARM has thttpd running on port 80, which I can access, so
I know that the problem is not network or anything like that.  One point
of note is that when I execute the command (owhttpd -p 3001
-d /dev/ttyS1), it just hangs there: I never get the prompt back.  That
is probably a pretty fair indication as to why I cannot access it with
the browser.  Not a major concern though, as owfs was the the component
I was most interested in.

I now just have to add support for the DS2431.  I would imagine that
you would be interested in having that once I have it working: how would
I best go about getting that to the project?

Thanks for the help: it has been exceptional!

Matthew



---
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477alloc_id=16492op=click
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers