Posted by on Apr 22, 2016 in Senza categoria |

After having solved the Realtek SD Reader issue in Ubuntu 15.10, only one piece of hardware is not properly working with my HP d001nl: the Validity Fingerprint Sensor. Let’s try to make it work…

Validity Fingerprint Sensor

First step, as usual, is trying to collect more information on the fingerprint sensor with the command

[email protected]:~$ lsusb
Bus 001 Device 005: ID 138a:0050 Validity Sensors, Inc. Swipe Fingerprint Sensor

We found a couple VID/PID 138a:0050 that should univocally identify the device.

After a quick search on Google, it seems that this kind of devices are not driven by a kernel driver, but, instead there is an user-space tool for enabling the fingerprint sensor.

fprint seems to be the most used project for supporting fingerprint reader devices. Cloning the git repository

[email protected]:~$ git clone git://anongit.freedesktop.org/libfprint/libfprint

and taking a look at the code shows that, though there are some Validity Fingerprint Sensors supported, the one with PID 0x0050 is missing.

Digging a little more on Google, I found that someone (Payden) forked fprint for implementing a new driver for this sensor. The source code can be retrieved with

[email protected]:~$ git clone https://github.com/payden/libfprint.git

Unfortunately this fork is based on the v0.5.1 release, while the official one is now at v0.6.0

Don’t worry, we can try to merge the driver: start your favourite source compare tool (mine is kdiff3) to see if it’s a possible task.

Enabling the Validity Fingerprint Sensor

Comparing the two releases, it seems that the source code has not changed much; the files to merge appear to be

configure.ac
libfprint/Makefile.am
libfprint/core.c
libfprint/drivers/driver_ids.h
libfprint/fp_internal.h

From the forked fprint the vfs0050 driver needs to be added

libfprint/drivers/vfs0050.c
libfprint/drivers/vfs0050.h

Basically, not only the driver files, but all the things related to the vfs0050 sensor in the payden repository should be merged in the official release. For your convenience you can find the already modified files here.

It’s now time to build the patched fprint, but first I had to install some packages

[email protected]:~$ sudo apt-get install libtool automake pkg-config libusb-1.0-0-dev libnss3-dev libglib2.0-dev libpixman-1-dev

Then, start the build

[email protected]:~$ ./autogen.sh --disable-x11-examples-build
[email protected]:~$ make

After the build finishes, you are now able to store your fingerprint with

sudo examples/enroll

and verify the match with

sudo examples/verify

Note that when the sensor is working a blue light will turn on.

Unfortunately I’m not very satisfied with the false matches produced by the software: probably the Validity Fingerprint Sensor 0x0050 requires a bit more work for improving the accuracy.

Due to this, I did not dig more to learn how to use the sensor for authentication in the operating system, to avoid the use of passwords.