The PyFingerprint library allows to use ZhianTec ZFM-20, ZFM-60, ZFM-70 and ZFM-100 fingerprint sensors on the Raspberry Pi or other Linux machines. Some other models like R303 and R305 also work.
Note: The library is inspired by the C++ library from Adafruit Industries: https://github.com/adafruit/Adafruit-Fingerprint-Sensor-Library
First install the packages for building:
~$ sudo apt-get install git devscripts
Than clone this repository:
~$ git clone https://github.com/bastianraschke/pyfingerprint.git
Build the package:
~$ cd ./pyfingerprint/src/
~$ dpkg-buildpackage -uc -us
The library supports Python 2 and Python 3. There are one Debian package for each. It's up to you which version you install.
For Python 3 use:
~$ sudo dpkg -i ../python3-fingerprint*.deb
For Python 2 use:
~$ sudo dpkg -i ../python-fingerprint*.deb
Install missing dependencies:
~$ sudo apt-get -f install
Allow non-root user "pi" (replace it correctly) to use the serial port devices:
~$ sudo usermod -a -G dialout pi
~$ sudo reboot
~$ python /usr/share/doc/python-fingerprint/examples/example_enroll.py
~$ python /usr/share/doc/python-fingerprint/examples/example_search.py
~$ python /usr/share/doc/python-fingerprint/examples/example_delete.py
~$ python /usr/share/doc/python-fingerprint/examples/example_downloadimage.py
~$ python /usr/share/doc/python-fingerprint/examples/example_generaterandom.py
See my blog post for more information:
https://sicherheitskritisch.de/2015/03/fingerprint-sensor-fuer-den-raspberry-pi-und-debian-linux-en/