Hi,<div><br></div><div>It should be libusb.h. I was working on libfprint-0.0.6 and got it working there. And I changed it to libfprint-0.4.0 by just replacing the usb_bulk_write and usb_bulk_read to libusb_bulk_transfer. I did remove some redundant parts in the driver source file. </div>
<div><br></div><div>As for the following part which has been commented:</div><div><br></div><div><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
@@ -102,6 +108,7 @@ done<br> AM_CONDITIONAL([ENABLE_UPEKTS]<u></u>, [test &quot;$enable_upekts&quot; = &quot;yes&quot;])<br> AM_CONDITIONAL([ENABLE_UPEKE2]<u></u>, [test &quot;$enable_upeke2&quot; = &quot;yes&quot;])<br> #AM_CONDITIONAL([ENABLE_<u></u>UPEKTC], [test &quot;$enable_upektc&quot; = &quot;yes&quot;])<br>
+#AM_CONDITIONAL([ENABLE_<u></u>UPEKET], [test &quot;$enable_upeket&quot; = &quot;yes&quot;])<br></blockquote><div><br></div><div>and</div><div><br></div><div class="im"><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
 #DRIVER_SRC += $(UPEKTC_SRC)</blockquote></div><div class="im"><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
 #endif<br>+#if ENABLE_UPEKET<br>+#DRIVER_SRC += $(UPEKET_SRC)<br></blockquote><div>  +#endif</div>  +<br>    if ENABLE_URU4000<br>    DRIVER_SRC += $(URU4000_SRC)<br>    endif</div><div class="im"><br></div><div class="im">
The eikon touch 300 scanner is like upek touchchip scanner. So I just follow the upektc statement in fp_internal.h, Makefile.am, and <a href="http://configure.ac">configure.ac</a></div><div class="im"><br></div><div class="im">
The syntax is int libusb_bulk_transfer (struct libusb_device_handle *dev_handle, unsigned char endpoint, unsigned char *data, int length, int *transferred, unsigned int timeout).</div><div class="im"><br></div><div class="im">
Here it is used as libusb_bulk_transfer(dev-&gt;<u></u>udev, &amp;msg1, &amp;transferred, 1003);</div><div class="im"> And the msg1 is defined as:</div><div class="im"><br></div><div class="im"><div class="im">struct libusb_bulk_transfer msg1 = {</div>
<div class="im"><span class="Apple-tab-span" style="white-space:pre">                </span>.endpoint = 2,</div><div class="im"><span class="Apple-tab-span" style="white-space:pre">                </span>.data = pnRawString,</div><div class="im"><span class="Apple-tab-span" style="white-space:pre">                </span>.length = 0x40,</div>
<div class="im"><span class="Apple-tab-span" style="white-space:pre">        </span>};</div></div><div class="im"><br></div><div>I was unaware the upektc.c is obsolete with libfprint-0.4.0. Thank you for the info. Actually I was hoping it could work well with libfprint-0.4.0. If thats the case I have to start testing the upeket.c with libfprint-0.4.0. Thank you for pointing me out.  I did not change to libfprint-0.4.0 cause I have my programs written based on libfprint-0.0.6 and easier for me do the testing. Will post the diff once got it working with libfprint-0.4.0</div>
<div><br></div><div>P.S: Bastian, please do not apply the patch first. Have to do some testing first. Sorry for the trouble. Thank you.</div><div><br></div><div>Regards,</div><div>Moganesh</div><div>  </div><div><br></div>
<div class="gmail_quote">On Thu, Jan 26, 2012 at 2:31 AM, Patrick Marlier <span dir="ltr">&lt;<a href="mailto:patrick.marlier@gmail.com">patrick.marlier@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On 01/24/2012 01:31 PM, MOGANESHWARAN RAJASEGARAN wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Thank you for the guide in creating the unified diff. I hope this is<br>
correct.<br>
</blockquote>
<br></div>
The diff seems ok (weird http://?) and thanks for sharing your work and contributing.<br>
<br>
Main general concerns from my point of view (even if I am not either the owner of such device and either a libfprint developer): our driver is based on upektc which is obsolete AFAIU and make your driver obsolete too... Did you manage to get it work with the current libfprint (0.4)?<br>

<br>
libfprint maintainers/developers, do not hesitate to correct me if I am wrong.<br>
<br>
I don&#39;t know a lot of libfprint/libusb but some comments are inlined (mainly related to obsolete functions):<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
@@ -102,6 +108,7 @@ done<br>
  AM_CONDITIONAL([ENABLE_UPEKTS]<u></u>, [test &quot;$enable_upekts&quot; = &quot;yes&quot;])<br>
  AM_CONDITIONAL([ENABLE_UPEKE2]<u></u>, [test &quot;$enable_upeke2&quot; = &quot;yes&quot;])<br>
  #AM_CONDITIONAL([ENABLE_<u></u>UPEKTC], [test &quot;$enable_upektc&quot; = &quot;yes&quot;])<br>
+#AM_CONDITIONAL([ENABLE_<u></u>UPEKET], [test &quot;$enable_upeket&quot; = &quot;yes&quot;])<br>
</blockquote>
<br></div>
Why there is a # here? you don&#39;t want your driver to be enabled?<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  AM_CONDITIONAL([ENABLE_<u></u>UPEKSONLY], [test &quot;$enable_upeksonly&quot; = &quot;yes&quot;])<br>
  AM_CONDITIONAL([ENABLE_VCOM5S]<u></u>, [test &quot;$enable_vcom5s&quot; = &quot;yes&quot;])<br>
  AM_CONDITIONAL([ENABLE_<u></u>URU4000], [test &quot;$enable_uru4000&quot; = &quot;yes&quot;])<br>
</blockquote>
<br>
</div><div class="im"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
@@ -100,6 +102,10 @@ endif<br>
  #DRIVER_SRC += $(UPEKTC_SRC)<br>
  #endif<br>
+#if ENABLE_UPEKET<br>
+#DRIVER_SRC += $(UPEKET_SRC)<br>
</blockquote>
<br></div>
Again here?<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
+#endif<br>
+<br>
  if ENABLE_URU4000<br>
  DRIVER_SRC += $(URU4000_SRC)<br>
  endif<br>
diff --git a/libfprint/drivers/upeket.c b/libfprint/drivers/upeket.c<br>
new file mode 100644<br>
index 0000000..e5c12d2<br>
--- /dev/null<br>
+++ b/libfprint/drivers/upeket.c<br>
@@ -0,0 +1,720 @@<br>
+/*<br>
+ * Copyright (C) 2012 Moganeshwaran Rajasegaran<br></div>
&lt;<a href="mailto:moganeshwaran@gmail.com" target="_blank">moganeshwaran@gmail.com</a> &lt;mailto:<a href="mailto:moganeshwaran@gmail.com" target="_blank">moganeshwaran@gmail.<u></u>com</a>&gt;&gt;<div class="im"><br>
+ * UPEK EikonTouch300 driver for libfprint<br>
+<br>
+ * Heavily based on UPEK TouchChip driver for libfprint<br>
+ * Copyright (C) 2007 Jan-Michael Brummer &lt;<a href="mailto:buzz2@gmx.de" target="_blank">buzz2@gmx.de</a><br></div>
&lt;mailto:<a href="mailto:buzz2@gmx.de" target="_blank">buzz2@gmx.de</a>&gt;&gt;<div class="im"><br>
+ *<br>
+ * This library is free software; you can redistribute it and/or<br>
+ * modify it under the terms of the GNU Lesser General Public<br>
+ * License as published by the Free Software Foundation; either<br>
+ * version 2.1 of the License, or (at your option) any later version.<br>
+ *<br>
+ * This library is distributed in the hope that it will be useful,<br>
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of<br>
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU<br>
+ * Lesser General Public License for more details.<br>
+ *<br>
+ * You should have received a copy of the GNU Lesser General Public<br>
+ * License along with this library; if not, write to the Free Software<br>
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA<br>
02110-1301 USA<br>
+ */<br>
+<br>
+#define FP_COMPONENT &quot;upeket&quot;<br>
+<br>
+#include &lt;errno.h&gt;<br>
+#include &lt;string.h&gt;<br>
+<br>
+#include &lt;glib.h&gt;<br>
+#include &lt;usb.h&gt;<br>
</div></blockquote>
<br>
usb.h ? which version of libusb do you use? I pretty sure it should be libusb.h<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
+<br>
+#include &lt;fp_internal.h&gt;<br>
+<br>
+#define SENSOR_FULL_IMAGE59904<br>
+#define WAIT_COUNT5<br>
+<br>
+typedef char sint8;<br>
+typedef unsigned char uint8;<br>
+typedef int sint32;<br>
+typedef unsigned int uint32;<br>
+<br>
+/** scan command */<br>
+static const unsigned char anScanCommand[ 0x40 ] = {<br></div>
+0x0e, 0x00, 0x03, 0xa8, 0x00, 0xb6, 0xbb, 0xbb,<br>
+0xb8, 0xb7, 0xb8, 0xb5, 0xb8, 0xb9, 0xb8, 0xb9,<br>
+0xbb, 0xbb, 0xbe, 0xbb, 0x4e, 0x16, 0xf4, 0x77,<br>
+0xa8, 0x07, 0x32, 0x00, 0x6a, 0x16, 0xf4, 0x77,<br>
+0x78, 0x24, 0x61, 0x00, 0xc8, 0x00, 0xec, 0x00,<br>
+0x01, 0x00, 0x00, 0x00, 0x3c, 0xf3, 0x2f, 0x01,<br>
+0x05, 0x90, 0xf6, 0x77, 0x84, 0xf5, 0x2f, 0x01,<br>
+0x05, 0x90, 0xf6, 0x00, 0xc8, 0x00, 0xec, 0x00<div><div class="h5"><br>
+};<br>
+<br>
+<br>
+/**<br>
+ * \brief Common interaktion routine for the sensor device<br>
+ * \param dev fingerprint image device pointer<br>
+ * \param pnRawString raw data string<br>
+ * \param nLen length we want to read, if 0 do not read at all<br>
+ * \param pnBuffer buffer pointer we want to store the read buffer<br>
+ * \return error code<br>
+ */<br>
+static sint32 askScanner( struct fp_img_dev *dev, const unsigned char<br>
*pnRawString, sint32 nLen, sint8 *pnBuffer ) {<br>
+    sint8 anBuf[ 65535 ];<br>
+sint32 nRet;<br>
+int transferred;<br>
+struct libusb_bulk_transfer msg1 = {<br>
+.endpoint = 2,<br>
+.data = pnRawString,<br>
+.length = 0x40,<br>
+};<br>
+struct libusb_bulk_transfer msg2 = {<br>
+.endpoint = 0x81,<br>
+.data = anBuf,<br>
+.length = nLen,<br>
+};<br>
+<br></div></div>
+nRet = libusb_bulk_transfer(dev-&gt;<u></u>udev, &amp;msg1, &amp;transferred, 1003);<br>
</blockquote>
<br>
Humm.. Seems a odd libusb version. The definition I have is this one for libusb 1.0 (AFAIK current version used in libfprint):<br>
<br>
int libusb_bulk_transfer (struct libusb_device_handle *dev_handle, unsigned char endpoint, unsigned char *data, int length, int *transferred, unsigned int timeout)<span class="HOEnZb"><font color="#888888"><br>
<br>
--<br>
Patrick Marlier.<br>
</font></span></blockquote></div><br></div>