JP6750340B2 - Electronic device, firmware update method, and computer program - Google Patents
Electronic device, firmware update method, and computer program Download PDFInfo
- 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
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.
しかしながら、ファームウェアの起動自体は可能なものの、正常に動作しないという不具合が発生することがある。上記の従来技術では、更新されたファームウェアに不具合がある場合でも、このようにファームウェアが起動したときに、正常に動作する予備のファームウェアに巻き戻すことが困難であるという問題がある。このような問題は、センサノードに限らず、遠隔でファームウェアが更新される電子機器に発生することがある。 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.
以下、図面を参照して、実施形態にかかる電子機器、ファームウェアアップデート方法およびコンピュータプログラムを説明する。実施形態において同一の機能を有する構成には同一の符号を付し、重複する説明は省略する。なお、以下の実施形態で説明する電子機器、ファームウェアアップデート方法およびコンピュータプログラムは、一例を示すに過ぎず、実施形態を限定するものではない。また、以下の各実施形態は、矛盾しない範囲内で適宜組みあわせてもよい。 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
[サーバ]
サーバ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
[実施例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
センサノード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
ウォッチドッグタイマ16は、MCU14に情報伝達可能に接続されている。ウォッチドッグタイマ16は、MCU14により設定された時刻から所定の期間経過した後にタイムアウトする。ウォッチドッグタイマ16は、タイムアウトしたときに、タイムアウトしたことをMCU14に伝達することにより、MCU14をリブートさせる。ウォッチドッグタイマ16は、MCU14により解除されることにより、MCU14により設定された時刻から所定の期間経過した後にタイムアウトしないで、MCU14をリブートさせない。
The
カレンダータイマ17は、MCU14に情報伝達可能に接続されている。カレンダータイマ17は、MCU14に制御されることにより、現在時刻をMCU14に伝達する。
The
MCU14は、eMMC19を有している。eMMC19は、フラッシュメモリから形成され、センサノード3−iにインストールされるコンピュータプログラムを記録している。MCU14は、そのコンピュータプログラムが起動されることにより、RF通信部11と複数のセンサ12−1〜12−Mとストレージ15とウォッチドッグタイマ16とカレンダータイマ17とを制御する。
The MCU 14 has an
センサノード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
RF通信部11とMCU14とストレージ15とウォッチドッグタイマ16とカレンダータイマ17とは、ワンチップで形成されている。なお、これらは、複数のチップから形成されてもよい。
The RF communication unit 11, the MCU 14, the
なお、eMMC19は、他の記憶装置に置換されてもよい。その記憶装置としては、データを書き換え可能な半導体メモリが例示され、SSD、RAM、NVSRAMが例示される。さらに、eMMC19は、MCU14の内部に設けられているが、MCU14と別個に設けられていてもよい。
The
なお、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
[ストレージに記録される情報]
図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
バンク試行情報26は、起動バンク情報25が示すファームウェアが1度起動しようとしたかどうかを示し、「○」または「×」を示している。すなわち、バンク試行情報26は、「○」を示しているときに、起動バンク情報25が示すファームウェアが1度起動されたことを示している。バンク試行情報26は、「×」を示しているときに、起動バンク情報25が示すファームウェアが1度も起動されていないことを示している。複数のチェックポイント処理結果27−1〜27−Xのうちの任意のチェックポイント処理結果27−x(x=1,2,3,…,X)は、「未定」または「正常」または「不良」を示している。FW判定情報28は、「未定」または「正常」または「不良」を示している。
The
[ファームウェア]
図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
通常動作部31は、複数のセンサ12−1〜12−Mを制御することにより、複数のセンサ12−1〜12−Mにより複数の測定値をそれぞれ測定する。通常動作部31は、さらに、RF通信部11を制御することにより、無線環境5を介して、複数のセンサ12−1〜12−Mによりそれぞれ測定された複数の測定値をサーバ2に送信する。
The
アップデート部32は、RF通信部11を介して、サーバ2からFW更新要求を受信する。アップデート部32は、サーバ2からFW更新要求を受信したときに、RF通信部11を介して、更新されたファームウェア22−Bをサーバ2からダウンロードする。アップデート部32は、さらに、eMMC19を制御することにより、ダウンロードされたファームウェア22−BをeMMC19の所定のバンクメモリに記録する。所定のバンクメモリは、eMMC19の複数のバンクメモリのうちの起動されているファームウェア22−Aが記録されているバンクメモリと異なる他のバンクメモリである。
The
アップデート部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
複数のチェックポイント処理部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
チェックポイント処理部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
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
図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
複数のチェックポイント処理部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
複数のチェックポイント処理部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
[ブートローダ]
ブートローダ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
[実施例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
ブートローダ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
ファームウェア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
このように、センサノード3−iは、ブートローダ21とファームウェア22−Aとファームウェア22−Bとのうちの1つのコンピュータプログラムが実行され、これらのうちの2つのコンピュータプログラムが並行して実行されることがない。
As described above, in the sensor node 3-i, one computer program of the
図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
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
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
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
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
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
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
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
図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
ブートローダ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
[実施例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
このようなセンサノード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
ところで、実施例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
ところで、実施例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
<実施例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
[実施例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
ブートローダ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
ファームウェア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
ウォッチドッグタイマ16は、設定された時刻から所定の期間経過した時刻までの期間に、ファームウェア22−Bにより解除されなかったときに、タイムアウトする。ウォッチドッグタイマ16は、タイムアウトしたときに、タイムアウトしたことをMCU14に伝達することにより、MCU14をリブートさせる(S41)。ブートローダ21は、MCU14がリブートされることにより起動される。ブートローダ21は、ウォッチドッグタイマ16がMCU14をリブートすることにより起動されたときに、再度S35以降の処理を実行する。
The
図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
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
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
MCU14は、起動バンク情報25とバンク試行情報26とFW判定情報28とが更新された後に、ウォッチドッグタイマ16を制御することにより、ウォッチドッグタイマ16を設定する(S54)。MCU14は、ウォッチドッグタイマ16を設定した後に、リブートすることにより、ブートローダ21を起動し、ブートローダ21に制御を移す。
The MCU 14 sets the
ウォッチドッグタイマ16は、設定された時刻から所定の期間経過した時刻までの期間に、解除されなかったときに、タイムアウトする。ウォッチドッグタイマ16は、タイムアウトしたときに、タイムアウトしたことをMCU14に伝達することにより、MCU14をリブートさせ、ブートローダ21を起動させる(S55)。
The
[実施例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
また、実施例2では、ファームウェア22−Bは、ファームウェア22−Bが正常であると判定されたときに、ウォッチドッグタイマ16を解除する。このようなセンサノード3−iは、ファームウェア22−Bが正常であると判定されたときにウォッチドッグタイマ16を解除することにより、不要にリブートされることを防止することができる。
Further, in the second embodiment, the firmware 22-B releases the
また、実施例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
<実施例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
[実施例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
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
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
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
MCU14は、起動バンク情報25とFW判定情報28とが更新された後に、ウォッチドッグタイマ16を制御することにより、ウォッチドッグタイマ16を設定する(S54)。MCU14は、ウォッチドッグタイマ16を設定した後に、リブートすることにより、ブートローダ21を起動し、ブートローダ21に制御を移す。
The MCU 14 sets the
ウォッチドッグタイマ16は、設定された時刻から所定の期間経過した時刻までの期間に、解除されなかったときに、タイムアウトする。ウォッチドッグタイマ16は、タイムアウトしたときに、タイムアウトしたことをMCU14に伝達することにより、MCU14をリブートさせ、ブートローダ21を起動させる(S55)。
The
実施例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
[実施例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
ブートローダ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
ファームウェア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
ファームウェア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
図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
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
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
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
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
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
[実施例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
また、実施例4では、ファームウェア22−Bは、その期間が経過したときにFW判定情報28が「正常」を示すようにFW判定情報28を更新し、FW判定情報28が「正常」を示すときに起動回数を更新しない。このようなセンサノード3−iは、ファームウェア22−Bが正常であると判定されたときに、起動回数を更新しないことにより、MCU14の負担を軽減することができる。
In the fourth embodiment, the firmware 22-B updates the
ところで、実施例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
[実施例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
複数のセンサノード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
センサノード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
図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
センサノード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
サーバ2は、ACK64を受信した場合で、ACK64にそのリストが付随されていたときに、そのリストが示す複数のフラグメント65をセンサノード3−iに送信する。このとき、複数のフラグメント65は、リスト中の最後のフラグメントを、最終フラグメント52−Dと同様のものとして扱い、処理をするように実装している。
When the
センサノード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
図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
[実施例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
また、実施例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
また、実施例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
また、実施例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
<実施例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
サーバ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
サーバ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
図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
サーバ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
[実施例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
また、実施例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
ところで、実施例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
(付記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
(付記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ファームウェアの良否を判定しない
請求項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に記載の電子機器。 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または請求項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.
請求項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.
前記第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.
請求項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ファームウェアを起動することにより、制御対象を制御し、さらに、外部装置からダウンロードされた第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.
前記第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 ..
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)
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)
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 |
-
2016
- 2016-06-22 JP JP2016123577A patent/JP6750340B2/en active Active
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 |