Closed Aiiaiiio closed 3 years ago
Hmm, based on the SPIStatus it looks like the sensor isn't getting reset. I'll have to look into the code that's supposed to do hardware resets with HID commands, I may have messed up somewhere with that.
Actually, looking at the driver inf for your laptop seems to claim that it needs to be reset via GPIO. Do you have any /dev/gpiochip*
devices? or maybe something in /sys
that looks like a gpio related to ELAN7001
? Sorry I don't know more, I've never done GPIO with ACPI from userspace on linux before and I can't find many other people documenting how online either :)
Also, it looks like the code detected the wrong sensor in the first place. There's been some development recently specifically regarding the sensor that should be in your machine (based on the windows driver I found) over in #2 so could you please try again with the latest code? It probably won't get past where it is but hopefully it'll identify the correct sensor eFSA80SC
in the output.
Thank you very much for your effort! I did a git pull but results are not as expected. Now it says "Unkown sensor type!"
Full output:
Prototype starting...
Compiled with HKEY values : TP_VID 4f3; TP_PID 30b2; ACPI_ID ELAN7001
Got SPI entry /sys/devices/pci0000:00/0000:00:1e.2/pxa2xx-spi.3/spi_master/spi0/spi-ELAN7001:00/spidev/spidev0.0
Found ACPI id!
Got HID entry /sys/devices/pci0000:00/0000:00:15.1/i2c_designware.1/i2c-1/i2c-ELAN1204:00/0018:04F3:30B2.0001/hidraw/hidraw0
Found TP ID!
Got SPI = /dev/spidev0.0 and HID = /dev/hidraw0, opening.
Beginning initialization
SPIStatus = 0x80
Result of ioctl for reset 5
SPIStatus after reset = 0x80
- Register 00 = 5a
- Register 01 = 00
- Register 02 = 4f
- Register 03 = 00
- Register 04 = 4f
- Register 05 = 60
- Register 06 = c0
- Register 07 = 00
- Register 08 = 04
- Register 09 = 04
- Register 0a = 97
- Register 0b = 72
- Register 0c = 69
- Register 0d = 00
- Register 0e = 00
- Register 0f = 2b
- Register 10 = 38
- Register 11 = 2b
- Register 12 = 00
- Register 13 = 28
- Register 14 = 00
- Register 15 = 28
- Register 16 = 00
- Register 17 = 64
- Register 18 = 04
- Register 19 = f4
- Register 1a = 00
- Register 1b = 00
- Register 1c = 00
- Register 1d = 00
- Register 1e = 00
- Register 1f = 00
- Register 20 = 00
- Register 21 = 20
- Register 22 = 04
- Register 23 = 00
- Register 24 = 00
- Register 25 = 00
- Register 26 = 00
- Register 27 = ff
- Register 28 = 00
- Register 29 = 02
- Register 2a = 4b
- Register 2b = e0
- Register 2c = 00
- Register 2d = 00
- Register 2e = d0
- Register 2f = 40
- Register 30 = 01
- Register 31 = 38
- Register 32 = 00
- Register 33 = 00
- Register 34 = 00
- Register 35 = 1f
- Register 36 = ff
- Register 37 = 00
- Register 38 = 00
- Register 39 = 00
- Register 3a = 00
- Register 3b = e4
- Register 3c = fd
- Register 3d = fe
- Register 3e = ee
- Register 3f = 86
Reading raw dimensions
Got 80x80 sensor
After hardcoded lookup: (80 x 80) Version = 2
Unknown sensor type!
Sorry, there was another silly error in one of the sensor tables; how about now?
Now, the correct sensor is identified:
Found sensor ID 14 => [eFSA80SC] (80 X 80) Version = 2; OTP = 0
So something has happened :) After the program asks where to save the dump, I give it . then it seems to be in an endless loop:
Prototype starting...
Compiled with HKEY values : TP_VID 4f3; TP_PID 30b2; ACPI_ID ELAN7001
Got SPI entry /sys/devices/pci0000:00/0000:00:1e.2/pxa2xx-spi.3/spi_master/spi0/spi-ELAN7001:00/spidev/spidev0.0
Found ACPI id!
Got HID entry /sys/devices/pci0000:00/0000:00:15.1/i2c_designware.1/i2c-1/i2c-ELAN1204:00/0018:04F3:30B2.0001/hidraw/hidraw0
Found TP ID!
Got SPI = /dev/spidev0.0 and HID = /dev/hidraw0, opening.
Beginning initialization
SPIStatus = 0x4D
Result of ioctl for reset 5
SPIStatus after reset = 0x4D
- Register 00 = 00
- Register 01 = 00
- Register 02 = 4f
- Register 03 = 00
- Register 04 = 4f
- Register 05 = a0
- Register 06 = 40
- Register 07 = 00
- Register 08 = 00
- Register 09 = 04
- Register 0a = 74
- Register 0b = 05
- Register 0c = 08
- Register 0d = 00
- Register 0e = 00
- Register 0f = 14
- Register 10 = 3c
- Register 11 = 41
- Register 12 = 0c
- Register 13 = 00
- Register 14 = 00
- Register 15 = 04
- Register 16 = 02
- Register 17 = 00
- Register 18 = 01
- Register 19 = f4
- Register 1a = 00
- Register 1b = 00
- Register 1c = 00
- Register 1d = 00
- Register 1e = 00
- Register 1f = 00
- Register 20 = 00
- Register 21 = 80
- Register 22 = 06
- Register 23 = 00
- Register 24 = 00
- Register 25 = 00
- Register 26 = 00
- Register 27 = 00
- Register 28 = 00
- Register 29 = 04
- Register 2a = 5f
- Register 2b = e2
- Register 2c = a0
- Register 2d = 00
- Register 2e = ff
- Register 2f = 40
- Register 30 = 01
- Register 31 = 38
- Register 32 = 00
- Register 33 = 00
- Register 34 = 00
- Register 35 = 1f
- Register 36 = ff
- Register 37 = 00
- Register 38 = 00
- Register 39 = 00
- Register 3a = 00
- Register 3b = e4
- Register 3c = fd
- Register 3d = fe
- Register 3e = ee
- Register 3f = 86
Reading raw dimensions
Got 80x80 sensor
After hardcoded lookup: (80 x 80) Version = 2
Found sensor ID 14 => [eFSA80SC] (80 X 80) Version = 2; OTP = 0
SoftwareReset...
SPIStatus after reset = 0x01
- Register 00 = 00
- Register 01 = 00
- Register 02 = 4f
- Register 03 = 00
- Register 04 = 4f
- Register 05 = a0
- Register 06 = 40
- Register 07 = 00
- Register 08 = 00
- Register 09 = 04
- Register 0a = 74
- Register 0b = 05
- Register 0c = 08
- Register 0d = 00
- Register 0e = 00
- Register 0f = 14
- Register 10 = 3c
- Register 11 = 41
- Register 12 = 0c
- Register 13 = 00
- Register 14 = 00
- Register 15 = 04
- Register 16 = 02
- Register 17 = 00
- Register 18 = 01
- Register 19 = f4
- Register 1a = 00
- Register 1b = 00
- Register 1c = 00
- Register 1d = 00
- Register 1e = 00
- Register 1f = 00
- Register 20 = 00
- Register 21 = 80
- Register 22 = 06
- Register 23 = 00
- Register 24 = 00
- Register 25 = 00
- Register 26 = 00
- Register 27 = 00
- Register 28 = 00
- Register 29 = 04
- Register 2a = 07
- Register 2b = e2
- Register 2c = a0
- Register 2d = 00
- Register 2e = ff
- Register 2f = 40
- Register 30 = 01
- Register 31 = 38
- Register 32 = 00
- Register 33 = 00
- Register 34 = 00
- Register 35 = 1f
- Register 36 = ff
- Register 37 = 00
- Register 38 = 00
- Register 39 = 00
- Register 3a = 00
- Register 3b = e4
- Register 3c = fd
- Register 3d = fe
- Register 3e = ee
- Register 3f = 86
set device register page to 0
Sending table 0
Regtable[0] sets 00 --> 5a
Regtable[1] sets 01 --> 00
Regtable[2] sets 02 --> 4f
Regtable[3] sets 03 --> 00
Regtable[4] sets 04 --> 4f
Regtable[5] sets 05 --> a0
Regtable[6] sets 06 --> 00
Regtable[7] sets 07 --> 00
Regtable[8] sets 08 --> 00
Regtable[9] sets 09 --> 04
Regtable[10] sets 0a --> 74
Regtable[11] sets 0b --> 05
Regtable[12] sets 0c --> 08
Regtable[13] sets 0d --> 00
Regtable[14] sets 0e --> 00
Regtable[15] sets 0f --> 14
Regtable[16] sets 10 --> 3c
Regtable[17] sets 11 --> 41
Regtable[18] sets 12 --> 0c
Regtable[19] sets 13 --> 00
Regtable[20] sets 14 --> 00
Regtable[21] sets 15 --> 04
Regtable[22] sets 16 --> 02
Regtable[23] sets 17 --> 00
Regtable[24] sets 18 --> 01
Regtable[25] sets 19 --> f4
Regtable[26] sets 1a --> 00
Regtable[27] sets 1b --> 00
Regtable[28] sets 1c --> 00
Regtable[29] sets 1d --> 00
Regtable[30] sets 1e --> 00
Regtable[31] sets 1f --> 00
Regtable[32] sets 20 --> 00
Regtable[33] sets 21 --> 80
Regtable[34] sets 22 --> 06
Regtable[35] sets 23 --> 00
Regtable[36] sets 24 --> 00
Regtable[37] sets 25 --> 00
Regtable[38] sets 26 --> 00
Regtable[39] sets 27 --> 00
Regtable[40] sets 28 --> 00
Regtable[41] sets 29 --> 04
Regtable[42] sets 2a --> 5f
Regtable[43] sets 2b --> e2
Regtable[44] sets 2c --> a0
Regtable[45] sets 2d --> 00
Regtable[46] sets 2e --> ff
Regtable[47] sets 2f --> 40
Regtable[48] sets 30 --> 01
Regtable[49] sets 31 --> 38
Regtable[50] sets 32 --> 00
Regtable[51] sets 33 --> 00
Regtable[52] sets 34 --> 00
Regtable[53] sets 35 --> 1f
Regtable[54] sets 36 --> ff
Regtable[55] sets 37 --> 00
Regtable[56] sets 38 --> 00
Regtable[57] sets 39 --> 00
Regtable[58] sets 3a --> 00
set device register page to 1
Sending table 1
Regtable[0] sets 00 --> 7b
Regtable[1] sets 01 --> 7f
Regtable[2] sets 02 --> 77
Regtable[3] sets 03 --> d4
Regtable[4] sets 04 --> 7d
Regtable[5] sets 05 --> 19
Regtable[6] sets 06 --> 80
Regtable[7] sets 07 --> 40
Regtable[8] sets 08 --> 11
Regtable[9] sets 09 --> 00
Regtable[10] sets 0a --> 00
Regtable[11] sets 0b --> 14
Regtable[12] sets 0c --> 00
Regtable[13] sets 0d --> 00
Regtable[14] sets 0e --> 32
Regtable[15] sets 0f --> 02
Regtable[16] sets 10 --> 08
Regtable[17] sets 11 --> 6c
Regtable[18] sets 12 --> 00
Regtable[19] sets 13 --> 00
Regtable[20] sets 14 --> 32
Regtable[21] sets 15 --> 01
Regtable[22] sets 16 --> 16
Regtable[23] sets 17 --> 01
Regtable[24] sets 18 --> 14
Regtable[25] sets 19 --> 01
Regtable[26] sets 1a --> 16
Regtable[27] sets 1b --> 01
Regtable[28] sets 1c --> 17
Regtable[29] sets 1d --> 01
Regtable[30] sets 1e --> 0a
Regtable[31] sets 1f --> 01
Regtable[32] sets 20 --> 0a
Regtable[33] sets 21 --> 02
Regtable[34] sets 22 --> 08
Regtable[35] sets 23 --> 29
Regtable[36] sets 24 --> 00
Regtable[37] sets 25 --> 0c
Regtable[38] sets 26 --> 1a
Regtable[39] sets 27 --> 30
Regtable[40] sets 28 --> 1a
Regtable[41] sets 29 --> 30
Regtable[42] sets 2a --> 00
Regtable[43] sets 2b --> 00
Regtable[44] sets 2c --> 01
Regtable[45] sets 2d --> 16
Regtable[46] sets 2e --> 01
Regtable[47] sets 2f --> 17
Regtable[48] sets 30 --> 03
Regtable[49] sets 31 --> 2d
Regtable[50] sets 32 --> 03
Regtable[51] sets 33 --> 2d
Regtable[52] sets 34 --> 14
Regtable[53] sets 35 --> 00
Regtable[54] sets 36 --> 00
Regtable[55] sets 37 --> 00
Regtable[56] sets 38 --> 00
Regtable[57] sets 39 --> 03
Regtable[58] sets 3a --> fe
Regtable[59] sets 3b --> 00
Regtable[60] sets 3c --> 00
Regtable[61] sets 3d --> 02
Regtable[62] sets 3e --> 00
Regtable[63] sets 3f --> 00
set device register page to 0
Calibration loop 0; with DAC = 256.
BestDAC = 0, BestMeanDiff = 65535
waiting for image...
waiting for image...
Image mean = 2396
New best
Calibration loop 1; with DAC = 128.
BestDAC = 256, BestMeanDiff = 604
Image mean = 2396
Calibration loop 2; with DAC = 64.
BestDAC = 256, BestMeanDiff = 604
Image mean = 2396
Calibration loop 3; with DAC = 32.
BestDAC = 256, BestMeanDiff = 604
Image mean = 2396
Calibration loop 4; with DAC = 16.
BestDAC = 256, BestMeanDiff = 604
Image mean = 2396
Calibration loop 5; with DAC = 8.
BestDAC = 256, BestMeanDiff = 604
Image mean = 2396
Calibration loop 6; with DAC = 4.
BestDAC = 256, BestMeanDiff = 604
Image mean = 2396
Calibration loop 7; with DAC = 2.
BestDAC = 256, BestMeanDiff = 604
Image mean = 2396
Calibration loop 8; with DAC = 1.
BestDAC = 256, BestMeanDiff = 604
Image mean = 2396
Exited loop, using best values.
RegisterGuard clearing 0 to 0- Register 00 = 00
- Register 01 = 00
- Register 02 = 4f
- Register 03 = 00
- Register 04 = 4f
- Register 05 = a0
- Register 06 = 40
- Register 07 = 00
- Register 08 = 00
- Register 09 = 04
- Register 0a = 74
- Register 0b = 05
- Register 0c = 08
- Register 0d = 00
- Register 0e = 00
- Register 0f = 14
- Register 10 = 3c
- Register 11 = 41
- Register 12 = 0c
- Register 13 = 00
- Register 14 = 00
- Register 15 = 04
- Register 16 = 02
- Register 17 = 00
- Register 18 = 01
- Register 19 = f4
- Register 1a = 00
- Register 1b = 00
- Register 1c = 00
- Register 1d = 00
- Register 1e = 00
- Register 1f = 00
- Register 20 = 00
- Register 21 = 80
- Register 22 = 06
- Register 23 = 00
- Register 24 = 00
- Register 25 = 00
- Register 26 = 00
- Register 27 = 00
- Register 28 = 00
- Register 29 = 04
- Register 2a = 5f
- Register 2b = e2
- Register 2c = a0
- Register 2d = 00
- Register 2e = ff
- Register 2f = 40
- Register 30 = 01
- Register 31 = 38
- Register 32 = 00
- Register 33 = 00
- Register 34 = 00
- Register 35 = 1f
- Register 36 = ff
- Register 37 = 00
- Register 38 = 00
- Register 39 = 00
- Register 3a = 00
- Register 3b = e4
- Register 3c = fd
- Register 3d = fe
- Register 3e = ee
- Register 3f = 86
Taking background image
I will wait for a finger to exist for a few frames before saving it. Where should i save it?
Where to save dump (enter)
.
CorrectWithBg
ImgCorrection BG reported 273 low pixels from 6400 total (4 percent)
GuessFingerprint mean=56517 stddev=20962
GuessFingerprint distavg=108
GuessFingerprint real=1 empty=1
UNKNOWN
CorrectWithBg
ImgCorrection BG reported 420 low pixels from 6400 total (6 percent)
GuessFingerprint mean=55731 stddev=22061
GuessFingerprint distavg=584
GuessFingerprint real=0 empty=1
EMPTY
CorrectWithBg
ImgCorrection BG reported 535 low pixels from 6400 total (8 percent)
GuessFingerprint mean=55479 stddev=22366
GuessFingerprint distavg=576
GuessFingerprint real=0 empty=1
EMPTY
CorrectWithBg
ImgCorrection BG reported 578 low pixels from 6400 total (9 percent)
GuessFingerprint mean=55349 stddev=22494
GuessFingerprint distavg=2104
GuessFingerprint real=0 empty=2
EMPTY
CorrectWithBg
ImgCorrection BG reported 585 low pixels from 6400 total (9 percent)
GuessFingerprint mean=55235 stddev=22630
GuessFingerprint distavg=3568
GuessFingerprint real=0 empty=2
EMPTY
...
The last part goes on forever (it seems).
You're encountering a limitation in the default configuration of spidev, you need to either add spidev.bufsiz=32768
to your kernel parameters or put
options spidev bufsiz=32768
into a file with any .conf
name (e.g. increase-spidev.conf
) in /etc/modprobe.d
and then reboot and try again.
I'm sorry I finally fell asleep yesterday. Anyway, this worked splendidly! I managed to get pretty good fingerprint images. I think this issue should be closed now, I'll go on with libfprint. Thank you again for your work and effort to make this happen!
Hello,
I have this notebook: ASUS VivoBook S13 S330FA Which too have an SPI elan fingerprint sensor. I compiled the prototype, and loaded the udev rules. I have to run the binary with sudo otherwise it can't open hidraw0 (I don't know if this is normal).
With sudo, the program starts and after a lot of register info it determines that the dimensions are 80x80, a lot more regs, then "Capturing image" and it seems to be stuck forever.
I run it from Fedora 33 by the way. I'll will paste the full output at the end. Can you give me some pointers as how to proceed?
Thanks in advance!
Full output: