title: Converting a driver to linux
body: <p>I'm trying to write a linux driver to a device that i have the windows driver of (Similar to the case described <a href="http://ubuntuforums.org/showthread.php?t=708195" rel="nofollow">Here</a>, but a different device)</p>
  
  <p>I'm using Libusb for the communication on the linux side, and SourceUSB as my USB sniffer (on the windows machine). Now I think I've replicated the controls and bulks properly, but I can't really test the linux log against the windows one. I'm running Ubuntu 12.04 on a VM.</p>
  
  <p>So my questions are:</p>
  
  <ol>
  <li>Is there a multiplatform logger? That could really simplify the log compare process.</li>
  <li>When I attach the USB device to the VM - I get the VM driver in Windows. Sniffing this device gives me exactly what the device sees, right? I mean - Is this where I want to sniff?</li>
  </ol>
  
  <p>EDIT:
  I've compiled my application on windows (libusb is cross platform - A big thanks to libusb developers who did such a good job) and my application worked properly. </p>
  
  <p>When sniffing the VM driver while running my application on linux, I see the requests to the USB as VENDOR_DEVICE instead of CONTROL_TRANSFER and BULK_OR_INTERRUPT. This seems to be the problem if I understand correctly, since this is what the device "sees".</p>
  
  <p>So I guess my problem now is why does Linux sends my requests as vendor.</p>
  
  <p>ANOTHER EDIT: Problem solved:</p>
  
  <ol>
  <li>Listening to the VM driver gave me the wrong requests (I was listening to the VM driver  traffic, not, as i wanted, the traffic of the my USB linux driver</li>
  <li>Libusb is perfectly multiplatform. It took me a few minutes to get my code to compile under windows, and from there it was pretty easy to debug and compare logs</li>
  </ol>