Dfu-util on linux fails to flash [Solved]

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 :slight_smile:

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.

4 Likes

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.

2 Likes

Woot! Faster dfu-util makes me very happy. :slight_smile:

2 Likes

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

I’ll let Tormod know.

2 Likes

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

1 Like

That’s 27 minutes of flashing time saved. :slight_smile:

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

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

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

2 Likes

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…

1 Like

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

2 Likes

None of these tricks work for me. I still get
dfu-util: Error during special command ā€œERASE_PAGEā€ get_status