Comtrue-inc Firmware Update Device

0 views
Skip to first unread message

Antígona Knknown

unread,
Aug 5, 2024, 3:17:39 AM8/5/24
to didoletxi
Startingwith the WDK for Windows 11, version 22H2, WDF redistributable co-installers are no longer supported.To learn how to work around this change, see WDF redistributable co-installers don't work in the WDK known issues article.

USB device vendors use co-installers to update device firmware for devices that use inbox USB device drivers. However, co-installers aren't supported by the new "Universal INF" standard, which is a requirement on Windows 10. This poses a challenge to existing USB device firmware update process. This article outlines a recommended method to update USB device firmware without a co-installer.


USB devices like UVC cameras are released with in-field updatable firmware. There's no standard method to update the firmware today. One item that is common to all existing update mechanisms is that some custom software suite runs on the client and downloads the firmware to the device. Typically, as part of the device installation process, the firmware updating software suite is installed. The co-installer kick 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 method to circumvent the absence of a co-installer for the USB device firmware update scenario is to use a lower filter driver to the USB device that kick starts the firmware update process. During the AddDevice call, the filter driver checks the device firmware version and update the firmware if necessary.


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 server for any vendor specific driver package availability and downloads it and installs the driver. The installed driver package performs the firmware update.


While installing the driver update package, the firmware update WDF filter driver's AddDevice routine is called. From this routine, the WDF filter driver gets for the device firmware version from the device HW registry key. The device firmware should place the firmware version using the MSOS descriptor onto the device HW registry key.


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) to listen to the device interface class the USB device will register the device into. Ror example, the firmware update filter driver for an RGB camera would register for KSCATEGORY_VIDEO_CAMERA. On receiving the notification, the filter driver should post a work-item that would perform the firmware update.


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


The method of using a "firmware update filter driver", is recommended for devices that have enough resources to hold two full firmware images (the update image and 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 and boot into its original firmware. Thus, not bricking the device.


In this method, a lower filter driver to the USB device is installed as part of the driver update process. This filter driver sends a command to the device to restart in firmware update mode, where the device exposes a firmware update interface. The driver for the firmware update interface loads and performs the firmware update.


While installing the driver update package, the WDF lower filter driver's AddDevice routine is called. From this routine, the filter driver queries 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, onto the device HW registry key.


When the EVT_WDF_DEVICE_D0_ENTRY callback of the WDF filter driver is called at a later point, the filter driver issues a vendor specific command to the device that places it in firmware update mode. The device will disconnect and reconnect, exposing the firmware update interface.


The system enumerates 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 updates the firmware.


This method is recommended for devices that can't hold the updated and original firmware images due to shortage of memory on the device. The reason is if there were failures during downloading the updated firmware, the device can abandon the update and boot the device into its firmware update mode again and the firmware update can be retried. Thus, not bricking the device.


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 update the firmware again and may fail again and 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 perform. When the firmware update retries gets beyond a threshold (for example, three retries) then the filter driver shouldn't attempt to update the firmware again, until a new version of the driver is downloaded from WU. The firmware update driver may use the registry to persist the retry states.


Please read the product-specific details in this privacy statement, which provide additional relevant information. This statement applies to the interactions Microsoft has with you and the Microsoft products listed below, as well as other Microsoft products that display this statement.


For individuals in the United States, please refer to our U.S. State Data Privacy Notice and the Washington State Consumer Health Data Privacy Policy for additional information about the processing of your personal data, and your rights under applicable U.S. State data privacy laws.


Most Microsoft sites use cookies, small text files placed on your device which web servers utilise in the domain that placed the cookie can retrieve later. We use cookies to store your preferences and settings, help with sign-in, provide personalised ads and analyse site operations. For more information, see the Cookies and similar technologies section of this privacy statement.


If you have a privacy concern, complaint, or question for the Microsoft Chief Privacy Officer or EU Data Protection Officer, please contact us by using our web form. For more information about contacting Microsoft, including Microsoft Ireland Operations Limited, see the How to contact us section of this privacy statement.


Microsoft collects data from you, through our interactions with you and through our products. You provide some of this data directly, and we get some of it by collecting data about your interactions, use, and experiences with our products. The data we collect depends on the context of your interactions with Microsoft and the choices you make, including your privacy settings and the products and features you use. We also obtain data about you from third parties.


If you represent an organisation, such as a business or school, that utilises Enterprise and Developer Products from Microsoft, please see the Enterprise and developer products section of this privacy statement to learn how we process your data. If you are an end user of a Microsoft product or a Microsoft account provided by your organisation, please see the Products provided by your organisation and the Microsoft account sections for more information.


You have choices when it comes to the technology you use and the data you share. When we ask you to provide personal data, you can decline. Many of our products require some personal data to provide you with a service. If you choose not to provide data -required to provide you with a product or feature, you cannot use that product or feature. Likewise, where we need to collect personal data by law or to enter into or carry out a contract with you, and you do not provide the data, we will not be able to enter into the contract; or if this relates to an existing product you are using, we may have to suspend or cancel it. We will notify you if this is the case at the time. Where providing the data is optional, and you choose not to share personal data, features like personalisation that use such data will not work for you.


We also obtain data from third parties. We protect data obtained from third parties according to the practices described in this statement, plus any additional restrictions imposed by the source of the data. These third-party sources vary over time and include:


The data we collect depends on the context of your interactions with Microsoft and the choices you make (including your privacy settings), the products and features you use, your location, and applicable law.


Interactions. Data about your use of Microsoft products. In some cases, such as search queries, this is data you provide in order to make use of the products. In other cases, such as error reports, this is data we generate. Other examples of interactions data include:


Content. Content of your files and communications you input, upload, receive, create, and control. For example, if you transmit a file using Skype to another Skype user, we need to collect the content of that file to display it to you and the other user. If you receive an email using Outlook.com, we need to collect the content of that email to deliver it to your inbox, display it to you, enable you to reply to it, and store it for you until you choose to delete it. Other content we collect when providing products to you include:

3a8082e126
Reply all
Reply to author
Forward
0 new messages