# Dfu-util on linux fails to flash \[Solved\]

**URL:** <https://community.particle.io/t/dfu-util-on-linux-fails-to-flash-solved/4080>\
**Category:** Firmware\
**Created:** [April 27, 2014, 5:57pm UTC](https://community.particle.io/t/dfu-util-on-linux-fails-to-flash-solved/4080 "2014-04-27T17:57:33Z")\
**Posts on this page:** 11\
**Page:** 2

<div class="post-metadata">

**Author:** ![zachary](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/zachary/32/20717_2.png) [@zachary](https://community.particle.io/u/zachary)\
**Post date:** [May 1, 2014, 10:09pm UTC](https://community.particle.io/t/dfu-util-on-linux-fails-to-flash-solved/4080/21 "2014-05-01T22:09:07Z")

</div>

Here was the email answer from Tormod Volden of the dfu-util project:

> Thanks for informing me about this issue!
> 
> First I couldn't understand why DEFAULT\_POLLTIMEOUT is relevant for  
> the Core, since it is only used for a few (broken) devices that  
> doesn't report bwPollTimeout correctly. Then I saw in the posted log  
> that the Core is using an OpenMOKO USB ID! dfu-util thinks your core  
> is an old openmoko phone 🙂
> 
> We have to narrow down the device range for the OpenMOKO quirk. I  
> guess you are only using one device ID. Probably best if we could  
> figure out exactly which ID's were used for the broken openMOKOs.
> 
> Can you try just disabling the quirk in quirks.c and test again? I am  
> curious to what speed and reliability you'll get now by using the  
> (hopefully) proper timing reported by the device.

I'd appreciate as many people as possible trying out, as he says, "disabling the quirk in quirks.c" and testing with DEFAULT\_POLLTIMEOUT at its default of 5.

---

<div class="post-metadata">

**Author:** ![Hypnopompia](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/hypnopompia/32/9039_2.png) [@Hypnopompia](https://community.particle.io/u/Hypnopompia)\
**Post date:** [May 2, 2014, 1:54am UTC](https://community.particle.io/t/dfu-util-on-linux-fails-to-flash-solved/4080/22 "2014-05-02T01:54:14Z")

</div>

OK, here are the results:

WITH quirks enabled and DEFAULT\_POLLTIMEOUT = 50:  
runtime: 0m21.690s

WITHOUT quirks enabled and DEFAULT\_POLLTIMEOUT = 5, it works!  
runtime: 0m10.911s

So yeah, we just want the quirk disabled for the spark core. It’s twice as fast to flash with.

---

<div class="post-metadata">

**Author:** ![Dave](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/dave/32/181_2.png) [@Dave](https://community.particle.io/u/Dave)\
**Post date:** [May 2, 2014, 2:58am UTC](https://community.particle.io/t/dfu-util-on-linux-fails-to-flash-solved/4080/23 "2014-05-02T02:58:44Z")

</div>

Woot! Faster dfu-util makes me very happy. 🙂

---

<div class="post-metadata">

**Author:** ![zachary](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/zachary/32/20717_2.png) [@zachary](https://community.particle.io/u/zachary)\
**Post date:** [May 2, 2014, 4:25am UTC](https://community.particle.io/t/dfu-util-on-linux-fails-to-flash-solved/4080/24 "2014-05-02T04:25:25Z")

</div>

Nice! Thank you @Hypnopompia! That’s so AWEXOME!!! ✈ 🚀 :flipper: 🐨 🌞 The manufacturing line will go soooooo much faster! Think about that 10 seconds times 10,000 Cores… zomg.

I’ll let Tormod know.

---

<div class="post-metadata">

**Author:** ![drkemp](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/drkemp/32/2020_2.png) [@drkemp](https://community.particle.io/u/drkemp)\
**Post date:** [May 2, 2014, 6:08pm UTC](https://community.particle.io/t/dfu-util-on-linux-fails-to-flash-solved/4080/25 "2014-05-02T18:08:51Z")

</div>

I confirm that disabling quirks and using the 5ms default works and is fast.  
I get 18 seconds and 9 seconds.

---

<div class="post-metadata">

**Author:** ![Hypnopompia](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/hypnopompia/32/9039_2.png) [@Hypnopompia](https://community.particle.io/u/Hypnopompia)\
**Post date:** [May 2, 2014, 7:01pm UTC](https://community.particle.io/t/dfu-util-on-linux-fails-to-flash-solved/4080/26 "2014-05-02T19:01:15Z")

</div>

That’s 27 minutes of flashing time saved. 🙂

---

<div class="post-metadata">

**Author:** ![Hypnopompia](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/hypnopompia/32/9039_2.png) [@Hypnopompia](https://community.particle.io/u/Hypnopompia)\
**Post date:** [May 2, 2014, 7:16pm UTC](https://community.particle.io/t/dfu-util-on-linux-fails-to-flash-solved/4080/27 "2014-05-02T19:16:30Z")

</div>

I’ve got a patched fork over at [https://github.com/Hypnopompia/dfu-util/tree/spark](https://github.com/Hypnopompia/dfu-util/tree/spark)

Not sure how to submit a pull request since the remote isn’t on github though. 🙂

---

<div class="post-metadata">

**Author:** ![bko](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/bko/32/20704_2.png) [@bko](https://community.particle.io/u/bko)\
**Post date:** [May 2, 2014, 7:29pm UTC](https://community.particle.io/t/dfu-util-on-linux-fails-to-flash-solved/4080/28 "2014-05-02T19:29:19Z")

</div>

I think you meant to say 27.77 **hours** of time saved! Which is a huge win.

---

<div class="post-metadata">

**Author:** ![Dave](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/dave/32/181_2.png) [@Dave](https://community.particle.io/u/Dave)\
**Post date:** [May 2, 2014, 7:47pm UTC](https://community.particle.io/t/dfu-util-on-linux-fails-to-flash-solved/4080/29 "2014-05-02T19:47:03Z")

</div>

It’s actually more than that, since it gets called a lot during manufacturing, it’s probably more in the range of saving 20-40 seconds per core…

---

<div class="post-metadata">

**Author:** ![Hypnopompia](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/hypnopompia/32/9039_2.png) [@Hypnopompia](https://community.particle.io/u/Hypnopompia)\
**Post date:** [May 2, 2014, 10:01pm UTC](https://community.particle.io/t/dfu-util-on-linux-fails-to-flash-solved/4080/30 "2014-05-02T22:01:55Z")

</div>

Oh. You’re right. I can’t math today.Oops! 🙂

---

<div class="post-metadata">

**Author:** ![whyameye](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/whyameye/32/5485_2.png) [@whyameye](https://community.particle.io/u/whyameye)\
**Post date:** [June 25, 2015, 5:50am UTC](https://community.particle.io/t/dfu-util-on-linux-fails-to-flash-solved/4080/31 "2015-06-25T05:50:57Z")

</div>

None of these tricks work for me. I still get  
dfu-util: Error during special command “ERASE\_PAGE” get\_status

[Previous page](https://community.particle.io/t/dfu-util-on-linux-fails-to-flash-solved/4080.md?page=1)
