Jump to content

Nitgen fingerprint scanner (NGenBio) UDF


Jefrey
 Share

Recommended Posts

Hi guys! :)

 

I've created this UDF to work with Nitgen fingerprint readers that use NGenBio SDK. I'm working with Hamster DX for testing purposes:

 

18.jpg

So, the UDF still needs a lot of functionalities but what is already written is enough to do most of the tasks you would want to do with a fingerprint scanner (registering, authentication of a user, identification of a person among many users etc.).

I've put it on GitHub because it will be constantly updated. Also, if you want to help, feel free to clone and send pull requests :D

Examples:

#include 'NGenBio.au3'


; Enumerate devices
$numberOfDevices = _NEnumerate() ; Enumerate all connected devices

If Not $numberOfDevices Then Exit ; no device connected

_NOpen() ; Open device (no argument = open latest connected device)

; ======================================================================
; Example 1: just get a fingerprint and display the string associated to it

MsgBox(0, "Your fingerprint means:", _NCapture())

; ======================================================================
; Example 2: verification (expecting for a specified person)

; Ask for name (to show how to work with payloads and store info on the fingerprint data)
$sName = InputBox("Test", "Enter your name")

$tmpData = _NEnroll($sName) ; Register a fingerprint (we will have a string to save in DB if we want; $sName will be saved together with the data)

If Not $tmpData Then Exit ; User canceled

$check = _NVerify($tmpData) ; Verify fingerprint (from the string that the registration gave us - it could have come from a database)

If $check Then
    MsgBox(0, '', 'That''s you, ' & $check & "!") ; Correct fingerprint
Else
    MsgBox(0, '', 'That''s not you!') ; Wrong fingerprint
EndIf

; ======================================================================
; Example 3: identification (expecting for anyone of a group of persons)

; Add the already saved FIR data from the previous example as ID #1
_NSearch_Add($tmpData, 1)

MsgBox(0, "", "You are now user 1. Please call someone else to register (or use different fingers/hand) to test the registration of a second person.")

$secondPersonName = InputBox("Test", "What's the name of the second person?")

; Get data
$secondperson = _NEnroll($secondPersonName)

_NSearch_Add($secondperson, 2)

; Let's ask for the fingerprint to search for
$capture = _NCapture()
$user = _NSearch_Identify($capture)
If $user Then
    MsgBox(0, "", "User: " & $user)
Else
    MsgBox(0, "", "User not found!")
EndIf


_NClose() ; Close device (no argument = close latest opened device)

Note that you must install NGenBio SDK (although my system is x64, I only had success after installing the x86 version). More details, documentation and link to download the SDK on the readme file.

Get it on Github

My stuff

Spoiler

My UDFs  _AuThread multithreading emulation for AutoIt · _ExtInputBox an inputbox with multiple inputs and more features · forceUTF8 fix strings encoding without knowing its original charset · JSONgen JSON generator · _TCPServer UDF multi-client and multi-task (run on background) event-based TCP server easy to do · _TCPClient_UDF multi-server and multi-task (runs on background) event-based TCP client easy to do · ParseURL and ParseStr functions ported from PHP · _CmdLine UDF easily parse command line parameters, keys or flags · AutoPHP Create documents (bills, incomes) from HTML by sending variables/arrays from AutoIt to PHP · (Un)Serialize Convert arrays and data into a storable string (PHP compatible) · RTTL Plays and exports to MP3 Nokia-format monophonic ringtones (for very old cellphones) · I18n library Simple and easy to use localization library · Scripting.Dictionary OOP and OOP-like approach · Buffer/stack limit arrays to N items by removing the last one once the limit is reached · NGBioAPI UDF to work with Nitgen fingerprint readers · Serial/Licensing system require license key based on unique machine ID from your users · HTTP a simple WinHTTP library that allows GET, POST and file uploads · Thread true AutoIt threads (under-dev) · RC4 RC4 encryption compatible with PHP and JS ·  storage.au3 localStorage and sessionStorage for AutoIt Classes _WKHtmlToX uses wkhtmlto* to convert HTML files and webpages into PDF or images (jpg, bmp, gif, png...) Snippets _Word_DocFindReplaceByLongText replace strings using Word UDF with strings longer than 255 characters (MSWord limit) rangeparser parser for printing-like pages interval (e.g.: "1,2,3-5") EnvParser parse strings/paths with environment variables and get full path GUICtrlStaticMarquee static text scrolling Random stuff Super Mario beep sound your ears will hurt

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...