All Projects → iafilatov → Libfprint

iafilatov / Libfprint

Licence: lgpl-2.1
libfrpint driver for a family of Elantech fingerprint sensors

Programming Languages

c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to Libfprint

Vfs495
Validity VFS495 (138a:003f) drivers & utilities for Linux
Stars: ✭ 71 (-41.32%)
Mutual labels:  driver, fingerprint
Nailgun
Nailgun attack on ARM devices.
Stars: ✭ 114 (-5.79%)
Mutual labels:  fingerprint
Bthps3
Windows kernel-mode Bluetooth Profile & Filter Drivers for PS3 peripherals
Stars: ✭ 94 (-22.31%)
Mutual labels:  driver
Go Sonic
Sonic driver written in Go.
Stars: ✭ 110 (-9.09%)
Mutual labels:  driver
Neo4j Core
A simple unified API that can access both the server and embedded Neo4j database. Used by the neo4j gem
Stars: ✭ 99 (-18.18%)
Mutual labels:  driver
Tl Wn722n V2
Drivers for TP-LINK TL-WN722N version 2 .Clean ported for kernel 4.4, 4.8, 4.10 ,4.13 ,4.14 & 4.15 from source which was at 4.3
Stars: ✭ 112 (-7.44%)
Mutual labels:  driver
Broadcom Wl
Broadcom Linux hybrid wireless driver (64-bit)
Stars: ✭ 92 (-23.97%)
Mutual labels:  driver
Huawei Wmi
Huawei WMI laptop extras linux driver
Stars: ✭ 120 (-0.83%)
Mutual labels:  driver
Go Hdb
SAP HANA Database Client for Go
Stars: ✭ 113 (-6.61%)
Mutual labels:  driver
Esp8266 Oled Ssd1306
Driver for the SSD1306 and SH1106 based 128x64, 128x32, 64x48 pixel OLED display running on ESP8266/ESP32
Stars: ✭ 1,590 (+1214.05%)
Mutual labels:  driver
Grl
Robotics tools in C++11. Implements soft real time arm drivers for Kuka LBR iiwa plus V-REP, ROS, Constrained Optimization based planning, Hand Eye Calibration and Inverse Kinematics integration.
Stars: ✭ 105 (-13.22%)
Mutual labels:  driver
Ssh keyscanner
ssh public host key scanner using shodan
Stars: ✭ 102 (-15.7%)
Mutual labels:  fingerprint
Sms
Laravel SMS Gateway Integration Package
Stars: ✭ 112 (-7.44%)
Mutual labels:  driver
Betterjoy
Allows the Nintendo Switch Pro Controller, Joycons and SNES controller to be used with CEMU, Citra, Dolphin, Yuzu and as generic XInput
Stars: ✭ 1,352 (+1017.36%)
Mutual labels:  driver
Hulaaki
DEPRECATED : An Elixir library (driver) for clients communicating with MQTT brokers(via the MQTT 3.1.1 protocol).
Stars: ✭ 115 (-4.96%)
Mutual labels:  driver
Hacksysextremevulnerabledriver
HackSys Extreme Vulnerable Windows Driver
Stars: ✭ 1,330 (+999.17%)
Mutual labels:  driver
Postgresql Dart
Dart PostgreSQL driver: supports extended query format, binary protocol and statement reuse.
Stars: ✭ 105 (-13.22%)
Mutual labels:  driver
Robotiq
Robotiq packages (http://wiki.ros.org/robotiq)
Stars: ✭ 110 (-9.09%)
Mutual labels:  driver
Website Analyzer
Analyze and display the Web technology of current page.
Stars: ✭ 121 (+0%)
Mutual labels:  fingerprint
Cassandra Sharp
high performance .NET driver for Apache Cassandra
Stars: ✭ 114 (-5.79%)
Mutual labels:  driver

Read this first

This driver went upstream. If you are about to clone and build this repo, better clone the official libfprint repo instead. If your package manager ships libfprint >= 0.8.3, it's already there. Yay!

For help with this driver consider opening a ticket in the official repo or asking on the mailing list. I will keep this fork as a landing page for a while.

A fork of libfrpint with ElanTech fingerprint reader driver

Original libfprint readme is in README

Supported readers

04f3: 0903, 0907, 0c01-0c33

Getting code and Build tools

libfprint is built with Meson Build System.

If you installed libfprint from source before c5c5fcf (May 17, 2018) please see Uninstalling with autotools.

git clone [email protected]:iafilatov/libfprint.git
cd libfprint

apt install ninja-build

# The doc recommends system-wide installation with pip, which might not be the best/easiest option.
# Here is how you can install meson in isolated environment:
python3 -m venv venv
. venv/bin/activate
pip install -U pip
pip install meson

Trying it out

venv/bin/meson builddir_dbg
venv/bin/meson configure builddir_dbg -Ddebug_log=true
cd builddir_dbg
ninja

Pre-requisites

YMMV. The best way to get all required packages and avoid installing unnecessary ones is to keep running meson builddir and installing the packages it asks for one-by-one.

libglib2.0-dev
libnss3-dev
libpixman-1-dev
libusb-1.0.0-dev
libx11-dev
libxv-dev
pkg-config

Capture

This may require root

examples/img_capture

Then open finger.pgm with an image viewer.

Try enrolling and verifying

examples/enroll
examples/verify

Last enrolled image is stored in enrolled.pgm, last one used for verification is verify.pgm.

Try with fprint_demo

Install fprint_demo.

LD_LIBRARY_PATH=./libfprint/.libs/ fprint_demo

Unrecognized devices

If you have a device that is not detected by this driver and you want to try it out, you can add it to the supported devices list and recompile. I have reasons to believe that the entire family of compatible Elan readers should already be recognized without modification, so if you need to do this, the chance is slim. But my info could be outdated.

WARNING: However small, there is a possibility that your device can be damaged or end up in some unusable state if it receives commands that it doesn't recognize. I think this is quite unlikely. Nevertheless, you have been warned.

First, find out device id of your reader.

$ lsusb | grep -i elan
Bus 002 Device 028: ID 04f3:abcd Elan Microelectronics Corp.
                            ^^^^

Now add it to libfprint/drivers/elan.h before {0, 0, 0}.

@@ -208,6 +208,7 @@ static const struct usb_id elan_id_table[] = {
        {.vendor = ELAN_VEND_ID,.product = 0x0c31,.driver_data = ELAN_ALL_DEV},
        {.vendor = ELAN_VEND_ID,.product = 0x0c32,.driver_data = ELAN_ALL_DEV},
        {.vendor = ELAN_VEND_ID,.product = 0x0c33,.driver_data = ELAN_ALL_DEV},
+       {.vendor = ELAN_VEND_ID,.product = 0xabcd,.driver_data = ELAN_ALL_DEV},
        {0, 0, 0,},
 };

And recompile.

Installing

You probably want a clean build without debug logging.

venv/bin/meson builddir
venv/bin/meson configure builddir -Ddoc=false -Dlibdir=lib
cd builddir
ninja
sudo ninja install

Now you can use it with fprintd. Don't forget to enroll: fprintd-enroll. If you want to use it for auth (login, sudo etc.) you also need PAM module: apt install libpam-fprintd.

fprintd-enroll and fprintd-verify are separate from examples/enroll and examples/verify.

Uninstalling

cd builddir
sudo ninja uninstall

Common problems

The algorithm which libfprint uses to match fingerprints doesn't like small images like the ones these drivers produce. There's just not enough minutiae (recognizable print-specific points) on them for a reliable match. This means that unless another matching algo is found/implemented, these readers will not work as good with libfprint as they do with vendor drivers.

To get bigger images the driver expects you to swipe the finger over the reader. This works quite well for readers with a rectangular 144x64 sensor. Worse than real swipe readers but good enough for day-to-day use. It needs a steady and relatively slow swipe. There are also square 96x96 sensors and I don't know whether they are in fact usable or not because I don't have one. I imagine they'd be less reliable because the resulting image is even smaller. If they can't be made usable with libfprint, I might end up dropping them because it's better than saying they work when they don't.

Most enrolling and verification problems are caused by bad quality of scans. Check various *.pgm files to see what's wrong.

If you still wish to try touch operation, use elan-touch branch. For me even enrolling is impossible with touch. YMMV.

Good image

good image

Touch instead of swipe

touch instead of swipe

Part of log from example/enroll:

...
assembling:debug [do_movement_estimation] calc delta completed in 0.151993 secs
assembling:debug [do_movement_estimation] calc delta completed in 0.145175 secs
assembling:debug [fpi_do_movement_estimation] errors: 164713 rev: 163875
assembling:debug [fpi_assemble_frames] height is -20              <-- height too small (abs value)
fp:debug [fpi_img_new] length=15120
fp:debug [fpi_imgdev_image_captured]
fp:debug [fpi_img_detect_minutiae] minutiae scan completed in 0.003507 secs
fp:debug [fpi_img_detect_minutiae] detected 4 minutiae
fp:debug [print_data_new] driver=15 devtype=0000
fp:debug [fpi_imgdev_image_captured] not enough minutiae, 4/10    <-- can't get enough minutiae
...
sync:debug [fp_enroll_finger_img] enroll should retry
fp:debug [fp_img_save_to_file] written to 'enrolled.pgm'
Wrote scanned image to enrolled.pgm
Didn't quite catch that. Please try again.

Finger moved too fast

moved too fast

If you swipe too fast, frames don't cover the fingerprint without gaps. Try swiping along the entire fingerprint in no less than 2 sec.

Rotated reader

Some readers have square sensors and since they are in fact touch type, there's no difference how they are installed in relation to the user. The driver assumes a certain orientation but since in can't know for sure, sometimes the orientation is wrong and the the frames are assembled incorrectly.

rotated reader

Since in theory the same reader can be installed differently, there's no good way to deal with this problem at the moment. If you have it, please open an issue and include your device id and short description (e.g laptop model if the reader is integrated or model if it's a separate USB device).

Uninstalling with autotools

libfprint has been ported to Meson. This means once you clone a recent version of code, you won't be able to make uninstall libfprint you installed from source earlier. Before you upgrade it's better to remove the previous installation:

git checkout c723a0f
./autogen.sh
sudo make uninstall
git checkout elan
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].