Open so-saf opened 2 years ago
The sensors handled by this repository (and indeed the one that you have) utilize SPI, not I2C. It's the touchpad that's connected via I2C.
You need to add the sensor to the id_table
in the elanspi
driver which is now merged into upstream libfprint
.
Based on the image you have (from which I'm guessing the sensor is rotated 90 degrees, you might need to experiment with the various rotation values) you'd need to try something like
diff --git a/libfprint/drivers/elanspi.h b/libfprint/drivers/elanspi.h
index ffe3416..986010e 100644
--- a/libfprint/drivers/elanspi.h
+++ b/libfprint/drivers/elanspi.h
@@ -348,6 +348,7 @@ static const FpIdEntry elanspi_id_table[] = {
{.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 = ELANSPI_UDEV_TYPES, .spi_acpi_id = "ELAN7001", .hid_id = {.vid = ELANSPI_TP_VID, .pid = 0x241f}, .driver_data = ELANSPI_90RIGHT_ROTATE},
{.udev_types = 0}
};
If that works, please report so on the actual libfprint issue tracker or create a merge request there so this device can be supported out of the box in the future.
Thank you for your answer, the libfprint driver is working (by the way, the sensor rotation is not needed). First, please tell me how to create a merge request? Unfortunately I don't really understand how to do this( Secondly, how can I now use my scanner for authorization, given the fact that this is an i2c device and it is not visible in the lsusb output (this is where the fingerprint-gui is looking for). Thanks again.
(by the way, the sensor rotation is not needed).
do you mean that it works with the .driver_data
set to ELANSPI_NO_ROTATE
or that you didn't need to rotate your finger with the configuration I gave?
First, please tell me how to create a merge request? Unfortunately I don't really understand how to do this(
Eh don't worry about it, I can create it
Secondly, how can I now use my scanner for authorization, given the fact that this is an i2c device and it is not visible in the lsusb output (this is where the fingerprint-gui is looking for).
I'm not sure if fingerprint-gui
is even still maintained, or at least kept up to date with modern libfprint
; is there a reason why just using fprintd
doesn't work? afaik most desktop environments integrate with it fairly directly nowadays.
Thank you for creating the merge request for me)
do you mean that it works with the .driver_data set to ELANSPI_NO_ROTATE or that you didn't need to rotate your finger with the configuration I gave?
I mean, it works with this line:
{.udev_types = ELANSPI_UDEV_TYPES, .spi_acpi_id = "ELAN7001", .hid_id = {.vid = ELANSPI_TP_VID, .pid = 0x241f}, .driver_data = ELANSPI_NO_ROTATE}
is there a reason why just using fprintd doesn't work?
Yes, fprintd
does not see my scanner:
~ » fprintd-enroll
Impossible to enroll: GDBus.Error:net.reactivated.Fprint.Error.NoSuchDevice: No devices available
Maybe I'm doing something wrong, let me describe to you the actions that I did:
git clone https://github.com/freedesktop/libfprint.git
cd libfprint
I inserted into elanspi.h
the line that I wrote before.
meson build -D drivers=all
cd build
meson compile
After that , I ran the script ./img-capture
that produced the image:
Then I thought that everything was working and installed the driver:
sudo meson install
I think it's important to say that fprint
was installed before all these actions. If you try to install after, then pacman
(btw I use arch) will not allow you to do this because 70-libfprint-2.rules
already exists.
Successfully launched with TP_VID = 0x04F3, TP_PID = 0x241F, ACPI_HID = "ELAN7001". Images are obtained like this: The problem is that my fingerprint scanner is an i2c device and libfprint does not see it because it is not in lsusb. Can you tell me what to do?
Just in case, here is the output of some commands: