Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
# python-validity
Validity fingerprint sensor driver.

> **Note for Kensington VeriMark (`06cb:0088`) users:** that device is a
> pre-Prometheus chip and uses a different protocol from `06cb:009a` — no
> fwext partition, different pre-TLS pairing. A dedicated FLOSS `libfprint`
> driver for it lives at
> [Kensington_VeriMark_06cb-0088](https://github.com/visorcraft/Kensington_VeriMark_06cb-0088).
> Install that instead of `python-validity` for the `06cb:0088`.

Table of Contents
=================

Expand Down
20 changes: 20 additions & 0 deletions validitysensor/usb.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,19 @@ def from_usbid(cls, vendorid, productid):

supported_devices = dict((dev.value, dev) for dev in SupportedDevices)

# Known Validity/Synaptics device IDs that this codebase does not target.
# Detected to print a clear redirect rather than failing with a confusing
# "no matching devices found" message.
_externally_supported_devices = {
(0x06cb, 0x0088): (
"06cb:0088 (Kensington VeriMark) is a pre-Prometheus chip with a "
"different protocol from 06cb:009a (no fwext partition, different "
"pre-TLS pairing). A working FLOSS libfprint driver for it lives at "
"https://github.com/visorcraft/Kensington_VeriMark_06cb-0088 — "
"install that instead of python-validity for this device."
),
}


class CancelledException(Exception):
pass
Expand All @@ -47,6 +60,13 @@ def match(d):

dev = ucore.find(custom_match=match)

if dev is None:
# Check for a known-but-out-of-scope Validity/Synaptics
# device and print a clear redirect.
for (v, p), msg in _externally_supported_devices.items():
if ucore.find(idVendor=v, idProduct=p) is not None:
raise Exception(msg)

self.open_dev(dev)

def open_devpath(self, busnum: int, address: int):
Expand Down