mincrmatt12 / elan-spi-fingerprint

prototype linux driver for elantech spi-based fingerprint sensors
38 stars 4 forks source link

Asuspro P3540F #7

Open BAnd313 opened 3 years ago

BAnd313 commented 3 years ago

Device: Asuspro P3540FA-BQ0491R OS: Ubuntu 20.04 LTS Kernel: 5.8.0-53-generic #60~20.04.1-Ubuntu x86_64

I tested the prototype with the sensor with TP_PID = 0x309F and it works well with the udev rule. Regarding the libfprint fork, I followed the instructions: git checkout mincrmatt12/elan-spi-new; menson build -D drivers=all; cd build; ninja; sudo ninja install

After that, when it comes to run sudo ./img-capture this is the output: image

The other issues didn't help me to solve. What am I doing wrong? Thanks for your help

mincrmatt12 commented 3 years ago

Did you add a line in libfprint/drivers/elanspi.h corresponding to the config you gave to the prototype? Something like

diff --git a/libfprint/drivers/elanspi.h b/libfprint/drivers/elanspi.h
index 7e5bec3..c9e17b8 100644
--- a/libfprint/drivers/elanspi.h
+++ b/libfprint/drivers/elanspi.h
@@ -317,6 +317,7 @@ static const FpIdEntry elanspi_id_table[] = {
   {.udev_types = ELANSPI_UDEV_TYPES, .spi_acpi_id = "ELAN7001", .hid_id = {.vid = ELANSPI_TP_VID, .pid = 0x3148}, .driver_data = ELANSPI_180_ROTATE},
   {.udev_types = ELANSPI_UDEV_TYPES, .spi_acpi_id = "ELAN7001", .hid_id = {.vid = ELANSPI_TP_VID, .pid = 0x30b2}, .driver_data = ELANSPI_NO_ROTATE},
   {.udev_types = ELANSPI_UDEV_TYPES, .spi_acpi_id = "ELAN70A1", .hid_id = {.vid = ELANSPI_TP_VID, .pid = 0x30b2}, .driver_data = ELANSPI_NO_ROTATE},
+  {.udev_types = ELANSPI_UDEV_TYPES, .spi_acpi_id = "ELAN7001", .hid_id = {.vid = ELANSPI_TP_VID, .pid = 0x309f}, .driver_data = ELANSPI_180_ROTATE},
   {.udev_types = 0}
 };
BAnd313 commented 3 years ago

Thank you, I literally copy-pasted what you shared (don't know about the last parameter ELANSPI_180_ROTATE) and now the sensor is detected. Then I tried to enroll my fingerprint directly from gnome-settings and it worked, but login seems not to recognize my finger. The command fprintd-verify also fails the detection with output: Verify result: verify-no-match (done) The issue seems to be very similar to the last one in #5 but it seems unsolved

mincrmatt12 commented 3 years ago

The only reason I could think of is the rotation setting being wrong, -- there's no way to determine the physical orientation of the sensor without some form of lookup table against touchpad IDs -- and the snippet I gave just uses the one that works for me. Perhaps try it with each of the different rotation settings (_NO_ROTATE, _90LEFT_ROTATE, _90RIGHT_ROTATE) constants and see if one of them fixes it. If it does, please report back which one so I can add it to the list.

BAnd313 commented 3 years ago

Unfortunately it did not solve. I noticed that img-capture takes better pictures with 90LEFT and 90RIGHT but the result is always NO MATCH. Trying with the enroll and verify placed in examples folder, I can see that score is almost always 0/24. Using the gnome-settings or fprintd the result is the same as before

biji commented 1 year ago

Any clue for this issue?

tecix commented 1 year ago

I am experiencing the exact same issue. Whenever I try to use the "fprintd-enroll" command, it always finishes successfully. However, when I use the "fprintd-verify" command to verify the enrolled fingerprint, it displays the message "Verify result: verify-no-match (done)."