[fprint] Documentation for writing a new driver

Igor Filatov ia.filatov at gmail.com
Sat Mar 10 11:34:15 UTC 2018


I've left something in https://github.com/hmaarrfk/libfprint/issues/4 because
it's easier to discuss when you can point at the code.

On Sat, Mar 10, 2018 at 3:06 AM Mark Harfouche <mark.harfouche at gmail.com>
wrote:

> Alright, I think I finally got somewhere.
>
> I can run img_capture successfully. I see two pgm files in my directory
> that look like fingerprints.
>
> This particular device can’t do the matching so it all has to be done on
> the host.
> I assume libfprint can do this?
>
> I can’t seem to run enroll. This is the output I get:
>
> This program will enroll your right index finger, unconditionally overwriting any right-index print that was enrolled previously. If you want to continue, press enter, otherwise hit Ctrl+C
>
> Found device claimed by Validity VFS7552 driver
> Opened device. It's now time to enroll your finger.
>
> You will need to successfully scan your finger 5 times to complete the process.
>
> Scan your finger now.
> Wrote scanned image to enrolled.pgm
> Didn't quite catch that. Please try again.
>
> Scan your finger now.
> libusb: warning [handle_timeout] async cancel failed -5 errno=22
> Wrote scanned image to enrolled.pgm
> Didn't quite catch that. Please try again.
>
> What is:
>
> libusb: warning [handle_timeout] async cancel failed -5 errno=22
>
> Help would be appreciated, though I know it is difficult to debug other
> people’s hardware.
>
> Mark
>>
> On Fri, Mar 9, 2018 at 11:02 AM, Igor Filatov <ia.filatov at gmail.com>
> wrote:
>
>> Not really. The same state is sent to dev_change_state after activation
>> has ended with fpi_imgdev_activate_complete. You can ignore it.
>>
>>
>> On Fri, Mar 9, 2018 at 8:51 PM Mark Harfouche <mark.harfouche at gmail.com>
>> wrote:
>>
>>> Hi Igor,
>>>
>>> Thank you for your reply.
>>>
>>> I’m confused about the parameter sent to dev_activate. Is it useful? in
>>> uru4000.c (which seems to be the latest one written), the authors also seem
>>> to be confused
>>>
>>> /* FIXME: having state parameter here is kinda useless, will we ever
>>>  * see a scenario where the parameter is useful so early on in the activation
>>>  * process? asynchronity means that it'll only be used in a later function
>>>  * call. */static int dev_activate(struct fp_img_dev *dev, enum fp_imgdev_state state)
>>> {
>>>
>>> Thanks,
>>>
>>> Mark
>>>
>>> On Fri, Mar 9, 2018 at 10:43 AM, Igor Filatov <ia.filatov at gmail.com>
>>> wrote:
>>>
>>> Hi Mark,
>>>>
>>>> There are no high-level docs, unfortunately. There's some valuable info
>>>> in comments in drv.c, sync.c, async.c, img.c etc. but it only covers
>>>> specific parts, not how they should interact.
>>>>
>>>> There are 6 drivers for press-type sensors: aes3500.c, aes4000.c,
>>>> fdu2000.c, upektc.c, uru4000.c, vcom5s.c. But there isn't much difference
>>>> between press and swipe drivers. FP_SCAN_TYPE_* is used to determine which
>>>> messages to show ("please touch the sensor" vs. "please swipe..."), and I
>>>> think that's it. Besides that, all drivers essentially do the same thing:
>>>> obtain the fingerprint image and submit it. You can use any driver as a
>>>> reference.
>>>>
>>>>
>>>>
>>>> On Fri, Mar 9, 2018 at 7:50 PM Mark Harfouche <mark.harfouche at gmail.com>
>>>> wrote:
>>>>
>>>>> Hello all,
>>>>>
>>>>> I would like to develop a driver for the Validity 0091 sensor
>>>>> available on the Dell XPS13/15 9X60.
>>>>>
>>>>> I would say I have the driver reverse engineered to 95% (There might
>>>>> be a few things I still don’t understand from the internal state machine).
>>>>> https://github.com/hmaarrfk/Validity91
>>>>> WIP: https://github.com/freedesktop/libfprint
>>>>>
>>>>> I found the libfprint source, can compile it, and started creating my
>>>>> own driver.
>>>>>
>>>>> However, I am confused about the internal workings of libfprint and
>>>>> the functions I need to define.
>>>>> I tried to follow examples that were included, but it seemed that they
>>>>> were mostly “swipe”‘ sensors, and not capacitive style sensor.
>>>>> Is there any good documentation about the state machines I need to
>>>>> implement with regards to the functions
>>>>>
>>>>>     .open = dev_open,
>>>>>     .close = dev_close,
>>>>>     .activate = dev_activate,
>>>>>     .deactivate = dev_deactivate,
>>>>>     .change_state = dev_change_state,
>>>>>
>>>>> Thanks,
>>>>>
>>>>> Mark
>>>>>>>>>> _______________________________________________
>>>>> fprint mailing list
>>>>> fprint at lists.freedesktop.org
>>>>> https://lists.freedesktop.org/mailman/listinfo/fprint
>>>>>
>>>>>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/fprint/attachments/20180310/13a859a4/attachment-0001.html>


More information about the fprint mailing list