Patent Publication Number: US-2022229654-A1

Title: Enabling upgrading firmware of a target device

Description:
TECHNICAL FIELD 
     The present disclosure relates to the field of firmware and in particular to upgrading firmware of a target device. 
     BACKGROUND 
     Many types of devices rely on stable and functional firmware to function correctly. These devices are called target devices herein. Target devices can be connected devices, in which case firmware updates can be achieved by transferring a new firmware version from a firmware upgrade server to the target device. 
     However, when target devices are not network connected, firmware upgrades are more cumbersome. It is known to use a specific upgrade device, where a new firmware version is transferred to the target device and the firmware is applied to the target device. 
     Moreover, consider a case where there is a large number of target devices for which firmware needs to be upgraded. Using an upgrade device to upgrade the firmware in many cases takes 10-20 minutes for each target device. With a large number of target devices, such a task becomes an unreasonably large burden. Moreover, when the firmware upgrade occurs, the target device is prevented from performing its regular function. In one example, there can be target devices in the form of electronic locks which are used for home care access. Typically, a group of only a handful of people in a home care company has the task of keeping the technical environment functioning and up-to-date. A single home care company can be responsible for thousands of such electronic locks, whereby there is a substantial burden every time a new firmware version needs to be applied. 
     Ideally, the firmware upgrade should be provided without deliberate operator involvement. Moreover, the upgrade should keep impact on regular communication low. 
     SUMMARY 
     One object is to improve how firmware is provided to target devices. 
     According to a first aspect, it is provided a method for enabling upgrading firmware of a target device. The method is performed in a portable updater and comprises the steps of: downloading a plurality of firmware sections from a server, the firmware sections collectively making up a complete firmware for deployment on the target device; determining that a connection with the target device is established over a short-range wireless link; determining a firmware section to transfer to the target device; and transferring the determined firmware section to the target device over the short-range wireless link The steps of determining a firmware section and transferring may be repeated until a predetermined number of firmware sections, being a strict subset of all firmware sections, have been transferred. 
     The method may further comprise the step of tearing down the connection with the target device after the strict subset of all firmware sections have been transferred. 
     The connection with the target device may be limited to transfer only the strict subset of all firmware sections. 
     The method may further comprise the step, prior to the step of downloading, of transmitting an identifier of the target device to the server. 
     The step of determining a firmware section to transfer may be based on a section indicator received from the target device over the short-range wireless link. 
     The section indicator may specify a firmware section to transfer. 
     The section indicator may specify a firmware version. 
     The portable updater may be a smartphone. 
     The short-range wireless link may be based on Bluetooth or Bluetooth Low Energy. 
     The target device may be an electronic lock. 
     According to a second aspect, it is provided a portable updater for enabling upgrading firmware of a target device. The portable updater comprises: a processor; and a memory storing instructions that, when executed by the processor, cause the portable updater to: download a plurality of firmware sections from a server, the firmware sections collectively making up a complete firmware for deployment on the target device; determine that a connection with the target device is established over a short-range wireless link; determine a firmware section to transfer to the target device; transfer the determined firmware section to the target device over the short-range wireless link; and repeat the instructions to determine a firmware section and transfer until a predetermined number of firmware sections, being a strict subset of all firmware sections, have been transferred. 
     The portable updater may further comprise instructions that, when executed by the processor, cause the portable updater to tear down the connection with the target device after the strict subset of all firmware sections have been transferred. 
     The connection with the target device may be limited to transfer only the strict subset of all firmware sections. 
     The portable updater may be a smartphone. 
     According to a third aspect, it is provided a computer program for enabling upgrading firmware of a target device. The computer program comprises computer program code which, when run on a portable updater causes the portable updater to: download a plurality of firmware sections from a server, the firmware sections collectively making up a complete firmware for deployment on the target device; determine that a connection with the target device is established over a short-range wireless link; determine a firmware section to transfer to the target device; transfer the determined firmware section to the target device over the short-range wireless link; and repeat the computer program code to determine a firmware section and transfer until a predetermined number of firmware sections, being a strict subset of all firmware sections, have been transferred. 
     According to a fourth aspect, it is provided a computer program product comprising a computer program according to the third aspect and a computer readable means on which the computer program is stored. 
     Generally, all terms used in the claims are to be interpreted according to their ordinary meaning in the technical field, unless explicitly defined otherwise herein. All references to “a/an/the element, apparatus, component, means, step, etc.” are to be interpreted openly as referring to at least one instance of the element, apparatus, component, means, step, etc., unless explicitly stated otherwise. The steps of any method disclosed herein do not have to be performed in the exact order disclosed, unless explicitly stated. 
    
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
       Aspects and embodiments are now described, by way of example, with reference to the accompanying drawings, in which: 
         FIG. 1  is a schematic diagram illustrating an environment in which embodiments presented herein can be applied; 
         FIG. 2  is a schematic diagram illustrating the firmware sections; 
         FIG. 3  is a flow chart for enabling upgrading firmware of a target device; 
         FIG. 4  is a sequence diagram illustrating communication between different entities for upgrading firmware of a target device; 
         FIG. 5  is a schematic diagram illustrating components of the portable updater of  FIG. 1 ; and 
         FIG. 6  shows one example of a computer program product comprising computer readable means. 
     
    
    
     DETAILED DESCRIPTION 
     The aspects of the present disclosure will now be described more fully hereinafter with reference to the accompanying drawings, in which certain embodiments of the invention are shown. These aspects may, however, be embodied in many different forms and should not be construed as limiting; rather, these embodiments are provided by way of example so that this disclosure will be thorough and complete, and to fully convey the scope of all aspects of invention to those skilled in the art. Like numbers refer to like elements throughout the description. 
       FIG. 1  is a schematic diagram illustrating an environment in which embodiments presented herein can be applied. A target device  2  is an electronic device with a specific purpose. For instance, the target device  2  can be an electronic lock, a communication bridge device, personal emergency notification device, etc. In one embodiment, the target device  2  is not persistently connected to a communication network. 
     A portable updater  1  is configured to communicate with the target device  2  over a short-range wireless link  5 . The short-range wireless link  5  can be based on any suitable current or future communication protocol for local wireless communication, e.g. Bluetooth and/or Bluetooth Low Energy (BLE). 
     The portable updater  1  is further configured to communicate with a server  3  over a communication network  4 . The communication network  4  can e.g. be based on the Internet, and/or a cellular communication network. The portable updater  1  can be implemented as a smartphone, i.e. a multi-purpose mobile phone with capability of installing user-selected software applications, also known as apps. Alternatively, the updater is an access card, e.g. based on RFID (Radio Frequency Identification). 
     As explained in more detail below, the portable updater  1  is used to update firmware of the target device  2 . Specifically, the firmware is not updated in a single operation; instead the firmware is divided in firmware sections, and is progressively transferred to the target device  2 . The portable updater  1  can also be used to communicate with the target device  2  for its intended purpose, e.g. to unlock the target device  2  when this is an electronic lock. 
       FIG. 2  is a schematic diagram illustrating the firmware sections  10   a - n.  A complete firmware  11  is divided in firmware sections  10   a - n.  The number of sections can vary in different implementations and can be selected based on the size of the complete firmware  11 . Each firmware section  10   a - n  is a significant amount of data, e.g. at least one kilobyte or even at least one megabyte. In any case, each firmware section is greater than a single data packet, a single byte or a single bit. Hence, the firmware section is greater than what can be transferred in a single data packet between the portable updater and the target device. This simplifies the tracking of what firmware sections have been transferred and what firmware sections need to be transferred. 
     In order to upgrade the firmware in a target device  2 , the complete firmware, i.e. all firmware sections boa-n, need to be transferred to the target device. The complete firmware  11  is a specified version of complete firmware which can be applied to a target device. Different models of target devices can (but might not necessarily need to) have different types of firmware. The server can determine the firmware (including its version) to be applied for a particular target device, e.g. based on a serial number of the target device or a model number of the target device. 
       FIG. 3  is a flow chart for enabling upgrading firmware of a target device. The method is performed in a portable updater, such as the portable updater shown in  FIG. 1  and described above. The portable updater can be a smartphone. The target device can be an electronic lock. 
     In an optional transmit identifier(s) step  40 , the portable updater transmits an identifier (e.g. a serial number) of the target device to the server. In one embodiment, the updater device transmits a list of identifiers of target devices with which the portable device has interacted. When performed, this step is performed prior to step  42 . 
     In a download firmware sections step  42 , the portable updater downloads a plurality of firmware sections from a server. As explained above, the firmware sections collectively make up a complete firmware for deployment on the target device. When step  40  is performed, the complete firmware version to download is determined by the server, and communicated to the portable updater. The server then keeps track of what firmware version is applicable to what target device, using the identifier of the target device. It is to be noted that in some instances, the firmware may not need to be upgraded, in which case the method ends prior to performing step  42 . 
     In a determine connection step  44 , the portable updater determines that a connection with the target device is established over a short-range wireless link. Optionally, this step comprises establishing the connection with the target device over the short-range wireless link. The short-range wireless link can e.g. be based on Bluetooth or Bluetooth Low Energy or any other suitable short-range wireless link. The connection can be established also for another purpose, e.g. to control the target device in accordance with its specified purpose, e.g. to unlock the target device  2  when the target device is an electronic lock. As part of this step, the portable updater can inform the target device of the firmware version it has available for the target device, based on the identity of the target device. 
     In a determine firmware section step  46 , the portable updater determines a firmware section to transfer to the target device. The firmware section to transfer can be determined based on a section indicator received from the target device over the short-range wireless link. This implements a pull-based transfer of firmware to the target device, i.e. the target device, in effect, requests firmware sections to be transferred, based on the communication from the updater device in step  44 . The target device is then in control of what firmware section to transfer. For instance, if firmware sections o to n of a particular version had been transferred previously, the target device may decide to request firmware section n+1. On the other hand, if there is a new firmware version available (communicated in step  44 ), the target device could decide to request firmware section o of that firmware version. It is to be noted that the firmware sections do not need to be requested sequentially. This pull-based transfer gives the target device control of the progression of transfer or firmware sections, which enables different portable updaters to supply different firmware sections (over time) of the same firmware. The section indicator can specify a specific firmware section to transfer. Optionally, the section indicator also specifies a firmware version, either by specifying the current version in the target device or by specifying a version number to update to. 
     In a transfer step  48 , the portable updater transfers the determined firmware section to the target device over the short-range wireless link. Optionally, the portable updater transmits a status message to the server, to report the result of the transfer of the determined firmware section to a specific target device. In this way, the server knows when a certain firmware section has been successfully transferred to the target device, and can determine when all firmware sections of a complete firmware have been transferred. 
     In a conditional done step  49 , it is determined whether a predetermined number (also denoted transfer number) of firmware sections, being a strict subset of all firmware sections, have been transferred. It this is not true, the method returns to the determine firmware section step  46 . Otherwise, the method ends for this session, optionally via a tear down connection step  50 . 
     In the optional tear down connection step  50 , the portable updater tears down the connection with the target device, which then occurs after the strict subset of all firmware sections have been transferred. This step can be performed when it is confirmed that other data (e.g. access control data) has been appropriately communicated with the target device. 
     The connection (i.e. the communication session) with the target device can thus be limited to transfer only the strict subset of all firmware sections. While no more firmware sections are transferred over the connection, other data (e.g. access control data) can be transferred. 
     In other words, after the transfer number of firmware sections are transferred, no more firmware sections are transferred in this session, even if the target device still misses firmware sections that are available in the updater. It is to be noted that the transfer number is deliberately less than the total number of sections, to split up the transfer of sections in multiple sessions, to thereby reduce the time that is used for each transfer session. Hence, the bandwidth used in each session for transferring firmware sections is limited, to reduce negative effects on other communication with the target device. After a number of connections, potentially from different updaters, sufficient number of firmware sections will have been transferred to make up the entire firmware, while still not occupying too excessive bandwidth which would affect other communication. 
     The transfer number of firmware sections can be configured to control how aggressive the transfer of sections should be. If the transfer number is relatively high, the firmware will be transferred quicker (fewer transfer sessions), at the cost of slightly more disturbance to other communication. On the other hand, if the transfer number is relatively low, the firmware transfer will take a longer time (more transfer sessions), but the disturbance to other communication is reduced. 
     In one embodiment, the updater is configured to always transfer at least a first number of sections, when a connection is established with the target device. Alternatively or additionally, the updater is configured to always transfer at least a second number of sections when a disconnect occurs (or is triggered to occur) with the target device. In this case, the transfer occurs prior to the actual disconnection. The first number and the second number can differ from each other or be the same. 
     Optionally, transfer only occurs if a backoff duration has passed since the last disconnect. This prevents the transfer of firmware sections from occupying too much bandwidth, which could otherwise disrupt regular communication to the target device, with the updater or with other devices. 
     The parameters of transfer number, the first number, the second number and the backoff duration can be controlled centrally (from the server) to balance how quickly the firmware sections should be transferred to the target device. In one embodiment, one or more of the parameters are reconfigured over time to more aggressively transfer firmware sections if the firmware has not been transferred after a certain period, e.g. a certain number of days or months, to a specific target device. Optionally, the parameters are set progressively more aggressive over time to ensure the firmware is eventually transferred and applied. 
     Steps  44 ,  46  and  48  are performed each time an updater device establishes contact with a target device. In this way, it is not necessary that the complete firmware is transferred to target device in one communication session when the updater is in contact with the target device. Instead, one (or a few) firmware sections can be transferred each time. 
     Furthermore, the transfer of firmware sections to a target device can occur from different portable updaters. As long as the firmware sections are consistently defined and the firmware sections concern the same version of the complete firmware, there is nothing preventing different portable updaters transferring different firmware sections to the target device. 
     This flexibility in use of multiple updaters is of great benefit in many situations. For instance, consider the case of home care where the target device is an electronic lock. Any caregiver visiting the caretaker can transfer one or more sections during a visit, whereby eventually all sections will be transferred, even when caregivers may vary over time. Furthermore, there may be multiple caregivers during a single visit, in which case both caregivers may need to interact with the electronic lock. In such a case, the sections should be small enough to not disturb regular communication between updater (e.g. smartphone) and the target device. 
     Hence, for this and other embodiments, each section can have a maximum size, which can be determined based on expected transfer speed and/or type of target device. In one embodiment, the maximum size of each section also depends on the updater. For instance, the memory available for firmware sections may be limited in the updater, particularly if the updater is an access card (e.g. RFID). 
     There is no need for a deliberate user action for the transfer of firmware sections to commence from a portable updater device. Hence, any one of several users accessing the target device with an updater device lets its updater device act as a carrier for firmware sections. This automates the process of updating the firmware, simplifying the transfer of firmware sections. In this way, the firmware update can be applied using regular use and does not need e.g. maintenance personnel to apply the upgrade of firmware. This relieves the maintenance personnel from the time-consuming task of visiting each target device to upgrade firmware. As explained above, referring to the example of a home care situation, a single home care company can be responsible for the operation of thousands of such target devices. Each such upgrade traditionally takes 10-20 minutes of dedicated time. This deliberate update is completely eliminated by using embodiments presented herein. 
     Once all firmware sections of a complete firmware have been transferred to the target device, the target device reboots and applies the firmware upgrade e.g. using a bootloader. In this way, the target device is in full control of when it is ready to apply the upgrade, which minimises the risk of any transfer issues affecting stability of the target device during the firmware upgrade. The portable upgrader can then receive a success message from the target device, indicating that the target device has successfully applied a complete firmware. Once the success message has been received, the portable updater can send a corresponding success message to the server, allowing the server to keep track of currently applied firmware at the target device. 
       FIG. 4  is a sequence diagram illustrating communication between different entities for upgrading firmware of a target device. The sequence diagram corresponds to the method of  FIG. 3 , but better illustrates interaction between different entities. 
     First, the portable updater  1  transmits identifier(s)  20  of target device(s) it has interacted with to the server. This corresponds to step  40 . 
     Based on the identifier(s)  20 , the server  3  determines which firmware sections  21  that the updater should store to allow the firmware upgrade of the target device, and the updater downloads these firmware sections  21 . This corresponds to step  42 . 
     A connection  22  between the portable updater  1  and the target device  2  is established, corresponding to step  44 . The portable updater  1  then determines  46  which firmware section to transfer and transfers the determined firmware section  23 , corresponding to step  48 . 
     The target device can optionally indicate  24  to the updater when the transfer is complete, after which the portable updater  1  can send a corresponding indication  24 ′ (including an identifier of the target device  2  and an identifier of the transferred firmware section) to the server  3 , indicating the transfer of that particular firmware section is complete. This allows the server  3  to keep track of what firmware sections have been transferred to each individual target device. In this embodiment, both the target device  2  and the server  3  has this information. 
     Sequence steps  22 ,  46 ,  23 , and optional sequence steps  24 ,  24 ′ are repeated  26  by one or more portable updaters  1  until all firmware sections of a complete firmware have been transferred to a particular target device  2 . The target device  2  applies the complete firmware and sends a success message  27 , when the complete firmware has been successfully applied, to the portable updater  1 . The portable updater  1  then transmits a corresponding success message  27 ′ to the server, allowing the server to keep track of currently applied firmware at the target device  2 . 
       FIG. 5  is a schematic diagram illustrating components of the portable updater  1  of  FIG. 1 . A processor  60  is provided using any combination of one or more of a suitable central processing unit (CPU), multiprocessor, microcontroller, digital signal processor (DSP), etc., capable of executing software instructions  67  stored in a memory  64 , which can thus be a computer program product. The processor  60  could alternatively be implemented using an application specific integrated circuit (ASIC), field programmable gate array (FPGA), etc. The processor  60  can be configured to execute the method described with reference to  FIG. 3  above. 
     The memory  64  can be any combination of random-access memory (RAM) and/or read-only memory (ROM). The memory  64  also comprises persistent storage, which, for example, can be any single one or combination of magnetic memory, optical memory, solid-state memory or even remotely mounted memory. 
     A data memory  66  is also provided for reading and/or storing data during execution of software instructions in the processor  60 . The data memory  66  can be any combination of RAM and/or ROM. 
     The portable updater  1  further comprises an I/O interface  62  for communicating with external and/or internal entities. Optionally, the I/O interface  62  also includes a user interface. 
     A transceiver  61  comprises suitable analogue and digital components to allow signal transmission and signal reception with a wireless device using one or more antennas  63 . 
     Other components of the portable updater  1  are omitted in order not to obscure the concepts presented herein. 
       FIG. 6  shows one example of a computer program product  90  comprising computer readable means. On this computer readable means, a computer program  91  can be stored, which computer program can cause a processor to execute a method according to embodiments described herein. In this example, the computer program product is an optical disc, such as a CD (compact disc) or a DVD (digital versatile disc) or a Blu-Ray disc. As explained above, the computer program product could also be embodied in a memory of a device, such as the computer program product  64  of  FIG. 5 . While the computer program  91  is here schematically shown as a track on the depicted optical disk, the computer program can be stored in any way which is suitable for the computer program product, such as a removable solid-state memory, e.g. a Universal Serial Bus (USB) drive. 
     Here now follows a list of embodiments from another perspective, enumerated with roman numerals. 
     i. A method for enabling upgrading firmware of a target device, the method being performed in a portable updater and comprising the steps of: 
     downloading a plurality of firmware sections from a server, the firmware sections collectively making up a complete firmware for deployment on the target device; 
     determining that a connection with the target device is established over a short-range wireless link; 
     determining a firmware section to transfer to the target device; and 
     transferring the determined firmware section to the target device over the short-range wireless link; 
     wherein the steps of determining a firmware section and transferring are repeated until a predetermined number of firmware sections, being a strict subset of all firmware sections, have been transferred. 
     ii. The method according to embodiment i, further comprising the step, prior to the step of downloading, of transmitting an identifier of the target device to the server. 
     iii. The method according to any one of the preceding embodiments, wherein the step of determining a firmware section to transfer is based on a section indicator received from the target device over the short-range wireless link. 
     iv. The method according to embodiment iii, wherein the section indicator specifies a firmware section to transfer. 
     v. The method according to embodiment iv, wherein the section indicator specifies a firmware version. 
     vi. The method according to any one of the preceding embodiments, wherein the portable updater is a smartphone. 
     vii. The method according to any one of the preceding embodiments, wherein the short-range wireless link is based on Bluetooth or Bluetooth Low Energy. 
     viii. The method according to any one of the preceding embodiments, wherein the target device is an electronic lock. 
     ix. A portable updater for enabling upgrading firmware of a target device, the portable updater comprising: 
     a processor; and 
     a memory storing instructions that, when executed by the processor, cause the portable updater to: 
     download a plurality of firmware sections from a server, the firmware sections collectively making up a complete firmware for deployment on the target device; 
     determine that a connection with the target device is established over a short-range wireless link; 
     determine a firmware section to transfer to the target device; 
     transfer the determined firmware section to the target device over the short-range wireless link; and 
     repeat the instructions to determine a firmware section and transfer until a predetermined number of firmware sections, being a strict subset of all firmware sections, have been transferred. 
     x. The portable updater according to embodiment ix, wherein the portable updater is a smartphone. 
     xi. A computer program for enabling upgrading firmware of a target device, the computer program comprising computer program code which, when run on a portable updater causes the portable updater to: 
     download a plurality of firmware sections from a server, the firmware sections collectively making up a complete firmware for deployment on the target device; 
     determine that a connection with the target device is established over a short-range wireless link; 
     determine a firmware section to transfer to the target device; 
     transfer the determined firmware section to the target device over the short-range wireless link; and 
     repeat the computer program code to determine a firmware section and transfer until a predetermined number of firmware sections, being a strict subset of all firmware sections, have been transferred. 
     xii. A computer program product comprising a computer program according to embodiment xi and a computer readable means on which the computer program is stored. 
     The aspects of the present disclosure have mainly been described above with reference to a few embodiments. However, as is readily appreciated by a person skilled in the art, other embodiments than the ones disclosed above are equally possible within the scope of the invention, as defined by the appended patent claims. Thus, while various aspects and embodiments have been disclosed herein, other aspects and embodiments will be apparent to those skilled in the art. The various aspects and embodiments disclosed herein are for purposes of illustration and are not intended to be limiting, with the true scope and spirit being indicated by the following claims.