[prev in list] [next in list] [prev in thread] [next in thread] 

List:       owfs-developers
Subject:    Re: [Owfs-developers] Access to 1-wire via owhttpd
From:       Mick Sulley <mick () sulley ! info>
Date:       2011-04-08 21:54:16
Message-ID: 1302299656.4419.16.camel () mick-desktop
[Download RAW message or body]

Hi Paul,

Thanks for you help (again!!)

I have it working now but I am still somewhat confused.  As far as I can
see the problem was that I started owfs with 

/opt/owfs/bin/owfs -s localhost:3001 -m
-a /home/share/solar/sensor_list4.1 /var/1-wire/mnt

which looks a bit odd having '-m' followed by '-a'.  I have now changed
this to 

/opt/owfs/bin/owfs -s localhost:4304 -a /home/share/solar/sensor_list4.1
-m /var/1-wire/mnt

and it all works!  I would have expected none of it to work with my
original format but owfs was working fine.

One other question, to make my system a bit more robust it looks through
the ports to find the one with the 1-wire network by looking at the
number of directory entries in the mounted directory, should be more
than 7 for a valid network.  During testing I found that this was
failing and eventually discovered that I needed a delay between issuing
the owfs command and reading the directory. I don't like using pauses to
fix problems like that, is there some way to see if owfs is started
correctly?

Thanks
Mick

On Wed, 2011-04-06 at 21:38 -0400, Paul Alfille wrote:
> I'm a little perplexed, Mick.
> 
> I just tried your scenario, successfully.
> Let's try some steps:
> 
> 1. Start owhttpd with the --debug setting to see if there are any
> informative messages
> 2. Try using --debug on owserver, you should see if owhttpd is
> actually making calls to owserver
> 3. Look at the bus.0/interface/settings/address should be something
> like localhost:3001
> 4. /bus.0/bus.0/interface/settings/address should show the serial master
> 
> Finally, do you know what version of OWFS you are using?
> 
> Paul Alfille
> 
> On Wed, Apr 6, 2011 at 7:09 PM, Mick Sulley <mick@sulley.info> wrote:
> > Hi Paul,
> >
> > I can look at the mounted directory and it is all there with all the
> > sensors.  My python program reads all the sensors and logs values to a
> > database, that is all working, so I assume that owserver and owfs are
> > working OK.
> >
> > If I run 'pkill owhttpd' on the server I can no longer see it on my
> > laptop, which is what I would expect.
> >
> > What else can I test?  Where can I go from here?
> >
> > Thanks
> > Mick
> >
> > On Wed, 2011-04-06 at 18:26 -0400, Paul Alfille wrote:
> >> Your setup sounds entirely correct.
> >>
> >> You have owserver on port 3001 and owhttpd serving on 3000.
> >>
> >> I suspect that there is a problem with owserver seeing the bus, or
> >> owhttpd seeing owserver -- can you test owfs or owdir locally at the
> >> same time as you test owhttpd remotely?
> >>
> >> Basically seeing bus.0 etc says that you are indeed talking to
> >> owhttpd, but it seems that owhttpd isn't seeing owserver well. My
> >> suggestion is to find another way to test owserver function.
> >>
> >> Regarding port choices. Owserver has been assigned 4304 as a default
> >> port by the IANA. There is no default assignment for owhttpd, which is
> >> a pure web serving application. Any ports that are open, and
> >> preferably above the system threshold of 1024 are fair game.
> >>
> >> Paul Alfille
> >>
> >> On Wed, Apr 6, 2011 at 5:23 PM, Mick Sulley <mick@sulley.info> wrote:
> >> > Hi,
> >> >
> >> > My 1-wire network is up and running on an Ubuntu server using owserver
> >> > and owfs and I access it via python for controlling stuff.  I now want
> >> > to also access the network using owhttpd but can't get it to work.
> >> >
> >> > I start the services with
> >> > /opt/owfs/bin/owserver -p 3001 -d /dev/ttyS1
> >> >
> >> > /opt/owfs/bin/owfs -s localhost:3001 -m
> >> > -a /home/share/solar/sensor_list4.1 /var/1-wire/mnt
> >> >
> >> > That works fine,  I now start owhttpd with
> >> > /opt/owfs/bin/owhttpd -p 3000 -s localhost:3001
> >> >
> >> > That is all on my server called 'solar'.  I now use a browser on my
> >> > laptop and go to
> >> > http://solar:3000/
> >> >
> >> > I see the owfs web page but there are no devices.  There are the normal
> >> > 'bus.0', 'ubcached', etc, but no devices.
> >> >
> >> > My knowledge of networks is somewhat limited and I suspect I have done
> >> > something stupid, can anyone enlighten me please?  Also does it matter
> >> > which ports I use?  Are there any conventions for this.
> >> >
> >> > Thanks
> >> > Mick
> >> >
> >> >
> >> > ------------------------------------------------------------------------------
> >> > Xperia(TM) PLAY
> >> > It's a major breakthrough. An authentic gaming
> >> > smartphone on the nation's most reliable network.
> >> > And it wants your games.
> >> > http://p.sf.net/sfu/verizon-sfdev
> >> > _______________________________________________
> >> > Owfs-developers mailing list
> >> > Owfs-developers@lists.sourceforge.net
> >> > https://lists.sourceforge.net/lists/listinfo/owfs-developers
> >> >
> >
> >
> >
> > ------------------------------------------------------------------------------
> > Xperia(TM) PLAY
> > It's a major breakthrough. An authentic gaming
> > smartphone on the nation's most reliable network.
> > And it wants your games.
> > http://p.sf.net/sfu/verizon-sfdev
> > _______________________________________________
> > Owfs-developers mailing list
> > Owfs-developers@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/owfs-developers
> >



------------------------------------------------------------------------------
Xperia(TM) PLAY
It's a major breakthrough. An authentic gaming
smartphone on the nation's most reliable network.
And it wants your games.
http://p.sf.net/sfu/verizon-sfdev
_______________________________________________
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic