Commit Graph

11 Commits

Author SHA1 Message Date
Richard Hughes
bacf255428 libdfu: Ensure the device is open before claiming the interface 2016-10-14 18:07:34 +01:00
Richard Hughes
d0583ae340 Only claim the DFU interface when required
It appears that some expensive USB sound cards do not like the DFU interface
being claimed at the same time the kernel starts using a different endpoint.

I suspect this is a device bug or limitation in some reference implementation
somewhere, but seeing as we only need the interface when verifying or writing
new firmware the sensible thing to do is not claim it until required.

Fixes: https://github.com/hughsie/fwupd/issues/50
2016-06-08 16:42:49 +01:00
Richard Hughes
d8b6d8a1f5 Export the attribute and quirk values in libdfu 2016-03-07 08:44:14 +00:00
Richard Hughes
c9620ac61e Ignore the DFU runtime on the DW1820A 2016-03-07 08:42:12 +00:00
Richard Hughes
9b1349b885 libdfu: Add an explicit 'attach' method
This can also deal with the m-stack quirk in a central place.
2015-11-27 10:54:26 +00:00
Richard Hughes
385bba0ada libdfu: Add a quirk to support DFU runtime-less devices 2015-11-26 18:59:59 +00:00
Richard Hughes
93a6edf2c6 trivial: Define the default replug timeout in a central place
Some users were using 2000ms and some the more sane 5000ms.
2015-11-25 13:41:55 +00:00
Richard Hughes
0bb530be97 libdfu: Copy the platform ID and invalidate the GUsbDevice when removed 2015-11-25 10:27:36 +00:00
Richard Hughes
d3afaaab9f libdfu: Add a context object to handle device hotplug
Also, add a 'watch' command to dfu-tool to test this.
2015-11-23 13:53:06 +00:00
Richard Hughes
e7aaf39de2 libdfu: Fix multi-interface devices like the Neo Freerunner
The DFU specification specifies that only one of the DFU interfaces has to
export a functional descriptor; I assumed they all had to. Adding support
for this kind of device rapidly turned into a massive restructure and it was
all too complicated anyway.

Reorganise the code so that we can support these kinds of devices and clean up
the API so it's sane and easy to use. This also allows us to generate the
GObject introspection GIR and to also install libdfu as a shared library.

If you've got any comments about the API, please shout now as when 6.0 is
released it will become API and ABI stable.
2015-11-22 21:17:48 +00:00
Richard Hughes
62633af0db libdfu: Add support for DfuSe firmware
Also, move some shared stuff down from DfuTarget to DfuDevice.
2015-11-14 16:34:09 +00:00