thinkfinger-tools acquire fails on usb_bulk_read error

Bug #214404 reported by Avi Schwartz
40
This bug affects 3 people
Affects Status Importance Assigned to Milestone
thinkfinger (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Hardy:

Attempting to register a finger print with this tool fails with the following error:

Warning: usb_bulk_read expected to read 0x40 (read 0x20 bytes)

The number of bytes read changes every run.

After the error is displayed the program seems to do nothing and has to be killed with a Ctrl-C.

This is on a Dell XPS M1330.
The biometric device is:

ID 0483:2016 SGS Thomson Microelectronics Fingerprint Reader

Here is a log of a registration session:

$ tf-tool --acquire --verbose

ThinkFinger 0.3 (http://thinkfinger.sourceforge.net/)
Copyright (C) 2006, 2007 Timo Hoenig <email address hidden>

Running in verbose mode.

* Mode: acquire
* Biometric identification record file: '/home/avi/.thinkfinger.bir'

Initializing... done.
tf-tool: TF_STATE_SWIPE_0 (0x02)
Please swipe your finger (successful swipes 0/3, failed swipes: 0)...tf-tool: TF_STATE_SWIPE_SUCCESS (0x05)
Please swipe your finger (successful swipes 1/3, failed swipes: 0)...tf-tool: TF_STATE_SWIPE_1 (0x03)
tf-tool: TF_STATE_SWIPE_SUCCESS (0x05)
Please swipe your finger (successful swipes 2/3, failed swipes: 0)...tf-tool: TF_STATE_SWIPE_2 (0x04)
tf-tool: TF_STATE_SWIPE_FAILED (0x06)
Please swipe your finger (successful swipes 2/3, failed swipes: 1)...tf-tool: TF_STATE_SWIPE_2 (0x04)
tf-tool: TF_STATE_SWIPE_FAILED (0x06)
Please swipe your finger (successful swipes 2/3, failed swipes: 2)...tf-tool: TF_STATE_SWIPE_2 (0x04)
tf-tool: TF_STATE_SWIPE_SUCCESS (0x05)
Please swipe your finger (successful swipes 3/3, failed swipes: 2)...tf-tool: TF_STATE_ENROLL_SUCCESS (0x07)
Please swipe your finger (successful swipes 3/3, failed swipes: 2)... done.
Storing data (/home/avi/.thinkfinger.bir)...Warning: usb_bulk_read expected to read 0x40 (read 0x20 bytes).

Revision history for this message
Carlos Hellin (carloshellin) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. This bug did not have a package associated with it, which is important for ensuring that it gets looked at by the proper developers. You can learn more about finding the right package at https://wiki.ubuntu.com/Bugs/FindRightPackage . I have classified this bug as a bug in thinkfinger.

Revision history for this message
Avi Schwartz (le-avion) wrote :

With today's update the final message changed and it is now received immediately:

Storing data (/home/avi/.thinkfinger.bir)...tf-tool: TF_STATE_COMM_FAILED (0xfe)
Could not acquire fingerprint (communication with fingerprint reader failed).

Revision history for this message
Aleksander Blomskøld (aleksabl) wrote :

Same problem here on a Lenovo Thinkpad T61p, with the same reader:
Bus 001 Device 004: ID 0483:2016 SGS Thomson Microelectronics Fingerprint Reader

Revision history for this message
Jingo (mudler) wrote :

Same behaviour on Thinkpad T43 with:
Bus 003 Device 002: ID 0483:2016 SGS Thomson Microelectronics Fingerprint Reader

I've also noticed it sometimes says (read 0x20 bytes) but some other times has said (read 0x1c bytes). Not that this minor variation changes the behaviour any as far as I can tell.

Revision history for this message
Thorsten Bonck (bonck-deactivatedaccount) wrote :

I'm also using a Thinkpad T61p, the reader is a
Bus 001 Device 003: ID 0483:2016 SGS Thomson Microelectronics Fingerprint Reader
like above.

As far as I can tell, the upstream author is not informed of this report here in launchpad.

Revision history for this message
Matthias Gutmann (matthiasgutmann) wrote :

Same problem here on a Lenovo Thinkpad T61p, with the same reader:
Bus 001 Device 003: ID 0483:2016 SGS Thomson Microelectronics Fingerprint Reader

Revision history for this message
clx (ubuntu-clez) wrote :

My device:
Bus 003 Device 002: ID 0483:2016 SGS Thomson Microelectronics Fingerprint Reader

My problem:
Warning: usb_bulk_read expected to read 0x40 (read 0x%x bytes).
(where %x is the number of bytes it actually got)

My assumption:
It's about the speed, not about having too few data.

My solution:
The error is thrown by libthinkfinger.so.0 in function _libthinkfinger_usb_read, where it uses USB_TIMEOUT for usb_bulk_read.
It is defined at the top of libthinkfinger/libthinkfinger.c

@@ -35,7 +35,7 @@

 #define USB_PRODUCT_ID 0x2016
-#define USB_TIMEOUT 5000
+#define USB_TIMEOUT 25000
 #define USB_WR_EP 0x02

Give it some extra time, recompile (default prefix for the sf.net sources is /usr/local/, maybe you'll need --prefix=/usr for Ubuntu), sudo make install and it works.

... at least for me.

Changed in thinkfinger:
status: New → Confirmed
Revision history for this message
Matthias Gutmann (matthiasgutmann) wrote :

@clx:
No chance here. :(

Revision history for this message
avenger (bole-chen) wrote :

try

sudo modprobe uinput

Revision history for this message
joel maizi (joel-maizi) wrote :

Went through the same problem today. But when I swipe with the tip of my finger it works. Is there a problem with the amount of information (surface) submitted ? I've tried it several times with the same result.
Works with the tip but not when the finger is swiped flat on the reader...
Hope this can help.

Revision history for this message
Elliot Foster (elliotf-deactivatedaccount) wrote :

I can confirm that the "use the tip of the finger" solution works. Thanks very much to joel.

Revision history for this message
Harri (harald-dunkel) wrote :

The fingertip solution does not work for me. But after killing hal (/etc/init.d/hal stop) it seems to work better. A few times I got an error "Undefined error occured (0x0b)", though.

This is 8.10.

Revision history for this message
Harri (harald-dunkel) wrote :

PS: Hardware is a Dell XPS M1330, the fingerprint reader is a SGS Thomson Microelectronics Fingerprint Reader.

Revision history for this message
Thomas Pani (thomas-pani-gmail) wrote :

See upstream bug #12301:
http://bugzilla.kernel.org/show_bug.cgi?id=12301
http://kerneltrap.org/mailarchive/linux-usb/2008/12/28/4502304

You'll need both the kernel patch and the thinkfinger patch (19606), otherwise thinkfinger is really slow.

Revision history for this message
stecklum (stecklum) wrote :

Folks, the fingerprint reader worked fine using the middle finger on my M1330 until today. All of a sudden, the usb_bulk_read error appeared. Updating the relevant debs from the PPA of Jon Oberheide did not cure the problem. Then I only used the fingertip of the index finger as joel suggested and got it working again!

Revision history for this message
~sajith (sajith) wrote :

Thanks Joel!
I had the both "usb_bulk_read" and "timeout" roblems.
But finger tip trick worked for me.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.