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

	<title>Objective Development Forums</title>
	
	<link href="https://forums.obdev.at/index.php" />
	<updated>2013-02-28T23:36:17+02:00</updated>

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

		<entry>
		<author><name><![CDATA[xiangrui]]></name></author>
		<updated>2013-02-28T23:36:17+02:00</updated>

		<published>2013-02-28T23:36:17+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=8287&amp;p=24851#p24851</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=8287&amp;p=24851#p24851"/>
		<title type="html"><![CDATA[Re: change hid-data transfer size]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=8287&amp;p=24851#p24851"><![CDATA[
barney's reply about the hard-coded 128 in hidtool is right. You will need to change it 8 for the host side code, and re-compile it .<br />However, the fixed 64-byte is not true. It can be any number below a certain limit, as long as it is defined in the descriptor and treated correctly at both host and device sides.<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=6201">xiangrui</a> — Thu Feb 28, 2013 11:36 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[barney]]></name></author>
		<updated>2013-02-27T21:58:55+02:00</updated>

		<published>2013-02-27T21:58:55+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=8287&amp;p=24832#p24832</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=8287&amp;p=24832#p24832"/>
		<title type="html"><![CDATA[Re: change hid-data transfer size]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=8287&amp;p=24832#p24832"><![CDATA[
Oh also btw, the hidtool is hardcoded as well at 128 bytes.  So you may want to look at that C code, because even if you were successful and only storing and sending back less than 128 bytes to the hidtool, it will &quot;pad&quot; it out anyway.  Also keep in mind the smallest amount you can send and/or receive is probably 64 based on what I read somewhere.<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=19551">barney</a> — Wed Feb 27, 2013 9:58 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[barney]]></name></author>
		<updated>2013-02-27T21:54:42+02:00</updated>

		<published>2013-02-27T21:54:42+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=8287&amp;p=24831#p24831</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=8287&amp;p=24831#p24831"/>
		<title type="html"><![CDATA[Re: change hid-data transfer size]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=8287&amp;p=24831#p24831"><![CDATA[
I took a look at it myself and unfortunately can't see any other place to change it.  Sorry I couldn't help but at least you know someone is also blind to what needs to be changed.  I was told somewhere else that the data packets in this type of HID transfer are 64 bytes.  So maybe you are looking for some reference to x 2 or some kind of loop that goes twice to get 2 64 packets thus 128.  Good luck.<p>Statistics: Posted by <a href="https://forums.obdev.at/memberlist.php?mode=viewprofile&amp;u=19551">barney</a> — Wed Feb 27, 2013 9:54 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2013-02-16T10:56:57+02:00</updated>

		<published>2013-02-16T10:56:57+02:00</published>
		<id>https://forums.obdev.at/viewtopic.php?t=8287&amp;p=24753#p24753</id>
		<link href="https://forums.obdev.at/viewtopic.php?t=8287&amp;p=24753#p24753"/>
		<title type="html"><![CDATA[change hid-data transfer size]]></title>

		
		<content type="html" xml:base="https://forums.obdev.at/viewtopic.php?t=8287&amp;p=24753#p24753"><![CDATA[
I am modifying the hid-data demo to fit my needs.<br />I want to read only 8 bytes from the device using hidtool.<br />My descriptor is (I changed only REPORT_COUNT):<br /><div class="codebox"><p>Code: </p><pre><code>PROGMEM const char usbHidReportDescriptor&#91;&#93; = {    /* USB report descriptor */<br />    0x06, 0x00, 0xff,              // USAGE_PAGE (Generic Desktop)<br />    0x09, 0x01,                    // USAGE (Vendor Usage 1)<br />    0xa1, 0x01,                    // COLLECTION (Application)<br />    0x15, 0x00,                    //   LOGICAL_MINIMUM (0)<br />    0x26, 0xff, 0x00,              //   LOGICAL_MAXIMUM (255)<br />    0x75, 0x08,                    //   REPORT_SIZE (8)<br />    0x95, 0x08,                    //   REPORT_COUNT (8) // was 128<br />    0x09, 0x00,                    //   USAGE (Undefined)<br />    0xb2, 0x02, 0x01,              //   FEATURE (Data,Var,Abs,Buf)<br />    0xc0                           // END_COLLECTION<br />};<br /></code></pre></div><br /><br />When using hidtool from the demo I always get 128 bytes:<br /><div class="codebox"><p>Code: </p><pre><code>$ ./hidtool read<br />0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x19 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x19<br />0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x19 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x19<br />0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x19 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x19<br />0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x19 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x19<br />0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x19 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x19<br />0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x19 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x19<br />0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x19 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x19<br />0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x19 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x19<br /></code></pre></div><br />The numbers from 0x11 to 0x19 are hardcoded for testing, I return 8 at usbFunctionRead.<br />I have not found any hardcoded numbers in hidtool so I suspect that transfer sizes are taken from the operating system.<br />I always do a clean compile.<br />How can I read just 8 bytes using hidtool?<p>Statistics: Posted by Guest — Sat Feb 16, 2013 10:56 am</p><hr />
]]></content>
	</entry>
	</feed>
