- Posts: 4402
Need help with DFU creation
- PhracturedBlue
- Topic Author
- Offline
I need more samples from Devo6, Devo8, or Devo10 radios to make sense of it.
What I need are USB traces of uploading a DFU file.
In WinXP I used to use usbsnoop:
www.pcausa.com/Utilities/UsbSnoop/
But it does not work in Win7
In Win7, it is theoretically possible to use logman:
blogs.msdn.com/b/usbcoreblog/archive/200...-usb-core-stack.aspx
But while I could capture the logs, I couldn't seem to capture the actual data transfer (which is what I need)
In the end, I used the demo version of USBTrace:
www.sysnucleus.com/usbtrace_download.html
which worked fine on my Win7 x-64 machine
You could also, likely use Wireshark in Linux running a Windows virtual-machine, though I didn't get around to trying that.
I would like a couple of folks who can install a usb snooper to capture the start of the dfuse tool (Tx in program mode, and plugged in, start DFuSe tool), and the installation of a dfu file (Upgrade).
I recommend taking a snapshot before installing a usbsnooper, as it is theoretically possible for it to mess up USB detection if something goes wrong.
Please Log in or Create an account to join the conversation.
- sbstnp
- Offline
- Posts: 649
Second is the same conversation capture done in Linux.
Third attachment is a full capture using logman.
Captures done with logman can be filtered, by Vendor Id for example:
ContainsBin(FrameData, hex, "83 04")
Note: usbtrace evaluation has a capture size limit which I hit during DFU upload.
PS: can't seem to be able to attach *.cap files, so I renamed to .txt
Devo 10 + 4in1
FrSky Taranis + TBS Crossfire
Please Log in or Create an account to join the conversation.
- RugWarrior
- Offline
- Posts: 59
Please Log in or Create an account to join the conversation.
- PhracturedBlue
- Topic Author
- Offline
- Posts: 4402
the linux logs look ok (though there are no data packets in the initialization (that is expected), and if I recall I had a similar issue with linux truncating the data when I used it way back when)
Anyhow, with more investigation, I think the changes added by DFuSe are actually based on the contents of the firmware, not the Tx, so If I can figure out which bytes are used to compute the modified 'checksum' I'll be one step closer. It also means I probably don't need any more log captures at this time.
Please Log in or Create an account to join the conversation.
- sbstnp
- Offline
- Posts: 649
I hope you can do without these though, good luck.
Devo 10 + 4in1
FrSky Taranis + TBS Crossfire
Please Log in or Create an account to join the conversation.
- rbe2012
- Offline
- So much to do, so little time...
- Posts: 1433
When I understood right then we have not to fear to install a senseless dfu on our tx, we can always cure this with a correct (this can only be deViation) dfu.
Please Log in or Create an account to join the conversation.
- RugWarrior
- Offline
- Posts: 59
And one with the latest commit...
If this is of any use than I can make more if wanted...
Please Log in or Create an account to join the conversation.
- PhracturedBlue
- Topic Author
- Offline
- Posts: 4402
Every tranmsitter has a unique serial number (in the MCU), and this is the value that is used to build the final DFU sent to the transmitter.
I'm not sure exactly why they do this except to ensure that the transmitter can only work in conjunction with the Walkera Dfuse tool. It does not in any way that I see help to secure their firmware (indeed we've been loading Deviation onto radios for 6 months without being aware of anything more than a keep-out region)
They use a different algorithm for each model, but the math is relatively simple. Again, I have no idea why they bother with all of this.
Please Log in or Create an account to join the conversation.
- sbstnp
- Offline
- Posts: 649
Devo 10 + 4in1
FrSky Taranis + TBS Crossfire
Please Log in or Create an account to join the conversation.
- RugWarrior
- Offline
- Posts: 59
Who knows
sbstnp I had a look at your dump and mine... and thank god we have devs like PB... I do not get the point comparing the dumps
Please Log in or Create an account to join the conversation.
- Tom_ate
- Offline
- Posts: 15
RugWarrior wrote: ...Interesting why they do something like this to "secure" writing to the tx...
Sorry, RW, but I think this is not the real point.
I have the same opinion as PB wrote earlier int this threat: With this checksum they have done nothing to securve writing to the TX - they have done it to prevent that the TX is written to with anything else than their own Dfuse-tool.
Kind regards,
Matthias
Please Log in or Create an account to join the conversation.
- PhracturedBlue
- Topic Author
- Offline
- Posts: 4402
The thing I don't understand is why they went as far as they did. Ensuring only their dfuse tool could write to the Tx would have been very simple: change the dfuse format slightly. Instead you have a unique ID and different algorithms for different models. The latter could be useful to prevent loading a devo8 firmware onto a devo10, but since it is rebuilt by dfuse every time you load, you lose any such benefit.Tom_ate wrote: I have the same opinion as PB wrote earlier int this threat: With this checksum they have done nothing to securve writing to the TX - they have done it to prevent that the TX is written to with anything else than their own Dfuse-tool.
There are a lot of 'security' measures in the Devo (like scrambling the DFU) but it turns out that every single one is poorly implemented (which is a good thing for us, as otherwise, the effort to install Deviation would be much higher)
Please Log in or Create an account to join the conversation.
- Home
- Forum
- General
- General Discussions
- Need help with DFU creation