<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
	<link rel="self" type="application/atom+xml" href="https://forums.obdev.at/app.php/feed/topic/2627" />

	<title>Objective Development Forums</title>
	
	<link href="https://forums.obdev.at/index.php" />
	<updated>2009-04-30T16:18:23+02:00</updated>

	<author><name><![CDATA[Objective Development Forums]]></name></author>
	<id>https://forums.obdev.at/app.php/feed/topic/2627</id>

		<entry>
		<author><name><![CDATA[opcode]]></name></author>
		<updated>2009-04-30T16:18:23+02:00</updated>

		<published>2009-04-30T16:18:23+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=2627&amp;p=9130#p9130</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=2627&amp;p=9130#p9130"/>
		<title type="html"><![CDATA[Re: Can't find device in windows, please help]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=2627&amp;p=9130#p9130"><![CDATA[
<blockquote><div><cite>snookie wrote:</cite>But that's what started the discussion, I can't talk to an HID device with libusb because windows locks it.  Is there a way to unlock it?</div></blockquote><br /><br />There are 2 ways to communicate with locked device in Windows that I know of.<br />1 : Native win calls using the DDK -&gt; Send / Receive feature reports.<br />2 : Install libusb (I recommend version libusb-win32-filter-bin-0.1.8.0.exe as others I have tried have issues) and make a call to -&gt; usb_control_msg.<br /><br />What compiler are you using for your Windows software as I can only show you examples for the above for use with VC++ 2003 - 2008 ?<br /><br />Also, what do you prefer, to make everyone install libusb to use your app, or should the app run without any additional drivers ?<br />Also libusb is very slow to enumerate devices and send data compared to native Win calls.<br />Having said that, libusb has it's place as it can do some things that aren't too easy using native calls.<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=1841">opcode</a> — Thu Apr 30, 2009 4:18 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[snookie]]></name></author>
		<updated>2009-04-28T19:32:55+02:00</updated>

		<published>2009-04-28T19:32:55+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=2627&amp;p=9108#p9108</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=2627&amp;p=9108#p9108"/>
		<title type="html"><![CDATA[Re: Can't find device in windows, please help]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=2627&amp;p=9108#p9108"><![CDATA[
Afraid you were going to say that.  What a bummer, I have re-write a lot of code to get this to work in Windows.<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=1317">snookie</a> — Tue Apr 28, 2009 7:32 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[christian]]></name></author>
		<updated>2009-04-28T19:27:27+02:00</updated>

		<published>2009-04-28T19:27:27+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=2627&amp;p=9107#p9107</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=2627&amp;p=9107#p9107"/>
		<title type="html"><![CDATA[Re: Can't find device in windows, please help]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=2627&amp;p=9107#p9107"><![CDATA[
Ah, sorry. Did not remember the context. Windows locks keyboards and mice, but not generic HIDs. If you have a keyboard or mouse, you probably need to send and receive a report.<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=8">christian</a> — Tue Apr 28, 2009 7:27 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[snookie]]></name></author>
		<updated>2009-04-28T18:38:42+02:00</updated>

		<published>2009-04-28T18:38:42+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=2627&amp;p=9106#p9106</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=2627&amp;p=9106#p9106"/>
		<title type="html"><![CDATA[Re: Can't find device in windows, please help]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=2627&amp;p=9106#p9106"><![CDATA[
But that's what started the discussion, I can't talk to an HID device with libusb because windows locks it.  Is there a way to unlock it?<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=1317">snookie</a> — Tue Apr 28, 2009 6:38 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[christian]]></name></author>
		<updated>2009-04-28T10:22:39+02:00</updated>

		<published>2009-04-28T10:22:39+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=2627&amp;p=9097#p9097</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=2627&amp;p=9097#p9097"/>
		<title type="html"><![CDATA[Re: Can't find device in windows, please help]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=2627&amp;p=9097#p9097"><![CDATA[
Yes. That's the way how HID report descriptors work.<br /><br />If you need a kind of RPC mechanism with only a couple of bytes sent to the device, consider raw setup requests with libusb-win32. This is an additional install, though.<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=8">christian</a> — Tue Apr 28, 2009 10:22 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[snookie]]></name></author>
		<updated>2009-04-28T01:46:24+02:00</updated>

		<published>2009-04-28T01:46:24+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=2627&amp;p=9087#p9087</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=2627&amp;p=9087#p9087"/>
		<title type="html"><![CDATA[Re: Can't find device in windows, please help]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=2627&amp;p=9087#p9087"><![CDATA[
Yeah, that's ridiculous.  Because the data I send back is dependent on the data I send down with SetReport.   So that means I need to implement a global variable that doesn't go away when functionsetup ends. <br /><br />Is that right?<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=1317">snookie</a> — Tue Apr 28, 2009 1:46 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[christian]]></name></author>
		<updated>2009-04-27T21:17:27+02:00</updated>

		<published>2009-04-27T21:17:27+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=2627&amp;p=9086#p9086</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=2627&amp;p=9086#p9086"/>
		<title type="html"><![CDATA[Re: Can't find device in windows, please help]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=2627&amp;p=9086#p9086"><![CDATA[
usbSetReport() sends data to the device. Use usbGetReport() to read data.<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=8">christian</a> — Mon Apr 27, 2009 9:17 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[snookie]]></name></author>
		<updated>2009-04-27T20:38:53+02:00</updated>

		<published>2009-04-27T20:38:53+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=2627&amp;p=9085#p9085</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=2627&amp;p=9085#p9085"/>
		<title type="html"><![CDATA[Re: Can't find device in windows, please help]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=2627&amp;p=9085#p9085"><![CDATA[
Christian - <br /><br />Are you saying from usbFunctionSetup, I can still return values with the usb message pointer?<br /><br />Tried this without any luck.  Tried pointing usbmessage pointer to a character array and returning the size of the array.<br /><br />Maybe I'm doing it wrong on the host but I always get zero back.<br /><br /><strong class="text-strong">int return_value =</strong> usbSetReport(dev, USB_HID_REPORT_TYPE_FEATURE, buffer, 4);  ?<br /><br />is that right?  Does usbSetReport return the value it receives back or am I supposed to pass it a return buffer?<br /><br />Thanks again, almost there = ).<br />Jason<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=1317">snookie</a> — Mon Apr 27, 2009 8:38 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[christian]]></name></author>
		<updated>2009-04-27T13:08:47+02:00</updated>

		<published>2009-04-27T13:08:47+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=2627&amp;p=9070#p9070</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=2627&amp;p=9070#p9070"/>
		<title type="html"><![CDATA[Re: Can't find device in windows, please help]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=2627&amp;p=9070#p9070"><![CDATA[
To receive data, you must implement usbFunctionWrite(). If you want to send data, you can still use the message pointer mechanism. The result is the same, except that you need to have the data in a static buffer beforehand. If you decide to implement usbFunctionRead(), you can generate the data on the fly.<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=8">christian</a> — Mon Apr 27, 2009 1:08 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[snookie]]></name></author>
		<updated>2009-04-26T08:19:42+02:00</updated>

		<published>2009-04-26T08:19:42+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=2627&amp;p=9065#p9065</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=2627&amp;p=9065#p9065"/>
		<title type="html"><![CDATA[Re: Can't find device in windows, please help]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=2627&amp;p=9065#p9065"><![CDATA[
So I finally had a chance to get a crack at this and I unfortunately hit a snag.  Like you mentioned, I can send control signals down to the device with:<br /><br />usbSetReport(dev, USB_HID_REPORT_TYPE_FEATURE, buffer, 4);<br /><br />However, in the firmware, if I want to receive any data at all, it looks like I need to do implement usbfunctionwrite and if I want to send back data I have to implement usbfunctionread?  Is that correct?<br /><br />Where as before, I can do all these things in usbfunctionsetup with bRequest, wValue.bytes, wValueIndex, and return the usb message pointer?<br /><br />Sorry for so many questions, it looks like I have to do a lot of extra work just to support windows and I'm very frustrated, because my firmware 'was' 100% done.<br /><br />Thanks for all your help, appreciate it.<br /><br />Best,<br />Jason<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=1317">snookie</a> — Sun Apr 26, 2009 8:19 am</p><hr />
]]></content>
	</entry>
	</feed>
