How to update the firmware on a USB device with a device firmware update (DFU) file from Linux

firmwareusbusb device

I have a USB speaker (a Jabra Speak 410) which I need to update the firmware on. When I try to use fwupdmgr it sees the device, informs me of the existing firmware version (1.9) but does not execute any updates:

$ fwupdmgr get-devices
Jabra SPEAK 410 USB
  DeviceId:             87caecc4e6db7e3c335deedfef38666e7f279a03
  Guid:                 537f7800-8529-5656-b2fa-b0901fe91696
  Guid:                 a607e767-5dfd-5f21-ac0f-c774dbd6fed5
  Guid:                 1764c519-4723-5514-baf9-3b42970de487
  Plugin:               dfu
  Flags:                updatable|registered
  VendorId:             USB:0x0B0E
  Version:              1.9
  Icon:                 drive-harddisk-usb
  Created:              2018-09-12
$ fwupdmgr update
$

I verified that there is an update file available (version 1.12). When I download the update file (Jabra_SPEAK_410_USB-1-12-0.dfu) and attempt to use it with fwupdmgr write it doesn't seem to do anything.

Best Answer

The reason for this is multi-layered. fwupdmgr is a tool for retrieving firmware and processing it from the Linux Vendor Firmware Service (LVFS). The LVFS provides metadata and distribution of CAB archives packaged in the Microsoft Update format and signed by the LVFS project. These updates are managed by the individual vendors.

While Jabra made the official statement:

All SPEAK hardware is supported, more models to follow

There have not been subsequent updates past version 1.8 (for the Speak 410) published by Jabra through LVFS.

Because you have access to the actual DFU file as provided by Jabra, it can be manually processed using the utility dfu-tool also packaged as a part of the package fwupd (the parent package of fwupdmgr).

It should be stressed that as signing is a function of the packaging of DFU files, it is up to the end user to ensure that the file is retrieved in a secure manner. This is why the LVFS provides signing and assertion of the archives shipped. Ensure that any files are downloaded using transport security or have detached signatures which can be used to assert ownership.

If you feel that the DFU file is genuine use the following process:

First, verify that there is a valid DFU capable device attached:

$ dfu-tool list
Found 0b0e:0412 [v1.9]:
 Name:          Jabra SPEAK 410 USB
 Serial:        745C4B561A3XXXXXXXX
 Mode:          Runtime
 Status:        OK
 State:         appIDLE
 Transfer Size: 64 bytes
 Attributes:    can-download|can-upload
 Quirks:        no-dfu-runtime

Once you have verified that there is DFU capable device attached call dfu-tool with the path to the DFU file:

$ dfu-tool write ~/Downloads/Jabra_SPEAK_410_USB-1-12-0.dfu 

(dfu-tool:7597): FuPluginDfu-WARNING **: 12:22:53.882: truncated DFU interface data, no bcdDFUVersion

(dfu-tool:7597): FuPluginDfu-WARNING **: 12:23:05.310: truncated DFU interface data, no bcdDFUVersion
Writing…          [*************************************************]
Waiting…          [*************************************************]
Restarting device…[*************************************************]

(dfu-tool:7597): FuPluginDfu-WARNING **: 12:30:04.795: truncated DFU interface data, no bcdDFUVersion
879644 bytes successfully downloaded to device

You can then use fwupdmgr or dfu-tool as convenience utilities to verify that the desired firmware version is running:

dfu-tool:

$ dfu-tool list
Found 0b0e:0412 [v1.12]:
 Name:          Jabra SPEAK 410 USB
 Serial:        745C4B561A3Dx010900
 Mode:          Runtime
 Status:        OK
 State:         appIDLE
 Transfer Size: 64 bytes
 Attributes:    can-download|can-upload
 Quirks:        no-dfu-runtime

fwupdmgr:

$ fwupdmgr get-devices
Jabra SPEAK 410 USB
  DeviceId:             87caecc4e6db7e3c335deedfef38666e7f279a03
  Guid:                 537f7800-8529-5656-b2fa-b0901fe91696
  Guid:                 f884081f-f58f-5d01-86e8-dc12c88ef073
  Guid:                 1764c519-4723-5514-baf9-3b42970de487
  Plugin:               dfu
  Flags:                updatable|registered
  VendorId:             USB:0x0B0E
  Version:              1.12
  Icon:                 drive-harddisk-usb
  Created:              2018-09-12
Related Question