Skip to content

Add native Match-on-Host support for Synaptics Viper 06cb:008a sensor - #293

Open
the-muzammilali wants to merge 4 commits into
uunicorn:masterfrom
the-muzammilali:master
Open

the-muzammilali wants to merge 4 commits into
uunicorn:masterfrom
the-muzammilali:master

Conversation

@the-muzammilali

Copy link
Copy Markdown

Summary

This PR introduces native Linux driver support for the Synaptics WBDI 06cb:008a fingerprint sensor (Viper family, ASIC 57K0 FM-154-124, ROM 6.20), as found on Toshiba / Dynabook Tecra X40-D, Portégé, and related models.

Resolves #4

Background & Hardware Reality

  1. Match-on-Host (MoH) Architecture:
    Unlike the 0090/0097/009a devices, the 008a sensor is strictly Match-on-Host. GetFirmwareInfo (0x4302) returns 0x04af ("no firmware detected"), and Match-on-Chip commands (0x68, 0x5e) return error 0401 (invalid command). The sensor does not require or use a .xpfwext firmware extension.
  2. Flash Disconnect Avoidance:
    Attempting to write biometric templates directly to the SPI flash table triggers bus contention and USB device disconnects (USBError 19: No such device). Moving template storage to the host filesystem completely stabilizes the device.

Implementation Details

  • Frame Acquisition: Calibrated using sensor initialization sequence and passive interrupt awaiting on EP 0x83 to stream full 56×144 8-bit grayscale matrix frames (8,064 bytes).
  • Matching Engine: 2D Phase Correlation (numpy.fft.fft2) with 2D Hann window filtering (eliminating boundary edge step artifacts) and an angular tilt search ([-12° .. +12°]) with calibrated threshold 0.12.
  • Multi-Touch Template Storage: Host filesystem persistence in /var/lib/python-validity/templates/{uid}_{subtype}.dat.
  • Backward Compatibility: Fully preserved for existing 0090, 0097, 009a, and 009d devices (conditioned on device_info.type in [0x121, 0x2449]).
  • Dependencies: Added numpy to setup.py and python3-numpy to debian/control.

Hardware Verification

Tested and fully verified on Ubuntu 24.04 LTS (Toshiba Tecra X40-D, PT474U-06P001). Native fprintd-enroll, fprintd-verify, and PAM authentication (sudo -k && sudo whoami, lock screen) are working reliably.

@AdriPerse

Copy link
Copy Markdown

Thanks for working on 06cb:008a. I tested v0.16-viper1 on a Toshiba Portege X30-D, where the reader sits in the touchpad (identify_sensor(): "86C TM-3322-001", type 0x2449, ROM 6.20), on Ubuntu 26.04.

Your session setup works on this unit (init blobs, the TLS 00 + master_secret quirk, cmd_06), but captures never complete:

  • Enroll/identify capture: interrupt events 00 00 00 00 00, 02 00 40 10 00, 03 40 01 00 00, 03 41 03 00 40, then nothing (no completion bit), also while holding or swiping a finger.
  • cmd_02_chunk_30 / cmd_02_chunk_43 contain another unit's factory calibration (the bit-packed per-row values for the 0x8000203c / 0x80002040 register writes) and its per-pixel 0x85 offsets. This unit's values (factory bits 0x0e00, subtag 3) are different.

What works on this unit:

  1. Rebuild the two bit-packed blocks from get_factory_bits(0x0e00)[3][4:] and drop the 0x85 lines.
  2. Use the calibration image-reconstruction chunk (0x2e = 0200180008000000900038004d01000058027c013c323232640a0202, no 0x26 finger detect). The capture completes in about 45 ms, then 51 00200000 returns a 56 x 144 frame (columns arrive as byte-swapped 32-bit words, physical order [4g+3, 4g+2, 4g+1, 4g]).
  3. Poll at 10-12 fps and detect the finger on the host.

The strip is only about 8.4 x 3.3 mm. In my tests single-touch frames could not reliably separate my finger from other fingers, so I switched to swipes and a matcher that needs several consistent frames.

Result: an fprintd-compatible daemon that reuses your validitysensor session code (credited in the README) and works with GNOME Settings, the lock screen, sudo and polkit: https://github.com/AdriPerse/viper-fprintd (protocol notes in docs/NOTES.md). Maybe the capture changes help other 008a units too.

(Developed with AI assistance and tested on my own laptop.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Which Firmware file for Synaptics 06cb:008a (or other)

2 participants