Commit Graph
1973 Commits
Author SHA1 Message Date
Marco Trevisan (Treviño) cb862ccfad fpi-device: Remove commented function 2026-07-12 13:16:33 +02:00
Marco Trevisan (Treviño) c5e49592cd drivers: Remove redundant verify implementations
As per recent changes, drivers can just avoid implementing verify vfunc
unless the driver has specific commands to do it.

So let's just drop the duplicated code in drivers that have the very
same code path for both identification and verification.
2026-07-12 12:58:52 +02:00
Marco Trevisan (Treviño) bebaa80c99 fp-image-device: Drop explicit verification support
It's just the same logic repeated across one or multiple templates, so
let's just define one
2026-07-12 12:58:52 +02:00
Marco Trevisan (Treviño) 7fee92884d fp-device: Implement verify using identification
In case a device has not support for verification through an explicit
verify function, the verification can still be implemented using
identification with a gallery of a single print.

In fact that's what most of drivers these days do it, so let's just
avoid to them to handle this duplication unless a driver has really some
specific commands to do it.
2026-07-12 12:58:50 +02:00
Emanuele Bertolucci 111a3af462 data: Remove now-duplicate 27c6:6382 entry from unsupported-devices block
Companion fix to 51b8712: the static hwdb file had the same duplicate
the generator now avoids.
2026-07-08 16:20:24 +02:00
Emanuele Bertolucci 51b8712d51 fprint-list-udev-hwdb: Drop 27c6:6382 from the unsupported-devices list
It is now supported by the goodixmoc driver, so listing it here too
caused a duplicate VID:PID entry (the hwdb generator aborts on
duplicates).
2026-07-08 16:20:05 +02:00
Emanuele Bertolucci ca45b08bbe data: Add Goodix 27c6:6382 to autosuspend hwdb
Keeps the static hwdb in sync with the goodixmoc driver's id_table
(test-generated-hwdb.sh enforces this consistency).
2026-07-08 16:19:35 +02:00
Emanuele Bertolucci 6218b74436 goodixmoc: Add support for Goodix 27c6:6382 (Dell XPS 13 9315)
Same MOC protocol family as the already-supported 27c6:6384/631C.
Verified against real hardware: open, enroll, verify, identify and
delete all succeed. Dell's own driver .inf for this PID (extracted
from Goodix-Fingerprint-Sensor-Driver_T2VK3_WIN64_40.10.1.100_A05_01.EXE)
confirms it uses the plain (non-SecureFingerprint) MOC protocol.
2026-07-08 16:19:13 +02:00
Marco Trevisan (Treviño) 0e64435628 focaltech_moc: Simplify interface claiming error handling 2026-07-02 13:18:26 +02:00
Daniel SchaeferandMarco Trevisan (Treviño) 4061d76218 focaltech_moc: Handle errors
If the reader does not respond, currently the plugin segfaults.
The error should be handled gracefully.

With this change, an error is printed instead of crashing:
  failed to claim device:
  GDBus.Error:net.reactivated.Fprint.Error.Internal:
  Open failed with error: Can't get response!!

Signed-off-by: Daniel Schaefer <dhs@frame.work>
2026-07-02 12:46:48 +02:00
Sebastian van de MeerandMarco Trevisan 0fa670f7f8 nb1010: Add support for NB-2020-U fingerprint reader
Add USB PID 0x2020 (NB-2020-U) to the nb1010 driver's id_table.

The NB-2020-U is an embedded variant of the NB-1010-U using an
identical sensor die (confirmed by independent teardown reports from
System Plus Consulting/Yole Group). USB endpoint layout, command
protocol and image format are identical between both devices.

Tested on a Fujitsu notebook with integrated NB-2020-U reader
(USB ID 298d:2020): device enumeration, finger detection polling
and image capture all work correctly with the existing nb1010
driver code.

Signed-off-by: Sebastian van de Meer <kernel-error@kernel-error.com>
2026-07-02 00:37:30 +00:00
Marco Trevisan (Treviño) 3c4bee9e82 ci: Add test build in s390x to verify BE behavior
Most of drivers supports both endiannesses but we do not test this so
let's add a CI job to verify this
2026-07-02 02:14:37 +02:00
Marco Trevisan (Treviño) 72188c0eb8 aes2501: Fix endianness of instogram 2026-07-02 02:14:37 +02:00
Marco Trevisan (Treviño) 141a63b0a4 egis_etu905: Use fpi writer to build the commit data 2026-07-01 17:59:34 +02:00
Marco Trevisan (Treviño) a042240b67 egis_etu905: Use little endian commit data in all the archs 2026-07-01 17:56:41 +02:00
Marco Trevisan (Treviño) 1d6ebb0ee8 uru4000: Fix computation of num lines in big endian 2026-07-01 17:49:34 +02:00
Marco Trevisan (Treviño) e2ff73df3f elan: Use guint16 in LE for frame value 2026-07-01 17:49:34 +02:00
Marco Trevisan (Treviño) e821d0f83f build: Enable elanspi in big endian archs
It works fine so no need to do anything there
2026-07-01 17:49:34 +02:00
Marco Trevisan (Treviño) 2ff99be5db goodixmoc: Fix handling of CRC32 in big endian archs 2026-07-01 17:49:34 +02:00
Marco Trevisan (Treviño) 2dec3f57ea mafpmoc: Use fpi-bytes-writer to build command packet 2026-07-01 17:49:34 +02:00
Marco Trevisan (Treviño) 5395d1d2c5 elanspi: Include fcntl properly 2026-07-01 17:49:34 +02:00
Marco Trevisan (Treviño) 10c0b68549 mafpmoc: Copy the most significant bit of the cmd instead of LSB
This was causing the command not to be properly used in big endian archs
2026-07-01 17:49:34 +02:00
Marco Trevisan (Treviño) 47583db988 build: Do not mark secugen endian-dependent
The driver works fine in big endian machine
2026-07-01 17:49:34 +02:00
Marco Trevisan (Treviño) 050476e1ba fpcmoc: Use fpi-byte-{reader,writer} to parse/build the device data
In this way we have not endianness limitations
2026-07-01 17:49:34 +02:00
Marco Trevisan (Treviño) c039ab4754 fpcmoc: Add support to big endian architecture 2026-07-01 14:36:08 +02:00
Marco Trevisan (Treviño) 3e04f15179 build: Use a dict to define drivers build info
We used multiple arrays, making things more complicated than we should
with current meson
2026-07-01 14:00:56 +02:00
Marco Trevisan (Treviño) accbf7828e virtual-device: Set the finger on the new scanned prints 2026-06-26 13:44:02 +02:00
Marco Trevisan (Treviño) 1fd4024bd0 fp-print: Rely on GBytes to align memory
The old workaround is not needed anymore for the GLib version we're
depending on
2026-06-26 13:44:02 +02:00
Marco Trevisan (Treviño) 2d4b1c39e0 virtual-device: Use newer GLib functions 2026-06-26 13:44:02 +02:00
Aelin a25f71cf97 realtek: Support 3274:9003 Generic Realtek USB2.0 Finger Print Bridge
Found in my Medion SPRCHRGD 14 S1 Elite laptop, no further changes are
necessary to get enrollment and verification working.
2026-06-23 16:48:51 +02:00
Marco Trevisan (Treviño) 5dbcb0dfa4 fpi-{usb,spi}: Adjust docs to mention required env variables for logging 2026-06-22 15:22:04 +02:00
Marco Trevisan (Treviño) 3a54e4f837 fpi-log: Add atomic and unique check for FP_DEBUG_TRANSFER
Rather than check it all the times the variable, just rely on an atomic
check that is just done once for all
2026-06-22 15:22:04 +02:00
Marco Trevisan (Treviño) 8009a86247 fpi-log: Use single-line hex bytes dump
It's easier to parse and copy and also it makes easier to use it with
tools such as python's bytes.fromhex() without reformatting it.
2026-06-22 15:19:30 +02:00
Marco Trevisan (Treviño) 3db8184a30 fpi-log: Add functions to dump bytes
Drivers may need to to hex-dumps for debugging purposes, so expose what
we already had in the fpi transfers in the internal API
2026-06-22 15:19:30 +02:00
Marco Trevisan (Treviño) 5cadc90e7a fpi-ssm: Add checks on parameters validity 2026-06-22 12:50:16 +02:00
Marco Trevisan (Treviño) d1194070b1 fpi-ssm: Fix typo on docs 2026-06-22 12:49:50 +02:00
Marco Trevisan (Treviño) 92b7ced91c fpi-ssm: Clarify errors ownership 2026-06-22 12:49:28 +02:00
Marco Trevisan (Treviño) 3d91527eb9 secugen: Ignore wrong and unneeded device emulation mode check 2026-06-19 16:09:11 +02:00
Marco Trevisan (Treviño) 5c6fcb8f00 build: Define variable early enough 2026-06-19 16:08:52 +02:00
Marco Trevisan (Treviño) f800bbd485 fpi-device: Get the emulation mode only through compile-time defined libs
In test mode, dynamically load libraries in well known locations that can
allow to override the libfprint behavior.

It would still be possible to potentially inject code by replicating the
distro build directory and adding a library there, but if one is able to
access there, they would already be able to access any path.

Plus the env variable check is still there, so again they would need to
be able to change the fprintd environment
2026-06-19 15:55:13 +02:00
Marco Trevisan (Treviño) 3933e5d468 fpi-device: Only use emulation mode by pre-loading a library
Rather than just do it in production if set, make it more difficult to
potentially inject the test mode.

So rely on a weak definition of fpi_device_emulation_mode_enabled() that
can be only set externally
2026-06-19 15:50:18 +02:00
Marco Trevisan (Treviño) 98fb001883 fpi-device: Introduce a properly defined fpi_device_emulation_mode_enabled()
Drivers may do some adjustments in test mode, initially we wanted to
reduce this to the minimum but the usage of `FP_DEVICE_EMULATION`
exploded, so move this instead into a properly defined variable that:
 - Uses GLib compiler optimizations
 - Is read just once per process
 - Cannot be misused
2026-06-19 15:43:45 +02:00
Marco Trevisan (Treviño) debc6c601e fp-print: Use a switch to match the print type 2026-06-19 15:43:45 +02:00
Marco Trevisan (Treviño) 59ecce0a99 virtual-device: Use consistent sleep/wait multiplier under valgrind 2026-06-19 15:43:09 +02:00
Marco Trevisan (Treviño) b587e78b09 test-utils: Do not include the header multiple times 2026-06-19 15:43:09 +02:00
Marco Trevisan (Treviño) 2373769e5b tests/build: Increase the focaltech_moc test timeout
As per commit bad930503c the test data is way bigger than it used to
be, so the test duration is longer.

Thus increase the timeout not to have failures
2026-06-19 15:43:09 +02:00
Marco Trevisan (Treviño) bf91b0ede8 tests/build: Allow to define per-test parameters via a dict 2026-06-19 15:43:09 +02:00
Marco Trevisan (Treviño) 7925c5af13 drivers-api: Add fpi-enums header 2026-06-19 15:37:34 +02:00
Marco Trevisan (Treviño) 71d4c9e7e4 build: Use files to track drivers files
While it's not much needed to ensure rebuild on changes, it may be
useful to get the drivers paths in future
2026-06-19 15:37:34 +02:00
Marco Trevisan (Treviño) f0d4a8830b libfprint/build: Ignore LD_LIBRARY_PATH (and use rpath) on local binaries
DT_RUNPATH is intentionally searched after $LD_LIBRARY_PATH.
-Wl,--disable-new-dtags switches to the old DT_RPATH tag, which is searched
before $LD_LIBRARY_PATH. So the embedded paths in the build binary will now
win over whatever is in the environment.

Not breaking builds.
2026-06-19 15:37:34 +02:00