3v1n0 / libfprint

Library for fingerprint readers
GNU Lesser General Public License v2.1
378 stars 50 forks source link

Initializer fails with Unexpected TLS version 4 0 #46

Open PerpetualWar opened 5 months ago

PerpetualWar commented 5 months ago
sudo validity-sensors-tools.initializer
Found device <DEVICE ID 138a:0097 on Bus 001 Address 004>
Downloading https://download.lenovo.com/pccbbs/mobiles/n1mgf03w.exe to extract 6_07f_lenovo_mis.xpfwext
Extracting "Synaptics Metallica MOC Touch Fingerprint Reader Driver for Windows 8.1 64-bit" - setup data version 5.5.0
 - "app/WBF_Drivers/6_07f_lenovo_mis.xpfwext"
Done.
Found firmware at /tmp/tmpo2gq_46o/app/WBF_Drivers/6_07f_lenovo_mis.xpfwext
The device will be now reset to factory and associated to the current laptop.
Press Enter to continue (or Ctrl+C to cancel)...
Opening device 0x97
Factory reset...
Sleeping...
Pairing the sensor with device 20HEA0TLUS
Opening device 0x97
Initializing flash...
Detected Flash IC: W25Q80B, 1048576 bytes
Sleeping...
Try 1 failed with error: Failed: 04af
Opening device 0x97
Initializing flash...
Sleeping...
Try 2 failed with error: Unexpected TLS version 4 0
Opening device 0x97
Initializing flash...
Sleeping...
Try 3 failed with error: Unexpected TLS version 4 0
Opening device 0x97
Initializing flash...
Sleeping...
Try 4 failed with error: Unexpected TLS version 4 0
Opening device 0x97
Initializing flash...
Sleeping...
Try 5 failed with error: Unexpected TLS version 4 0
Device didn't reply in time...
Traceback (most recent call last):
  File "/snap/validity-sensors-tools/65/vfs-tools/validity-sensors-tools.py", line 339, in <module>
    vfs_tools.initialize(fwpath, args.calibration_data)
  File "/snap/validity-sensors-tools/65/vfs-tools/validity-sensors-tools.py", line 249, in initialize
    self.pair(fwpath, calib_data)
  File "/snap/validity-sensors-tools/65/vfs-tools/validity-sensors-tools.py", line 220, in pair
    self.retry_command(init_flash_command, max_retries=5)
  File "/snap/validity-sensors-tools/65/vfs-tools/validity-sensors-tools.py", line 112, in retry_command
    raise(err)
  File "/snap/validity-sensors-tools/65/vfs-tools/validity-sensors-tools.py", line 103, in retry_command
    command()
  File "/snap/validity-sensors-tools/65/vfs-tools/validity-sensors-tools.py", line 219, in init_flash_command
    init_flash()
  File "/snap/validity-sensors-tools/65/vfs-tools/proto9x/init_flash.py", line 97, in init_flash
    partition_flash(flash_layout_hardcoded, client_public)
  File "/snap/validity-sensors-tools/65/vfs-tools/proto9x/init_flash.py", line 70, in partition_flash
    info = get_flash_info()
  File "/snap/validity-sensors-tools/65/vfs-tools/proto9x/flash.py", line 28, in get_flash_info
    rsp=tls.cmd(unhex('3e'))
  File "/snap/validity-sensors-tools/65/vfs-tools/proto9x/tls.py", line 104, in cmd
    rsp=self.app(cmd)
  File "/snap/validity-sensors-tools/65/vfs-tools/proto9x/tls.py", line 138, in app
    return self.parse_tls_response(self.usb.cmd(self.make_app_data(b)))
  File "/snap/validity-sensors-tools/65/vfs-tools/proto9x/tls.py", line 336, in parse_tls_response
    raise Exception('Unexpected TLS version %d %d' % (mj, mn))
Exception: Unexpected TLS version 4 0

Any help here?

rcpao commented 3 months ago

Lenovo ThinkPad T470

validity-sensors-tools 0.5+git23.5813f6e from Marco Trevisan (3v1n0) installed

$ head -n 1 /etc/os-release 
PRETTY_NAME="Ubuntu 22.04.4 LTS"

$ uname -r
6.5.0-21-generic
validity-sensors-tools 0.5+git23.5813f6e from Marco Trevisan (3v1n0) installed

$ sudo validity-sensors-tools.initializer
Found device <DEVICE ID 138a:0097 on Bus 001 Address 006>
Downloading https://download.lenovo.com/pccbbs/mobiles/n1mgf03w.exe to extract 6_07f_lenovo_mis.xpfwext
Extracting "Synaptics Metallica MOC Touch Fingerprint Reader Driver for Windows 8.1 64-bit" - setup data version 5.5.0
 - "app/WBF_Drivers/6_07f_lenovo_mis.xpfwext"
Done.
Found firmware at /tmp/tmpg8qk946x/app/WBF_Drivers/6_07f_lenovo_mis.xpfwext
The device will be now reset to factory and associated to the current laptop.
Press Enter to continue (or Ctrl+C to cancel)...
Opening device 0x97
Factory reset...
Sleeping...
Pairing the sensor with device 20HDCT01WW
Opening device 0x97
Initializing flash...
Detected Flash IC: W25Q80B, 1048576 bytes
Sleeping...
Try 1 failed with error: Failed: 04af
Opening device 0x97
Initializing flash...
Sleeping...
Try 2 failed with error: Unexpected TLS version 4 0
Opening device 0x97
Initializing flash...
Sleeping...
Try 3 failed with error: Unexpected TLS version 4 0
Opening device 0x97
Initializing flash...
Sleeping...
Try 4 failed with error: Unexpected TLS version 4 0
Opening device 0x97
Initializing flash...
Sleeping...
Try 5 failed with error: Unexpected TLS version 4 0
Device didn't reply in time...
Traceback (most recent call last):
  File "/snap/validity-sensors-tools/65/vfs-tools/validity-sensors-tools.py", line 339, in <module>
    vfs_tools.initialize(fwpath, args.calibration_data)
  File "/snap/validity-sensors-tools/65/vfs-tools/validity-sensors-tools.py", line 249, in initialize
    self.pair(fwpath, calib_data)
  File "/snap/validity-sensors-tools/65/vfs-tools/validity-sensors-tools.py", line 220, in pair
    self.retry_command(init_flash_command, max_retries=5)
  File "/snap/validity-sensors-tools/65/vfs-tools/validity-sensors-tools.py", line 112, in retry_command
    raise(err)
  File "/snap/validity-sensors-tools/65/vfs-tools/validity-sensors-tools.py", line 103, in retry_command
    command()
  File "/snap/validity-sensors-tools/65/vfs-tools/validity-sensors-tools.py", line 219, in init_flash_command
    init_flash()
  File "/snap/validity-sensors-tools/65/vfs-tools/proto9x/init_flash.py", line 97, in init_flash
    partition_flash(flash_layout_hardcoded, client_public)
  File "/snap/validity-sensors-tools/65/vfs-tools/proto9x/init_flash.py", line 70, in partition_flash
    info = get_flash_info()sudo snap connect validity-sensors-tools:hardware-observe
  File "/snap/validity-sensors-tools/65/vfs-tools/proto9x/flash.py", line 28, in get_flash_info
    rsp=tls.cmd(unhex('3e'))
  File "/snap/validity-sensors-tools/65/vfs-tools/proto9x/tls.py", line 104, in cmd
    rsp=self.app(cmd)
  File "/snap/validity-sensors-tools/65/vfs-tools/proto9x/tls.py", line 138, in app
    return self.parse_tls_response(self.usb.cmd(self.make_app_data(b)))
  File "/snap/validity-sensors-tools/65/vfs-tools/proto9x/tls.py", line 336, in parse_tls_response
    raise Exception('Unexpected TLS version %d %d' % (mj, mn))
Exception: Unexpected TLS version 4 0
thehamzaihsan commented 2 months ago

Same Issue here: PRETTY_NAME="Zorin OS 17.1" 6.5.0-27-generic

[sudo] password for hamzaihsan:           
Found device <DEVICE ID 138a:0097 on Bus 001 Address 005>
Downloading https://download.lenovo.com/pccbbs/mobiles/n1mgf03w.exe to extract 6_07f_lenovo_mis.xpfwext
Extracting "Synaptics Metallica MOC Touch Fingerprint Reader Driver for Windows 8.1 64-bit" - setup data version 5.5.0
 - "app/WBF_Drivers/6_07f_lenovo_mis.xpfwext"
Done.
Found firmware at /tmp/tmp1dcwx9sl/app/WBF_Drivers/6_07f_lenovo_mis.xpfwext
The device will be now reset to factory and associated to the current laptop.
Press Enter to continue (or Ctrl+C to cancel)...
Opening device 0x97
Factory reset...
Sleeping...
Try 1 failed with error: Failed: 0404
Sleeping...
Try 2 failed with error: Failed: 0404
Sleeping...
Try 3 failed with error: Failed: 0404
Device didn't reply in time...
Factory reset failed with Failed: 0404, this should not happen, but we can ignore it, if pairing works...
Sleeping...
Pairing the sensor with device 20HES0E71E
Opening device 0x97
Initializing flash...
Detected Flash IC: W25Q80B, 1048576 bytes
Sleeping...
Try 1 failed with error: Failed: 04af
Opening device 0x97
Initializing flash...
Sleeping...
Try 2 failed with error: Unexpected TLS version 4 0
Opening device 0x97
Initializing flash...
Sleeping...
Try 3 failed with error: Unexpected TLS version 4 0
Opening device 0x97
Initializing flash...
Sleeping...
Try 4 failed with error: Unexpected TLS version 4 0
Opening device 0x97
Initializing flash...
Sleeping...
Try 5 failed with error: Unexpected TLS version 4 0
Device didn't reply in time...
Traceback (most recent call last):
  File "/snap/validity-sensors-tools/65/vfs-tools/validity-sensors-tools.py", line 339, in <module>
    vfs_tools.initialize(fwpath, args.calibration_data)
  File "/snap/validity-sensors-tools/65/vfs-tools/validity-sensors-tools.py", line 249, in initialize
    self.pair(fwpath, calib_data)
  File "/snap/validity-sensors-tools/65/vfs-tools/validity-sensors-tools.py", line 220, in pair
    self.retry_command(init_flash_command, max_retries=5)
  File "/snap/validity-sensors-tools/65/vfs-tools/validity-sensors-tools.py", line 112, in retry_command
    raise(err)
  File "/snap/validity-sensors-tools/65/vfs-tools/validity-sensors-tools.py", line 103, in retry_command
    command()
  File "/snap/validity-sensors-tools/65/vfs-tools/validity-sensors-tools.py", line 219, in init_flash_command
    init_flash()
  File "/snap/validity-sensors-tools/65/vfs-tools/proto9x/init_flash.py", line 97, in init_flash
    partition_flash(flash_layout_hardcoded, client_public)
  File "/snap/validity-sensors-tools/65/vfs-tools/proto9x/init_flash.py", line 70, in partition_flash
    info = get_flash_info()
  File "/snap/validity-sensors-tools/65/vfs-tools/proto9x/flash.py", line 28, in get_flash_info
    rsp=tls.cmd(unhex('3e'))
  File "/snap/validity-sensors-tools/65/vfs-tools/proto9x/tls.py", line 104, in cmd
    rsp=self.app(cmd)
  File "/snap/validity-sensors-tools/65/vfs-tools/proto9x/tls.py", line 138, in app
    return self.parse_tls_response(self.usb.cmd(self.make_app_data(b)))
  File "/snap/validity-sensors-tools/65/vfs-tools/proto9x/tls.py", line 336, in parse_tls_response
    raise Exception('Unexpected TLS version %d %d' % (mj, mn))
Exception: Unexpected TLS version 4 0
hamzaihsan@linuxmachine:/$ 
raz0229 commented 2 days ago

Same issue here... support for 138a:0090 is still very quirky