<?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/409" />

	<title>Objective Development Forums</title>
	
	<link href="https://forums.obdev.at/index.php" />
	<updated>2007-04-18T18:54:00+02:00</updated>

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

		<entry>
		<author><name><![CDATA[spiff]]></name></author>
		<updated>2007-04-18T18:54:00+02:00</updated>

		<published>2007-04-18T18:54:00+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=409&amp;p=1244#p1244</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=409&amp;p=1244#p1244"/>
		<title type="html"><![CDATA[Re: Getting HID report descriptors]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=409&amp;p=1244#p1244"><![CDATA[
<blockquote><div><cite>spiff wrote:</cite>I tried USBsnoop and was able to extract some report descriptors from USB gameport device. It has a switch with four different modes, and I suppose each one gives a different report descriptor. Now I'm trying to &quot;decipher&quot; it (by re-creating the descriptors in the HID report descriptor tool), but it seems you are right: the report descriptors seem quite complex, and not optimal at all. Still, I think this exercise will give me a somewhat better understanding of what I need for my report descriptor.</div></blockquote><br />Turned out the four report descriptors were identical, so the position of the switch determines how each axis is mapped in the HID report.<br /><br />After deciphering the report descriptor it turns out that it is not that bad, although if I have understood the specs correctly, there are a few redundant entries in the descriptor. On the other hand, I suppose that makes it somewhat more readable.<br /><br />Now it seems to be time to do some reading of the specs  <img class="smilies" src="./../../../images/smilies/icon_wink.gif" alt=":wink:" title="Wink" /><p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=226">spiff</a> — Wed Apr 18, 2007 6:54 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[spiff]]></name></author>
		<updated>2007-04-18T15:50:57+02:00</updated>

		<published>2007-04-18T15:50:57+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=409&amp;p=1243#p1243</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=409&amp;p=1243#p1243"/>
		<title type="html"><![CDATA[Re: Getting HID report descriptors]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=409&amp;p=1243#p1243"><![CDATA[
Thanks for the reply.<br /><br /><blockquote><div><cite>Grendel wrote:</cite>I used <a href="http://benoit.papillault.free.fr/usbsnoop/doc.php.en" class="postlink">USBsnoop</a> for that. My experience w/ the commercial devices I looked at is that the developers had a hard time w/ the USB specs <img class="smilies" src="./../../../images/smilies/icon_smile.gif" alt=":)" title="Smile" /> I ended up reading the specs very carefully and came up w/ a fairly complex yet compact descriptor for the 3DP-Vert converter.</div></blockquote><br />I tried USBsnoop and was able to extract some report descriptors from USB gameport device. It has a switch with four different modes, and I suppose each one gives a different report descriptor. Now I'm trying to &quot;decipher&quot; it (by re-creating the descriptors in the HID report descriptor tool), but it seems you are right: the report descriptors seem quite complex, and not optimal at all. Still, I think this exercise will give me a somewhat better understanding of what I need for my report descriptor.<br /><br /><blockquote><div><cite>Grendel wrote:</cite><div class="codebox"><p>Code: </p><pre><code>USAGE_PAGE &#40;Generic Desktop&#41;<br />USAGE &#40;Joystick&#41;<br />COLLECTION &#40;Application&#41;<br />   USAGE &#40;Pointer&#41;<br />   COLLECTION &#40;Physical&#41;<br />     REPORT_COUNT &#40;2&#41;<br />     REPORT_SIZE &#40;8&#41;<br />     LOGICAL_MINIMUM &#40;-128&#41;<br />     LOGICAL_MAXIMUM &#40;127&#41;<br />     PHYSICAL_MINIMUM &#40;0&#41;<br />     PHYSICAL_MAXIMUM &#40;255&#41;<br />     USAGE_PAGE &#40;Generic Desktop&#41;<br />     USAGE &#40;X&#41;<br />     USAGE &#40;Y&#41;<br />     INPUT &#40;Data,Var,Abs&#41;<br />     REPORT_COUNT &#40;1&#41;<br />     REPORT_SIZE &#40;1&#41;<br />     LOGICAL_MINIMUM &#40;0&#41;<br />     LOGICAL_MAXIMUM &#40;1&#41;<br />     PHYSICAL_MAXIMUM &#40;1&#41;<br />     USAGE_PAGE &#40;Button&#41;<br />     USAGE_MINIMUM &#40;Button 1&#41;<br />     USAGE_MAXIMUM &#40;Button 1&#41;<br />     INPUT &#40;Data,Var,Abs&#41;<br />   END_COLLECTION<br />   REPORT_SIZE &#40;7&#41;<br />   INPUT &#40;Cnst,Ary,Abs&#41;<br />END_COLLECTION</code></pre></div><br /></div></blockquote><br />Thanks. I'll try that first, and then perhaps modify it to better suit my needs along the way. Since I'm using digital joysticks, I guess the range of the X- and Y-axis should be -1 to 1? In fact, perhaps this should be considered a gamepad, not a joystick, but I guess the difference is mostly the physical appearance, and this is indeed a joystick, just not with analogue axes.<br /><br /><blockquote><div><cite>Grendel wrote:</cite>Good question, I don't know if you can have two X/Y USAGEs in one report descriptor. Time to read the USB docs I'd say <img class="smilies" src="./../../../images/smilies/icon_wink.gif" alt=";)" title="Wink" /></div></blockquote><br />Ahh. I was hoping someone had already done the hard work of finding out. I guess I better start reading  <img class="smilies" src="./../../../images/smilies/icon_biggrin.gif" alt=":D" title="Very Happy" /><p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=226">spiff</a> — Wed Apr 18, 2007 3:50 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Grendel]]></name></author>
		<updated>2007-04-18T02:22:52+02:00</updated>

		<published>2007-04-18T02:22:52+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=409&amp;p=1241#p1241</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=409&amp;p=1241#p1241"/>
		<title type="html"><![CDATA[Re: Getting HID report descriptors]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=409&amp;p=1241#p1241"><![CDATA[
<blockquote><div><cite>spiff wrote:</cite>I am playing around with some simple USB HID game devices. Hardware es essentially the same as my <a href="http://symlink.dk/electro/c64key/" class="postlink">C64 USB keyboard</a>.<br /><br />1) Is there some tool that can show the HID report descriptor received when plugging in a device? I would like to use this to examine the report descriptor of some commercial HID devices (game-pads, joysticks, etc.) to get some better understanding of the HID report descriptor. Tool should run on either Windows XP or Linux.</div></blockquote><br />I used <a href="http://benoit.papillault.free.fr/usbsnoop/doc.php.en" class="postlink">USBsnoop</a> for that. My experience w/ the commercial devices I looked at is that the developers had a hard time w/ the USB specs <img class="smilies" src="./../../../images/smilies/icon_smile.gif" alt=":)" title="Smile" /> I ended up reading the specs very carefully and came up w/ a fairly complex yet compact descriptor for the 3DP-Vert converter.<br /><br /><blockquote><div><cite>spiff wrote:</cite>2) What is the most simple report descriptor for a two-axis digital joystick with one button? (old C64/Atari joystick). I looked at the Atari style joystick/controller to USB adapter by Raphaël Assénat, but this seems much more complicated than what I need.</div></blockquote><br />I would do something like this:<br /><br /><div class="codebox"><p>Code: </p><pre><code>USAGE_PAGE &#40;Generic Desktop&#41;<br />USAGE &#40;Joystick&#41;<br />COLLECTION &#40;Application&#41;<br />   USAGE &#40;Pointer&#41;<br />   COLLECTION &#40;Physical&#41;<br />     REPORT_COUNT &#40;2&#41;<br />     REPORT_SIZE &#40;8&#41;<br />     LOGICAL_MINIMUM &#40;-128&#41;<br />     LOGICAL_MAXIMUM &#40;127&#41;<br />     PHYSICAL_MINIMUM &#40;0&#41;<br />     PHYSICAL_MAXIMUM &#40;255&#41;<br />     USAGE_PAGE &#40;Generic Desktop&#41;<br />     USAGE &#40;X&#41;<br />     USAGE &#40;Y&#41;<br />     INPUT &#40;Data,Var,Abs&#41;<br />     REPORT_COUNT &#40;1&#41;<br />     REPORT_SIZE &#40;1&#41;<br />     LOGICAL_MINIMUM &#40;0&#41;<br />     LOGICAL_MAXIMUM &#40;1&#41;<br />     PHYSICAL_MAXIMUM &#40;1&#41;<br />     USAGE_PAGE &#40;Button&#41;<br />     USAGE_MINIMUM &#40;Button 1&#41;<br />     USAGE_MAXIMUM &#40;Button 1&#41;<br />     INPUT &#40;Data,Var,Abs&#41;<br />   END_COLLECTION<br />   REPORT_SIZE &#40;7&#41;<br />   INPUT &#40;Cnst,Ary,Abs&#41;<br />END_COLLECTION</code></pre></div><br /><br /><blockquote><div><cite>spiff wrote:</cite>3) If I want to have two joysticks connected to one controller, would you suggest a single report defining four different axis, or should this be done as two (identical) reports (one for each joystick)? I see that most multi-axis joysticks define the X and Y axis and the throttle and rudder. But ideally my setup has two X-axes and two Y-axis (one of each for each joystick). And also one button for each joystick.</div></blockquote><br />Good question, I don't know if you can have two X/Y USAGEs in one report descriptor. Time to read the USB docs I'd say <img class="smilies" src="./../../../images/smilies/icon_wink.gif" alt=";)" title="Wink" /><p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=101">Grendel</a> — Wed Apr 18, 2007 2:22 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[spiff]]></name></author>
		<updated>2007-04-17T01:19:43+02:00</updated>

		<published>2007-04-17T01:19:43+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=409&amp;p=1229#p1229</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=409&amp;p=1229#p1229"/>
		<title type="html"><![CDATA[Getting HID report descriptors]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=409&amp;p=1229#p1229"><![CDATA[
I am playing around with some simple USB HID game devices. Hardware es essentially the same as my <a href="http://symlink.dk/electro/c64key/" class="postlink">C64 USB keyboard</a>.<br /><br />1) Is there some tool that can show the HID report descriptor received when plugging in a device? I would like to use this to examine the report descriptor of some commercial HID devices (game-pads, joysticks, etc.) to get some better understanding of the HID report descriptor. Tool should run on either Windows XP or Linux.<br /><br />2) What is the most simple report descriptor for a two-axis digital joystick with one button? (old C64/Atari joystick). I looked at the Atari style joystick/controller to USB adapter by Raphaël Assénat, but this seems much more complicated than what I need.<br /><br />3) If I want to have two joysticks connected to one controller, would you suggest a single report defining four different axis, or should this be done as two (identical) reports (one for each joystick)? I see that most multi-axis joysticks define the X and Y axis and the throttle and rudder. But ideally my setup has two X-axes and two Y-axis (one of each for each joystick). And also one button for each joystick.<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=226">spiff</a> — Tue Apr 17, 2007 1:19 am</p><hr />
]]></content>
	</entry>
	</feed>
