JP6750340B2 - Electronic device, firmware update method, and computer program - Google Patents

Electronic device, firmware update method, and computer program Download PDF

Info

Publication number
JP6750340B2
JP6750340B2 JP2016123577A JP2016123577A JP6750340B2 JP 6750340 B2 JP6750340 B2 JP 6750340B2 JP 2016123577 A JP2016123577 A JP 2016123577A JP 2016123577 A JP2016123577 A JP 2016123577A JP 6750340 B2 JP6750340 B2 JP 6750340B2
Authority
JP
Japan
Prior art keywords
firmware
determination information
value
indicates
information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2016123577A
Other languages
Japanese (ja)
Other versions
JP2017228077A (en
Inventor
孝司 榎並
孝司 榎並
正明 野呂
正明 野呂
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2016123577A priority Critical patent/JP6750340B2/en
Publication of JP2017228077A publication Critical patent/JP2017228077A/en
Application granted granted Critical
Publication of JP6750340B2 publication Critical patent/JP6750340B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Stored Programmes (AREA)

Description

本発明の実施形態は、電子機器、ファームウェアアップデート方法およびコンピュータプログラムに関する。 Embodiments of the present invention relate to an electronic device, a firmware update method, and a computer program.

従来、ワイヤレスセンサネットワークを構築するセンサノードは、人が立ち入り辛い場所に設置されることが多い。このため、このようなセンサノードのファームウェアのアップデートは、遠隔から無線経由で行われる。センサノードは、そのような状況下で、不良なファームウェアが送られると、動作を止めてしまうというトラブルを発生させることがあり、このようなトラブルの対応には多大なコストがかかってしまう。 Conventionally, a sensor node that constitutes a wireless sensor network is often installed in a place where it is difficult for people to enter. Therefore, such firmware update of the sensor node is performed remotely and wirelessly. In such a situation, the sensor node may cause a trouble of stopping its operation when the defective firmware is sent, and it takes a great deal of cost to deal with such a trouble.

ファームウェア更新時のトラブル対策として、eMMC(embedded Multi Media Card)等に複数のバンクを用意し、あるバンクのファームウェア更新時に、別のバンクに安定動作するファームウェアを残す仕組みが知られている。また、更新したファームウェアの起動に失敗した場合に、安定動作可能なファームウェアでの動作に戻る仕組みが知られている。 As a countermeasure against a trouble at the time of updating the firmware, there is known a mechanism in which a plurality of banks are prepared in an eMMC (embedded Multi Media Card) or the like, and when the firmware of a certain bank is updated, the stably operating firmware is left in another bank. In addition, a mechanism is known in which, when the updated firmware fails to start, the operation is restored to the stable firmware.

特開2014−142799号公報JP, 2014-142799, A 特開2015−106813号公報JP, 2005-106813, A

しかしながら、ファームウェアの起動自体は可能なものの、正常に動作しないという不具合が発生することがある。上記の従来技術では、更新されたファームウェアに不具合がある場合でも、このようにファームウェアが起動したときに、正常に動作する予備のファームウェアに巻き戻すことが困難であるという問題がある。このような問題は、センサノードに限らず、遠隔でファームウェアが更新される電子機器に発生することがある。 However, although the firmware itself can be started, there may occur a problem that it does not operate normally. The above-mentioned conventional technique has a problem that even when the updated firmware has a defect, it is difficult to rewind the spare firmware to operate normally when the firmware is activated. Such a problem may occur not only in the sensor node but also in an electronic device whose firmware is remotely updated.

1つの側面では、アップデートされたファームウェアに不具合があるときに、予備のファームウェアに巻き戻す電子機器、ファームウェアアップデート方法およびコンピュータプログラムを提供することを目的とする。 In one aspect, it is an object of the present invention to provide an electronic device, a firmware update method, and a computer program that rewinds to a spare firmware when the updated firmware has a defect.

第1の案では、電子機器は、制御部と、第1ファームウェアとブートローダとを記録する第1記憶装置と、判定情報を記録する第2記憶装置とを有する。第1ファームウェアは、制御部に起動されることにより、制御対象を制御し、さらに、外部装置からダウンロードされた第2ファームウェアを第1記憶装置に記録してブートローダを起動する。ブートローダは、制御部に起動されることにより、判定情報が第1値を示すときに第1ファームウェアを起動し、判定情報が第1値を示していないときに第2ファームウェアを起動する。第2ファームウェアは、制御部に起動されることにより、制御対象を制御し、さらに、第2ファームウェアの良否を判定する。第2ファームウェアは、第2ファームウェアが不良であると判定されたときに、判定情報が第1値を示すように判定情報を更新してブートローダを起動する。 In the first proposal, the electronic device includes a control unit, a first storage device that records the first firmware and the boot loader, and a second storage device that records the determination information. The first firmware controls the control target by being activated by the control unit, further records the second firmware downloaded from the external device in the first storage device, and activates the boot loader. The boot loader is activated by the control unit to activate the first firmware when the determination information indicates the first value, and activates the second firmware when the determination information does not indicate the first value. The second firmware controls the control target by being activated by the control unit, and further determines the quality of the second firmware. When the second firmware is determined to be defective, the second firmware updates the determination information so that the determination information indicates the first value and activates the boot loader.

本発明の1実施態様によれば、アップデートされたファームウェアに不具合があるときに、予備のファームウェアに適切に巻き戻すことができる。 According to one embodiment of the present invention, when there is a defect in the updated firmware, it is possible to properly rewind to the spare firmware.

図1は、実施形態にかかる電子機器が利用される無線センサネットワークを示すブロック図である。FIG. 1 is a block diagram showing a wireless sensor network in which an electronic device according to an embodiment is used. 図2は、実施例1のセンサノードを示すブロック図である。FIG. 2 is a block diagram illustrating the sensor node according to the first embodiment. 図3は、eMMCに記録される情報を説明する説明図である。FIG. 3 is an explanatory diagram illustrating information recorded in the eMMC. 図4は、ストレージに記録される情報を説明する説明図である。FIG. 4 is an explanatory diagram illustrating information recorded in the storage. 図5は、ファームウェアを示すブロック図である。FIG. 5 is a block diagram showing the firmware. 図6は、複数のチェックポイント処理結果とFW判定情報とを説明する説明図である。FIG. 6 is an explanatory diagram illustrating a plurality of checkpoint processing results and FW determination information. 図7は、実施例1のセンサノードの動作を示す動作シーケンス図である。FIG. 7 is an operation sequence diagram illustrating the operation of the sensor node according to the first embodiment. 図8は、実施例1のセンサノードの動作を示すフローチャートである。FIG. 8 is a flowchart showing the operation of the sensor node according to the first embodiment. 図9は、起動バンク情報とバンク試行情報とFW判定情報と起動されるファームウェアの関係を説明する説明図である。FIG. 9 is an explanatory diagram illustrating the relationship among the startup bank information, the bank trial information, the FW determination information, and the firmware to be activated. 図10は、実施例2のセンサノードの動作を示す動作シーケンス図である。FIG. 10 is an operation sequence diagram showing the operation of the sensor node according to the second embodiment. 図11は、実施例2のセンサノードの動作を示すフローチャートである。FIG. 11 is a flowchart showing the operation of the sensor node according to the second embodiment. 図12は、実施例3のセンサノードの動作を示すフローチャートである。FIG. 12 is a flowchart showing the operation of the sensor node according to the third embodiment. 図13は、実施例4のセンサノードの動作を示す動作シーケンス図である。FIG. 13 is an operation sequence diagram showing the operation of the sensor node according to the fourth embodiment. 図14は、実施例4のセンサノードの動作を示すフローチャートである。FIG. 14 is a flowchart showing the operation of the sensor node according to the fourth embodiment. 図15は、実施例5のセンサノードにサーバからダウンロードされるファームウェアを示す図である。FIG. 15 is a diagram illustrating the firmware downloaded from the server to the sensor node according to the fifth embodiment. 図16は、実施例5のセンサノードがファームウェアを受信する動作を示す動作シーケンス図である。FIG. 16 is an operation sequence diagram showing an operation in which the sensor node of the fifth embodiment receives the firmware. 図17は、パケットの送受信が欠落することがあるときの動作を示す動作シーケンス図である。FIG. 17 is an operation sequence diagram showing an operation when packet transmission/reception may be lost. 図18は、1つのブロックの送信が完了した後の動作を示す動作シーケンス図である。FIG. 18 is an operation sequence diagram showing an operation after the transmission of one block is completed. 図19は、実施例6のセンサノードがファームウェアの1つのブロックを受信する動作を示す動作シーケンス図である。FIG. 19 is an operation sequence diagram showing an operation in which the sensor node of the sixth embodiment receives one block of firmware. 図20は、実施例6のセンサノードがファームウェアの最終ブロックを受信する動作を示す動作シーケンス図である。FIG. 20 is an operation sequence diagram showing an operation in which the sensor node of the sixth embodiment receives the final block of firmware.

以下、図面を参照して、実施形態にかかる電子機器、ファームウェアアップデート方法およびコンピュータプログラムを説明する。実施形態において同一の機能を有する構成には同一の符号を付し、重複する説明は省略する。なお、以下の実施形態で説明する電子機器、ファームウェアアップデート方法およびコンピュータプログラムは、一例を示すに過ぎず、実施形態を限定するものではない。また、以下の各実施形態は、矛盾しない範囲内で適宜組みあわせてもよい。 Hereinafter, an electronic device, a firmware update method, and a computer program according to embodiments will be described with reference to the drawings. In the embodiments, components having the same function are designated by the same reference numeral, and overlapping description will be omitted. It should be noted that the electronic device, firmware update method, and computer program described in the following embodiments are merely examples and do not limit the embodiments. In addition, the following embodiments may be combined as appropriate within a range not inconsistent with each other.

<実施例1>
[無線センサネットワーク]
図1は、実施形態にかかる電子機器が利用される無線センサネットワークを示すブロック図である。無線センサネットワーク1は、図1に示されているように、サーバ2と、複数のセンサノード3−1〜3−N(N=2,3,4,…)とを有する。無線センサネットワーク1は、互いに異なる複数の位置にそれぞれ配置される複数の設備を遠隔監視することに利用され、たとえば、多数の下水道管の水位等をそれぞれ遠隔監視することに利用される。複数のセンサノード3−1〜3−Nのうちの任意のセンサノード3−i(i=1,2,3,…,N)は、実施形態にかかる電子機器から構成されている。複数のセンサノード3−1〜3−Nは、無線センサネットワーク1により遠隔監視される複数の監視対象にそれぞれ設置されている。サーバ2と複数のセンサノード3−1〜3−Nは、無線環境5を介して互いに通信可能に接続されている。すなわち、センサノード3−iは、サーバ2に十分に近い領域に配置されているときに、無線通信を介してサーバ2と直接に通信する。センサノード3−iは、サーバ2と直接に無線通信することが困難であるときに、複数のセンサノード3−1〜3−Nのうちのサーバ2と無線通信できるセンサノード3−j(j=1,2,3,…,N;j≠i)と通信することにより、サーバ2と間接的に通信する。センサノード3−iは、さらに、サーバ2と直接に通信することが困難であるセンサノード3−k(k=1,2,3,…,N;k≠i;k≠j)と無線通信することにより、センサノード3−kとサーバ2との通信を中継する。
<Example 1>
[Wireless sensor network]
FIG. 1 is a block diagram showing a wireless sensor network in which an electronic device according to an embodiment is used. As shown in FIG. 1, the wireless sensor network 1 includes a server 2 and a plurality of sensor nodes 3-1 to 3-N (N=2, 3, 4,... ). The wireless sensor network 1 is used to remotely monitor a plurality of facilities respectively arranged at a plurality of different positions, for example, to remotely monitor the water levels of a large number of sewer pipes. Any sensor node 3-i (i=1, 2, 3,..., N) among the plurality of sensor nodes 3-1 to 3-N is configured by the electronic device according to the embodiment. The plurality of sensor nodes 3-1 to 3-N are installed in a plurality of monitoring targets that are remotely monitored by the wireless sensor network 1. The server 2 and the plurality of sensor nodes 3-1 to 3-N are communicably connected to each other via the wireless environment 5. That is, the sensor node 3-i directly communicates with the server 2 via wireless communication when the sensor node 3-i is arranged in a region sufficiently close to the server 2. When it is difficult to directly wirelessly communicate with the server 2, the sensor node 3-i can wirelessly communicate with the server 2 among the plurality of sensor nodes 3-1 to 3-N. , 1, 2, 3,..., N; j≠i), thereby indirectly communicating with the server 2. The sensor node 3-i further wirelessly communicates with the sensor node 3-k (k=1, 2, 3,..., N; k≠i;k≠j), which is difficult to directly communicate with the server 2. By doing so, the communication between the sensor node 3-k and the server 2 is relayed.

[サーバ]
サーバ2は、センサノード3−iと無線通信することにより、センサノード3−iにより測定された複数の測定値をセンサノード3−iから収集する。サーバ2は、さらに、更新された新しいファームウェアを複数のセンサノード3−1〜3−Nにインストールするときに、制御情報であるファームウェア更新要求を複数のセンサノード3−1〜3−Nに配信する。サーバ2は、FW(FirmWare:ファームウェア)更新要求に対するACK(ACknowledgement:肯定応答)がセンサノード3−iから返信されたときに、無線通信を介して、センサノード3−iにその新しいファームウェアを送信する。なお、サーバ2は、同様に動作する他の外部装置に置換されてもよい。その外部装置としては、ゲートウェイ(GW:GateWay)が例示される。
[server]
The server 2 collects a plurality of measurement values measured by the sensor node 3-i from the sensor node 3-i by wirelessly communicating with the sensor node 3-i. The server 2 further distributes a firmware update request, which is control information, to the plurality of sensor nodes 3-1 to 3-N when installing the updated new firmware to the plurality of sensor nodes 3-1 to 3-N. To do. The server 2 transmits the new firmware to the sensor node 3-i via wireless communication when an ACK (ACknowledgement) to the FW (Firmware) update request is returned from the sensor node 3-i. To do. The server 2 may be replaced with another external device that operates similarly. A gateway (GW:Gateway) is illustrated as the external device.

[実施例1のセンサノード]
図2は、実施例1のセンサノードを示すブロック図である。センサノード3−iは、図2に示されているように、RF通信部11(Radio Frequency)と複数のセンサ12−1〜12−M(M=2,3,4,…)とMCU14(Micro Control Unit)とを備えている。RF通信部11は、MCU14に情報伝達可能に接続されている。RF通信部11は、MCU14に制御されることにより、電波を介してサーバ2と通信し、電波を介して複数のセンサノード3−1〜3−Nのうちのセンサノード3−iと異なる他のセンサノードと通信する。複数のセンサ12−1〜12−Mは、それぞれ、MCU14に情報伝達可能に接続されている。複数のセンサ12−1〜12−Mのうちの任意のセンサは、MCU14に制御されることにより、測定値を測定する。その測定される測定値としては、センサノード3−iが設置される設備に関するものであり、たとえば、下水道管の水位が例示される。
[Sensor Node of First Embodiment]
FIG. 2 is a block diagram illustrating the sensor node according to the first embodiment. As shown in FIG. 2, the sensor node 3-i includes an RF communication unit 11 (Radio Frequency), a plurality of sensors 12-1 to 12-M (M=2, 3, 4,...) And an MCU 14 ( Micro Control Unit). The RF communication unit 11 is connected to the MCU 14 so that information can be transmitted. The RF communication unit 11 is controlled by the MCU 14 to communicate with the server 2 via radio waves and is different from the sensor node 3-i among the plurality of sensor nodes 3-1 to 3-N via radio waves. Communicate with the sensor node. Each of the plurality of sensors 12-1 to 12-M is connected to the MCU 14 so that information can be transmitted. Any sensor of the plurality of sensors 12-1 to 12-M measures a measurement value by being controlled by the MCU 14. The measured value is related to the equipment in which the sensor node 3-i is installed, and is, for example, the water level of the sewer pipe.

センサノード3−iは、さらに、ストレージ15とウォッチドッグタイマ16とカレンダータイマ17とを備えている。ストレージ15は、フラッシュメモリから形成されている。ストレージ15は、MCU14に制御されることにより、MCU14により取り扱われる情報を記録する。なお、ストレージ15は、フラッシュメモリと異なる他の記憶装置に置換されてもよい。その記憶装置としては、ハードディスク、光ディスク、データを書き換え可能な半導体メモリが例示される。半導体メモリとしては、SSD(Solid State Drive)、RAM(Random Access Memory)、NVSRAM(Non Volatile Static Random Access Memory)などが例示される。 The sensor node 3-i further includes a storage 15, a watchdog timer 16, and a calendar timer 17. The storage 15 is formed of a flash memory. The storage 15 records information handled by the MCU 14 under the control of the MCU 14. The storage 15 may be replaced with another storage device different from the flash memory. Examples of the storage device include a hard disk, an optical disk, and a data rewritable semiconductor memory. Examples of the semiconductor memory include SSD (Solid State Drive), RAM (Random Access Memory), NVSRAM (Non Volatile Static Random Access Memory), and the like.

ウォッチドッグタイマ16は、MCU14に情報伝達可能に接続されている。ウォッチドッグタイマ16は、MCU14により設定された時刻から所定の期間経過した後にタイムアウトする。ウォッチドッグタイマ16は、タイムアウトしたときに、タイムアウトしたことをMCU14に伝達することにより、MCU14をリブートさせる。ウォッチドッグタイマ16は、MCU14により解除されることにより、MCU14により設定された時刻から所定の期間経過した後にタイムアウトしないで、MCU14をリブートさせない。 The watchdog timer 16 is connected to the MCU 14 so that information can be transmitted. The watchdog timer 16 times out after a lapse of a predetermined period from the time set by the MCU 14. When the watchdog timer 16 times out, the fact that it has timed out is transmitted to the MCU 14 to reboot the MCU 14. Since the watchdog timer 16 is released by the MCU 14, the watchdog timer 16 does not time out after a predetermined period has elapsed from the time set by the MCU 14 and does not reboot the MCU 14.

カレンダータイマ17は、MCU14に情報伝達可能に接続されている。カレンダータイマ17は、MCU14に制御されることにより、現在時刻をMCU14に伝達する。 The calendar timer 17 is connected to the MCU 14 so that information can be transmitted. The calendar timer 17 transmits the current time to the MCU 14 under the control of the MCU 14.

MCU14は、eMMC19を有している。eMMC19は、フラッシュメモリから形成され、センサノード3−iにインストールされるコンピュータプログラムを記録している。MCU14は、そのコンピュータプログラムが起動されることにより、RF通信部11と複数のセンサ12−1〜12−Mとストレージ15とウォッチドッグタイマ16とカレンダータイマ17とを制御する。 The MCU 14 has an eMMC 19. The eMMC 19 is formed from a flash memory and records a computer program installed in the sensor node 3-i. The MCU 14 controls the RF communication unit 11, the plurality of sensors 12-1 to 12-M, the storage 15, the watchdog timer 16, and the calendar timer 17 by activating the computer program.

センサノード3−iは、さらに、図示されていない電池を備えている。RF通信部11と複数のセンサ12−1〜12−MとMCU14とストレージ15とウォッチドッグタイマ16とカレンダータイマ17とは、その電池から供給される電力を用いて動作する。 The sensor node 3-i further includes a battery (not shown). The RF communication unit 11, the plurality of sensors 12-1 to 12-M, the MCU 14, the storage 15, the watchdog timer 16, and the calendar timer 17 operate by using the electric power supplied from the battery.

RF通信部11とMCU14とストレージ15とウォッチドッグタイマ16とカレンダータイマ17とは、ワンチップで形成されている。なお、これらは、複数のチップから形成されてもよい。 The RF communication unit 11, the MCU 14, the storage 15, the watchdog timer 16, and the calendar timer 17 are formed by one chip. Note that these may be formed from a plurality of chips.

なお、eMMC19は、他の記憶装置に置換されてもよい。その記憶装置としては、データを書き換え可能な半導体メモリが例示され、SSD、RAM、NVSRAMが例示される。さらに、eMMC19は、MCU14の内部に設けられているが、MCU14と別個に設けられていてもよい。 The eMMC 19 may be replaced with another storage device. As the storage device, a semiconductor memory capable of rewriting data is exemplified, and SSD, RAM, NVSRAM are exemplified. Further, although the eMMC 19 is provided inside the MCU 14, it may be provided separately from the MCU 14.

なお、MCU14は、他の制御部に置換されてもよい。その制御部としては、電子回路や集積回路が例示される。その電子回路としては、CPU(Central Processing Unit)が例示される。その集積回路としては、ASIC(Application Specific Integrated Circuit)、FPGA(Field Programmable Gate Array)が例示される。 The MCU 14 may be replaced with another control unit. An electronic circuit or an integrated circuit is exemplified as the control unit. A CPU (Central Processing Unit) is exemplified as the electronic circuit. Examples of the integrated circuit include an ASIC (Application Specific Integrated Circuit) and an FPGA (Field Programmable Gate Array).

[eMMCに記録される情報]
図3は、eMMCに記録される情報を説明する説明図である。eMMC19は、図3に示されているように、複数のメモリバンクに分割されている。eMMC19は、複数のメモリバンクにブートローダ21と複数のファームウェア22−1〜22−K(K=2,3,4,…)とをそれぞれ記録している。たとえば、ブートローダ21は、複数のメモリバンクのうちのアドレスが0から始まる1つのメモリバンクに記録されている。複数のファームウェア22−1〜22−Kのうちの1つのファームウェア22−A(A=1,2,3,…,K)は、複数のメモリバンクのうちのアドレスがaから始まる1つのメモリバンクに記録されている。複数のファームウェア22−1〜22−Kのうちの他のファームウェア22−B(B=1,2,3,…,K;A≠B)は、複数のメモリバンクのうちのアドレスがbから始まる1つのメモリバンクに記録されている。
[Information recorded in eMMC]
FIG. 3 is an explanatory diagram illustrating information recorded in the eMMC. The eMMC 19 is divided into a plurality of memory banks, as shown in FIG. The eMMC 19 records a boot loader 21 and a plurality of firmwares 22-1 to 22-K (K=2, 3, 4,...) In a plurality of memory banks, respectively. For example, the boot loader 21 is recorded in one memory bank whose address starts from 0 among the plurality of memory banks. One firmware 22-A (A=1, 2, 3,..., K) of the plurality of firmware 22-1 to 22-K is one memory bank of the plurality of memory banks whose address starts from “a”. It is recorded in. In the other firmware 22-B (B=1, 2, 3,..., K; A≠B) of the plurality of firmware 22-1 to 22-K, the address of the plurality of memory banks starts from b. It is recorded in one memory bank.

[ストレージに記録される情報]
図4は、ストレージに記録される情報を説明する説明図である。ストレージ15は、図4に示されているように、起動バンク情報25とバンク試行情報26と複数のチェックポイント処理結果27−1〜27−X(X=2,3,4,…)とFW判定情報28とを記録している。起動バンク情報25は、eMMC19に記録される複数のファームウェア22−1〜22−Kから選択された1つのファームウェアを示している。具体的には、起動バンク情報25は、eMMC19の複数のメモリバンクのうちのその選択されたファームウェアが記録された1つのメモリバンクの識別子を示している。なお、起動バンク情報25は、メモリバンクの識別子と異なる情報を示すことにより、その選択されたファームウェアを示してもよい。起動バンク情報25が示す情報としては、選択されたファームウェアのプログラムカウンタ、選択されたファームウェアの更新時刻、選択されたファームウェアのリビジョン番号が例示される。
[Information recorded in storage]
FIG. 4 is an explanatory diagram illustrating information recorded in the storage. As shown in FIG. 4, the storage 15 has startup bank information 25, bank trial information 26, a plurality of checkpoint processing results 27-1 to 27-X (X=2, 3, 4,...) And FW. The determination information 28 is recorded. The startup bank information 25 indicates one firmware selected from the plurality of firmware 22-1 to 22-K recorded in the eMMC 19. Specifically, the startup bank information 25 indicates the identifier of one memory bank in which the selected firmware is recorded among the plurality of memory banks of the eMMC 19. The startup bank information 25 may indicate the selected firmware by indicating information different from the memory bank identifier. Examples of the information indicated by the startup bank information 25 include the program counter of the selected firmware, the update time of the selected firmware, and the revision number of the selected firmware.

バンク試行情報26は、起動バンク情報25が示すファームウェアが1度起動しようとしたかどうかを示し、「○」または「×」を示している。すなわち、バンク試行情報26は、「○」を示しているときに、起動バンク情報25が示すファームウェアが1度起動されたことを示している。バンク試行情報26は、「×」を示しているときに、起動バンク情報25が示すファームウェアが1度も起動されていないことを示している。複数のチェックポイント処理結果27−1〜27−Xのうちの任意のチェックポイント処理結果27−x(x=1,2,3,…,X)は、「未定」または「正常」または「不良」を示している。FW判定情報28は、「未定」または「正常」または「不良」を示している。 The bank trial information 26 indicates whether or not the firmware indicated by the startup bank information 25 has tried to start once, and indicates “◯” or “x”. That is, when the bank trial information 26 indicates “◯”, it indicates that the firmware indicated by the activation bank information 25 has been activated once. When the bank trial information 26 indicates “x”, it indicates that the firmware indicated by the activation bank information 25 has never been activated. An arbitrary checkpoint processing result 27-x (x=1, 2, 3,..., X) of the plurality of checkpoint processing results 27-1 to 27-X is “undecided” or “normal” or “defective”. Is shown. The FW determination information 28 indicates “undecided”, “normal”, or “defective”.

[ファームウェア]
図5は、ファームウェアを示すブロック図である。ファームウェア22−Aは、図5に示されているように、MCU14に複数の機能をそれぞれ実現させるための複数のコンピュータプログラムから形成されている。その複数の機能は、通常動作部31とアップデート部32と複数のチェックポイント処理部33−1〜33−XとFW判定情報更新部34とを含んでいる。
[firmware]
FIG. 5 is a block diagram showing the firmware. The firmware 22-A is formed of a plurality of computer programs for causing the MCU 14 to realize a plurality of functions, respectively, as shown in FIG. The plurality of functions include a normal operation unit 31, an updating unit 32, a plurality of checkpoint processing units 33-1 to 33-X, and an FW determination information updating unit 34.

通常動作部31は、複数のセンサ12−1〜12−Mを制御することにより、複数のセンサ12−1〜12−Mにより複数の測定値をそれぞれ測定する。通常動作部31は、さらに、RF通信部11を制御することにより、無線環境5を介して、複数のセンサ12−1〜12−Mによりそれぞれ測定された複数の測定値をサーバ2に送信する。 The normal operation unit 31 controls the plurality of sensors 12-1 to 12-M to measure the plurality of measurement values by the plurality of sensors 12-1 to 12-M, respectively. The normal operation unit 31 further controls the RF communication unit 11 to transmit a plurality of measurement values respectively measured by the plurality of sensors 12-1 to 12-M to the server 2 via the wireless environment 5. ..

アップデート部32は、RF通信部11を介して、サーバ2からFW更新要求を受信する。アップデート部32は、サーバ2からFW更新要求を受信したときに、RF通信部11を介して、更新されたファームウェア22−Bをサーバ2からダウンロードする。アップデート部32は、さらに、eMMC19を制御することにより、ダウンロードされたファームウェア22−BをeMMC19の所定のバンクメモリに記録する。所定のバンクメモリは、eMMC19の複数のバンクメモリのうちの起動されているファームウェア22−Aが記録されているバンクメモリと異なる他のバンクメモリである。 The update unit 32 receives the FW update request from the server 2 via the RF communication unit 11. When receiving the FW update request from the server 2, the update unit 32 downloads the updated firmware 22-B from the server 2 via the RF communication unit 11. The update unit 32 further controls the eMMC 19 to record the downloaded firmware 22-B in a predetermined bank memory of the eMMC 19. The predetermined bank memory is another bank memory different from the bank memory in which the activated firmware 22-A is recorded among the plurality of bank memories of the eMMC 19.

アップデート部32は、ダウンロードされたファームウェア22−BがeMMC19に記録された後に、ストレージ15を制御することにより、起動バンク情報25とバンク試行情報26とFW判定情報28とを更新する。すなわち、アップデート部32は、そのダウンロードされたファームウェア22−Bを起動バンク情報25が示すように、起動バンク情報25を更新する。アップデート部32は、バンク試行情報26が「×」を示すように、バンク試行情報26を更新する。アップデート部32は、FW判定情報28が「未定」を示すように、FW判定情報28を更新する。アップデート部32は、さらに、起動バンク情報25とバンク試行情報26とFW判定情報28とが更新された後に、リブートし、ブートローダ21を起動し、制御をブートローダ21に移す。 The update unit 32 updates the startup bank information 25, the bank trial information 26, and the FW determination information 28 by controlling the storage 15 after the downloaded firmware 22-B is recorded in the eMMC 19. That is, the update unit 32 updates the startup bank information 25 so that the downloaded firmware 22-B is indicated by the startup bank information 25. The update unit 32 updates the bank trial information 26 so that the bank trial information 26 indicates “x”. The update unit 32 updates the FW determination information 28 so that the FW determination information 28 indicates “undecided”. After the startup bank information 25, the bank trial information 26, and the FW determination information 28 are updated, the update unit 32 further reboots, boots the boot loader 21, and transfers control to the boot loader 21.

複数のチェックポイント処理部33−1〜33−Xは、ストレージ15に記録される複数のチェックポイント処理結果27−1〜27−Xに対応している。複数のチェックポイント処理部33−1〜33−Xのうちの任意のチェックポイント処理部33−xは、ストレージ15を制御することにより、FW判定情報28を取得する。チェックポイント処理部33−xは、FW判定情報28が「正常」を示していないときに、ファームウェア22−A(特に、通常動作部31)の良否を判定する。このとき、複数のチェックポイント処理部33−1〜33−Xは、互いに異なる複数の観点からファームウェア22−Aの良否をそれぞれ判定する。 The plurality of checkpoint processing units 33-1 to 33-X correspond to the plurality of checkpoint processing results 27-1 to 27-X recorded in the storage 15. An arbitrary checkpoint processing unit 33-x among the plurality of checkpoint processing units 33-1 to 33-X acquires the FW determination information 28 by controlling the storage 15. The checkpoint processing unit 33-x determines the quality of the firmware 22-A (particularly, the normal operation unit 31) when the FW determination information 28 does not indicate “normal”. At this time, the plurality of checkpoint processing units 33-1 to 33-X respectively judge the quality of the firmware 22-A from a plurality of different viewpoints.

チェックポイント処理部33−xは、ストレージ15を制御することにより、判定された結果に基づいて複数のチェックポイント処理結果27−1〜27−Xのうちのチェックポイント処理部33−xに対応するチェックポイント処理結果27−xを更新する。すなわち、チェックポイント処理部33−xは、ファームウェア22−Aが正常であると判定されたときに、チェックポイント処理結果27−xが「正常」を示すようにチェックポイント処理結果27−xを更新する。チェックポイント処理部33−xは、ファームウェア22−Aが不良であると判定されたときに、チェックポイント処理結果27−xが「不良」を示すようにチェックポイント処理結果27−xを更新する。チェックポイント処理部33−xは、ファームウェア22−Aが正常か不良かを判定していないときに、チェックポイント処理結果27−xが「未定」を示すようにチェックポイント処理結果27−xを更新する。 The checkpoint processing unit 33-x corresponds to the checkpoint processing unit 33-x of the plurality of checkpoint processing results 27-1 to 27-X based on the determined result by controlling the storage 15. The checkpoint processing result 27-x is updated. That is, when the firmware 22-A is determined to be normal, the checkpoint processing unit 33-x updates the checkpoint processing result 27-x so that the checkpoint processing result 27-x indicates “normal”. To do. When it is determined that the firmware 22-A is defective, the checkpoint processing unit 33-x updates the checkpoint processing result 27-x so that the checkpoint processing result 27-x indicates "bad". The checkpoint processing unit 33-x updates the checkpoint processing result 27-x so that the checkpoint processing result 27-x indicates "undecided" when it is not determined whether the firmware 22-A is normal or defective. To do.

FW判定情報更新部34は、ストレージ15を制御することにより、複数のチェックポイント処理結果27−1〜27−Xに基づいてFW判定情報28を更新する。すなわち、FW判定情報更新部34は、複数のチェックポイント処理結果27−1〜27−Xの全部が「正常」を示しているときに、FW判定情報28が「正常」を示すようにFW判定情報28を更新する。FW判定情報更新部34は、複数のチェックポイント処理結果27−1〜27−Xのいずれかが「不良」を示しているときに、FW判定情報28が「不良」を示すようにFW判定情報28を更新する。FW判定情報更新部34は、複数のチェックポイント処理結果27−1〜27−Xの全部が「不良」を示していないで、いずれかが「未定」を示しているときに、FW判定情報28が「未定」を示すようにFW判定情報28を更新する。FW判定情報更新部34は、さらに、制御をブートローダ21に移す。 The FW determination information updating unit 34 controls the storage 15 to update the FW determination information 28 based on the plurality of checkpoint processing results 27-1 to 27-X. That is, the FW determination information updating unit 34 determines that the FW determination information 28 indicates “normal” when all of the plurality of checkpoint processing results 27-1 to 27-X indicate “normal”. The information 28 is updated. The FW determination information updating unit 34 sets the FW determination information 28 so that the FW determination information 28 indicates “defective” when any of the plurality of checkpoint processing results 27-1 to 27-X indicates “defective”. 28 is updated. The FW determination information updating unit 34, when all of the plurality of checkpoint processing results 27-1 to 27-X do not indicate “defective” and any of them indicate “undecided”, the FW determination information 28 FW determination information 28 is updated so that indicates “undecided”. The FW determination information updating unit 34 further transfers control to the boot loader 21.

図6は、複数のチェックポイント処理結果とFW判定情報とを説明する説明図である。複数のチェックポイント処理部33−1〜33−XによりバンクAのファームウェアの良否が判定された結果、バンクAのファームウェアに対する複数のチェックポイント処理結果27−1〜27−Xは、図6に示されているように、全部が「正常」を示している。このとき、バンクAのファームウェアに対するFW判定情報28は、バンクAのファームウェアに対する複数のチェックポイント処理結果27−1〜27−Xの全部が「正常」を示しているために、「正常」を示すように更新される。 FIG. 6 is an explanatory diagram illustrating a plurality of checkpoint processing results and FW determination information. As a result of the quality of the firmware of the bank A being determined by the plurality of checkpoint processing units 33-1 to 33-X, the plurality of checkpoint processing results 27-1 to 27-X for the firmware of the bank A are shown in FIG. As shown, all are "normal". At this time, the FW determination information 28 for the firmware of bank A indicates “normal” because all of the plurality of checkpoint processing results 27-1 to 27-X for the firmware of bank A indicate “normal”. To be updated.

複数のチェックポイント処理部33−1〜33−XによりバンクBのファームウェアの良否が判定された結果、バンクBのファームウェアに対する複数のチェックポイント処理結果27−1〜27−Xは、「正常」「不良」「未定」をそれぞれ示している。このとき、バンクBのファームウェアに対するFW判定情報28は、バンクBのファームウェアに対する複数のチェックポイント処理結果27−1〜27−Xの1つが「不良」を示しているために、「不良」を示すように更新される。 As a result of the quality of the firmware of the bank B being determined by the plurality of checkpoint processing units 33-1 to 33-X, the plurality of checkpoint processing results 27-1 to 27-X for the firmware of the bank B are “normal” and “normal”. “Bad” and “Undecided” are shown respectively. At this time, the FW determination information 28 for the firmware of the bank B indicates "bad" because one of the checkpoint processing results 27-1 to 27-X for the firmware of the bank B shows "bad". To be updated.

複数のチェックポイント処理部33−1〜33−XによりバンクCのファームウェアの良否が判定された結果、バンクCのファームウェアに対する複数のチェックポイント処理結果27−1〜27−Xは、「正常」「未定」「正常」をそれぞれ示している。このとき、バンクCのファームウェアに対するFW判定情報28は、バンクCのファームウェアに対する複数のチェックポイント処理結果27−1〜27−Xの全部が「不良」を示さないで、1つが「未定」を示しているために、「未定」を示すように更新される。 As a result of the quality of the firmware of the bank C being determined by the plurality of checkpoint processing units 33-1 to 33-X, the plurality of checkpoint processing results 27-1 to 27-X for the firmware of the bank C are “normal” and “normal”. "Undecided" and "normal" are shown respectively. At this time, in the FW determination information 28 for the firmware of the bank C, all of the plurality of checkpoint processing results 27-1 to 27-X for the firmware of the bank C do not indicate “defective” and one indicates “undecided”. Therefore, it is updated to indicate “undecided”.

[ブートローダ]
ブートローダ21は、センサノード3−iが起動されることにより起動され、または、複数のファームウェア22−1〜22−KによりMCU14がリブートされることにより起動される。ブートローダ21は、起動されると、ストレージ15に記録される起動バンク情報25とバンク試行情報26とFW判定情報28とに基づいて複数のファームウェア22−1〜22−Kから1つのファームウェアを選択する。ブートローダ21は、さらに、その選択されたファームウェアを起動する。さらに、ブートローダ21は、起動バンク情報25が示すファームウェアを起動する場合で、バンク試行情報26が「×」を示すときに、ストレージ15を制御することにより、「○」を示すようにバンク試行情報26を更新する。
[Boot loader]
The boot loader 21 is activated when the sensor node 3-i is activated, or when the MCU 14 is rebooted by the plurality of firmware 22-1 to 22-K. When booted, the boot loader 21 selects one firmware from the plurality of firmwares 22-1 to 22-K based on the startup bank information 25, the bank trial information 26, and the FW determination information 28 recorded in the storage 15. .. The boot loader 21 further activates the selected firmware. Furthermore, the boot loader 21 controls the storage 15 when the firmware indicated by the activation bank information 25 is activated and the bank trial information 26 indicates “x”, so that the bank trial information indicates “◯”. Update 26.

[実施例1のセンサノードの動作]
図7は、実施例1のセンサノードの動作を示す動作シーケンス図である。センサノード3−iのファームウェア22−Aは、図7に示されているように、センサノード3−iが新しいファームウェア22−Bをサーバ2から受信すると(S1)、ファームウェア22−BをeMMC19の所定のバンクメモリに記録する。ファームウェア22−Aは、新しいファームウェア22−BがeMMC19に記録されると、ストレージ15を制御することにより、起動バンク情報25がファームウェア22−Bを示すように、起動バンク情報25を更新する。ファームウェア22−Aは、さらに、ストレージ15を制御することにより、バンク試行情報26が「×」を示すように、バンク試行情報26を更新する。ファームウェア22−Aは、さらに、ストレージ15を制御することにより、FW判定情報28が「未定」を示すように、FW判定情報28を更新する(S2)。ファームウェア22−Aは、起動バンク情報25とバンク試行情報26とFW判定情報28とを更新した後に、リブートすることにより制御をブートローダ21に移す(S3)。
[Operation of Sensor Node of First Embodiment]
FIG. 7 is an operation sequence diagram illustrating the operation of the sensor node according to the first embodiment. When the sensor node 3-i receives the new firmware 22-B from the server 2 (S1), the firmware 22-A of the sensor node 3-i receives the firmware 22-B of the eMMC 19 as shown in FIG. It is recorded in a predetermined bank memory. When the new firmware 22-B is recorded in the eMMC 19, the firmware 22-A controls the storage 15 to update the startup bank information 25 so that the startup bank information 25 indicates the firmware 22-B. The firmware 22-A further controls the storage 15 to update the bank trial information 26 so that the bank trial information 26 indicates “x”. The firmware 22-A further controls the storage 15 to update the FW determination information 28 so that the FW determination information 28 indicates "undecided" (S2). The firmware 22-A updates the startup bank information 25, the bank trial information 26, and the FW determination information 28, and then reboots to transfer the control to the boot loader 21 (S3).

ブートローダ21は、起動されると、ストレージ15を制御することにより、起動バンク情報25とバンク試行情報26とFW判定情報28とをストレージ15から取得する(S4)。ブートローダ21は、起動バンク情報25とバンク試行情報26とFW判定情報28とに基づいて複数のファームウェア22−1〜22−Kからファームウェア22−Bを選択する(S5)。ブートローダ21は、ストレージ15を制御することにより、バンク試行情報26が「○」を示すように、バンク試行情報26を更新する(S6)。ブートローダ21は、バンク試行情報26が更新された後に、S5で選択されたファームウェア22−Bを起動することにより、ファームウェア22−Bに制御を移す(S7)。 When booted, the boot loader 21 controls the storage 15 to acquire the startup bank information 25, the bank trial information 26, and the FW determination information 28 from the storage 15 (S4). The boot loader 21 selects the firmware 22-B from the plurality of firmware 22-1 to 22-K based on the startup bank information 25, the bank trial information 26, and the FW determination information 28 (S5). The boot loader 21 controls the storage 15 to update the bank trial information 26 so that the bank trial information 26 indicates “◯” (S6). After the bank trial information 26 is updated, the boot loader 21 activates the firmware 22-B selected in S5 to transfer control to the firmware 22-B (S7).

ファームウェア22−Bは、起動されると、通常の動作を実行し、すなわち、複数のセンサ12−1〜12−Mを制御することにより、複数の測定値を測定し、RF通信部11を制御することにより、その測定された複数の測定値をサーバ2に送信する。ファームウェア22−Bは、さらに、ファームウェア22−B自身の良否を判定する(S8)。ファームウェア22−Bは、ファームウェア22−Bの良否を判定した後に、ストレージ15を制御することにより、FW判定情報28が「正常」または「不良」を示すように、FW判定情報28を更新する(S9)。 When activated, the firmware 22-B executes a normal operation, that is, controls a plurality of sensors 12-1 to 12-M to measure a plurality of measurement values and control the RF communication unit 11. By doing so, the plurality of measured values thus measured are transmitted to the server 2. The firmware 22-B further determines the quality of the firmware 22-B itself (S8). After determining the quality of the firmware 22-B, the firmware 22-B controls the storage 15 to update the FW determination information 28 so that the FW determination information 28 indicates “normal” or “defective” ( S9).

このように、センサノード3−iは、ブートローダ21とファームウェア22−Aとファームウェア22−Bとのうちの1つのコンピュータプログラムが実行され、これらのうちの2つのコンピュータプログラムが並行して実行されることがない。 As described above, in the sensor node 3-i, one computer program of the boot loader 21, the firmware 22-A, and the firmware 22-B is executed, and two computer programs of these are executed in parallel. Never.

図8は、実施例1のセンサノードの動作を示すフローチャートである。センサノード3−iは、図8に示されているように、まず、ブートローダ21が起動される。センサノード3−iのMCU14は、ブートローダ21が起動されると、ストレージ15を制御することにより、起動バンク情報25とバンク試行情報26とFW判定情報28とをストレージ15から取得する(S11)。MCU14は、FW判定情報28が「正常」を示していないで(S12、No)、FW判定情報28が「不良」を示しているときに(S13、Yes)、以前に正常に動作していたファームウェア22−Bを選択する(S14)。MCU14は、FW判定情報28が「未定」を示している場合で(S13、No)、バンク試行情報26が「○」を示しているときに(S15、Yes)、以前に正常に動作していたファームウェア22−Aを選択する(S14)。S14で選択されたファームウェア22−Bは、起動バンク情報25が示すファームウェア22−Aと異なっている。MCU14は、FW判定情報28が「未定」を示している場合で(S13、No)、バンク試行情報26が「×」を示しているときに(S15、No)、バンク試行情報26が「○」を示すようにバンク試行情報26を更新する(S16)。MCU14は、S16が実行されたときに、または、FW判定情報28が「正常」を示しているときに(S12、Yes)、起動バンク情報25が示すファームウェア22−Aを起動する(S17)。MCU14は、S14が実行されたときに、S14で選択されたファームウェア22−Bを起動する(S17)。 FIG. 8 is a flowchart showing the operation of the sensor node according to the first embodiment. In the sensor node 3-i, as shown in FIG. 8, first, the boot loader 21 is activated. When the boot loader 21 is activated, the MCU 14 of the sensor node 3-i controls the storage 15 to acquire activation bank information 25, bank trial information 26, and FW determination information 28 from the storage 15 (S11). The MCU 14 was previously operating normally when the FW determination information 28 does not indicate "normal" (S12, No) and the FW determination information 28 indicates "bad" (S13, Yes). The firmware 22-B is selected (S14). When the FW determination information 28 indicates "undecided" (S13, No), and when the bank trial information 26 indicates "○" (S15, Yes), the MCU 14 has been operating normally before. The selected firmware 22-A is selected (S14). The firmware 22-B selected in S14 is different from the firmware 22-A indicated by the startup bank information 25. When the FW determination information 28 indicates “undecided” (S13, No), the MCU 14 determines that the bank trial information 26 indicates “x” (S15, No), and the bank trial information 26 indicates “○”. The bank trial information 26 is updated to indicate "(S16). The MCU 14 activates the firmware 22-A indicated by the activation bank information 25 when S16 is executed or when the FW determination information 28 indicates “normal” (S12, Yes) (S17). When S14 is executed, the MCU 14 activates the firmware 22-B selected in S14 (S17).

MCU14は、ファームウェア22−A、22−Bが起動されると、まず、通常動作を実行する(S18)。すなわち、MCU14は、複数のセンサ12−1〜12−Mを制御することにより、複数の測定値をそれぞれ測定する。MCU14は、さらに、RF通信部11を制御することにより、その測定された複数の測定値をサーバ2に送信する。 When the firmware 22-A, 22-B is activated, the MCU 14 first executes a normal operation (S18). That is, the MCU 14 measures a plurality of measurement values by controlling the plurality of sensors 12-1 to 12-M. The MCU 14 further controls the RF communication unit 11 to transmit the measured plurality of measured values to the server 2.

MCU14は、通常動作が実行されると、複数のチェックポイント処理結果27−1〜27−Xに対応する複数のチェックポイント処理を実行する。その複数のチェックポイント処理のうちのチェックポイント処理結果27−xに対応するチェックポイント処理では、MCU14は、まず、FW判定情報28をストレージ15から取得する(S19)。MCU14は、FW判定情報28が「正常」以外を示しているときに、すなわち、FW判定情報28が「未定」を示しているときに(S19、No)、起動されているファームウェアの良否を1つの観点から判定する(S20)。MCU14は、ストレージ15を制御することにより、その判定された良否をチェックポイント処理結果27−xが示すように、チェックポイント処理結果27−xを更新する。すなわち、MCU14は、ファームウェア22−Aが正常であると判定されたときに、チェックポイント処理結果27−xが「正常」を示すようにチェックポイント処理結果27−xを更新する。チェックポイント処理部33−xは、ファームウェア22−Aが不良であると判定されたときに、チェックポイント処理結果27−xが「不良」を示すようにチェックポイント処理結果27−xを更新する。 When the normal operation is executed, the MCU 14 executes a plurality of checkpoint processes corresponding to the plurality of checkpoint process results 27-1 to 27-X. In the checkpoint process corresponding to the checkpoint process result 27-x of the plurality of checkpoint processes, the MCU 14 first acquires the FW determination information 28 from the storage 15 (S19). When the FW determination information 28 indicates other than “normal”, that is, when the FW determination information 28 indicates “undecided” (S19, No), the MCU 14 determines whether the activated firmware is good or bad. It judges from one viewpoint (S20). The MCU 14 controls the storage 15 to update the checkpoint processing result 27-x so that the checkpoint processing result 27-x indicates the determined quality. That is, when it is determined that the firmware 22-A is normal, the MCU 14 updates the checkpoint processing result 27-x so that the checkpoint processing result 27-x indicates "normal". When it is determined that the firmware 22-A is defective, the checkpoint processing unit 33-x updates the checkpoint processing result 27-x so that the checkpoint processing result 27-x indicates "bad".

MCU14は、複数のチェックポイント処理のいずれかで、起動されているファームウェアが不良であると判定されたときに(S20、No)、FW判定情報28が「不良」を示すようにFW判定情報28を更新する(S21)。MCU14は、FW判定情報28が「不良」を示すようにFW判定情報28が更新された後に、リブートすることにより、ブートローダ21を起動し、制御をブートローダ21に移す。 When it is determined that the activated firmware is defective (S20, No) in any of the plurality of checkpoint processes, the MCU 14 sets the FW determination information 28 so that the FW determination information 28 indicates “defective”. Is updated (S21). The MCU 14 reboots after the FW determination information 28 is updated so that the FW determination information 28 indicates “bad”, thereby booting the boot loader 21 and transferring control to the boot loader 21.

MCU14は、複数のチェックポイント処理の全部で、起動されているファームウェアが正常であると判定されたときに(S20、Yes)、ストレージ15を制御することにより、FW判定情報28が「正常」を示すようにFW判定情報28を更新する(S22)。 When it is determined that the activated firmware is normal in all of the plurality of checkpoint processes (Yes in S20), the MCU 14 controls the storage 15 so that the FW determination information 28 indicates “normal”. The FW determination information 28 is updated as shown (S22).

MCU14は、FW判定情報28が「正常」を示しているときに(S19、Yes)、または、S22でFW判定情報28が更新されたときに、RF通信部11を制御することにより、サーバ2からFW更新要求を受信しているかどうかを検出する(S23)。MCU14は、さらに、S20で良否の判定が保留されたときにも(S20、保留)、RF通信部11を制御することにより、サーバ2からFW更新要求を受信しているかどうかを検出する(S23)。 The MCU 14 controls the RF communication unit 11 when the FW determination information 28 indicates “normal” (S19, Yes) or when the FW determination information 28 is updated in S22. It is detected whether or not the FW update request is received from (S23). The MCU 14 also controls whether the FW update request is received from the server 2 by controlling the RF communication unit 11 even when the pass/fail judgment is suspended in S20 (S20, suspension) (S23). ).

MCU14は、サーバ2からFW更新要求を受信していないときに(S23、No)、S18〜S23の処理を繰り返し実行する。 When the FW update request is not received from the server 2 (S23, No), the MCU 14 repeatedly executes the processes of S18 to S23.

MCU14は、サーバ2からFW更新要求を受信しているときに(S23、Yes)、RF通信部11を制御することにより、サーバ2から更新されたファームウェアをダウンロードする。MCU14は、次いで、eMMC19を制御することにより、そのダウンロードされたファームウェアを、eMMC19の複数のメモリバンクのうちの起動されているファームウェアが記録されているメモリバンクと異なる他のメモリバンクに記録する(S24)。 When receiving the FW update request from the server 2 (S23, Yes), the MCU 14 controls the RF communication unit 11 to download the updated firmware from the server 2. The MCU 14 then controls the eMMC 19 to record the downloaded firmware in another memory bank different from the memory bank in which the activated firmware is recorded among the plurality of memory banks of the eMMC 19 ( S24).

MCU14は、ストレージ15を制御することにより、そのダウンロードされたファームウェアを起動バンク情報25が示すように起動バンク情報25を更新する。MCU14は、さらに、ストレージ15を制御することにより、FW判定情報28が「未定」を示すようにFW判定情報28を更新し、バンク試行情報26が「×」を示すようにバンク試行情報26を更新する(S25)。MCU14は、起動バンク情報25とバンク試行情報26とFW判定情報28とが更新された後に、リブートすることにより、ブートローダ21を起動し、ブートローダ21に制御を移す。 The MCU 14 controls the storage 15 to update the boot bank information 25 with the downloaded firmware as indicated by the boot bank information 25. The MCU 14 further controls the storage 15 to update the FW determination information 28 so that the FW determination information 28 indicates “undecided” and the bank trial information 26 so that the bank trial information 26 indicates “x”. Update (S25). After the startup bank information 25, the bank trial information 26, and the FW determination information 28 are updated, the MCU 14 reboots to boot the boot loader 21 and transfer control to the boot loader 21.

図9は、起動バンク情報とバンク試行情報とFW判定情報と起動されるファームウェアの関係を説明する説明図である。図9では、ファームウェア22−Aが「A」と記載され、ファームウェア22−Bが「B」と記載され、ブートローダ21により選択されるファームウェアが「選択バンク」と記載されている。ブートローダ21は、図9に示されているように、起動バンク情報25がファームウェア22−Aを示し、バンク試行情報26が「×」を示し、FW判定情報28が「未定」を示すときに、S11〜S17を実行することにより、ファームウェア22−Aを起動する。ブートローダ21は、起動バンク情報25がファームウェア22−Aを示し、バンク試行情報26が「○」を示し、FW判定情報28が「未定」を示すときに、ファームウェア22−Bを起動する。ブートローダ21は、起動バンク情報25がファームウェア22−Aを示し、バンク試行情報26が「○」または「×」を示し、FW判定情報28が「正常」を示すときに、ファームウェア22−Aを起動する。ブートローダ21は、起動バンク情報25がファームウェア22−Aを示し、バンク試行情報26が「○」または「×」を示し、FW判定情報28が「不良」を示すときに、ファームウェア22−Bを起動する。 FIG. 9 is an explanatory diagram for explaining the relationship among the activated bank information, the bank trial information, the FW determination information, and the firmware to be activated. In FIG. 9, the firmware 22-A is described as “A”, the firmware 22-B is described as “B”, and the firmware selected by the boot loader 21 is described as “selected bank”. The boot loader 21, as shown in FIG. 9, when the startup bank information 25 indicates the firmware 22-A, the bank trial information 26 indicates “x”, and the FW determination information 28 indicates “undecided”, The firmware 22-A is activated by executing S11 to S17. The boot loader 21 activates the firmware 22-B when the activation bank information 25 indicates the firmware 22-A, the bank trial information 26 indicates “◯”, and the FW determination information 28 indicates “undecided”. The boot loader 21 activates the firmware 22-A when the activation bank information 25 indicates the firmware 22-A, the bank trial information 26 indicates “◯” or “x”, and the FW determination information 28 indicates “normal”. To do. The boot loader 21 activates the firmware 22-B when the activation bank information 25 indicates the firmware 22-A, the bank trial information 26 indicates “◯” or “x”, and the FW determination information 28 indicates “bad”. To do.

ブートローダ21は、起動バンク情報25がファームウェア22−Bを示し、バンク試行情報26が「×」を示し、FW判定情報28が「未定」を示すときに、ファームウェア22−Bを起動する。ブートローダ21は、起動バンク情報25がファームウェア22−Bを示し、バンク試行情報26が「○」を示し、FW判定情報28が「未定」を示すときに、ファームウェア22−Aを起動する。ブートローダ21は、起動バンク情報25がファームウェア22−Bを示し、バンク試行情報26が「○」または「×」を示し、FW判定情報28が「正常」を示すときに、ファームウェア22−Bを起動する。ブートローダ21は、起動バンク情報25がファームウェア22−Bを示し、バンク試行情報26が「○」または「×」を示し、FW判定情報28が「不良」を示すときに、ファームウェア22−Aを起動する。 The boot loader 21 activates the firmware 22-B when the activation bank information 25 indicates the firmware 22-B, the bank trial information 26 indicates “x”, and the FW determination information 28 indicates “undecided”. The boot loader 21 activates the firmware 22-A when the startup bank information 25 indicates the firmware 22-B, the bank trial information 26 indicates “◯”, and the FW determination information 28 indicates “undecided”. The boot loader 21 activates the firmware 22-B when the activation bank information 25 indicates the firmware 22-B, the bank trial information 26 indicates “◯” or “x”, and the FW determination information 28 indicates “normal”. To do. The boot loader 21 activates the firmware 22-A when the activation bank information 25 indicates the firmware 22-B, the bank trial information 26 indicates “◯” or “x”, and the FW determination information 28 indicates “bad”. To do.

[実施例1のセンサノードの効果]
実施形態の電子機器としてのセンサノード3−iは、MCU14と、ファームウェア22−Aとブートローダ21とを記録するeMMC19と、FW判定情報28を記録するストレージ15とを有している。ファームウェア22−Aは、MCU14に起動されることにより、複数のセンサ12−1〜12−Mを制御し、さらに、サーバ2からダウンロードされたファームウェア22−BをeMMC19に記録してブートローダ21を起動する。ブートローダ21は、MCU14に起動されることにより、FW判定情報28が「不良」を示すときにファームウェア22−Aを起動し、FW判定情報28が「不良」を示していないときにファームウェア22−Bを起動する。ファームウェア22−Bは、MCU14に起動されることにより、複数のセンサ12−1〜12−Mを制御し、さらに、ファームウェア22−Bの良否を判定する。ファームウェア22−Bは、ファームウェア22−Bが不良であると判定されたときに、FW判定情報28が「不良」を示すようにFW判定情報28を更新してブートローダ21を起動する。
[Effect of Sensor Node of First Embodiment]
The sensor node 3-i as the electronic device of the embodiment includes the MCU 14, the eMMC 19 that records the firmware 22-A and the boot loader 21, and the storage 15 that records the FW determination information 28. The firmware 22-A controls the plurality of sensors 12-1 to 12-M by being activated by the MCU 14, and further records the firmware 22-B downloaded from the server 2 in the eMMC 19 and activates the boot loader 21. To do. The boot loader 21 is activated by the MCU 14 to activate the firmware 22-A when the FW determination information 28 indicates “defective”, and when the FW determination information 28 does not indicate “defective”, the firmware 22-B is activated. To start. The firmware 22-B controls the plurality of sensors 12-1 to 12-M by being activated by the MCU 14, and further determines the quality of the firmware 22-B. When the firmware 22-B is determined to be defective, the firmware 22-B updates the FW determination information 28 so that the FW determination information 28 indicates “defective” and activates the boot loader 21.

このようなセンサノード3−iは、更新された新しいファームウェア22−Bが起動することができる場合でも、ファームウェア22−Bに不具合があるときに、正常であるファームウェア22−Aを自動的に起動させることができる。このため、このようなセンサノード3−iは、不具合がファームウェア22−Bにある場合でも、作業者が出向いてセンサノード3−iを操作する必要がなく、メンテナンスコストを低減することができる。このようなセンサノード3−iは、さらに、ファームウェア22−Bの良否の判定をファームウェア22−Bにより実行されているために、ファームウェア22−Bの良否を判定する条件または判定ルーチンを変更することができる。 Even when the updated new firmware 22-B can be activated, the sensor node 3-i automatically activates the normal firmware 22-A when the firmware 22-B has a defect. Can be made. Therefore, in such a sensor node 3-i, even if the malfunction is in the firmware 22-B, it is not necessary for a worker to visit and operate the sensor node 3-i, and the maintenance cost can be reduced. The sensor node 3-i further changes the condition or the determination routine for determining the quality of the firmware 22-B because the quality of the firmware 22-B is determined by the firmware 22-B. You can

また、ファームウェア22−Bは、ファームウェア22−Bが正常であると判定されたときに、FW判定情報28が「正常」を示すようにFW判定情報28を更新する。ファームウェア22−Bは、ブートローダ21により再度起動された場合で、FW判定情報28が「正常」を示すときに、ファームウェア22−Bの良否を判定しない。このようなセンサノード3−iは、ファームウェア22−Bが正常であると1度判定されたときに、ファームウェア22−Bの良否を判定しないことにより、MCU14の負担を軽減することができる。このようなセンサノード3−iは、MCU14の負担を軽減することにより、消費電力を低減し、電池の交換頻度を低減し、メンテナンスのコストを低減することができる。 Further, when the firmware 22-B is determined to be normal, the firmware 22-B updates the FW determination information 28 so that the FW determination information 28 indicates “normal”. The firmware 22-B does not determine the quality of the firmware 22-B when the FW determination information 28 indicates “normal” when the firmware is restarted by the boot loader 21. Such a sensor node 3-i can reduce the load on the MCU 14 by not determining the quality of the firmware 22-B once it is determined that the firmware 22-B is normal. By reducing the load on the MCU 14, such a sensor node 3-i can reduce power consumption, reduce the frequency of battery replacement, and reduce maintenance costs.

ところで、実施例1では、ファームウェア22−Bは、ファームウェア22−Bが正常であると判定されたときに、ファームウェア22−Bの良否を判定していないが、ファームウェア22−Bの良否を判定してもよい。この場合も、センサノード3−iは、ファームウェア22−Bに不具合があるときに、正常であるファームウェア22−Aに制御を巻き戻すことができる。 By the way, in the first embodiment, the firmware 22-B does not determine the quality of the firmware 22-B when it is determined that the firmware 22-B is normal, but determines the quality of the firmware 22-B. May be. Also in this case, the sensor node 3-i can rewind control to the normal firmware 22-A when the firmware 22-B has a defect.

また、ファームウェア22−Bは、複数の観点で良否をそれぞれ判定する。ファームウェア22−Bは、その複数の観点のいずれか1つが不良であると判定されたときにFW判定情報28が「不良」を示すようにFW判定情報28を更新する。ファームウェア22−Bは、その複数の観点の全部が正常であると判定されたときにFW判定情報28が「正常」を示すようにFW判定情報28を更新する。このようなセンサノード3−iは、複数の観点でファームウェア22−Bの良否を判定することにより、ファームウェア22−Bの良否を適切に判定することができる。このようなセンサノード3−iは、ファームウェア22−Bの良否を適切に判定することにより、不要にファームウェア22−Aが起動されることを防止し、ファームウェア22−Aに制御を適切に巻き戻すことができる。 Further, the firmware 22-B determines pass/fail from each of a plurality of viewpoints. The firmware 22-B updates the FW determination information 28 so that the FW determination information 28 indicates “defective” when any one of the plurality of viewpoints is determined to be defective. The firmware 22-B updates the FW determination information 28 so that the FW determination information 28 indicates “normal” when it is determined that all of the plurality of viewpoints are normal. Such a sensor node 3-i can properly determine the quality of the firmware 22-B by determining the quality of the firmware 22-B from a plurality of viewpoints. Such a sensor node 3-i appropriately determines the quality of the firmware 22-B, thereby preventing the firmware 22-A from being unnecessarily activated, and appropriately rewinding the control to the firmware 22-A. be able to.

ところで、実施例1では、ファームウェア22−Bは、複数の観点でファームウェア22−Bの良否をそれぞれ判定しているが、1つの観点でファームウェア22−Bの良否を判定してもよい。この場合も、センサノード3−iは、ファームウェア22−Bに不具合があるときに、正常であるファームウェア22−Aに制御を巻き戻すことができる。また、センサノード3−iは、1つの観点でファームウェア22−Bの良否を判定することにより、その判定結果をそのままFW判定情報28に代入することができ、複数のチェックポイント処理結果27−1〜27−Xを記録することを省略することができる。 By the way, in the first embodiment, the firmware 22-B determines the quality of the firmware 22-B from a plurality of viewpoints, but the quality of the firmware 22-B may be determined from one viewpoint. Also in this case, the sensor node 3-i can rewind control to the normal firmware 22-A when the firmware 22-B has a defect. Further, the sensor node 3-i can substitute the determination result as it is into the FW determination information 28 by determining the quality of the firmware 22-B from one viewpoint, and the plurality of checkpoint processing results 27-1 Recording ~27-X can be omitted.

<実施例2>
センサノード3−iは、さらに、ウォッチドッグタイマ16がタイムアウトするときに、ブートローダ21を起動してもよい。このとき、ファームウェア22−Aのアップデート部32は、新しいファームウェアをダウンロードしたときに、ウォッチドッグタイマ16が設定されるように、ウォッチドッグタイマ16を制御する。さらに、複数のチェックポイント処理部33−1〜33−Xは、ウォッチドッグタイマ16に関する他のチェックポイント処理部が追加されている。そのチェックポイント処理部は、ウォッチドッグタイマ16が解除されるように、ウォッチドッグタイマ16を制御する。
<Example 2>
The sensor node 3-i may further activate the boot loader 21 when the watchdog timer 16 times out. At this time, the update unit 32 of the firmware 22-A controls the watchdog timer 16 so that the watchdog timer 16 is set when new firmware is downloaded. Further, the plurality of checkpoint processing units 33-1 to 33-X are added with other checkpoint processing units related to the watchdog timer 16. The checkpoint processing unit controls the watchdog timer 16 so that the watchdog timer 16 is released.

[実施例2のセンサノードの動作]
図10は、実施例2のセンサノードの動作を示す動作シーケンス図である。センサノード3−iのファームウェア22−Aは、図10に示されているように、センサノード3−iが新しいファームウェア22−Bをサーバ2から受信すると(S31)、ファームウェア22−BをeMMC19の所定のバンクメモリに記録する。ファームウェア22−Aは、ストレージ15を制御することにより、起動バンク情報25がファームウェア22−Bを示すように、起動バンク情報25を更新する。ファームウェア22−Aは、さらに、ストレージ15を制御することにより、バンク試行情報26が「×」を示すように、バンク試行情報26を更新する。ファームウェア22−Aは、さらに、ストレージ15を制御することにより、FW判定情報28が「未定」を示すように、FW判定情報28を更新する(S32)。ファームウェア22−Aは、起動バンク情報25とバンク試行情報26とFW判定情報28とを更新した後に、ウォッチドッグタイマ16を制御することにより、ウォッチドッグタイマ16を設定する(S33)。ファームウェア22−Aは、ウォッチドッグタイマ16が設定された後に、リブートすることにより制御をブートローダ21に移す(S34)。
[Operation of Sensor Node of Second Embodiment]
FIG. 10 is an operation sequence diagram showing the operation of the sensor node according to the second embodiment. When the sensor node 3-i receives the new firmware 22-B from the server 2 (S31), the firmware 22-A of the sensor node 3-i receives the firmware 22-B of the eMMC 19 as shown in FIG. It is recorded in a predetermined bank memory. The firmware 22-A controls the storage 15 to update the boot bank information 25 so that the boot bank information 25 indicates the firmware 22-B. The firmware 22-A further controls the storage 15 to update the bank trial information 26 so that the bank trial information 26 indicates “x”. The firmware 22-A further controls the storage 15 to update the FW determination information 28 so that the FW determination information 28 indicates “undecided” (S32). The firmware 22-A sets the watchdog timer 16 by controlling the watchdog timer 16 after updating the startup bank information 25, the bank trial information 26, and the FW determination information 28 (S33). After the watchdog timer 16 is set, the firmware 22-A transfers control to the boot loader 21 by rebooting (S34).

ブートローダ21は、起動されると、起動バンク情報25とバンク試行情報26とFW判定情報28とをストレージ15から取得する(S35)。ブートローダ21は、起動バンク情報25とバンク試行情報26とFW判定情報28とに基づいて複数のファームウェア22−1〜22−Kからファームウェア22−Bを選択する(S36)。ブートローダ21は、ストレージ15を制御することにより、バンク試行情報26が「○」を示すように、バンク試行情報26を更新する(S37)。ブートローダ21は、バンク試行情報26が更新された後に、その選択されたファームウェア22−Bを起動することにより、ファームウェア22−Bに制御を移す(S38)。 When booted, the boot loader 21 acquires startup bank information 25, bank trial information 26, and FW determination information 28 from the storage 15 (S35). The boot loader 21 selects the firmware 22-B from the plurality of firmware 22-1 to 22-K based on the startup bank information 25, the bank trial information 26, and the FW determination information 28 (S36). The boot loader 21 controls the storage 15 to update the bank trial information 26 so that the bank trial information 26 indicates “◯” (S37). After the bank trial information 26 is updated, the boot loader 21 activates the selected firmware 22-B to transfer control to the firmware 22-B (S38).

ファームウェア22−Bは、起動されると、通常の動作を実行し、さらに、ファームウェア22−B自身の良否を判定する(S39)。ファームウェア22−Bは、ファームウェア22−Bの良否を判定した後に、ストレージ15を制御することにより、FW判定情報28が「正常」または「不良」を示すように、FW判定情報28を更新する(S40)。 When the firmware 22-B is started, the firmware 22-B executes a normal operation, and further determines the quality of the firmware 22-B itself (S39). After determining the quality of the firmware 22-B, the firmware 22-B controls the storage 15 to update the FW determination information 28 so that the FW determination information 28 indicates “normal” or “defective” ( S40).

ウォッチドッグタイマ16は、設定された時刻から所定の期間経過した時刻までの期間に、ファームウェア22−Bにより解除されなかったときに、タイムアウトする。ウォッチドッグタイマ16は、タイムアウトしたときに、タイムアウトしたことをMCU14に伝達することにより、MCU14をリブートさせる(S41)。ブートローダ21は、MCU14がリブートされることにより起動される。ブートローダ21は、ウォッチドッグタイマ16がMCU14をリブートすることにより起動されたときに、再度S35以降の処理を実行する。 The watchdog timer 16 times out when it is not canceled by the firmware 22-B in the period from the set time to the time when a predetermined period has elapsed. When the watchdog timer 16 times out, the fact that it has timed out is transmitted to the MCU 14 to reboot the MCU 14 (S41). The boot loader 21 is activated when the MCU 14 is rebooted. The boot loader 21 executes the processing from S35 again when the watchdog timer 16 is activated by rebooting the MCU 14.

図11は、実施例2のセンサノードの動作を示すフローチャートである。センサノード3−iは、図11に示されているように、ブートローダ21が起動されると、既述の図8のフローと同様にして、起動バンク情報25とバンク試行情報26とFW判定情報28とに基づいて選択されたファームウェアを起動する。 FIG. 11 is a flowchart showing the operation of the sensor node according to the second embodiment. As shown in FIG. 11, when the boot loader 21 is activated, the sensor node 3-i performs the activation bank information 25, the bank trial information 26, and the FW determination information in the same manner as the flow of FIG. 8 described above. 28 and activates the selected firmware based on.

MCU14は、ファームウェア22−Aまたはファームウェア22−Bが起動されると、まず、通常動作を実行する(S18)。MCU14は、通常動作が実行されると、既述の図8のフローと同様にして、複数のチェックポイント処理部33−1〜33−Xに対応する複数のチェックポイント処理を実行する。ウォッチドッグタイマ16に関するチェックポイント処理では、MCU14は、まず、FW判定情報28をストレージ15から取得する(S51)。MCU14は、FW判定情報28が「未定」を示しているときに(S51、No)、ウォッチドッグタイマ16を制御することにより、ウォッチドッグタイマ16を解除する(S52)。MCU14は、ウォッチドッグタイマ16を解除した後に、ストレージ15を制御することにより、この追加されたチェックポイント処理に対応するチェックポイント処理結果が「正常」を示すように複数のチェックポイント処理結果27−1〜27−Xを更新する。MCU14は、複数のチェックポイント処理の全部で、起動されているファームウェアが正常であると判定されたときに、ストレージ15を制御することにより、FW判定情報28が「正常」を示すようにFW判定情報28を更新する(S53)。 When the firmware 22-A or the firmware 22-B is activated, the MCU 14 first executes a normal operation (S18). When the normal operation is executed, the MCU 14 executes a plurality of checkpoint processing corresponding to the plurality of checkpoint processing units 33-1 to 33-X in the same manner as the flow of FIG. 8 described above. In the checkpoint process regarding the watchdog timer 16, the MCU 14 first acquires the FW determination information 28 from the storage 15 (S51). When the FW determination information 28 indicates “undecided” (S51, No), the MCU 14 controls the watchdog timer 16 to cancel the watchdog timer 16 (S52). The MCU 14 controls the storage 15 after releasing the watchdog timer 16 so that the checkpoint processing result corresponding to the added checkpoint processing shows a plurality of checkpoint processing results 27- Updates 1-27-X. The MCU 14 controls the storage 15 when it is determined that the activated firmware is normal in all of the plurality of checkpoint processes, so that the FW determination information 28 indicates “normal”. The information 28 is updated (S53).

MCU14は、複数のチェックポイント処理が実行された後に、RF通信部11を制御することにより、サーバ2からFW更新要求を受信しているかどうかを判定する(S23)。MCU14は、サーバ2からFW更新要求を受信していないときに(S23、No)、S18〜S23の処理を繰り返し実行する。 After executing a plurality of checkpoint processes, the MCU 14 controls the RF communication unit 11 to determine whether or not the FW update request is received from the server 2 (S23). When the FW update request is not received from the server 2 (S23, No), the MCU 14 repeatedly executes the processes of S18 to S23.

MCU14は、サーバ2からFW更新要求を受信しているときに(S23、Yes)、サーバ2から更新されたファームウェアをダウンロードし、そのダウンロードされたファームウェアを、eMMC19の所定のメモリバンクに記録する(S24)。MCU14は、ストレージ15を制御することにより、そのダウンロードされたファームウェアを起動バンク情報25が示すように起動バンク情報25を更新する。MCU14は、さらに、ストレージ15を制御することにより、FW判定情報28が「未定」を示すようにFW判定情報28を更新し、バンク試行情報26が「×」を示すようにバンク試行情報26を更新する(S25)。 While receiving the FW update request from the server 2 (S23, Yes), the MCU 14 downloads the updated firmware from the server 2 and records the downloaded firmware in a predetermined memory bank of the eMMC 19 ( S24). The MCU 14 controls the storage 15 to update the boot bank information 25 with the downloaded firmware as indicated by the boot bank information 25. The MCU 14 further controls the storage 15 to update the FW determination information 28 so that the FW determination information 28 indicates “undecided” and the bank trial information 26 so that the bank trial information 26 indicates “x”. Update (S25).

MCU14は、起動バンク情報25とバンク試行情報26とFW判定情報28とが更新された後に、ウォッチドッグタイマ16を制御することにより、ウォッチドッグタイマ16を設定する(S54)。MCU14は、ウォッチドッグタイマ16を設定した後に、リブートすることにより、ブートローダ21を起動し、ブートローダ21に制御を移す。 The MCU 14 sets the watchdog timer 16 by controlling the watchdog timer 16 after the startup bank information 25, the bank trial information 26, and the FW determination information 28 are updated (S54). The MCU 14 activates the boot loader 21 by rebooting after setting the watchdog timer 16, and transfers control to the boot loader 21.

ウォッチドッグタイマ16は、設定された時刻から所定の期間経過した時刻までの期間に、解除されなかったときに、タイムアウトする。ウォッチドッグタイマ16は、タイムアウトしたときに、タイムアウトしたことをMCU14に伝達することにより、MCU14をリブートさせ、ブートローダ21を起動させる(S55)。 The watchdog timer 16 times out when it is not canceled in the period from the set time to the time when a predetermined period has elapsed. When the watchdog timer 16 times out, the watchdog timer 16 notifies the MCU 14 of the time-out, thereby rebooting the MCU 14 and activating the boot loader 21 (S55).

[実施例2のセンサノードの効果]
実施例2のセンサノード3−iは、ファームウェア22−Bが起動されるときに設定されるウォッチドッグタイマ16をさらに備えている。ブートローダ21は、さらに、ウォッチドッグタイマ16がタイムアウトしたときに、MCU14に起動される。このようなセンサノード3−iは、ウォッチドッグタイマ16を備えていることにより、ファームウェア22−Bが起動しないなど、MCU14がフリーズした場合でも、そのトラブルから抜けることができる。このようなセンサノード3−iは、さらに、ファームウェア22−Bがフリーズしてファームウェア22−Bの良否を判定しない場合でも、正常であるファームウェア22−Aを自動的に起動させることができる。
[Effect of Sensor Node of Second Embodiment]
The sensor node 3-i of the second embodiment further includes the watchdog timer 16 set when the firmware 22-B is activated. The boot loader 21 is further activated by the MCU 14 when the watchdog timer 16 times out. Since such a sensor node 3-i is provided with the watchdog timer 16, even if the MCU 14 freezes, for example, the firmware 22-B does not start up, the trouble can be exited. Such a sensor node 3-i can also automatically activate the normal firmware 22-A even when the firmware 22-B freezes and the quality of the firmware 22-B is not determined.

また、実施例2では、ファームウェア22−Bは、ファームウェア22−Bが正常であると判定されたときに、ウォッチドッグタイマ16を解除する。このようなセンサノード3−iは、ファームウェア22−Bが正常であると判定されたときにウォッチドッグタイマ16を解除することにより、不要にリブートされることを防止することができる。 Further, in the second embodiment, the firmware 22-B releases the watchdog timer 16 when it is determined that the firmware 22-B is normal. Such a sensor node 3-i can prevent unnecessary reboot by canceling the watchdog timer 16 when it is determined that the firmware 22-B is normal.

また、実施例2では、ストレージ15は、バンク試行情報26をさらに記録している。ファームウェア22−Aは、ファームウェア22−Bが起動される前に、FW判定情報28が「未定」を示すようにFW判定情報28を更新し、バンク試行情報26が「×」を示すようにバンク試行情報26を更新する。ブートローダ21は、FW判定情報28が「未定」を示す場合でバンク試行情報26が「×」を示すときに、バンク試行情報26が「○」を示すようにバンク試行情報26を更新してファームウェア22−Bを起動する。ブートローダ21は、さらに、FW判定情報28が「未定」を示す場合でバンク試行情報26が「○」を示すときに、ファームウェア22−Aを起動する。このようなセンサノード3−iは、バンク試行情報26をストレージ15に記録することにより、ウォッチドッグタイマ16によりリブートされた場合でも、正常であるファームウェア22−Aを起動させることができる。 Further, in the second embodiment, the storage 15 further records the bank trial information 26. Before the firmware 22-B is started, the firmware 22-A updates the FW determination information 28 so that the FW determination information 28 indicates “undecided”, and the bank trial information 26 indicates that the bank trial information 26 indicates “x”. The trial information 26 is updated. The boot loader 21 updates the bank trial information 26 so that the bank trial information 26 shows “◯” when the FW determination information 28 shows “undecided” and the bank trial information 26 shows “x”. 22-B is started. The boot loader 21 further activates the firmware 22-A when the FW determination information 28 indicates “undecided” and the bank trial information 26 indicates “◯”. By recording the bank trial information 26 in the storage 15, such a sensor node 3-i can activate the normal firmware 22-A even when it is rebooted by the watchdog timer 16.

<実施例3>
ところで、実施例2では、センサノード3−iは、バンク試行情報26をストレージ15に記録しているが、バンク試行情報26を記録することを省略してもよい。実施例3では、センサノード3−iは、バンク試行情報26を記録更新することが省略されている。このとき、ブートローダ21は、FW判定情報28が「未定」を示すときに、ストレージ15を制御することにより、FW判定情報28が「不良」を示すようにFW判定情報28が「未定」を更新する。
<Example 3>
By the way, in the second embodiment, the sensor node 3-i records the bank trial information 26 in the storage 15, but the recording of the bank trial information 26 may be omitted. In the third embodiment, the sensor node 3-i omits recording and updating the bank trial information 26. At this time, the boot loader 21 controls the storage 15 when the FW determination information 28 indicates “undetermined”, so that the FW determination information 28 updates “undetermined” so that the FW determination information 28 indicates “defective”. To do.

[実施例3のセンサノードの動作]
図12は、実施例3のセンサノードの動作を示すフローチャートである。センサノード3−iは、図12に示されているように、まず、ブートローダ21が起動される。センサノード3−iのMCU14は、ブートローダ21が起動されると、起動バンク情報25とFW判定情報28とをストレージ15から取得する(S61)。MCU14は、FW判定情報28が「正常」を示していないで(S62、No)、FW判定情報28が「不良」を示しているときに(S63、Yes)、以前に正常に動作していたファームウェア22−Bを選択する(S64)。このとき、その選択されたファームウェア22−Bは、起動バンク情報25が示すファームウェア22−Aと異なっている。MCU14は、FW判定情報28が「未定」を示しているときに(S63、No)、ストレージ15を制御することにより、FW判定情報28が「不良」を示すようにFW判定情報28を更新する(S65)。このとき、FW判定情報28が「不良」を示しているが、起動バンク情報25が示すファームウェアは良否が判定されておらず、すなわち、FW判定情報28は、「不良」に仮決めされている。MCU14は、S65が実行されたときに、または、FW判定情報28が「正常」を示しているときに(S62、Yes)、起動バンク情報25が示すファームウェア22−Aを起動する(S66)。
[Operation of Sensor Node of Third Embodiment]
FIG. 12 is a flowchart showing the operation of the sensor node according to the third embodiment. In the sensor node 3-i, as shown in FIG. 12, first, the boot loader 21 is activated. When the boot loader 21 is activated, the MCU 14 of the sensor node 3-i acquires the activation bank information 25 and the FW determination information 28 from the storage 15 (S61). The MCU 14 was previously operating normally when the FW determination information 28 does not indicate "normal" (S62, No) and the FW determination information 28 indicates "bad" (S63, Yes). The firmware 22-B is selected (S64). At this time, the selected firmware 22-B is different from the firmware 22-A indicated by the startup bank information 25. When the FW determination information 28 indicates “undecided” (S63, No), the MCU 14 controls the storage 15 to update the FW determination information 28 so that the FW determination information 28 indicates “defective”. (S65). At this time, the FW determination information 28 indicates “defective”, but the quality of the firmware indicated by the startup bank information 25 has not been determined, that is, the FW determination information 28 is provisionally determined to be “defective”. .. The MCU 14 activates the firmware 22-A indicated by the activation bank information 25 when S65 is executed or when the FW determination information 28 indicates “normal” (S62, Yes) (S66).

MCU14は、ファームウェア22−Aまたはファームウェア22−Bが起動されると、既述の図11のフローと同様にして、まず、通常動作を実行する(S18)。MCU14は、通常動作が実行されると、複数のチェックポイント処理部33−1〜33−Xに対応する複数のチェックポイント処理を実行する。ウォッチドッグタイマ16に関するチェックポイント処理では、MCU14は、まず、FW判定情報28をストレージ15から取得する(S51)。MCU14は、FW判定情報28が「不良」を示しているときに(S51、No)、ウォッチドッグタイマ16を制御することにより、ウォッチドッグタイマ16を解除する(S52)。MCU14は、ウォッチドッグタイマ16を解除した後に、ストレージ15を制御することにより、ウォッチドッグタイマ16に関するチェックポイント処理結果が「正常」を示すようにチェックポイント処理結果を更新する。MCU14は、複数のチェックポイント処理の全部で、起動されているファームウェアが正常であると判定されたときに、ストレージ15を制御することにより、FW判定情報28が「正常」を示すようにFW判定情報28を更新する(S53)。 When the firmware 22-A or the firmware 22-B is activated, the MCU 14 first executes a normal operation in the same manner as the flow of FIG. 11 described above (S18). When the normal operation is executed, the MCU 14 executes a plurality of checkpoint processing corresponding to the plurality of checkpoint processing units 33-1 to 33-X. In the checkpoint process regarding the watchdog timer 16, the MCU 14 first acquires the FW determination information 28 from the storage 15 (S51). When the FW determination information 28 indicates “bad” (S51, No), the MCU 14 controls the watchdog timer 16 to cancel the watchdog timer 16 (S52). After canceling the watchdog timer 16, the MCU 14 controls the storage 15 to update the checkpoint processing result so that the checkpoint processing result regarding the watchdog timer 16 indicates “normal”. The MCU 14 controls the storage 15 when it is determined that the activated firmware is normal in all of the plurality of checkpoint processes, so that the FW determination information 28 indicates “normal”. The information 28 is updated (S53).

MCU14は、複数のチェックポイント処理が実行された後に、RF通信部11を制御することにより、サーバ2からFW更新要求を受信しているかどうかを検出する(S23)。MCU14は、サーバ2からFW更新要求を受信していないときに(S23、No)、S18〜S23の処理を繰り返し実行する。 The MCU 14 controls whether or not the FW update request is received from the server 2 by controlling the RF communication unit 11 after the plurality of checkpoint processes are executed (S23). When the FW update request is not received from the server 2 (S23, No), the MCU 14 repeatedly executes the processes of S18 to S23.

MCU14は、サーバ2からFW更新要求を受信しているときに(S23、Yes)、サーバ2から更新されたファームウェアをダウンロードし、そのダウンロードされたファームウェアを、eMMC19の所定のメモリバンクに記録する(S24)。MCU14は、ストレージ15を制御することにより、そのダウンロードされたファームウェアを起動バンク情報25が示すように起動バンク情報25を更新する。MCU14は、さらに、ストレージ15を制御することにより、FW判定情報28が「未定」を示すようにFW判定情報28を更新する(S67)。 While receiving the FW update request from the server 2 (S23, Yes), the MCU 14 downloads the updated firmware from the server 2 and records the downloaded firmware in a predetermined memory bank of the eMMC 19 ( S24). The MCU 14 controls the storage 15 to update the boot bank information 25 with the downloaded firmware as indicated by the boot bank information 25. The MCU 14 further controls the storage 15 to update the FW determination information 28 so that the FW determination information 28 indicates "undecided" (S67).

MCU14は、起動バンク情報25とFW判定情報28とが更新された後に、ウォッチドッグタイマ16を制御することにより、ウォッチドッグタイマ16を設定する(S54)。MCU14は、ウォッチドッグタイマ16を設定した後に、リブートすることにより、ブートローダ21を起動し、ブートローダ21に制御を移す。 The MCU 14 sets the watchdog timer 16 by controlling the watchdog timer 16 after the startup bank information 25 and the FW determination information 28 are updated (S54). The MCU 14 activates the boot loader 21 by rebooting after setting the watchdog timer 16, and transfers control to the boot loader 21.

ウォッチドッグタイマ16は、設定された時刻から所定の期間経過した時刻までの期間に、解除されなかったときに、タイムアウトする。ウォッチドッグタイマ16は、タイムアウトしたときに、タイムアウトしたことをMCU14に伝達することにより、MCU14をリブートさせ、ブートローダ21を起動させる(S55)。 The watchdog timer 16 times out when it is not canceled in the period from the set time to the time when a predetermined period has elapsed. When the watchdog timer 16 times out, the watchdog timer 16 notifies the MCU 14 of the time-out, thereby rebooting the MCU 14 and activating the boot loader 21 (S55).

実施例3のセンサノード3−iは、実施例2のセンサノード3−iと同様にして、ファームウェア22−Bがフリーズする場合でも、正常であるファームウェア22−Aを自動的に起動させることができる。 Similarly to the sensor node 3-i of the second embodiment, the sensor node 3-i of the third embodiment can automatically activate the normal firmware 22-A even when the firmware 22-B freezes. it can.

<実施例4>
センサノード3−iは、さらに、ファームウェア22−Aが頻繁に再起動するときに、ブートローダ21を起動してもよい。このとき、ストレージ15は、さらに、更新完了時刻と起動回数とを記録している。ファームウェア22−Aのアップデート部32は、新しいファームウェアをダウンロードしたときに、その更新完了時刻と起動回数とを更新するように、ストレージ15を制御する。複数のチェックポイント処理部33−1〜33−Xは、起動回数に関する他のチェックポイント処理部が追加されている。そのチェックポイント処理部は、起動回数を更新するようにストレージ15を制御し、現在時刻を取得するようにカレンダータイマ17を制御する。そのチェックポイント処理部は、その更新完了時刻と起動回数と現在時刻とに基づいて算出されたファームウェア22−Aの再起動の頻度が所定の値より大きいときに、リブートすることにより、ブートローダ21を起動する。
<Example 4>
The sensor node 3-i may further activate the boot loader 21 when the firmware 22-A frequently reboots. At this time, the storage 15 further records the update completion time and the number of activations. The update unit 32 of the firmware 22-A controls the storage 15 so as to update the update completion time and the number of activations when new firmware is downloaded. The plurality of checkpoint processing units 33-1 to 33-X are added with other checkpoint processing units regarding the number of times of activation. The checkpoint processing unit controls the storage 15 to update the number of activations and controls the calendar timer 17 to acquire the current time. The checkpoint processing unit reboots the boot loader 21 by rebooting when the frequency of rebooting the firmware 22-A calculated based on the update completion time, the number of activations, and the current time is larger than a predetermined value. to start.

[実施例4のセンサノードの動作]
図13は、実施例4のセンサノードの動作を示す動作シーケンス図である。センサノード3−iのファームウェア22−Aは、図13に示されているように、センサノード3−iが新しいファームウェア22−Bをサーバ2から受信すると(S71)、ファームウェア22−BをeMMC19の所定のバンクメモリに記録する。ファームウェア22−Aは、ストレージ15を制御することにより、起動バンク情報25がファームウェア22−Bを示すように、起動バンク情報25を更新する。ファームウェア22−Aは、ストレージ15を制御することにより、バンク試行情報26が「×」を示すように、バンク試行情報26を更新する。ファームウェア22−Aは、ストレージ15を制御することにより、FW判定情報28が「未定」を示すように、FW判定情報28を更新する。ファームウェア22−Aは、さらに、ストレージ15を制御することにより、起動回数が0を示すように起動回数を更新する(S72)。ファームウェア22−Aは、さらに、カレンダータイマ17を制御することにより、現在時刻を取得し、ストレージ15を制御することにより、その取得された現在時刻を更新完了時刻が示すように更新完了時刻を更新する(S73)。ファームウェア22−Aは、起動バンク情報25とバンク試行情報26とFW判定情報28と起動回数と更新完了時刻とを更新した後に、リブートすることにより制御をブートローダ21に移す(S74)。
[Operation of Sensor Node of Fourth Embodiment]
FIG. 13 is an operation sequence diagram showing the operation of the sensor node according to the fourth embodiment. When the sensor node 3-i receives the new firmware 22-B from the server 2 (S71), the firmware 22-A of the sensor node 3-i receives the firmware 22-B of the eMMC 19 as shown in FIG. It is recorded in a predetermined bank memory. The firmware 22-A controls the storage 15 to update the boot bank information 25 so that the boot bank information 25 indicates the firmware 22-B. The firmware 22-A controls the storage 15 to update the bank trial information 26 so that the bank trial information 26 indicates “x”. The firmware 22-A controls the storage 15 to update the FW determination information 28 so that the FW determination information 28 indicates “undecided”. The firmware 22-A further controls the storage 15 to update the number of activations so that the number of activations is 0 (S72). The firmware 22-A further controls the calendar timer 17 to acquire the current time, and controls the storage 15 to update the acquired current time to the update completion time as indicated by the update completion time. Yes (S73). The firmware 22-A updates the startup bank information 25, the bank trial information 26, the FW determination information 28, the startup count and the update completion time, and then reboots to transfer the control to the boot loader 21 (S74).

ブートローダ21は、起動されると、起動バンク情報25とバンク試行情報26とFW判定情報28とをストレージ15から取得する(S75)。ブートローダ21は、起動バンク情報25とバンク試行情報26とFW判定情報28とに基づいて複数のファームウェア22−1〜22−Kからファームウェア22−Bを選択する(S76)。ブートローダ21は、ストレージ15を制御することにより、バンク試行情報26が「○」を示すように、バンク試行情報26を更新する(S77)。ブートローダ21は、バンク試行情報26が更新された後に、その選択されたファームウェア22−Bを起動することにより、ファームウェア22−Bに制御を移す(S78)。 When booted, the boot loader 21 acquires startup bank information 25, bank trial information 26, and FW determination information 28 from the storage 15 (S75). The boot loader 21 selects the firmware 22-B from the plurality of firmware 22-1 to 22-K based on the startup bank information 25, the bank trial information 26, and the FW determination information 28 (S76). The boot loader 21 controls the storage 15 to update the bank trial information 26 so that the bank trial information 26 indicates “◯” (S77). After the bank trial information 26 is updated, the boot loader 21 activates the selected firmware 22-B to transfer control to the firmware 22-B (S78).

ファームウェア22−Bは、起動されると、ストレージ15を制御することにより、更新完了時刻と起動回数とを取得する(S79)。ファームウェア22−Bは、さらに、カレンダータイマ17を制御することにより、現在時刻を取得する(S80)。ファームウェア22−Bは、ストレージ15を制御することにより、バンク試行情報26が「×」を示すようにバンク試行情報26を更新する。ファームウェア22−Bは、さらに、ストレージ15を制御することにより、起動回数を取得し、その取得された起動回数が示す値に1と加算した和を起動回数が示すように起動回数をインクリメントする(S81)。 When activated, the firmware 22-B controls the storage 15 to acquire the update completion time and the number of activations (S79). The firmware 22-B further controls the calendar timer 17 to acquire the current time (S80). The firmware 22-B controls the storage 15 to update the bank trial information 26 so that the bank trial information 26 indicates “x”. The firmware 22-B further controls the storage 15 to acquire the number of activations, and increments the number of activations so that the sum of the acquired number of activations and 1 is added (1). S81).

ファームウェア22−Bは、通常の動作を実行し、さらに、ファームウェア22−B自身の良否を判定する(S82)。ファームウェア22−Bは、ファームウェア22−Bの良否を判定した後に、ストレージ15を制御することにより、FW判定情報28が「正常」または「不良」を示すように、FW判定情報28を更新する(S83)。 The firmware 22-B executes a normal operation, and further determines the quality of the firmware 22-B itself (S82). After determining the quality of the firmware 22-B, the firmware 22-B controls the storage 15 to update the FW determination information 28 so that the FW determination information 28 indicates “normal” or “defective” ( S83).

図14は、実施例4のセンサノードの動作を示すフローチャートである。センサノード3−iは、図14に示されているように、ブートローダ21が起動されると、既述の図8のフローと同様にして、起動バンク情報25とバンク試行情報26とFW判定情報28とに基づいて選択されたファームウェアを起動する。 FIG. 14 is a flowchart showing the operation of the sensor node according to the fourth embodiment. As shown in FIG. 14, when the boot loader 21 is activated, the sensor node 3-i performs the activation bank information 25, the bank trial information 26, and the FW determination information in the same manner as the flow of FIG. 8 described above. 28 and activates the selected firmware based on.

MCU14は、ファームウェア22−Aまたはファームウェア22−Bが起動されると、まず、通常動作を実行する(S18)。MCU14は、通常動作が実行されると、既述の図8のフローと同様にして、複数のチェックポイント処理部33−1〜33−Xに対応する複数のチェックポイント処理を実行する。起動回数に関するチェックポイント処理では、MCU14は、まず、FW判定情報28をストレージ15から取得する(S91)。MCU14は、FW判定情報28が「未定」を示しているときに(S91、No)、ストレージ15を制御することにより、起動回数と更新完了時刻とを取得する。MCU14は、ストレージ15を制御することにより、その取得された起動回数が示す値に1を加算した和を起動回数が示すように、起動回数を更新する(S92)。MCU14は、その更新された起動回数が示す値が所定の値を超過しているときに(S93、Yes)、ストレージ15を制御することにより、FW判定情報28が「不良」を示すようにFW判定情報28を更新する(S94)。MCU14は、FW判定情報28が「不良」を示すようにFW判定情報28が更新された後に、リブートすることにより、ブートローダ21を起動し、制御をブートローダ21に移す。 When the firmware 22-A or the firmware 22-B is activated, the MCU 14 first executes a normal operation (S18). When the normal operation is executed, the MCU 14 executes a plurality of checkpoint processing corresponding to the plurality of checkpoint processing units 33-1 to 33-X in the same manner as the flow of FIG. 8 described above. In the checkpoint process regarding the number of times of activation, the MCU 14 first acquires the FW determination information 28 from the storage 15 (S91). When the FW determination information 28 indicates “undecided” (S91, No), the MCU 14 controls the storage 15 to acquire the number of activations and the update completion time. The MCU 14 controls the storage 15 to update the number of activations so that the number of activations indicates the sum obtained by adding 1 to the value indicated by the acquired number of activations (S92). When the value indicated by the updated number of startups exceeds the predetermined value (Yes in S93), the MCU 14 controls the storage 15 so that the FW determination information 28 indicates “bad”. The judgment information 28 is updated (S94). The MCU 14 reboots after the FW determination information 28 is updated so that the FW determination information 28 indicates “bad”, thereby booting the boot loader 21 and transferring control to the boot loader 21.

MCU14は、その更新された起動回数が示す値が所定の値を超過していないときに(S93、No)、カレンダータイマ17を制御することにより、現在時刻を取得する。MCU14は、S92で取得した更新完了時刻から現在時刻までに所定の時間が経過しているときに(S95、Yes)、ストレージ15を制御することにより、対応するチェックポイント処理結果が「正常」を示すようにそのチェックポイント処理結果を更新する。MCU14は、複数のチェックポイント処理の全部で、起動されているファームウェアが正常であると判定されたときに、ストレージ15を制御することにより、FW判定情報28が「正常」を示すようにFW判定情報28を更新する(S96)。 The MCU 14 acquires the current time by controlling the calendar timer 17 when the value indicated by the updated number of activations does not exceed the predetermined value (S93, No). When the predetermined time has passed from the update completion time acquired in S92 to the current time (S95, Yes), the MCU 14 controls the storage 15 so that the corresponding checkpoint processing result is "normal". The checkpoint processing result is updated as shown. The MCU 14 controls the storage 15 when it is determined that the activated firmware is normal in all of the plurality of checkpoint processes, so that the FW determination information 28 indicates “normal”. The information 28 is updated (S96).

MCU14は、S96でFW判定情報28が更新された後で、または、所定の時間が経過していないときに(S95、No)、RF通信部11を制御することにより、サーバ2からFW更新要求を受信しているかどうかを検出する(S23)。MCU14は、さらに、FW判定情報28が「正常」を示しているときに(S91、Yes)、RF通信部11を制御することにより、サーバ2からFW更新要求を受信しているかどうかを検出する(S23)。 The MCU 14 controls the RF communication unit 11 after the FW determination information 28 is updated in S96 or when the predetermined time has not elapsed (S95, No), so that the FW update request is sent from the server 2. It is detected whether or not is received (S23). When the FW determination information 28 indicates “normal” (S91, Yes), the MCU 14 further controls the RF communication unit 11 to detect whether or not the FW update request is received from the server 2. (S23).

MCU14は、サーバ2からFW更新要求を受信していないときに(S23、No)、S18〜S23の処理を繰り返し実行する。 When the FW update request is not received from the server 2 (S23, No), the MCU 14 repeatedly executes the processes of S18 to S23.

MCU14は、サーバ2からFW更新要求を受信しているときに(S23、Yes)、RF通信部11を制御することにより、サーバ2から更新されたファームウェアをダウンロードする。MCU14は、次いで、eMMC19を制御することにより、そのダウンロードされたファームウェアを、eMMC19の複数のメモリバンクのうちの起動されているファームウェアが記録されているメモリバンクと異なる他のメモリバンクに記録する(S24)。 When receiving the FW update request from the server 2 (S23, Yes), the MCU 14 controls the RF communication unit 11 to download the updated firmware from the server 2. The MCU 14 then controls the eMMC 19 to record the downloaded firmware in another memory bank different from the memory bank in which the activated firmware is recorded among the plurality of memory banks of the eMMC 19 ( S24).

MCU14は、ストレージ15を制御することにより、そのダウンロードされたファームウェアを起動バンク情報25が示すように起動バンク情報25を更新する。MCU14は、さらに、ストレージ15を制御することにより、FW判定情報28が「未定」を示すようにFW判定情報28を更新し、バンク試行情報26が「×」を示すようにバンク試行情報26を更新する(S25)。MCU14は、起動バンク情報25とバンク試行情報26とFW判定情報28とが更新された後に、カレンダータイマ17を制御することにより、現在時刻を取得する。MCU14は、さらに、ストレージ15を制御することにより、起動回数が0を示すように起動回数を更新し、その取得された現在時刻を更新完了時刻が示すように更新完了時刻を更新する(S97)。MCU14は、起動回数と更新完了時刻とが更新された後に、リブートすることにより、ブートローダ21を起動し、ブートローダ21に制御を移す。 The MCU 14 controls the storage 15 to update the boot bank information 25 with the downloaded firmware as indicated by the boot bank information 25. The MCU 14 further controls the storage 15 to update the FW determination information 28 so that the FW determination information 28 indicates “undecided” and update the bank trial information 26 so that the bank trial information 26 indicates “x”. Update (S25). After the startup bank information 25, the bank trial information 26, and the FW determination information 28 are updated, the MCU 14 controls the calendar timer 17 to acquire the current time. The MCU 14 further controls the storage 15 to update the number of activations so that the number of activations is 0, and updates the obtained current time to the update completion time as indicated by the update completion time (S97). .. The MCU 14 reboots after the number of activations and the update completion time have been updated, thereby activating the boot loader 21 and transferring control to the boot loader 21.

[実施例4のセンサノードの効果]
実施例4のセンサノード3−iは、カレンダータイマ17をさらに備えている。ストレージ15は、起動回数をさらに記録している。ファームウェア22−Bは、カレンダータイマ17を用いて導出される期間にファームウェア22−Bが起動される回数を起動回数が示すように起動回数を更新する。ファームウェア22−Bは、起動回数が所定の値より大きいときに、FW判定情報28が「不良」を示すようにFW判定情報28を更新してブートローダ21を起動する。このようなセンサノード3−iは、ファームウェア22−Bが頻繁に再起動する場合でも、正常であるファームウェア22−Aを自動的に起動させることができる。
[Effect of Sensor Node of Fourth Embodiment]
The sensor node 3-i of the fourth embodiment further includes a calendar timer 17. The storage 15 further records the number of activations. The firmware 22-B updates the number of activations so that the number of activations indicates the number of times the firmware 22-B is activated in the period derived using the calendar timer 17. The firmware 22-B updates the FW determination information 28 and activates the boot loader 21 so that the FW determination information 28 indicates “defective” when the number of activations is larger than a predetermined value. Such a sensor node 3-i can automatically start the normal firmware 22-A even when the firmware 22-B is frequently restarted.

また、実施例4では、ファームウェア22−Bは、その期間が経過したときにFW判定情報28が「正常」を示すようにFW判定情報28を更新し、FW判定情報28が「正常」を示すときに起動回数を更新しない。このようなセンサノード3−iは、ファームウェア22−Bが正常であると判定されたときに、起動回数を更新しないことにより、MCU14の負担を軽減することができる。 In the fourth embodiment, the firmware 22-B updates the FW determination information 28 so that the FW determination information 28 indicates “normal” when the period has elapsed, and the FW determination information 28 indicates “normal”. Sometimes do not update the number of starts Such a sensor node 3-i can reduce the load on the MCU 14 by not updating the number of activations when it is determined that the firmware 22-B is normal.

ところで、実施例4では、ファームウェア22−Bは、ファームウェア22−Bが再起動する頻度以外の観点についてもファームウェア22−Bの良否を判定しているが、その頻度のみに基づいてファームウェア22−Bの良否を判定してもよい。この場合も、センサノード3−iは、更新された新しいファームウェア22−Bが起動することができる場合でも、ファームウェア22−Bに不具合があるときに、正常であるファームウェア22−Aを自動的に起動させることができる。 By the way, in the fourth embodiment, the firmware 22-B determines the quality of the firmware 22-B from a viewpoint other than the frequency at which the firmware 22-B is restarted, but the firmware 22-B is determined based on only the frequency. The quality of may be determined. In this case as well, the sensor node 3-i automatically updates the normal firmware 22-A when there is a defect in the firmware 22-B, even if the updated new firmware 22-B can be activated. Can be activated.

<実施例5>
更新された新しいファームウェア22−Bは、複数のフラグメントに分割されてサーバ2からセンサノード3−iに送信されてもよい。図15は、実施例5のセンサノードにサーバからダウンロードされるファームウェアを示す図である。ファームウェア22−Bは、複数のブロック51−1〜51−C(C=2,3,4,…)から形成されている。複数のブロック51−1〜51−Cのうちの任意のブロック51−c(c=1,2,3,…,C)は、複数のフラグメント52−1〜52−D(D=2,3,4,…)から形成されている。複数のフラグメント52−1〜52−Dのうちの任意のフラグメント52−d(d=1,2,3,…,D)は、情報量が所定の情報量以下になるように形成されている。その所定の情報量は、フラグメント52−dが1パケットのペイロードに収まるように設計される。
<Example 5>
The updated new firmware 22-B may be divided into a plurality of fragments and transmitted from the server 2 to the sensor node 3-i. FIG. 15 is a diagram illustrating the firmware downloaded from the server to the sensor node according to the fifth embodiment. The firmware 22-B is composed of a plurality of blocks 51-1 to 51-C (C=2, 3, 4,... ). An arbitrary block 51-c (c=1, 2, 3,..., C) of the plurality of blocks 51-1 to 51-C has a plurality of fragments 52-1 to 52-D (D=2, 3). , 4,...). An arbitrary fragment 52-d (d=1, 2, 3,..., D) of the plurality of fragments 52-1 to 52-D is formed such that the information amount is equal to or less than the predetermined information amount. .. The predetermined amount of information is designed so that the fragment 52-d fits within the payload of one packet.

[実施例5のセンサノードの動作]
図16は、実施例5のセンサノードがファームウェアを受信する動作を示す動作シーケンス図である。サーバ2は、更新された新しいファームウェア22−Bが入力されると、まず、ファームウェア22−Bを複数のブロック51−1〜51−Cに分割する。サーバ2は、ファームウェア22−Bを複数のブロック51−1〜51−Cに分割した後に、複数のブロック51−1〜51−Cの各々のブロック51−cを複数のフラグメント52−1〜52−Dに分割する。サーバ2は、無線通信を介して、制御情報であるファームウェア更新要求61を複数のセンサノード3−1〜3−Nに配信する。
[Operation of Sensor Node of Example 5]
FIG. 16 is an operation sequence diagram showing an operation in which the sensor node of the fifth embodiment receives the firmware. When the updated new firmware 22-B is input, the server 2 first divides the firmware 22-B into a plurality of blocks 51-1 to 51-C. The server 2 divides the firmware 22-B into a plurality of blocks 51-1 to 51-C, and then divides each block 51-c of the plurality of blocks 51-1 to 51-C into a plurality of fragments 52-1 to 52-52. -D. The server 2 delivers the firmware update request 61, which is control information, to the plurality of sensor nodes 3-1 to 3-N via wireless communication.

複数のセンサノード3−1〜3−Nのうちのファームウェア更新要求61を受信したセンサノード3−iは、ACK62をサーバ2に返信する。サーバ2は、ACK62をセンサノード3−iから受信すると、ファームウェア22−Bを複数のブロック51−1〜51−C毎にセンサノード3−iに送信する。サーバ2は、複数のブロック51−1〜51−Cのうちの最初のブロック51−1を送信するときに、最初のブロック51−1が形成される複数のフラグメント52−1〜52−Dを1つずつセンサノード3−iに送信する。 The sensor node 3-i, which has received the firmware update request 61 among the plurality of sensor nodes 3-1 to 3-N, returns an ACK 62 to the server 2. Upon receiving the ACK 62 from the sensor node 3-i, the server 2 transmits the firmware 22-B to the sensor node 3-i for each of the plurality of blocks 51-1 to 51-C. When transmitting the first block 51-1 of the plurality of blocks 51-1 to 51-C, the server 2 outputs the plurality of fragments 52-1 to 52-D in which the first block 51-1 is formed. It transmits to the sensor node 3-i one by one.

センサノード3−iは、複数のフラグメント52−1〜52−Dのうちの最後の最終フラグメント52−Dと異なるフラグメントを受信したときに、ACKをサーバ2に返信しないで、最終フラグメント52−Dを受信したときにACK64をサーバ2に返信する。 When the sensor node 3-i receives a fragment different from the last final fragment 52-D of the plurality of fragments 52-1 to 52-D, the sensor node 3-i does not send back the ACK to the server 2 and sends the final fragment 52-D. ACK64 is returned to the server 2 when the message is received.

図17は、パケットの送受信が欠落することがあるときの動作を示す動作シーケンス図である。サーバ2は、最終フラグメント52−Dを送信した時刻から所定の時間経過するまでにACK64を受信しなかったときに、最終フラグメント52−Dを再送する。サーバ2は、最終フラグメント52−Dを再送した時刻から所定の時間経過するまでにACK64を受信しなかった場合も、繰り返して最終フラグメント52−Dを再送する。センサノード3−iは、最終フラグメント52−Dを受信するごとに、ACK64をサーバ2に返信する。 FIG. 17 is an operation sequence diagram showing an operation when packet transmission/reception may be lost. The server 2 retransmits the final fragment 52-D when the ACK 64 is not received within a predetermined time from the time when the final fragment 52-D is transmitted. The server 2 repeatedly retransmits the final fragment 52-D even when it does not receive the ACK 64 by a predetermined time from the time when the final fragment 52-D is retransmitted. The sensor node 3-i sends back an ACK 64 to the server 2 each time it receives the final fragment 52-D.

センサノード3−iは、最終フラグメント52−Dを受信した後で、複数のフラグメント52−1〜52−Dのうちの取得できなかった欠落フラグメントがあるときに、その欠落フラグメントのリストを作成する。センサノード3−iは、その欠落フラグメントがあるときに、そのリストをACK64に付随してサーバ2に送信する。 After receiving the final fragment 52-D, the sensor node 3-i creates a list of the missing fragments of the plurality of fragments 52-1 to 52-D that cannot be obtained. .. When there is the missing fragment, the sensor node 3-i sends the list together with the ACK 64 to the server 2.

サーバ2は、ACK64を受信した場合で、ACK64にそのリストが付随されていたときに、そのリストが示す複数のフラグメント65をセンサノード3−iに送信する。このとき、複数のフラグメント65は、リスト中の最後のフラグメントを、最終フラグメント52−Dと同様のものとして扱い、処理をするように実装している。 When the server 2 receives the ACK 64 and the list is attached to the ACK 64, the server 2 transmits the plurality of fragments 65 indicated by the list to the sensor node 3-i. At this time, the plurality of fragments 65 are mounted so that the last fragment in the list is treated as the same as the last fragment 52-D and processed.

センサノード3−iは、最終フラグメント52−Dを受信した場合で、複数のフラグメント52−1〜52−Dの全部を取得しているときに、リストが付随されないACK64をサーバ2に送信する。サーバ2は、リストが付随されないACK64を受信することにより、最初のブロック51−1の送信を完了する。 When the sensor node 3-i receives the final fragment 52-D and acquires all of the plurality of fragments 52-1 to 52-D, the sensor node 3-i transmits the ACK 64 to which no list is attached to the server 2. The server 2 completes the transmission of the first block 51-1 by receiving the ACK 64 not accompanied by the list.

図18は、1つのブロックの送信が完了した後の動作を示す動作シーケンス図である。詳細には、ブロックcまで送信が完了し、ブロックc+1の送信が完了しないうちにアップデート処理が何らかの原因で停止してしまった場合にc+1ブロック目からアップデートを再開するためのシーケンス図である。センサノード3−iのストレージ15は、受信完了ブロック番号71をさらに記録している。センサノード3−iは、ブロック51−cの複数のフラグメント52−1〜52−Dの全部を取得したときに、ストレージ15を制御することにより、受信完了ブロック番号71が値cを示すように受信完了ブロック番号71を更新する。サーバ2は、ブロック51−cの送信が完了した後に、すなわち、リストが付随されないACK64を受信した後に、ファームアップデート再開要求72をセンサノード3−iに送信する。「停止」の部分が入らない場合は、ファームアップデート再開要求72は、不要であり、即c+1ブロック目のフラグメント送信を行う。センサノード3−iは、ファームアップデート再開要求72を受信すると、ストレージ15から受信完了ブロック番号71を取得し、開始ブロック番号が付随されたACK73をサーバ2に返信する。その開始ブロック番号は、複数のブロック51−1〜51−Cのうちの最後に受信されたブロック51−cの次のブロックの番号を示し、受信完了ブロック番号71が示す値cに1を加算した和c+1を示している。サーバ2は、開始ブロック番号が付随されたACK73をセンサノード3−iから受信すると、複数のブロック51−1〜51−Cのうちの開始ブロック番号に対応するブロックを、最初のブロック51−1と同様にして、センサノード3−iに送信する。 FIG. 18 is an operation sequence diagram showing an operation after the transmission of one block is completed. More specifically, it is a sequence diagram for restarting the update from the (c+1)th block in the case where the transmission is completed up to the block c and the update process is stopped for some reason before the transmission of the block c+1 is completed. The storage 15 of the sensor node 3-i further records the reception completion block number 71. When the sensor node 3-i acquires all of the plurality of fragments 52-1 to 52-D of the block 51-c, the sensor node 3-i controls the storage 15 so that the reception completion block number 71 indicates the value c. The reception completion block number 71 is updated. The server 2 transmits the firmware update restart request 72 to the sensor node 3-i after the transmission of the block 51-c is completed, that is, after receiving the ACK 64 not accompanied by the list. If the "stop" portion does not enter, the firmware update restart request 72 is unnecessary and immediately transmits fragment c+1 block. Upon receiving the firmware update restart request 72, the sensor node 3-i acquires the reception completion block number 71 from the storage 15 and returns an ACK 73 with a start block number attached to the server 2. The start block number indicates the number of the block next to the last received block 51-c among the plurality of blocks 51-1 to 51-C, and 1 is added to the value c indicated by the reception completion block number 71. The sum c+1 is shown. When the server 2 receives the ACK 73 to which the start block number is attached from the sensor node 3-i, it selects the block corresponding to the start block number among the plurality of blocks 51-1 to 51-C as the first block 51-1. In the same manner as above, the data is transmitted to the sensor node 3-i.

[実施例5のセンサノードの効果]
実施例5では、ファームウェア22−Aは、複数のブロック51−1〜51−Cに分割されたファームウェア22−Bをサーバ2から1つずつダウンロードすることにより、ファームウェア22−Bをダウンロードする。このようなセンサノード3−iは、ファームウェア22−Bを複数のブロック51−1〜51−C毎にダウンロードすることにより、ストレージ15のうちのダウンロードするときに使用されるバッファ領域を小さくすることができる。このため、このようなセンサノード3−iは、ストレージ15の規模が小さい場合でも、ファームウェア22−Bを適切にダウンロードすることができる。また、このようなセンサノード3−iは、ストレージ15のうちのダウンロードするときに使用されるバッファ領域を小さくすることにより、ストレージ15の規模を小さくすることができる。このようなセンサノード3−iは、ストレージ15の規模を小さくすることにより、製造コストを低減することができる。
[Effect of Sensor Node of Example 5]
In the fifth embodiment, the firmware 22-A downloads the firmware 22-B by downloading the firmware 22-B divided into a plurality of blocks 51-1 to 51-C from the server 2 one by one. Such a sensor node 3-i downloads the firmware 22-B for each of the plurality of blocks 51-1 to 51-C to reduce the buffer area of the storage 15 used for downloading. You can Therefore, such a sensor node 3-i can appropriately download the firmware 22-B even if the scale of the storage 15 is small. Further, such a sensor node 3-i can reduce the scale of the storage 15 by reducing the buffer area of the storage 15 used for downloading. Such a sensor node 3-i can reduce the manufacturing cost by reducing the scale of the storage 15.

また、実施例5では、ファームウェア22−Aは、複数のブロック51−1〜51−Cの各ブロック51−cが分割された複数のフラグメント52−1〜52−Dをサーバ2から1つずつダウンロードすることにより、各ブロック51−cをダウンロードする。ファームウェア22−Aは、複数のフラグメント52−1〜52−Dのうちの最終フラグメント52−Dと異なるフラグメントをダウンロードしたときにACKを返信しないで、最終フラグメント52−DをダウンロードしたときにACK64を返信する。このようなセンサノード3−iは、複数のフラグメント52−1〜52−Dを受信する毎にAKCをサーバ2に返信することに比較して、ファームウェア22−Bの転送効率を向上させることができ、ファームウェア22−Bを高速にダウンロードすることができる。 Further, in the fifth embodiment, the firmware 22-A includes, from the server 2, a plurality of fragments 52-1 to 52-D obtained by dividing each block 51-c of the plurality of blocks 51-1 to 51-C one by one. By downloading, each block 51-c is downloaded. The firmware 22-A does not send back an ACK when downloading a fragment different from the final fragment 52-D among the plurality of fragments 52-1 to 52-D, but sends an ACK64 when downloading the final fragment 52-D. Reply. Such a sensor node 3-i can improve the transfer efficiency of the firmware 22-B as compared with returning an AKC to the server 2 each time a plurality of fragments 52-1 to 52-D are received. Therefore, the firmware 22-B can be downloaded at high speed.

また、実施例5では、ファームウェア22−Aは、最終フラグメント52−Dをダウンロードしたときに、複数のフラグメント52−1〜52−Dのうちの欠落したフラグメントのリストをサーバ2に返信する。このとき、サーバ2は、欠落したフラグメントのリストを受信することにより、欠落したフラグメントをセンサノード3−iに再送することができる。センサノード3−iは、低電力で動作するため、無線出力が小さい。センサノード3−iは、さらに、奥まったスペースに設置されるため、その無線通信に利用される電波がサーバ2まで届き辛く、通信が途切れがちになる。このようなセンサノード3−iは、無線環境5が低品質であっても、欠落したフラグメントのリストをサーバ2に伝達することにより、欠落したフラグメントをサーバ2から取得することができ、ファームウェア22−Bを適切にダウンロードすることができる。 Further, in the fifth embodiment, the firmware 22-A returns the list of the missing fragments of the plurality of fragments 52-1 to 52-D to the server 2 when the final fragment 52-D is downloaded. At this time, the server 2 can retransmit the missing fragment to the sensor node 3-i by receiving the list of the missing fragments. Since the sensor node 3-i operates with low power, the wireless output is small. Since the sensor node 3-i is further installed in a deep space, it is difficult for the radio waves used for the wireless communication to reach the server 2, and the communication tends to be interrupted. Even if the wireless environment 5 has low quality, such a sensor node 3-i can acquire the missing fragment from the server 2 by transmitting the list of the missing fragment to the server 2, and the firmware 22 -B can be downloaded appropriately.

また、実施例5では、ストレージ15は、受信完了ブロック番号71をさらに記録している。ファームウェア22−Aは、複数のブロック51−1〜51−Cのうちのブロック51−cをダウンロードしたときに、受信完了ブロック番号71がブロック51−cを示すように受信完了ブロック番号71を更新する。ファームウェア22−Aは、サーバ2からファームアップデート再開要求72を受信したときに、ブロック51−cの次のブロックを示す情報をサーバ2に返信する。このとき、サーバ2は、ブロック51−cの次のブロックを示す情報を受信することにより、ダウンロードされていないブロックをセンサノード3−iに送信することができる。このようなセンサノード3−iは、ファームウェア22−Bのダウンロードが途中で中断された場合でも、ダウンロードされていないブロックをサーバ2から取得することができ、ファームウェア22−Bを適切にダウンロードすることができる。 Further, in the fifth embodiment, the storage 15 further records the reception completion block number 71. The firmware 22-A updates the reception completion block number 71 so that the reception completion block number 71 indicates the block 51-c when the block 51-c of the plurality of blocks 51-1 to 51-C is downloaded. To do. When the firmware 22-A receives the firmware update restart request 72 from the server 2, the firmware 22-A returns information indicating the block next to the block 51-c to the server 2. At this time, the server 2 can transmit the block that has not been downloaded to the sensor node 3-i by receiving the information indicating the block next to the block 51-c. Even when the download of the firmware 22-B is interrupted midway, such a sensor node 3-i can obtain the blocks that have not been downloaded from the server 2 and appropriately download the firmware 22-B. You can

<実施例6>
ACK64は、さらに他の情報が付随される他のACKに置換されてもよい。図19は、実施例6のセンサノードがファームウェアの1つのブロックを受信する動作を示す動作シーケンス図である。センサノード3−iは、図19に示されているように、ブロック51−cの複数のフラグメント52−1〜52−Dの全部を取得したときに、ブロック51−cのデータに基づいてハッシュ値を算出する。センサノード3−iは、ブロック51−cの複数のフラグメント52−1〜52−Dの全部を取得したときに、さらに、その算出されたハッシュ値が付随されるACK81をサーバ2に返信する。
<Example 6>
The ACK 64 may be replaced with another ACK accompanied by other information. FIG. 19 is an operation sequence diagram showing an operation in which the sensor node of the sixth embodiment receives one block of firmware. As shown in FIG. 19, when the sensor node 3-i acquires all of the plurality of fragments 52-1 to 52-D of the block 51-c, the sensor node 3-i hashes based on the data of the block 51-c. Calculate the value. When the sensor node 3-i acquires all of the plurality of fragments 52-1 to 52-D of the block 51-c, the sensor node 3-i further returns an ACK 81 accompanied by the calculated hash value to the server 2.

サーバ2は、ACK81をセンサノード3−iから受信したときに、センサノード3−iに送信したブロック51−cのデータに基づいてハッシュ値を算出する(S101)。サーバ2は、その算出されたハッシュ値を、ACK81に付随されるハッシュ値と比較する(S102)。サーバ2は、その算出されたハッシュ値が、ACK81に付随されるハッシュ値と異なっているときに(S102、No)、再度、ブロック51−cの複数のフラグメント52−1〜52−Dを1つずつセンサノード3−iに送信する。 When receiving the ACK 81 from the sensor node 3-i, the server 2 calculates the hash value based on the data of the block 51-c transmitted to the sensor node 3-i (S101). The server 2 compares the calculated hash value with the hash value attached to the ACK 81 (S102). When the calculated hash value is different from the hash value attached to the ACK 81 (S102, No), the server 2 sets the plurality of fragments 52-1 to 52-D of the block 51-c to 1 again. Each of them is transmitted to the sensor node 3-i.

サーバ2は、その算出されたハッシュ値が、ACK81に付随されるハッシュ値と一致しているときに(S102、Yes)、複数のブロック51−1〜51−Cのうちのブロック51−cの次のブロックをセンサノード3−iに送信する。 When the calculated hash value matches the hash value attached to the ACK 81 (S102, Yes), the server 2 selects the block 51-c of the plurality of blocks 51-1 to 51-C. The next block is transmitted to the sensor node 3-i.

図20は、実施例6のセンサノードがファームウェアの最終ブロックを受信する動作を示す動作シーケンス図である。センサノード3−iは、図20に示されているように、複数のブロック51−1〜51−Cのうちの最後の最終ブロック51−Cの複数のフラグメント52−1〜52−Dを取得する。センサノード3−iは、複数のフラグメント52−1〜52−Dの最後の最終フラグメント52−Dを取得したときに、複数のブロック51−1〜51−Cの全部のデータに基づいてハッシュ値を算出する。センサノード3−iは、最終ブロック51−Cの複数のフラグメント52−1〜52−Dの全部を取得したときに、その算出されたハッシュ値が付随されるACK82をサーバ2に返信する。 FIG. 20 is an operation sequence diagram showing an operation in which the sensor node of the sixth embodiment receives the final block of firmware. As shown in FIG. 20, the sensor node 3-i acquires the plurality of fragments 52-1 to 52-D of the last final block 51-C among the plurality of blocks 51-1 to 51-C. To do. When the sensor node 3-i acquires the final final fragment 52-D of the plurality of fragments 52-1 to 52-D, the hash value is calculated based on all the data of the plurality of blocks 51-1 to 51-C. To calculate. When the sensor node 3-i acquires all of the plurality of fragments 52-1 to 52-D of the final block 51-C, the sensor node 3-i returns an ACK 82 with the calculated hash value to the server 2.

サーバ2は、ACK82をセンサノード3−iから受信したときに、センサノード3−iに送信した複数のブロック51−1〜51−Cの全部のデータに基づいてハッシュ値を算出する(S103)。サーバ2は、その算出されたハッシュ値を、ACK82に付随されるハッシュ値と比較する(S104)。サーバ2は、その算出されたハッシュ値が、ACK82に付随されるハッシュ値と異なっているときに(S104、No)、再度、複数のブロック51−1〜51−Cを最初のブロック51−1から1つずつセンサノード3−iに送信する。サーバ2は、その算出されたハッシュ値が、ACK82に付随されるハッシュ値と一致しているときに(S104、Yes)、複数のブロック51−1〜51−Cの送信を完了する。 When receiving the ACK 82 from the sensor node 3-i, the server 2 calculates a hash value based on all the data of the plurality of blocks 51-1 to 51-C transmitted to the sensor node 3-i (S103). .. The server 2 compares the calculated hash value with the hash value attached to the ACK 82 (S104). When the calculated hash value is different from the hash value attached to the ACK 82 (S104, No), the server 2 again sets the plurality of blocks 51-1 to 51-C to the first block 51-1. To the sensor node 3-i one by one. When the calculated hash value matches the hash value attached to the ACK 82 (S104, Yes), the server 2 completes the transmission of the plurality of blocks 51-1 to 51-C.

[実施例6のセンサノードの効果]
実施例6では、ファームウェア22−Aは、複数のブロック51−1〜51−Cのうちの1つのブロック51−cをサーバ2からダウンロードしたときに、1つのブロック51−cに基づいて算出された誤り検出符号値をサーバ2に返信する。このとき、サーバ2は、センサノード3−iから受信した誤り検出符号値が、サーバ2によりブロック51−cのデータに基づいて算出された誤り検出符号値と異なるときに、ブロック51−cが正確に伝送されなかったことを認識することができる。サーバ2は、ブロック51−cが正確に伝送されなかったことを認識することにより、ブロック51−cをセンサノード3−iに再送することができる。このようなセンサノード3−iは、誤り検出符号値をサーバ2に返信することにより、正確に送信されなかったブロック51−cをサーバ2から取得することができ、ファームウェア22−Bを適切にダウンロードすることができる。
[Effects of Sensor Node of Example 6]
In the sixth embodiment, the firmware 22-A is calculated based on one block 51-c when one block 51-c of the plurality of blocks 51-1 to 51-C is downloaded from the server 2. The error detection code value is returned to the server 2. At this time, if the error detection code value received from the sensor node 3-i is different from the error detection code value calculated based on the data of the block 51-c by the server 2, the server 2 determines that the block 51-c has It can be recognized that the data was not transmitted correctly. The server 2 can retransmit the block 51-c to the sensor node 3-i by recognizing that the block 51-c was not correctly transmitted. Such a sensor node 3-i can acquire the block 51-c that has not been correctly transmitted from the server 2 by returning the error detection code value to the server 2, and can properly update the firmware 22-B. It can be downloaded.

また、実施例6では、ファームウェア22−Aは、複数のブロック51−1〜51−Cの全部をサーバ2からダウンロードしたときに、複数のブロック51−1〜51−Cの全部に基づいて算出された他の誤り検出符号値をサーバ2に返信する。このとき、サーバ2は、センサノード3−iから受信した誤り検出符号値が、サーバ2により算出された誤り検出符号値と異なるときに、複数のブロック51−1〜51−Cが正確に伝送されなかったことを認識することができる。サーバ2は、複数のブロック51−1〜51−Cが正確に伝送されなかったことを認識することにより、ファームウェア22−Bをセンサノード3−iに再送することができる。このため、このようなセンサノード3−iは、誤り検出符号値をサーバ2に返信することにより、ファームウェア22−Bを正確に受信しかったときに、ファームウェア22−Bを再度ダウンロードすることができる。このため、このようなセンサノード3−iは、ファームウェア22−Bを正確に受信しなかったときに、ファームウェア22−Bを再度ダウンロードすることにより、ファームウェア22−Bを適切にダウンロードすることができる。 Further, in the sixth embodiment, the firmware 22-A calculates based on all the blocks 51-1 to 51-C when all the blocks 51-1 to 51-C are downloaded from the server 2. The other error detection code value thus obtained is returned to the server 2. At this time, the server 2 correctly transmits the plurality of blocks 51-1 to 51-C when the error detection code value received from the sensor node 3-i is different from the error detection code value calculated by the server 2. You can recognize that it was not done. The server 2 can retransmit the firmware 22-B to the sensor node 3-i by recognizing that the blocks 51-1 to 51-C have not been correctly transmitted. Therefore, such a sensor node 3-i can download the firmware 22-B again by returning the error detection code value to the server 2 when the firmware 22-B is correctly received. .. Therefore, such a sensor node 3-i can properly download the firmware 22-B by downloading the firmware 22-B again when the firmware 22-B is not correctly received. ..

ところで、実施例6では、誤り検出符号値としてハッシュ値が利用されているが、誤り検出に利用される他の関数により算出される値に置換されてもよい。その関数としては、チェックサムが例示される。このような関数が利用された場合でも、センサノード3−iは、ファームウェア22−Bを適切にダウンロードすることができる。 By the way, in the sixth embodiment, the hash value is used as the error detection code value, but it may be replaced with a value calculated by another function used for error detection. A checksum is exemplified as the function. Even when such a function is used, the sensor node 3-i can appropriately download the firmware 22-B.

以上の実施例1〜6を含む実施形態に関し、更に以下の付記を開示する。 Regarding the embodiments including the above Examples 1 to 6, the following supplementary notes are further disclosed.

(付記1)制御部と、
第1ファームウェアとブートローダとを記録する第1記憶装置と、
判定情報を記録する第2記憶装置とを有し、
前記第1ファームウェアは、前記制御部に起動されることにより、制御対象を制御し、さらに、外部装置からダウンロードされた第2ファームウェアを前記第1記憶装置に記録して前記ブートローダを起動し、
前記ブートローダは、前記制御部に起動されることにより、前記判定情報が第1値を示すときに前記第1ファームウェアを起動し、前記判定情報が前記第1値と異なる第2値を示すときに前記第2ファームウェアを起動し、
前記第2ファームウェアは、前記制御部に起動されることにより、前記制御対象を制御し、さらに、前記第2ファームウェアの良否を判定し、前記第2ファームウェアが不良であると判定されたときに、前記判定情報が前記第1値を示すように前記判定情報を更新して前記ブートローダを起動する
電子機器。
(Supplementary Note 1) A control unit,
A first storage device for recording the first firmware and a boot loader;
A second storage device for recording determination information,
The first firmware controls the control target by being activated by the control unit, further records the second firmware downloaded from an external device in the first storage device, and activates the boot loader,
The boot loader is activated by the control unit to activate the first firmware when the determination information indicates a first value, and when the determination information indicates a second value different from the first value. Start the second firmware,
The second firmware controls the control target by being activated by the control unit, further determines the quality of the second firmware, and when it is determined that the second firmware is defective, An electronic device that updates the determination information so that the determination information indicates the first value and activates the boot loader.

(付記2)前記第2ファームウェアは、前記第2ファームウェアが正常であると判定されたときに、前記判定情報が前記第2値を示すように前記判定情報を更新し、前記ブートローダにより再度起動された場合で、前記判定情報が前記第2値を示すときに、前記第2ファームウェアの良否を判定しない
付記1に記載の電子機器。
(Supplementary Note 2) When the second firmware is determined to be normal, the second firmware updates the determination information so that the determination information indicates the second value, and is restarted by the boot loader. The electronic device according to Appendix 1, wherein when the determination information indicates the second value, the quality of the second firmware is not determined.

(付記3)前記第2ファームウェアは、複数の観点で前記第2ファームウェアの良否をそれぞれ判定し、前記複数の観点のいずれか1つで不良であると判定されたときに前記判定情報が前記第1値を示すように前記判定情報を更新し、前記複数の観点の全部が正常であると判定されたときに前記判定情報が前記第2値を示すように前記判定情報を更新する
付記2に記載の電子機器。
(Supplementary Note 3) The second firmware determines whether the second firmware is good or bad from a plurality of viewpoints, and when the determination is defective from any one of the plurality of viewpoints, the determination information is the first or second. The determination information is updated so as to indicate 1 value, and when it is determined that all of the plurality of viewpoints are normal, the determination information is updated so that the determination information indicates the second value. Electronic device described.

(付記4)前記第2ファームウェアが起動されたときに設定されるウォッチドッグタイマをさらに備え、
前記ブートローダは、さらに、前記ウォッチドッグタイマがタイムアウトしたときに、前記制御部に起動される
付記2または付記3に記載の電子機器。
(Supplementary Note 4) further comprising a watchdog timer set when the second firmware is activated,
The electronic device according to supplementary note 2 or supplementary note 3, wherein the boot loader is further activated by the control unit when the watchdog timer times out.

(付記5)前記第2ファームウェアは、前記第2ファームウェアが正常であると判定されたときに、前記ウォッチドッグタイマを解除する
付記4に記載の電子機器。
(Supplementary Note 5) The electronic device according to Supplementary Note 4, wherein the second firmware releases the watchdog timer when it is determined that the second firmware is normal.

(付記6)前記第2記憶装置は、試行情報をさらに記録し、
前記第1ファームウェアは、前記第2ファームウェアが起動される前に、前記判定情報が第3値を示すように前記判定情報を更新し、前記試行情報が第4値を示すように前記試行情報を更新し、
前記ブートローダは、
前記判定情報が前記第3値を示す場合で前記試行情報が前記第4値を示すときに、前記試行情報が第5値を示すように前記試行情報を更新して前記第2ファームウェアを起動し、
前記判定情報が前記第3値を示す場合で前記試行情報が前記第5値を示すときに、前記第1ファームウェアを起動する
付記4または付記5に記載の電子機器。
(Supplementary Note 6) The second storage device further records trial information,
Before the second firmware is activated, the first firmware updates the determination information so that the determination information shows a third value, and updates the trial information so that the trial information shows a fourth value. Updated,
The boot loader is
When the determination information indicates the third value and the trial information indicates the fourth value, the trial information is updated so that the trial information indicates the fifth value and the second firmware is activated. ,
The electronic device according to Supplementary Note 4 or Supplementary Note 5, which activates the first firmware when the determination information indicates the third value and the trial information indicates the fifth value.

(付記7)カレンダータイマをさらに備え、
前記第2記憶装置は、起動回数をさらに記録し、
前記第2ファームウェアは、前記カレンダータイマを用いて導出される期間に前記第2ファームウェアが起動される回数を前記起動回数が示すように前記起動回数を更新し、前記起動回数が所定の値より大きいときに、前記判定情報が前記第1値を示すように前記判定情報を更新して前記ブートローダを起動する
付記2〜付記6のいずれか一項に記載の電子機器。
(Supplementary note 7) further provided with a calendar timer,
The second storage device further records the number of activations,
The second firmware updates the number of times of activation so that the number of times of activation of the second firmware in a period derived using the calendar timer indicates the number of times of activation, and the number of times of activation is larger than a predetermined value. The electronic device according to any one of supplementary notes 2 to 6, wherein the determination information is updated so that the determination information indicates the first value, and the boot loader is activated.

(付記8)前記第2ファームウェアは、前記期間が経過したときに前記判定情報が前記第2値を示すように前記判定情報を更新し、前記判定情報が前記第2値を示すときに前記起動回数を更新しない
付記7に記載の電子機器。
(Supplementary Note 8) The second firmware updates the determination information so that the determination information indicates the second value when the period elapses, and starts the startup when the determination information indicates the second value. The electronic device according to appendix 7, wherein the number of times is not updated.

(付記9)前記第1ファームウェアは、前記第2ファームウェアが分割された複数のブロックを前記外部装置から1つずつダウンロードすることにより、前記第2ファームウェアをダウンロードする
付記1〜付記8のいずれか一項に記載の電子機器。
(Supplementary note 9) The first firmware downloads the second firmware by downloading a plurality of blocks obtained by dividing the second firmware one by one from the external device. Any one of supplementary notes 1 to 8 The electronic device according to the item.

(付記10)前記第1ファームウェアは、
前記複数のブロックの各ブロックが分割された複数のフラグメントを前記外部装置から1つずつダウンロードすることにより、前記各ブロックをダウンロードし、
前記複数のフラグメントのうちの最後の最終フラグメントと異なる他のフラグメントをダウンロードしたときにACKを返信しないで、前記最終フラグメントをダウンロードしたときにACKを返信する
付記9に記載の電子機器。
(Supplementary Note 10) The first firmware is
Downloading each block by downloading a plurality of fragments obtained by dividing each block of the plurality of blocks from the external device one by one,
The electronic device according to appendix 9, wherein an ACK is not returned when another fragment different from the final final fragment of the plurality of fragments is downloaded, and an ACK is returned when the final fragment is downloaded.

(付記11)前記第1ファームウェアは、前記最終フラグメントをダウンロードしたときに、前記複数のフラグメントのうちの欠落したフラグメントのリストを前記外部装置に返信する
付記10に記載の電子機器。
(Supplementary note 11) The electronic device according to supplementary note 10, wherein the first firmware returns a list of missing fragments of the plurality of fragments to the external device when the final fragment is downloaded.

(付記12)前記第2記憶装置は、受信完了ブロック番号をさらに記録し、
前記第1ファームウェアは、
前記複数のブロックのうちのブロックをダウンロードしたときに、前記受信完了ブロック番号が前記ブロックを示すように前記受信完了ブロック番号を更新し、
前記外部装置からファームアップデート再開要求を受信したときに、前記ブロックの次のブロックを示す情報を前記外部装置に返信する
付記9〜付記11のいずれか一項に記載の電子機器。
(Supplementary Note 12) The second storage device further records the reception completion block number,
The first firmware is
When a block of the plurality of blocks is downloaded, the reception completion block number is updated so that the reception completion block number indicates the block,
The electronic device according to any one of appendices 9 to 11, which returns information indicating a block next to the block to the external device when a firmware update restart request is received from the external device.

(付記13)前記第1ファームウェアは、前記複数のブロックのうちの1つのブロックを前記外部装置からダウンロードしたときに、前記1つのブロックに基づいて算出された誤り検出符号値を前記外部装置に返信する
付記9〜付記12のいずれか一項に記載の電子機器。
(Supplementary Note 13) When the first firmware downloads one block of the plurality of blocks from the external device, the first firmware returns an error detection code value calculated based on the one block to the external device. The electronic device according to any one of appendices 9 to 12.

(付記14)前記第1ファームウェアは、前記複数のブロックの全部を前記外部装置からダウンロードしたときに、前記複数のブロックの全部に基づいて算出された他の誤り検出符号値を前記外部装置に返信する
付記9〜付記13のいずれか一項に記載の電子機器。
(Supplementary Note 14) When the first firmware downloads all of the plurality of blocks from the external device, the first firmware returns another error detection code value calculated based on all of the plurality of blocks to the external device. The electronic device according to any one of appendices 9 to 13.

(付記15)第1ファームウェアとブートローダとを第1記憶装置に記録し、
前記第1ファームウェアを起動することにより、制御対象を制御し、さらに、外部装置からダウンロードされた第2ファームウェアを前記第1記憶装置に記録して前記ブートローダを起動し、
前記ブートローダを起動することにより、第2記憶装置に記録された判定情報が第1値を示すときに前記第1ファームウェアを起動し、前記判定情報が前記第1値を示していないときに前記第2ファームウェアを起動し、
前記第2ファームウェアを起動することにより、前記制御対象を制御し、さらに、前記第2ファームウェアの良否を判定し、前記第2ファームウェアが不良であると判定されたときに、前記判定情報が前記第1値を示すように前記判定情報を更新して前記ブートローダを起動する
処理をコンピュータが実行することを特徴とするファームウェアアップデート方法。
(Supplementary Note 15) The first firmware and the boot loader are recorded in the first storage device,
By controlling the control target by activating the first firmware, further recording the second firmware downloaded from an external device in the first storage device and activating the boot loader,
By activating the boot loader, the first firmware is activated when the determination information recorded in the second storage device indicates the first value, and the first firmware is activated when the determination information does not indicate the first value. 2 Start the firmware,
The control target is controlled by activating the second firmware, and it is further determined whether the second firmware is good or bad. When it is determined that the second firmware is defective, the determination information is the first A firmware update method, wherein a computer executes a process of updating the determination information so as to indicate one value and activating the boot loader.

(付記16)第1ファームウェアと、
ブートローダとを有し、
前記第1ファームウェアは、
制御対象を制御し、
外部装置からダウンロードされた第2ファームウェアを第1記憶装置に記録して前記ブートローダを起動する
処理をコンピュータに実行させ、
前記ブートローダは、
第2記憶装置に記録される判定情報が第1値を示すときに前記第1ファームウェアを起動し、
前記判定情報が前記第1値を示していないときに前記第2ファームウェアを起動する
処理を前記コンピュータに実行させ、
前記第2ファームウェアは、
前記制御対象を制御し、
前記第2ファームウェアの良否を判定し、
前記第2ファームウェアが不良であると判定されたときに、前記判定情報が前記第1値を示すように前記判定情報を更新して前記ブートローダを起動する
処理を前記コンピュータに実行させる
コンピュータプログラム。
(Appendix 16) First firmware,
With a boot loader,
The first firmware is
Control the controlled object,
Recording the second firmware downloaded from the external device in the first storage device and causing the computer to execute the process of activating the boot loader,
The boot loader is
When the determination information recorded in the second storage device indicates the first value, the first firmware is activated,
Causing the computer to execute a process of activating the second firmware when the determination information does not indicate the first value,
The second firmware is
Controlling the controlled object,
Determine the quality of the second firmware,
A computer program that causes the computer to execute a process of updating the determination information so that the determination information indicates the first value and activating the boot loader when the second firmware is determined to be defective.

1 :無線センサネットワーク
3−1〜3−N:複数のセンサノード
5 :無線環境
11:RF通信部
12−1〜12−M:複数のセンサ
14:MCU
15:ストレージ
16:ウォッチドッグタイマ
17:カレンダータイマ
19:eMMC
21:ブートローダ
22−1〜22−K:複数のファームウェア
25:起動バンク情報
26:バンク試行情報
27−1〜27−X:複数のチェックポイント処理結果
28:FW判定情報
31:通常動作部
32:アップデート部
33−1〜33−X:複数のチェックポイント処理部
34:FW判定情報更新部
51−1〜51−C:複数のブロック
52−1〜52−D:複数のフラグメント
1: Wireless sensor network 3-1 to 3-N: Multiple sensor nodes 5: Wireless environment 11: RF communication unit 12-1 to 12-M: Multiple sensors 14: MCU
15: Storage 16: Watchdog Timer 17: Calendar Timer 19: eMMC
21: Boot loader 22-1 to 22-K: Multiple firmware 25: Startup bank information 26: Bank trial information 27-1 to 27-X: Multiple checkpoint processing results 28: FW determination information 31: Normal operation unit 32: Update unit 33-1 to 33-X: multiple checkpoint processing units 34: FW determination information update unit 51-1 to 51-C: multiple blocks 52-1 to 52-D: multiple fragments

Claims (10)

制御部と、
複数のファームウェアとブートローダとのそれぞれを複数のメモリバンクの中のいずれかのメモリバンクに記録する第1記憶装置と、
前記メモリバンクに記録したファームウェアごとの判定情報を記録する第2記憶装置と
を有し、
複数の前記ファームウェアの中の第1ファームウェアは、前記制御部に起動されることにより、制御対象を制御し、さらに、外部装置からダウンロードされた第2ファームウェアを前記第1記憶装置に記録して前記第2ファームウェアの起動を選択して前記ブートローダを起動し、
前記第2ファームウェアは、前記制御部に起動されることにより、前記制御対象を制御し、さらに、前記第2ファームウェアの良否を判定し、前記第2ファームウェアが不良であると判定されたときに、前記判定情報が第1値を示すように前記判定情報を更新して前記ブートローダを起動し、
前記ブートローダは、前記制御部に起動されることにより、前記第2ファームウェアの起動が選択されている場合、前記第2ファームウェアの前記判定情報が前記第1値と異なる第2値を示すときに前記第2ファームウェアを起動し、前記判定情報が前記第1値を示すときに複数の前記ファームウェアの中の前記判定情報が前記第2値を示すファームウェアを起動する
電子機器。
A control unit,
A first storage device for recording each of the plurality of firmware and the boot loader in any one of the plurality of memory banks;
A second storage device for recording determination information for each firmware recorded in the memory bank,
The first firmware among the plurality of the firmware controls the control target by being activated by the control unit, and further records the second firmware downloaded from an external device in the first storage device to store the second firmware. Select to boot the second firmware to boot the boot loader,
The second firmware controls the control target by being activated by the control unit, further determines the quality of the second firmware, and when it is determined that the second firmware is defective, Updating the determination information so that the determination information indicates the first value, and activating the boot loader,
When the boot loader is activated by the control unit to activate the second firmware, the boot loader is activated when the determination information of the second firmware indicates a second value different from the first value. An electronic device that activates second firmware, and activates the firmware in which the determination information among the plurality of firmware indicates the second value when the determination information indicates the first value.
前記第2ファームウェアは、
前記第2ファームウェアが正常であると判定されたときに、前記判定情報が前記第2値を示すように前記判定情報を更新し、前記ブートローダにより再度起動された場合で、前記判定情報が前記第2値を示すときに、前記第2ファームウェアの良否を判定しない
請求項1に記載の電子機器。
The second firmware is
When it is determined that the second firmware is normal, the determination information is updated so that the determination information indicates the second value, and when the boot loader restarts the determination information, the determination information indicates the second value. The electronic device according to claim 1, wherein when the binary value is indicated, the quality of the second firmware is not determined.
前記第2ファームウェアは、複数の観点で前記第2ファームウェアの良否をそれぞれ判定し、前記複数の観点のいずれか1つで不良であると判定されたときに前記判定情報が前記第1値を示すように前記判定情報を更新し、前記複数の観点の全部が正常であると判定されたときに前記判定情報が前記第2値を示すように前記判定情報を更新する
請求項2に記載の電子機器。
The second firmware determines whether the second firmware is good or bad from a plurality of points of view, and the determination information indicates the first value when it is determined to be defective from any one of the plurality of points of view. 3. The electronic device according to claim 2, wherein the determination information is updated so that the determination information is updated so that the determination information indicates the second value when it is determined that all of the plurality of viewpoints are normal. machine.
前記第2ファームウェアが起動されたときに設定されるウォッチドッグタイマをさらに備え、
前記ブートローダは、さらに、前記ウォッチドッグタイマがタイムアウトしたときに、前記制御部に起動される
請求項2または請求項3に記載の電子機器。
Further comprising a watchdog timer set when the second firmware is activated,
The electronic device according to claim 2, wherein the boot loader is further activated by the control unit when the watchdog timer times out.
前記第2ファームウェアは、前記第2ファームウェアが正常であると判定されたときに、前記ウォッチドッグタイマを解除する
請求項4に記載の電子機器。
The electronic device according to claim 4, wherein the second firmware releases the watchdog timer when it is determined that the second firmware is normal.
前記第2記憶装置は、試行情報をさらに記録し、
前記第1ファームウェアは、前記第2ファームウェアが起動される前に、前記判定情報が第3値を示すように前記判定情報を更新し、前記試行情報が第4値を示すように前記試行情報を更新し、
前記ブートローダは、
前記判定情報が前記第3値を示す場合で前記試行情報が前記第4値を示すときに、前記試行情報が第5値を示すように前記試行情報を更新して前記第2ファームウェアを起動し、
前記判定情報が前記第3値を示す場合で前記試行情報が前記第5値を示すときに、前記第1ファームウェアを起動する
請求項4または請求項5に記載の電子機器。
The second storage device further records trial information,
The first firmware updates the determination information so that the determination information has a third value and activates the trial information so that the trial information has a fourth value before the second firmware is activated. Updated,
The boot loader is
When the determination information indicates the third value and the trial information indicates the fourth value, the trial information is updated so that the trial information indicates the fifth value and the second firmware is activated. ,
The electronic device according to claim 4, wherein the first firmware is started when the determination information indicates the third value and the trial information indicates the fifth value.
カレンダータイマをさらに備え、
前記第2記憶装置は、起動回数をさらに記録し、
前記第2ファームウェアは、前記カレンダータイマを用いて導出される期間に前記第2ファームウェアが起動される回数を前記起動回数が示すように前記起動回数を更新し、前記起動回数が所定の値より大きいときに、前記判定情報が前記第1値を示すように前記判定情報を更新して前記ブートローダを起動する
請求項2〜請求項6のいずれか一項に記載の電子機器。
Further equipped with a calendar timer,
The second storage device further records the number of activations,
The second firmware updates the number of times of activation so that the number of times of activation of the second firmware in a period derived using the calendar timer indicates the number of times of activation, and the number of times of activation is larger than a predetermined value. The electronic device according to claim 2, wherein the determination information is updated so that the determination information indicates the first value, and the boot loader is activated.
前記第2ファームウェアは、前記期間が経過したときに前記判定情報が前記第2値を示すように前記判定情報を更新し、前記判定情報が前記第2値を示すときに前記起動回数を更新しない
請求項7に記載の電子機器。
The second firmware updates the determination information so that the determination information indicates the second value when the period has elapsed, and does not update the number of times of activation when the determination information indicates the second value. The electronic device according to claim 7.
複数のファームウェアとブートローダとのそれぞれを第1記憶装置の複数のメモリバンクの中のいずれかのメモリバンクに記録し、
複数の前記ファームウェアの中の第1ファームウェアを起動することにより、制御対象を制御し、さらに、外部装置からダウンロードされた第2ファームウェアを前記第1記憶装置に記録して前記第2ファームウェアの起動を選択して前記ブートローダを起動し、
前記第2ファームウェアを起動することにより、前記制御対象を制御し、さらに、前記第2ファームウェアの良否を判定し、前記第2ファームウェアが不良であると判定されたときに、第2記憶装置に前記メモリバンクに記録したファームウェアごとに記録された前記第2ファームウェアの判定情報が第1値を示すように前記判定情報を更新して前記ブートローダを起動し、
前記ブートローダを起動することにより、前記第2ファームウェアの起動が選択されている場合、前記第2ファームウェアの前記判定情報が前記第1値と異なる、正常であると判定されたことを示す第2値を示すときに前記第2ファームウェアを起動し、前記判定情報が前記第1値を示すときに複数の前記ファームウェアの中の、前記判定情報が前記第2値を示すファームウェアを起動する
処理をコンピュータが実行することを特徴とするファームウェアアップデート方法。
Each of the plurality of firmware and the boot loader is recorded in any one of the plurality of memory banks of the first storage device,
The control target is controlled by activating the first firmware of the plurality of the firmware, and the second firmware downloaded from the external device is recorded in the first storage device to activate the second firmware. Select and start the boot loader,
The control target is controlled by activating the second firmware, and the quality of the second firmware is determined. When the second firmware is determined to be defective, the second storage device stores Updating the determination information so that the determination information of the second firmware recorded for each firmware recorded in the memory bank indicates a first value, and starts the boot loader,
A second value indicating that the determination information of the second firmware is different from the first value and is determined to be normal when the activation of the second firmware is selected by activating the boot loader. Is displayed , the second firmware is started up, and when the determination information indicates the first value, among the plurality of firmwares, the firmware whose determination information indicates the second value is started up. A firmware update method characterized by executing.
複数のファームウェアの中の第1ファームウェアにより、制御対象を制御し、外部装置からダウンロードされた第2ファームウェアを第1記憶装置に記録して前記第2ファームウェアの起動を選択してブートローダを起動し、
前記第2ファームウェアにより、前記制御対象を制御し、前記第2ファームウェアの良否を判定し、前記第2ファームウェアが不良であると判定されたときに、前記第2ファームウェアの判定情報が第1値を示すように前記判定情報を更新して前記ブートローダを起動し、
前記第2ファームウェアの起動が選択されている場合、前記ブートローダにより、前記第2ファームウェアの前記判定情報が前記第1値と異なる、正常であると判定されたことを示す第2値を示すときに前記第2ファームウェアを起動し、前記判定情報が前記第1値を示すときに複数の前記ファームウェアの中の、前記判定情報が前記第2値を示すファームウェアを起動する
処理をコンピュータに実行させる
コンピュータプログラム。
The first firmware among the plurality of firmware controls the control target, records the second firmware downloaded from the external device in the first storage device, selects the activation of the second firmware, and activates the boot loader,
When the second firmware controls the control target, determines whether the second firmware is good, and determines that the second firmware is defective, the determination information of the second firmware has a first value. Update the judgment information as shown to start the boot loader,
When the boot loader indicates that the determination information of the second firmware is different from the first value and indicates a second value that is determined to be normal when the activation of the second firmware is selected. the second launch the firmware, the determination information of a plurality of the firmware when indicating the first value, a computer program for executing processing wherein the determination information to start the firmware indicating the second value to the computer ..
JP2016123577A 2016-06-22 2016-06-22 Electronic device, firmware update method, and computer program Active JP6750340B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2016123577A JP6750340B2 (en) 2016-06-22 2016-06-22 Electronic device, firmware update method, and computer program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2016123577A JP6750340B2 (en) 2016-06-22 2016-06-22 Electronic device, firmware update method, and computer program

Publications (2)

Publication Number Publication Date
JP2017228077A JP2017228077A (en) 2017-12-28
JP6750340B2 true JP6750340B2 (en) 2020-09-02

Family

ID=60891655

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2016123577A Active JP6750340B2 (en) 2016-06-22 2016-06-22 Electronic device, firmware update method, and computer program

Country Status (1)

Country Link
JP (1) JP6750340B2 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3742295A1 (en) 2019-05-23 2020-11-25 NXP USA, Inc. Automatic firmware rollback
JP7386261B2 (en) 2019-12-24 2023-11-24 京セラ株式会社 Communication equipment and control method
JP7362583B2 (en) * 2020-09-23 2023-10-17 株式会社東芝 information processing equipment
JP7398018B1 (en) * 2023-03-16 2023-12-13 新コスモス電機株式会社 Alarms and alarm systems

Family Cites Families (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3250522B2 (en) * 1998-07-23 2002-01-28 日本電気株式会社 Firmware replacement device and replacement method
JP2003140705A (en) * 2001-11-06 2003-05-16 Yamatake Sangyo Systems Co Ltd Multiplexed parallel processor
JP2006185309A (en) * 2004-12-28 2006-07-13 Net In Kyoto:Kk Electronic apparatus and method for updating firmware
JP2006244269A (en) * 2005-03-04 2006-09-14 Daikin Ind Ltd Facility managing device, program update system, facility management program updating method, starting program and facility management program
JP2008225763A (en) * 2007-03-12 2008-09-25 Fujifilm Corp Update method for firmware, program and electronic equipment
JP2008250390A (en) * 2007-03-29 2008-10-16 Matsushita Electric Ind Co Ltd Support information presentation device
TWI389029B (en) * 2008-02-27 2013-03-11 Mstar Semiconductor Inc Apparatus and method for firmware update
JP5045584B2 (en) * 2008-07-01 2012-10-10 株式会社デンソー Program rewriting device
JP2010198155A (en) * 2009-02-24 2010-09-09 Fujitsu Ten Ltd Device and method for updating program, and information processing apparatus
JP5084853B2 (en) * 2010-02-23 2012-11-28 三菱電機株式会社 Firmware update device, communication device, electronic device, firmware update system, firmware update method, and program
JP5516509B2 (en) * 2011-06-07 2014-06-11 株式会社デンソー Program writing system
JP2014164677A (en) * 2013-02-27 2014-09-08 Hitachi Ltd Specification verification support device, specification verification support method and program
JP2015146102A (en) * 2014-02-03 2015-08-13 株式会社ワコム Sensor controller, sensor device equipped with sensor controller, electronic device mounting sensor device, and application software restoration method

Also Published As

Publication number Publication date
JP2017228077A (en) 2017-12-28

Similar Documents

Publication Publication Date Title
JP6750340B2 (en) Electronic device, firmware update method, and computer program
US9110843B2 (en) Rack and method thereof for simultaneously updating basic input output systems
US9846616B2 (en) Boot recovery system
US20190014128A1 (en) Reliable and Secure Firmware Update with a Dynamic Validation for Internet of Things (IoT) Devices
JP5564956B2 (en) Information processing apparatus and firmware update method for information processing apparatus
JP2010541105A (en) Firmware image update and management
US20190235993A1 (en) Generating an inner cloud environment within an outer cloud environment for testing a microservice application
US20100199272A1 (en) Updating firmware without disrupting service
CN101877651B (en) Method and system for recovering system software in network terminating equipment
JP2002333990A (en) Program updating device and its method
KR100952585B1 (en) Method and system for automatic recovery of an embedded operating system
EP2817725B1 (en) Maintaining system firmware images remotely using a distribute file system protocol
US20160070562A1 (en) System and method for over the air programming
JP2009169524A (en) Network system for home appliance
JP2006244269A (en) Facility managing device, program update system, facility management program updating method, starting program and facility management program
TW201502799A (en) Update of programmable for computing nodes
TWI514279B (en) Server system and firmware update method
US20230087221A1 (en) Detection fields of view
US11106450B2 (en) Information extraction apparatus, and automatic firmware update system and method for embedded system
JP2014099097A (en) Information processing device, information processing method, and computer program
CN109901117B (en) Radar restarting method and device
TWI716969B (en) Recovery image downloads via data chunks
JP3233274B2 (en) Microcomputer program reboot method and program reboot device
CN113452550A (en) Information acquisition device, firmware updating method and system of embedded system device
JP2004054421A (en) Memory, information processor, storage method and information processing method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20190311

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20200120

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20200128

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20200330

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20200428

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20200618

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20200714

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20200727

R150 Certificate of patent or registration of utility model

Ref document number: 6750340

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150