Usb Firmware Update Firmware Using A Usb Storage Device, Cara Upgrade Firmware Tv Melalui Usb Dan Jaringan

      213

USB Device vendors use co-installers to update device firmware for devices that use inbox USB device drivers. However, co-installers are not supported by the new "Universal INF" standard, which is a requirement on Windows 10. This poses a challenge khổng lồ existing USB device firmware update process. This topic outlines a recommkết thúc way lớn update USB device firmware without a co-installer.

Bạn đang xem: Usb firmware update firmware using a usb storage device, cara upgrade firmware tv melalui usb dan jaringan

Requirements

The primary requirements from the USB device firmware update process are:

Seamless firmware update with no user interaction

Reliable recovery mechanism (for example, no bricking of devices)

Works on Windows 7 & later

Overview

USB devices lượt thích UVC cameras are released with in-field updatable firmware. There is no standard way to lớn update the firmware today. One thing that is common to all existing update mechanism is that some custom software suite runs on the client and downloads the firmware to lớn the device. Typically, as part of the device installation process, the firmware updating software suite is installed. The co-installer kiông xã starts the firmware update process. The absence of co-installers on Windows 10 prevents device vendors from updating the firmware on these devices in the field.

The recommended way lớn circumvent the absence of a co-installer for the USB device firmware update scenario is lớn use a lower filter driver to the USB device that will kick start the firmware update process. During the AddDevice call, the filter driver will kiểm tra the device firmware version và update the firmware if necessary.

Firmware update overview

When a USB device is plugged in to the system, the generic inbox driver is installed for the device. After the installation of the generic driver, the OS queries the Windows Update hệ thống for any vendor specific driver package availability and downloads it and installs the driver. The installed driver package will perform the firmware update.

There are two ways the firmware could be updated.

Firmware Update Filter Driver

A vendor supplied lower filter driver that performs the firmware update.

Firmware Update Device Driver

A vendor supplied lower filter driver that puts the device in "firmware update mode".

The device enumerates as a firmware update device.

Vendor supplied firmware update driver will load against this device and updates the firmware.

Method 1: Firmware Update Filter Driver

In this method, a lower filter driver to lớn the USB device driver will be installed as part of driver update process. This filter driver will persize the firmware update.

The driver update package on the Windows Update server will contain:

A firmware update WDF lower filter driver

An extension INF to install the firmware update WDF lower filter driver

The "firmware.bin" file

*

While installing the driver update package, the firmware update WDF filter driver’s AddDevice routine will be called. From this routine, the WDF filter driver will get for the device firmware version from the device HW registry key. The device firmware should have placed the firmware version using the MSOS descriptor onto lớn the device HW registry key.

If the device firmware version and the filter driver expected firmware version are different, or

The firmware version is not available in the device HW registry key

Else, the filter driver will not insert itself into the device stack

Because there is no necessity for updating the firmware as the device has the expected firmware.

When the EVT_WDF_DEVICE_D0_ENTRY callback of the WDF filter driver is called at a later point, the filter driver must register for device interface change notifications using CM_Register_Notification or IoRegisterPlugPlayNotification (UMDF or KMDF) khổng lồ listen to the device interface class the USB device will register the device inlớn. E.g. The firmware update filter driver for a RGB camera would register for KSCATEGORY_VIDEO_CAMERA. On receiving the notification, the filter driver should post a work-tòa tháp that would perkhung the firmware update.

UMDF based firmware update drivers can use the device specific APIs or issue the control transfers directly lớn access the USB device lớn persize the firmware update. For example, the UMDF based filter driver for a camera would use Camera APIs lớn perkhung the firmware update.

KMDF based firmware update drivers can sover the vendor specific commands to persize the firmware update.

Xem thêm: Đọc Truyện Tác Giả Kishimoto Masashi, Naruto Chap 621 Next Chap 622 Tiếng Việt

On completion of flashing the firmware, the device must disconnect & reconnect to the bus. The device will be re-enumerated with new firmware.

The method of using a "firmware update filter driver", is recommended for devices that have enough resources lớn hold two full firmware images (the update image và a backup image) on the device memory. The reason is if there were failures during downloading the updated firmware, the device can abandon the update và boot inlớn its original firmware. Thus, not bricking the device.

Method 2: Firmware Update Device Driver

In this method, a lower filter driver lớn the USB device will be installed as part of the driver update process. This filter driver will send a command lớn the device lớn restart in firmware update mode, where the device exposes a firmware update interface. The driver for the firmware update interface will load and perform the firmware update.

The driver update package on Windows Update hệ thống for the device will contain:

A WDF lower filter driver that will place the device in firmware update mode

An extension INF lớn install the WDF lower filter driver

In addition khổng lồ the driver update package, a separate Firmware Update Device Driver package will be present on Windows Update, with:

A WDF firmware update device driver and its INF, and

The "firmware.bin" tệp tin.

*

While installing the driver update package, the WDF lower filter driver’s AddDevice routine will be called. From this routine, the filter driver will query for the device firmware version from the device HW registry key. The device firmware should have placed the "firmware version", using the MSOS descriptor or the USB device’s extension INF, onkhổng lồ the device HW registry key.

If the device firmware version và the filter driver expected firmware versions are different or

The firmware version is not available in the device HW registry key

Then, the WDF filter driver will insert itself into the device staông chồng.

Else, the WDF filter driver will not insert itself into the device stack

When the EVT_WDF_DEVICE_D0_ENTRY callbachồng of the WDF filter driver is called at a later point, the filter driver will issue a vendor specific comm& to lớn the device which will place it in firmware update mode. i.e. The device will disconnect và reconnect, exposing the firmware update interface.

The system will enumerate the firmware update device interface. A custom firmware update WDF driver supplied by the vendor, in the firmware update package, will be load for this firmware update interface. This driver will update the firmware.

When the EVT_WDF_DEVICE_D0_ENTRY callbaông xã of the WDF firmware update driver is called at a later point, the driver must post a work-thắng lợi that would perform the firmware update.

On completion of flashing the firmware, the device must disconnect & reconnect khổng lồ the bus. The device will be re-enumerated with new firmware.

This method is recommended for devices that cannot hold the updated và original firmware images due khổng lồ shortage of memory on the device. The reason is if there were failures during downloading the updated firmware, the device can abandon the update & boot the device into its firmware update mode again và the firmware update can be retried. Thus, not bricking the device.

Recovery

The firmware update process can fail for various reasons. If that happens, when the device is enumerated again, the firmware update driver may try to lớn update the firmware again và may fail again và this update process could end up in a loop. The firmware update driver must put an upper limit to the number of retries it can perkhung. When the firmware update retries gets beyond a threshold (for example, 3 retries) then the filter driver should not attempt lớn update the firmware again, until a new version of the driver is downloaded from WU. The firmware update driver may use the registry khổng lồ persist the retry states.

At the over of device firmware update, we recommended the device rephối itself & re-enumerate.

Both methods of firmware update, the device function must be stopped before performing the firmware update. This ensures there are no open handle lớn the device và avoids any OS restart requirement.

Sample INF

tăng like fanpage | LOTO188 CITY