Hi Stefano,
Thanks for your reply.
I don't understand why owserver would be necessary, since the application code
has a single local client process. The DS2482-800 has 8 channels, which appear
in the filesystem as bus.0 through bus.7, but bus.5 - bus.7 are not used. A
single DS2505 2KiB memory may be connected to bus.0 through bus.4. Each bus is
read in a loop to determine if an attachment is connected, as indicated by the
presence of the DS2505 0B family code in the filesystem. We're using owcapi
lread() to read the filesystem at
mnt/1wire/uncached/bus.n/0B.xxxxxxxxxxxx/memory as we sequence through the 5
buses that may have an attachment connected.
As stated in my previous message, the filesystem can be read from the bash
shell by the same non-root user that owns the application code, but filesystem
access from the application gives a "permission denied" error.
This is my first use of owfs and owcapi, so I may be misunderstanding its
correct usage.
Thanks,
Larry Howell
From: Stefano Miccoli [mailto:mo...@icloud.com]
Sent: Wednesday, September 10, 2014 7:28 PM
To: OWFS (One-wire file system) discussion and help
Subject: Re: [Owfs-developers] code not able to access owfs
Are both owfs and your application trying to access directly /dev/i2c-2:0 ? Has
the owcapi application the privileges for reading /dev/i2c?
If you run owfs, application programs should access sensors via the filesystem
(not owcapi).
Maybe a better approach is to run owserver (instead of owfs) to access the bus
and have application programs use ownet (see examples in
module/ownet/c/src/example).
>From 'man owserver'
owserver (1) is the backend component of the OWFS 1-wire bus
control
system. owserver (1) arbitrates access to the bus from multiple client
processes. The physical bus is usually connected to a serial or USB
port, and other processes connect to owserver (1) over network sockets
(tcp port). Communication can be local or over a network. Secure tun-
neling can be implemented using standard techniques.
Frontend clients include a filesystem representation: owfs (1) , and a
webserver: owhttpd (1). Direct language bindings are also available,
e.g: owperl (3). Several instances of each client can be initiated.
Each client can also connect directly to the physical bus, skipping
owserver (1) but only one client can connect to the physical bus
safely.
bye, Stefano
On 10 Sep 2014, at 17:43, Howell, Larry (Contractor)
<larry.how...@stryker.com<mailto:larry.how...@stryker.com>> wrote:
Our project is developing an embedded system running Linux 2.6.35 on an i.MX53.
Fuse is built in to the kernel. The system utilizes plugin devices that store
configuration data on internal DS2505s. We're using owfs-2.8p15 and writing
application code based on the owcapi. The system uses a DS2482-800 bus master
and the initialization parameters are 'i2c=/dev/i2c-2:0 -m mnt/1wire
--allow_other'. The filesystem mounts with expected permissions, and non-root
users can access the filesystem with no problem from the bash shell. However,
the application code fails all attempts at filesystem access with a 'permission
denied' error. Searching the owfs man pages hasn't provided any clues about
this problem. Any pointers or suggestions would be greatly appreciated.
Thanks for your help!
Larry Howell
------------------------------------------------------------------------------
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce
Perforce version control. Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk_______________________________________________
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net<mailto:Owfs-developers@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/owfs-developers
------------------------------------------------------------------------------
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce
Perforce version control. Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk
_______________________________________________
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers