Commit graph

1084 commits

Author SHA1 Message Date
Vasily Khoruzhick 6e8d5cd6a1 vfs5011: do duplicate line search for 30 lines
It seems that on faster devices, the driver can get more duplicate lines.
Without this change scan looks too stretched.

Suggested by: Thomas Rinsma <thomasrinsma@gmail.com>
2015-12-16 13:24:38 -08:00
Vasily Khoruzhick 9f7e1ecf40 vfs5011: make '5 scans per enroll' work with this driver
Restart scan if core did not ask to terminate it explicitly.
2015-12-16 13:24:38 -08:00
Vasily Khoruzhick d9567002e4 imgdev: reset action_result after reporting it
Otherwise we end up in reporting the same result on next iteration.
2015-12-16 13:24:38 -08:00
Vasily Khoruzhick a656a4a9f3 upektc_img: Handle scan status reported by sensor properly
Sensor can report "short scan" or "finger not centered" instead of image,
so it's necessary to handle them gracefully.
2015-12-16 13:24:38 -08:00
Vasily Khoruzhick 2944a35e74 imgdev: Add fpi_imgdev_abort_scan() to abort scan gracefully from within the driver.
Smart sensors like Upek TouchChip Coprocessor can provide scan status instead
of image, as result we need to report such status as "short scan" or "finger not centered"
from within the driver, since it's not a session error.
2015-12-16 13:24:38 -08:00
Vasily Khoruzhick 391373fb0c upektc_img: Fix copy/paste error
Replace upekts_img with upektc_img
2015-12-16 13:24:38 -08:00
Vasily Khoruzhick 985e8c4577 aes1660: set partial flag on an image
Sensor width seems to be only 128 pixels and that's not enough
for scanning whole finger surface. Lower bz3_threshold to 25,
since for wrong finger score never goes above 10, but sometimes
for right finger score is below 40.
2015-12-16 13:24:38 -08:00
Vasily Khoruzhick bd0d4258e4 upektc_img: set partial flag on an image
Sensor width seems to be only 128 pixels and that's not enough
for scanning whole finger surface. Lower bz3_threshold to 20,
since for wrong fingerprint score never goes above 10, but sometimes
for right finger score is below 40.
2015-12-16 13:24:38 -08:00
Vasily Khoruzhick 9bbd9b208a lib: add partial image flag
And activate perimeter points removal if this flag is set.
2015-12-16 13:24:38 -08:00
Vasily Khoruzhick 59fe0fb699 nbis: add one more step of false minutia removal
Remove minutiae that are located on scan perimeter
2015-12-16 13:24:38 -08:00
Bastien Nocera f1fdd71613 rules: Add driver name to the USB properties
Makes it easier to see which driver is being used.
2015-03-15 23:13:08 +01:00
Carlos Olmedo Escobar 45fb6d7908 vfs101: Logical conjunction always evaluates to false. 2015-02-09 12:47:22 +01:00
Timo Teräs 9f408bf51b imgdev: fix enum mismatch for dev_change_state() call
This bug has existed long time, but it was uncovered by commit
e215b05094 which enabled multiple enrollment rounds.

In practice this broke (at least) URU4000 driver state machine
causing it to enter indefinite loop - due to the invalid state
change callback.

Patch originally posted at:
http://lists.freedesktop.org/archives/fprint/2014-June/000603.html

Test and verification results:
http://lists.freedesktop.org/archives/fprint/2014-June/000607.html

Signed-off-by: Timo Teräs <timo.teras@iki.fi>
2015-02-03 18:26:33 +01:00
Vasily Khoruzhick a3c90f2b24 upektc_img: handle 0x28 message better 2015-01-31 13:19:24 +03:00
Arseniy Lartsev dc537ef2c9 lib: Add VFS5011 driver
New driver for VFS5011 138a:0011 and 138a:0018

https://bugs.freedesktop.org/show_bug.cgi?id=61692

[vasilykh]:
	- use g_get_real_time() instead of non-portable time()
	- use g_free() instead of free()
	- comment out "RECV(VFS5011_IN_ENDPOINT_CTRL2, 8)"
2015-01-31 13:19:11 +03:00
Vasily Khoruzhick 061a457658 aeslib: improve frame-assembling routines
Some scanners provide hardware assistance in frame assemling, i.e.
horizontal and vertical offset to previous frame is provided. This
commit improves code to utilise that assistance. Sensors without
hardware assistance will use software algorithm, which was also
improved to do search in horizontal direction.
2015-01-31 13:18:23 +03:00
Vasily Khoruzhick 82ae7c1c09 aesx660: fix spelling of define name 2015-01-31 13:18:23 +03:00
Rex Dieter 79d79c3c87 lib: Test before applying power saving udev rules
add TEST=="power/control"... to test for the presence of the file
before setting it.

See https://bugzilla.redhat.com/show_bug.cgi?id=950205

https://bugs.freedesktop.org/show_bug.cgi?id=87414
2015-01-28 16:28:57 +01:00
Vasily Khoruzhick 948ab02d1a lib: use pixman for imaging utils
pixman is very lightweight library for pixel manipulation, and it
has no dependencies except glibc, so using it instead of gdkpixbuf/imagemagick
makes list for libfprint dependencies a bit shorter.
2013-08-19 11:13:50 +03:00
Patrick Marlier a6101026d2 Add EgisTec ES603 driver
This driver handles EgisTec ES603 device, ID 1c7a:0603
2013-08-19 11:13:50 +03:00
Vasily Khoruzhick e0966cb20f vfs101: drop nr_enroll_stages override
Imaging drivers aren't allowed to change number of enroll stages anymore,
all that imaging driver does is providing image to the upper layer.
Upper layer decides if it needs more scans.
2013-08-19 11:13:49 +03:00
Vasily Khoruzhick e278e8321c vfs301: drop nr_enroll_stages override
Imaging drivers aren't allowed to change number of enroll stages anymore,
all that imaging driver does is providing image to the upper layer.
Upper layer decides if it needs more scans.
2013-08-19 11:13:49 +03:00
Vasily Khoruzhick e1728e7c25 aes1660: remove unneeded lowering of bz3_threshold
Since 5 scans for enroll was introduced it's not necessary to lower
bz3_threshold anymore, there's a good probability that scan to verify matches
with at least one enrolled sample.
2013-08-19 11:13:49 +03:00
Vasily Khoruzhick e215b05094 imgdev: perform 5 scans for enrollment
This feature dramatically improves matching rate on devices with small
sensors.
2013-08-19 11:13:49 +03:00
Vasily Khoruzhick 5ff45658c0 upektc_img: add support for Upek Eikon 2 devices 2013-08-19 11:13:49 +03:00
Vasily Khoruzhick d12b294783 Add upektc_img driver
Imaging driver, handles UPEK 147e:2020 device
2013-08-19 11:13:49 +03:00
Vasily Khoruzhick 2bba4fb073 Implement image capture (both synchronous and asynchronous variants)
fp_dev_img_capture() is not implemented and returns -ENOTSUPP for all devices
since migration to asynchronous model. This commit implement missing functionality
2013-08-12 11:18:18 +03:00
Juvenn Woo aeca32fc12 aes3k: add aes3500 driver
This driver supports AES3500 device (08ff:5731) and utilizes common routines from
AES4000.
2013-08-12 11:18:18 +03:00
Juvenn Woo 12c1088777 aes3k: extract common routines aes3k from aes4000
AES3500 and AES4000 are pretty similar devices, have same
command send, the only difference is in image size and init sequence.
Extract common routines from AES4K to be used later in AES3500 driver

https://bugs.freedesktop.org/show_bug.cgi?id=64351
2013-08-12 11:18:18 +03:00
Bastien Nocera c14ebd8b63 Add MS keyboard to the suspend blacklist
045e:00bb isn't a stand-alone fingerprint reader, but a keyboard
with a reader integrated.

https://bugs.freedesktop.org/show_bug.cgi?id=66659
2013-07-25 12:29:53 +02:00
Bastien Nocera a6339a30ef Fix udev rules printing
The blacklisted devices weren't correctly checked for past the first
item, as we weren't using the right index to get the product ID
from the ID table.
2013-07-25 12:29:29 +02:00
Bastien Nocera f3dd55815e lib: Use g_malloc0 instead of g_malloc+memset 2013-06-26 14:21:33 +02:00
Patrick Marlier 6d65bfcf80 lib: g_malloc never fails
Or rather, it never returns errors and aborts instead if
memory cannot be allocated, so remove code that handled
failures.

https://bugs.freedesktop.org/show_bug.cgi?id=57869
2013-06-26 14:18:40 +02:00
Jeremy Bicha 1acd647b29 build: Fix underlinking against glib
https://bugs.freedesktop.org/show_bug.cgi?id=63755
2013-06-26 14:14:49 +02:00
Vasily Khoruzhick 3b3679c900 upeke2: Add support for 147e:2020 ID
https://bugs.freedesktop.org/show_bug.cgi?id=59320
2013-01-13 19:02:52 +01:00
Timo Teräs 0b2d33c712 imgdev: fix cancelling of enrollment from stage_completed callback
Re-check device state after fpi_drvcb_enroll_stage_completed().
If enrollment was cancelled after non-completing stage, we must
not restart acquire as it would confuse the internal state machine.

https://bugs.freedesktop.org/show_bug.cgi?id=57829
2012-12-14 13:17:30 +01:00
Timo Teräs 8a87ba448c uru4000: fix cancelling of imaging from error callback
Call error callback before resetting img_transfer to NULL. This
variable is internally used to detect if we are still in imaging
loop and the call to execute_state_change() needs to be postponed.
Since this is the final thing imaging_complete() we can't reset
img_transfer until just before this call.

https://bugs.freedesktop.org/show_bug.cgi?id=57829
2012-12-14 13:16:31 +01:00
Timo Teräs 7e1646c382 uru4000: fix race condition on waiting power up irq
It can come before we finish reading the status register on some
cases. Arm the irq handler early, and fix the state machine to
handle early irq properly.

https://bugs.freedesktop.org/show_bug.cgi?id=57834
2012-12-04 11:55:10 +01:00
Vasily Khoruzhick a7d6b7c30a nbis: Fix crash in gen_initial_maps()
If the image is too small some coordinates can become negative.
Handle this to avoid memory corruption.

https://bugs.freedesktop.org/show_bug.cgi?id=57730
2012-12-03 15:36:25 +01:00
Vasily Khoruzhick 31cf7a9383 build: Add common routines to the dist
Fixes dist when aesX660 drivers are disabled from the build.

https://bugs.freedesktop.org/show_bug.cgi?id=57724
2012-12-01 15:04:47 +01:00
Vasily Khoruzhick c02cb3083d AES-drivers: drop redudant type cast in g_slist_free_full call
https://bugs.freedesktop.org/show_bug.cgi?id=57688
2012-11-29 15:32:14 +01:00
Vasily Khoruzhick 2084724115 upektc: add support for Eikon Touch 300
https://bugs.freedesktop.org/show_bug.cgi?id=45197
2012-11-29 12:35:05 +01:00
Vasily Khoruzhick 118c610e29 lib: add AES2660 driver
https://bugs.freedesktop.org/show_bug.cgi?id=57426
2012-11-29 09:59:52 +01:00
Vasily Khoruzhick 313bfede77 lib: add AES1660 driver
https://bugs.freedesktop.org/show_bug.cgi?id=57426
2012-11-29 09:59:52 +01:00
Vasily Khoruzhick c1da647aed lib: add AES1660/AES2660 common routines
https://bugs.freedesktop.org/show_bug.cgi?id=57426
2012-11-29 09:59:52 +01:00
Vasily Khoruzhick 22d204cc68 lib: Split fpi_im_resize factor into width/height
https://bugs.freedesktop.org/show_bug.cgi?id=57426
2012-11-29 09:59:27 +01:00
Vasily Khoruzhick bc497f1b26 aeslib: prevent integer overflow
AuthenTec devices send 4bpp images, but current code assumes 3bpp for
some reason.

https://bugs.freedesktop.org/show_bug.cgi?id=57426
2012-11-29 09:59:27 +01:00
Vasily Khoruzhick 8c5f2e6434 aes: unify image processing code for AuthenTec devices
Move overlap detection and assembling code into aeslib to prevent
code duplication

https://bugs.freedesktop.org/show_bug.cgi?id=57426
2012-11-29 09:59:22 +01:00
Timo Teräs 45ac0eefb0 uru4000: Fix image capture error on ARM
http://www.mail-archive.com/fprint@lists.freedesktop.org/msg00294.html
2012-11-16 18:38:52 +01:00
Vasily Khoruzhick ea6d5ba6d6 lib: Fix mess with driver IDs
ID is just a some magic number to make fingerprint from one scanner model
incompatible with another scanner model. Get rid of "magic", declare enum
and use it.

https://bugs.freedesktop.org/show_bug.cgi?id=56956
2012-11-16 17:57:47 +01:00
Vasily Khoruzhick ed2c75842a upektc: Port to asynchronous model
https://bugs.freedesktop.org/show_bug.cgi?id=56955
2012-11-16 17:56:51 +01:00
Vasily Khoruzhick b307dd1a6a aes2550: fix bug introduced by last commit
ssm->priv is not aesdev, but fp_img_dev

https://bugs.freedesktop.org/show_bug.cgi?id=56782
2012-11-16 17:46:27 +01:00
Vasily Khoruzhick 39902374ce aes2550: Harden against low finger pressure
Stop scan only after 3rd heartbeat message

https://bugs.freedesktop.org/show_bug.cgi?id=56782
2012-11-06 09:32:07 +01:00
Vasily Khoruzhick 6b84c6664f AES1610: driver cleanup, part #2
Remove dead code

https://bugs.freedesktop.org/show_bug.cgi?id=56439
2012-11-06 09:26:17 +01:00
Vasily Khoruzhick f569d0bf44 AES1610: driver cleanup, part #1
Fix warnings reported by gcc

https://bugs.freedesktop.org/show_bug.cgi?id=56439
2012-11-06 09:26:17 +01:00
Vasily Khoruzhick 1cfd14b7fe nbis: fix rest of warnings reported by gcc
https://bugs.freedesktop.org/show_bug.cgi?id=56439
2012-11-06 09:26:17 +01:00
Vasily Khoruzhick 5d32102efe nbis: prefix global variables with "g_"
It fixes a lot of warnings about shadowing global variable

https://bugs.freedesktop.org/show_bug.cgi?id=56439
2012-11-06 09:26:17 +01:00
Bastien Nocera 9e10edd422 aes2501: Add year 2008 to the copyright.
https://bugs.freedesktop.org/show_bug.cgi?id=56715#c7
2012-11-05 19:52:46 +01:00
Vasily Khoruzhick fecf6d6fe5 aes2501: Update copyright line
https://bugs.freedesktop.org/show_bug.cgi?id=56715
2012-11-05 19:51:19 +01:00
Vasily Khoruzhick e32fa8cc38 aes2501: Improve image contrast
When scanning, check the histogram sum, and increase the
ADREFHI register value if the sum is too low, or decrease
it if it's too high.

https://bugs.freedesktop.org/show_bug.cgi?id=56715
2012-11-05 19:49:54 +01:00
Vasily Khoruzhick d8aae30a67 aes2501: Harden against low finger pressure
Wait for 3 empty frames before stopping the scan

The driver used to stop the scan immediately after an empty frame
(by checking for hist sum == 0), but it is possible to get empty
frames in the middle of the scan due to low finger pressure.
Waiting for 3 empty frames stop the driver wrongly aborting the scan
too early.

https://bugs.freedesktop.org/show_bug.cgi?id=56715
2012-11-05 19:47:32 +01:00
Vasily Khoruzhick 84b97ea15b lib: Fix warning when debug logs are disabled
Fix warning in sync.c when debug logs are not enabled

https://bugs.freedesktop.org/show_bug.cgi?id=56439
2012-11-05 19:24:55 +01:00
Vasily Khoruzhick 8f98743857 upeksonly: Fix build-time warnings
Fix warnings reported by gcc

https://bugs.freedesktop.org/show_bug.cgi?id=56439
2012-11-05 19:24:44 +01:00
Vasily Khoruzhick be29f27e25 upeke2: Fix build-time warnings
Fix warnings reported by gcc

https://bugs.freedesktop.org/show_bug.cgi?id=56439
2012-11-05 19:24:23 +01:00
Timo Teräs d003f08855 lib: Add support for DigitalPersona URU4500
By adding native encryption support, rather than poking at
the firmware to disable it.

This also makes the URU4000B use native encryption.

https://bugs.freedesktop.org/show_bug.cgi?id=55351
2012-11-05 18:39:16 +01:00
Vasily Khoruzhick 83333bce3f lib: Add AES2550/AES2810 driver
Initial implementation of AES2550/AES2810 driver.
Does not support AES2810 crypto engine and external flash.

https://bugs.freedesktop.org/show_bug.cgi?id=50859
2012-10-11 15:24:14 +02:00
Bastien Nocera 132b178304 lib: Add driver names to the udev rules 2012-08-28 20:02:17 +01:00
Andrej Krutak c3689665db lib: Add VFS300/VFS301 driver
https://bugs.freedesktop.org/show_bug.cgi?id=37574
2012-08-28 19:51:59 +01:00
Bastien Nocera 3d222ddda7 lib: Fix whitespace errors 2012-08-28 19:45:08 +01:00
Vasily Khoruzhick ff02115b0f lib: Fix global variables collision with libusb 2012-08-14 15:25:44 +01:00
Bastien Nocera 3b409c767c build: Allow disabling the update of udev rules
We can only create the udev rules file when we're not cross-compiling,
so allow people to disable updating the file when building from
tarballs.

If you run with --enable-udev-rules=no and the
60-fprint-autosuspend.rules doesn't exist, you're on your own.
2012-08-14 15:19:35 +01:00
Bastien Nocera 2d09b10a27 build: Include udev rules in tarball 2012-08-14 14:52:58 +01:00
Benedikt Morbach 0f4a75ff61 update udev rules dir location again
Instead of hardcoding whatever the new fashion is every few months, which might
even differ between distributions, just put the rules where udev says we should.

https://bugs.freedesktop.org/show_bug.cgi?id=50426
2012-05-28 14:12:55 +01:00
Bastien Nocera dfff16f3e3 Don't print duplicate udev rules
https://bugs.freedesktop.org/show_bug.cgi?id=45513
2012-02-02 05:28:17 +00:00
Patrick Marlier 3d2e545264 Fix possible crash without a deactivate callback
We were checking for ->activate existing instead of ->deactivate.
2012-01-20 12:57:27 +00:00
Benedikt Morbach c96fa32da4 Move udev rules to libdir
This moves the dir from /etc/udev/rules.d to /lib/udev/rules.d,
which is encouraged by upstream, as /etc is for user overrides only

https://bugs.freedesktop.org/show_bug.cgi?id=44507
2012-01-06 12:13:29 +00:00
Matthew Garrett 48ec64f683 Fix udev control path
Newer kernels uses power/control for USB suspend setup, not power/level.
Fix the udev rules generation.
2011-10-04 15:11:08 +01:00
Sergio Cerlesi d2e957683f Added support for Validity VFS101
USB ID 138a:0001
2011-04-08 15:37:03 +01:00
Sergio Cerlesi a3ae96c214 Fix function fpi_im_resize on create new image
The function fpi_im_resize copy the new resized image into old fp_img
instead of newimg so, new image is empty and often it generated a
segmentation fault error.
2011-02-22 19:14:02 +00:00
Sergio Cerlesi 3dd905d4e9 Fix return timeout of fp_get_next_timeout
On function fp_get_next_timeout if exist fprint timeout or libusb
timeout the function return the smaller of they.

But if one of that not exist and have a smaller value the function
return a timeout that not exist.
2011-02-18 13:59:28 +00:00
Kunal Gangakhedkar ff842125c5 Add C++ guards to take care of C++ name-mangling.
The libfprint library is generally built with C calling conventions.
Which makes it difficult to link to C++ programs as it is.

This patch adds the support for linking with C++ code - by telling the C++
compiler to use C calling conventions for libfprint functions.

Reported-by: Guus Ellenkamp <guus@activediscovery.net>
Signed-off-by: Kunal Gangakhedkar <kunal.gangakhedkar@gmail.com>
2010-09-08 11:02:25 +01:00
Hugo Grostabussiat 712ebb6d44 Namespace functions and structs for 147e:2016
Inserted "_2016" in structures, enums and functions names
that are related with device 147e:2016.
2010-08-31 17:51:21 +01:00
Hugo Grostabussiat a18f318446 Added support for UPEK TCS4C (USB ID 147e:1000)
https://bugs.freedesktop.org/show_bug.cgi?id=29719
2010-08-31 17:49:45 +01:00
Bastien Nocera 15b8e8f376 Remove HAL fdi generation
HAL is deprecated, and the rules are broken when multiple
drivers use the same USB IDs.
2010-08-25 11:20:55 +01:00
Bastien Nocera 9f8dd29a55 Make sure all sources are dist'ed
So that you can compile against ImageMagick even if the
distter doesn't.
2010-08-25 11:17:42 +01:00
Bastien Nocera 375575b701 Port OpenSSL using code to NSS
As OpenSSL cannot really be used in an LGPLv2+ piece of software
without an exception.

Adapted from the example code at:
http://www.mozilla.org/projects/security/pki/nss/sample-code/sample2.html
and:
http://github.com/bagder/curl/commit/f3b77e5
2010-08-25 10:34:30 +01:00
Alexia Death 25161286f5 Only complete scan with MIN_ROWS in print
Don't consider the scan complete unless theres at least
MIN_ROWS recorded or very long blank read occurred.

Typical problem spot: one brief touch before starting the
actual scan. Happens most commonly if scan is started from
before the first joint resulting in a gap after the inital touch.

http://lists.reactivated.net/pipermail/fprint/2009-December/001406.html
2010-08-19 20:36:16 +01:00
Alexia Death c575afba9a Make the +2 right shift happen on image handoff.
Rather than when reading the rows. Doing it there seems a lot
more sensible and does not get in the way of minimizing the
impact of lost USB packets.

http://lists.reactivated.net/pipermail/fprint/2009-December/001404.html
2010-08-19 20:29:45 +01:00
Alexia Death 8cd31f6ad8 Try to correct missing packets in image stream
If a packet goes missing, use the data from previous row
to minimize distortion, or use some neutral dummy data.

http://lists.reactivated.net/pipermail/fprint/2009-December/001404.html
2010-08-19 20:27:09 +01:00
Alexia Death 4b518bd230 Fix a segfault if a scan was shorter than 8 lines.
This segfault was caused by proceeding to free the conversion result
without checking for an error condition in image to print
data conversion.

http://lists.reactivated.net/pipermail/fprint/2009-December/001405.html
2010-08-19 20:21:51 +01:00
Bastien Nocera 9608ab3707 Don't crash when no devices are present 2010-08-18 11:17:20 +01:00
Bastien Nocera 73561989dd Implement discover() methods for upeke2 and upeksonly
upeksonly handles revision 1 devices, upeke2 revision 2 devices.

https://bugzilla.redhat.com/show_bug.cgi?id=504399
2010-08-17 23:41:23 +01:00
Bastien Nocera df4a6f53d2 Rework "discover" code for drivers
Check all the drivers for one that'll drive our device in
question, and prefer ones that have a discover() method that runs
successfully to a driver without such a method.

This allow drivers to both reject devices (if 2 drivers handle
the same USB IDs), or a single driver to handle variants of the
same device (through the devtype out value of the discover method).
2010-08-17 23:14:18 +01:00
Jorge Suarez de Lis 48af46a2c5 upeke2: Add support for 0x2e status code
As reported working in:
http://www.mail-archive.com/fprint@reactivated.net/msg01426.html
2010-08-17 19:55:48 +01:00
Jorge Suarez de Lis 5a1926bb41 Add (disabled) UPEK EikonII (TCRD4C) driver
The device driver is always disabled as it uses the same Device ID
as another working reader:
https://bugzilla.redhat.com/show_bug.cgi?id=504399#c38
2010-08-17 19:36:56 +01:00
Guido Grazioli 7c7402a697 Finish implementation of AES1610 driver
Ported to the new internal libfprint API.

https://bugzilla.redhat.com/show_bug.cgi?id=499732
2010-08-17 11:36:34 +01:00
Matthew Garrett a99e813bbf Add udev rules to set devices to autosuspend
Most fingerprint readers can be suspended safely, so use
the udev rules to autosuspend them when they appear.

The script itself contains whitelists and blacklists.
2010-08-17 11:35:26 +01:00
Bastien Nocera 014b933b2b Add gdk-pixbuf support
When imaging support is required, we prefer to use gdk-pixbuf,
as it's already on things like Live CDs.
Also fix the examples building against the system libfprint.
2010-08-17 11:35:06 +01:00
Bastien Nocera e5da34e80a Fix fp_get_pollfds()
It was increasing i too early, and writing past the allocated
structures.
2008-11-25 16:08:59 +00:00
Bastien Nocera d816fed5c3 Disable finger_num_to_str when debugging is disabled
One less warning.
2008-11-25 16:08:58 +00:00
Bastien Nocera 749bb3e30e Export scan type through HAL
Also export the scan type through HAL.
2008-11-24 17:19:36 +00:00
Daniel Drake d482228325 upekts: Don't choke on non-zero bytes in command response
Alon Bar-Lev's device behaves differently, but seems to work fine with
upekts even if we ignore the difference.
2008-11-20 19:59:43 +00:00
Daniel Drake 7c44c86d4c Logging control
Don't log anything by default, and let the applications change the log
level.
2008-11-20 17:23:04 +00:00
Bastien Nocera 29044d9ca9 Export scan type for each driver
For each driver, export the scan type supported by the devices it
handles. This allows front-ends to direct the user better.
2008-11-20 14:53:01 +00:00
Daniel Drake b93f038dbc distcheck fix for fdi file 2008-11-18 17:18:21 +00:00
Daniel Drake 2d30e40ed7 aes2501: Add AES2500 ID
Reported to work with Motion Computing M1400 tablet by Daniel Hazelbaker
and Alex Van Deusen.
2008-11-02 14:49:39 +00:00
Bastien Nocera 7c83b6d825 Tag fingerprint devices in HAL
Tag all the fprint supported devices in HAL. Patch from
myself and Timo Hoenig <thoenig@suse.de>.
2008-11-02 11:06:22 +00:00
Daniel Drake 7672c43cea distcheck "" fix
Pointed out by Bastien Nocera
2008-11-02 11:03:32 +00:00
Gordon Stratton d94ffa22d5 Missing parameter in fp_err call 2008-10-31 23:36:55 +00:00
Daniel Drake 6b8b17f575 Split imagemagick hack from main library
Cleans up the conditional compilation system
2008-08-10 14:41:13 -05:00
Pavel Herrman bba1c1085f Allow drivers to be included/excluded at compile time 2008-08-10 14:41:10 -05:00
Daniel Drake b6dabaacc8 Enable libusb debug messages
While we're a noisy library we might as well ask libusb to be as well
2008-07-09 03:25:23 +01:00
Daniel Drake 3915cb2622 Add upeksonly driver for UPEK TouchStrip sensor-only devices
The long awaited 147e:2016 reverse engineering efforts.
Image quality is OK, not brilliant - a little fuzzy, but it works
quite well.
2008-07-09 03:25:09 +01:00
Daniel Drake 59c62c7d74 Update for libusb-0.9.1 2008-07-02 23:27:37 -05:00
Daniel Drake e1691a29dd update for new libusb_open API 2008-06-15 10:54:07 -05:00
Vasily Khoruzhick aa7c8ae81e Adapting to latest libusb-1.0 changes
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
[dsd: remove config const qualifier and add freeing of config]
2008-05-13 18:17:37 +01:00
Daniel Drake 63421e3fd6 uru4000: fix compile against latest libusb 2008-05-07 23:46:06 +01:00
Daniel Drake 76cbf21223 uru4000: Add support for Digital Persona U.are.U Fingerprint Keyboard
Reported by Tudor Panaitescu
2008-05-02 11:55:50 +01:00
Daniel Drake f540ae5d5b Fix memory leak in fpi_print_data_new()
Pointed out by Krystian (yoB) on FS#24
2008-04-19 23:12:42 +01:00
Daniel Drake ebcabc1ade uru4000: avoid cancelling a completed transfer 2008-04-12 16:58:49 +01:00
Daniel Drake 870ddfb905 some libusb pointers are now const 2008-04-06 23:55:41 +01:00
Vasily Khoruzhick 40e7ac195a Adapting to latest libusb
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
2008-04-06 23:52:04 +01:00
Azzie 1ab52617c7 Update for latest libusb constant names 2008-03-29 18:11:17 +00:00
Daniel Drake 981f2eb0aa vcom5s: implement finger detection
Uses thresholding of average pixel intensity of the center region of
the image.

Also document guessed meanings of magic numbers for registers.
2008-03-20 15:31:03 +00:00
Daniel Drake d6d4e56ccf uru4000: add fwenc search location for UareU4000
ticket #14 includes a device with a different firmware, this should get
it up and running.
2008-03-20 13:34:48 +00:00
Daniel Drake c9ff2c5541 Add Veridicom 5th Sense driver
Based on bus traffic analysis of the windows driver. This device is
working well, but finger presence detection is not yet implemented.
2008-03-19 23:52:28 +00:00
Daniel Drake 617ca8cd15 fix imaging action state for repeated enroll attempts
Enroll attempts may retry in some situations, so we need to reset the
state to accept more scans.
2008-03-19 23:28:44 +00:00
Daniel Drake a11ac7d8f8 uru4000: search for encryption byte
New DigitalPersona devices have a new firmware. We now use a search
scheme to find the encryption byte, by examining known locations
in the firmware until we find something that we recognise.
2008-03-19 17:56:21 +00:00
Daniel Drake fb49c24ae2 uru4000: Unify register I/O 2008-03-19 17:56:13 +00:00
Daniel Drake d3d68be490 uru4000: fix register widths
Encryption byte address was being truncated in the sm_fix_fw_read_cb
path
2008-03-19 17:56:08 +00:00
Daniel Drake 156e5e7d7c Update for new libusb_get_pollfds API 2008-03-13 12:54:27 +00:00
Daniel Drake f546fa2555 Fix synchronous enrollment for multi-stage devices 2008-03-10 13:33:32 +00:00
Daniel Drake 4e884807a7 Update for libusb API rework 2008-03-10 13:33:23 +00:00
Vasily Khoruzhick 647d140834 Fixed fp_identify_finger_img didn't return result of operation
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
2008-03-05 21:45:02 +00:00
Daniel Drake 07a42d5f91 uru4000: Retry initialization 3 times
Sometimes we don't get the powerup interrupt, so retry the whole process
up to 3 times if we time out waiting for the interrupt.
2008-03-03 23:29:03 +00:00
Daniel Drake 2d27df0268 Allow timeouts to be cancelled 2008-03-03 23:28:17 +00:00
Daniel Drake c29c3fa014 Fix low minutiae handling
Fixes a crash and adds in a missing break statement
2008-03-03 13:48:33 +00:00
Daniel Drake b167dd02fc Add API to determine next timeout 2008-03-01 13:02:20 +00:00
Daniel Drake 3ea28e334d Provide access to fd set
Includes notifications when the set changes.
2008-03-01 13:02:20 +00:00
Daniel Drake 88e9f4a5f8 Public async API implementation
Involved some internal overhaul/reorganisation. Nice side effect is that
the synchronous API is now expressed purely in terms of the public async
API.
2008-03-01 13:02:17 +00:00
Daniel Drake 83f9da1b87 uru4000: port to asynchronous model 2008-02-18 18:12:52 +00:00
Daniel Drake 754e56aec1 Allow execution of sub-SSMs
A subssm will be executed, and upon completion the parent state machine
will either be advanced to the next state or aborted with error, depending
on the outcome of the subssm.

Also add some debug messages.
2008-02-18 17:55:35 +00:00
Daniel Drake b8dc77b56e Fix verify/identify error handling
If verify_start failed, we need to run verify_stop. Same for
identification.
2008-02-18 17:55:35 +00:00
Daniel Drake 866dd941cc Add timing and polling infrastructure
Add timeout mechanism as an asynchronous equivalent of sleeping (uru4000
needs this).

Start implementing polling infrastructure which also accounts for pending
timeouts. We don't expose file descriptors yet, but this is a start.
2008-02-16 12:50:01 +00:00
Daniel Drake eff26bf0be aes2501: port to asynchronous model 2008-02-16 12:49:58 +00:00
Daniel Drake 0aaffcee33 Allow jumping to arbitrary state in a SSM
This is looking less and less like a simple state machine now, but it's
proving a useful model!
2008-02-16 12:49:37 +00:00
Daniel Drake 77b5dab04b aeslib: introduce user_data for write registers callback
aes2501 needs this for state tracking
2008-02-16 12:49:27 +00:00
Daniel Drake 6f08a3666d aeslib: fix register write boundaries 2008-02-16 12:49:20 +00:00
Daniel Drake d914712437 aes4000: port to asynchronous model 2008-02-16 12:49:17 +00:00
Daniel Drake d731d5f3a3 aeslib: port to asynchronous model 2008-02-16 12:49:02 +00:00
Daniel Drake 3048b37176 Port imaging layer to asynchronous model 2008-02-16 12:48:44 +00:00
Daniel Drake aeeec97fb2 upekts: port to asynchronous model 2008-02-16 12:48:25 +00:00
Daniel Drake 5b1f6a0df7 Port primitive driver layer to asynchronous model 2008-02-16 12:47:56 +00:00
Daniel Drake 69760547df Disable all drivers while internal API is being reworked 2008-01-30 14:17:08 +00:00
Daniel Drake bf7093d607 Port to libusb-0.9.0 (synchronous I/O)
Straightforward port to libusb-0.9.0 sync I/O functions, to give libusb-1.0
a bit of a test drive and to create a reference point for later.
2008-01-30 14:16:35 +00:00
Gustavo Chain 6f456f399d Add Secugen FDU2000 driver
[dsd@gentoo.org: some trivial changes:
fixed some warnings
fixed fp_img memory leak on error
renamed endpoint constants (calling a bulk endpoint 'ctrl' is confusing,
as a control endpoint is something different)
]
2007-12-27 01:09:32 +00:00
Daniel Drake 659d8346be Compiler flags update
Dropped -Wextra as it is not that useful.
Set compiler flags to be more like the kernel's.
Set std=gnu99
Fixed some warnings.
2007-12-27 01:06:55 +00:00
Daniel Drake 642010643d uru4000: Add support for Microsoft Fingerprint Reader v2
After lot 713, Microsoft fingerprint readers changed. The new version
comes with a new USB product ID and a challenge-response authentication
scheme where the device challenges the authenticity of the driver.

An independent third party produced documentation on the computations
needed to convert a challenge into the correct response, and I then used
this documentation to produce a clean-room reimplementation of the
authentication scheme.
2007-12-07 15:05:16 +00:00
Daniel Drake 3479dee0e4 aeslib: image assembly
All 3 authentec drivers now use a shared image assembly function.
2007-11-26 23:28:14 +00:00
Daniel Drake e228f2c7da Introduce shared functions for authentec drivers
Currently provides register writing functionality only, more common ground
will be moved here soon.
2007-11-26 22:53:41 +00:00
Anthony Bretaudeau 8e0e8e4386 aes1610: imaging improvements
bz threshold is now 10 (instead of 15). I think it is ok for the moment.
If we manage to get higher image quality in the future, we'll change that.

max_frame is set to 350. 150 was too low => incomplete fingerprints

the driver was designed to stop the acquisition as soon as it gets a blank
frame (=> incomplete fingerprints). Now it waits to have at least 50 blank
frames before stopping.
2007-11-26 17:51:31 +00:00
Daniel Drake 1ee6210be3 Hookup AES1610 driver
An oversight pointed out by Michele B.
2007-11-22 17:25:27 +00:00
Daniel Drake 69700855e2 Implement identification for imaging devices 2007-11-21 00:30:00 +00:00
Daniel Drake 3f70d6f794 Identification infrastructure 2007-11-20 22:12:24 +00:00
Anthony Bretaudeau c5a550e42c Add Authentec AES1610 driver
This is an active capacitance swipe-type device similar to but smaller
than the AES2501.

Image processing performance is good but matching performance is not so
good. The bozorth3 matcher needs tweaking in order to better cope with
small sets of minutiae.

With a lowered threshold, matching performance is good enough for now.
2007-11-19 18:39:03 +00:00
Daniel Drake 6245acea84 Add API to delete enroll data 2007-11-19 18:29:26 +00:00
Daniel Drake 887e0e6acf Add API to access minutiae 2007-11-19 00:27:27 +00:00
Daniel Drake fa742a2142 Use G_N_ELEMENTS macro 2007-11-17 23:47:06 +00:00
Daniel Drake fa24d51304 Fix variable get_img_width/height return value
Fix the functions to conform to the documentation: -1 means non-imaging
device, 0 means variable. Internally, -1 is used to represent variable
height (to be noticably different from the memset-imposed default of zero).
2007-11-17 13:17:15 +00:00
Daniel Drake ba24c0884a Rework some image handling; add public binarization API
I want to offer the ability for an application to view a binarized
version of a scanned print. This lead onto a few changes:

 1. Store minutiae and binarized data inside fp_img
 2. Move resize code to the capture path, it previously happened much
    later.
 3. Add fp_img_binarize() to return a new image in binarized form.
 4. Add a BINARIZED_FORM flag to prevent an image being binarized again.

In future, it would be nice to be able to binarize without detecting
minutiae, but this involves some work on the NBIS interaction.
2007-11-17 12:51:28 +00:00
Jan-Michael Brummer 72c304999a Add UPEK TouchChip driver
The UPEK TouchChip is an active capacitance imaging device with a
press-type sensor. It also has image storage capabilities which will
hopefully be accessible through libfprint in the near future.

This device can be found in the Samsung P35 laptop.
2007-11-17 12:51:20 +00:00
Daniel Drake 791eeab859 aes2501: restore default bozorth3 match threshold
With the multiple register writing code, the image quality is much
better. It's trivially easy to get a match score of 100, and 200 is
possible with a little effort. Remove the lowered match threshold.
2007-11-16 15:44:39 +00:00
Daniel Drake be0e9debd9 aes2501: write multiple registers simultaneously
Instead of writing each register in a separate USB transaction, we now
write up to 16 at once.

This drastically improves scan image quality due to reducing the amount of
time needed per iteration of the sampling loop (sending 1 USB transaction
per iteration instead of 7).
2007-11-16 15:35:48 +00:00
Daniel Drake bfc55c4f0f Use older ImageMagick API
Debian ship an ImageMagick that is more than 2 years old. Switch to using
older APIs so that we have compatibility all-round.
2007-11-16 14:24:04 +00:00
Daniel Drake 3fa3c0daf7 Initialize enrolled image pointer to NULL
Currently this is a dangling pointer if the image capture fails, and then
we try to standardize an invalid pointer --> crash
2007-11-16 13:14:30 +00:00
Daniel Drake 069b4a30eb Doc and build updates
Add ChangeLog generation makefile target.
Group all copyright notices in AUTHORS.
Update some doxygen comments, and allow fp_dev_close(NULL)
2007-11-15 23:00:04 +00:00
Vasily Khoruzhick 06e8040956 aes2501: Detect reversed scans
aes2501 can be mounted 180 degrees rotated (this happens on most part of
laptops), so driver should detect whether sensor is 180degrees rotated
and assemble frames in right order.
2007-11-15 16:21:03 +00:00
Daniel Drake 2ad14c0212 Add AES2501 driver
This driver works quite nicely. Seems a little too sensitive though (too
much black in the standardized image, not enough ridge gap definition).

Processing results are quite good, but you need a good enrollment image
(i.e. long!). It's best to get such images by pressing harder than you
might think necessary and swiping slowly.
2007-11-15 09:54:39 +00:00
Daniel Drake 5485f8031d Return images through enroll/verify path
Added new API functions to obtain images, even when scans are bad, perhaps
a useful way to show the user just how good/bad the scan actually was.

Drivers and examples updated accordingly.
2007-11-15 09:54:39 +00:00
Daniel Drake a86cd51959 Clean up on exit, and convert to singly-linked-lists
This adds fp_exit() to the public API, intended to be called while the
driving app is shutting down.
2007-11-15 09:54:38 +00:00
Daniel Drake a76f55db0d upekts relicensing
Pavel Machek and Timo Hoenig agreed to relicense their work. Thanks guys,
I look forward to working together.
2007-11-15 09:54:35 +00:00
Daniel Drake 71e4bb39ec Allow drivers to specify custom bz3 match threshold
aes4000 detects fewer minutiae and hence returns lower scores.
2007-11-12 23:28:46 +00:00
Daniel Drake e3451158e9 Custom image resizing
mindtct appears to completely ignore the pixels-per-mm input parameter
(ippmm). When processing AES4000 images, the binarized image is
completely mangled and a lot of ridge information is lost.

Resizing the AES4000's small images results in a huge imaging performance
gain.

We use imagemagick for the resizing, as it's resizing code resamples the
image too (smoothing it out), which further improves performance.
2007-11-12 23:28:46 +00:00
Daniel Drake a73cbc10fb aes4000: image quality improvements
The windows driver takes one sample at the previous register settings
and then changes some registers before resamping (and getting much better
images). The exact changes that it makes seem to vary, perhaps based on
the histogram.

Anyway, this is an approximation of the settings used for the 2nd sample
which should help matching results.
2007-11-12 23:28:46 +00:00
Daniel Drake b9238e8b8a Support images with variable dimensions
For example, AES2501 returns images that vary in height.
2007-11-12 23:28:45 +00:00
Daniel Drake 8e7afef736 uru4000: add Digital Persona U.are.U 4000 support
My UareU4000 device isn't working properly -- only seeing an all-white
image and no finger-on detection, however I think this code should work
for working devices.
2007-11-04 21:12:48 +00:00
Daniel Drake f498fcd1ea Fix img_capture_continuous build
Also enable it in the default development build
2007-11-04 19:10:23 +00:00
Daniel Drake f733ddcc3b uru4000: retry scanner powerup 3 times
When we include the await_finger_off procedure (i.e. set mode 12), the
current power-up code is unreliable - no 56aa interrupt arrives sometimes.
Comparing the F0 data and hwstat at this point between a working and a
non-working run yields no differences.

Work around this issue by retrying power-on 3 times.
2007-11-04 19:02:38 +00:00
Daniel Drake cbe1111e4e uru4000: handle images without headers
While testing the new code on my MS keyboard, I found some strange
conditions where occasionally, the device will stop providing images
headers until it is replugged.

Detect and work around this when it happens.
2007-11-04 19:01:51 +00:00
Daniel Drake 2e6c3b940c API documentation 2007-11-04 00:21:54 +00:00
Daniel Drake 7e6f25908b remove imgdev abstraction from public API
Make it easier for application developers, don't have to care about this
level of abstraction which we're intending to make superfluous to them.
2007-11-02 17:06:44 +00:00
Daniel Drake fc77786e46 uru4000: interrupt handling fixes
This should improve driver stability somewhat. Powerup problems seem to
happen when we receive 3 unrelated interrupts while waiting for the
power-on interrupt, so let's assume that the device can only buffer 3
interrupts, and when the buffer is full, it discards new ones.

When we detect a possible buffer overflow, ask the caller to retry the
operation.

Also, saw the interrupt of death a few times, so add in a warning when
this happens. Haven't seen it since handling interrupt overflows though.
2007-10-31 22:47:04 +00:00
Daniel Drake 07a81b07be upekts: initialise and deinitialise device during verify/capture
Otherwise it heats up, and verify retries fail because we didn't end the
session.
2007-10-31 22:46:50 +00:00
Daniel Drake fc0a97a801 Build system tweaks
Install fprint.h header
Include headers in distribution
distcheck fixes
Include and install pkgconfig file
2007-10-31 15:44:36 +00:00
Daniel Drake 447b1f01b3 Print discovery
Add concept of "discovered prints" and flesh out the API. A discovered print
was found based on file name but has not been checked for file integrity,
and of course there is no guarantee that it is usable when you try to
use it later (might have been deleted, etc).

The .fprint directory structure was changed - instead of using mnemonics
like "rind" we use their numeric value in the fp_finger enum as the filename.
2007-10-31 13:13:57 +00:00
Daniel Drake b96aade69c Flesh out driver_id/devtype API
Add accessor functions to the various structures
2007-10-30 22:25:26 +00:00
Daniel Drake cc3e976042 Add 'discover' hook for drivers
Drivers can now offer a discover function, and are expected to offer the
device devtype during discovery, without accessing the USB device. Hmm.
Maybe we'll have to change that later...
2007-10-30 22:15:45 +00:00
Daniel Drake f0ef386f43 More NBIS cleanups 2007-10-30 20:55:35 +00:00
Daniel Drake 6f633cc771 Use glib's byte order functions 2007-10-29 23:06:06 +00:00
Daniel Drake 294f9ad447 Improve print_data structure and on-disk format
Drivers now have an ID number. These will be assigned by me and documented
on the wiki. 0 cannot be used.

Drivers now define a devtype for each device they initialise. This is to
cope with the situation where a driver can support varying devices where
their print data is incompatible (i.e. image scaling is totally changed).
This doesn't apply to any existing supported devices.

Print data no longer includes driver name, and includes driver ID instead.

Paths to saved print data now include driver ID and devtype, and no longer
include driver name.

APIs exposed for converting a print_data into a blob which can then
be loaded back again later. Useful for systems who don't want to use
my simple storage system (which is only aimed at a single user).

File format is now defined and will be documented on the wiki. The header
is larger as we can no longer rely on directory paths in all scenarios.

Print data compat check now checks devtype and driver ID.
2007-10-28 22:13:51 +00:00
Daniel Drake 4e5cfdf92a NBIS cleanup
Part 1 of many. Remove some unused/pointless code, and made some code
static.
2007-10-28 15:57:27 +00:00
Daniel Drake 6b8d17ef26 Add bozorth3 from NBIS; implement verify for image devices
uru4000 works splendiferously (YAY!)
aes4000 is going to need some work though :(
2007-10-28 12:03:15 +00:00
Daniel Drake 41b25f28a4 Add mindtct from NBIS; implement enroll for image devices
mindtct is mostly as-is for now, with just a couple of bits ripped out.
2007-10-27 22:48:09 +01:00
Daniel Drake be67f85caa Add Authentec AES4000 driver 2007-10-27 19:33:00 +01:00
Daniel Drake 3bbb7b8b51 Internal image allocation API changes
Creating by dimensions is likely not useful now that we can infer image
size from a device in question.
2007-10-27 18:10:33 +01:00
Daniel Drake da071ff8a2 Add API for freeing images 2007-10-27 15:16:54 +01:00
Daniel Drake c2a83ec948 Improved image dimension handling
Drivers now specify the size of the image they provide, and theres an API
so that you can get the size of an image before you capture it.
2007-10-27 14:45:14 +01:00
Daniel Drake 9960a7ff34 Image standardization
Initially supports flipping and colour inversion
2007-10-27 14:24:57 +01:00
Daniel Drake 0ddfef6c21 Add uru4000 driver 2007-10-27 00:10:58 +01:00
Daniel Drake f367ae8f4b Zero out fprint_data fields on allocation 2007-10-27 00:09:46 +01:00
Daniel Drake f3a838e856 Initial implementation for image device access and capture
Also added new example: img_capture
2007-10-27 00:09:18 +01:00
Daniel Drake 0aac3706d7 upekts: release interface on error condition and normal exit 2007-10-25 15:36:13 +01:00
Daniel Drake 0ac74ef649 Pass driver_data from ID table to driver init function 2007-10-25 15:00:30 +01:00
Daniel Drake 2709c6dc8c Basic image driver foundations
The basic model is that image drivers declare a fp_img_driver structure
rather than a fp_driver struct. fp_img_driver will contain primitive imaging
operations such as 'scan finger and return image'. The imgdev layer will
generically implement the primitive fp_driver operations, and the imgdev
layer will fix up the enroll/verify/etc pointers at driver registration
time.

Removed const from all fp_driver declarations, as these are now modified
dynamically in the case of imaging drivers.
2007-10-23 23:27:21 +01:00
Daniel Drake c97f4bb1a7 Fix verify debug messages
Teach it about the various error conditions.
2007-10-16 14:35:33 +01:00
Daniel Drake 801fcfc07c upekts: fix memory corruption
Found by valgrind
2007-10-16 14:34:47 +01:00
Daniel Drake 680142f268 storage: add save/load functionality
Prints can now be saved to disk (but you currently must classify which
finger they are) and you can load them later.

Added 2 simple example programs to demonstrate this.
2007-10-16 14:34:22 +01:00
Daniel Drake 3b8f8c195c upekts: support large messages
Add support for messages with a length greater than 255.
Also picked out a few more retry codes.
2007-10-16 13:41:23 +01:00
Daniel Drake bf9ce44f43 upekts: verify implementation
We can now verify live fingerprints using the verify example.
Error handling during verification needs to be improved.
2007-10-15 22:09:46 +01:00
Daniel Drake f59112d57c Unhide fprint_data buffer from drivers
May as well keep things out in the open.
2007-10-15 22:07:22 +01:00
Daniel Drake 68bdfc7868 Verification infrastructure
Similar model to enrollment.
2007-10-15 22:06:56 +01:00
Daniel Drake 39271b4fe5 Enrollment: improved error reporting
Convert enrollment function to return a signed integer, which is negative
on error or corresponds into fp_enroll_result otherwise.
Now we can treat a 'FAIL' condition differently from an actual error: fail
means that enrollment didn't complete because the data was nonsense or
whatever (e.g. scanned a different finger for each stage?).

Updated upekts accordingly.
2007-10-14 00:51:20 +01:00
Daniel Drake ab5b1ca8e9 upekts: communication handling and enrollment implementation
This completes an enrollment implementation for the upekts driver.
It's based on code from libthinkfinger, but as there seemed to be many
unknown details there, I spent some time analysing the bus messages in
more detail and have effectively rewritten almost all of the borrowed code.

Note that libthinkfinger is GPL licensed, so that reflects on this code too.
At release time I will ask them if they are OK for me to relicense it.
2007-10-13 17:13:25 +01:00
Daniel Drake 2995144310 Build system tweaks
Add configure-time controls for logging
Set some default compile-time warnings
2007-10-13 16:03:53 +01:00
Daniel Drake 50e2de0730 Enrollment tweaks
upekts will need to know when the first enrollment stage is attempted for
the first time, so add an __enroll_stage counter which actually indicates
the next stage to enroll. -1 is a special value and it means 0 is next *and*
it is the initial attemt.

Added more debug output to the enroll handler.
Added new fp_enroll_status codes for too short or uncentered scans.

Changed the print_data allocator to consider the device rather than the
driver, this feels more natural. Added missing return value.

Make fp_enroll_status codes start at 1. 0 can now be used as a
special/temporary value by the drivers. Also check that we aren't exceeding
the number of enroll stages.

Also add a missing exit() call to the verify example and update for the
above.
2007-10-13 15:51:33 +01:00
Daniel Drake e6624fe508 Add 16 bit endianness functions 2007-10-12 15:28:46 +01:00
Daniel Drake ec91736ac4 Add logging infrastructure
Also added some debug/error messages to existing code. For now debugging is
always on, this will be made optional later.
2007-10-12 15:14:29 +01:00
Daniel Drake 016ff33533 Enrolment infrastructure 2007-10-08 19:53:50 +01:00
Daniel Drake b071f3cdb9 Initial fingerprint data representation ideas 2007-10-08 18:24:29 +01:00
Daniel Drake 2c06a4ebfa Expose driver info to library users 2007-10-08 17:18:29 +01:00
Daniel Drake 711bb1151b open/close device functions 2007-10-08 17:16:56 +01:00
Daniel Drake 7d31cb4d45 Basic device discovery infrastructure 2007-10-08 17:16:54 +01:00
Daniel Drake 046bdc0bda Initial driver registration mechanism
Also added the basis of the upekts driver, which is the first I'll
implement.
2007-10-08 17:16:51 +01:00
Daniel Drake 7d3612d9f6 Create repo structure 2007-10-08 17:16:13 +01:00