Elantech fingerprint sensor linux driver

Saved searches

Use saved searches to filter your results more quickly

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.

libfrpint driver for a family of Elantech fingerprint sensors

License

iafilatov/libfprint

This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Sign In Required

Please sign in to use Codespaces.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching Xcode

If nothing happens, download Xcode and try again.

Launching Visual Studio Code

Your codespace will open once ready.

There was a problem preparing your codespace, please try again.

Latest commit

Git stats

Files

Failed to load latest commit information.

README.md

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!

I’m not responding to issues and pull requests in this repo. Send them to the official repo. The code here is very old and I don’t actively maintain it.

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

Getting code and Build tools

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

git clone git@github.com: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 
venv/bin/meson builddir_dbg venv/bin/meson configure builddir_dbg -Ddebug_log=true cd builddir_dbg ninja 

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 

Then open finger.pgm with an image viewer.

Читайте также:  How to install intellij idea on linux

Try enrolling and verifying

examples/enroll examples/verify 

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

LD_LIBRARY_PATH=./libfprint/.libs/ fprint_demo 

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 .

@@ -208,6 +208,7 @@ static const struct usb_id elan_id_table[] = < , , , + , , >; 

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 .

cd builddir sudo ninja uninstall 

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 144×64 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 96×96 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

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  

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.

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 

Источник

How to configure an Elan fingerprint scanner on an Asus UX430A laptop?

I have an ASUS UX430UA and lsusb shows the fingerprint scanner is an Elan Microelectronics Corp. I'm new to the Linux world in general and Ubuntu. I read a few threads and tried out some of the solutions posted but couldn't get it to work. Can someone help me install it and make it work? (remember I'm new and have no idea how to install things and clueless about what I'm doing when I type in the terminal) Thanks in advance.

@Nicolas Strucelj Sadly, Asus does not provide Linux drivers support. However, as Pilot6 kindly noted above, askubuntu.com/a/1133528/197910 may (repeat, may) work. You're doing fine; you had the wits to use lsusb to find the device details, which shows you will do OK.

Thanks, I was trying to follow those steps that I had found before posting this question, but I'm stuck cause I don't know how to so these steps: Update libfprint building and installing iafilatov's libfprint. See README.md for build release version. And Update symbolic link /usr/lib/libfprint.so.0 -> /usr/local/lib/libfprint.so.0.0.0 (to the newly installed iafilatov's build.

1 Answer 1

Ubuntu 18.04 is bundled with version 0.82 which doesn't support Elan fingerprint reader.

Version 0.99 supports Elan chip and can be built on Ubuntu 18.04 V1 uses Glib V2.57 when Ubuntu 18.04 latest glib's version is 2.56.

When I tried v0.99, even if the device was supported, one tenth of fingerprint readings were successful. might be a "finger" problem though 😉

iafilatov in his github says that his fork is now behind forked repository and we should use the origin. In order to use compiled version, symlinks needs to be created:

/usr/lib/x86_64-linux-gnu/libfprint.so.0.0.0 -> /usr/local/lib/libfprint.so.0.0.0 /usr/lib/x86_64-linux-gnu/libfprint.so.0 -> /usr/local/lib/libfprint.so.0.0.0 

Please adapt according to your system, as it may be different.

Источник

Elantech fingerprint sensor linux driver

We are private in protest of the API changes. https://www.theverge.com/2023/6/8/23754780/reddit-api-updates-changes-news-announcements Don't message us for access, everyone is blocked out site-wide. See http://redd.it/1476ioa for more info.

Got the reader recognised in Ubuntu 22.10 but it tries to enroll fingerprint by swiping when it is a new "touch/press" version fingerprinter reader.

Did some investigating and found the following:

​ The fingerprint reader works perfectly in Windows as a touch biometric reader, but in Ubuntu/Linux, it seem to be configured as a swipe biometric reader.

I believe this is what causes the accuracy to be abysmally poor.

Any idea where I can read up to find out about configuration?

EDIT 2022/11/27 8:49pm SGT:

The "scan-type" property

The scan type of the device, either "press" if you place your finger on the device, or "swipe" if you have to swipe your finger.

I think the default driver or Ubuntu User fingerprint code is not setting this right for the Elan fingerprint reader 0x04f3::0x0c28

Let me see where I can find the enroll code.

EDIT 2022/11/27 8:58pm SGT:

This function in the libfprint calls the vendor driver to get supported functions

  • Retrieves the scan type for the devices associated with the driver.
  • \param drv the driver
  • \returns the scan type */ API_EXPORTED enum fp_scan_type fp_driver_get_scan_type(struct fp_driver *drv) < return drv->scan_type; >

Found this hardcoded for elan to swipe!!

static void fpi_device_elan_class_init (FpiDeviceElanClass *klass) < FpDeviceClass *dev_class = FP_DEVICE_CLASS (klass); FpImageDeviceClass *img_class = FP_IMAGE_DEVICE_CLASS (klass); dev_class->id = "elan"; dev_class->full_name = "ElanTech Fingerprint Sensor"; dev_class->type = FP_DEVICE_TYPE_USB; dev_class->id_table = elan_id_table; dev_class->scan_type = FP_SCAN_TYPE_SWIPE; img_class->img_open = dev_init; img_class->img_close = dev_deinit; img_class->activate = dev_activate; img_class->deactivate = dev_deactivate; img_class->change_state = dev_change_state; img_class->bz3_threshold = 24; >

Another hardcode in driver initialization.

static void fpi_device_elanspi_class_init (FpiDeviceElanSpiClass *klass) < FpDeviceClass *dev_class = FP_DEVICE_CLASS (klass); FpImageDeviceClass *img_class = FP_IMAGE_DEVICE_CLASS (klass); dev_class->id = "elanspi"; dev_class->full_name = "ElanTech Embedded Fingerprint Sensor"; dev_class->type = FP_DEVICE_TYPE_UDEV; dev_class->id_table = elanspi_id_table; dev_class->scan_type = FP_SCAN_TYPE_SWIPE; dev_class->nr_enroll_stages = 7; /* these sensors are very hit or miss, may as well record a few extras */ img_class->bz3_threshold = 24; img_class->img_open = elanspi_open; img_class->activate = elanspi_activate; img_class->deactivate = elanspi_deactivate; img_class->change_state = elanspi_change_state; img_class->img_close = elanspi_close; G_OBJECT_CLASS (klass)->finalize = fpi_device_elanspi_finalize; >

Product Id 0x0c26 and 0x0c28 are not whitelisted in the fprint-list hardwaredb declaration.

I've managed to pull the libprintf source from github, put in modification to use FP_SCAN_TYPE_PRESS instead of FP_SCAN_TYPE_SWIPE.

I have successfully built it on my more powerful dev machine.

Any idea how to move the modified driver to the target machine? Or must I redo the steps on the target machine?

Источник

Оцените статью
Adblock
detector