Blog entry 008 is not working… so here is 009
I installed electronic lock with Dallas (Maxim) i-Button chips. It was very simple, low security version of electronic lock as it uses DS1990A chips as the keys. Original lock was made using PIC mcu (the smallest available) and 24C16 serial eprom to store key numbers. I programmed the lock and read chip contents. I found same numbers in eprom as numbers engraved on key. After reading the datasheet I discovered that these chips are not good for real security keys as they don’t have any security features. It is simple serial rom with CRC, and only nice feature that it is using one wire for data and power transfer.
I decided to make few experiments with these i-button chips and to write so software for AVR. The problem is, that there are lots of software for 1 wire protocol, but most of software is based on commercial AVR C compiller with build in 1 wire functions. I am using free GNU C compiler and I need to find software for all 1 wire stuff. I spent few hours searching internet and at last I found it.
The hardware is very simple- I used my AVR USB board with LCD module. I connected i-Button to my “firmware” jumper. The only modification is 4.7K pull-up resistor.
The LCD module is displaying various information about connected i-Button. Top left corner is status. Possible information: OPEN, SHORT, OK and ERROR. Top-right is CRC read from chip. In source there is CRC recalculation routine to check it (untested). Bottom left: device family id. And last and longest number is 48bit device serial number. Same as number on the metal can of the chip.
Source code: 20071027.zip
There are more functions in source code. I am using only minimal set of possible features.
Now you can build your own security lock, the only problem is, that Dallas ID chips are not secure. I think it is possible to build emulator for Dallas i-button chip and program other serial number. Dallas is not responsible for this as this chip is not intended to use as the key:
The DS1990A Serial Number iButton is a rugged data carrier that serves as an electronic registration number for automatic identification.
…allowing the DS1990A to be used easily by human operators. Accessories permit the DS1990A iButton to be mounted on almost any object, including containers, pallets, and bags.
I think that this “commercial” lock is cheap alternative for very low security door lock.