Interest in a wrapper for the Dallas/Maxim OneWire Public DomainAPI?

C

Clifford Heath

I'm writing some stuff to handle a couple of different IButtons
(memory, clock) using the Dallas/Maxim serial port adapter (the
new one which uses the DS2480 chip). This adapter and others are
well supported by a rather grubby C API, and I couldn't bring
myself to work in C only. So I've created a Ruby extension to
wrap it. Or at least the bits I've needed so far...

Just thought I'd put out a feeler to see if there's interest in it
from others out there. Especially if someone wants to extend or
maintain it... ;-). I know that the one-wire interface is used by
a number of commercial and home-brew weather stations, for example,
and also in temperature monitoring. I can't add support for those
devices since I don't own either.

As far as I can tell, the API it wraps doesn't seem to allow
linking programs that can choose which driver to use at run time.
You must link it to use the USB driver *or* the serial driver :-(.
I don't plan to fix this, so the Ruby wrapper will be only for the
serial driver that I have.

Clifford Heaty.
 
P

Phil Tomson

I'm writing some stuff to handle a couple of different IButtons
(memory, clock) using the Dallas/Maxim serial port adapter (the
new one which uses the DS2480 chip). This adapter and others are
well supported by a rather grubby C API, and I couldn't bring
myself to work in C only. So I've created a Ruby extension to
wrap it. Or at least the bits I've needed so far...

Just thought I'd put out a feeler to see if there's interest in it
from others out there. Especially if someone wants to extend or
maintain it... ;-). I know that the one-wire interface is used by
a number of commercial and home-brew weather stations, for example,
and also in temperature monitoring. I can't add support for those
devices since I don't own either.

As far as I can tell, the API it wraps doesn't seem to allow
linking programs that can choose which driver to use at run time.
You must link it to use the USB driver *or* the serial driver :-(.
I don't plan to fix this, so the Ruby wrapper will be only for the
serial driver that I have.

Sounds cool! I don't have time to play with it right now, but definitely
will look at it in the future (would something like this be usable for
monitoring aquarium parameters?). Please go to RubyForge.org and request
a new project there and at least upload the code.

Phil
 
C

Clifford Heath

Phil said:
Sounds cool! I don't have time to play with it right now, but definitely
will look at it in the future (would something like this be usable for
monitoring aquarium parameters?).

Will do. The IButton thermometers are excellent for this purpose, all
you need is a serial port adapter (DS1411-S09, $31.50 from Maxim) and
two wires. You can string a bunch of IButtons across the single pair
of wires, and the port will provide power, enumerate the different
buttons, and allow you to talk to them individually. You'd use DS1920
for temperature, $6.76 from Maxim. I'm sure these are available from
Digikey as well but the catalog search isn't finding them at present.

The buttons themselves are very robust. I heard of one of the
temperature-logging buttons being immersed in a mountain stream for an
entire year, recording the temperature hourly for an annual profile.
They're also very secure - they are the "key" used to unlock ATM
machines (NCR ones, anyway, don't know about others).
Please go to RubyForge.org and request
a new project there and at least upload the code.

Will do. I'm going to finish the clock support first though, and I
need to be able to wait for IButton insertion.

Clifford Heath.
 
C

Clifford Heath

Rubyforge now has a "onewire" project with source in CVS that will
build on Linux (including Debian packages) and Windows. The Windows
version isn't tested yet.

The API has methods to enumerate IButtons, read and write memory
buttons, and control those with a real-time clock.

I'll upload precompiled packages when I've finished testing, but
I wanted to know if anyone else has the DS2480-based serial port
adapter, and is willing to help test the software. If you do, it's
a simple matter of (Linux shell or cygwin):

export CVSROOT=:ext:[email protected]:/var/cvs/onewire
export CVS_RSH=ssh
cvs co src
cd src/owpd300
make
cd ..
ruby extconf.rb
make

and you're done in under a minute. Substitute "dpkg-buildpackage"
for the last make and you'll get Debian packages.

Let me know whether you succeed or have problems.

Clifford Heath.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,763
Messages
2,569,562
Members
45,038
Latest member
OrderProperKetocapsules

Latest Threads

Top