Hi Paul,

thanks for briefing me on the architecture of OWFS. My master chip has almost 
exactly the same register interface as Dallas DS1WM 
(http://datasheets.maximintegrated.com/en/ds/DS1WM.pdf). It only differs in one 
register:
Clock divisor register (0x04) is missing and instead there’s Output Channel 
Multiplexer register on the same address (0x04). This register is used to 
enable handling of multiple channels (1wire busses) by single chip.

I’ll be greatful on any further hints.

Thank you,
Martin

From: Paul Alfille [mailto:paul.alfi...@gmail.com]
Sent: Thursday, February 19, 2015 2:39 AM
To: owfs-developers
Subject: Re: [Owfs-developers] Add support for additional hardware bus master


Adding support for a new bus-master chip is actually rather easy. OWFS only 
requires a few functions be supported. This is actually the point of OWFS: the 
bus master and slave functions are encapsulated easily. Since we support so 
many different devices, the level of abstraction is very precise.

1. Detection/configuration step. This includes any hardware configuration and 
setting up the communication channel (e.g. open the serial port and setting 
baud rate).

2. Sending a set of bits or bytes and reading the bus ( works for reading, too, 
when sending 0xFF's ).

3. Some kind of "discovery" to enumerate the 1-wire slaves. Often hardware 
assisted.

4. Optional "Power bit".

You'll also need to add a command line configuration option. If you can 
describe your bus master to me, I can easily write a rough draft that you can 
test and perfect. (Or send me a sample).

Paul Alfille
On Feb 18, 2015 3:59 PM, "Martin Rapavy" 
<martin.rap...@kistler.com<mailto:martin.rap...@kistler.com>> wrote:
> Am 18.02.2015 um 21:19 schrieb Martin Rapavy:
> > I was exactly in favor of avoiding w1 because of bus polling. It is
> > important for me not to use the bus frequently (the wire is also
> > shared for reading out data from sensors). Do you think that the w1
> > polling might be turned off using w1_master_search (w1 sysfs
> > interface)?
> >
> That's exactly the purpose of this node. OWFS sends an explicit search
> command through the netlink socket to the w1 driver at
>
>         module/owlib/src/c/ow_w1.c, line 112ff
>
> so turning off w1_master_search only affects other services which rely
> on it. BUT: depending on your hardware, hot-plugging a battery may
> already rely on this! It's a bit of a pity this is a global flag and
> cannot be turned off by bus. Check your hardware whether it has other
> services on another onewire.

> Second pitfall: if your hardware has several buses, the w1 driver will
> all join them into one.
I guess this is really a deal-breaker. There really might be multiple buses 
(onewire channels) connected to that piece of hardware.

> Nevertheless, patching the DS1WM w1 driver may be sufficient and easy
> enough.
>
>
> >> Option B -------- Write a fake I²C host adaptor kernel driver which
> >> creates a new "I²C bus", with your onewire host adaptor the only
> >> device "connected" to that "bus. This may be the easiest option if
> >> your device behaves very much like the original DS2482. OWFS drops
> >> in neatly, no strings attached.
> >
> > I like this approach but I guess I should have been more clear on
> similarity with DS2482 -- it is conceptually similar (hardware based
> multichannel bus master chip) but the interface is different. The
> interface of that custom chip closely matches DS1WM.
>
> Then this is *not* the way to go.
>
>
>
> >> Option C -------- Memory-mapped IO from userspace, which is *UGH!*.
> >> See module/owlib/src/c/ow/ow_ds2482.c for all the things to write
> >> and change. The disadvantage is owfs has to run as root to do
> >> MMIO.
> > I don't mind running under root. I suppose this is the only feasible
> > option if I don't want to use Linux w1. I will have a look into that
> > source.
> >
> Well, if you don't show it to anyone... (^__^);
I'm aware of non-reusability of that solution but on the other hand also quite 
specific piece of hardware and from your selection of choices I don't see any 
other way. Am I right?

Best regards,
Martin

> Kind regards
>
>         Jan
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=190641631&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
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk
_______________________________________________
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers

Reply via email to