Code Monkey home page Code Monkey logo

python-validity's Introduction

Hi there ๐Ÿ‘‹

If you like some stuff you see here, feel free to send me some sats:

LN โšก

[email protected]

on-chain โ‚ฟ

bc1q96vv5plhah29p9wtykwgj26lkw65yyw9jcrh6u

python-validity's People

Contributors

3v1n0 avatar alteriks avatar amateusz avatar baschi29 avatar hhgarnes avatar hmatrjp avatar itz-jana avatar kakawait avatar marto-ales avatar mattgia avatar mrdanielps avatar mstrodl avatar tigro avatar titaniumtown avatar tomcat-42 avatar uunicorn avatar veitw avatar vorpalblade avatar vowstar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

python-validity's Issues

06cb:009a - login keyring prompt on first boot

Hi and thanks for all the amazing work on this project.

I am running this with the 06cb:009a on Ubuntu 20.04 with Gnome 3.36.3, and while this works as expected, on first login (after a shutdown) I am able to get past the login screen using the fingerprint, but once on the desktop I am prompted to enter my password with the message:
The login keyring did not get unlocked when you logged into your computer.

I suspect this is a Gnome issue (presumably it does not let fingerprint unlock the keyring and requires the password) but I thought I'd add it here just in case.

Exception: Unexpected TLS version 4 0

I'm trying to apply your work on a T470p with 138a:0097 sensor.

And this exception jumped out when I tried to initialize the device, as below:

Found device <DEVICE ID 138a:0097 on Bus 001 Address 003>
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/tmp5tk0_boc/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 20J6A019CD
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

Thank you for your work!

Waking up from suspend

This a great piece of work!

After waking up from suspend, I need to run systemctl restart python3-validity to make the fingerprint reader work again.

I am opening this thread based on #3 (comment) to track the status of this issue, because there are already multiple confirmed users that are affected.

AFAIK, currently the chip is awaiting different command that it receives after suspend and the communication halts.

The current proposed working solution risks bricking the chip due to excessive restarts and we need to find better one.

Not Working with 06cb:00be

Hello,

I always get the message:
No matching devices found

Please add Support for:
Bus 003 Device 003: ID 06cb:00be Synaptics, Inc.

lsusb -s 003:003 -v

Bus 003 Device 003: ID 06cb:00be Synaptics, Inc.
Couldn't open device, some information will be missing
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 255 Vendor Specific Class
bDeviceSubClass 16
bDeviceProtocol 255
bMaxPacketSize0 8
idVendor 0x06cb Synaptics, Inc.
idProduct 0x00be
bcdDevice 0.00
iManufacturer 0
iProduct 0
iSerial 1
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 0x0027
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xa0
(Bus Powered)
Remote Wakeup
MaxPower 100mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 3
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 0
bInterfaceProtocol 0
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x01 EP 1 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x83 EP 3 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0008 1x 8 bytes
bInterval 4

Thank you

Failed to show user's enrolled fingerprints on ThinkPad L480/Ubuntu 20.04.1 LTS

I am using ThinkPad L480 which has the same fingerprint reader as T480 and T480s (06cb:009a)
I was able to add a finerprint using fprintd-enroll but failed to do so using the Gnome interface.
The recognition works as expected, but I have problem listing the enrolled fingerprints both using fprintd-list and Gnome interface (Settings -> Users -> Fingerpint login).

I am getting the following output when I try to list my fingerpints:

vladimir@ThinkPad-L480:~$ fprintd-list stz184
found 1 devices
Device at /net/reactivated/Fprint/Device/1
Using device /net/reactivated/Fprint/Device/1
ListEnrolledFingers failed: Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/dbus/service.py", line 711, in _message_cb
    retval = candidate_method(self, *args, **keywords)
  File "/usr/lib/python-validity/dbus-service", line 90, in ListEnrolledFingers
    raise e
  File "/usr/lib/python-validity/dbus-service", line 81, in ListEnrolledFingers
    usr = self.user2record(user)
  File "/usr/lib/python-validity/dbus-service", line 64, in user2record
    return db.lookup_user(self.user2identity(user))
  File "/usr/lib/python-validity/dbus-service", line 54, in user2identity
    pw = pwd.getpwnam(user)
KeyError: "getpwnam(): name not found: dbus.String('stz184')"

I am using the latest available version via the PPA.

Thinkpad T480: list_devices failed:

Followed install procedure on Pop!_OS 20.04 and received:

$ fprintd-enroll
list_devices failed: 

I then tried to reset the firmware per below.

sudo python3 /usr/share/python-validity/playground/factory-reset.py
[sudo] password for kenny: 
Traceback (most recent call last):
  File "/usr/share/python-validity/playground/factory-reset.py", line 5, in <module>
    usb.open()
  File "/usr/lib/python3/dist-packages/validitysensor/usb.py", line 49, in open
    self.open_dev(dev)
  File "/usr/lib/python3/dist-packages/validitysensor/usb.py", line 61, in open_dev
    raise Exception('No matching devices found')
Exception: No matching devices found

not support lenovo xiaoxin air 2020

In my case:
Bus 003 Device 003: ID 04f3:0c4d Elan Microelectronics Corp. ELAN:Fingerprint

env:
Ubuntu 20.04.1 LTS

run:

~ fprintd-enroll   
list_devices failed:   

and:

validity-sensors-firmware                       
Traceback (most recent call last):
  File "/usr/bin/validity-sensors-firmware", line 92, in <module>
    raise Exception('No supported validity device found')
Exception: No supported validity device found

python-validity used in sudo allow root escalation without passwd or fingerprint

tested on debian buster using the packaged version.

if an unauthorized person can get accessed to an unlocked laptop, the person can gain sudo by replacing the existing fingreprints by its own without requiring authentication.

Steps to reproduce:
fprintd-delete
fprintd-enroll [put attacker's fingerprints]
sudo su - [put attacker's fingerprints]
root \o/

This looks similar to this bug in the original fprintd.

Support for 06cb:0081

I'm trying to see, if it was possible to for this project to support the 06cb:0081, so I was trying to setup https://github.com/uunicorn/synaWudfBioUsb-sandbox and see if I could find something useful for the 06cb:0081 device.

But if I look at the README of the sandbox project, I need to copy over some .xpfwext-files (which doesn't exist for the Windows drivers belong to 06cb:0081 and the INF also has the only reference to the .xpfwext-files commented out:

;Firmware extensions - not used for this Customer Project
;6_07f_lenovo.xefwext=1

Contents of my extracted driver package:

[0] % innoextract huy103af07m6.exe 
Extracting "Finger Print Driver" - setup data version 5.5.7 (unicode)
 - "app/dpinst.exe" - overwritten
 - "app/dpinst.xml" - overwritten
 - "app/dpinst.exe"
 - "app/dpinst.xml"
 - "app/DpinstWaterMark.bmp"
 - "app/Source/synaAdvAdapter.dll"
 - "app/Source/synaumdf.cat"
 - "app/Source/synaWudfBioLenovoLBG.inf"
 - "app/Source/synaWudfBioUsb.dll"
 - "app/Source/WudfUpdate_01011.dll"
 - "app/dpinstWaterMark/DpinstWaterMark.bmp"
 - "app/dpinstWaterMark/DpinstWaterMark_right.bmp"

And when I try to run ./run.sh identify, it fails with the following error message;

=>0 0x000000007bc64eac stub_entry_point+0x5c(dll=<is not available>, name=<is not available>, ret_addr=<is not available>) [./dlls/ntdll/loader.c:282] in ntdll (0x0000000007f4ffd0)
  1 0x00000001800436e5 EntryPoint+0xfff4450c() in synawudfbiousb (0x0000000007f4ffd0)
  2 0x0000000180042cd0 EntryPoint+0xfff43af7() in synawudfbiousb (0x0000000007f4ffd0)
  3 0x0000000180042c95 EntryPoint+0xfff43abc() in synawudfbiousb (0x0000000007f4ffd0)
  4 0x000000007bcab4e1 call_thread_func+0x110(entry=0x180042c64, arg=0x23190) [./dlls/ntdll/signal_x86_64.c:4466] in ntdll (0x0000000007f4ffd0)
0x000000007bc64eac stub_entry_point+0x5c [./dlls/ntdll/loader.c:282] in ntdll: addq	$20,%rsp
Unable to access file './dlls/ntdll/loader.c'

Is there a way to make work without the xpfwext-files ?

Url of the driver: https://pcsupport.lenovo.com/nl/nl/products/laptops-and-netbooks/yoga-series/yoga-520-14ikb-type-81c8/downloads/driver-list/component?name=Vingerafdruklezer

[fedora] after suspending or hibernating service stops bringing functionalities

  1. fprintd-verify works. i'm checking the timestamp of the last log visible in sudo systemctl status python3-validity.service
  2. systemctl suspend, no new logs visible because of that
  3. fprintd-verify:
Using device /net/reactivated/Fprint/Device/6
ListEnrolledFingers failed: Traceback (most recent call last):
  File "/usr/lib64/python3.9/site-packages/dbus/service.py", line 711, in _message_cb
    retval = candidate_method(self, *args, **keywords)
  File "/usr/lib/python-validity/dbus-service", line 90, in ListEnrolledFingers
    raise e
  File "/usr/lib/python-validity/dbus-service", line 81, in ListEnrolledFingers
    usr = self.user2record(user)
  File "/usr/lib/python-validity/dbus-service", line 64, in user2record
    return db.lookup_user(self.user2identity(user))
  File "/usr/lib/python3.9/site-packages/validitysensor/db.py", line 163, in lookup_user
    stg = self.get_user_storage(name='StgWindsor')
  File "/usr/lib/python3.9/site-packages/validitysensor/db.py", line 149, in get_user_storage
    return parse_user_storage(tls.cmd(pack('<BHH', 0x4b, dbid, len(name)) + name))
  File "/usr/lib/python3.9/site-packages/validitysensor/tls.py", line 122, in cmd
    rsp = self.app(cmd)
  File "/usr/lib/python3.9/site-packages/validitysensor/tls.py", line 152, in app
    return self.parse_tls_response(self.usb.cmd(self.make_app_data(b)))
  File "/usr/lib/python3.9/site-packages/validitysensor/tls.py", line 351, in parse_tls_response
    raise Exception('Unexpected TLS version %d %d' % (mj, mn))
Exception: Unexpected TLS version 4 0
  1. the service is still active!!
  2. sudo systemctl restart python3-validity.service
  3. works again :o
    i'm running Fedora 33. i had to change permission of a driver and pre-initialize some files: #54 (comment)

i think i'm ok with stopping the service after suspending, and starting it again after waking up the laptop, but i dont know is it possible on linux on the systemctl level

Working with 06cb:009a Synaptics, Inc.

Hi there, I'm trying to make work this fp.

I saw that there are blobs_90.py are blobs_97.py . Are these binary blobs taken from the firmware extracted from the windows installer?

How can I know which one is init_hardcoded , init_hardcoded_clean_slate, etc ?

Thanks for your reply

Windows using different fingerprint IDs - WINBIO_FINGER_UNSPECIFIED_POS_##

% fprintd-list %USER
found 1 devices
Device at /net/reactivated/Fprint/Device/0
Using device /net/reactivated/Fprint/Device/0
Fingerprints for user frank on DBus driver (press):
 - #0: WINBIO_ANSI_381_POS_RH_MIDDLE_FINGER
 - #1: WINBIO_ANSI_381_POS_RH_INDEX_FINGER
 - #2: WINBIO_ANSI_381_POS_RH_RING_FINGER
 - #3: WINBIO_ANSI_381_POS_RH_LITTLE_FINGER
 - #4: WINBIO_ANSI_381_POS_RH_THUMB
 - #5: WINBIO_ANSI_381_POS_LH_THUMB
 - #6: WINBIO_ANSI_381_POS_LH_INDEX_FINGER
 - #7: WINBIO_ANSI_381_POS_LH_MIDDLE_FINGER
 - #8: WINBIO_ANSI_381_POS_LH_RING_FINGER
 - #9: WINBIO_ANSI_381_POS_LH_LITTLE_FINGER
 - #10: WINBIO_FINGER_UNSPECIFIED_POS_01
 - #11: WINBIO_FINGER_UNSPECIFIED_POS_02
 - #12: WINBIO_FINGER_UNSPECIFIED_POS_03

I set up by getting my SID from windows, and then setting up my fingerprints under linux. When I rebooted to windows, it recognized I had fingerprints configured but would not accept them. I logged in with my pin, and added fingerprints from within Windows and it created these unspecified positions

I booted back to linux, and got a TLS error:

Sep 25 08:48:45 ScalaAdCaelum python3[1241]: DEBUG:root:>tls> 17: 050200
Sep 25 08:48:45 ScalaAdCaelum python3[1241]: DEBUG:root:>cmd> 170303004066f093c81f41b946e24a1ade763b07bb79161ad093e473c6b883c997378d2216f1f6812919f71c3bca5fe2061f42f73ec0d9fe6647bd0e70062043097891fcff
Sep 25 08:48:45 ScalaAdCaelum python3[1241]: DEBUG:root:<cmd< 0404
Sep 25 08:48:45 ScalaAdCaelum systemd[1]: Stopping python-validity driver dbus service...
Sep 25 08:48:45 ScalaAdCaelum dbus-service[1241]: Error in atexit._run_exitfuncs:
Sep 25 08:48:45 ScalaAdCaelum dbus-service[1241]: Traceback (most recent call last):
Sep 25 08:48:45 ScalaAdCaelum dbus-service[1241]:   File "/usr/lib/python3.8/site-packages/validitysensor/init.py", line 21, in close
Sep 25 08:48:45 ScalaAdCaelum dbus-service[1241]:     reboot()
Sep 25 08:48:45 ScalaAdCaelum dbus-service[1241]:   File "/usr/lib/python3.8/site-packages/validitysensor/sensor.py", line 80, in reboot
Sep 25 08:48:45 ScalaAdCaelum dbus-service[1241]:     assert_status(tls.cmd(unhex('050200')))
Sep 25 08:48:45 ScalaAdCaelum dbus-service[1241]:   File "/usr/lib/python3.8/site-packages/validitysensor/tls.py", line 122, in cmd
Sep 25 08:48:45 ScalaAdCaelum dbus-service[1241]:     rsp = self.app(cmd)
Sep 25 08:48:45 ScalaAdCaelum dbus-service[1241]:   File "/usr/lib/python3.8/site-packages/validitysensor/tls.py", line 152, in app
Sep 25 08:48:45 ScalaAdCaelum dbus-service[1241]:     return self.parse_tls_response(self.usb.cmd(self.make_app_data(b)))
Sep 25 08:48:45 ScalaAdCaelum dbus-service[1241]:   File "/usr/lib/python3.8/site-packages/validitysensor/tls.py", line 351, in parse_tls_response
Sep 25 08:48:45 ScalaAdCaelum dbus-service[1241]:     raise Exception('Unexpected TLS version %d %d' % (mj, mn))
Sep 25 08:48:45 ScalaAdCaelum dbus-service[1241]: Exception: Unexpected TLS version 4 0

I returned to windows, let updates install, and then returned to linux, and now it functions fine again. Windows still will not recognize any but those three unspecified fingers, although linux verifies fine

Support for Synaptics 06cb:00e7

I wanted to install this project on my HP-envy-13-x360-ay-Series Laptop since the fingerprint scanner is not working. After downloading the Fedora rpm packages from here: #54 the command sudo validity-sensors-firmware outputs:

Traceback (most recent call last):
  File "/usr/bin/validity-sensors-firmware", line 92, in <module>
    raise Exception('No supported validity device found')
Exception: No supported validity device found

Which makes me believe my device is not yet supported.
From my understanding I need to install this https://github.com/uunicorn/synaWudfBioUsb-sandbox and run the commands from the Readme. I already tried but the instructions are a bit to shallow for me as a Linux newbie. So if someone could help me that would make things easier.
In my Bios I have the option to delete fingerprints so I think it should be a Match on Chip device.

Link to the driver:
https://support.hp.com/de-de/drivers/selfservice/hp-envy-13-ay0000-x360-convertible-laptop-pc-series/32552483

Gentoo support

Are there plans on creating an overlay and ebuilds for Gentoo? I would really like for this to be ported to Gentoo!

Can't install with yay from Arch AUR

I've been trying to install this driver on my ThinkPad T480s but I keep running into the same error where yay cant find the dependencies for it. I also tried installing the deps from git directly with no luck.

Going to the AUR webpage and looking for fprintd-clients and open-fprintd just gives a 404.

See below:

๏Œƒ ๏€• ~ โฏ yay -S python-validity-git ๏‰’ 3s ๏€— 09:18:09 PM -> Could not find all required packages: fprintd-clients (Wanted by: python-validity-git) open-fprintd (Wanted by: python-validity-git)

Fingerprint recognition unreliable on 009a

First off, thank you so much for working on this!

I have a ThinkPad T480s with the Validity 009a fingerprint reader. I enrolled and registered my fingerprint fine, but I've noticed that recognizing the fingerprint doesn't seem to be working very well. It only recognizes the fingerprint very rarely. I tried re-registering the fingerprint and tried multiple different finger positions, but I got the same result.

Is this a known issue? Any tips on how I can improve this? Let me know if I can provide more info to diagnose the issue.

138a:0094 Validity Sensors, Inc support?

Bus 001 Device 002: ID 138a:0094 Validity Sensors, Inc. 

I see this isn't mentioned in the udev or in the code. Is there a possiblity of this being supported?

Contributing RPM packaging and SELinux module

Hi @uunicorn,

I'd like to contribute the necessary bits to allow RPM packaging and usage on SELinux enabled systems for both python-validity and open-fprintd. Please see my pull requests #53 and uunicorn/open-fprintd#7.

The specfiles have been created close to the RedHat guidelines and tested on Fedora 33. I expect them to work on EL8 (RHEL 8, CentOS 8), too. Other RPM based distros such as openSUSE might need tweaking.

However the python-validity specfile uses a post install scriptlet derived from your Debian scripts, to make them as close as possible. But I expect this to prevent the package to be accepted into the distros, as I think automatically downloading and flashing firmware on package installation conflicts with RedHat's/Fedora's packaging rules.

For fprintd-clients, I decided to NOT use your fork of fprintd, but to use Fedora's fprintd package as template and only rename the package and to simply not package the daemon files. The result, fprintd-clients.spec, along with a patch file to the original fprintd package's fprintd.spec, has been attached: fprintd-clients.zip

Best regards,
// Veit

Running python-validity prevents USB autosuspend (06cb:009a, Lenovo X1C6)

python3-validity.service is running:

# systemctl start python3-validity

# systemctl is-active python3-validity
active

# cat /sys/bus/usb/devices/1-9/idVendor
06cb

# sleep 10

# grep . -r /sys/bus/usb/devices/1-9/power
/sys/bus/usb/devices/1-9/power/runtime_active_time:862019
/sys/bus/usb/devices/1-9/power/wakeup:disabled
/sys/bus/usb/devices/1-9/power/active_duration:862064
/sys/bus/usb/devices/1-9/power/runtime_active_kids:0
/sys/bus/usb/devices/1-9/power/connected_duration:941124
/sys/bus/usb/devices/1-9/power/persist:1
/sys/bus/usb/devices/1-9/power/runtime_usage:1
/sys/bus/usb/devices/1-9/power/runtime_status:active
/sys/bus/usb/devices/1-9/power/autosuspend_delay_ms:2000
/sys/bus/usb/devices/1-9/power/async:enabled
/sys/bus/usb/devices/1-9/power/runtime_suspended_time:78841
/sys/bus/usb/devices/1-9/power/runtime_enabled:enabled
/sys/bus/usb/devices/1-9/power/control:auto
/sys/bus/usb/devices/1-9/power/level:auto
/sys/bus/usb/devices/1-9/power/autosuspend:2

python3-validity.service is not running:

# systemctl stop python3-validity.service

# sleep 10

# grep . -r /sys/bus/usb/devices/1-9/power
/sys/bus/usb/devices/1-9/power/runtime_active_time:873841
/sys/bus/usb/devices/1-9/power/wakeup:disabled
/sys/bus/usb/devices/1-9/power/active_duration:873887
/sys/bus/usb/devices/1-9/power/runtime_active_kids:0
/sys/bus/usb/devices/1-9/power/connected_duration:955394
/sys/bus/usb/devices/1-9/power/persist:1
/sys/bus/usb/devices/1-9/power/runtime_usage:0
/sys/bus/usb/devices/1-9/power/runtime_status:suspended
/sys/bus/usb/devices/1-9/power/autosuspend_delay_ms:2000
/sys/bus/usb/devices/1-9/power/async:enabled
/sys/bus/usb/devices/1-9/power/runtime_suspended_time:81289
/sys/bus/usb/devices/1-9/power/runtime_enabled:enabled
/sys/bus/usb/devices/1-9/power/control:auto
/sys/bus/usb/devices/1-9/power/level:auto
/sys/bus/usb/devices/1-9/power/autosuspend:2

It would appear that a running instance of the python-validity dbus service prevents USB autosuspend from working (regardless of the fact that the included udev rule explicitly enables runtime PM on the fingerprint reader device).

Maybe it would make sense to release the device internally after a timeout and reacquire it every time a bus request is made?

Or, alternatively, maybe turn the architecture upside-down and have the open-fprintd manager invoke and enumerate drivers in turn until a device is found?

Pair.py check for firmware before flashing

If the firmware file isn't where it's supposed to be, pair.py starts the initial flash and fails when searching for the firmware file.
Running it again warns that the flash is already partitioned.

Maybe pair.py could check if the fw is present in the firmware home first thing upon opening?

Edit: It seems the proper way is to use validity-sensor-initializer. Perhaps just updating the steps in the readme to reflect this is enough?

Feature Request: refuse scanning if laptop lid is closed

Using pam_fprint.so to handle authentication system-wide becomes unusable if the laptop is ever used with docks or external displays. Because PAM is not gaining multiple parallel module support anytime soon, I'd propose a workaround in form of rejecting scanning requests if the laptop lid is closed. The laptop lid status can be acquired from logind:

$ busctl get-property org.freedesktop.login1 /org/freedesktop/login1 org.freedesktop.login1.Manager LidClosed
b true

Note: I'm not sure that this feature request is in the right place (maybe something to implement in fprintd or pam_fprint.so), but given that this specific driver handles devices that are only(?) found in laptops, it probably makes sense to do it here.

Pair succeeds, open9x() fails on 06cb:009a

Hi, I'm not sure if I'm doing this right:


$ python3 pair.py

Initializing flash...
Detected Flash IC: W25Q80B, 1048576 bytes
Sleeping...
Clean slate
Uploading firmware...
Sensor: 57K0 FM-3367-003   
Loaded FWExt version 1.2 (Mon Jan 27 01:32:09 2020), 8 modules
Sleeping...
Calibrating...
Opening sensor: 57K0 FM-3367-003   
Warning: no calibration data was loaded. Consider calibrating the sensor.
Calibration iteration 0...
Ignoring spurious interrupt: 0000000000
Calibration iteration 1...
Ignoring spurious interrupt: 0000000000
Calibration iteration 2...
Ignoring spurious interrupt: 0000000000
Requesting a blank image...
Ignoring spurious interrupt: 0000000000
Init database...
Creating a new user storage object
Creating a host machine GUID record
That's it, pairing's finished
[root@x1-yoga-3rd python-validity]# python3
Python 3.8.3 (default, May 15 2020, 00:00:00) 
[GCC 10.1.1 20200507 (Red Hat 10.1.1-1)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from prototype import *
>>> open9x()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/raghav/Development/python-validity/proto9x/init.py", line 22, in open
    usb.send_init()
  File "/home/raghav/Development/python-validity/proto9x/usb.py", line 57, in send_init
    assert_status(self.cmd(unhexlify('01')))
  File "/home/raghav/Development/python-validity/proto9x/util.py", line 9, in assert_status
    raise Exception('Failed: %04x' % s)
Exception: Failed: 0315

Factory Reset needed after booting into Windows

This is probably unavoidable but it looks like windows claims the device causing python-validity to fail with the DB GUID mismatch. Running factory-reset, restarting the service and re-enrolling works.

Is there a work-around so that the user doesn't have to re-enroll on every boot to windows? Such as backing up the enrolled finger, silently factory-resetting and restoring the fingers if:

  1. fprintd-enroll has been used on this machine before succesfully
  2. fprintd-delete has not been called
  3. Only right index finger is enrolled?

Or maybe for now we can catch the DB exception and log just a message saying factory-reset needs to be run.

Dont know how to handle message type 15

Hello,
I am getting the following message when running pair.py

Initializing flash...
Detected Flash IC: W25Q80B, 1048576 bytes
Traceback (most recent call last):
  File "pair.py", line 27, in <module>
    init_flash()
  File "/home/dcabrera/python-validity/validitysensor/init_flash.py", line 141, in init_flash
    tls.open()
  File "/home/dcabrera/python-validity/validitysensor/tls.py", line 133, in open
    self.parse_tls_response(rsp)
  File "/home/dcabrera/python-validity/validitysensor/tls.py", line 349, in parse_tls_response
    raise Exception('Dont know how to handle message type %02x' % t)
Exception: Dont know how to handle message type 15

Any idea what is wrong?

OS: Fedora 32
Hardware: T480
Device: Bus 001 Device 016: ID 06cb:009a Synaptics, Inc.

After enrolling finger-print, how to modify the settings in /etc/pam.d/ folder?

Hello,

Thanks for the nice work on python-validity. I have it installed successfully on manjaro/arch - as I couldn't find pam-auth-update command in arch, I am trying to modify the content in the /etc/pam.d/ folder manually:

Here are the files I have in the /etc/pam.d/ folder:

chage
chfn
chgpasswd
chpasswd
chsh
cinnamon-screensaver
crond
cups
groupadd
groupdel
groupmems
groupmod
i3lock
lightdm
lightdm-autologin
lightdm-greeter
login
newusers
other
passwd
polkit-1
rlogin
rsh
runuser
runuser-l
samba
shadow
sshd
su
sudo
su-l
system-auth
systemd-user
system-local-login
system-login
system-remote-login
system-services
useradd
userdel
usermod
vlock

As I am using lightdm as my gui login, I first tried to add the 'changed lines' in the README file to the end of lighdm file, the result is the following:

#%PAM-1.0
auth        include     system-login
-auth       optional    pam_gnome_keyring.so
account     include     system-login
password    include     system-login
session     include     system-login
-session    optional    pam_gnome_keyring.so auto_start

# In /etc/pam.d/common-auth, the following line is added, and the next line changed.
# The end result (apart from other things that may be in the file) is this:
auth  [success=2 default=ignore]  pam_fprintd.so max_tries=1 timeout=10 # debug
auth  [success=1 default=ignore]  pam_unix.so nullok_secure try_first_pass

Probably due to my lack of understanding how pam works - this setup caused my login in a loop / not working: after trying to enter the password in the text area of lightdm, then the fingerprint indicator lights up - but using my finger print, it would not login (even with the right password in the text box). It's kind of a loop - for which I suspect is the sequences I have in the lightdm file are wrong.

What I hope to setup is: 1. use finger-print to login, 2. use finger-print to unlock from screen lock.
I would really appreciate if you have suggestion/answers on how to archieve this in arch/manjaro linux.

thanks!

Exception: Failed: 04c3 after second enroll (on 06cb:009a)

So I'm not sure if I'm doing something wrong or something, but when I run the DBus service, I experience the following after a firmware reset (following instructions on README):

  • First, I can run fprint-enroll without issue
  • If I run fprint-verify, my finger doesn't recognize
  • If I run fprint-enroll again with another finger (or the same), the service errors with Exception: Failed: 04c3 and the enroll fails.

Interestingly, there are no issues with using the python API manually, I can both identify and register fingerprints as expected. I can provide more logs if necessary, but obviously accidentally showing my fingerprint data isn't ideal.

009a enroll() fails, complains about incorrect arguments

I'm on the latest commit, fprintd-enroll fails with:

Using device /net/reactivated/Fprint/Device/1
Enrolling right-index-finger finger.
EnrollStart failed: Traceback (most recent call last):
  File "/usr/lib64/python3.8/site-packages/dbus/service.py", line 711, in _message_cb
    retval = candidate_method(self, *args, **keywords)
  File "/usr/lib/python-validity/dbus-service", line 146, in EnrollStart
    sensor.enroll(uid2identity(uid), 0xf5, update_cb, complete_cb) # TODO parse the finger name
TypeError: enroll() takes 4 positional arguments but 5 were given

I ran a factory reset and paired again but no luck.
Any ideas, @uunicorn ?

Validating downloaded files

It would probably be prudent for security to validate the driver/firmware packages being downloaded in some way. Either by including expected checksums, or by verifying digital certificates (if the driver installers are signed and it is feasible to verify those on Linux).

Synaptics 06cb:009a on ThinkPad T480 Not Functioning After Waking From Sleep

Hi,

The title pretty much sums up the issue. I'm running Manjaro, using kernel 5.4.80, and KDE Plasma 5.20.4. I installed python-validity 0.12-2 yesterday, and am very happy to confirm that under most circumstances, it's working great for me. I can log out or lock my laptop, and the fingerprint reader works as expected. Thank you very much for all of your work on this.

However, there's one issue I'm having. After I put my laptop into sleep, and then wake it, the fingerprint reader no longer works. Typically, to use the fingerprint reader, I would hit enter on the empty password field in SDDM or the KDE lock screen, which would cause the light above the fingerprint reader to turn on. After this, I could put my finger on the reader and it would work. However, in this scenario, the light above the fingerprint reader doesn't even turn on. SDDM/the lock screen just immediately says "invalid password". After this, it no longer works until I reboot my laptop.

Running sudo systemctl status python3-validity.service after waking from sleep produces the following output:

โ— python3-validity.service - python-validity driver dbus service
     Loaded: loaded (/usr/lib/systemd/system/python3-validity.service; static)
     Active: active (running) since Thu 2020-12-03 18:18:33 EST; 26min ago
   Main PID: 714 (python3)
      Tasks: 3 (limit: 18891)
     Memory: 28.2M
     CGroup: /system.slice/python3-validity.service
             โ””โ”€714 python3 /usr/lib/python-validity/dbus-service --debug

Dec 03 18:18:53 Ryan-T480 python3[714]: DEBUG:root:<tls< 17: 00008a0001000400040000000300020002000400200053bc96ce1a6dccbee9765cef44a71bf1648f5e3f38b835c9863f81f466a9f53e05002000000000000000000000000000000000000000000000000000000000000000000002000400c10300000600280000000000000000000000000000000000000000000000000000000000000000000000000000000000
Dec 03 18:18:53 Ryan-T480 python3[714]: DEBUG:root:>tls> 17: 6200000000
Dec 03 18:18:53 Ryan-T480 python3[714]: DEBUG:root:>cmd> 1703030040b2b2e5f93cd236452803ff3cbccadc6f7bb0cf8bc92e51151db97829096c3eca357bf6c969053e65de42c4d21e37f7fe0d7298b9b08f54e96e0104ba17d7211a
Dec 03 18:18:53 Ryan-T480 python3[714]: DEBUG:root:<cmd< 170303004098ee187d5eb5d26a126d2357308fbdcc77c3eaf7442e0c768eee1678239b793cc51d746c665821ff397749ce23abb2f4f6f25c62e6355465ae17bf2fdbeb6e9c
Dec 03 18:18:53 Ryan-T480 python3[714]: DEBUG:root:<tls< 17: 0000
Dec 03 18:18:53 Ryan-T480 python3[714]: DEBUG:root:VerifyStatus
Dec 03 18:42:56 Ryan-T480 python3[714]: DEBUG:root:In ListEnrolledFingers ryan
Dec 03 18:42:56 Ryan-T480 python3[714]: DEBUG:root:>tls> 17: 4b00000b0053746757696e64736f7200
Dec 03 18:42:56 Ryan-T480 python3[714]: DEBUG:root:>cmd> 17030300505d2db5521a6ef042688919fe9339f2e8aa3cfb047b6a29f9bd7f7c3adddb65a2ac227b5c4b807fe7fa7c2d7d3af0fa24d5aeb659c77405c5d13866eaf0799ab7119ee2f2774e6082a4b3c190fba74179
Dec 03 18:42:56 Ryan-T480 python3[714]: DEBUG:root:<cmd< 0404

Please let me know if there's any other information you need. Thanks.

usb.core.USBError: [Errno 13] Access denied (insufficient permissions)

Launching with sudo works but not as normal user. Any idea how to make it work without sudo? thanks in advance

Steps to reproduce:

$ cd /usr/share/python-validity/playground
$ python3
Python 3.8.5 (default, Jul 27 2020, 08:42:51)
[GCC 10.1.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from prototype import *
>>> open9x()
Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/usb/core.py", line 223, in get_interface_and_endpoint
    return self._ep_info[endpoint_address]
KeyError: 1

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/mota/.local/lib/python3.8/site-packages/validitysensor/init.py", line 48, in open
    open_common()
  File "/home/mota/.local/lib/python3.8/site-packages/validitysensor/init.py", line 29, in open_common
    init_flash()
  File "/home/mota/.local/lib/python3.8/site-packages/validitysensor/init_flash.py", line 113, in init_flash
    info = get_flash_info()
  File "/home/mota/.local/lib/python3.8/site-packages/validitysensor/flash.py", line 40, in get_flash_info
    rsp = tls.cmd(unhex('3e'))
  File "/home/mota/.local/lib/python3.8/site-packages/validitysensor/tls.py", line 124, in cmd
    rsp = self.usb.cmd(cmd)
  File "/home/mota/.local/lib/python3.8/site-packages/validitysensor/usb.py", line 102, in cmd
    self.dev.write(1, out)
  File "/usr/lib/python3.8/site-packages/usb/core.py", line 940, in write
    intf, ep = self._ctx.setup_request(self, endpoint)
  File "/usr/lib/python3.8/site-packages/usb/core.py", line 102, in wrapper
    return f(self, *args, **kwargs)
  File "/usr/lib/python3.8/site-packages/usb/core.py", line 215, in setup_request
    intf, ep = self.get_interface_and_endpoint(device, endpoint_address)
  File "/usr/lib/python3.8/site-packages/usb/core.py", line 102, in wrapper
    return f(self, *args, **kwargs)
  File "/usr/lib/python3.8/site-packages/usb/core.py", line 225, in get_interface_and_endpoint
    for intf in self.get_active_configuration(device):
  File "/usr/lib/python3.8/site-packages/usb/core.py", line 102, in wrapper
    return f(self, *args, **kwargs)
  File "/usr/lib/python3.8/site-packages/usb/core.py", line 236, in get_active_configuration
    self.managed_open()
  File "/usr/lib/python3.8/site-packages/usb/core.py", line 102, in wrapper
    return f(self, *args, **kwargs)
  File "/usr/lib/python3.8/site-packages/usb/core.py", line 120, in managed_open
    self.handle = self.backend.open_device(self.dev)
  File "/usr/lib/python3.8/site-packages/usb/backend/libusb1.py", line 786, in open_device
    return _DeviceHandle(dev)
  File "/usr/lib/python3.8/site-packages/usb/backend/libusb1.py", line 643, in __init__
    _check(_lib.libusb_open(self.devid, byref(self.handle)))
  File "/usr/lib/python3.8/site-packages/usb/backend/libusb1.py", line 595, in _check
    raise USBError(_strerror(ret), ret, _libusb_errno[ret])
usb.core.USBError: [Errno 13] Access denied (insufficient permissions)
>>>

Additional information

Fingerprint succesfully enrolled

$ fprintd-list mota
found 1 devices
Device at /net/reactivated/Fprint/Device/2
Using device /net/reactivated/Fprint/Device/2
Fingerprints for user mota on DBus driver (press):
 - #0: WINBIO_FINGER_UNSPECIFIED_POS_01

Device 06cb:009a Synaptics, Inc.

$ lsusb
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 002: ID 0bda:0316 Realtek Semiconductor Corp. Card Reader
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 015: ID 06cb:009a Synaptics, Inc. Metallica MIS Touch Fingerprint Reader
Bus 001 Device 004: ID 04f2:b604 Chicony Electronics Co., Ltd Integrated Camera (1280x720@30)
Bus 001 Device 003: ID 8087:0a2b Intel Corp. Bluetooth wireless interface
Bus 001 Device 002: ID 1050:0406 Yubico.com Yubikey 4/5 U2F+CCID
Bus 001 Device 006: ID 2386:432f Raydium Corporation Touch System
Bus 001 Device 009: ID 046d:c069 Logitech, Inc. M-U0007 [Corded Mouse M500]
Bus 001 Device 008: ID 2516:001a Cooler Master Co., Ltd. Storm Quick Fire XT
Bus 001 Device 010: ID 2972:0047 FiiO Electronics Technology USB 2.0 Hub
Bus 001 Device 007: ID 1a40:0101 Terminus Technology Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

OS and kernel version

$ uname -a
Linux archlinux 5.8.1-arch1-1 #1 SMP PREEMPT Wed, 12 Aug 2020 18:50:43 +0000 x86_64 GNU/Linux

RPM package

Hey there and thanks for your works.

can you provide rpm packages as well as deb package provided? or help us install this library on fedora/opensuse?

Support for 06cb:00c7

Has anyone been able to get 06cb:00c7 to work?

I am happy to help if someone can guide me on how to do it.

Not Working with 06cb:00da

Hello,

I always get the message:
No matching devices found

Please add Support for:
Bus 001 Device 003: ID 06cb:00da Synaptics, Inc.

lsusb -s 001:003 -v

Bus 001 Device 003: ID 06cb:00da Synaptics, Inc.
Couldn't open device, some information will be missing
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 255 Vendor Specific Class
bDeviceSubClass 16
bDeviceProtocol 255
bMaxPacketSize0 8
idVendor 0x06cb Synaptics, Inc.
idProduct 0x00da
bcdDevice 0.00
iManufacturer 0
iProduct 0
iSerial 1
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 0x0027
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xa0
(Bus Powered)
Remote Wakeup
MaxPower 100mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 3
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 0
bInterfaceProtocol 0
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x01 EP 1 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x83 EP 3 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0008 1x 8 bytes
bInterval 4

Thank you

Debian Buster

Is there an installation package for Debian Buster 10.6 ?

138a:0097 error: Exception: Unknown flash IC

I have 138a:0097 and installed Arch linux. If I try to use python-validity I get an error: Exception: Unknown flash IC. JEDEC id=ff:ff, size=4096x0.

P.S.

lspci

Bus 001 Device 004: ID 138a:0097 Validity Sensors, Inc. 

systemctl log:

Sep 25 12:41:59 laptop systemd[1]: Started python-validity driver dbus service.
Sep 25 12:41:59 laptop python3[132811]: DEBUG:root:>cmd> 3e
Sep 25 12:42:00 laptop python3[132811]: DEBUG:root:<cmd< 0000ff00ff0000101000000001000000
Sep 25 12:42:00 laptop dbus-service[132811]: /usr/lib/python-validity/dbus-service:28: PyGIDeprecationWarning: Since version 3.11, calling threads_init is no >
Sep 25 12:42:00 laptop dbus-service[132811]:   GLib.threads_init()
Sep 25 12:42:00 laptop dbus-service[132811]: Traceback (most recent call last):
Sep 25 12:42:00 laptop dbus-service[132811]:   File "/usr/lib/python-validity/dbus-service", line 216, in <module>
Sep 25 12:42:00 laptop dbus-service[132811]:     init.open()
Sep 25 12:42:00 laptop dbus-service[132811]:   File "/usr/lib/python3.8/site-packages/validitysensor/init.py", line 47, in open
Sep 25 12:42:00 laptop dbus-service[132811]:     open_common()
Sep 25 12:42:00 laptop dbus-service[132811]:   File "/usr/lib/python3.8/site-packages/validitysensor/init.py", line 29, in open_common
Sep 25 12:42:00 laptop dbus-service[132811]:     init_flash()
Sep 25 12:42:00 laptop dbus-service[132811]:   File "/usr/lib/python3.8/site-packages/validitysensor/init_flash.py", line 107, in init_flash
Sep 25 12:42:00 laptop dbus-service[132811]:     info = get_flash_info()
Sep 25 12:42:00 laptop dbus-service[132811]:   File "/usr/lib/python3.8/site-packages/validitysensor/flash.py", line 38, in get_flash_info
Sep 25 12:42:00 laptop dbus-service[132811]:     raise Exception('Unknown flash IC. JEDEC id=%x:%x, size=%dx%d' % (jid0, jid1, blocks, blocksize))
Sep 25 12:42:00 laptop dbus-service[132811]: Exception: Unknown flash IC. JEDEC id=ff:ff, size=4096x0
Sep 25 12:42:00 laptop systemd[1]: python3-validity.service: Main process exited, code=exited, status=1/FAILURE
Sep 25 12:42:00 laptop systemd[1]: python3-validity.service: Failed with result 'exit-code'.

P.S. python-validity 0.9-2

possible to expand this to Kensington Validity 06cb:0088 ?

Hi, I started following your:
https://github.com/uunicorn/synaWudfBioUsb-sandbox

But encountered a slightly different folder structure and that's about where my skills end.
The item is a Kensington Verimark USB fingerprint reader.
If you could determine if it is suitable for this project and guide me how to proceed, I'd be happy to help.

Folder structure of the driver is:
KensingtonFingerprintApplication.exe
KensingtonFingerprintApplication.lnk
synaBscAdapter66.dll
SynaCP66.dll
SynaFPCoInstaller.dll
SynaFPService.exe
synahidumdf.sys
SynaU2F.exe
synaumdf.cat
synaWudfBioUsb66.dll
synaWudfBioUsbKensProd.inf
synaWudfU2fhid.dll
synaWudfU2fhid.ini
WudfUpdate_01011.dll

synaWudfBioUsbKensProd.inf.txt

fprintd-enroll fails with 138a:0090 ?

Greetings,

I've been successfully using Marco Trevisan's PPA for my Thinkpad on Debian (latest testing/bullseye), initialized & flashed last spring by his fork of this project. But that PPA seems to have gone unmaintained and is no longer installable after a Debian fprintd migration, so I figured I would give this project a try.

Install went fine, either from the PPA or from a self-built python3-validity package.

It warned that the sensor was already paired to another OS so I did the validity-sensors-firmware / factory-reset.py thing. But when I try to enroll a finger it immediately fails:

$ fprintd-enroll 
Using device /net/reactivated/Fprint/Device/1
Enrolling right-index-finger finger.
Enroll result: enroll-failed

Logs show:

Jan 09 08:39:24 rocket python3[46186]: DEBUG:root:EnrollStatus
Jan 09 08:43:03 rocket python3[46186]: DEBUG:root:In EnrollStart right-index-finger for doug
Jan 09 08:43:03 rocket python3[46186]: DEBUG:root:>tls> 17: 6901000000
Jan 09 08:43:03 rocket python3[46186]: DEBUG:root:>cmd> 17030300409eefbc642369b985f8134533b7a25dc89342c0a84312fa31210735931a022c5e7d34928b89cb8e9bd37>
Jan 09 08:43:03 rocket python3[46186]: DEBUG:root:<cmd< 1703030040cc2d615ce8d700682dbbf9992cc03be04e967a8fe356a96d4b523a14f4f7602e500f45602c3f78f96e5>
Jan 09 08:43:03 rocket python3[46186]: DEBUG:root:<tls< 17: 0104
Jan 09 08:43:03 rocket ERROR:root:Failed[46186]: 0401
                                                 Traceback (most recent call last):
                                                   File "/usr/lib/python-validity/dbus-service", line 161, in run
                                                     sensor.enroll(usr, index, update_cb)
                                                   File "/usr/lib/python3/dist-packages/validitysensor/sensor.py", line 828, in enroll
                                                     self.create_enrollment()
                                                   File "/usr/lib/python3/dist-packages/validitysensor/sensor.py", line 749, in create_enrollment
                                                     assert_status(tls.app(pack('<BL', 0x69, 1)))
                                                   File "/usr/lib/python3/dist-packages/validitysensor/util.py", line 12, in assert_status
                                                     raise Exception('Failed: %04x' % s)
                                                 Exception: Failed: 0401
Jan 09 08:43:03 rocket python3[46186]: DEBUG:root:EnrollStatus

I have a hard time believing support for this first Validity sensor is broken so I must have missed a step or be doing something else wrong. But I'm at a loss. Any guidance or suggestions would be appreciated

How do I uninstall?

This is working for me on my Thinkpad T480 on Linux Mint 20, but the performance and reliability is flakey. Most of the time, my fingerprint is not recognized. This is kind of the state of Linux and fingerprint readers right now. How do I remove the fingerprint prompts and return back to defaulting to standard password authentication?

Exception: Failed: 044f

I'm on arch linux, using the AUR package.

Python 3.8.3 (default, May 17 2020, 18:15:42)
[GCC 10.1.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from prototype import *
>>> open9x()
Flash has 5 partitions.
Clean slate
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3.8/site-packages/validitysensor/init.py", line 43, in open
    open_common()
  File "/usr/lib/python3.8/site-packages/validitysensor/init.py", line 30, in open_common
    upload_fwext()
  File "/usr/lib/python3.8/site-packages/validitysensor/upload_fwext.py", line 26, in upload_fwext
    fwi=get_fw_info(2)
  File "/usr/lib/python3.8/site-packages/validitysensor/flash.py", line 80, in get_fw_info
    assert_status(rsp)
  File "/usr/lib/python3.8/site-packages/validitysensor/util.py", line 9, in assert_status
    raise Exception('Failed: %04x' % s)
Exception: Failed: 044f

TLS connection fails after suspend (lid closed)

Fingerprint sensor works fine before suspend (both systemctl suspend and closing the lid).
After waking up from suspend, the validity service stops accepting TCP connections and I am unable to use the sensor for any pam authentication. After suspend, fprintd-list <user> returns the following error:

โฏ fprintd-list user
found 1 devices
Device at /net/reactivated/Fprint/Device/1
Using device /net/reactivated/Fprint/Device/1
ListEnrolledFingers failed: Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/dbus/service.py", line 711, in _message_cb
    retval = candidate_method(self, *args, **keywords)
  File "/usr/lib/python-validity/dbus-service", line 90, in ListEnrolledFingers
    raise e
  File "/usr/lib/python-validity/dbus-service", line 81, in ListEnrolledFingers
    usr = self.user2record(user)
  File "/usr/lib/python-validity/dbus-service", line 64, in user2record
    return db.lookup_user(self.user2identity(user))
  File "/usr/lib/python3.9/site-packages/validitysensor/db.py", line 163, in lookup_user
    stg = self.get_user_storage(name='StgWindsor')
  File "/usr/lib/python3.9/site-packages/validitysensor/db.py", line 149, in get_user_storage
    return parse_user_storage(tls.cmd(pack('<BHH', 0x4b, dbid, len(name)) + name))
  File "/usr/lib/python3.9/site-packages/validitysensor/tls.py", line 122, in cmd
    rsp = self.app(cmd)
  File "/usr/lib/python3.9/site-packages/validitysensor/tls.py", line 152, in app
    return self.parse_tls_response(self.usb.cmd(self.make_app_data(b)))
  File "/usr/lib/python3.9/site-packages/validitysensor/tls.py", line 351, in parse_tls_response
    raise Exception('Unexpected TLS version %d %d' % (mj, mn))
Exception: Unexpected TLS version 4 0

Issue no longer persists after rebooting or restarting the python3-validity systemd service.

Distro: Archlinux 64-Bit
Laptop: Lenovo X1 Carbon (Gen6)

Other than this, kudos. Works very well indeed.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.