• No I didn't . I'll check but it just times out. Though the verify function returns some error codes like 4114 which is expected to an extent. I'll just wait for @PaddeK fingerprint to arrive (hopefully soon) so he could test-run too

  • Quick update.. according to the shipment tracking my GT-511C1 is expected to arrive tomorrow.

  • @PaddeK have you received the GT-511C1??

  • jep i am working on the code right now

  • Okay.. i think it works now. I uploaded the module on my github so its easy to share.
    Try this example to get you started:

    let GT511 = require('https://github.com/PaddeK/espru­ino-gt511cxx/blob/master/gt511cxx.js');
    
    let serial = Serial.find(B7);
    serial.setup(9600, {rx: B7, tx: B6});
    
    let g = new GT511(GT511.Devices.GT511C1R, serial),
        open = () => g.open(),
        close = () => g.close(),
        getTemplate = (t) => () => g.getTemplate(t);
    
    let base64Enc = (bytes) => btoa(bytes.reduce((p, c) => p + String.fromCharCode(c), '')),
        base64Dec = (string) => E.toUint8Array(atob(string).split(''));
    
    GT511.sequence([open, getTemplate(0), close]).then(result => {
        // result is an array that contains the return values of all functions called in the sequence (in same order)
    
        let template = result[1],
            b64 = base64Enc(template);
    
        console.log('template', template);
        console.log('base64', b64);
        console.log('validate', base64Dec(b64).slice(0, -1).toString() === template.toString()); // something is fishy here
    }).catch(err => console.log(err));
    

    And i guess i found a bug in espruino somewhere.. while converting the template back to a Uint8Array i have to remove a trailing zero.. which i have no clue why it is there in the first place.

  • Hello @PaddeK, thanks for taking your time to try and sort somethings out.
    I'm still getting a timeout error:

    timeout exceeded
    

    I have tried several alternatives in calling the getTemplate function, yet it still times out.

    Also calling the enroll(t) function results in this error:

    Error {
      "msg": "Expecting a function to call, got Object",
      "type": "Error",
      "stack": " at line 1 col 1\nfn().then(res.concat.bind(res))\n^\ni­n function called from system\n"
     }
    

    after setting enroll with enroll = (t) => () => g.enroll(t); and passed it into the GT511.sequence array I got this error

    enroll error:  Error {
      "msg": "Function \"switchLED\" not found!",
      "type": "Error",
      "stack": " at line 1 col 6\nthis.switchLED(!!b)\n     ^\nin function \"fn\" called from line 1 col 4\nfn().then(res.concat.bind(res))\n   ^\nin function called from system\n"
     }
    
  • My example was to get the template of slot 0. So you need to have previously enrolled a fingerprint to slot 0. You can check how many templates are stored with getEnrollCount()
    or check if a particular slot is used by a template with checkEnrolled(slot).

    I will try to make a more complete example later today.

  • getEnrollCount works as expected but checkEnrolled returns a 4111 error. looking at the datasheet thats 0x100F which is a NACK_DEV_ERR (device error especially if crypto chip is trouble) I hope this doesn't mean my GT511 has spoilt.

  • You could try to delete all templates and reenroll your finger. I never had a 4111 error so i have no clue what it means or when it happens.

  • Hi @PaddeK, were you able to write some complete examples?

  • No something came up and i had to put it on hold.
    But this gives you a chance to make wishes so i can write something that
    helps you with your project :)

  • Thanks @PaddeK for all your assist...finally its working all thanks to your efforts, one which involved to change minification in WebIDE settings from Esprima to Closure (online) - Simple Minification.

    @allObjects my appreciation goes to you too.

  • fyi: ...this avaScript for Microcontrollers and IoT (Part 4): Espruino and the ESP8266 just flickered over my screen... and it uses the ZFM-20 Series
    Fingerprint Identification Module
    . Looks like the protocol is different, but nice to see things moving.

  • Well after a a long private message session user81574 and i figured it out and the GT511-xx series should work. Of course i had a few bugs in my code but at the end it was the minification with Esprima that roadblocked us. But i guess at least in part thats my fault too.. poor esprima cant make sense of my mess i think.

    Next i want to try do display the captured images of the sensor on a eink display i have for a while now. I never used it so far.. so first step would be to get the display going and then see how i.. preferably stream.. images from the fingerprint scanner to it.

  • @PaddeK and @user81574, do you plan to share your final finger print reader code?

    I think e-ink is a good application for displaying figer printes... after all, it is line graphics... (and not shades). Resolution though may be a challenge depending on the resolution of the e-ink display (you 'afforded').

  • The code is on my github repo here.
    Cant remember the exact display i bought but i do remember it does have a lower resolution.
    So i will have to resize the image.. or get a different e-ink display for this :)

  • hi guys, so I was looking at the template data and am deducing (maybe wrong) that each fingerprint pattern (lets say index finger) will return different template data independent of how many times it was enrolled (3 times enrollment).

    So I would like to know how the scanner identifies and verifies a user print.
    i.e during identification, is the single print template (the template generated when you attempt to identify) run against the merged template of the 3 enrollment process?

    P.S what I want to try and do is run identification and verification not on the inbuilt template database but on a template itself.

  • I m not an expert in the matter, nor do I know the algorithms.

    But the triple take and some calculation makes sense to me... for different reasons: first, enrollment has to show 3 times 'the same' - the same with 'tolerable variation'. Second, when validating, the template with variation is used to detect 'identity'. The triple take allows to calculate a mean and some deviation to be stored in a 'verification matrix' which then is used on identity check.

    You can give it a shot by messing with the enrollment... I'm pretty sure, if you do not use the same finger for all tree takes, enrollment will show error. But it would be interesting to see how much 'has to be the same' or 'present' over all 3 takes to make it still a successful enrollment, and at the reverse: how much can be different - not just 'absent'.

    The same is for checking identity: how much can be absent, how much can be different...

    When this technology was introduced at the US borders, we - my wife and I - entered in some northern station middle in the winter. For me the readers worked perfect... for my wife not at all... with winter dry and 'cold' hands/fingers, the reader 'failed' completely... not even warming up with under warm water did help. In the end they let us pass without being able identify by finger print reader... It is know that some refugees burn / mutilate their skin to make finger print identification fail... for different reasons...

  • In each step of the enrollment the template gets refined so to speak.. after the 3 captures at enrollment you get one template. At verify/identify the finger is captured once, some kind of match rating is calculated and then matched (match rating > some threshold)
    against a specific template (verify) or the database (identify).

    You can fill the sensor DB with your stored templates and use identify.. or if you know which template should match just validate against a single template.

    Look at the datasheets i linked. The functions are Verify/Identify/VerifyTemplate/IdentifyT­emplate

    -- Edit --
    @allObjects This sensor is quite finicky at enrollment.. you have to press and release your finger.. and if i press the finger more then a tiny bit a different way the enrollment fails. Switching fingers fails too.

  • I have played with the identify/verify, makes sense what you guys said. My concern now is, it limits me to doing identification and verification within the GT-511C3, which was how it was designed.
    Filling the sensor DB with stored template might be cumbersome (it is likely I would have templates that run into hundreds).
    My thought now is to know the algorithm that was used by the device to do verifiy/identify so it can also be done outside the device (say, in a remote server).
    Or come up with another algorithm that might do that.
    In both cases, is it feasible? and is it something we - all of us (: could attempt?

  • I think both are not feasible. Your best bet would be to upload templates to DB check against it and repeat until you found the right one. But this could take quite a while.. so this might not be feasible too.

    -- Edit --
    Or you can get your hands on a GT-511C5 .. it can store up to 2000 fingerprints.

    -- Edit 2 --
    Found a source here. Not as pricey as i thought :)

    Even better GT-521F52.
    Up to 3000 fingerprint, wake on touch and its mentioned a shared database via network!

  • GT-521F52 is a beast on a fingerprin (;
    Shared database you say?

  • Checking the datasheet for it right as we "speak".

  • just came across this Fim50 series
    up to 10,000 templates

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Need help connecting Fingerprint Scanner - TTL (GT-511C3) over UART Serial Comms

Posted by Avatar for user81574 @user81574

Actions