<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.2" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>LeafLabs Garden &#187; Topic: DFU compliance and dfu-util</title>
		<link>http://forums.leaflabs.com/topic.php?id=1410</link>
		<description>A place to share, learn, and grow...</description>
		<language>en-US</language>
		<pubDate>Fri, 22 Jan 2016 00:08:57 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.2</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>http://forums.leaflabs.com/search.php</link>
		</textInput>
		<atom:link href="http://forums.leaflabs.com/rss.php?topic=1410" rel="self" type="application/rss+xml" />

		<item>
			<title>mbolivar on "DFU compliance and dfu-util"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1410&amp;page=2#post-10702</link>
			<pubDate>Wed, 16 May 2012 17:49:40 +0000</pubDate>
			<dc:creator>mbolivar</dc:creator>
			<guid isPermaLink="false">10702@http://forums.leaflabs.com/</guid>
			<description>&#60;blockquote&#62;&#60;p&#62;
For DFU there is no ambiguity :)
&#60;/p&#62;&#60;/blockquote&#62;
&#60;p&#62;Looks like you've got me there. This thread is perfect evidence that we're not great with DFU here at LeafLabs ;). I consider the fact that we use DFU to be an implementation detail, however, so I'm going to stick with the common usage in the documentation.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>tormod on "DFU compliance and dfu-util"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1410#post-10701</link>
			<pubDate>Wed, 16 May 2012 17:42:29 +0000</pubDate>
			<dc:creator>tormod</dc:creator>
			<guid isPermaLink="false">10701@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;For DFU there is no ambiguity :)&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://www.usb.org/developers/devclass_docs/usbdfu10.pdf&#34; rel=&#34;nofollow&#34;&#62;http://www.usb.org/developers/devclass_docs/usbdfu10.pdf&#60;/a&#62;
&#60;/p&#62;</description>
		</item>
		<item>
			<title>mbolivar on "DFU compliance and dfu-util"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1410#post-10700</link>
			<pubDate>Wed, 16 May 2012 17:26:49 +0000</pubDate>
			<dc:creator>mbolivar</dc:creator>
			<guid isPermaLink="false">10700@http://forums.leaflabs.com/</guid>
			<description>&#60;blockquote&#62;&#60;p&#62;
If you use &#34;git am&#34; you will preserve author and author date. That works even if you copy the above patches from the forum post and paste it to &#34;git am&#34;. Or from mail, just pipe the message to git am, or save the &#34;Show original&#34; text in a file and use git am on it.
&#60;/p&#62;&#60;/blockquote&#62;
&#60;p&#62;Thanks. I'm unfamiliar with Git's email/patch features, but I will use this in the future.&#60;/p&#62;
&#60;blockquote&#62;&#60;p&#62;
In the docs you say &#34;uploads&#34; but it is really &#34;downloads&#34;. You download to a device from a computer.
&#60;/p&#62;&#60;/blockquote&#62;
&#60;p&#62;I agree that the distinction between uploading and downloading can be ambiguous in situations like this, but &#34;upload&#34; is correct here, at least according to Wikipedia: &#34;Technically, if the user uses the receiving device to initiate the transfer, then it would be a download and if they used the sending device to initiate, it would be an upload.&#34;&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://en.wikipedia.org/wiki/Uploading_and_downloading#Sideload&#34; rel=&#34;nofollow&#34;&#62;http://en.wikipedia.org/wiki/Uploading_and_downloading#Sideload&#60;/a&#62;
&#60;/p&#62;</description>
		</item>
		<item>
			<title>tormod on "DFU compliance and dfu-util"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1410#post-10699</link>
			<pubDate>Wed, 16 May 2012 17:03:32 +0000</pubDate>
			<dc:creator>tormod</dc:creator>
			<guid isPermaLink="false">10699@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;If you use &#34;git am&#34; you will preserve author and author date. That works even if you copy the above patches from the forum post and paste it to &#34;git am&#34;. Or from mail, just pipe the message to git am, or save the &#34;Show original&#34; text in a file and use git am on it.&#60;/p&#62;
&#60;p&#62;In the docs you say &#34;uploads&#34; but it is really &#34;downloads&#34;. You download to a device from a computer.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>mbolivar on "DFU compliance and dfu-util"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1410#post-10695</link>
			<pubDate>Wed, 16 May 2012 12:06:32 +0000</pubDate>
			<dc:creator>mbolivar</dc:creator>
			<guid isPermaLink="false">10695@http://forums.leaflabs.com/</guid>
			<description>&#60;blockquote&#62;&#60;p&#62;
Great! Not sure why you changed the patch authorship to yourself though.&#60;/p&#62;
&#60;p&#62;Please say in the docs to use the newest dfu-util. Version 0.6 includes a quirk for the broken firmware. The next version will have the same quirk, but only apply it when bcdDevice == 2.00.&#60;/p&#62;
&#60;/blockquote&#62;
&#60;p&#62;I committed them myself since they were provided as raw patch files. You'll notice that the Signed-off-by: lines are still yours; I've only added Acked-by: lines for myself. According to my interpretation of the DCO, a sign-off can be used to convey authorship.&#60;/p&#62;
&#60;p&#62;Reading the manpage for git commit, I see now that I can provide author information on a per-commit basis. This was an honest mistake, and I do apologize. I've added a CREDITS file attributing the DFU fixes to you:&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;https://github.com/leaflabs/maple-bootloader/commit/cb8b7abfa059c7266bb6e023fe0c22342cbb0e01&#34; rel=&#34;nofollow&#34;&#62;https://github.com/leaflabs/maple-bootloader/commit/cb8b7abfa059c7266bb6e023fe0c22342cbb0e01&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;Thanks again for the patches!&#60;/p&#62;
&#60;p&#62;Edit: I've added warnings to the docs telling users they need recent versions of dfu-util:&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;https://github.com/leaflabs/leaflabs-docs/commit/70a209816930cb920a2071081931db37c60f5725&#34; rel=&#34;nofollow&#34;&#62;https://github.com/leaflabs/leaflabs-docs/commit/70a209816930cb920a2071081931db37c60f5725&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;These have been pushed to the current command line toolchain quickstart:&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://leaflabs.com/docs/unix-toolchain.html&#34; rel=&#34;nofollow&#34;&#62;http://leaflabs.com/docs/unix-toolchain.html&#60;/a&#62;
&#60;/p&#62;</description>
		</item>
		<item>
			<title>ventosus on "DFU compliance and dfu-util"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1410#post-10692</link>
			<pubDate>Wed, 16 May 2012 07:58:44 +0000</pubDate>
			<dc:creator>ventosus</dc:creator>
			<guid isPermaLink="false">10692@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;I switched from version 0.3 to 0.6 and can confirm that the quirks in version 0.6 work fine with a Maple Mini r3, which has the unfixed firmware and did not run with version 0.5.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>tormod on "DFU compliance and dfu-util"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1410#post-10691</link>
			<pubDate>Wed, 16 May 2012 04:09:49 +0000</pubDate>
			<dc:creator>tormod</dc:creator>
			<guid isPermaLink="false">10691@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;ala42, please run dfu-util with -v -v -v so that we can see what &#34;did not work&#34;.&#60;/p&#62;
&#60;p&#62;The STM32F4 built-in loader is using DfuSe (1.1a). I would not be surprised if the reset option did not work on it. Some DfuSe devices simply cannot reset themselves from DFU mode, and I am not sure the dfu-util tries hard enough either.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>ala42 on "DFU compliance and dfu-util"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1410#post-10675</link>
			<pubDate>Tue, 15 May 2012 17:49:00 +0000</pubDate>
			<dc:creator>ala42</dc:creator>
			<guid isPermaLink="false">10675@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Version 0.6 did not work with the maple boot loader in my test.&#60;br /&#62;
It did work with the STM32F4 built in boot loader, but the command line reset option did not reset the CPU. Can not tell if this is a problem of V0.6 or the boot loader.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>tormod on "DFU compliance and dfu-util"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1410#post-10673</link>
			<pubDate>Tue, 15 May 2012 17:31:28 +0000</pubDate>
			<dc:creator>tormod</dc:creator>
			<guid isPermaLink="false">10673@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Great! Not sure why you changed the patch authorship to yourself though.&#60;/p&#62;
&#60;p&#62;Please say in the docs to use the newest dfu-util. Version 0.6 includes a quirk for the broken firmware. The next version will have the same quirk, but only apply it when bcdDevice == 2.00.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>mbolivar on "DFU compliance and dfu-util"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1410#post-10651</link>
			<pubDate>Mon, 14 May 2012 15:15:52 +0000</pubDate>
			<dc:creator>mbolivar</dc:creator>
			<guid isPermaLink="false">10651@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;hey, sorry! thank you very much for your work. will apply.&#60;/p&#62;
&#60;p&#62;edit: tested this today (5/15/2012); will commit the patches to each board's branch&#60;/p&#62;
&#60;p&#62;edit 2: pushed. while this is too late for the most recent batch of boards (we apologize!), i'll stick a note in the command-line toolchain docs saying &#34;either use an old dfu-util or re-flash the bootloader&#34;. thanks again!&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;https://github.com/leaflabs/maple-bootloader/compare/b19de99d59...6a47cf0c4f&#34; rel=&#34;nofollow&#34;&#62;https://github.com/leaflabs/maple-bootloader/compare/b19de99d59...6a47cf0c4f&#60;/a&#62;&#60;br /&#62;
&#60;a href=&#34;https://github.com/leaflabs/maple-bootloader/compare/d329633e1c...c86a46008c&#34; rel=&#34;nofollow&#34;&#62;https://github.com/leaflabs/maple-bootloader/compare/d329633e1c...c86a46008c&#60;/a&#62;&#60;br /&#62;
&#60;a href=&#34;https://github.com/leaflabs/maple-bootloader/compare/f159a9012f...83bd6a4b48&#34; rel=&#34;nofollow&#34;&#62;https://github.com/leaflabs/maple-bootloader/compare/f159a9012f...83bd6a4b48&#60;/a&#62;&#60;br /&#62;
&#60;a href=&#34;https://github.com/leaflabs/maple-bootloader/compare/a718e0805c...70dc66ec41&#34; rel=&#34;nofollow&#34;&#62;https://github.com/leaflabs/maple-bootloader/compare/a718e0805c...70dc66ec41&#60;/a&#62;
&#60;/p&#62;</description>
		</item>
		<item>
			<title>tormod on "DFU compliance and dfu-util"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1410#post-10635</link>
			<pubDate>Sat, 12 May 2012 19:23:55 +0000</pubDate>
			<dc:creator>tormod</dc:creator>
			<guid isPermaLink="false">10635@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;And this is the suggested follow-up patch:&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;From: Tormod Volden &#38;lt;debian.tormod@gmail.com&#38;gt;
Date: Thu,  1 Mar 2012 23:05:41 +0100
Subject: [PATCH 2/2] Bump the bcdDevice to 2.01 now that the DFU descriptor is fixed

To let DFU programmers such as dfu-util know that they can trust
the DFU functional descriptor on this device.

Signed-off-by: Tormod Volden &#38;lt;debian.tormod@gmail.com&#38;gt;
---

This will make it possible for us to include a quirk in dfu-util
to override the reported DFU version if bcdDevice == 2.00. From
bcdDevice 2.01 on, we will believe the device :)

 usb_descriptor.c &#124;    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/usb_descriptor.c b/usb_descriptor.c
index 8e001e2..34140d2 100644
--- a/usb_descriptor.c
+++ b/usb_descriptor.c
@@ -50,7 +50,7 @@ u8 u8_usbDeviceDescriptorDFU[18] =
     PROD_ID0,   /* idProduct (0x1001 or 1002) */
     PROD_ID1,

-    0x00,   /* bcdDevice*/
+    0x01,   /* bcdDevice*/
     0x02,
     0x01,   /* iManufacturer : index of string Manufacturer  */
     0x02,   /* iProduct      : index of string descriptor of product*/
--
1.7.0.4&#60;/code&#62;&#60;/pre&#62;</description>
		</item>
		<item>
			<title>tormod on "DFU compliance and dfu-util"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1410#post-10634</link>
			<pubDate>Sat, 12 May 2012 19:21:37 +0000</pubDate>
			<dc:creator>tormod</dc:creator>
			<guid isPermaLink="false">10634@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;It seems very difficult to communicate with LeafLabs, so I will post the patch for the Maple firmware here also. Seeing in recent threads that other developers want to base their bootloaders on the Maple code, it would be good to have these bugs fixed.&#60;/p&#62;
&#60;p&#62;In lack of attachment features on this forum I will try to inline the patch:&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;From: Tormod Volden &#38;lt;debian.tormod@gmail.com&#38;gt;
Date: Thu,  1 Mar 2012 23:05:40 +0100
Subject: [PATCH 1/2 maple-bootloader] Correct bcdDFUVersion and wDetachTimeOut in DFU functional descriptor

The firmware matches pretty much the DFU 1.1 specification.

This is a follow up of 95e1150ddcbb6e0e4c4e2ff9f85a0e6d9d620407
which only changed the separately defined u8_usbFunctionalDescriptor
but not the one included in the configuration descriptor. And which
also got it wrong (0.1).

(Ideally the code should be cleaned up to only specify this in one place)

Also fix the detach timeout which was set to 64 seconds. I believe
the intended value was 255 ms like stated in the comment. Since the
Maple devices are not detached (transition between run-time mode and
DFU mode, issued over the DFU interface), this is not used anyway.

Signed-off-by: Tormod Volden &#38;lt;debian.tormod@gmail.com&#38;gt;
---

 usb_descriptor.c &#124;   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/usb_descriptor.c b/usb_descriptor.c
index e88efe8..8e001e2 100644
--- a/usb_descriptor.c
+++ b/usb_descriptor.c
@@ -71,10 +71,10 @@ u8 u8_usbFunctionalDescriptor[9] =
     0x21,   /* DFU Functional Descriptor*/
     0x01,   /*bmAttribute, can only download for now */
     0xFF,   /*DetachTimeOut= 255 ms*/
-    0xFF,
+    0x00,
     (wTransferSize &#38;amp; 0x00FF),
     (wTransferSize &#38;amp; 0xFF00) &#38;gt;&#38;gt; 8, /* TransferSize = 1024 Byte*/
-    0x1A,                          /* bcdDFUVersion*/
+    0x10,                          /* bcdDFUVersion = 1.1 */
     0x01
   };

@@ -129,11 +129,11 @@ u8 u8_usbConfigDescriptorDFU[36] =
     0x21,   /* DFU Functional Descriptor*/
     0x01,   /*bmAttribute, can only download for now */
     0xFF,   /*DetachTimeOut= 255 ms*/
-    0xFF,
+    0x00,
     (wTransferSize &#38;amp; 0x00FF),
     (wTransferSize &#38;amp; 0xFF00) &#38;gt;&#38;gt; 8, /* TransferSize = 1024 Byte*/
-    0x01,                          /* bcdDFUVersion*/
-    0x00
+    0x10,                          /* bcdDFUVersion = 1.1 */
+    0x01
     /***********************************************************/
     /*36*/
   };
--
1.7.0.4&#60;/code&#62;&#60;/pre&#62;</description>
		</item>
		<item>
			<title>tormod on "DFU compliance and dfu-util"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1410#post-10356</link>
			<pubDate>Wed, 25 Apr 2012 16:22:03 +0000</pubDate>
			<dc:creator>tormod</dc:creator>
			<guid isPermaLink="false">10356@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Due to lack of follow-up from LeafLabs (they only responded once to an e-mail a month ago and said they would try it out) this could not be fixed in time for Ubuntu 12.04. For now we have made a quirk in (upstream) dfu-util for product ID 0003. We hope this will help, although a clarification from LeafLabs would be nice. This is included in dfu-util 0.6, about to be announced. For Ubuntu (10.04 or later) you can get an unofficial package from my PPA at &#60;a href=&#34;https://launchpad.net/~tormodvolden/+archive/ppa&#34; rel=&#34;nofollow&#34;&#62;https://launchpad.net/~tormodvolden/+archive/ppa&#60;/a&#62;
&#60;/p&#62;</description>
		</item>
		<item>
			<title>tonghuix on "DFU compliance and dfu-util"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1410#post-10121</link>
			<pubDate>Fri, 06 Apr 2012 15:23:59 +0000</pubDate>
			<dc:creator>tonghuix</dc:creator>
			<guid isPermaLink="false">10121@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;When I upgrade to Ubuntu 12.04 I have the same question about dfu-util. So please correct it more soon, because it will release by the end of April. &#60;/p&#62;
&#60;p&#62;By now, I should remove dfu-util 0.5 every time and install 0.3 instead.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>tormod on "DFU compliance and dfu-util"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1410#post-8453</link>
			<pubDate>Fri, 02 Mar 2012 15:46:54 +0000</pubDate>
			<dc:creator>tormod</dc:creator>
			<guid isPermaLink="false">8453@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Some questions relevant for our dfu-util quirk:&#60;br /&#62;
I see in the maple-bootloader git repo that the same version error exist in many different devices. Will product ID 0003 cover them all? Are they all currently at bcdDevice 2.00?&#60;/p&#62;
&#60;p&#62;BTW has your vendor ID 1eaf been registered? It does not show up on e.g. &#60;a href=&#34;http://www.linux-usb.org/usb.ids&#34; rel=&#34;nofollow&#34;&#62;http://www.linux-usb.org/usb.ids&#60;/a&#62;
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
