Roland asked to see my config file:

> can you show here your complete config (/etc/owfs.conf)?
> May it be, that you have not set by the server the specific port and IP 
> address?

It is the default Ubuntu 14.04 install, modified with server pointed at my w1 
hardware, and the FAKE devices commented: 
-----
# Sample configuration file for the OWFS suite for Debian GNU/Linux.
#
#
# This is the main OWFS configuration file. You should read the
# owfs.conf(5) manual page in order to understand the options listed
# here.

######################## SOURCES ########################
#
# With this setup, any client (but owserver) uses owserver on the
# local machine...
! server: server = localhost:4304
#
# ...and owserver uses the real hardware, by default fake devices
# This part must be changed on real installation
# server: FAKE = DS18S20,DS2405  # LA140622 commented
#
# USB device: DS9490
#server: usb = all
server: w1  # LA140622 added
#
# Serial port: DS9097
#server: device = /dev/ttyS1
#
# owserver tcp address
#server: server = 192.168.10.1:3131
#
# random simulated device
#server: FAKE = DS18S20,DS2405
#
######################### OWFS ##########################
#
#mountpoint = /mnt/1wire
#allow_other
#
####################### OWHTTPD #########################

http: port = 2121

####################### OWFTPD ##########################

ftp: port = 2120

####################### OWSERVER ########################

server: port = localhost:4304

-----

As far as I can tell it sets up server and httpd properly, and they seem to 
work. Except I get a lot of temperature values of -62, from several a day to 
several an hour: 

---
Thu Jul 03 2014 22:15:01 GMT-0700 (PDT)
cd 01 4b 46 7f ff 03 10 4a : crc=4a YES
cd 01 4b 46 7f ff 03 10 4a t=28812
Thu Jul 03 2014 22:20:02 GMT-0700 (PDT)
ff ff ff ff ff ff ff ff ff : crc=c9 NO
cd 01 4b 46 7f ff 03 10 4a t=-62
---

The first line of the bad reading is obviously bad, but the second line is 
correct just like the previous reading. I'd expect either "85", the value from 
the bad read in the first line, or the 28.812 value signified by the correct 
actual data in the second line. But no, always "-62"! 

Why are there two lines there? On a successful read they always match...  

So when Paul mentioned "two processes competing for the same resource" I got 
curious. My config does not explicitly tell owfs to read from server. In fact, 
I don't see any owfs process at all! But the filesystem is present, and it gets 
updated even while server is not running! That would seem to say owfs is 
running...  Somehow...  

Here's a bit of my startup:
---
* Starting regular background program processing daemon                 [ OK ]
* Stopping save kernel messages                                         [ OK ]
* CPU0...                                                               [ OK ]
* Starting 1-Wire FTP server owftpd                                     [ OK ]
* Starting 1-Wire HTTP Daemon owhttpd                                   [ OK ]
* Starting 1-Wire TCP Server owserver                                   [ OK ]
* speech-dispatcher disabled; edit /etc/default/speech-dispatcher
---

And here's what gets shutdown:
---
* Stopping 1-Wire FTP server owftpd          [ OK ]
* Stopping 1-Wire HTTP Daemon owhttpd        [ OK ]
* Stopping 1-Wire TCP Server owserver        [ OK ]
---

Here's all the processes that seem to relate to owfs:
---
ps -eflT
...
1 S root      1151  1151     1  0  80   0 -  5009 ?      Oct19 ?        
00:00:00 /usr/bin/owftpd -c /etc/owfs.conf --pid-file /var/r
1 S root      1151  1362     1  0  80   0 -  5009 ?      Oct19 ?        
00:00:00 /usr/bin/owftpd -c /etc/owfs.conf --pid-file /var/r
1 S root      1151  1363     1  0  80   0 -  5009 ?      Oct19 ?        
00:02:12 /usr/bin/owftpd -c /etc/owfs.conf --pid-file /var/r
...
1 S root      1729  1729     2  0  80   0 -     0 ?      Oct19 ?        
00:42:11 [w1_bus_master1]
...
0 S ubuntu    1935  1935     1  0  80   0 -  6304 -      Oct19 ?        
00:00:00 /usr/lib/gvfs/gvfsd
1 S ubuntu    1935  1936     1  0  80   0 -  6304 -      Oct19 ?        
00:00:00 /usr/lib/gvfs/gvfsd
0 S ubuntu    1939  1939     1  0  80   0 - 10118 -      Oct19 ?        
00:00:00 /usr/lib/gvfs/gvfsd-fuse /run/user/1000/gvfs -f -o
1 S ubuntu    1939  1943     1  0  80   0 - 10118 -      Oct19 ?        
00:00:00 /usr/lib/gvfs/gvfsd-fuse /run/user/1000/gvfs -f -o
1 S ubuntu    1939  1944     1  0  80   0 - 10118 -      Oct19 ?        
00:00:00 /usr/lib/gvfs/gvfsd-fuse /run/user/1000/gvfs -f -o
1 S ubuntu    1939  1945     1  0  80   0 - 10118 -      Oct19 ?        
00:00:00 /usr/lib/gvfs/gvfsd-fuse /run/user/1000/gvfs -f -o
1 S ubuntu    1939  1946     1  0  80   0 - 10118 -      Oct19 ?        
00:00:00 /usr/lib/gvfs/gvfsd-fuse /run/user/1000/gvfs -f -o
...
1 S root     13064 13064     1  0  80   0 -  2957 ?      Oct26 ?        
00:00:00 /usr/bin/owhttpd -c /etc/owfs.conf --pid-file /var/
5 S root     13605 13605     1  0  80   0 - 13451 ?      Oct26 ?        
00:00:00 /usr/bin/owserver -c /etc/owfs.conf --pid-file /var
1 S root     13605 13607     1  0  80   0 - 13451 ?      Oct26 ?        
00:00:00 /usr/bin/owserver -c /etc/owfs.conf --pid-file /var
...
---
 
Strange that ftpd, which I never use, is the only one (other than w1) showing 
runtime...  

Maybe one of the sub-processes is really owfs? Those are all I ever see. 

My config includes the owfs lines:
#mountpoint = /mnt/1wire
#allow_other
but they are commented. 

My filesystem doesn't appear at /mnt/1wire. It is at /sys/devices, like the 
BeagleBone Black "cape manager". When I want to start owfs, I give the command: 
echo w1 >/sys/devices/bone_capemgr.9/slots
and that makes the filesystem appear:
---
root@ubuntu-armhf:/sys/devices/w1_bus_master1# ls
28-000000884d88  w1_master_attempts         w1_master_search
driver           w1_master_max_slave_count  w1_master_slave_count
power            w1_master_name             w1_master_slaves
subsystem        w1_master_pointer          w1_master_timeout
uevent           w1_master_pullup
w1_master_add    w1_master_remove
---

But I don't understand how...  The server, httpd, and ftpd processes are 
automatically started by Ubuntu, but the filesystem doesn't appear until I give 
the "w1" command to the cape manager. 

I understand what Roland's and Paul's config files do. I don't understand how 
my own system creates the owfs filesystem without any obvious owfs process or 
config! 

Loren

| Loren Amelang | lo...@pacific.net |


On Thursday, October 30, 2014 at 1:11 AM,
owfs-developers-requ...@lists.sourceforge.net wrote:

 
> 1. Re: Config owfs to use server? (Paul Alfille)
> 2. Re: Config owfs to use server? (Roland Franke)
> 
> 
> ----------------------------------------------------------------------
> 
> Message: 1
> Date: Wed, 29 Oct 2014 20:13:57 -0400
> From: Paul Alfille <paul.alfi...@gmail.com>
> Subject: Re: [Owfs-developers] Config owfs to use server?
> To: "OWFS (One-wire file system) discussion and help"
> <owfs-developers@lists.sourceforge.net>
> Message-ID:
> <CAP_SGzdzVA_=xnr6yadcg+i9dhcrwl13j_tolhqwkyqrbjh...@mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
> 
> Hi Roland,
> 
> Maybe I can help you understand the process.
> 
> Say you want to run owfs, owserver and owhttpd with a USB device and
> Fahrenheit temperature scale.
> 
> Purely from the command line you would run:
> 
> owserver -F -u -p 4304 # reads from USB, serves port 4304
> owfs -F -m /var/temp/1wire -s 4304 # reads from owserver, mounts
> /var/temp/1wire
> owhttpd -F -s 4304 -p 4444 # reads from owserver, web serves
> localhost:4444 # notice that only owserver talks directly to the hardware
> bus master, everything else talks to owserver
> 
> You could write a configuration file (/etc/owfs.conf) like this:
> -F
> !server: -s 4304
> server: -u
> server: -p 4304
> owfs: -m /var/temp/1wire
> owfs: --allow-other
> owhttpd: -p 4444
> 
> The advantage is that all the programs can simply be run with
> owserver -c /etc/owfs.conf
> owfs -c /etc/owfs.conf
> owhttpd -c /etc/owfs.conf
> 
> Note that many options apply to all ( like -F)
> Some apply to owserver and some to the all others
> Some are program-specific
> Also the name /etc/owfs.conf is conventional, but completely arbitrary.
> None of the programs look for any file unless explicitly specified. No
> "magic" files.
> 
> Often the distribution packages set up a skeleton configuration file, and
> run all the programs. They usually are pretty well documented.
> 
> Paul
> 
> On Wed, Oct 29, 2014 at 3:54 PM, Roland Franke <fl...@franke-prem.de>
> wrote:

>> Hallo again,
>> can you show here your complete config (/etc/owfs.conf)?
>> May it be, that you have not set by the server the specific port and IP
>> address?
>> 
>> Like by me is here:
>> server: usb                                                 -> Where is
>> the hardware connected (By you w1)
>> server: port = 127.0.0.1:4304                    -> What IP address and
>> port
>> should the server use for connecting from other modules
>> server: pid_file = /var/run/owsever.pid    -> you can specific also the
>> place where the .pid file will be stored and must not been seperately
>> 
>> been set in the owfs.conf
>> 
>> Best regards,
>> Roland
>>




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

Reply via email to