Skip to content

Repository files navigation

U.ARE.U 4500 Python Wrapper (Windows 64-bit)

A complete Python wrapper for the HID DigitalPersona U.ARE.U 4500 fingerprint scanner, implemented as a C++ DLL plus a Python ctypes interface.

This project provides a clean C wrapper around the proprietary HID SDK, enabling:

  • Device search
  • Fingerprint capture (FID)
  • FID → FMD conversion
  • Base64 encoding/decoding
  • FMD template comparison
  • Python & LabVIEW integration
  • Deployment on Windows 64-bit systems without installing HID’s full runtime

⚠ About the HID SDK

HID DigitalPersona libraries (dpfpdd, dpfj, DPFPApi) are not free and are not included in this repository.

You must obtain them legally via:

  • HID developer portal
  • Licensed DigitalPersona products
  • Authorized distributors

This repository only includes:

  • A custom C++ wrapper (uareu4500.cpp)
  • A precompiled DLL
  • Python integration code
  • Build instructions

It does NOT distribute HID SDK files.


⭐ What This Project Provides

✔ A Windows-compatible C++ DLL

The DLL exposes a simple C ABI so it can be used from:

  • Python (ctypes)
  • LabVIEW
  • C/C++
  • Rust / Go / Node.js (FFI)

✔ Not statically linked — but portable

Your DLL is not fully static. It still dynamically depends on:

  • dpfj.dll
  • dpfpdd.dll
  • DPFPApi.dll
  • libwinpthread-1.dll

This is expected because HID SDK libraries cannot be statically linked. However, the DLL is portable between Windows 64-bit machines as long as these SDK DLLs are included in the same folder.

✔ Full fingerprint workflow

Internally, the DLL implements:

  • Device query
  • Device open/close
  • Capture using dpfpdd_capture
  • FID → FMD conversion using dpfj_create_fmd_from_fid
  • Base64 encode/decode utilities
  • FMD-to-FMD comparison (dpfj_compare)
  • Error and status handling

🐍 Python Example

from uareu4500 import FingerprintScanner

scanner = FingerprintScanner()

template = scanner.capture()        # Base64 fingerprint template
result = scanner.compare(template)  # Compare with a live scan

print("Match:", result)

The DLL is loaded using:

import ctypes
fingerprint_lib = ctypes.CDLL("uareu4500.dll", winmode=0)

winmode=0 is required for MinGW-compiled DLLs.


🛠 Building the DLL (Optional)

Only needed if you modify the C++ wrapper.

Requirements

  • MinGW-w64 (MSYS2)
  • HID DigitalPersona SDK (headers + libs)
  • OpenSSL (mingw-w64-x86_64-openssl)

Install OpenSSL:

pacman -S mingw-w64-x86_64-openssl

Build Command

g++ -shared -o uareu4500.dll uareu4500.cpp \
    -Idpfpdd/include -Ldpfpdd/lib -ldpfpdd \
    -Idpfj/include -Ldpfj/lib -ldpfj \
    -I/mingw64/include -L/mingw64/lib \
    -l:libssl.a -l:libcrypto.a \
    -static-libgcc -static-libstdc++ \
    -lws2_32 -lcrypt32

This does not make a fully static DLL. HID provided libraries (dpfpdd, dpfj, DPFPApi) remain dynamic dependencies.


🧪 Verified Functionality

  • Device detection
  • Capture (FID)
  • ANSI381 → ANSI378 template conversion
  • Base64 encode/decode
  • Template comparison
  • Working Python demo
  • Portable deployment (with HID DLLs included)

📦 Repository Contents

  • uareu4500.dll — precompiled wrapper
  • uareu4500.cpp — C++ source
  • uareu4500.py — Python wrapper
  • Example scripts
  • Build instructions

About

Python application for fingerprint enrollment and verification using DigitalPersona U.are.U 4500. Implements a custom C++ DLL interface, FMD generation, Base64 encoding, and SQLite-based storage

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages