<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<id>tag:old.nabble.com,2006:forum-14231</id>
	<title>Nabble - LibUSB</title>
	<updated>2009-12-17T14:35:53Z</updated>
	<link rel="self" type="application/atom+xml" href="http://old.nabble.com/LibUSB-f14231.xml" />
	<link rel="alternate" type="text/html" href="http://old.nabble.com/LibUSB-f14231.html" />
	<subtitle type="html"></subtitle>
	
<entry>
	<id>tag:old.nabble.com,2006:post-26836277</id>
	<title>Re: Darwin, multiple contexts and global variables</title>
	<published>2009-12-17T14:35:53Z</published>
	<updated>2009-12-17T14:35:53Z</updated>
	<author>
		<name>Nathan Hjelm</name>
	</author>
	<content type="html">&lt;HTML&gt;
&lt;HEAD&gt;
&lt;META http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=UTF-8&quot;&gt;
&lt;/HEAD&gt;
&lt;BODY&gt;
&lt;PRE style=&quot;color: #000000; font-family: Arial, sans-serif; font-size: 13px; line-height: 16px; margin: 0px; padding: 0px; background:#ffffff; white-space : pre-wrap; &quot;&gt;Classify this as an oops. Like multiple opens I never tested (or thought about) multiple contexts. Those variables should not be tied to any context and I will provide the fix later today.

-Nathan
 
On Thursday, December 17, 2009, at 03:21PM, &quot;Orin Eman&quot; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26836277&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;orin.eman@...&lt;/a&gt;&amp;gt; wrote:
&amp;gt;------------------------------------------------------------------------------
&amp;gt;This SF.Net email is sponsored by the Verizon Developer Community
&amp;gt;Take advantage of Verizon's best-in-class app development support
&amp;gt;A streamlined, 14 day to market process makes app distribution fast and easy
&amp;gt;Join now and get one step closer to millions of Verizon customers
&amp;gt;http://p.sf.net/sfu/verizon-dev2dev 
&amp;gt;_______________________________________________
&amp;gt;Libusb-devel mailing list
&amp;gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26836277&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Libusb-devel@...&lt;/a&gt;
&amp;gt;https://lists.sourceforge.net/lists/listinfo/libusb-devel
&amp;gt;
&amp;gt;&lt;/PRE&gt;
&lt;DIV align=&quot;left&quot; style=&quot;margin-left:10px;&quot;&gt;
&lt;DIV&gt;
&lt;DIV&gt;Needless to say, it doesn't work.&amp;nbsp; Not that I was trying to do it deliberately, but my existing code called libusb_init() for a new context before libusb_exit() for a previous context had been called and/or had&amp;nbsp;returned (a usage-counted object that was &quot;Release'd&quot; but not actually deleted until all&amp;nbsp;the&amp;nbsp;threads it had created exited).&lt;/DIV&gt;


&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;

&lt;DIV&gt;The problem is that the Darwin backend uses three global variables:&lt;/DIV&gt;

&lt;DIV&gt;
&lt;FONT size=&quot;2&quot;&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;

&lt;DIV&gt;
&lt;FONT size=&quot;2&quot;&gt;libusb_darwin_acfl, &lt;FONT size=&quot;2&quot;&gt;libusb_darwin_mp and &lt;FONT size=&quot;2&quot;&gt;libusb_darwin_at.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;
&lt;/DIV&gt;

&lt;DIV&gt;
&lt;FONT size=&quot;2&quot;&gt;&lt;FONT size=&quot;2&quot;&gt;&lt;FONT size=&quot;2&quot;&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;

&lt;DIV&gt;
&lt;FONT size=&quot;2&quot;&gt;&lt;FONT size=&quot;2&quot;&gt;&lt;FONT size=&quot;2&quot;&gt;A second or subsequent call&amp;nbsp;to libusb_init() without an intervening libusb_exit() will overwrite these variables with varying results depending on timing - usually a &lt;FONT size=&quot;2&quot;&gt;LIBUSB_ERROR_INVALID_PARAM error from libusb_get_device_list()&amp;nbsp;due to &lt;FONT size=&quot;2&quot;&gt;libusb_darwin_mp being NULL &lt;/FONT&gt;or a &lt;/FONT&gt;bus error due to libusb_darwin_acfl being NULL in the call to &lt;FONT size=&quot;2&quot;&gt;CFRunLoopStop() some time later&lt;/FONT&gt;.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;
&lt;/DIV&gt;


&lt;DIV&gt;
&lt;FONT size=&quot;2&quot;&gt;&lt;FONT size=&quot;2&quot;&gt;&lt;FONT size=&quot;2&quot;&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;

&lt;DIV&gt;
&lt;FONT size=&quot;2&quot;&gt;&lt;FONT size=&quot;2&quot;&gt;&lt;FONT size=&quot;2&quot;&gt;It seems to me that these variables should be in the libusb_context structure... but that wouldn't work as the context isn't passed to darwin_exit() and there is currenly no support for backend private data in the context structure.&amp;nbsp;&amp;nbsp;Perhaps&amp;nbsp;the context structure&amp;nbsp;should allow backend private data and be passed to the backend exit function.&amp;nbsp;&amp;nbsp;Currently,&amp;nbsp;the lack of passing the context structure precludes use of logging in the backend exit functions at least.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;
&lt;/DIV&gt;


&lt;DIV&gt;
&lt;FONT size=&quot;2&quot;&gt;&lt;FONT size=&quot;2&quot;&gt;&lt;FONT size=&quot;2&quot;&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;

&lt;DIV&gt;
&lt;FONT size=&quot;2&quot;&gt;&lt;FONT size=&quot;2&quot;&gt;&lt;FONT size=&quot;2&quot;&gt;If these variables cannot be moved to context structure, then they need protecting.&amp;nbsp; At the least, a re-entrancy flag would do the trick with darwin_init() returning &lt;FONT size=&quot;2&quot;&gt;LIBUSB_ERROR_BUSY if these variables are in use.&amp;nbsp; Certainly, my problems are much reduced by such a re-entrancy flag, though I put it in libusb_init() for test purposes.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;
&lt;/DIV&gt;


&lt;DIV&gt;
&lt;FONT size=&quot;2&quot;&gt;&lt;FONT size=&quot;2&quot;&gt;&lt;FONT size=&quot;2&quot;&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;

&lt;DIV&gt;
&lt;FONT size=&quot;2&quot;&gt;&lt;FONT size=&quot;2&quot;&gt;&lt;FONT size=&quot;2&quot;&gt;Orin.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;
&lt;/DIV&gt;

&lt;DIV&gt;
&lt;FONT size=&quot;2&quot;&gt;&lt;FONT size=&quot;2&quot;&gt;&lt;FONT size=&quot;2&quot;&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/BODY&gt;
&lt;/HTML&gt;
&lt;br /&gt;------------------------------------------------------------------------------
&lt;br&gt;This SF.Net email is sponsored by the Verizon Developer Community
&lt;br&gt;Take advantage of Verizon's best-in-class app development support
&lt;br&gt;A streamlined, 14 day to market process makes app distribution fast and easy
&lt;br&gt;Join now and get one step closer to millions of Verizon customers
&lt;br&gt;&lt;a href=&quot;http://p.sf.net/sfu/verizon-dev2dev&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/verizon-dev2dev&lt;/a&gt;&amp;nbsp;&lt;br /&gt;_______________________________________________
&lt;br&gt;Libusb-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26836277&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Libusb-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/libusb-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/libusb-devel&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/LibUSB-Dev-f14232.html&quot; embed=&quot;fixTarget[14232]&quot; target=&quot;_top&quot; &gt;LibUSB Dev&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Darwin%2C-multiple-contexts-and-global-variables-tp26836095p26836277.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26836095</id>
	<title>Darwin, multiple contexts and global variables</title>
	<published>2009-12-17T14:21:51Z</published>
	<updated>2009-12-17T14:21:51Z</updated>
	<author>
		<name>Orin Eman</name>
	</author>
	<content type="html">&lt;div&gt;Needless to say, it doesn&amp;#39;t work.  Not that I was trying to do it deliberately, but my existing code called libusb_init() for a new context before libusb_exit() for a previous context had been called and/or had returned (a usage-counted object that was &amp;quot;Release&amp;#39;d&amp;quot; but not actually deleted until all the threads it had created exited).&lt;/div&gt;

&lt;div&gt; &lt;/div&gt;
&lt;div&gt;The problem is that the Darwin backend uses three global variables:&lt;/div&gt;
&lt;div&gt;&lt;font size=&quot;2&quot;&gt;&lt;/font&gt; &lt;/div&gt;
&lt;div&gt;&lt;font size=&quot;2&quot;&gt;libusb_darwin_acfl, &lt;font size=&quot;2&quot;&gt;libusb_darwin_mp and &lt;font size=&quot;2&quot;&gt;libusb_darwin_at.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font size=&quot;2&quot;&gt;&lt;font size=&quot;2&quot;&gt;&lt;font size=&quot;2&quot;&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt; &lt;/div&gt;
&lt;div&gt;&lt;font size=&quot;2&quot;&gt;&lt;font size=&quot;2&quot;&gt;&lt;font size=&quot;2&quot;&gt;A second or subsequent call to libusb_init() without an intervening libusb_exit() will overwrite these variables with varying results depending on timing - usually a &lt;font size=&quot;2&quot;&gt;LIBUSB_ERROR_INVALID_PARAM error from libusb_get_device_list() due to &lt;font size=&quot;2&quot;&gt;libusb_darwin_mp being NULL &lt;/font&gt;or a &lt;/font&gt;bus error due to libusb_darwin_acfl being NULL in the call to &lt;font size=&quot;2&quot;&gt;CFRunLoopStop() some time later&lt;/font&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;

&lt;div&gt;&lt;font size=&quot;2&quot;&gt;&lt;font size=&quot;2&quot;&gt;&lt;font size=&quot;2&quot;&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt; &lt;/div&gt;
&lt;div&gt;&lt;font size=&quot;2&quot;&gt;&lt;font size=&quot;2&quot;&gt;&lt;font size=&quot;2&quot;&gt;It seems to me that these variables should be in the libusb_context structure... but that wouldn&amp;#39;t work as the context isn&amp;#39;t passed to darwin_exit() and there is currenly no support for backend private data in the context structure.  Perhaps the context structure should allow backend private data and be passed to the backend exit function.  Currently, the lack of passing the context structure precludes use of logging in the backend exit functions at least.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;

&lt;div&gt;&lt;font size=&quot;2&quot;&gt;&lt;font size=&quot;2&quot;&gt;&lt;font size=&quot;2&quot;&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt; &lt;/div&gt;
&lt;div&gt;&lt;font size=&quot;2&quot;&gt;&lt;font size=&quot;2&quot;&gt;&lt;font size=&quot;2&quot;&gt;If these variables cannot be moved to context structure, then they need protecting.  At the least, a re-entrancy flag would do the trick with darwin_init() returning &lt;font size=&quot;2&quot;&gt;LIBUSB_ERROR_BUSY if these variables are in use.  Certainly, my problems are much reduced by such a re-entrancy flag, though I put it in libusb_init() for test purposes.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;

&lt;div&gt;&lt;font size=&quot;2&quot;&gt;&lt;font size=&quot;2&quot;&gt;&lt;font size=&quot;2&quot;&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt; &lt;/div&gt;
&lt;div&gt;&lt;font size=&quot;2&quot;&gt;&lt;font size=&quot;2&quot;&gt;&lt;font size=&quot;2&quot;&gt;Orin.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font size=&quot;2&quot;&gt;&lt;font size=&quot;2&quot;&gt;&lt;font size=&quot;2&quot;&gt; &lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;
&lt;br /&gt;------------------------------------------------------------------------------
&lt;br&gt;This SF.Net email is sponsored by the Verizon Developer Community
&lt;br&gt;Take advantage of Verizon's best-in-class app development support
&lt;br&gt;A streamlined, 14 day to market process makes app distribution fast and easy
&lt;br&gt;Join now and get one step closer to millions of Verizon customers
&lt;br&gt;&lt;a href=&quot;http://p.sf.net/sfu/verizon-dev2dev&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/verizon-dev2dev&lt;/a&gt;&amp;nbsp;&lt;br /&gt;_______________________________________________
&lt;br&gt;Libusb-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26836095&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Libusb-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/libusb-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/libusb-devel&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/LibUSB-Dev-f14232.html&quot; embed=&quot;fixTarget[14232]&quot; target=&quot;_top&quot; &gt;LibUSB Dev&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Darwin%2C-multiple-contexts-and-global-variables-tp26836095p26836095.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26835869</id>
	<title>Re: how to retrieve an usb mass storage serial number ?</title>
	<published>2009-12-17T14:01:27Z</published>
	<updated>2009-12-17T14:01:27Z</updated>
	<author>
		<name>Graeme Gill</name>
	</author>
	<content type="html">Tim Roberts wrote:
&lt;br&gt;&lt;br&gt;&amp;gt; You do realize that making a statement like this in a Linux/open source
&lt;br&gt;&amp;gt; environment relegates you to the 7th level of hell, right? &amp;nbsp;DRM is the
&lt;br&gt;&amp;gt; root of much of the evil in the computing world today. &amp;nbsp;DRM was the
&lt;br&gt;&amp;gt; underlying cause of virtually all of the issues that made Vista a disaster.
&lt;br&gt;&lt;br&gt;A desire to hamper unauthorized software duplication is understandable
&lt;br&gt;in the current internet environment when it comes to high value
&lt;br&gt;commercial software. If there are no reasonable mechanisms available
&lt;br&gt;for this, commercial software simply won't be available on Linux,
&lt;br&gt;and Linux will continue to be regarded as a bit of a toy for
&lt;br&gt;many people. (The distro. model of software deployment doesn't
&lt;br&gt;help this either.)
&lt;br&gt;&lt;br&gt;&amp;gt; Yes -- don't do it. &amp;nbsp;This kind of thing only stops the people who
&lt;br&gt;&amp;gt; wouldn't have copied the software anyway. &amp;nbsp;The hackers will crack your
&lt;br&gt;&amp;gt; scheme in a few minutes. &amp;nbsp;It's better just to save yourself the trouble.
&lt;br&gt;&lt;br&gt;You missed the other category of people, those who aren't so technically
&lt;br&gt;astute as to crack the software, but don't have the morals that would
&lt;br&gt;prevent them from making a copy for themselves and all their
&lt;br&gt;friends. While it's true that it's almost impossible to stop a technically
&lt;br&gt;inclined person cracking such a scheme, it can be useful in slowing down
&lt;br&gt;casual copying.
&lt;br&gt;&lt;br&gt;&amp;gt; Further, libusb is licensed under LGPL. &amp;nbsp;When you release a project that
&lt;br&gt;&amp;gt; uses libusb, you are obligated by law to follow certain procedures that
&lt;br&gt;&amp;gt; open up your application. &amp;nbsp;For example, you need to provide the ability
&lt;br&gt;&amp;gt; for others to build a version of your application that uses a slightly
&lt;br&gt;&amp;gt; different version of libusb. &amp;nbsp;You can't just suck up this software for
&lt;br&gt;&amp;gt; free and lock it up tight. &amp;nbsp;You need to read the LGPL (which is included
&lt;br&gt;&amp;gt; with the libusb source code) and understand exactly what you are
&lt;br&gt;&amp;gt; agreeing to.
&lt;br&gt;&lt;br&gt;This isn't exactly relevant. As long as the LGPL license terms are
&lt;br&gt;complied with (ie. linking it at run time and making the source available),
&lt;br&gt;it can be used as part of a copy protection mechanism.
&lt;br&gt;&lt;br&gt;Graeme Gill.
&lt;br&gt;&lt;br&gt;&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;This SF.Net email is sponsored by the Verizon Developer Community
&lt;br&gt;Take advantage of Verizon's best-in-class app development support
&lt;br&gt;A streamlined, 14 day to market process makes app distribution fast and easy
&lt;br&gt;Join now and get one step closer to millions of Verizon customers
&lt;br&gt;&lt;a href=&quot;http://p.sf.net/sfu/verizon-dev2dev&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/verizon-dev2dev&lt;/a&gt;&amp;nbsp;
&lt;br&gt;_______________________________________________
&lt;br&gt;Libusb-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26835869&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Libusb-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/libusb-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/libusb-devel&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/LibUSB-Dev-f14232.html&quot; embed=&quot;fixTarget[14232]&quot; target=&quot;_top&quot; &gt;LibUSB Dev&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/how-to-retrieve-an-usb-mass-storage-serial-number---tp26820272p26835869.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26832792</id>
	<title>Re: how to retrieve an usb mass storage serial number ?</title>
	<published>2009-12-17T10:28:54Z</published>
	<updated>2009-12-17T10:28:54Z</updated>
	<author>
		<name>Tim Roberts</name>
	</author>
	<content type="html">Benoit DECHERF wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; Feel free to explain more about what you want to accomplish - maybe
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; we can suggest a good solution. Without a good understanding of what
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; to do it's difficult to help. Maybe you have no option but creating a
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; small service running as root which can be used to ask for serial
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; numbers. I don't know...
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; Thanks, your explication help me a lot to understand my problem ;)
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; So, I'd like to reproduce the DRM process to protect files against
&lt;br&gt;&amp;gt; copying.
&lt;/div&gt;&lt;br&gt;You do realize that making a statement like this in a Linux/open source
&lt;br&gt;environment relegates you to the 7th level of hell, right? &amp;nbsp;DRM is the
&lt;br&gt;root of much of the evil in the computing world today. &amp;nbsp;DRM was the
&lt;br&gt;underlying cause of virtually all of the issues that made Vista a disaster.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;gt; I'm developping a software. The software can copy itself on an usb
&lt;br&gt;&amp;gt; drive for offline use. But I wan't to protect it from being copied
&lt;br&gt;&amp;gt; from the usb drive to another. So my idea was to encrypt a part of the
&lt;br&gt;&amp;gt; software with a specific ID of the USB drive (And the ID will be
&lt;br&gt;&amp;gt; serial number).
&lt;br&gt;&amp;gt; So the process to retrieve the serial number have to be cross
&lt;br&gt;&amp;gt; plateform (I'm developping the software in java).
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Is there a good solution of the problem ?
&lt;br&gt;&lt;br&gt;Yes -- don't do it. &amp;nbsp;This kind of thing only stops the people who
&lt;br&gt;wouldn't have copied the software anyway. &amp;nbsp;The hackers will crack your
&lt;br&gt;scheme in a few minutes. &amp;nbsp;It's better just to save yourself the trouble.
&lt;br&gt;&lt;br&gt;Further, libusb is licensed under LGPL. &amp;nbsp;When you release a project that
&lt;br&gt;uses libusb, you are obligated by law to follow certain procedures that
&lt;br&gt;open up your application. &amp;nbsp;For example, you need to provide the ability
&lt;br&gt;for others to build a version of your application that uses a slightly
&lt;br&gt;different version of libusb. &amp;nbsp;You can't just suck up this software for
&lt;br&gt;free and lock it up tight. &amp;nbsp;You need to read the LGPL (which is included
&lt;br&gt;with the libusb source code) and understand exactly what you are
&lt;br&gt;agreeing to.
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Tim Roberts, &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26832792&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;timr@...&lt;/a&gt;
&lt;br&gt;Providenza &amp; Boekelheide, Inc.
&lt;br&gt;&lt;br&gt;&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;This SF.Net email is sponsored by the Verizon Developer Community
&lt;br&gt;Take advantage of Verizon's best-in-class app development support
&lt;br&gt;A streamlined, 14 day to market process makes app distribution fast and easy
&lt;br&gt;Join now and get one step closer to millions of Verizon customers
&lt;br&gt;&lt;a href=&quot;http://p.sf.net/sfu/verizon-dev2dev&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/verizon-dev2dev&lt;/a&gt;&amp;nbsp;
&lt;br&gt;_______________________________________________
&lt;br&gt;Libusb-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26832792&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Libusb-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/libusb-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/libusb-devel&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/LibUSB-Dev-f14232.html&quot; embed=&quot;fixTarget[14232]&quot; target=&quot;_top&quot; &gt;LibUSB Dev&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/how-to-retrieve-an-usb-mass-storage-serial-number---tp26820272p26832792.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26830729</id>
	<title>Re: how to retrieve an usb mass storage serial number ?</title>
	<published>2009-12-17T08:21:47Z</published>
	<updated>2009-12-17T08:21:47Z</updated>
	<author>
		<name>Benoit DECHERF-3</name>
	</author>
	<content type="html"> 
&lt;br&gt;&lt;div class=&quot;gmail_quote&quot;&gt;&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot;&gt;Feel free to explain more about what you want to accomplish - maybe&lt;br&gt;

we can suggest a good solution. Without a good understanding of what&lt;br&gt;
to do it&amp;#39;s difficult to help. Maybe you have no option but creating a&lt;br&gt;
small service running as root which can be used to ask for serial&lt;br&gt;
numbers. I don&amp;#39;t know...&lt;br&gt;
&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;div class=&quot;h5&quot;&gt;&lt;br&gt;&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;div&gt; &lt;/div&gt;&lt;div&gt;Thanks, your explication help me a lot to understand my problem ;)&lt;br&gt;&lt;br&gt;So, I&amp;#39;d like to reproduce the DRM process to protect files against copying. &lt;br&gt;
&lt;br&gt;I&amp;#39;m developping a software. The software can copy itself on an usb drive for offline use. But I wan&amp;#39;t to protect it from being copied from the usb drive to another. So my idea was to encrypt a part of the software with a specific ID of the USB drive (And the ID will be serial number).&lt;br&gt;
So the process to retrieve the serial number have to be cross plateform (I&amp;#39;m developping the software in java). &lt;br&gt;&lt;br&gt;Is there a good solution of the problem ?&lt;br&gt;&lt;br&gt;&lt;br&gt;As a workaround, there are os specific solution:&lt;br&gt;
In windows, I don&amp;#39;t do any test yet, but I found some solution on internet to retrieve it. &lt;br&gt;In linux, there is the &amp;quot;Alan Stern&amp;quot; solution (but it&amp;#39;s probably dependent of the distribution, don&amp;#39;t it ? )&lt;br&gt;
In macosx, I still don&amp;#39;t have any idea :(&lt;br&gt;&lt;br&gt;&lt;/div&gt;&lt;/div&gt;&lt;br&gt;Benoit&lt;br&gt;
&lt;br /&gt;------------------------------------------------------------------------------
&lt;br&gt;This SF.Net email is sponsored by the Verizon Developer Community
&lt;br&gt;Take advantage of Verizon's best-in-class app development support
&lt;br&gt;A streamlined, 14 day to market process makes app distribution fast and easy
&lt;br&gt;Join now and get one step closer to millions of Verizon customers
&lt;br&gt;&lt;a href=&quot;http://p.sf.net/sfu/verizon-dev2dev&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/verizon-dev2dev&lt;/a&gt;&amp;nbsp;&lt;br /&gt;_______________________________________________
&lt;br&gt;Libusb-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26830729&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Libusb-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/libusb-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/libusb-devel&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/LibUSB-Dev-f14232.html&quot; embed=&quot;fixTarget[14232]&quot; target=&quot;_top&quot; &gt;LibUSB Dev&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/how-to-retrieve-an-usb-mass-storage-serial-number---tp26820272p26830729.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26829319</id>
	<title>Re: how to retrieve an usb mass storage serial number ?</title>
	<published>2009-12-17T06:59:56Z</published>
	<updated>2009-12-17T06:59:56Z</updated>
	<author>
		<name>Alan Stern</name>
	</author>
	<content type="html">On Thu, 17 Dec 2009, Benoit DECHERF wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; 2009/12/17 Peter Stuge &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26829319&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;peter@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; Benoit DECHERF wrote:
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; I'm trying to use libusb to get the serial number of an usb mass
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; storage devise.
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; This is simply not appropriate use of libusb if the kernel driver
&lt;br&gt;&amp;gt; &amp;gt; will be used for this device.
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; mmm, that's not so clear for me... Each usb device has a serial number ?
&lt;br&gt;&amp;gt; The method I tried works as a root user. So why should I use directly the
&lt;br&gt;&amp;gt; kernel driver to get the same infromation with less permissions ?
&lt;/div&gt;&lt;br&gt;Under Linux you don't have to do any fancy programming. &amp;nbsp;You can get 
&lt;br&gt;the USB serial number string by reading
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /sys/bus/usb/devices/.../serial
&lt;br&gt;&lt;br&gt;where you replace &amp;quot;...&amp;quot; with the device's name (e.g., &amp;quot;3-2&amp;quot;).
&lt;br&gt;&lt;br&gt;Alan Stern
&lt;br&gt;&lt;br&gt;&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;This SF.Net email is sponsored by the Verizon Developer Community
&lt;br&gt;Take advantage of Verizon's best-in-class app development support
&lt;br&gt;A streamlined, 14 day to market process makes app distribution fast and easy
&lt;br&gt;Join now and get one step closer to millions of Verizon customers
&lt;br&gt;&lt;a href=&quot;http://p.sf.net/sfu/verizon-dev2dev&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/verizon-dev2dev&lt;/a&gt;&amp;nbsp;
&lt;br&gt;_______________________________________________
&lt;br&gt;Libusb-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26829319&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Libusb-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/libusb-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/libusb-devel&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/LibUSB-Dev-f14232.html&quot; embed=&quot;fixTarget[14232]&quot; target=&quot;_top&quot; &gt;LibUSB Dev&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/how-to-retrieve-an-usb-mass-storage-serial-number---tp26820272p26829319.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26825280</id>
	<title>Re: how to retrieve an usb mass storage serial	number ?</title>
	<published>2009-12-17T01:22:51Z</published>
	<updated>2009-12-17T01:22:51Z</updated>
	<author>
		<name>Peter Stuge-4</name>
	</author>
	<content type="html">Benoit DECHERF wrote:
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; I'm trying to use libusb to get the serial number of an usb mass
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; storage devise.
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; This is simply not appropriate use of libusb if the kernel driver
&lt;br&gt;&amp;gt; &amp;gt; will be used for this device.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; mmm, that's not so clear for me...
&lt;br&gt;&lt;br&gt;libusb is used to write device drivers. If a device driver in the
&lt;br&gt;kernel is already active for this device then there is no place for a
&lt;br&gt;libusb device driver.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;gt; Each usb device has a serial number ?
&lt;br&gt;&lt;br&gt;No, not always actually. Some products do, others don't. It's not a
&lt;br&gt;requirement, only a very good idea.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;gt; The method I tried works as a root user.
&lt;br&gt;&lt;br&gt;You are going behind the back of the kernel in a sense. root can do
&lt;br&gt;that because he is expected to know about and accept the possible
&lt;br&gt;consequences. Normal users not so much.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;gt; So why should I use directly the kernel driver to get the same
&lt;br&gt;&amp;gt; infromation with less permissions ?
&lt;br&gt;&lt;br&gt;There can only be one device driver for each USB interface and since
&lt;br&gt;there is an active driver, that's generally what you should use
&lt;br&gt;to communicate with the device. There will also be permissions for
&lt;br&gt;this device already set up by your system; udev rules control which
&lt;br&gt;users are allowed to do what with which block devices, and if you
&lt;br&gt;depend on this for security in your application it isn't a good idea
&lt;br&gt;to allow users direct access to the USB device, because they can then
&lt;br&gt;change the state of the device behind the device driver's back.
&lt;br&gt;&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; &amp;gt; Try to replicate what sdparm --page=sn /dev/sda does:
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; open(&amp;quot;/dev/sda&amp;quot;, O_RDONLY|O_NONBLOCK) &amp;nbsp; = 3
&lt;br&gt;&amp;gt; &amp;gt; ioctl(3, SG_IO, {'S', SG_DXFER_FROM_DEV, cmd[6]=[12, 01, 80, 00, fc, 00],
&lt;br&gt;&amp;gt; &amp;gt; mx_sb_len=32, iovec_count=0, dxfer_len=252, timeout=60000, flags=0,
&lt;br&gt;&amp;gt; &amp;gt; data[252]=[&amp;quot;\0\200\0\24 &amp;nbsp; &amp;nbsp; DDZ050708222006\0\0\0\0\0\0\0\0\0&amp;quot;...],
&lt;br&gt;&amp;gt; &amp;gt; status=00, masked_status=00, sb[0]=[], host_status=0, driver_status=0,
&lt;br&gt;&amp;gt; &amp;gt; resid=0, duration=0, info=0}) = 0
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; sdparm doesn't seems to works on usb memory stick :
&lt;br&gt;&amp;gt; $ sudo sdparm --all /dev/sdc1
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; /dev/sdc1: SanDisk &amp;nbsp; SanDisk Cruzer &amp;nbsp; &amp;nbsp;8.02
&lt;br&gt;&amp;gt; Read write error recovery mode page:
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; warning: mode page seems malformed
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;The page number field should be 0x01, but is 0x00; try '--flexible'
&lt;br&gt;&amp;gt; ...
&lt;/div&gt;&lt;br&gt;It can possibly make a big difference that you are running sdparm
&lt;br&gt;with the partition rather than the device here. Also, that page error
&lt;br&gt;would make me ask only for the serial number rather than all possible
&lt;br&gt;information.
&lt;br&gt;&lt;br&gt;Feel free to explain more about what you want to accomplish - maybe
&lt;br&gt;we can suggest a good solution. Without a good understanding of what
&lt;br&gt;to do it's difficult to help. Maybe you have no option but creating a
&lt;br&gt;small service running as root which can be used to ask for serial
&lt;br&gt;numbers. I don't know...
&lt;br&gt;&lt;br&gt;&lt;br&gt;//Peter
&lt;br&gt;&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;This SF.Net email is sponsored by the Verizon Developer Community
&lt;br&gt;Take advantage of Verizon's best-in-class app development support
&lt;br&gt;A streamlined, 14 day to market process makes app distribution fast and easy
&lt;br&gt;Join now and get one step closer to millions of Verizon customers
&lt;br&gt;&lt;a href=&quot;http://p.sf.net/sfu/verizon-dev2dev&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/verizon-dev2dev&lt;/a&gt;&amp;nbsp;
&lt;br&gt;_______________________________________________
&lt;br&gt;Libusb-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26825280&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Libusb-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/libusb-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/libusb-devel&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/LibUSB-Dev-f14232.html&quot; embed=&quot;fixTarget[14232]&quot; target=&quot;_top&quot; &gt;LibUSB Dev&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/how-to-retrieve-an-usb-mass-storage-serial-number---tp26820272p26825280.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26824386</id>
	<title>Re: how to retrieve an usb mass storage serial number ?</title>
	<published>2009-12-16T23:43:22Z</published>
	<updated>2009-12-16T23:43:22Z</updated>
	<author>
		<name>Benoit DECHERF-3</name>
	</author>
	<content type="html">&lt;div class=&quot;gmail_quote&quot;&gt;2009/12/17 Peter Stuge &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26824386&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;peter@...&lt;/a&gt;&amp;gt;&lt;/span&gt;&lt;br&gt;&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot;&gt;

&lt;div&gt;Benoit DECHERF wrote:&lt;br&gt;
&amp;gt; I&amp;#39;m trying to use libusb to get the serial number of an usb mass&lt;br&gt;
&amp;gt; storage devise.&lt;br&gt;
&lt;br&gt;
&lt;/div&gt;This is simply not appropriate use of libusb if the kernel driver&lt;br&gt;
will be used for this device.&lt;br&gt;&lt;/blockquote&gt;&lt;div&gt;&lt;br&gt;mmm, that&amp;#39;s not so clear for me... Each usb device has a serial number ? &lt;br&gt;The method I tried works as a root user. So why should I use directly the kernel driver to get the same infromation with less permissions ?&lt;br&gt;
 &lt;/div&gt;&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot;&gt;
&lt;div&gt;&lt;br&gt;
&lt;br&gt;
&amp;gt; How should I do this ?&lt;br&gt;
&lt;br&gt;
&lt;/div&gt;Use the kernel interface that exposes this device: SCSI storage.&lt;br&gt;
&lt;br&gt;
Try to replicate what sdparm --page=sn /dev/sda does:&lt;br&gt;
&lt;br&gt;
open(&amp;quot;/dev/sda&amp;quot;, O_RDONLY|O_NONBLOCK)   = 3&lt;br&gt;
ioctl(3, SG_IO, {&amp;#39;S&amp;#39;, SG_DXFER_FROM_DEV, cmd[6]=[12, 01, 80, 00, fc, 00], mx_sb_len=32, iovec_count=0, dxfer_len=252, timeout=60000, flags=0, data[252]=[&amp;quot;\0\200\0\24     DDZ050708222006\0\0\0\0\0\0\0\0\0&amp;quot;...], status=00, masked_status=00, sb[0]=[], host_status=0, driver_status=0, resid=0, duration=0, info=0}) = 0&lt;br&gt;
&lt;/blockquote&gt;&lt;div&gt;&lt;br&gt;sdparm doesn&amp;#39;t seems to works on usb memory stick :&lt;br&gt;$ sudo sdparm --all /dev/sdc1&lt;br&gt;    /dev/sdc1: SanDisk   SanDisk Cruzer    8.02&lt;br&gt;Read write error recovery mode page:&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; warning: mode page seems malformed&lt;br&gt;
   The page number field should be 0x01, but is 0x00; try &amp;#39;--flexible&amp;#39;&lt;br&gt;...&lt;br&gt;&lt;br&gt;Benoit
&lt;/div&gt;&lt;/div&gt;
&lt;br /&gt;------------------------------------------------------------------------------
&lt;br&gt;This SF.Net email is sponsored by the Verizon Developer Community
&lt;br&gt;Take advantage of Verizon's best-in-class app development support
&lt;br&gt;A streamlined, 14 day to market process makes app distribution fast and easy
&lt;br&gt;Join now and get one step closer to millions of Verizon customers
&lt;br&gt;&lt;a href=&quot;http://p.sf.net/sfu/verizon-dev2dev&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/verizon-dev2dev&lt;/a&gt;&amp;nbsp;&lt;br /&gt;_______________________________________________
&lt;br&gt;Libusb-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26824386&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Libusb-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/libusb-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/libusb-devel&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/LibUSB-Dev-f14232.html&quot; embed=&quot;fixTarget[14232]&quot; target=&quot;_top&quot; &gt;LibUSB Dev&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/how-to-retrieve-an-usb-mass-storage-serial-number---tp26820272p26824386.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26820487</id>
	<title>Re: how to retrieve an usb mass storage serial number ?</title>
	<published>2009-12-16T15:33:27Z</published>
	<updated>2009-12-16T15:33:27Z</updated>
	<author>
		<name>Tim Roberts</name>
	</author>
	<content type="html">Benoit DECHERF wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I'm trying to use libusb to get the serial number of an usb mass
&lt;br&gt;&amp;gt; storage devise.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; This work when the code is executed as root. But I get a permission
&lt;br&gt;&amp;gt; denied when I execute it with a normal user.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I use this exemple:
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://mpathirage.com/getting-started-with-libusb-on-ubuntu/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://mpathirage.com/getting-started-with-libusb-on-ubuntu/&lt;/a&gt;&lt;br&gt;&amp;gt; With normal user, I get:
&lt;br&gt;&amp;gt; - Unable to fetch serial number string
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; How should I do this ?
&lt;/div&gt;&lt;br&gt;Well, either you run the program as root, or you use udev to change the
&lt;br&gt;permissions on the device.
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Tim Roberts, &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26820487&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;timr@...&lt;/a&gt;
&lt;br&gt;Providenza &amp; Boekelheide, Inc.
&lt;br&gt;&lt;br&gt;&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;This SF.Net email is sponsored by the Verizon Developer Community
&lt;br&gt;Take advantage of Verizon's best-in-class app development support
&lt;br&gt;A streamlined, 14 day to market process makes app distribution fast and easy
&lt;br&gt;Join now and get one step closer to millions of Verizon customers
&lt;br&gt;&lt;a href=&quot;http://p.sf.net/sfu/verizon-dev2dev&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/verizon-dev2dev&lt;/a&gt;&amp;nbsp;
&lt;br&gt;_______________________________________________
&lt;br&gt;Libusb-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26820487&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Libusb-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/libusb-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/libusb-devel&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/LibUSB-Dev-f14232.html&quot; embed=&quot;fixTarget[14232]&quot; target=&quot;_top&quot; &gt;LibUSB Dev&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/how-to-retrieve-an-usb-mass-storage-serial-number---tp26820272p26820487.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26820460</id>
	<title>Re: how to retrieve an usb mass storage serial	number ?</title>
	<published>2009-12-16T15:30:19Z</published>
	<updated>2009-12-16T15:30:19Z</updated>
	<author>
		<name>Peter Stuge-4</name>
	</author>
	<content type="html">Benoit DECHERF wrote:
&lt;br&gt;&amp;gt; I'm trying to use libusb to get the serial number of an usb mass
&lt;br&gt;&amp;gt; storage devise.
&lt;br&gt;&lt;br&gt;This is simply not appropriate use of libusb if the kernel driver
&lt;br&gt;will be used for this device.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;gt; How should I do this ?
&lt;br&gt;&lt;br&gt;Use the kernel interface that exposes this device: SCSI storage.
&lt;br&gt;&lt;br&gt;Try to replicate what sdparm --page=sn /dev/sda does:
&lt;br&gt;&lt;br&gt;open(&amp;quot;/dev/sda&amp;quot;, O_RDONLY|O_NONBLOCK) &amp;nbsp; = 3
&lt;br&gt;ioctl(3, SG_IO, {'S', SG_DXFER_FROM_DEV, cmd[6]=[12, 01, 80, 00, fc, 00], mx_sb_len=32, iovec_count=0, dxfer_len=252, timeout=60000, flags=0, data[252]=[&amp;quot;\0\200\0\24 &amp;nbsp; &amp;nbsp; DDZ050708222006\0\0\0\0\0\0\0\0\0&amp;quot;...], status=00, masked_status=00, sb[0]=[], host_status=0, driver_status=0, resid=0, duration=0, info=0}) = 0
&lt;br&gt;&lt;br&gt;&lt;br&gt;//Peter
&lt;br&gt;&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;This SF.Net email is sponsored by the Verizon Developer Community
&lt;br&gt;Take advantage of Verizon's best-in-class app development support
&lt;br&gt;A streamlined, 14 day to market process makes app distribution fast and easy
&lt;br&gt;Join now and get one step closer to millions of Verizon customers
&lt;br&gt;&lt;a href=&quot;http://p.sf.net/sfu/verizon-dev2dev&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/verizon-dev2dev&lt;/a&gt;&amp;nbsp;
&lt;br&gt;_______________________________________________
&lt;br&gt;Libusb-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26820460&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Libusb-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/libusb-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/libusb-devel&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/LibUSB-Dev-f14232.html&quot; embed=&quot;fixTarget[14232]&quot; target=&quot;_top&quot; &gt;LibUSB Dev&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/how-to-retrieve-an-usb-mass-storage-serial-number---tp26820272p26820460.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26820272</id>
	<title>how to retrieve an usb mass storage serial number ?</title>
	<published>2009-12-16T15:14:17Z</published>
	<updated>2009-12-16T15:14:17Z</updated>
	<author>
		<name>Benoit DECHERF-3</name>
	</author>
	<content type="html">Hi,&lt;br&gt;&lt;br&gt;I&amp;#39;m trying to use libusb to get the serial number of an usb mass storage devise.&lt;br&gt;&lt;br&gt;This work when the code is executed as root. But I get a permission denied when I execute it with a normal user.&lt;br&gt;&lt;br&gt;
I use this exemple: &lt;a href=&quot;http://mpathirage.com/getting-started-with-libusb-on-ubuntu/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://mpathirage.com/getting-started-with-libusb-on-ubuntu/&lt;/a&gt;&lt;br&gt;With normal user, I get: &lt;br&gt;- Unable to fetch serial number string&lt;br&gt;
&lt;br&gt;How should I do this ?&lt;br&gt;&lt;br&gt;Thanks, &lt;br&gt;Benoit&lt;br&gt;
&lt;br /&gt;------------------------------------------------------------------------------
&lt;br&gt;This SF.Net email is sponsored by the Verizon Developer Community
&lt;br&gt;Take advantage of Verizon's best-in-class app development support
&lt;br&gt;A streamlined, 14 day to market process makes app distribution fast and easy
&lt;br&gt;Join now and get one step closer to millions of Verizon customers
&lt;br&gt;&lt;a href=&quot;http://p.sf.net/sfu/verizon-dev2dev&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/verizon-dev2dev&lt;/a&gt;&amp;nbsp;&lt;br /&gt;_______________________________________________
&lt;br&gt;Libusb-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26820272&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Libusb-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/libusb-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/libusb-devel&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/LibUSB-Dev-f14232.html&quot; embed=&quot;fixTarget[14232]&quot; target=&quot;_top&quot; &gt;LibUSB Dev&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/how-to-retrieve-an-usb-mass-storage-serial-number---tp26820272p26820272.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26796004</id>
	<title>threading and event handling</title>
	<published>2009-12-15T06:51:21Z</published>
	<updated>2009-12-15T06:51:21Z</updated>
	<author>
		<name>Manfred Weiss</name>
	</author>
	<content type="html">Hello!
&lt;br&gt;&lt;br&gt;I do have problems with libusb in a threaded application.
&lt;br&gt;libusb is wrapped in a C++ class, for each device to handle
&lt;br&gt;there exists an instance of this usb wrapper class.
&lt;br&gt;Each class has its own thread responsible for event handling.
&lt;br&gt;This thread polls on fds retrieved by libusb_get_pollfds. The
&lt;br&gt;thread is stopped when i submit a synchronous transfer, in my case
&lt;br&gt;a control transfer. The thread is started again when i use an asynchronous
&lt;br&gt;transfer.
&lt;br&gt;A graphical overview is given in
&lt;br&gt;&lt;a href=&quot;http://www.student.tugraz.at/m.weiss/threads_overview.pdf&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.student.tugraz.at/m.weiss/threads_overview.pdf&lt;/a&gt;&lt;br&gt;Could this strategy lead to a problem?
&lt;br&gt;&lt;br&gt;I also have some data corruption when i start and stop the data acqusition.
&lt;br&gt;Therefor i have to submit a control transfer
&lt;br&gt;with the start command. Within a loop i ask for the data using
&lt;br&gt;an asynchronous interrupt transfer. &amp;nbsp;An event indicates when the data
&lt;br&gt;submission was a success. The event is triggered within the callback &amp;nbsp;
&lt;br&gt;function (libusb callback fn). Then another interrupttransfer is &amp;nbsp;
&lt;br&gt;submitted and so on.
&lt;br&gt;In the first cycle ( start / stop data acquisition ) everything works fine
&lt;br&gt;( i did some data acqusition for abaout an hour).
&lt;br&gt;But if i do some tests within a loop, i.e.
&lt;br&gt;[start] --&amp;gt; [daq for 3s or so] --&amp;gt; [stop] --&amp;gt; [start] ... the received &amp;nbsp;
&lt;br&gt;data are
&lt;br&gt;possibly corrupt (at least in the 3rd cycle...).
&lt;br&gt;A graphical overview is given in
&lt;br&gt;&lt;a href=&quot;http://www.student.tugraz.at/m.weiss/daq.pdf&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.student.tugraz.at/m.weiss/daq.pdf&lt;/a&gt;&lt;br&gt;Source of the thread which handles the events is given in &amp;nbsp;
&lt;br&gt;&lt;a href=&quot;http://www.student.tugraz.at/m.weiss/handle_events.pdf&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.student.tugraz.at/m.weiss/handle_events.pdf&lt;/a&gt;&lt;br&gt;Does anyone have an idea?
&lt;br&gt;Could this problem eventually be linked to the event handling?
&lt;br&gt;&lt;br&gt;I also like to say thank you for the support in the last months. i &amp;nbsp;
&lt;br&gt;wish all of you the very best for the next year.
&lt;br&gt;&lt;br&gt;manfred
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;manfred weiss
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;Return on Information:
&lt;br&gt;Google Enterprise Search pays you back
&lt;br&gt;Get the facts.
&lt;br&gt;&lt;a href=&quot;http://p.sf.net/sfu/google-dev2dev&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/google-dev2dev&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Libusb-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26796004&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Libusb-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/libusb-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/libusb-devel&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/LibUSB-Dev-f14232.html&quot; embed=&quot;fixTarget[14232]&quot; target=&quot;_top&quot; &gt;LibUSB Dev&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/threading-and-event-handling-tp26796004p26796004.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26794266</id>
	<title>Working (preferably free) USB sniffer for Windows 7 x64?</title>
	<published>2009-12-15T04:18:58Z</published>
	<updated>2009-12-15T04:18:58Z</updated>
	<author>
		<name>Pete Batard</name>
	</author>
	<content type="html">Hi,
&lt;br&gt;&lt;br&gt;While trying to investigate the device-less external hub descriptor 
&lt;br&gt;issue on Windows, I've been trying a couple USB Sniffers, but I found 
&lt;br&gt;that none of the ones I found appear to work against Windows 7 x64.
&lt;br&gt;&lt;br&gt;SnoopyPro (&lt;a href=&quot;http://sourceforge.net/projects/usbsnoop/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://sourceforge.net/projects/usbsnoop/&lt;/a&gt;) doesn't seem to 
&lt;br&gt;have been updated since 2002, and only offers 32 bit drivers.
&lt;br&gt;&lt;br&gt;SniffUSB (&lt;a href=&quot;http://www.pcausa.com/Utilities/UsbSnoop/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.pcausa.com/Utilities/UsbSnoop/&lt;/a&gt;), which also seems 
&lt;br&gt;to be based on the usbsnoop source, does provide x64 drivers (with valid 
&lt;br&gt;signatures even) and supposedly works with Vista x64, but the driver 
&lt;br&gt;produces a nasty BSOD when used on my Windows 7 x64 platform, with what 
&lt;br&gt;looks like a NULL pointer dereference - ouch!
&lt;br&gt;I tried recompiling both the application and the driver from scratch, 
&lt;br&gt;but got the same issue, so it doesn't look like any of those will help.
&lt;br&gt;&lt;br&gt;Anybody here know of a USB Sniffer that works with Windows 7 x64 yet?
&lt;br&gt;&lt;br&gt;Regards,
&lt;br&gt;&lt;br&gt;/Pete
&lt;br&gt;&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;Return on Information:
&lt;br&gt;Google Enterprise Search pays you back
&lt;br&gt;Get the facts.
&lt;br&gt;&lt;a href=&quot;http://p.sf.net/sfu/google-dev2dev&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/google-dev2dev&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Libusb-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26794266&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Libusb-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/libusb-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/libusb-devel&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/LibUSB-Dev-f14232.html&quot; embed=&quot;fixTarget[14232]&quot; target=&quot;_top&quot; &gt;LibUSB Dev&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Working-%28preferably-free%29-USB-sniffer-for-Windows-7-x64--tp26794266p26794266.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26784411</id>
	<title>Re: libusb-compat x libusb0: new incompatibility (long request, short transfer, Brother scanner)</title>
	<published>2009-12-14T12:37:47Z</published>
	<updated>2009-12-14T12:37:47Z</updated>
	<author>
		<name>Alan Stern</name>
	</author>
	<content type="html">On Mon, 14 Dec 2009, Stanislav Brabec wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Well, I don't have this scanner at my hands, but it seems, that the
&lt;br&gt;&amp;gt; problem is caused by the continuation URB, which is not properly
&lt;br&gt;&amp;gt; cancelled, and by concatenation of read data with surplus data from the
&lt;br&gt;&amp;gt; continuation URB.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; It was tested with the latest libusb-1.0.6. Older version even did not
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; start to scan.
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; And it doesn't work with libusb-1.0.6 and the new kernel?
&lt;br&gt;&amp;gt; &amp;gt; In that case, I don't understand the problem.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; With libusb-0.1.12, it scans in both low and high resolution.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; With libusb-1.0.3, it does not work at all.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; With libusb-1.0.6 and linux-2.6.31.5, it scans in low resolution. In
&lt;br&gt;&amp;gt; high resolution it scans several lines and hangs.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; With libusb-1.0.6 and linux-2.6.32rc6, it scans in low resolution. In
&lt;br&gt;&amp;gt; high resolution it scans several lines and hangs and complies to syslog:
&lt;br&gt;&amp;gt; &amp;quot;usbfs: usb_submit_urb returned -121&amp;quot;
&lt;/div&gt;&lt;br&gt;That complaint is merely a debugging message. &amp;nbsp;It proves that a
&lt;br&gt;continuation URB (there may have been more than one) failed during 
&lt;br&gt;submission.
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; According to the documentation, it is caused by URB_SHORT_NOT_OK.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; Under this new configuration, given an example of 3 16kb bulk URBs 
&lt;br&gt;&amp;gt; &amp;gt; submitted in parallel, if the first one ends early then the other 2 will 
&lt;br&gt;&amp;gt; &amp;gt; be immediately cancelled with no possibility for data to arrive in them, 
&lt;br&gt;&amp;gt; &amp;gt; as if they had never been submitted. This gives both the performance 
&lt;br&gt;&amp;gt; &amp;gt; advantage plus the logical transfer separation that was implemented by 
&lt;br&gt;&amp;gt; &amp;gt; libusb-0.1.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; In case of reported bug, the other URBs are not cancelled as they
&lt;br&gt;&amp;gt; should, but data are sent back. I don't know, which side is responsible
&lt;br&gt;&amp;gt; for this behavior (kernel? host controller? scanner?).
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Here is my theory what is happening:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 32000 bytes is requested. The request is split to 2 URBs by libusb and
&lt;br&gt;&amp;gt; sent to the kernel.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; The scanner returns an amount of data, which is partially unpredictable,
&lt;br&gt;&amp;gt; but always less than requested 32000 bytes, and even less than 16384.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; The scanner does not wait for completing the buffer, but it sends data
&lt;br&gt;&amp;gt; it actually has. It occurs in a single short transfer.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Until that moment, it is perfectly correct.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; But in case of libusb1, scanner now starts to send data and fill the
&lt;br&gt;&amp;gt; continuation URB. In my opinion it is incorrect and the request should
&lt;br&gt;&amp;gt; have been cancelled after the short transfer occurrence.
&lt;/div&gt;&lt;br&gt;Try collecting a usbmon trace. &amp;nbsp;That will show you exactly what is 
&lt;br&gt;happening, so you won't have to theorize.
&lt;br&gt;&lt;br&gt;Alan Stern
&lt;br&gt;&lt;br&gt;&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;Return on Information:
&lt;br&gt;Google Enterprise Search pays you back
&lt;br&gt;Get the facts.
&lt;br&gt;&lt;a href=&quot;http://p.sf.net/sfu/google-dev2dev&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/google-dev2dev&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Libusb-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26784411&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Libusb-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/libusb-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/libusb-devel&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/LibUSB-Dev-f14232.html&quot; embed=&quot;fixTarget[14232]&quot; target=&quot;_top&quot; &gt;LibUSB Dev&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/libusb-compat-x-libusb0%3A-new-incompatibility-%28long-request%2C-short-transfer%2C-Brother-scanner%29-tp26747144p26784411.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26783081</id>
	<title>Re: libusb-compat x libusb0: new incompatibility (long request, short transfer, Brother scanner)</title>
	<published>2009-12-14T11:08:34Z</published>
	<updated>2009-12-14T11:08:34Z</updated>
	<author>
		<name>Daniel Drake-2</name>
	</author>
	<content type="html">El 14/12/09 18:47, Stanislav Brabec escribió:
&lt;br&gt;&amp;gt; Off-topic: Do you have any idea, why user space transfers have these
&lt;br&gt;&amp;gt; limits hardcored?
&lt;br&gt;&lt;br&gt;This has been discussed various times before - basically it's because 
&lt;br&gt;the kernel has to make an equivalent sized allocation of physically 
&lt;br&gt;contiguous memory and even asking for 16kb is pushing it.
&lt;br&gt;&lt;br&gt;Daniel
&lt;br&gt;&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;Return on Information:
&lt;br&gt;Google Enterprise Search pays you back
&lt;br&gt;Get the facts.
&lt;br&gt;&lt;a href=&quot;http://p.sf.net/sfu/google-dev2dev&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/google-dev2dev&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Libusb-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26783081&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Libusb-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/libusb-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/libusb-devel&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/LibUSB-Dev-f14232.html&quot; embed=&quot;fixTarget[14232]&quot; target=&quot;_top&quot; &gt;LibUSB Dev&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/libusb-compat-x-libusb0%3A-new-incompatibility-%28long-request%2C-short-transfer%2C-Brother-scanner%29-tp26747144p26783081.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26783002</id>
	<title>Re: libusb-compat x libusb0: new incompatibility (long request, short transfer, Brother scanner)</title>
	<published>2009-12-14T11:04:53Z</published>
	<updated>2009-12-14T11:04:53Z</updated>
	<author>
		<name>Tim Roberts</name>
	</author>
	<content type="html">Stanislav Brabec wrote:
&lt;br&gt;&amp;gt; Off-topic: Do you have any idea, why user space transfers have these
&lt;br&gt;&amp;gt; limits hardcored?
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;br&gt;&lt;br&gt;Well, there has to be SOME limit. &amp;nbsp;USB is entirely DMA-driven, so all of
&lt;br&gt;the pages in all queued transfers have to be page-locked into RAM. &amp;nbsp;It's
&lt;br&gt;not productive to lock up an infinite amount of virtual memory for
&lt;br&gt;queued transactions.
&lt;br&gt;&lt;br&gt;Windows happens to have a larger limit (it varies by operating system,
&lt;br&gt;but is currently small integer megabytes). &amp;nbsp;Linux happens to have a
&lt;br&gt;smaller limit. &amp;nbsp;As long as there is a limit, you have to deal with it
&lt;br&gt;somehow.
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Tim Roberts, &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26783002&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;timr@...&lt;/a&gt;
&lt;br&gt;Providenza &amp; Boekelheide, Inc.
&lt;br&gt;&lt;br&gt;&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;Return on Information:
&lt;br&gt;Google Enterprise Search pays you back
&lt;br&gt;Get the facts.
&lt;br&gt;&lt;a href=&quot;http://p.sf.net/sfu/google-dev2dev&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/google-dev2dev&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Libusb-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26783002&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Libusb-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/libusb-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/libusb-devel&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/LibUSB-Dev-f14232.html&quot; embed=&quot;fixTarget[14232]&quot; target=&quot;_top&quot; &gt;LibUSB Dev&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/libusb-compat-x-libusb0%3A-new-incompatibility-%28long-request%2C-short-transfer%2C-Brother-scanner%29-tp26747144p26783002.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26782950</id>
	<title>Re: libusb-compat x libusb0: new incompatibility (long request, short transfer, Brother scanner)</title>
	<published>2009-12-14T11:01:35Z</published>
	<updated>2009-12-14T11:01:35Z</updated>
	<author>
		<name>Greg KH</name>
	</author>
	<content type="html">On Mon, Dec 14, 2009 at 07:47:43PM +0100, Stanislav Brabec wrote:
&lt;br&gt;&amp;gt; Off-topic: Do you have any idea, why user space transfers have these
&lt;br&gt;&amp;gt; limits hardcored?
&lt;br&gt;&lt;br&gt;We had to pick something, do you have a better idea?
&lt;br&gt;&lt;br&gt;thanks,
&lt;br&gt;&lt;br&gt;greg k-h
&lt;br&gt;&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;Return on Information:
&lt;br&gt;Google Enterprise Search pays you back
&lt;br&gt;Get the facts.
&lt;br&gt;&lt;a href=&quot;http://p.sf.net/sfu/google-dev2dev&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/google-dev2dev&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Libusb-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26782950&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Libusb-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/libusb-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/libusb-devel&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/LibUSB-Dev-f14232.html&quot; embed=&quot;fixTarget[14232]&quot; target=&quot;_top&quot; &gt;LibUSB Dev&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/libusb-compat-x-libusb0%3A-new-incompatibility-%28long-request%2C-short-transfer%2C-Brother-scanner%29-tp26747144p26782950.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26782711</id>
	<title>Re: libusb-compat x libusb0: new incompatibility (long request, short transfer, Brother scanner)</title>
	<published>2009-12-14T10:47:43Z</published>
	<updated>2009-12-14T10:47:43Z</updated>
	<author>
		<name>Stanislav Brabec</name>
	</author>
	<content type="html">Greg KH wrote:
&lt;br&gt;&lt;br&gt;&amp;gt; That's because there is no 'usbdevfs' as mentioned above :)
&lt;br&gt;&lt;br&gt;Thanks for correction, I misspelled USB_DEVICEFS:
&lt;br&gt;&lt;br&gt;&amp;nbsp;config USB_DEVICEFS
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; bool &amp;quot;USB device filesystem (DEPRECATED)&amp;quot;
&lt;br&gt;&lt;br&gt;&lt;br&gt;Off-topic: Do you have any idea, why user space transfers have these
&lt;br&gt;limits hardcored?
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Best Regards / S pozdravem,
&lt;br&gt;&lt;br&gt;Stanislav Brabec
&lt;br&gt;software developer
&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;SUSE LINUX, s. r. o. &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26782711&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;sbrabec@...&lt;/a&gt;
&lt;br&gt;Lihovarská 1060/12 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tel: +420 284 028 966, +49 911 740538747
&lt;br&gt;190 00 Praha 9 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;fax: +420 284 028 951
&lt;br&gt;Czech Republic &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;a href=&quot;http://www.suse.cz/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.suse.cz/&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;Return on Information:
&lt;br&gt;Google Enterprise Search pays you back
&lt;br&gt;Get the facts.
&lt;br&gt;&lt;a href=&quot;http://p.sf.net/sfu/google-dev2dev&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/google-dev2dev&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Libusb-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26782711&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Libusb-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/libusb-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/libusb-devel&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/LibUSB-Dev-f14232.html&quot; embed=&quot;fixTarget[14232]&quot; target=&quot;_top&quot; &gt;LibUSB Dev&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/libusb-compat-x-libusb0%3A-new-incompatibility-%28long-request%2C-short-transfer%2C-Brother-scanner%29-tp26747144p26782711.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26782728</id>
	<title>Re: libusb-compat x libusb0: new incompatibility (long request, short transfer, Brother scanner)</title>
	<published>2009-12-14T10:45:29Z</published>
	<updated>2009-12-14T10:45:29Z</updated>
	<author>
		<name>Daniel Drake-2</name>
	</author>
	<content type="html">El 14/12/09 18:28, Stanislav Brabec escribió:
&lt;br&gt;&amp;gt; Yes, now I understand the performance problem. But it is the way libusb0
&lt;br&gt;&amp;gt; works, and software may depend on this behavior.
&lt;br&gt;&lt;br&gt;Yes, its a bug. We should fix libusb-1.0 to not parallelize URBs on old 
&lt;br&gt;kernels where we cannot guarantee this behaviour.
&lt;br&gt;&lt;br&gt;&amp;gt; But in case of libusb1, scanner now starts to send data and fill the
&lt;br&gt;&amp;gt; continuation URB. In my opinion it is incorrect and the request should
&lt;br&gt;&amp;gt; have been cancelled after the short transfer occurrence.
&lt;br&gt;&lt;br&gt;That's a bug. All the code is in place so that situation is not possible 
&lt;br&gt;(the 2nd URB in the transfer in your example would have been atomically 
&lt;br&gt;cancelled when the 1st URB completed early), but perhaps it is not 
&lt;br&gt;working correctly.
&lt;br&gt;&lt;br&gt;Daniel
&lt;br&gt;&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;Return on Information:
&lt;br&gt;Google Enterprise Search pays you back
&lt;br&gt;Get the facts.
&lt;br&gt;&lt;a href=&quot;http://p.sf.net/sfu/google-dev2dev&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/google-dev2dev&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Libusb-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26782728&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Libusb-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/libusb-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/libusb-devel&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/LibUSB-Dev-f14232.html&quot; embed=&quot;fixTarget[14232]&quot; target=&quot;_top&quot; &gt;LibUSB Dev&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/libusb-compat-x-libusb0%3A-new-incompatibility-%28long-request%2C-short-transfer%2C-Brother-scanner%29-tp26747144p26782728.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26782910</id>
	<title>Re: libusb-compat x libusb0: new incompatibility (long request, short transfer, Brother scanner)</title>
	<published>2009-12-14T10:38:22Z</published>
	<updated>2009-12-14T10:38:22Z</updated>
	<author>
		<name>Greg KH</name>
	</author>
	<content type="html">On Mon, Dec 14, 2009 at 07:28:50PM +0100, Stanislav Brabec wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Daniel Drake wrote:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; usbfs is still used by libusb and is not deprecated.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Sorry for confusion:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Thing called usbfs inside kernel is still used and handles device nodes
&lt;br&gt;&amp;gt; in /dev and /sys.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; usbdevfs that handled /proc/bus/usb (called usbfs in fstab) is the
&lt;br&gt;&amp;gt; deprecated thing. In recent libusb, /dev/bus/usb takes precedence.
&lt;/div&gt;&lt;br&gt;Yes.
&lt;br&gt;&lt;br&gt;And note, the name &amp;quot;usbdevfs&amp;quot; has been gone from the Linux kernel for
&lt;br&gt;about 5 years now, and isn't even in the 2.4 kernel series either. &amp;nbsp;It's
&lt;br&gt;just &amp;quot;usbfs&amp;quot; please.
&lt;br&gt;&lt;br&gt;&amp;gt; The code in drivers/usb/core/devio.c seems to handle both usbfs and
&lt;br&gt;&amp;gt; usbdevfs. I still see at least these two limits there:
&lt;br&gt;&lt;br&gt;That's because there is no 'usbdevfs' as mentioned above :)
&lt;br&gt;&lt;br&gt;Hope this helps reduce confusion in the future.
&lt;br&gt;&lt;br&gt;thanks,
&lt;br&gt;&lt;br&gt;greg k-h
&lt;br&gt;&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;Return on Information:
&lt;br&gt;Google Enterprise Search pays you back
&lt;br&gt;Get the facts.
&lt;br&gt;&lt;a href=&quot;http://p.sf.net/sfu/google-dev2dev&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/google-dev2dev&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Libusb-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26782910&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Libusb-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/libusb-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/libusb-devel&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/LibUSB-Dev-f14232.html&quot; embed=&quot;fixTarget[14232]&quot; target=&quot;_top&quot; &gt;LibUSB Dev&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/libusb-compat-x-libusb0%3A-new-incompatibility-%28long-request%2C-short-transfer%2C-Brother-scanner%29-tp26747144p26782910.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26782476</id>
	<title>Re: libusb-compat x libusb0: new incompatibility (long request, short transfer, Brother scanner)</title>
	<published>2009-12-14T10:28:50Z</published>
	<updated>2009-12-14T10:28:50Z</updated>
	<author>
		<name>Stanislav Brabec</name>
	</author>
	<content type="html">Daniel Drake wrote:
&lt;br&gt;&lt;br&gt;&amp;gt; usbfs is still used by libusb and is not deprecated.
&lt;br&gt;&lt;br&gt;Sorry for confusion:
&lt;br&gt;&lt;br&gt;Thing called usbfs inside kernel is still used and handles device nodes
&lt;br&gt;in /dev and /sys.
&lt;br&gt;&lt;br&gt;usbdevfs that handled /proc/bus/usb (called usbfs in fstab) is the
&lt;br&gt;deprecated thing. In recent libusb, /dev/bus/usb takes precedence.
&lt;br&gt;&lt;br&gt;The code in drivers/usb/core/devio.c seems to handle both usbfs and
&lt;br&gt;usbdevfs. I still see at least these two limits there:
&lt;br&gt;&lt;br&gt;#define MAX_USBFS_BUFFER_SIZE &amp;nbsp; 16384
&lt;br&gt;&lt;br&gt;case USBDEVFS_URB_TYPE_ISO:
&lt;br&gt;...
&lt;br&gt;if (totlen &amp;gt; 32768)
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; It will hurt performance
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; significantly, but I guess that would be acceptable.
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; Are you sure? Looking at the libusb-1.0.6, it never submits bulk URBs
&lt;br&gt;&amp;gt; &amp;gt; larger than 16kB (MAX_BULK_BUFFER_LENGTH) as well.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Yes. libusb-1.0 submits URBs in parallel, whereas libusb-0.1 did them in 
&lt;br&gt;&amp;gt; serial. The parallelization goes all the way down to the hardware level, 
&lt;br&gt;&amp;gt; where all the individual packet buffers are queued, resulting in a 
&lt;br&gt;&amp;gt; significant performance increase.
&lt;/div&gt;&lt;br&gt;Yes, now I understand the performance problem. But it is the way libusb0
&lt;br&gt;works, and software may depend on this behavior.
&lt;br&gt;&lt;br&gt;&amp;gt; The problem that this resulted in is that libusb couldn't avoid the 
&lt;br&gt;&amp;gt; parallel-queued URBs from being filled up after an earlier one completed 
&lt;br&gt;&amp;gt; early (there's no way it could cancel them in time, no matter how hard 
&lt;br&gt;&amp;gt; it tried), and from briefly reading your bug report, this seems to be 
&lt;br&gt;&amp;gt; what is happening?
&lt;br&gt;&lt;br&gt;Well, I don't have this scanner at my hands, but it seems, that the
&lt;br&gt;problem is caused by the continuation URB, which is not properly
&lt;br&gt;cancelled, and by concatenation of read data with surplus data from the
&lt;br&gt;continuation URB.
&lt;br&gt;&lt;br&gt;&amp;gt; &amp;gt; It was tested with the latest libusb-1.0.6. Older version even did not
&lt;br&gt;&amp;gt; &amp;gt; start to scan.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; And it doesn't work with libusb-1.0.6 and the new kernel?
&lt;br&gt;&amp;gt; In that case, I don't understand the problem.
&lt;br&gt;&lt;br&gt;With libusb-0.1.12, it scans in both low and high resolution.
&lt;br&gt;&lt;br&gt;With libusb-1.0.3, it does not work at all.
&lt;br&gt;&lt;br&gt;With libusb-1.0.6 and linux-2.6.31.5, it scans in low resolution. In
&lt;br&gt;high resolution it scans several lines and hangs.
&lt;br&gt;&lt;br&gt;With libusb-1.0.6 and linux-2.6.32rc6, it scans in low resolution. In
&lt;br&gt;high resolution it scans several lines and hangs and complies to syslog:
&lt;br&gt;&amp;quot;usbfs: usb_submit_urb returned -121&amp;quot;
&lt;br&gt;&lt;br&gt;According to the documentation, it is caused by URB_SHORT_NOT_OK.
&lt;br&gt;&lt;br&gt;&amp;gt; Under this new configuration, given an example of 3 16kb bulk URBs 
&lt;br&gt;&amp;gt; submitted in parallel, if the first one ends early then the other 2 will 
&lt;br&gt;&amp;gt; be immediately cancelled with no possibility for data to arrive in them, 
&lt;br&gt;&amp;gt; as if they had never been submitted. This gives both the performance 
&lt;br&gt;&amp;gt; advantage plus the logical transfer separation that was implemented by 
&lt;br&gt;&amp;gt; libusb-0.1.
&lt;br&gt;&lt;br&gt;In case of reported bug, the other URBs are not cancelled as they
&lt;br&gt;should, but data are sent back. I don't know, which side is responsible
&lt;br&gt;for this behavior (kernel? host controller? scanner?).
&lt;br&gt;&lt;br&gt;Here is my theory what is happening:
&lt;br&gt;&lt;br&gt;32000 bytes is requested. The request is split to 2 URBs by libusb and
&lt;br&gt;sent to the kernel.
&lt;br&gt;&lt;br&gt;The scanner returns an amount of data, which is partially unpredictable,
&lt;br&gt;but always less than requested 32000 bytes, and even less than 16384.
&lt;br&gt;&lt;br&gt;The scanner does not wait for completing the buffer, but it sends data
&lt;br&gt;it actually has. It occurs in a single short transfer.
&lt;br&gt;&lt;br&gt;Until that moment, it is perfectly correct.
&lt;br&gt;&lt;br&gt;But in case of libusb1, scanner now starts to send data and fill the
&lt;br&gt;continuation URB. In my opinion it is incorrect and the request should
&lt;br&gt;have been cancelled after the short transfer occurrence.
&lt;br&gt;&lt;br&gt;&amp;gt; Actually, looking briefly at the bug report, I can't see any indication 
&lt;br&gt;&amp;gt; that a new enough kernel has been tested.
&lt;br&gt;&lt;br&gt;linux-2.6.32rc6 was the latest one.
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Best Regards / S pozdravem,
&lt;br&gt;&lt;br&gt;Stanislav Brabec
&lt;br&gt;software developer
&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;SUSE LINUX, s. r. o. &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26782476&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;sbrabec@...&lt;/a&gt;
&lt;br&gt;Lihovarská 1060/12 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tel: +420 284 028 966, +49 911 740538747
&lt;br&gt;190 00 Praha 9 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;fax: +420 284 028 951
&lt;br&gt;Czech Republic &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;a href=&quot;http://www.suse.cz/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.suse.cz/&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;Return on Information:
&lt;br&gt;Google Enterprise Search pays you back
&lt;br&gt;Get the facts.
&lt;br&gt;&lt;a href=&quot;http://p.sf.net/sfu/google-dev2dev&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/google-dev2dev&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Libusb-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26782476&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Libusb-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/libusb-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/libusb-devel&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/LibUSB-Dev-f14232.html&quot; embed=&quot;fixTarget[14232]&quot; target=&quot;_top&quot; &gt;LibUSB Dev&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/libusb-compat-x-libusb0%3A-new-incompatibility-%28long-request%2C-short-transfer%2C-Brother-scanner%29-tp26747144p26782476.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26780666</id>
	<title>Re: libusb-compat x libusb0: new incompatibility (long request, short transfer, Brother scanner)</title>
	<published>2009-12-14T08:25:30Z</published>
	<updated>2009-12-14T08:25:30Z</updated>
	<author>
		<name>Daniel Drake-2</name>
	</author>
	<content type="html">El 14/12/09 15:52, Stanislav Brabec escribió:
&lt;br&gt;&amp;gt; Splitting transfers into sub-transfers with SHORT_NOT_OK may be even
&lt;br&gt;&amp;gt; dangerous in some situations:
&lt;br&gt;&amp;gt; - USB specification recommends to ignore transfers not associated with
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;any pending IRP.
&lt;br&gt;&amp;gt; - When short transfer occurs and SHORT_NOT_OK is set, host controller
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;closes the current IRP.
&lt;br&gt;&amp;gt; - Software issues new URB, it issues new IRP on the bus.
&lt;br&gt;&amp;gt; - There may be a race between them and data may be lost.
&lt;br&gt;&lt;br&gt;I am pretty sure this is not true (there is no race) because the kernel 
&lt;br&gt;is able to perform fine control of the queued packets with interrupts 
&lt;br&gt;disabled as soon as a short packet arrives.
&lt;br&gt;&lt;br&gt;Daniel
&lt;br&gt;&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;Return on Information:
&lt;br&gt;Google Enterprise Search pays you back
&lt;br&gt;Get the facts.
&lt;br&gt;&lt;a href=&quot;http://p.sf.net/sfu/google-dev2dev&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/google-dev2dev&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Libusb-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26780666&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Libusb-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/libusb-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/libusb-devel&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/LibUSB-Dev-f14232.html&quot; embed=&quot;fixTarget[14232]&quot; target=&quot;_top&quot; &gt;LibUSB Dev&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/libusb-compat-x-libusb0%3A-new-incompatibility-%28long-request%2C-short-transfer%2C-Brother-scanner%29-tp26747144p26780666.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26780487</id>
	<title>Re: libusb-compat x libusb0: new incompatibility (long request, short transfer, Brother scanner)</title>
	<published>2009-12-14T08:14:36Z</published>
	<updated>2009-12-14T08:14:36Z</updated>
	<author>
		<name>Daniel Drake-2</name>
	</author>
	<content type="html">El 14/12/09 15:52, Stanislav Brabec escribió:
&lt;br&gt;&amp;gt; I am not an USB expert, but as far as I read the specification, the
&lt;br&gt;&amp;gt; MAX_*_BUFFER_LENGTH has nothing to do with the USB bus. The whole URB
&lt;br&gt;&amp;gt; handling is a Linux specific thing.
&lt;br&gt;&lt;br&gt;Correct.
&lt;br&gt;&lt;br&gt;&amp;gt; Transfer size limits seems to be valid only for the deprecated usbfs,
&lt;br&gt;&amp;gt; which is no more used by libusb. See linux/drivers/usb/core/devio.c.
&lt;br&gt;&lt;br&gt;usbfs is still used by libusb and is not deprecated.
&lt;br&gt;&lt;br&gt;&amp;gt;&amp;gt; It will hurt performance
&lt;br&gt;&amp;gt;&amp;gt; significantly, but I guess that would be acceptable.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Are you sure? Looking at the libusb-1.0.6, it never submits bulk URBs
&lt;br&gt;&amp;gt; larger than 16kB (MAX_BULK_BUFFER_LENGTH) as well.
&lt;br&gt;&lt;br&gt;Yes. libusb-1.0 submits URBs in parallel, whereas libusb-0.1 did them in 
&lt;br&gt;serial. The parallelization goes all the way down to the hardware level, 
&lt;br&gt;where all the individual packet buffers are queued, resulting in a 
&lt;br&gt;significant performance increase.
&lt;br&gt;&lt;br&gt;The problem that this resulted in is that libusb couldn't avoid the 
&lt;br&gt;parallel-queued URBs from being filled up after an earlier one completed 
&lt;br&gt;early (there's no way it could cancel them in time, no matter how hard 
&lt;br&gt;it tried), and from briefly reading your bug report, this seems to be 
&lt;br&gt;what is happening?
&lt;br&gt;&lt;br&gt;&amp;gt; It was tested with the latest libusb-1.0.6. Older version even did not
&lt;br&gt;&amp;gt; start to scan.
&lt;br&gt;&lt;br&gt;And it doesn't work with libusb-1.0.6 and the new kernel?
&lt;br&gt;In that case, I don't understand the problem.
&lt;br&gt;&lt;br&gt;Under this new configuration, given an example of 3 16kb bulk URBs 
&lt;br&gt;submitted in parallel, if the first one ends early then the other 2 will 
&lt;br&gt;be immediately cancelled with no possibility for data to arrive in them, 
&lt;br&gt;as if they had never been submitted. This gives both the performance 
&lt;br&gt;advantage plus the logical transfer separation that was implemented by 
&lt;br&gt;libusb-0.1.
&lt;br&gt;&lt;br&gt;Actually, looking briefly at the bug report, I can't see any indication 
&lt;br&gt;that a new enough kernel has been tested.
&lt;br&gt;&lt;br&gt;Daniel
&lt;br&gt;&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;Return on Information:
&lt;br&gt;Google Enterprise Search pays you back
&lt;br&gt;Get the facts.
&lt;br&gt;&lt;a href=&quot;http://p.sf.net/sfu/google-dev2dev&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/google-dev2dev&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Libusb-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26780487&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Libusb-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/libusb-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/libusb-devel&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/LibUSB-Dev-f14232.html&quot; embed=&quot;fixTarget[14232]&quot; target=&quot;_top&quot; &gt;LibUSB Dev&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/libusb-compat-x-libusb0%3A-new-incompatibility-%28long-request%2C-short-transfer%2C-Brother-scanner%29-tp26747144p26780487.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26780090</id>
	<title>Re: libusb-compat x libusb0: new incompatibility (long request, short transfer, Brother scanner)</title>
	<published>2009-12-14T07:52:28Z</published>
	<updated>2009-12-14T07:52:28Z</updated>
	<author>
		<name>Stanislav Brabec</name>
	</author>
	<content type="html">Daniel Drake wrote:
&lt;br&gt;&amp;gt; El 11/12/09 16:20, Stanislav Brabec escribió:
&lt;br&gt;&lt;br&gt;&amp;gt; &amp;gt; If short transfer happens and length&amp;gt;= 16384 was requested:
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; libusb0 returns the incomplete block read by the first URB, not trying
&lt;br&gt;&amp;gt; &amp;gt; to ask for more data.
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; libusb-compat asks for second URB and concatenates buffers into one
&lt;br&gt;&amp;gt; &amp;gt; bigger block.
&lt;br&gt;&lt;br&gt;&amp;gt; I guess the approach you're looking at taking is forcing libusb-compat 
&lt;br&gt;&amp;gt; to never submit a transfer bigger than 16kb.
&lt;br&gt;&lt;br&gt;Yes. I have been thinking about two possible solutions:
&lt;br&gt;&lt;br&gt;1) Split transfers to 4096/16384/32768 bytes pieces inside
&lt;br&gt;&amp;nbsp; &amp;nbsp;libusb-compat. It needs to review libusb-0.1 code for other
&lt;br&gt;&amp;nbsp; &amp;nbsp;platforms and check for their limits.
&lt;br&gt;&lt;br&gt;2) Implement new libusb-1.0 calls to control buffer splitting and short
&lt;br&gt;&amp;nbsp; &amp;nbsp;transfer behavior.
&lt;br&gt;&lt;br&gt;I am not an USB expert, but as far as I read the specification, the
&lt;br&gt;MAX_*_BUFFER_LENGTH has nothing to do with the USB bus. The whole URB
&lt;br&gt;handling is a Linux specific thing.
&lt;br&gt;&lt;br&gt;Transfer size limits seems to be valid only for the deprecated usbfs,
&lt;br&gt;which is no more used by libusb. See linux/drivers/usb/core/devio.c.
&lt;br&gt;&lt;br&gt;I was not able to find any other limit for buffer_length anywhere in the
&lt;br&gt;current kernel source nor documentation.
&lt;br&gt;&lt;br&gt;&amp;gt; It will hurt performance 
&lt;br&gt;&amp;gt; significantly, but I guess that would be acceptable.
&lt;br&gt;&lt;br&gt;Are you sure? Looking at the libusb-1.0.6, it never submits bulk URBs
&lt;br&gt;larger than 16kB (MAX_BULK_BUFFER_LENGTH) as well.
&lt;br&gt;&lt;br&gt;&amp;gt; However, you should also consider that we've fixed this properly in more 
&lt;br&gt;&amp;gt; recent Linux kernels and the latest libusb release. So your patch should 
&lt;br&gt;&amp;gt; have some condition to stick to the current scheme on a system where the 
&lt;br&gt;&amp;gt; kernel is new enough, or something like that.
&lt;br&gt;&lt;br&gt;It was tested with the latest libusb-1.0.6. Older version even did not
&lt;br&gt;start to scan.
&lt;br&gt;&lt;br&gt;Yes, new kernel changes libusb behavior. libusb sets
&lt;br&gt;USBFS_URB_SHORT_NOT_OK (in fact it is URB_SHORT_NOT_OK) for all
&lt;br&gt;split-transfer blocks except the last one.
&lt;br&gt;&lt;br&gt;It may break applications that implement reading from a device with a
&lt;br&gt;short buffer, where the application wants to get concatenated short
&lt;br&gt;blocks. (This is not the case of brscan, it wants each chunk.)
&lt;br&gt;&lt;br&gt;Splitting transfers into sub-transfers with SHORT_NOT_OK may be even
&lt;br&gt;dangerous in some situations:
&lt;br&gt;- USB specification recommends to ignore transfers not associated with
&lt;br&gt;&amp;nbsp; any pending IRP.
&lt;br&gt;- When short transfer occurs and SHORT_NOT_OK is set, host controller
&lt;br&gt;&amp;nbsp; closes the current IRP.
&lt;br&gt;- Software issues new URB, it issues new IRP on the bus.
&lt;br&gt;- There may be a race between them and data may be lost.
&lt;br&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Best Regards / S pozdravem,
&lt;br&gt;&lt;br&gt;Stanislav Brabec
&lt;br&gt;software developer
&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;SUSE LINUX, s. r. o. &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26780090&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;sbrabec@...&lt;/a&gt;
&lt;br&gt;Lihovarská 1060/12 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tel: +420 284 028 966, +49 911 740538747
&lt;br&gt;190 00 Praha 9 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;fax: +420 284 028 951
&lt;br&gt;Czech Republic &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;a href=&quot;http://www.suse.cz/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.suse.cz/&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;Return on Information:
&lt;br&gt;Google Enterprise Search pays you back
&lt;br&gt;Get the facts.
&lt;br&gt;&lt;a href=&quot;http://p.sf.net/sfu/google-dev2dev&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/google-dev2dev&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Libusb-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26780090&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Libusb-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/libusb-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/libusb-devel&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/LibUSB-Dev-f14232.html&quot; embed=&quot;fixTarget[14232]&quot; target=&quot;_top&quot; &gt;LibUSB Dev&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/libusb-compat-x-libusb0%3A-new-incompatibility-%28long-request%2C-short-transfer%2C-Brother-scanner%29-tp26747144p26780090.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26767054</id>
	<title>Re: Unable to claim an experimental HID device</title>
	<published>2009-12-13T07:30:29Z</published>
	<updated>2009-12-13T07:30:29Z</updated>
	<author>
		<name>John Parsons-2</name>
	</author>
	<content type="html">&lt;br&gt;&amp;quot;Xiaofan Chen&amp;quot; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26767054&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;xiaofanc@...&lt;/a&gt;&amp;gt; said:
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;gt; You need to detach the Linux driver and then claim the interface.
&lt;br&gt;&amp;gt; Please look at these functions.
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://libusb.sourceforge.net/doc/ref.nonportable.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://libusb.sourceforge.net/doc/ref.nonportable.html&lt;/a&gt;&lt;br&gt;&lt;br&gt;Xiaofan, you are beautiful! Thank you, I am now able to send data to the
&lt;br&gt;device, though of course it does not yet do what I expect it to do. 
&lt;br&gt;More hacking to come, and thank you for the other references.
&lt;br&gt;&lt;br&gt;I'll be back...
&lt;br&gt;&lt;br&gt;John Parsons
&lt;br&gt;-- 
&lt;br&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;&lt;a href=&quot;http://www.fastmail.fm&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.fastmail.fm&lt;/a&gt;&amp;nbsp;- A no graphics, no pop-ups email service
&lt;br&gt;&lt;br&gt;&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;Return on Information:
&lt;br&gt;Google Enterprise Search pays you back
&lt;br&gt;Get the facts.
&lt;br&gt;&lt;a href=&quot;http://p.sf.net/sfu/google-dev2dev&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/google-dev2dev&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Libusb-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26767054&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Libusb-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/libusb-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/libusb-devel&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/LibUSB-Dev-f14232.html&quot; embed=&quot;fixTarget[14232]&quot; target=&quot;_top&quot; &gt;LibUSB Dev&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Unable-to-claim-an-experimental-HID-device-tp26763966p26767054.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26764707</id>
	<title>Re: Unable to claim an experimental HID device</title>
	<published>2009-12-13T01:50:05Z</published>
	<updated>2009-12-13T01:50:05Z</updated>
	<author>
		<name>Xiaofan Chen</name>
	</author>
	<content type="html">On Sun, Dec 13, 2009 at 2:19 PM, John Parsons &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26764707&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jfparsons@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&lt;br&gt;&amp;gt; Microchip is windows-centric, I am not. I borrowed an XP machine to test
&lt;br&gt;&amp;gt; the unmodified device firmware, and it works. To test modifications, I
&lt;br&gt;&amp;gt; would have to get long term access to an XP box to exercise the device.
&lt;br&gt;&lt;br&gt;Microchip actually provides some Linux samples with libusb
&lt;br&gt;(using QT3 as the GUI toolkit).
&lt;br&gt;&lt;br&gt;&amp;gt; I'd rather use Linux, and libusb looks like a great way to test the
&lt;br&gt;&amp;gt; rather simple functions of the device. But I'm unsuccessful in
&lt;br&gt;&amp;gt; establishing communication.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;    usb_handle = usb_open(usb_dev);   /* usb_handle is not NULL  */
&lt;br&gt;&amp;gt;    usb_claim_interface(usb_handle, 0);
&lt;br&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;You need to detach the Linux driver and then claim the interface.
&lt;br&gt;Please look at these functions.
&lt;br&gt;&lt;a href=&quot;http://libusb.sourceforge.net/doc/ref.nonportable.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://libusb.sourceforge.net/doc/ref.nonportable.html&lt;/a&gt;&lt;br&gt;&lt;br&gt;Microchip also publishes the source codes of pk2cmd (cross
&lt;br&gt;platform for Windows, Linux and Mac OS X), you may get
&lt;br&gt;some references from there as well.
&lt;br&gt;&lt;br&gt;Here are some references for USB PIC related open source
&lt;br&gt;projects.
&lt;br&gt;&lt;a href=&quot;http://www.microchip.com/forums/tm.aspx?m=235427&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.microchip.com/forums/tm.aspx?m=235427&lt;/a&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Xiaofan &lt;a href=&quot;http://mcuee.blogspot.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://mcuee.blogspot.com&lt;/a&gt;&lt;br&gt;&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;Return on Information:
&lt;br&gt;Google Enterprise Search pays you back
&lt;br&gt;Get the facts.
&lt;br&gt;&lt;a href=&quot;http://p.sf.net/sfu/google-dev2dev&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/google-dev2dev&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Libusb-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26764707&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Libusb-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/libusb-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/libusb-devel&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/LibUSB-Dev-f14232.html&quot; embed=&quot;fixTarget[14232]&quot; target=&quot;_top&quot; &gt;LibUSB Dev&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Unable-to-claim-an-experimental-HID-device-tp26763966p26764707.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26764624</id>
	<title>Re: Timeout vs data</title>
	<published>2009-12-13T01:30:22Z</published>
	<updated>2009-12-13T01:30:22Z</updated>
	<author>
		<name>Daniel Drake-2</name>
	</author>
	<content type="html">El 13/12/09 06:41, Dimax escribió:
&lt;br&gt;&amp;gt; Hi,
&lt;br&gt;&amp;gt; I remember there was some discussion and attempts to do something with
&lt;br&gt;&amp;gt; a possible race between timeout in bulk_read and data arrival. I mean
&lt;br&gt;&amp;gt; situation then timeout expires and just the same time data arrives
&lt;br&gt;&amp;gt; from device. Can you tell me the current status and especially
&lt;br&gt;&amp;gt; situation in libusb 0.1.
&lt;br&gt;&lt;br&gt;Nobody is really working or paying attention to 0.1 but I think there 
&lt;br&gt;was a mention that data can be lost on a timeout.
&lt;br&gt;&lt;br&gt;You could use usbmon to confirm a difference in the eyes of the kernel 
&lt;br&gt;from what your application gets from libusb.
&lt;br&gt;&lt;br&gt;It is fixed in the latest libusb-1.0 release with recent linux kernels.
&lt;br&gt;&lt;br&gt;Daniel
&lt;br&gt;&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;Return on Information:
&lt;br&gt;Google Enterprise Search pays you back
&lt;br&gt;Get the facts.
&lt;br&gt;&lt;a href=&quot;http://p.sf.net/sfu/google-dev2dev&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/google-dev2dev&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Libusb-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26764624&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Libusb-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/libusb-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/libusb-devel&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/LibUSB-Dev-f14232.html&quot; embed=&quot;fixTarget[14232]&quot; target=&quot;_top&quot; &gt;LibUSB Dev&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Timeout-vs-data-tp26731099p26764624.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26764024</id>
	<title>Timeout vs data</title>
	<published>2009-12-12T22:41:54Z</published>
	<updated>2009-12-12T22:41:54Z</updated>
	<author>
		<name>Dimax</name>
	</author>
	<content type="html">Hi,
&lt;br&gt;I remember there was some discussion and attempts to do something with
&lt;br&gt;a possible race between timeout in bulk_read and data arrival. I mean
&lt;br&gt;situation then timeout expires and just the same time data arrives
&lt;br&gt;from device. Can you tell me the current status and especially
&lt;br&gt;situation in libusb 0.1.
&lt;br&gt;We seams to have lost bulks  in polling with 20ms timeout with
&lt;br&gt;bulk_read. Can such race be a problem?
&lt;br&gt;&lt;br&gt;Thanks.
&lt;br&gt;&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;Return on Information:
&lt;br&gt;Google Enterprise Search pays you back
&lt;br&gt;Get the facts.
&lt;br&gt;&lt;a href=&quot;http://p.sf.net/sfu/google-dev2dev&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/google-dev2dev&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Libusb-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26764024&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Libusb-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/libusb-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/libusb-devel&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/LibUSB-Dev-f14232.html&quot; embed=&quot;fixTarget[14232]&quot; target=&quot;_top&quot; &gt;LibUSB Dev&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Timeout-vs-data-tp26731099p26764024.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26763966</id>
	<title>Unable to claim an experimental HID device</title>
	<published>2009-12-12T22:19:09Z</published>
	<updated>2009-12-12T22:19:09Z</updated>
	<author>
		<name>John Parsons-2</name>
	</author>
	<content type="html">Greetings,
&lt;br&gt;I am a hardware-centric person developing a relatively simple HID
&lt;br&gt;device. I'm using Microchip's low pin count USB development kit, and
&lt;br&gt;their pre-compiled 'Simple HID Device Demo' application as a starting
&lt;br&gt;point.
&lt;br&gt;&lt;br&gt;Microchip is windows-centric, I am not. I borrowed an XP machine to test
&lt;br&gt;the unmodified device firmware, and it works. To test modifications, I
&lt;br&gt;would have to get long term access to an XP box to exercise the device.
&lt;br&gt;&lt;br&gt;I'd rather use Linux, and libusb looks like a great way to test the
&lt;br&gt;rather simple functions of the device. But I'm unsuccessful in
&lt;br&gt;establishing communication.
&lt;br&gt;&lt;br&gt;System is Ubuntu 8.04, kernel 2.6.24-26-generic, libusb 0.12 installed
&lt;br&gt;via apt-get install libusb-dev
&lt;br&gt;&lt;br&gt;Here's a summary of what I'm doing and where the problem occurs (I can
&lt;br&gt;post the full code if that will help):
&lt;br&gt;&amp;nbsp; &amp;nbsp; struct usb_device *usb_dev;
&lt;br&gt;&amp;nbsp; &amp;nbsp; struct usb_dev_handle *usb_handle;
&lt;br&gt;&amp;nbsp; &amp;nbsp; struct usb_device *dev;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; usb_init();
&lt;br&gt;&amp;nbsp; &amp;nbsp; usb_find_busses();
&lt;br&gt;&amp;nbsp; &amp;nbsp; usb_find_devices();
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; /* find device by idVendor and idProduct, this works */
&lt;br&gt;&amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; usb_handle = usb_open(usb_dev); &amp;nbsp; /* usb_handle is not NULL &amp;nbsp;*/
&lt;br&gt;&amp;nbsp; &amp;nbsp; usb_claim_interface(usb_handle, 0);
&lt;br&gt;&lt;br&gt;At this point usb_claim_interface returns -16.
&lt;br&gt;I'm sure 0 is the correct interface number (device descriptor listed
&lt;br&gt;below). If I substitute an interface number of 1 or 2,
&lt;br&gt;usb_claim_interface returns -2.
&lt;br&gt;What does -16 indicate, and what should I do to fix the problem?
&lt;br&gt;&lt;br&gt;The device descriptor, as listed in response to sudo lsusb -v
&lt;br&gt;Bus 001 Device 002: ID 04d8:003f Microchip Technology, Inc. 
&lt;br&gt;Device Descriptor:
&lt;br&gt;&amp;nbsp; bLength &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;18
&lt;br&gt;&amp;nbsp; bDescriptorType &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1
&lt;br&gt;&amp;nbsp; bcdUSB &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2.00
&lt;br&gt;&amp;nbsp; bDeviceClass &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 (Defined at Interface level)
&lt;br&gt;&amp;nbsp; bDeviceSubClass &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0 
&lt;br&gt;&amp;nbsp; bDeviceProtocol &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0 
&lt;br&gt;&amp;nbsp; bMaxPacketSize0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 8
&lt;br&gt;&amp;nbsp; idVendor &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0x04d8 Microchip Technology, Inc.
&lt;br&gt;&amp;nbsp; idProduct &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0x003f 
&lt;br&gt;&amp;nbsp; bcdDevice &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0.02
&lt;br&gt;&amp;nbsp; iManufacturer &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1 Microchip Technology Inc.
&lt;br&gt;&amp;nbsp; iProduct &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2 Simple HID Device Demo
&lt;br&gt;&amp;nbsp; iSerial &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0 
&lt;br&gt;&amp;nbsp; bNumConfigurations &amp;nbsp; &amp;nbsp; &amp;nbsp;1
&lt;br&gt;&amp;nbsp; Configuration Descriptor:
&lt;br&gt;&amp;nbsp; &amp;nbsp; bLength &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 9
&lt;br&gt;&amp;nbsp; &amp;nbsp; bDescriptorType &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2
&lt;br&gt;&amp;nbsp; &amp;nbsp; wTotalLength &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 41
&lt;br&gt;&amp;nbsp; &amp;nbsp; bNumInterfaces &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1
&lt;br&gt;&amp;nbsp; &amp;nbsp; bConfigurationValue &amp;nbsp; &amp;nbsp; 1
&lt;br&gt;&amp;nbsp; &amp;nbsp; iConfiguration &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 
&lt;br&gt;&amp;nbsp; &amp;nbsp; bmAttributes &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0xc0
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; Self Powered
&lt;br&gt;&amp;nbsp; &amp;nbsp; MaxPower &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;100mA
&lt;br&gt;&amp;nbsp; &amp;nbsp; Interface Descriptor:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; bLength &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 9
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; bDescriptorType &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 4
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; bInterfaceNumber &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; bAlternateSetting &amp;nbsp; &amp;nbsp; &amp;nbsp; 0
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; bNumEndpoints &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; bInterfaceClass &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 3 Human Interface Device
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; bInterfaceSubClass &amp;nbsp; &amp;nbsp; &amp;nbsp;0 No Subclass
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; bInterfaceProtocol &amp;nbsp; &amp;nbsp; &amp;nbsp;0 None
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; iInterface &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; HID Device Descriptor:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; bLength &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 9
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; bDescriptorType &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;33
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; bcdHID &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1.11
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; bCountryCode &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 Not supported
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; bNumDescriptors &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; bDescriptorType &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;34 Report
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; wDescriptorLength &amp;nbsp; &amp;nbsp; &amp;nbsp;29
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Report Descriptors: 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;** UNAVAILABLE **
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; Endpoint Descriptor:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; bLength &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 7
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; bDescriptorType &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 5
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; bEndpointAddress &amp;nbsp; &amp;nbsp; 0x81 &amp;nbsp;EP 1 IN
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; bmAttributes &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;3
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Transfer Type &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Interrupt
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Synch Type &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; None
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Usage Type &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Data
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; wMaxPacketSize &amp;nbsp; &amp;nbsp; 0x0040 &amp;nbsp;1x 64 bytes
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; bInterval &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; Endpoint Descriptor:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; bLength &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 7
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; bDescriptorType &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 5
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; bEndpointAddress &amp;nbsp; &amp;nbsp; 0x01 &amp;nbsp;EP 1 OUT
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; bmAttributes &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;3
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Transfer Type &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Interrupt
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Synch Type &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; None
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Usage Type &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Data
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; wMaxPacketSize &amp;nbsp; &amp;nbsp; 0x0040 &amp;nbsp;1x 64 bytes
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; bInterval &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1
&lt;br&gt;Device Status: &amp;nbsp; &amp;nbsp; 0x0001
&lt;br&gt;&amp;nbsp; Self Powered
&lt;br&gt;&lt;br&gt;Thank you for any suggestions,
&lt;br&gt;peasey
&lt;br&gt;-- 
&lt;br&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;&lt;a href=&quot;http://www.fastmail.fm&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.fastmail.fm&lt;/a&gt;&amp;nbsp;- A fast, anti-spam email service.
&lt;br&gt;&lt;br&gt;&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;Return on Information:
&lt;br&gt;Google Enterprise Search pays you back
&lt;br&gt;Get the facts.
&lt;br&gt;&lt;a href=&quot;http://p.sf.net/sfu/google-dev2dev&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/google-dev2dev&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Libusb-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26763966&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Libusb-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/libusb-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/libusb-devel&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/LibUSB-Dev-f14232.html&quot; embed=&quot;fixTarget[14232]&quot; target=&quot;_top&quot; &gt;LibUSB Dev&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Unable-to-claim-an-experimental-HID-device-tp26763966p26763966.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26760984</id>
	<title>Re: libusb-compat x libusb0: new incompatibility (long request, short transfer, Brother scanner)</title>
	<published>2009-12-12T12:38:08Z</published>
	<updated>2009-12-12T12:38:08Z</updated>
	<author>
		<name>Daniel Drake-2</name>
	</author>
	<content type="html">El 11/12/09 16:20, Stanislav Brabec escribió:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hallo.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I just found and finished analysis of the scanning failure of Brother
&lt;br&gt;&amp;gt; scanners using brscan SANE drivers.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; It seems that libusb0 and libusb-compat behaves differently on short
&lt;br&gt;&amp;gt; transfer happening for bulk transfers of requested size&amp;gt;= 16384.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; The scanning backend heavily depends on its exact behavior of libusb0
&lt;br&gt;&amp;gt; and fails to scan properly with libusb-compat.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; If short transfer happens and length&amp;gt;= 16384 was requested:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; libusb0 returns the incomplete block read by the first URB, not trying
&lt;br&gt;&amp;gt; to ask for more data.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; libusb-compat asks for second URB and concatenates buffers into one
&lt;br&gt;&amp;gt; bigger block.
&lt;/div&gt;&lt;br&gt;Thanks for investigating this.
&lt;br&gt;&lt;br&gt;I guess the approach you're looking at taking is forcing libusb-compat 
&lt;br&gt;to never submit a transfer bigger than 16kb. It will hurt performance 
&lt;br&gt;significantly, but I guess that would be acceptable.
&lt;br&gt;&lt;br&gt;However, you should also consider that we've fixed this properly in more 
&lt;br&gt;recent Linux kernels and the latest libusb release. So your patch should 
&lt;br&gt;have some condition to stick to the current scheme on a system where the 
&lt;br&gt;kernel is new enough, or something like that.
&lt;br&gt;&lt;br&gt;cheers
&lt;br&gt;Daniel
&lt;br&gt;&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;Return on Information:
&lt;br&gt;Google Enterprise Search pays you back
&lt;br&gt;Get the facts.
&lt;br&gt;&lt;a href=&quot;http://p.sf.net/sfu/google-dev2dev&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/google-dev2dev&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Libusb-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26760984&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Libusb-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/libusb-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/libusb-devel&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/LibUSB-Dev-f14232.html&quot; embed=&quot;fixTarget[14232]&quot; target=&quot;_top&quot; &gt;LibUSB Dev&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/libusb-compat-x-libusb0%3A-new-incompatibility-%28long-request%2C-short-transfer%2C-Brother-scanner%29-tp26747144p26760984.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26752951</id>
	<title>Re: how is &lt; 2 ms RTT possible over USB?</title>
	<published>2009-12-11T15:16:01Z</published>
	<updated>2009-12-11T15:16:01Z</updated>
	<author>
		<name>Timo Juhani Lindfors</name>
	</author>
	<content type="html">Hans Petter Selasky &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26752951&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;hselasky@...&lt;/a&gt;&amp;gt; writes:
&lt;br&gt;&amp;gt; That depends on the USB hardware driver, like EHCI/OHCI/UHCI.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Typically the EHCI can interrupt every 125us. RTT should then be less than 
&lt;br&gt;&amp;gt; 1ms.
&lt;br&gt;&lt;br&gt;Openmoko does only USB1. The driver is ohci-s3c2410.c I think.
&lt;br&gt;&lt;br&gt;&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;Return on Information:
&lt;br&gt;Google Enterprise Search pays you back
&lt;br&gt;Get the facts.
&lt;br&gt;&lt;a href=&quot;http://p.sf.net/sfu/google-dev2dev&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/google-dev2dev&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Libusb-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26752951&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Libusb-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/libusb-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/libusb-devel&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/LibUSB-Dev-f14232.html&quot; embed=&quot;fixTarget[14232]&quot; target=&quot;_top&quot; &gt;LibUSB Dev&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/how-is-%3C-2-ms-RTT-possible-over-USB--tp26740915p26752951.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26749561</id>
	<title>Re: [PATCH: winusb] hires timer fix</title>
	<published>2009-12-11T10:40:47Z</published>
	<updated>2009-12-11T10:40:47Z</updated>
	<author>
		<name>Michael Plante</name>
	</author>
	<content type="html">Tim Roberts wrote:
&lt;br&gt;&amp;gt;&amp;gt; Michael Plante wrote:
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; I should warn, though, that when I ran Win2k on a hyperthreaded P4
&lt;br&gt;(single core), it reported 2 processors (not sure about that API,
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; but, rather, that's what it said when booting up with /SOS during the
&lt;br&gt;low-res graphical bootup screen). &amp;nbsp;I don't believe XP has this issue.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; What issue? &amp;nbsp;A single core hyperthreaded CPU has 2 processors. &amp;nbsp;Two
&lt;br&gt;&amp;gt;&amp;gt; threads can run simultaneously (well, &amp;quot;virtually&amp;quot; simultaneously). &amp;nbsp;The
&lt;br&gt;&amp;gt;&amp;gt; performance is a bit different from a dual core non-hyperthreaded CPU,
&lt;br&gt;&amp;gt;&amp;gt; but the usage is identical.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; [...] &amp;nbsp;What else would you have it do?
&lt;br&gt;&lt;br&gt;Sorry, I realized after I sent it that &amp;quot;issue&amp;quot; was too strong a word. &amp;nbsp;It
&lt;br&gt;might be something to be investigated, as far as whether you might get away
&lt;br&gt;with treating it with the single-core case (i.e., whether you can get away
&lt;br&gt;with not messing with thread affinity). &amp;nbsp;I just don't know, and I should've
&lt;br&gt;made that clearer.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;gt;&amp;gt; Every Windows and Linux system I've ever encountered reports it as 2
&lt;br&gt;&amp;gt;&amp;gt; processors.
&lt;br&gt;&lt;br&gt;I misremembered, and read too much into what I did remember. &amp;nbsp;XP is at least
&lt;br&gt;aware of HTT, while 2000 treats it no differently than 2 distinct
&lt;br&gt;processors. &amp;nbsp;Again, I overemphasized any certainty that it's important.
&lt;br&gt;&lt;br&gt;Michael
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;Return on Information:
&lt;br&gt;Google Enterprise Search pays you back
&lt;br&gt;Get the facts.
&lt;br&gt;&lt;a href=&quot;http://p.sf.net/sfu/google-dev2dev&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/google-dev2dev&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Libusb-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26749561&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Libusb-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/libusb-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/libusb-devel&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/LibUSB-Dev-f14232.html&quot; embed=&quot;fixTarget[14232]&quot; target=&quot;_top&quot; &gt;LibUSB Dev&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-PATCH%3A-winusb--hires-timer-fix-tp26726508p26749561.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26749357</id>
	<title>Re: [PATCH: winusb] hires timer fix</title>
	<published>2009-12-11T10:30:23Z</published>
	<updated>2009-12-11T10:30:23Z</updated>
	<author>
		<name>Tim Roberts</name>
	</author>
	<content type="html">Michael Plante wrote:
&lt;br&gt;&amp;gt; Do we have any idea of the magnitude of possible discrepancy from one processor to another? &amp;nbsp;Is it enough to matter? &amp;nbsp;Are we talking minutes or nanoseconds?
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;br&gt;&lt;br&gt;I have seen up to half a second. &amp;nbsp;And, surprisingly, the delta can vary
&lt;br&gt;over time, presumably because of fine-grained power management.
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Tim Roberts, &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26749357&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;timr@...&lt;/a&gt;
&lt;br&gt;Providenza &amp; Boekelheide, Inc.
&lt;br&gt;&lt;br&gt;&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;Return on Information:
&lt;br&gt;Google Enterprise Search pays you back
&lt;br&gt;Get the facts.
&lt;br&gt;&lt;a href=&quot;http://p.sf.net/sfu/google-dev2dev&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/google-dev2dev&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Libusb-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26749357&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Libusb-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/libusb-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/libusb-devel&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/LibUSB-Dev-f14232.html&quot; embed=&quot;fixTarget[14232]&quot; target=&quot;_top&quot; &gt;LibUSB Dev&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-PATCH%3A-winusb--hires-timer-fix-tp26726508p26749357.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26749350</id>
	<title>Re: how is &lt; 2 ms RTT possible over USB?</title>
	<published>2009-12-11T10:29:31Z</published>
	<updated>2009-12-11T10:29:31Z</updated>
	<author>
		<name>Tim Roberts</name>
	</author>
	<content type="html">Timo Juhani Lindfors wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hi,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I connected &amp;quot;A-link gigabit usb 2.0 ethernet adapter&amp;quot; 
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Bus 001 Device 005: ID 0b95:1780 ASIX Electronics Corp. AX88178}
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; to my openmoko and measured RTT time with icmp ping:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; 64 bytes from 10.7.6.1: icmp_seq=298 ttl=64 time=2.38 ms
&lt;br&gt;&amp;gt; 64 bytes from 10.7.6.1: icmp_seq=299 ttl=64 time=2.08 ms
&lt;br&gt;&amp;gt; ...
&lt;br&gt;&amp;gt; How can the RTT be less than 2 ms? Aren't USB frames transmitted only
&lt;br&gt;&amp;gt; every 1 ms?
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;/div&gt;&lt;br&gt;Full-speed (USB 1.x) frames are 1 ms. &amp;nbsp;High-speed (USB 2) microframes
&lt;br&gt;are 125us. &amp;nbsp;A gigabit Ethernet controller is certainly going to be
&lt;br&gt;high-speed. &amp;nbsp;(In fact, gigabit Ethernet exceeds the achievable bandwidth
&lt;br&gt;of a high-speed pipe by a factor of about 3 to 1.)
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Tim Roberts, &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26749350&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;timr@...&lt;/a&gt;
&lt;br&gt;Providenza &amp; Boekelheide, Inc.
&lt;br&gt;&lt;br&gt;&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;Return on Information:
&lt;br&gt;Google Enterprise Search pays you back
&lt;br&gt;Get the facts.
&lt;br&gt;&lt;a href=&quot;http://p.sf.net/sfu/google-dev2dev&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/google-dev2dev&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Libusb-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26749350&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Libusb-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/libusb-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/libusb-devel&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/LibUSB-Dev-f14232.html&quot; embed=&quot;fixTarget[14232]&quot; target=&quot;_top&quot; &gt;LibUSB Dev&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/how-is-%3C-2-ms-RTT-possible-over-USB--tp26740915p26749350.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26749299</id>
	<title>Re: [PATCH: winusb] hires timer fix</title>
	<published>2009-12-11T10:27:55Z</published>
	<updated>2009-12-11T10:27:55Z</updated>
	<author>
		<name>Tim Roberts</name>
	</author>
	<content type="html">Michael Plante wrote:
&lt;br&gt;&amp;gt; I should warn, though, that when I ran Win2k on a hyperthreaded P4 (single core), it reported 2 processors (not sure about that API, but, rather, that's what it said when booting up with /SOS during the low-res graphical bootup screen). &amp;nbsp;I don't believe XP has this issue.
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;br&gt;&lt;br&gt;What issue? &amp;nbsp;A single core hyperthreaded CPU has 2 processors. &amp;nbsp;Two
&lt;br&gt;threads can run simultaneously (well, &amp;quot;virtually&amp;quot; simultaneously). &amp;nbsp;The
&lt;br&gt;performance is a bit different from a dual core non-hyperthreaded CPU,
&lt;br&gt;but the usage is identical.
&lt;br&gt;&lt;br&gt;Every Windows and Linux system I've ever encountered reports it as 2
&lt;br&gt;processors. &amp;nbsp;What else would you have it do?
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Tim Roberts, &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26749299&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;timr@...&lt;/a&gt;
&lt;br&gt;Providenza &amp; Boekelheide, Inc.
&lt;br&gt;&lt;br&gt;&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;Return on Information:
&lt;br&gt;Google Enterprise Search pays you back
&lt;br&gt;Get the facts.
&lt;br&gt;&lt;a href=&quot;http://p.sf.net/sfu/google-dev2dev&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://p.sf.net/sfu/google-dev2dev&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Libusb-devel mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26749299&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Libusb-devel@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/libusb-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/libusb-devel&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/LibUSB-Dev-f14232.html&quot; embed=&quot;fixTarget[14232]&quot; target=&quot;_top&quot; &gt;LibUSB Dev&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-PATCH%3A-winusb--hires-timer-fix-tp26726508p26749299.html" />
</entry>

</feed>
