Why are we claiming the DFU interface at all !!
Multiplatform USB DFU host utility
Brought to you by:
tormod
Hello,
I have a question regarding claiming of DFU interface in case of download functionality.
Why are we claiming the DFU interface at all !!
When all the transfer in bringing out DFU download functionality is done using control transfer, why claiming the DFU interface is really required.
DFU interface doesn't even have any endpoint in case of few MCU chips.
I have tried commenting out all calls of interface claim and release and DFU download still works.
Anonymous
Claiming of USB interfaces isn't part of the communication, nothing is signaled on the USB bus and the device is not aware of it. It is simply a OS feature, to ensure that only one process is using the given endpoints and so that there is no conflict between processes.
In the case of DFU, you are correct that there is only a control point involved, which from the OS point of view does not require claiming any interface. However, claiming the DFU interface is a way of reserving the DFU functionality to the active process. Otherwise e.g. multiple dfu-util processes could be running at the same time communicating with the same device and mess things up.