mincrmatt12 / elan-spi-fingerprint

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

VivoBook 15 S533FA(X512FA) #12

Closed dohun0310 closed 1 year ago

dohun0310 commented 1 year ago

Hello, I checked that /sys/bus/spi/devices have spi-ELAN7001:00 image

And then, I checked the PID through sudo dmesg | greap "ELAN".

[    1.036327] input: ELAN1300:00 04F3:3104 Mouse as /devices/pci0000:00/0000:00:15.1/i2c_designware.1/i2c-2/i2c-ELAN1300:00/0018:04F3:3104.0001/input/input4
[    1.036441] input: ELAN1300:00 04F3:3104 Touchpad as /devices/pci0000:00/0000:00:15.1/i2c_designware.1/i2c-2/i2c-ELAN1300:00/0018:04F3:3104.0001/input/input5
[    1.036537] hid-generic 0018:04F3:3104.0001: input,hidraw0: I2C HID v1.00 Mouse [ELAN1300:00 04F3:3104] on i2c-ELAN1300:00
[    2.166465] input: ELAN1300:00 04F3:3104 Mouse as /devices/pci0000:00/0000:00:15.1/i2c_designware.1/i2c-2/i2c-ELAN1300:00/0018:04F3:3104.0001/input/input8
[    2.174300] input: ELAN1300:00 04F3:3104 Touchpad as /devices/pci0000:00/0000:00:15.1/i2c_designware.1/i2c-2/i2c-ELAN1300:00/0018:04F3:3104.0001/input/input9
[    2.188854] hid-multitouch 0018:04F3:3104.0001: input,hidraw0: I2C HID v1.00 Mouse [ELAN1300:00 04F3:3104] on i2c-ELAN1300:00

However, if you type 3104 in hkeyvalue.h and make, it will not run.

Consolidate compiler generated dependencies of target prototype
[ 50%] Building CXX object CMakeFiles/prototype.dir/main.cpp.o
In file included from /home/dohun0310/elan-spi-fingerprint/proto/main.cpp:51:
/home/dohun0310/elan-spi-fingerprint/proto/hkeyvalue.h:18:30: error: static assertion failed: this apparently has a different setup according to driver which I'm not implementing rn.
   18 |         static_assert(TP_PID != 0x3104, "this apparently has a different setup according to driver which I'm not implementing rn.");
      |                       ~~~~~~~^~~~~~~~~
make[2]: *** [CMakeFiles/prototype.dir/build.make:76: CMakeFiles/prototype.dir/main.cpp.o] error 1
make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/prototype.dir/all] error 2
make: *** [Makefile:91: all] error 2

Can you give me a hand? Thank you.

martian0x80 commented 1 year ago

On VivoBook 15 (X513EA), have the exact same PID, and so the problem. Tried adding an entry in elanspi.h in libprintf/drivers/ and built, but as expected did not work. Hoping for an update on 04f3:3104 from the author :)

PeterStrick commented 1 year ago

Using a ViVoBook F571GT with the same ELAN7001 SPI Device, and same 3104 as the Touchpad ID

After following a different Route by compiling https://github.com/mincrmatt12/libfprint with the Build instructions at https://github.com/mincrmatt12/elan-spi-fingerprint/issues/5, I was successfully able to capture, enroll, identify and verify my fingerprint by running the binaries under build/examples as sudo

After cloning the repo, and checking out the mincrmatt12/elan-spi-new Branch I modified ./libfprint/drivers/elanspi.h to contain the following line under elanspi_id_table:

{.udev_types = ELANSPI_UDEV_TYPES, .spi_acpi_id = "ELAN7001", .hid_id = {.vid = ELANSPI_TP_VID, .pid = 0x3104}, .driver_data = ELANSPI_180_ROTATE},

After that I followed the Build Instructions as normal

UDEV Rules were installed from https://github.com/mincrmatt12/elan-spi-fingerprint/blob/master/udev/99-elan-spi.rules and saved as /etc/udev/rules.d/99-elan-spi.rules

Modprobe Configuration was installed from https://github.com/mincrmatt12/elan-spi-fingerprint/blob/master/modprobe/increase-spidev.conf and saved as /etc/modprobe.d/spidev.conf

Although I am unsure on how to actually install libfprint now and login with my fingerprint


System Info:

Operating System: EndeavourOS KDE Plasma Version: 5.27.6 KDE Frameworks Version: 5.108.0 Qt Version: 5.15.10 Kernel Version: 6.4.3-arch1-1 (64-bit) Graphics Platform: Wayland Processors: 12 × Intel® Core™ i7-9750H CPU @ 2.60GHz Memory: 15,5 GiB of RAM Graphics Processor: Mesa Intel® UHD Graphics 630 Manufacturer: ASUSTeK COMPUTER INC. Product Name: VivoBook_ASUSLaptop X571GT_F571GT System Version: 1.0

PeterStrick commented 1 year ago

sudo ./img-capture

image

sudo ./enroll

image

sudo ./identify

image

sudo ./verify

image


verify.pgm as example

image

dohun0310 commented 1 year ago

It’s works. Thx :)

AKgit834 commented 11 months ago

Hello, I checked that /sys/bus/spi/devices have spi-ELAN7001:00 image

And then, I checked the PID through sudo dmesg | greap "ELAN".

[    1.036327] input: ELAN1300:00 04F3:3104 Mouse as /devices/pci0000:00/0000:00:15.1/i2c_designware.1/i2c-2/i2c-ELAN1300:00/0018:04F3:3104.0001/input/input4
[    1.036441] input: ELAN1300:00 04F3:3104 Touchpad as /devices/pci0000:00/0000:00:15.1/i2c_designware.1/i2c-2/i2c-ELAN1300:00/0018:04F3:3104.0001/input/input5
[    1.036537] hid-generic 0018:04F3:3104.0001: input,hidraw0: I2C HID v1.00 Mouse [ELAN1300:00 04F3:3104] on i2c-ELAN1300:00
[    2.166465] input: ELAN1300:00 04F3:3104 Mouse as /devices/pci0000:00/0000:00:15.1/i2c_designware.1/i2c-2/i2c-ELAN1300:00/0018:04F3:3104.0001/input/input8
[    2.174300] input: ELAN1300:00 04F3:3104 Touchpad as /devices/pci0000:00/0000:00:15.1/i2c_designware.1/i2c-2/i2c-ELAN1300:00/0018:04F3:3104.0001/input/input9
[    2.188854] hid-multitouch 0018:04F3:3104.0001: input,hidraw0: I2C HID v1.00 Mouse [ELAN1300:00 04F3:3104] on i2c-ELAN1300:00

However, if you type 3104 in hkeyvalue.h and make, it will not run.

Consolidate compiler generated dependencies of target prototype
[ 50%] Building CXX object CMakeFiles/prototype.dir/main.cpp.o
In file included from /home/dohun0310/elan-spi-fingerprint/proto/main.cpp:51:
/home/dohun0310/elan-spi-fingerprint/proto/hkeyvalue.h:18:30: error: static assertion failed: this apparently has a different setup according to driver which I'm not implementing rn.
   18 |         static_assert(TP_PID != 0x3104, "this apparently has a different setup according to driver which I'm not implementing rn.");
      |                       ~~~~~~~^~~~~~~~~
make[2]: *** [CMakeFiles/prototype.dir/build.make:76: CMakeFiles/prototype.dir/main.cpp.o] error 1
make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/prototype.dir/all] error 2
make: *** [Makefile:91: all] error 2

Can you give me a hand? Thank you.

i dont have any devices listed in sys/bus/spi/devices plz help.

ayusc commented 5 months ago

Hi @PeterStrick I have successfully done the part as you have mentioned and all the commands under build/examples are working fine after running sudo ./verify i got a verify.pgm which i could open with display verify.pgm so that means everything is working fine as expected but all now how to setup the fingerprint login ? Have you found any solution yet ?

PeterStrick commented 5 months ago

Hi @PeterStrick I have successfully done the part as you have mentioned and all the commands under build/examples are working fine after running sudo ./verify i got a verify.pgm which i could open with display verify.pgm so that means everything is working fine as expected but all now how to setup the fingerprint login ? Have you found any solution yet ?

As far as I know, the Build examples and modified libfprint seem to work, but the regular print Daemon doesn't. On KDE I had the option to setup, enroll and manage Fingerprints, but it couldn't verify them

ayusc commented 5 months ago

Hi @PeterStrick I have successfully done the part as you have mentioned and all the commands under build/examples are working fine after running sudo ./verify i got a verify.pgm which i could open with display verify.pgm so that means everything is working fine as expected but all now how to setup the fingerprint login ? Have you found any solution yet ?

As far as I know, the Build examples and modified libfprint seem to work, but the regular print Daemon doesn't. On KDE I had the option to setup, enroll and manage Fingerprints, but it couldn't verify them

I came from another post. Hopefully someone will find a way to successfully setup a fingerprint login with the modified libfprint used here