Commit graph

36 commits

Author SHA1 Message Date
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
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
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
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
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
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 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 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 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 4e884807a7 Update for libusb API rework 2008-03-10 13:33:23 +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 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 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
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 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
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 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 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 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