Richard Hughes
f63091e413
Add DFU quirk for OpenPICC
2017-03-11 20:47:32 +00:00
Richard Hughes
5eb8e29fa2
Add DFU quirk for SIMtrace
2017-03-11 20:47:22 +00:00
Richard Hughes
ba79b07b4f
libdfu: Don't read data from some DfuSe targets
...
The option bytes section makes no sense to include in the flashed image.
2017-01-07 21:13:51 +00:00
Richard Hughes
0e77c525dd
trivial: Fix the last commit to actually compile
2016-11-22 08:30:30 +00:00
Tsunghan Liu (Robert Liu)
a02bbb1c4e
* close USB devices before error returns ( #73 )
2016-11-21 09:12:28 -06:00
Richard Hughes
b28daac301
libdfu: Use a heuristic for the start address if the firmware has no DfuSe footer
...
This fixes flashing into the 96Boards BLE Carbon.
2016-11-03 15:11:25 +00:00
Richard Hughes
6c17d2ed43
trivial: Fix an error path when the interface cannot be claimed
2016-10-16 08:26:01 +01:00
Richard Hughes
9e172a0b1f
trivial: Raise the default timeout for DFU operations
...
Not all devices are fast, and the ST bootloader takes a long time to return
from erase.
2016-10-14 18:07:34 +01:00
Richard Hughes
35bea355b2
libdfu: Match the device booloader or runtime VID and PID when checking firmware
2016-10-14 18:07:34 +01:00
Richard Hughes
91685ce43b
libdfu: Add quirks for HydraBus as it does not have a DFU runtime
2016-10-14 18:07:34 +01:00
Richard Hughes
8e2e46e60b
libdfu: Re-get the quirks when the DfuDevice gets a new GUsbDevice
2016-10-14 18:07:34 +01:00
Richard Hughes
1ff658dbb2
libdfu: Ensure the mode is set correctly when faking a runtime
2016-10-14 18:07:34 +01:00
Richard Hughes
bacf255428
libdfu: Ensure the device is open before claiming the interface
2016-10-14 18:07:34 +01:00
Richard Hughes
73b63c87e8
libdfu: Do not do a zero-byte download when in DfuSe mode
...
For ST devices this means 'boot into APP mode' which we can also now populate.
2016-10-14 18:07:34 +01:00
Richard Hughes
99f61c827a
libdfu: Add DfuAction enumerated value to represent a device action
...
This is a high level operation which is supposed to correlate with the
percentage change notification. Using the device DfuState or DfuStatus doesn't
work when doing dfuse operations.
2016-10-13 19:43:20 +01:00
Richard Hughes
7920826098
trivial: Remove the version from the DFU firmware format enum
...
This isn't accurate, as it's used for all versions of DFU.
2016-08-26 18:44:00 +01:00
Richard Hughes
de327ffefd
trivial: Print the serial number in the dfu-tool list output
2016-08-24 10:06:48 +01:00
Richard Hughes
33a518a615
Add another compile warning and fix up any build failures
2016-07-27 16:57:36 +01:00
Richard Hughes
ce38d94d5e
trivial: Get rid of useless internal-only gtk-doc markup
2016-06-29 11:25:25 +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
16261e3f76
libdfu: Show the DFU protocol version in 'dfu-tool list'
2016-06-08 15:14:06 +01:00
Richard Hughes
bd046c8a19
libdfu: Fix up some NULL/FALSE confusion
2016-03-18 12:33:47 +00:00
Richard Hughes
da9804d8be
Show ignored DFU devices in dfu-util, but not in fwupd
...
This allows desktop software to ignore the device, but leaves the device
controllable by the dfu-tool command line client.
2016-03-07 08:47:11 +00:00
Richard Hughes
c9620ac61e
Ignore the DFU runtime on the DW1820A
2016-03-07 08:42:12 +00:00
Richard Hughes
2fd64ecef8
trivial: Fix a method prefix to reflect reality
2016-03-07 08:21:39 +00:00
Richard Hughes
46d6180f29
Correct the BCD version number for DFU 1.1
...
This prevents a warning about invalid version numbers for newer hardware.
I have no idea why 1.1 would be encoded as 0x0110 rather than 0x0101 but
dfu-util seems to do the same thing.
2016-03-02 09:57:38 +00:00
Richard Hughes
4545dd70af
libdfu: Add DfuCipher which is a property on a target and a firmware file
...
At the moment we're not doing anything smart other than looking at the
firmware filename, but in the future we might do something better.
2015-12-04 12:58:05 +00:00
Richard Hughes
14d2b80503
libdfu: Make reading and writing to targets easier to understand
...
Rename the 'upload' command to read, and 'download' to write to make things
easier for end users. Also, break the last bits of compatibility with dfu-util.
2015-11-30 09:49:25 +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
60b7eeeca9
libdfu: Handle cancellation with ctrl+c in dfu-tool
2015-11-26 12:36:53 +00:00
Richard Hughes
4bb94e4bcd
libdfu: Fix dfu_device_wait_for_replug() so it can work with a DfuContext
...
Using g_usleep() works for the command line tool, but this starves the event
loop which means we get a flurry of removed:added:removed:added signals once
complete.
The context 'helpfully' sets up the new GUsbDevice which means we're doing
things with DfuTargets without DfuDevices and DfuTargets without GUsbDevices.
Basically, madness ensues.
2015-11-25 13:57:04 +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
0116028755
libdfu: Verify the GUsbDevice is set before using it
...
Handling this is important in a library that's going to be (ab)used by people.
2015-11-25 13:39:18 +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
71581832da
libdfu: Add dfu_device_get_display_name()
...
This allows us to get the product name for the device.
2015-11-24 18:33:40 +00:00
Richard Hughes
aa90e5c88d
libdfu: Add dfu_device_get_runtime_release()
...
This allows us to get the device release when in runtime mode.
2015-11-24 18:33:40 +00:00
Richard Hughes
42ffdf7645
libdfu: Add dfu_context_get_device_by_platform_id()
...
This lets us get the connection platform ID without exposing the GUsbDevice.
2015-11-24 18:33:40 +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
5d6066c002
libdfu: Use signals to propagate device state
...
Also, add padding to the various class structs so we can add more signals in
the future without breaking ABI.
2015-11-23 10:19:24 +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
e7ba943cf5
libdfu: Support download and upload to ST DfuSe devices
...
Also, simplify the general download and upload API now we can deal with
element data in chunks.
2015-11-20 14:14:05 +00:00
Richard Hughes
0256f04338
libdfu: Improve the output of 'dfu-util list'
...
Being semi-compatible with dfu-util isn't important anymore.
2015-11-20 12:30:53 +00:00
Richard Hughes
2d64b19c81
libdfu: Only do a Detach notification if we're actually doing to do it
2015-11-19 17:42:21 +00:00
Richard Hughes
664bb739b0
libdfu: Require a --force flag to flash wildcard firmware
2015-11-17 08:59:24 +00:00
Richard Hughes
f048fbc703
libdfu: Call the progress callback when doing detach
...
This allows the UI to show something sane, and also allows fwupd to start any
timeout for ignoring detach:replug.
2015-11-16 16:28:10 +00:00
Richard Hughes
a11d6efc58
trivial: Get rid of warning in dmesg when downloading firmware
2015-11-16 13:02:18 +00:00
Richard Hughes
b5936f9eef
libdfu: Correctly implement auto-boot in dfu_device_download()
2015-11-16 11:46:36 +00:00
Richard Hughes
cfd399498d
libdfu: Use a custom error domain
2015-11-14 17:34:08 +00:00
Richard Hughes
460bc2012e
libdfu: Move the VID:PID checks from the tool to DfuDevice
2015-11-14 17:12:29 +00:00