iButton code?
amxhobbyist
Posts: 90
Has anyone written the code to interface with iButtons (http://www.ibutton.com/)? I have a DS9097U serial adapter here and would like to get it working with my AMX system. iButtons are dirt cheap and would make one heck of a great key... imagine one built into a ring. Just tap your ring on a sensor and your front door unlocks. Completely waterproof, virtually indestructible.
Anyway, I'm getting ready to write the code myself, and thought I might save myself the trouble if it's already been done.
Anyway, I'm getting ready to write the code myself, and thought I might save myself the trouble if it's already been done.
0
Comments
Hi
I would be very interested in using this for security for touch panel login.If you dont mind keeping me up to date with your progress .
Many Thanks
Cameron Davidson
I'll certainly post a message on this forum if I finish it. I've done some minor research into the protocol but have not had time to sit down and write it yet. I did manage to get a basic initialization response out of the interface, but got sucked into some other projects and haven't done any more on that. I plan to do so, however, and will certainly share my code with the community when it's done.
What was the outcome of your iButton development?
Yes. I have done a great deal of work with iButtons. What devices are you interested in implementing?
Hey, how cool! I was just thinking about doing something with this the other day.
I'm interested in two devices, actually:
1. Temperature sensors.
2. Standard ID buttons - I'd like to fashion one into a ring and use it to unlock my front door. The logistics are simple enough - receive a known ID, activate a relay. Unfortunately the actual Netlinx code implementation to drive the RS232 interface, while not extremely difficult, was time consuming enough that I moved on and never finished what I'd started.
Also, I know there are other standalone solutions for #2 above, but I want Netlinx to handle it. Makes it much easier to update & change things globally rather than going to half a dozen standalone units to enable or disable a given ID.
I'm out of town until the 15th, but I'll look into it when I get back.
I've had it running on the competitions software for over two years now.
Primarily:
DS18S20 thermometers
DS1990A basic ID
I assumed interface would be via a DS9097 RS232 interface. That seemed the easiest to me, anyway.
This program attached prints out all 1-Wire devices attached to DS9097U via debug message.
Be sure to tie RTS and or DTR high. I tied to +12V pin.
1. Load program
2. Establish telnet session with Netlinx controller
3. type 'msg on'
4. type 'send c dvTest,'search'
Independent Electronics can provide software solutions for Dallas/Maxim 1-Wire networks of any type or size.
1. 'temp' - displays temperatures for up to ten DS1920/DS18S20 devices
2. 'tempb' - displays temperatures from up to ten DS18B20 devices
Just replace ow.tko with attached.
This has been tested on an NXI, with an older master. So newer hardware should have no trouble.
Give me some ideas of how you would like API for use in an application.
When I have more time I'll add support for the DS2438 (used for humidity) and the DS2408 (used on a number of low cost relay boards, and character LCD displays).
Tested with two AAG electronica TAI8540D 1-Wire Humidity Modules:
www.aag.com.mx
I'm interested in what people would find useful for an API.
does anyone have the code ready for the 1-wire bus.
or module to work with ds9097 and DS18S20?
I would be grateful for any help
in the datasheet says:
"A master reset cycle can also be generated by means of software. This may be necessary if the host for any reason has lost synchronization with the device. The DS2480B will perform a master reset cycle equivalent to the power-on reset if it detects start polarity in place of the stop bit. The host has several options to generate this condition. These include making the UART generate a break signal, sending a NULL character at a data rate of 4800bps and sending any character with parity enabled and selecting space polarity for the parity bit. As with the power-on reset, the DS2480B requires a 1-Wire reset
command sent by the host at a data rate of 9600bps for calibration."
how to implement it on AMX?
Here's a 1-wire module I made for a client that wanted a temperature probe in his lake. You can probably take off with it from there.
Thank you very much!
I looked at the code and can not find it in the part that is responsible for working with 1-wire bus and temperature readings from the sensor. Or I do not understand something?
1. To start working with 1-wire, I need to perform "master reset cycle".
"These include making the UART generate a break signal, sending a NULL character at a data rate of 4800bps and sending any character with parity enabled and selecting space polarity for the parity bit."
(datasheet for DS2480B)
how to do it on the NetLinx?
2. Switching to command mode
send_string dvOW, $E3
2. Send to 1-wire reset command.
send_string dvOW, $C5 (11000101 bitwise)
Get in return $CD ....
According to the datasheet, it is a normal response. But it does not change when you disconnect from DS9097 all sensors. In theory, should be changed ...
3. Switching to data mode
send_string dvOW, $E1
4. Send to 1-wire Read ROM command
send_string dvOW, $33
Then, just send eight send_string dvOW, $FF and get in return 8 0 0 2 8A 64 0 0. it must be 64-bit ROM code ))
How to encode it into an understandable form do not know yet!
If I do send_string dvOW, $FF more than eight times, In response I receive only "FF" .....
While all right?
5. Send to 1-wire CONVERT T command
send_string dvOW, $44
6. Send to 1-wire READ SCRATCHPAD command
send_string dvOW, $BE
To read data send send_string dvOW, $FF ....... but, In response I receive only "FF" ....
what am I doing wrong?
A simpler way is get this adaptor instead of the DS9097U-S09#:
http://www.ibuttonlink.com/products/linkth
It uses a much simpler ascii interface, and has a more robust line drivers for the one wire buss. I use these all the time for projector enclosure temprature sensors.
...Jim...