Bugzilla – Bug 133978
libusb: invalid or incomplete multibyte or wide character
Last modified: 2005-12-09 12:47:48 UTC
Then trying to use an CCID compatible USB card reader with openct or pkcs-lite on suse linux 10.0 or 9.3 one only gets this error then trying to read from the card. usb_bulk failed: Invalid or incomplete multibyte or wide character This can be fixed by replacing the shipped libusb version with a self compiled one (latest version) .. at least when skipping the resmgr patch. I did not had the time to port that patch to the latest version, so i could not test with it.
you mean libusb-1.0 will fix it? or did you compile libusb-0.1.10a without additional patches?
Well i updated to a self compiled (unpatched) libusb 0.1.10a on my 9.3 system. As 10.0 already ships with libusb 0.1.10a it seems like something inside the resmgr patch breaks this. I am going to attach the spec file i used to build a new libusb rpm for my 9.3 system. When installing that one, it works (though no resmgr support inside).
Created attachment 57501 [details] spec file to build a libusb 0.10.a rpm without resmgr patch
so you are seeing the error on 9.3 and 10.0 with the provided libusb. a selfcompiled version 0.1.10a without patches works always. can you try without the libusb-pointer-signedness.patch? and leave all others applied? I somehow doubt resmgr changes anything.
I also do not find this message in the sources: 'Invalid or incomplete multibyte or wide character'
Well all i can tell you is that when i am using pcscd driver to read certificates from a smartcard and having installed the shipped libusb version (either in 9.3 or 10.0) i get that error logged to syslog. When replacing the shipped libusb with a selfcompiled one (without patches) it works (going to check what happens when only skipping the signedness patch on 10.0 now). Though i was not able to get rid of this error when using openct instead of pcsc-lite no matter if i replace libusb or not.
Correction: pcsc-lite usb access seems to work on 10.0 with alle the libusb patches inside. At least it does now. On 10.0 only the problem with openct ist left.
'Invalid or incomplete multibyte or wide character' comes directly from glibc.
openct-0.6.2/src/ifd/sys-linux.c:ifd_sysdep_usb_bulk prints this message. The ioctl gets -EILSEQ from the kernel. can you attach the strace -fs 999 -o trace.txt openct output?
lsusb output: Bus 001 Device 005: ID 04e6:e003 SCM Microsystems, Inc. SPR532 PinPad SmartCard Reader Bus 001 Device 001: ID 0000:0000 # strace -fs 999 -o trace.txt /usr/sbin/ifdhandler -F -H ccid /proc/bus/usb/001/005 Debug: skipped 1 class/vendor specific interface descriptors Error: usb_bulk failed: Invalid or incomplete multibyte or wide character going to attach the strace output from the start of idhandler until i ran "pkcs15-tool -c" which results in the upper error message on the ifdhandler console.
Created attachment 57929 [details] strace output of idhandler when running pkcs15-tool -c
Releases after 10.0 do not use resmgr anymore.