Attached is the lsusb -v output, trimmed to only include the pedometer&#39;s info. I have many USB devices, so I didn&#39;t want to leave you to sort through a bunch of useless info.<br><br>I don&#39;t have the webcam with me at the moment, but I will see if I can find it when I am at home soon.<br>

<br clear="all">Thanks<br><br>Tom<br>
<br><br><div class="gmail_quote">On Tue, Sep 21, 2010 at 9:32 AM, Damjan Jovanovic <span dir="ltr">&lt;<a href="mailto:damjan.jov@gmail.com">damjan.jov@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

Please send the output of &quot;lsusb -v&quot; first so I can see if it&#39;s useful.<br>
<br>
Thank you for the offer<br>
<font color="#888888">Damjan<br>
</font><div><div></div><div class="h5"><br>
On Tue, Sep 21, 2010 at 3:58 PM, Tom Spear &lt;<a href="mailto:speeddymon@gmail.com">speeddymon@gmail.com</a>&gt; wrote:<br>
&gt; Now that I think about it, I have a webcam which the last supported windows<br>
&gt; version was XP. I&#39;m not using it for anything since I have another one which<br>
&gt; is supported in 7 and linux, but I don&#39;t know if it&#39;s picked up in linux<br>
&gt; either. I could send it your way too tho.<br>
&gt;<br>
&gt; Thanks<br>
&gt;<br>
&gt; Tom<br>
&gt;<br>
&gt;<br>
&gt; On Tue, Sep 21, 2010 at 8:54 AM, Tom Spear &lt;<a href="mailto:speeddymon@gmail.com">speeddymon@gmail.com</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; I have a USB pedometer that uploads the data to the internet. I could get<br>
&gt;&gt; another one and the driver software for you to play with. You have to be a<br>
&gt;&gt; registered member for a monthly fee to get one otherwise, but my job<br>
&gt;&gt; sponsors anyone that wants to get/stay in shape that works for them, so<br>
&gt;&gt; getting an extra pedometer is fine by me. I have been hoping for an<br>
&gt;&gt; opportunity to mention that it doesn&#39;t work, and this seems like as good as<br>
&gt;&gt; any. :-)<br>
&gt;&gt;<br>
&gt;&gt; Thanks<br>
&gt;&gt;<br>
&gt;&gt; Tom<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; On Tue, Sep 21, 2010 at 5:03 AM, Damjan Jovanovic &lt;<a href="mailto:damjan.jov@gmail.com">damjan.jov@gmail.com</a>&gt;<br>
&gt;&gt; wrote:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; On Wed, Sep 15, 2010 at 1:39 AM, Eric Durbin &lt;<a href="mailto:eadurbin@gmail.com">eadurbin@gmail.com</a>&gt; wrote:<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt; On Tue, Sep 14, 2010 at 10:48 AM, Damjan Jovanovic<br>
&gt;&gt;&gt; &gt; &lt;<a href="mailto:damjan.jov@gmail.com">damjan.jov@gmail.com</a>&gt;<br>
&gt;&gt;&gt; &gt; wrote:<br>
&gt;&gt;&gt; &gt;&gt;<br>
&gt;&gt;&gt; &gt;&gt; When last I heard from Alexander Morozov (October 2009), he wasn&#39;t<br>
&gt;&gt;&gt; &gt;&gt; working on those patches much, and had no interest in sending them to<br>
&gt;&gt;&gt; &gt;&gt; wine-patches.<br>
&gt;&gt;&gt; &gt;&gt;<br>
&gt;&gt;&gt; &gt;&gt; I did some work on USB since then, and sent some patches starting from<br>
&gt;&gt;&gt; &gt;&gt; around March 2010 (too many attempts to list, search for them). Most<br>
&gt;&gt;&gt; &gt;&gt; were rejected.<br>
&gt;&gt;&gt; &gt;&gt;<br>
&gt;&gt;&gt; &gt;&gt; The USB story goes as follows:<br>
&gt;&gt;&gt; &gt;&gt;<br>
&gt;&gt;&gt; &gt;&gt; My libusb patch was rejected IIRC because the libusb situation was<br>
&gt;&gt;&gt; &gt;&gt; unclear. There&#39;s the old libusb-0.1 and the new more powerful<br>
&gt;&gt;&gt; &gt;&gt; libusb-1.0. IIRC each *nix hacked up its own specific variation of<br>
&gt;&gt;&gt; &gt;&gt; libusb that had to be detected specifically, and some *nixes didn&#39;t<br>
&gt;&gt;&gt; &gt;&gt; support the libusb-1.0 interface yet (libusb-1.0 itself only supports<br>
&gt;&gt;&gt; &gt;&gt; Linux and MacOS when last I checked, and they were doing a Windows<br>
&gt;&gt;&gt; &gt;&gt; port).<br>
&gt;&gt;&gt; &gt;&gt;<br>
&gt;&gt;&gt; &gt;&gt; The ntoskrnl that Wine currently emulates is total bogus: one process<br>
&gt;&gt;&gt; &gt;&gt; per driver, drivers all in separate processes from each other. On<br>
&gt;&gt;&gt; &gt;&gt; Windows there&#39;s a single address space for all drivers and they can<br>
&gt;&gt;&gt; &gt;&gt; communicate amongst themselves. I don&#39;t think inter-driver<br>
&gt;&gt;&gt; &gt;&gt; communication is that crucial initially, but it will be eventually<br>
&gt;&gt;&gt; &gt;&gt; (eg. last I heard, the iPod driver stacks on top of USBSTOR.SYS, and<br>
&gt;&gt;&gt; &gt;&gt; multi-function USB devices can use a different driver for each<br>
&gt;&gt;&gt; &gt;&gt; interface - these may communicate among themselves with private ioctl<br>
&gt;&gt;&gt; &gt;&gt; requests). The big problem with the multi process situation is<br>
&gt;&gt;&gt; &gt;&gt; hardware sharing: how do you set it up so each driver accesses its own<br>
&gt;&gt;&gt; &gt;&gt; and only its own hardware?<br>
&gt;&gt;&gt; &gt;&gt;<br>
&gt;&gt;&gt; &gt;&gt; Drivers either start on system startup (Wine starts those with the<br>
&gt;&gt;&gt; &gt;&gt; first process that starts), or get loaded on-demand as the hardware is<br>
&gt;&gt;&gt; &gt;&gt; plugged in. Most drivers should install themselves to be loaded<br>
&gt;&gt;&gt; &gt;&gt; on-demand. Who loads those and how?<br>
&gt;&gt;&gt; &gt;&gt;<br>
&gt;&gt;&gt; &gt;&gt; Windows uses USBHUB.SYS to do device I/O and load drivers on demand.<br>
&gt;&gt;&gt; &gt;&gt; Alexandre didn&#39;t want that dll because it exports nothing (all its<br>
&gt;&gt;&gt; &gt;&gt; features are accessible via internal ioctls), and suggested adding the<br>
&gt;&gt;&gt; &gt;&gt; features to USBD.SYS instead, which we already have and which has<br>
&gt;&gt;&gt; &gt;&gt; exports. Now USBD.SYS is linked to by most (but not all) USB drivers<br>
&gt;&gt;&gt; &gt;&gt; so (most of the time) it automatically gets loaded into each one -<br>
&gt;&gt;&gt; &gt;&gt; great right? - but it has no idea which driver it got loaded with, nor<br>
&gt;&gt;&gt; &gt;&gt; a straightforward way to determine which device(s!) that driver wants<br>
&gt;&gt;&gt; &gt;&gt; to drive. Also, since most drivers only load on-demand, the driver<br>
&gt;&gt;&gt; &gt;&gt; will never load, and thus this won&#39;t work unless we load those drivers<br>
&gt;&gt;&gt; &gt;&gt; on startup instead. The other approach, which I tried, was to get<br>
&gt;&gt;&gt; &gt;&gt; Wine&#39;s mountmgr.sys to detect USB devices using HAL, then pass them to<br>
&gt;&gt;&gt; &gt;&gt; a loaded-on-startup instance of USBHUB.SYS using a Wine-private ioctl,<br>
&gt;&gt;&gt; &gt;&gt; which would detect the driver for the device and launch a new instance<br>
&gt;&gt;&gt; &gt;&gt; of itself that would make a device object and load the driver to<br>
&gt;&gt;&gt; &gt;&gt; attach to it. This was all a bit a hack (USBHUB.SYS uses environment<br>
&gt;&gt;&gt; &gt;&gt; variables to tell the child which device and driver to run) and<br>
&gt;&gt;&gt; &gt;&gt; Alexandre also didn&#39;t the the Wine-private ioctls. Alexander Morozov&#39;s<br>
&gt;&gt;&gt; &gt;&gt; patch did things the Windows way: all drivers in one ntoskrnl process<br>
&gt;&gt;&gt; &gt;&gt; - this won&#39;t work properly in Wine for years, if ever, since ntoskrnl<br>
&gt;&gt;&gt; &gt;&gt; is so incomplete and one bad driver will crash them all. Another<br>
&gt;&gt;&gt; &gt;&gt; possibility could be to keep drivers in separate processes, but allow<br>
&gt;&gt;&gt; &gt;&gt; inter-process communication, but I see serializing IRPs between<br>
&gt;&gt;&gt; &gt;&gt; processes as being complex and very slow.<br>
&gt;&gt;&gt; &gt;&gt;<br>
&gt;&gt;&gt; &gt;&gt; Driver installation is also quite a mission. Windows detects that the<br>
&gt;&gt;&gt; &gt;&gt; hardware doesn&#39;t have a driver installed, and then generates the<br>
&gt;&gt;&gt; &gt;&gt; device ID and compatible IDs and searches .INF files for one that can<br>
&gt;&gt;&gt; &gt;&gt; support it. Our setupapi needs to be substantially improved to be able<br>
&gt;&gt;&gt; &gt;&gt; to do the same, and some newdev.dll and manual INF parsing work to<br>
&gt;&gt;&gt; &gt;&gt; install the driver may also be necessary, and I can already think of<br>
&gt;&gt;&gt; &gt;&gt; cases where even class installers will be necessary too :-(.<br>
&gt;&gt;&gt; &gt;&gt;<br>
&gt;&gt;&gt; &gt;&gt; Wine only sends DeviceIoControl to drivers. For anything non-trivial,<br>
&gt;&gt;&gt; &gt;&gt; other file-related user-space functions (at least ReadFile, WriteFile)<br>
&gt;&gt;&gt; &gt;&gt; need to go to the driver too. The infrastructure for this does not<br>
&gt;&gt;&gt; &gt;&gt; even exist yet, and would probably affects wineserver as well.<br>
&gt;&gt;&gt; &gt;&gt;<br>
&gt;&gt;&gt; &gt;&gt; Regression tests for ntosnkrl.exe and kernel drivers don&#39;t exist, and<br>
&gt;&gt;&gt; &gt;&gt; are difficult to come up with, since we&#39;d have to compile and load<br>
&gt;&gt;&gt; &gt;&gt; drivers on Windows and run tests that don&#39;t crash Windows :-).<br>
&gt;&gt;&gt; &gt;&gt;<br>
&gt;&gt;&gt; &gt;&gt; So the architecture for USB support is tricky to say the least. But<br>
&gt;&gt;&gt; &gt;&gt; I&#39;d still like to resume work on my USB patches some time soon, would<br>
&gt;&gt;&gt; &gt;&gt; you like to help?<br>
&gt;&gt;&gt; &gt;<br>
&gt;&gt;&gt; &gt; I&#39;d be willing to help if you want some assistance. I don&#39;t know much<br>
&gt;&gt;&gt; &gt; about<br>
&gt;&gt;&gt; &gt; the subject yet, but I&#39;m readingĀ  programming the wdm atm.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Firstly I&#39;d like to find a cheap simple USB device that we can<br>
&gt;&gt;&gt; actually get working quickly. Earlier I was experimenting with my<br>
&gt;&gt;&gt; Blackberry driver, but that&#39;s not going far quickly, since it&#39;s a<br>
&gt;&gt;&gt; multi-protocol device (modem, mass storage, and proprietary protocols,<br>
&gt;&gt;&gt; etc.). I&#39;ve got a USB scanner that&#39;s unsupported by SANE, but that<br>
&gt;&gt;&gt; needs ReadFile/WriteFile which is a lot of work by itself. Same with<br>
&gt;&gt;&gt; USB flash sticks. I can get hold of an iPod but that&#39;s probably the<br>
&gt;&gt;&gt; most complex, needing to stack on top of USBSTOR.SYS IIRC. Ironically<br>
&gt;&gt;&gt; drivers for the easy hardware (USB mice) are unnecessary anyway, since<br>
&gt;&gt;&gt; the Linux drivers are good enough, and the Windows drivers probably<br>
&gt;&gt;&gt; need to be driven from user-space by bits Wine doesn&#39;t have. Maybe I<br>
&gt;&gt;&gt; should give up and just get something partially working, add the rest<br>
&gt;&gt;&gt; later gradually. Any ideas?<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Then it&#39;s largely a matter of design. I think Alexandre&#39;s idea<br>
&gt;&gt;&gt; (process per driver, host all USB code in USBD.SYS) is good enough<br>
&gt;&gt;&gt; initially.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Essentially the first steps would be:<br>
&gt;&gt;&gt; 1. libusb integration<br>
&gt;&gt;&gt; 2. driver loading hacks<br>
&gt;&gt;&gt; 3. driver -&gt; devices lookup<br>
&gt;&gt;&gt; 4. usb bus enumeration for devices<br>
&gt;&gt;&gt; 5. create pdo and fdo for each device<br>
&gt;&gt;&gt; 6. AddDevice to driver<br>
&gt;&gt;&gt; 7. perform I/O for IRPs coming down from the driver using libusb I/O<br>
&gt;&gt;&gt; functions<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; That should get a very basic driver (that only uses the control pipe)<br>
&gt;&gt;&gt; working. I&#39;ll try to get some of this done later this week/weekend.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Damjan<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;<br>
&gt;<br>
&gt;<br>
</div></div></blockquote></div><br>