Case: Firmware upgrades

By | January 5, 2015

We continue on our series of articles focusing on notable technology and solutions we have implemented or encountered in our projects.

As part of our experience in supporting hardware manufacturing companies with our software development, we have dealt with a number of devices that implement their own custom solutions for firmware upgrading on Windows and Mac platforms. We will briefly cover the methods used for our implementation.

Device Firmware Upgrade (DFU)

Firmware upgrade in process

Firmware upgrade process

DFUs are a vendor- and device-independent means of updating the firmware of USB devices. It also allows firmware uploads from device to USB host for backup and other purposes.

Some devices do not implement standard firmware upgrading protocols (USB DFU) but have their own solutions instead.

Human Interface Device (HID) Based Protocol

One option for upgrading firmware involves using custom protocols based on HID protocols. For example, a firmware image is written to a device in small chunks over the USB HID. After verification, the device is then rebooted in order to use new the firmware.

Mass storage firmware upgrade

Another approach to upgrading firmware introduces mass storage that directly or indirectly represents file system of the device in question. As such, upgrades are done by copying a firmware image to this mass storage device as a file. The new version of the firmware is then used after rebooting. This is not a typical approach because the simplest implementation of this is not very secure. Users may accidentally damage the firmware using standard applications such as Windows Explorer.

Definitions

  • USB Human Interface Device class (USB HID class) is a part of the USB specification for computer peripherals. It specifies a device class for human interface devices such as keyboards, mice, game controllers and alphanumeric display devices.
  • USB Device Firmware Upgrade (DFU) is an official USB device class specification of the USB Implementers Forum. The goal is to have one vendor-independent firmware update tool as part of the operating system, which can then (given a particular firmware image) be downloaded onto a device.
  • Firmware is the combination of persistent memory and program code, as well as the data stored in it. The firmware contained in electronic devices provides the control program for said devices.

Links we find useful

http://www.usb.org/developers/
DFU 1.1.pdf
https://github.com/dfu-programmer/dfu-programmer

As always, please feel free to contact us for a consultation!

Leave a Reply

Your email address will not be published. Required fields are marked *