[fprint] elan patch + poc 0x903 and 0x0C03
Meta Colon
timo at teemze.de
Sat Jan 27 12:40:49 UTC 2018
Hi,
/examples/img_capture/ had the following output (I had to put my finger
on it at some point of time):
fp:debug [fp_init]
fp:debug [register_driver] registered driver upekts
fp:debug [register_driver] registered driver aes3500
fp:debug [register_driver] registered driver aes4000
fp:debug [register_driver] registered driver aes2501
fp:debug [register_driver] registered driver aes2550
fp:debug [register_driver] registered driver uru4000
fp:debug [register_driver] registered driver vcom5s
fp:debug [register_driver] registered driver upeksonly
fp:debug [register_driver] registered driver aes1610
fp:debug [register_driver] registered driver aes1660
fp:debug [register_driver] registered driver aes2660
fp:debug [register_driver] registered driver vfs101
fp:debug [register_driver] registered driver vfs301
fp:debug [register_driver] registered driver vfs5011
fp:debug [register_driver] registered driver upektc
fp:debug [register_driver] registered driver upektc_img
fp:debug [register_driver] registered driver etes603
fp:debug [register_driver] registered driver vfs0050
fp:debug [register_driver] registered driver elan
fp:debug [find_supporting_driver] driver elan supports USB device
04f3:0c1a
fp:debug [find_supporting_driver] selected driver elan supports USB
device 04f3:0c1a
Found device claimed by ElanTech Fingerprint Sensor driver
sync:debug [fp_dev_open]
async:debug [fp_async_dev_open]
elan:debug [dev_init]
async:debug [fpi_drvcb_open_complete] status 0
sync:debug [sync_open_cb] status 0
Opened device. It's now time to scan your finger.
sync:debug [fp_dev_img_capture] to be handled by elan
async:debug [fp_async_capture_start]
fp:debug [generic_acquire_start] action 4
elan:debug [elan_reset_sensor]
elan:debug [elan_dev_reset]
drv:debug [__ssm_call_handler] 0x5618b98974b0 entering state 0
elan:debug [elan_run_cmd] 4011
elan:debug [elan_cmd_cb]
elan:debug [elan_cmd_read]
elan:debug [elan_cmd_read] skipping read, not expecting anything
elan:debug [elan_cmd_done]
drv:debug [__ssm_call_handler] 0x5618b98974b0 entering state 1
poll:debug [fpi_timeout_add] in 5ms
poll:debug [get_next_timeout_expiry] next timeout in 0.004979s
poll:debug [get_next_timeout_expiry] next timeout in 0.004964s
poll:debug [get_next_timeout_expiry] first timeout already expired
poll:debug [handle_timeout]
drv:debug [__ssm_call_handler] 0x5618b98974b0 entering state 2
elan:debug [elan_run_cmd] 4014
elan:debug [elan_cmd_cb]
elan:debug [elan_cmd_read]
elan:debug [elan_cmd_read] skipping read, not expecting anything
elan:debug [elan_cmd_done]
drv:debug [__ssm_call_handler] 0x5618b98974b0 entering state 3
elan:debug [elan_run_cmd] 4013
elan:debug [elan_cmd_cb]
elan:debug [elan_cmd_read]
elan:debug [elan_cmd_cb]
elan:debug [elan_cmd_done]
drv:debug [fpi_ssm_mark_completed] 0x5618b98974b0 completed with
status 0
elan:debug [reset_sensor_complete]
elan:debug [elan_activate]
elan:debug [elan_dev_reset]
drv:debug [__ssm_call_handler] 0x5618b988e110 entering state 0
elan:debug [activate_run_state]
elan:debug [elan_run_cmd] 4019
elan:debug [elan_cmd_cb]
elan:debug [elan_cmd_read]
elan:debug [elan_cmd_cb]
elan:debug [elan_cmd_done]
drv:debug [__ssm_call_handler] 0x5618b988e110 entering state 1
elan:debug [activate_run_state]
elan:debug [activate_run_state] FW ver 1.66
drv:debug [__ssm_call_handler] 0x5618b988e110 entering state 2
elan:debug [activate_run_state]
elan:debug [elan_run_cmd] 000c
elan:debug [elan_cmd_cb]
elan:debug [elan_cmd_read]
elan:debug [elan_cmd_cb]
elan:debug [elan_cmd_done]
drv:debug [__ssm_call_handler] 0x5618b988e110 entering state 3
elan:debug [activate_run_state]
elan:debug [activate_run_state] sensor dimensions, WxH: 144x64
drv:debug [__ssm_call_handler] 0x5618b988e110 entering state 4
elan:debug [activate_run_state]
elan:debug [elan_run_cmd] 402a
elan:debug [elan_run_cmd] skipping for this device
elan:debug [elan_cmd_done]
drv:debug [__ssm_call_handler] 0x5618b988e110 entering state 5
elan:debug [activate_run_state]
elan:debug [elan_run_cmd] 0009
elan:debug [elan_cmd_cb]
elan:debug [elan_cmd_read]
elan:debug [elan_cmd_cb]
elan:debug [elan_cmd_done]
drv:debug [__ssm_call_handler] 0x5618b988e110 entering state 6
elan:debug [activate_run_state]
elan:debug [elan_save_frame]
drv:debug [__ssm_call_handler] 0x5618b988e110 entering state 7
elan:debug [activate_run_state]
elan:debug [elan_run_cmd] 4024
elan:debug [elan_cmd_cb]
elan:debug [elan_cmd_read]
elan:debug [elan_cmd_cb]
elan:debug [elan_cmd_done]
drv:debug [fpi_ssm_mark_completed] 0x5618b988e110 completed with
status 0
elan:debug [activate_complete]
elan:debug [elan_need_calibration]
elan:debug [elan_need_calibration] calibration mean: 7533, bg mean:
7483, delta: 50
fp:debug [fpi_imgdev_activate_complete] status 0
async:debug [fpi_drvcb_capture_started]
elan:debug [elan_capture]
elan:debug [elan_dev_reset]
drv:debug [__ssm_call_handler] 0x5618b988dc70 entering state 0
elan:debug [elan_run_cmd] 4031
elan:debug [elan_run_cmd] skipping for this device
elan:debug [elan_cmd_done]
drv:debug [__ssm_call_handler] 0x5618b988dc70 entering state 1
elan:debug [elan_run_cmd] 403f
elan:debug [elan_cmd_cb]
elan:debug [elan_cmd_read]
elan:debug [elan_cmd_cb]
elan:debug [elan_cmd_done]
drv:debug [__ssm_call_handler] 0x5618b988dc70 entering state 2
fp:debug [fpi_imgdev_report_finger_status] finger on sensor
elan:debug [elan_run_cmd] 0009
elan:debug [elan_cmd_cb]
elan:debug [elan_cmd_read]
elan:debug [elan_cmd_cb]
elan:debug [elan_cmd_done]
drv:debug [__ssm_call_handler] 0x5618b988dc70 entering state 3
elan:debug [elan_save_frame]
drv:debug [__ssm_call_handler] 0x5618b988dc70 entering state 1
elan:debug [elan_run_cmd] 403f
elan:debug [elan_cmd_cb]
elan:debug [elan_cmd_read]
elan:debug [elan_cmd_cb]
elan:debug [elan_cmd_done]
drv:debug [__ssm_call_handler] 0x5618b988dc70 entering state 2
fp:debug [fpi_imgdev_report_finger_status] finger on sensor
fp:debug [fpi_imgdev_report_finger_status] ignoring status report
elan:debug [elan_run_cmd] 0009
elan:debug [elan_cmd_cb]
elan:debug [elan_cmd_read]
elan:debug [elan_cmd_cb]
elan:debug [elan_cmd_done]
drv:debug [__ssm_call_handler] 0x5618b988dc70 entering state 3
elan:debug [elan_save_frame]
drv:debug [__ssm_call_handler] 0x5618b988dc70 entering state 1
elan:debug [elan_run_cmd] 403f
elan:debug [elan_cmd_cb]
elan:debug [elan_cmd_read]
elan:debug [elan_cmd_cb]
elan:debug [elan_cmd_cb] transfer timed out
drv:debug [fpi_ssm_mark_aborted] error -110 from state 1
drv:debug [fpi_ssm_mark_completed] 0x5618b988dc70 completed with
status -110
elan:debug [capture_complete]
fp:debug [fpi_imgdev_session_error] error 101
async:debug [fpi_drvcb_report_capture_result] result 101
sync:error [fp_dev_img_capture] unrecognised return code 101
sync:debug [fp_dev_img_capture] ending capture
async:debug [fp_async_capture_stop]
elan:debug [elan_deactivate]
elan:debug [elan_dev_reset]
drv:debug [__ssm_call_handler] 0x5618b9897610 entering state 0
elan:debug [deactivate_run_state]
elan:debug [elan_run_cmd] 000b
elan:debug [elan_cmd_cb]
elan:debug [elan_cmd_read]
elan:debug [elan_cmd_read] skipping read, not expecting anything
elan:debug [elan_cmd_done]
drv:debug [fpi_ssm_mark_completed] 0x5618b9897610 completed with
status 0
elan:debug [deactivate_complete]
fp:debug [fpi_imgdev_deactivate_complete]
async:debug [fpi_drvcb_capture_stopped]
sync:debug [capture_stop_cb]
image capture failed, code -22
sync:debug [fp_dev_close]
elan:debug [dev_deinit]
elan:debug [elan_dev_reset]
async:debug [fpi_drvcb_close_complete]
sync:debug [sync_close_cb]
fp:debug [fp_exit]
I guess this means that it works?
/elanfp.c/ however had the output (after I properly installed / executed
it):
Device with vid 4f3 pid c1a found.
Error 5
Which seems to mean, that the reader couldn't be opened?
Regards
Timo
On 27.01.2018 08:47, Igor Filatov wrote:
>
> Hi Timo,
>
> Please post the output of the command(s) that fail(s). For the driver
> please run ./autogen.sh, then make, then examples/img_capture.
>
>
> On Sat, 27 Jan 2018, 02:32 TeEmZe, <timo at teemze.de
> <mailto:timo at teemze.de>> wrote:
>
> Hi,
>
> I tried running elanfp.c to get the device specifications Igor
> wanted, however I got back a /Segmentation fault /signal. Is it me
> who’s doing something wrong there?
>
> I also tried compiling / installing the driver from GitHub.
> However, when I run /./configure/ I get back the message /No such
> file or directory/. How should I compile this project?
>
> I’d love to test the current state of the driver, but I’ll need
> some advice here.
>
> Regards,
>
> Timo
>
> *From:*Igor Filatov [mailto:ia.filatov at gmail.com
> <mailto:ia.filatov at gmail.com>]
> *Sent:* Tuesday, 23 January 2018 22:59
> *To:* Hans de Goede <hdegoede at redhat.com
> <mailto:hdegoede at redhat.com>>; konachan.700 at gmail.com
> <mailto:konachan.700 at gmail.com>; Sebastien Bechet
> <sebastien.bechet at osinix.com
> <mailto:sebastien.bechet at osinix.com>>; TeEmZe <timo at teemze.de
> <mailto:timo at teemze.de>>
> *Cc:* fprint at lists.freedesktop.org
> <mailto:fprint at lists.freedesktop.org>
>
>
> *Subject:* Re: [fprint] elan patch + poc 0x903 and 0x0C03
>
> I've updated the driver to support the devices known so far.
> Please see if it works for you. Please send me your logs if not.
> I've enabled all commands for all devices (except 0x4031 which
> I've enabled only on my 0x0907 -- no idea what it does, but the
> response is 0x01).
>
> There's a bit mask in each command which you can use to
> enable/disable commands for a particular device.
>
> As for calibration, the driver doesn't expect 0x03 because not all
> devices seem to return 0x03 or 0x01. Instead it will retry *only*
> if the response is 0x03 and until it's different.
>
> I've enabled reset & fuse load for my device. Although I haven't
> seen it done by the original driver, it doesn't seem to hurt. So
> please see if it cause problems for you. Let's disable it only for
> devices where it does.
>
> https://github.com/iafilatov/libfprint
>
> On Fri, Jan 19, 2018 at 3:33 PM TeEmZe <timo at teemze.de
> <mailto:timo at teemze.de>> wrote:
>
> Hi,
>
> Sadly I won't be able to get the data until next week, as I
> currently don't have access to the Laptop. I'll notify you as
> soon as I manage to get the data.
>
> Regards,
>
> Timo
>
> -----Original Message-----
> From: Hans de Goede [mailto:hdegoede at redhat.com
> <mailto:hdegoede at redhat.com>]
> Sent: Thursday, 18 January 2018 16:14
> To: Sebastien Bechet <sebastien.bechet at osinix.com
> <mailto:sebastien.bechet at osinix.com>>; Igor Filatov
> <ia.filatov at gmail.com <mailto:ia.filatov at gmail.com>>
> Cc: TeEmZe <timo at teemze.de <mailto:timo at teemze.de>>;
> konachan.700 at gmail.com <mailto:konachan.700 at gmail.com>;
> fprint at lists.freedesktop.org <mailto:fprint at lists.freedesktop.org>
> Subject: Re: [fprint] elan patch + poc 0x903 and 0x0C03
>
> Hi,
>
> On 18-01-18 16:03, Sebastien Bechet wrote:
> > Thank you Igor. Hans, you can try again with last version.
>
> Not tested, but looking at the code, it will loop in the
> calibration, my 2 devices both need a:
>
> if (result == 0x03) break;
>
> Directly after the:
>
> printf("Calibration Status: 0x%x\n", result);
>
> Line, currently the code only checks for result == 0x03 for
> the result of the get_cmd_status command, while it should
> check (for my devices) the result of the get_cmd_calibration
> command.
>
> Regards,
>
> Hans
>
>
>
> >
> > I also tried to remove reset+fuseload then calibration not
> working
> > anymore for 0x0903. It seems it is a part for calibration
> (same pdf
> > file for reset _and_ calibration or .... reset _then_
> calibration?).
> >
> > https://github.com/sbechet/elanfp
> >
> > Konata and timo, can you give us width, height, firmware
> version and
> > calibration status using elanfp.c please?
>
>
> >
> >
> >
> > Le jeudi 18 janvier 2018 à 14:02 +0000, Igor Filatov a écrit :
> >>> square and seems to contain the image 3 times
> >> Could be because convert is hardcoded at 96x96.
> >>
> >> On Thu, 18 Jan 2018, 12:04 Hans de Goede,
> <hdegoede at redhat.com <mailto:hdegoede at redhat.com>>
> >> wrote:
> >>> Hi,
> >>>
> >>> On 18-01-18 10:48, Sébastien Béchet wrote:
> >>>> On 17-01-18 19:21, Igor Filatov wrote:
> >>>>> We didn't have the spec before so I had no idea how
> different
> >>> devices worked. Especially given that some commands which
> worked
> >>> fine for me produced errors one other devices. Now that we
> have the
> >>> docs I'll work on adapting the driver. Naturally, any info
> you have
> >>> is welcome and so is any help with testing.
> >>>>
> >>>> I have done the
> [synthesis](https://github.com/sbechet/elanfp/blo
> >>> b/master/README.md) about all informations we have a prepare
> >>> questions for KT.
> >>>
> >>> My 0x0c16 id reader has firmware version 1.56, resolution
> 96x96
> >>>
> >>> I also have bought a stand-alone USB reader for when I
> would find
> >>> time to work on this, this has an usb-id of: 0x0c26.
> >>>
> >>> After aking these changes:
> >>>
> >>> --- elanfp.c~ 2018-01-18 10:58:59.919912347 +0100
> >>> +++ elanfp.c 2018-01-18 11:01:50.346280668 +0100
> >>> @@ -71,7 +71,8 @@
> >>> (desc.idVendor == 0x04f3) && (desc.idProduct ==
> >>> 0x0903) ||
> >>> (desc.idVendor == 0x04f3) && (desc.idProduct ==
> >>> 0x0907) ||
> >>> (desc.idVendor == 0x04f3) && (desc.idProduct ==
> >>> 0x0c03) ||
> >>> - (desc.idVendor == 0x04f3) && (desc.idProduct ==
> >>> 0x0c16) ) {
> >>> + (desc.idVendor == 0x04f3) && (desc.idProduct ==
> >>> 0x0c16) ||
> >>> + (desc.idVendor == 0x04f3) && (desc.idProduct ==
> >>> 0x0c26) ) {
> >>> r0 = 0;
> >>> printf("Device with vid %x pid %x found.\n",
> >>> desc.idVendor, desc.idProduct);
> >>> break;
> >>> @@ -156,7 +157,7 @@
> >>> printf("CMD Get Image Size sent\n");
> >>> }
> >>> r0 = libusb_bulk_transfer(handle, BULK_EP3_IN,
> img_buf, 4,
> >>> &transferred, 0);
> >>> - printf("Width x height = %dx%d\n", img_buf[0],
> img_buf[2]);
> >>> + printf("Width x height = %dx%d\n", (unsigned
> char)img_buf[0],
> >>> (unsigned char)img_buf[2]);
> >>>
> >>> /* calibration */
> >>>
> >>> @@ -180,6 +181,7 @@
> >>> }
> >>> r0 = libusb_bulk_transfer(handle, BULK_EP3_IN,
> &result,
> >>> 1, &transferred, 0);
> >>> printf("Calibration Status: 0x%x\n", result);
> >>> + if (result == 0x03) break;
> >>>
> >>> r0 = libusb_bulk_transfer(handle, BULK_EP1_OUT,
> >>> get_cmd_status, 2, &transferred, 0);
> >>> if((r0 == 0) && (transferred == 2)) {
> >>>
> >>> This one works with the POC too, although for some reason the
> >>> generated out.png is square and seems to contain the image
> 3 times?
> >>>
> >>> This one has firmware version 1.64, resolution 64x144 and
> as shown
> >>> in the necessary changes this one does report a
> calibration status
> >>> of 0x03 when it is done with the calibration, I think we
> should add
> >>> an extra column for this to the hardware report table.
> >>>
> >>> Regards,
> >>>
> >>> Hans
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/fprint/attachments/20180127/287c905a/attachment-0001.html>
More information about the fprint
mailing list