Jan Kandziora | 1 Jul 09:06 2005
Picon
Picon

Re: More on "Hanging" Problems

Am Donnerstag, 30. Juni 2005 21:56 schrieb Christian Magnusson:
> You are right... The kernel thinks the usb adapter is physically
> removed and then inserted again and get a new device number.
> This problem is very fatal and question is if such thing should
> be handled by owfs.
>
Hm. owserver does handle the whole 1-Wire tunneling. If it could not handle 
exceptional situations, like network breakdown, by itself it has very few 
benefits to use it.

In that case, I would have to implement a secondary client-server-connection, 
which detects at least the errors correctly. In such a setup, owserver is no 
longer needed because my connection could transfer the 1-Wire data, too.

> It could of course be added to detect a new 
> 1-wire adapter if it disappears, but strange things can happen.
>
Does this apply if the hardware of the machine is not touched?

> Have you heard about any printer or scanner driver which solve the
> issue of a disconnected device?
>
That's a different world: home or small office appliances are known to fail 
often, most times beyond repair.

That's totally different from a commercial or industrial automation 
environment, where anthing must work as long as possible and any error that 
could be recovered from automatically must be recovered automatically. 

And sure, I can think of a driver which recovers from failures itself: TCP.
(Continue reading)

Christian Magnusson | 1 Jul 11:26 2005

Re: 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.0000000000)
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.0000000000 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

On Fri, 2005-07-01 at 09:06 +0200, Jan Kandziora wrote:
(Continue reading)

Alfille, Paul H.,M.D. | 1 Jul 17:48 2005

RE: 1-wire on Linux...

Matthew,

1. Hello and welcome aboard
2. The best place for questions (and answers) is the mailing list.
http://sourceforge.net/mail/?group_id=85502
3. The only driver you will need is for the user-space filesystem, FUSE.
http://fuse.sourceforge.net
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.
5. Access to the data is via filesystem, web server, or perl/python/tcl/php

Paul Alfille

-----Original Message-----
From: Matthew Percival [mailto:matthew <at> capgo.com]
Sent: Thursday, June 30, 2005 7:38 PM
To: Alfille, Paul H.,M.D.
Subject: 1-wire on Linux...

G'Day,

	I hope you do not mind me emailing you out of the blue like this, but I
was not sure where to take this question.

	I have recently been introduced to 1-wire, and now need to put a 1-wire
device onto a Linux system --- considering I am still learning what they
are, your OWFS will make this all a lot easier for me.  I just have a
simple question about kernel, however.  Obviously I will need to compile
in 1-wire support, but do I need to get a driver for the specific device
(Continue reading)

Alfille, Paul H.,M.D. | 1 Jul 17:50 2005

RE: More on "Hanging" Problems

This works for newer DS9490s, the older ones used an 01 device.

-----Original Message-----
From: owfs-developers-admin <at> lists.sourceforge.net
[mailto:owfs-developers-admin <at> lists.sourceforge.net]On Behalf Of
Christian Magnusson
Sent: Friday, July 01, 2005 5:26 AM
To: owfs-developers <at> lists.sourceforge.net
Cc: Paul Alfille; jjj <at> gmx.de
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.0000000000)
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.0000000000 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
(Continue reading)

Christian Magnusson | 3 Jul 16:43 2005

RE: More on "Hanging" Problems


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.
(Continue reading)

Matthew Percival | 4 Jul 01:07 2005

Re: RE: 1-wire on Linux...

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?

(Continue reading)

Paul Alfille | 4 Jul 01:22 2005
Picon
Picon

Re: RE: 1-wire on Linux...

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
(Continue reading)

Matthew Percival | 4 Jul 01:54 2005

Re: RE: 1-wire on Linux...

G'Day,

> > 	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

	Yes, the missing headers are OW device headers.  I have just finished a
possible solution: I realised a daily build should have those header
files! I downloaded the one from 7th April (so it was the day after the
release version), and added in the following headers:
		ow_1923.h
		ow_1977.h
		ow_2413.h
		ow_2433.h
		ow_1991.h
		ow_1963.h
		ow_2760.h
It now compiles!  Well, owfs and oshttpd: the others are likely missing
a great deal more.
(Continue reading)

Paul Alfille | 4 Jul 02:24 2005
Picon
Picon

Re: RE: 1-wire on Linux...

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
(Continue reading)

Matthew Percival | 4 Jul 03:16 2005

Re: RE: 1-wire on Linux...

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=7477&alloc_id=16492&op=click

Gmane