JP2016212545A - Printing device, program update system, and control method - Google Patents

Printing device, program update system, and control method Download PDF

Info

Publication number
JP2016212545A
JP2016212545A JP2015093911A JP2015093911A JP2016212545A JP 2016212545 A JP2016212545 A JP 2016212545A JP 2015093911 A JP2015093911 A JP 2015093911A JP 2015093911 A JP2015093911 A JP 2015093911A JP 2016212545 A JP2016212545 A JP 2016212545A
Authority
JP
Japan
Prior art keywords
cpu
update
program
data
update data
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.)
Pending
Application number
JP2015093911A
Other languages
Japanese (ja)
Inventor
雄史 ▲高▼見澤
雄史 ▲高▼見澤
Yuji Takamizawa
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.)
Seiko Epson Corp
Original Assignee
Seiko Epson Corp
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 Seiko Epson Corp filed Critical Seiko Epson Corp
Priority to JP2015093911A priority Critical patent/JP2016212545A/en
Publication of JP2016212545A publication Critical patent/JP2016212545A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Stored Programmes (AREA)
  • Accessory Devices And Overall Control Thereof (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a printing device that needs to ensure the validity of a program and can appropriately update a program for a sub-CPU by communication.SOLUTION: A printing device includes: a communication unit for communicating with an external device; a first CPU for controlling the communication unit; and a second CPU for communicating with the first CPU. After confirming the validity of update data which is to update a program for the second CPU and received by the communication unit, the first CPU updates the program for the second CPU by using the update data.SELECTED DRAWING: Figure 1

Description

本発明は、プログラムの正当性を確保する必要のある印刷装置等に関し、特に、サブCPU用のプログラム更新を通信によって適正に行うことのできる印刷装置等に関する。   The present invention relates to a printing apparatus or the like that needs to ensure the validity of a program, and more particularly to a printing apparatus or the like that can appropriately update a program for a sub CPU by communication.

いわゆるフィスカルプリンターなど、セキュリティー性能を求められる電子機器においては、データの改ざん等の不正を防止し、データの正当性を確保する必要がある。それに伴い、データを処理するプログラム(ファームウェア)自体の正当性を確保することが重要である。   In an electronic device such as a so-called fiscal printer that requires security performance, it is necessary to prevent fraud such as falsification of data and to ensure data validity. Accordingly, it is important to ensure the validity of the data processing program (firmware) itself.

そこで、従来は、このような機器について、更新(アップデート)機能を持たせないようにする、プログラムを格納するメモリーへの書き込みを禁止する等の措置が施されていた。また、このような機器に複数のCPUが備えられる場合には、サブCPU用のプログラムについては、製造工程でのみ更新が可能である仕様としていた。   Therefore, conventionally, measures have been taken to prevent such devices from having an update function or prohibit writing to a memory storing a program. Further, when such a device is provided with a plurality of CPUs, the specifications for the sub CPU program can be updated only in the manufacturing process.

下記特許文献1には、プログラムの更新が可能なマルチCPUシステムにおいて、プログラム更新を行うべきCPUの種類が増えた場合でも更新作業を高速に行える発明について提案されている。   Patent Document 1 below proposes an invention that can perform an update operation at high speed even when the number of CPUs to be updated is increased in a multi-CPU system capable of updating a program.

特開2009−64317号公報JP 2009-64317 A

上述したセキュリティー性能を求められる電子機器においても、プログラムのバグ(不具合)修正、ユーザーの要望による機能追加、法律改正に伴う仕様変更などによるプログラム更新の必要があり、これらのプログラム更新を通信によって行えるようにすることは、ユーザー、ベンダー(提供者)の双方にとって利便性が高く、また、コスト面でも有利である。従って、サブCPU用のプログラム更新についても、通信による方法が強く望まれている。そして、その際には、更新プログラム自体の正当性を確実に確保することが必要である。   Even in the electronic devices that require the above-mentioned security performance, it is necessary to update the program by correcting bugs (defects) in the program, adding functions according to user requests, changing specifications due to legal revisions, etc., and these program updates can be performed via communication. This is highly convenient for both users and vendors (providers), and is advantageous in terms of cost. Therefore, a communication method is strongly desired for program update for the sub CPU. In that case, it is necessary to ensure the validity of the update program itself.

なお、上記特許文献1には、サブCPUのプログラム更新について記載されているが、更新プログラムのデータ自体についての正当性確保については記載されていない。   In addition, although the above-mentioned patent document 1 describes the program update of the sub CPU, it does not describe how to ensure the validity of the data itself of the update program.

そこで、本発明の目的は、プログラムの正当性を確保する必要のある印刷装置であって、サブCPU用のプログラム更新を通信によって適正に行うことのできる印刷装置、等を提供することである。   SUMMARY OF THE INVENTION An object of the present invention is to provide a printing apparatus that needs to ensure the validity of a program and that can appropriately update a program for a sub CPU by communication.

上記の目的を達成するために、本発明の一つの側面は、印刷装置が、外部装置と通信を行う通信部と、前記通信部を制御する第1CPUと、前記第1CPUと通信を行う第2CPUと、を備え、前記第1CPUは、前記通信部が受信した、前記第2CPU用のプログラムを更新するための更新データの正当性を確認した後に、前記更新データを用いて前記第2CPU用のプログラムを更新する、ことである。   In order to achieve the above object, according to one aspect of the present invention, a printing apparatus includes a communication unit that communicates with an external device, a first CPU that controls the communication unit, and a second CPU that communicates with the first CPU. And the first CPU confirms the validity of the update data received by the communication unit for updating the program for the second CPU, and then uses the update data for the program for the second CPU. Is to update.

また、上記発明において、好ましい態様は、更に、前記第1CPUが実行するプログラムを記憶する第1記憶部と、前記第2CPUが実行するプログラムを記憶する第2記憶部と、前記更新データを一時的に記憶する第3記憶部と、を備える、ことを特徴とする。   In the above-mentioned invention, a preferable aspect further includes a first storage unit that stores a program executed by the first CPU, a second storage unit that stores a program executed by the second CPU, and the update data temporarily. And a third storage unit that stores the information in the storage device.

更に、上記発明において、好ましい態様は、前記第1CPUは、前記通信部が受信した前記更新データを前記第3記憶部に格納し、前記第1CPUは、前記格納した更新データの正当性を確認後、当該更新データを前記第2CPUに送信し、前記第2CPUは、前記送信された更新データで前記第2記憶部に記憶されるプログラムを更新する、ことを特徴とする。   Furthermore, in the above invention, a preferred aspect is that the first CPU stores the update data received by the communication unit in the third storage unit, and the first CPU confirms the validity of the stored update data. The update data is transmitted to the second CPU, and the second CPU updates the program stored in the second storage unit with the transmitted update data.

更に、上記発明において、好ましい態様は、前記更新データは、更新プログラムデータと正当性判断情報を含み、前記第1CPUは、前記正当性判断情報に基づいて前記更新プログラムデータの正当性を判断する、ことを特徴とする。   Further, in the above invention, a preferred aspect is that the update data includes update program data and validity determination information, and the first CPU determines the validity of the update program data based on the validity determination information. It is characterized by that.

更に、上記発明において、好ましい態様は、前記第2CPUは、フィスカルメモリーを制御する、ことを特徴とする。   Furthermore, in the above invention, a preferred aspect is characterized in that the second CPU controls a fiscal memory.

上記の目的を達成するために、本発明の別の側面は、ホスト装置と印刷装置を有するプログラム更新システムにおいて、前記ホスト装置は、前記印刷装置のプログラムを更新するための更新データを前記印刷装置に送信する更新部を備え、前記印刷装置は、前記ホスト装置と通信を行う通信部と、前記通信部を制御する第1CPUと、前記第1CPUと通信を行う第2CPUと、を備え、前記第1CPUは、前記通信部が受信した前記更新データの正当性を確認した後に、前記更新データを用いて前記第2CPU用のプログラムを更新する、ことである。   In order to achieve the above object, another aspect of the present invention provides a program update system having a host device and a printing device, wherein the host device sends update data for updating a program of the printing device to the printing device. An update unit that transmits to the host device, and the printing apparatus includes a communication unit that communicates with the host device, a first CPU that controls the communication unit, and a second CPU that communicates with the first CPU. The 1 CPU updates the program for the second CPU using the update data after confirming the validity of the update data received by the communication unit.

上記の目的を達成するために、本発明の更に別の側面は、外部装置と通信を行う通信部と、前記通信部を制御する第1CPUと、前記第1CPUと通信を行う第2CPUと、を備える印刷装置の制御方法において、前記第1CPUが、前記通信部で受信した前記第2CPU用のプログラムを更新するための更新データの正当性を確認した後に、前記更新データを用いて前記第2CPU用のプログラムを更新する、ことである。   In order to achieve the above object, still another aspect of the present invention provides a communication unit that communicates with an external device, a first CPU that controls the communication unit, and a second CPU that communicates with the first CPU. In the method for controlling a printing apparatus provided, after the first CPU confirms the validity of update data for updating the program for the second CPU received by the communication unit, the update data is used for the second CPU. Update the program.

本発明の更なる目的及び、特徴は、以下に説明する発明の実施の形態から明らかになる。   Further objects and features of the present invention will become apparent from the embodiments of the invention described below.

本発明を適用したプログラム更新システムの実施の形態例に係る構成図である。It is a block diagram which concerns on the example of embodiment of the program update system to which this invention is applied. プログラム更新システム100による更新処理の手順を例示したフローチャートである。5 is a flowchart illustrating an example of an update process procedure performed by the program update system 100. 更新データ14の生成手順及び正当性判断手順を説明するための図である。It is a figure for demonstrating the production | generation procedure of the update data 14, and a validity judgment procedure.

以下、図面を参照して本発明の実施の形態例を説明する。しかしながら、かかる実施の形態例が、本発明の技術的範囲を限定するものではない。なお、図において、同一又は類似のものには同一の参照番号又は参照記号を付して説明する。   Embodiments of the present invention will be described below with reference to the drawings. However, such an embodiment does not limit the technical scope of the present invention. In the drawings, the same or similar elements are denoted by the same reference numerals or reference symbols.

図1は、本発明を適用したプログラム更新システムの実施の形態例に係る構成図である。図1に示す本実施の形態例に係るプログラム更新システム100では、プリンター2(印刷装置)のメインCPU24(第1CPU)が、ホストコンピューター1(外部装置)から送信されるサブCPU27(第2CPU)用の更新データ14に含まれる正当性判断情報(デジタル署名143、図3参照)に基づいて、更新データ14に含まれる更新プログラム自体の正当性を判断した後に、サブCPU27用のプログラム更新を行う。これにより、プリンター2のサブCPU27用のプログラム更新が、通信によって適正行われ、利便性の向上及びコストの低減を図ることができる。   FIG. 1 is a configuration diagram according to an embodiment of a program update system to which the present invention is applied. In the program update system 100 according to the present embodiment shown in FIG. 1, the main CPU 24 (first CPU) of the printer 2 (printing apparatus) is for the sub CPU 27 (second CPU) transmitted from the host computer 1 (external apparatus). After determining the validity of the update program itself included in the update data 14 based on the validity determination information included in the update data 14 (digital signature 143, see FIG. 3), the program for the sub CPU 27 is updated. Thereby, the program update for the sub CPU 27 of the printer 2 is appropriately performed by communication, and the convenience can be improved and the cost can be reduced.

図1に示すように、本プログラム更新システム100は、セキュリティー性能を必要とするプリンター2と当該プリンター2のホスト装置であるホストコンピューター1とを備える。ホストコンピューター1とプリンター2はネットワークを介して通信可能に接続される。プリンター2のプログラム(ファームウェア)を更新する際には、ホストコンピューター1から更新プログラムを送信して作業を行う。   As shown in FIG. 1, the program update system 100 includes a printer 2 that requires security performance and a host computer 1 that is a host device of the printer 2. The host computer 1 and the printer 2 are communicably connected via a network. When updating the program (firmware) of the printer 2, the update program is transmitted from the host computer 1 to perform the work.

ホストコンピューター1は、パーソナルコンピューター等で構成され、図示していないが、CPU、RAM、HDD、通信装置、表示装置、指示装置等を備える。また、ホストコンピューター1は、図1に示すように、機能構成として、更新部11を備える。   The host computer 1 is composed of a personal computer or the like, and includes a CPU, a RAM, an HDD, a communication device, a display device, an instruction device, etc. (not shown). Further, as shown in FIG. 1, the host computer 1 includes an update unit 11 as a functional configuration.

更新部11は、プリンター2のプログラム更新を指示する部分であり、データ転送部12とデータ記憶部13を備える。   The update unit 11 is a part that instructs to update the program of the printer 2, and includes a data transfer unit 12 and a data storage unit 13.

データ記憶部13は、プリンター2のプログラムを更新するための更新データ14を記憶する。更新データ14については、図3に基づいて後述するが、更新データ14は、ROMに書き込むための所定のフォーマットで表現され、ヘッダー141、更新プログラムデータ142、及びデジタル署名143を含む。ヘッダー141は、更新先を示す情報等、更新データ14を説明する情報であり、更新プログラムデータ142は更新プログラム自体のデータであり、デジタル署名143は更新データ14及び更新プログラムデータ142の正当性を判断するための正当性判断情報である。なお、本実施の形態例では、更新データ14は、プリンター2のサブ制御部22(サブCPU27)用の更新データである。また、更新データ14は、ホストコンピューター1で生成されてもよいし、他の装置で生成されてもよい。また、更新部11が更新データ14を生成する機能を備えてもよい。なお、データ記憶部13は、HDD等の記憶装置で構成することができる。   The data storage unit 13 stores update data 14 for updating the program of the printer 2. The update data 14 will be described later with reference to FIG. 3. The update data 14 is expressed in a predetermined format for writing to the ROM, and includes a header 141, update program data 142, and a digital signature 143. The header 141 is information describing the update data 14 such as information indicating the update destination, the update program data 142 is data of the update program itself, and the digital signature 143 indicates the validity of the update data 14 and the update program data 142. This is legitimacy judgment information for judgment. In the present embodiment, the update data 14 is update data for the sub control unit 22 (sub CPU 27) of the printer 2. The update data 14 may be generated by the host computer 1 or may be generated by another device. Further, the update unit 11 may have a function of generating the update data 14. The data storage unit 13 can be configured by a storage device such as an HDD.

データ転送部12は、データ記憶部13に記憶される更新データ14をプリンター2へ送信する部分である。データ転送部12は、データ転送用のアプリケーションプログラム、当該プログラムに従って動作するCPU、RAM等によって構成される。   The data transfer unit 12 is a part that transmits the update data 14 stored in the data storage unit 13 to the printer 2. The data transfer unit 12 includes an application program for data transfer, a CPU that operates according to the program, a RAM, and the like.

プリンター2は、ホストコンピューター1によるプログラム更新の対象装置であり、一例として、店舗の精算装置(レジ)等に接続されて使用される、フィスカルプリンターである。   The printer 2 is a target device for program update by the host computer 1, and is a fiscal printer that is used by being connected to a checkout device (register) in a store as an example.

プリンター2は、動作モードとして、プログラムを更新する際の更新モードと、印刷を実行する際の印刷モードを備える。   The printer 2 includes an update mode for updating a program and a print mode for executing printing as operation modes.

プリンター2は、図1に示すように、メイン制御部21と複数のサブ制御部22(22a、22b、・・・)を備える。各制御部21、22は、CPU、ROM、RAM、ASIC等を載せた電子基板で構成される。また、図示していないが、各サブ制御部22は、制御対象である各動作部を備える。   As shown in FIG. 1, the printer 2 includes a main control unit 21 and a plurality of sub-control units 22 (22a, 22b,...). Each control part 21 and 22 is comprised with the electronic substrate which mounted CPU, ROM, RAM, ASIC, etc. Moreover, although not shown in figure, each sub-control part 22 is provided with each operation | movement part which is a control object.

メイン制御部21は、プリンター2全体の制御、ホストコンピューター1を含む外部装置との通信の制御を司る部分である。また、メイン制御部21は、サブ制御部22用のプログラム更新の際に、更新指示及び更新プログラムの正当性判断を行う。   The main control unit 21 is a part that controls the entire printer 2 and controls communication with external devices including the host computer 1. In addition, the main control unit 21 performs an update instruction and a validity determination of the update program when the program for the sub control unit 22 is updated.

メイン制御部21は、図1に示すように、通信部23、メインCPU24、一時記憶部25、及びメイン記憶部26を備える。通信部23は、外部装置との通信を司る部分である。通信部23は、一例として、外部装置がプリンター2の印刷処理等の制御を行うホストコンピューター1の場合は、USB(Universal Serial Bus)に則った通信を行う。また、外部装置はネットワークを介するサーバーコンピューターでもよい。   As shown in FIG. 1, the main control unit 21 includes a communication unit 23, a main CPU 24, a temporary storage unit 25, and a main storage unit 26. The communication unit 23 is a part that manages communication with an external device. For example, when the external device is the host computer 1 that controls the printing process of the printer 2, the communication unit 23 performs communication according to USB (Universal Serial Bus). The external device may be a server computer via a network.

メインCPU24(第1CPU)は、メインCPU用のプログラム(ファームウェア)に従って上述したメイン制御部21の制御を実行する部分である。   The main CPU 24 (first CPU) is a part that executes the control of the main control unit 21 described above in accordance with a program (firmware) for the main CPU.

一時記憶部25(第3記憶部)は、メインCPU24が用いるテンポラリーメモリーであり、例えば、フラッシュROMで構成される。一時記憶部25は、ホストコンピューター1から送信される更新データ14を一時的に記憶(保持)する。   The temporary storage unit 25 (third storage unit) is a temporary memory used by the main CPU 24, and is configured by, for example, a flash ROM. The temporary storage unit 25 temporarily stores (holds) the update data 14 transmitted from the host computer 1.

メイン記憶部26(第1記憶部)は、メインCPU24が用いるメインメモリーであり、例えば、フラッシュROMで構成される。メイン記憶部26は、メインCPU24が実行するプログラムを記憶する。   The main storage unit 26 (first storage unit) is a main memory used by the main CPU 24, and is configured by a flash ROM, for example. The main storage unit 26 stores a program executed by the main CPU 24.

サブ制御部22(22a、22b、・・・)は、図1に示すように、それぞれ、サブCPU27(27a、27b、・・・)(第2CPU)とサブ記憶部28(28a、28b、・・・)(第2記憶部)を備える。各サブCPU27は、各サブ記憶部28に記憶されるサブCPU用のプログラム(ファームウェア)を実行して制御を行う。これらサブCPU用のプログラムが本プログラム更新システム100での更新対象である。各サブCPU27は、メインCPU24から送信される更新データ14を受信して、更新データ14に含まれる更新プログラムデータ142(図3参照)を各サブ記憶部28に書き込んでプログラム更新を行う。なお、各サブ記憶部28は、例えば、フラッシュROMで構成される。   As shown in FIG. 1, the sub control unit 22 (22a, 22b,...) Has a sub CPU 27 (27a, 27b,...) (Second CPU) and a sub storage unit 28 (28a, 28b,. ..) (second storage unit). Each sub CPU 27 performs control by executing a program (firmware) for the sub CPU stored in each sub storage unit 28. These programs for the sub CPU are targets to be updated by the program update system 100. Each sub CPU 27 receives the update data 14 transmitted from the main CPU 24 and writes the update program data 142 (see FIG. 3) included in the update data 14 to each sub storage unit 28 to perform the program update. In addition, each sub memory | storage part 28 is comprised by flash ROM, for example.

サブ制御部22としては、印刷制御部(22a)、フィスカルメモリー制御部(22b)、バッテリー制御部、などがある。   The sub-control unit 22 includes a print control unit (22a), a fiscal memory control unit (22b), a battery control unit, and the like.

印刷制御部(22a)には、図示しない動作部(印刷機構部)が接続され、印刷制御部(22a)の制御により印刷機構部が用紙などの印刷媒体に印刷を実行する。例えば、印刷方式として、インクジェット方式を用いる場合には、印刷機構部は、インクを吐出するノズルを備えた印刷ヘッド、印刷媒体を搬送する搬送装置などを備える。   An operation unit (printing mechanism unit) (not shown) is connected to the printing control unit (22a), and the printing mechanism unit executes printing on a printing medium such as paper under the control of the printing control unit (22a). For example, when an inkjet method is used as a printing method, the printing mechanism unit includes a print head including a nozzle that ejects ink, a transport device that transports a print medium, and the like.

フィスカルメモリー制御部(22b)には、図示しない動作部(フィスカルメモリー)が接続され、フィスカルメモリーは、プリンター2に印刷指示を出す精算装置等で処理された売上情報などのフィスカルデータを記憶する。フィスカルメモリーに記憶された情報は、消去、編集することができない構成とされ、徴税のために、改竄が防止される。フィスカルメモリーは、不揮発性のメモリーで構成することができる。   An operation unit (fiscal memory) (not shown) is connected to the fiscal memory control unit (22b), and the fiscal memory stores fiscal data such as sales information processed by a settlement apparatus that issues a print instruction to the printer 2. The information stored in the fiscal memory cannot be deleted or edited, and falsification is prevented for tax collection. Fiscal memory can be composed of non-volatile memory.

以上説明したような構成を備える本プログラム更新システム100では、以下のような手順で、サブCPU用のプログラムの更新処理が行われる。図2は、プログラム更新システム100による更新処理の手順を例示したフローチャートである。   In the program update system 100 having the configuration as described above, the update processing of the program for the sub CPU is performed in the following procedure. FIG. 2 is a flowchart illustrating the procedure of update processing by the program update system 100.

ホストコンピューター1の操作者がデータ転送部12を起動すると、データ転送部12は、データ記憶部13に記憶される更新データ14を読み出して取得する(図2のステップS1)。   When the operator of the host computer 1 activates the data transfer unit 12, the data transfer unit 12 reads and acquires the update data 14 stored in the data storage unit 13 (step S1 in FIG. 2).

次に、データ転送部12は、取得した更新データ14をネットワーク3を介してプリンター2へ送信する(図2のステップS2)。   Next, the data transfer unit 12 transmits the acquired update data 14 to the printer 2 via the network 3 (step S2 in FIG. 2).

ホストコンピューター1は、通信部23で送信された更新データ14を受信する。受信された更新データ14は、メインCPU24に渡される。   The host computer 1 receives the update data 14 transmitted by the communication unit 23. The received update data 14 is transferred to the main CPU 24.

メインCPU24は、更新データ14のヘッダー141を解釈し、更新データ14がサブCPU用の更新データであると判断し、動作モードを更新モードに切り替える。その後、メインCPU24は、更新データ14を一時記憶部25に格納(保持)する(図2のステップS3)。   The main CPU 24 interprets the header 141 of the update data 14, determines that the update data 14 is update data for the sub CPU, and switches the operation mode to the update mode. Thereafter, the main CPU 24 stores (holds) the update data 14 in the temporary storage unit 25 (step S3 in FIG. 2).

次に、メインCPU24は、一時記憶部24に記憶される更新データ14の正当性を判断する(図2のステップS4)。当該正当性判断の具体的な処理については後述するが、本実施形態例では、一例として、デジタル署名方式による認証処理を行う。当該正当性判断処理により、更新データ14全体の正当性、換言すれば、プログラム更新指示の正当性、及び、更新データ14に含まれる更新プログラムデータ142自体の正当性が判断される。   Next, the main CPU 24 determines the validity of the update data 14 stored in the temporary storage unit 24 (step S4 in FIG. 2). Although specific processing of the validity determination will be described later, in this embodiment, as an example, authentication processing by a digital signature method is performed. The validity determination process determines the validity of the update data 14 as a whole, in other words, the validity of the program update instruction and the validity of the update program data 142 included in the update data 14.

正当性判断の結果、更新データ14の正当性が認められなければ(図2のステップS4のNG)、メインCPU24は、一時記憶部25から更新データ14を削除する(図2のステップS5)。その後、メインCPU24は、ホストコンピューター1の更新部11に対し、更新データ14の正当性が認められず更新データ14によるプログラム更新が行われなかった旨の応答を行い、当該プログラム更新処理を終了する。   If the validity of the update data 14 is not recognized as a result of the validity determination (NG in step S4 in FIG. 2), the main CPU 24 deletes the update data 14 from the temporary storage unit 25 (step S5 in FIG. 2). Thereafter, the main CPU 24 sends a response to the updating unit 11 of the host computer 1 that the validity of the update data 14 is not recognized and the program update by the update data 14 has not been performed, and the program update process is terminated. .

一方、正当性判断(S4)の結果、更新データ14の正当性が認められれば(図2のステップS4のOK)、メインCPU24は、一時記憶部24から更新データ14を読み出し、そのヘッダー141に含まれる更新先のサブCPU27に、更新データ14を送信する(図2のステップS6)。   On the other hand, if the validity of the update data 14 is recognized as a result of the validity determination (S4) (OK in step S4 in FIG. 2), the main CPU 24 reads the update data 14 from the temporary storage unit 24 and stores it in its header 141. The update data 14 is transmitted to the included update destination sub CPU 27 (step S6 in FIG. 2).

更新データ14を送信されたサブCPU27は、更新データ14を受信し、更新データ14の指示に従って、更新データ14に含まれる更新プログラムデータ142をサブ記憶部28に記憶する。当該記憶の際に、サブCPU27は、更新プログラムデータ142に相当する、サブ記憶部28に記憶されていたこれまでの(現行の)プログラムデータを消去し、更新データ14によるプログラム更新が実行される(図2のステップS7)。   The sub CPU 27 that has received the update data 14 receives the update data 14 and stores the update program data 142 included in the update data 14 in the sub storage unit 28 in accordance with the instruction of the update data 14. At the time of the storage, the sub CPU 27 erases the previous (current) program data stored in the sub storage unit 28 corresponding to the update program data 142, and the program update by the update data 14 is executed. (Step S7 in FIG. 2).

更新先のサブ制御部22がサブ制御部22b(フィスカルメモリー制御部)である場合には、サブCPU27bがフィスカルメモリー用の更新データ14を受信し、サブ記憶部28bに記憶されるプログラムが、受信された更新データ14に含まれる更新プログラムデータ142によって更新される。   When the update-destination sub-control unit 22 is the sub-control unit 22b (fiscal memory control unit), the sub CPU 27b receives the update data 14 for fiscal memory, and the program stored in the sub storage unit 28b is received. The update program data 142 included in the updated data 14 is updated.

以上のようにして、本プログラム更新システム100によるプログラム更新処理が実行される。   As described above, the program update process by the program update system 100 is executed.

次に、更新データ14の生成処理及び正当性判断処理について説明する。図3は、更新データ14の生成手順及び正当性判断手順を説明するための図である。更新データ14を生成する際には、まず、新たにサブ記憶部28bに記憶されるべきプログラムのデータである更新プログラムデータ142が用意される(図3の(A))。更新プログラムデータ142は、ROMへ書き込みを行うための所定のフォーマットで表現されている。   Next, the update data 14 generation process and the validity determination process will be described. FIG. 3 is a diagram for explaining the generation procedure and the validity determination procedure of the update data 14. When the update data 14 is generated, first, update program data 142, which is data of a program to be newly stored in the sub storage unit 28b, is prepared ((A) in FIG. 3). The update program data 142 is expressed in a predetermined format for writing to the ROM.

次に、所定のハッシュ関数に更新プログラムデータ142を入力され(図3の(B))、更新プログラムデータ142のハッシュ値が求められる(図3の(C))。その後、求めたハッシュ値を秘密鍵で暗号化され(図3の(D))、デジタル署名143が生成される(図3の(E))。生成されたデジタル署名143は、上記所定のフォーマットで表現される。   Next, the update program data 142 is input to a predetermined hash function ((B) in FIG. 3), and the hash value of the update program data 142 is obtained ((C) in FIG. 3). Thereafter, the obtained hash value is encrypted with a secret key ((D) in FIG. 3), and a digital signature 143 is generated ((E) in FIG. 3). The generated digital signature 143 is expressed in the predetermined format.

その後、更新先の情報等を含むヘッダー141が上記所定のフォーマットで生成され(図3の(F))、生成されたヘッダー141、更新プログラムデータ142、及びデジタル署名143が合わせられて更新データ14が生成される(図3の(G))。かかる更新データ14の生成は、ホストコンピューター1あるいは他のコンピューターに備えられる更新データ生成プログラムを用いて行うことができる。   Thereafter, the header 141 including the update destination information and the like is generated in the predetermined format ((F) in FIG. 3), and the generated header 141, the update program data 142, and the digital signature 143 are combined and the update data 14 Is generated ((G) in FIG. 3). The generation of the update data 14 can be performed by using an update data generation program provided in the host computer 1 or another computer.

生成された更新データ14は、上述の通り、プリンター2のメインCPU24により正当性の判断がなされる。メインCPU24は、受信した更新データ14に含まれる更新プログラムデータ142を読み出す(図3の(H))。メインCPU24は、更新データ14を生成した際の上記ハッシュ関数を記憶しており、そのハッシュ関数に読み出した更新プログラムデータ142を入力してハッシュ値を求める(図3の(J))。   The generated update data 14 is validated by the main CPU 24 of the printer 2 as described above. The main CPU 24 reads the update program data 142 included in the received update data 14 ((H) in FIG. 3). The main CPU 24 stores the hash function when the update data 14 is generated, and obtains a hash value by inputting the read update program data 142 to the hash function ((J) in FIG. 3).

また、メインCPU24は、受信した更新データ14に含まれるデジタル署名143を読み出す(図3の(I))。メインCPU24は、更新データ14を生成した際に用いた秘密鍵に対応する公開鍵を記憶しており、その公開鍵を用いて読み出したデジタル署名143を復号化し、ハッシュ値を得る(図3の(K))。   Further, the main CPU 24 reads out the digital signature 143 included in the received update data 14 ((I) in FIG. 3). The main CPU 24 stores a public key corresponding to the secret key used when generating the update data 14, and decrypts the digital signature 143 read using the public key to obtain a hash value (FIG. 3). (K)).

その後、メインCPU24は、図3の(J)により求めたハッシュ値と、図3の(K)により求めたハッシュ値を照合(比較)し(図3の(L))、両者が一致すれば、受信した更新データ14は正当であると判断する。すなわち、更新指示と更新プログラムデータ142自身の正当性を認める。   After that, the main CPU 24 collates (compares) the hash value obtained by (J) in FIG. 3 with the hash value obtained by (K) in FIG. 3 ((L) in FIG. 3). The received update data 14 is determined to be valid. That is, the update instruction and the validity of the update program data 142 itself are recognized.

一方、両者が一致していない場合には、メインCPU24は、受信した更新データ14は正当でないと判断する。この場合には、更新プログラムデータ142が改ざんされた虞がある。また、上述した公開鍵による復号化(図3の(K))ができない場合には、メインCPU24は、受信した更新データ14は正当でないと判断する。この場合には、更新指示が正当な指示者からのもでないことが疑われる。   On the other hand, if the two do not match, the main CPU 24 determines that the received update data 14 is not valid. In this case, there is a possibility that the update program data 142 has been tampered with. If the decryption using the public key described above ((K) in FIG. 3) cannot be performed, the main CPU 24 determines that the received update data 14 is not valid. In this case, it is suspected that the update instruction is not from a valid instructor.

なお、以上説明したデジタル署名方式以外の方法で正当性判断の処理を行ってもよい。   The validity determination process may be performed by a method other than the digital signature method described above.

以上説明したように、本実施の形態例に係るプログラム更新システム100では、プリンター2に送信されるサブCPU用の更新データ14が正当性判断情報(デジタル署名143)を含み、更新処理を行う前に、メインCPU24が正当性判断情報を用いて更新データ14の正当性を判断するので、正当性が確保されるべき装置のサブCPU用のプログラム更新を、通信を用いて適正に行うことができる。従って、ユーザー及びベンダーの利便性向上と、プログラム更新にかかるコストの削減を図ることができる。   As described above, in the program update system 100 according to the present embodiment, the update data 14 for the sub CPU transmitted to the printer 2 includes the validity determination information (digital signature 143) and before the update process is performed. In addition, since the main CPU 24 determines the validity of the update data 14 using the validity determination information, the program update for the sub CPU of the device whose validity should be ensured can be appropriately performed using communication. . Therefore, it is possible to improve the convenience for users and vendors and reduce the cost for program update.

また、正当性の判断には、更新プログラムのデータ自体を用いるので、更新プログラムの改ざん等の不正を有効に防止することができる。   In addition, since the update program data itself is used to determine the validity, fraud such as falsification of the update program can be effectively prevented.

なお、本発明はプリンター以外の電子機器に適用することができる。   The present invention can be applied to electronic devices other than printers.

本発明の保護範囲は、上記の実施の形態に限定されず、特許請求の範囲に記載された発明とその均等物に及ぶものである。   The protection scope of the present invention is not limited to the above-described embodiment, but covers the invention described in the claims and equivalents thereof.

1 ホストコンピューター、 2 プリンター、 11 更新部、 12 データ転送部、 13 データ記憶部、 14 更新データ、 21 メイン制御部、 22(22a、22b) サブ制御部、 23 通信部、 24 メインCPU、 25 一時記憶部、 26 メイン記憶部、 27(27a、27b) サブCPU、 28(28a、28b) サブ記憶部、 100 プログラム更新システム、 141 ヘッダー、 142 更新プログラムデータ、 143 デジタル署名   1 host computer, 2 printer, 11 update unit, 12 data transfer unit, 13 data storage unit, 14 update data, 21 main control unit, 22 (22a, 22b) sub control unit, 23 communication unit, 24 main CPU, 25 temporary Storage unit, 26 Main storage unit, 27 (27a, 27b) Sub CPU, 28 (28a, 28b) Sub storage unit, 100 Program update system, 141 Header, 142 Update program data, 143 Digital signature

Claims (7)

外部装置と通信を行う通信部と、
前記通信部を制御する第1CPUと、
前記第1CPUと通信を行う第2CPUと、を備え、
前記第1CPUは、前記通信部が受信した前記第2CPU用のプログラムを更新するための更新データの正当性を確認した後に、前記更新データを用いて前記第2CPU用のプログラムを更新する
ことを特徴とする印刷装置。
A communication unit that communicates with an external device;
A first CPU for controlling the communication unit;
A second CPU that communicates with the first CPU;
The first CPU updates the program for the second CPU using the update data after confirming the validity of the update data for updating the program for the second CPU received by the communication unit. A printing device.
請求項1において、更に、
前記第1CPUが実行するプログラムを記憶する第1記憶部と、
前記第2CPUが実行するプログラムを記憶する第2記憶部と、
前記更新データを一時的に記憶する第3記憶部と、を備える
ことを特徴とする印刷装置。
In claim 1, further comprising:
A first storage unit for storing a program executed by the first CPU;
A second storage unit for storing a program executed by the second CPU;
And a third storage unit for temporarily storing the update data.
請求項2において、
前記第1CPUは、前記通信部が受信した前記更新データを前記第3記憶部に格納し、
前記第1CPUは、前記格納した更新データの正当性を確認後、当該更新データを前記第2CPUに送信し、
前記第2CPUは、前記送信された更新データで前記第2記憶部に記憶されるプログラムを更新する
ことを特徴とする印刷装置。
In claim 2,
The first CPU stores the update data received by the communication unit in the third storage unit,
After confirming the validity of the stored update data, the first CPU transmits the update data to the second CPU,
The printing apparatus, wherein the second CPU updates a program stored in the second storage unit with the transmitted update data.
請求項1乃至3のいずれか一項において、
前記更新データは、更新プログラムデータと正当性判断情報を含み、
前記第1CPUは、前記正当性判断情報に基づいて前記更新プログラムデータの正当性を判断する
ことを特徴とする印刷装置。
In any one of Claims 1 thru | or 3,
The update data includes update program data and validity determination information,
The first CPU determines the validity of the update program data based on the validity determination information.
請求項1乃至4のいずれか一項において、
前記第2CPUは、フィスカルメモリーを制御する
ことを特徴とする印刷装置。
In any one of Claims 1 thru | or 4,
The second CPU controls a fiscal memory.
ホスト装置と印刷装置を有するプログラム更新システムであって、
前記ホスト装置は、
前記印刷装置のプログラムを更新するための更新データを前記印刷装置に送信する更新部を備え、
前記印刷装置は、
前記ホスト装置と通信を行う通信部と、
前記通信部を制御する第1CPUと、
前記第1CPUと通信を行う第2CPUと、を備え、
前記第1CPUは、前記通信部が受信した前記更新データの正当性を確認した後に、前記更新データを用いて前記第2CPU用のプログラムを更新する
ことを特徴とするプログラム更新システム。
A program update system having a host device and a printing device,
The host device is
An update unit for transmitting update data for updating a program of the printing apparatus to the printing apparatus;
The printing apparatus includes:
A communication unit for communicating with the host device;
A first CPU for controlling the communication unit;
A second CPU that communicates with the first CPU;
The first CPU updates the program for the second CPU using the update data after confirming the validity of the update data received by the communication unit.
外部装置と通信を行う通信部と、前記通信部を制御する第1CPUと、前記第1CPUと通信を行う第2CPUと、を備える印刷装置の制御方法であって、
前記第1CPUが、前記通信部で受信した前記第2CPU用のプログラムを更新するための更新データの正当性を確認した後に、前記更新データを用いて前記第2CPU用のプログラムを更新する
ことを特徴とする制御方法。
A printing apparatus control method comprising: a communication unit that communicates with an external device; a first CPU that controls the communication unit; and a second CPU that communicates with the first CPU.
The first CPU updates the program for the second CPU using the update data after confirming the validity of the update data for updating the program for the second CPU received by the communication unit. Control method.
JP2015093911A 2015-05-01 2015-05-01 Printing device, program update system, and control method Pending JP2016212545A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2015093911A JP2016212545A (en) 2015-05-01 2015-05-01 Printing device, program update system, and control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2015093911A JP2016212545A (en) 2015-05-01 2015-05-01 Printing device, program update system, and control method

Publications (1)

Publication Number Publication Date
JP2016212545A true JP2016212545A (en) 2016-12-15

Family

ID=57550039

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2015093911A Pending JP2016212545A (en) 2015-05-01 2015-05-01 Printing device, program update system, and control method

Country Status (1)

Country Link
JP (1) JP2016212545A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109271013A (en) * 2017-07-18 2019-01-25 佳能株式会社 The control method of information processing unit and information processing unit

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109271013A (en) * 2017-07-18 2019-01-25 佳能株式会社 The control method of information processing unit and information processing unit
JP2019018459A (en) * 2017-07-18 2019-02-07 キヤノン株式会社 Information processing device, and control method of information processing device
US11205002B2 (en) 2017-07-18 2021-12-21 Canon Kabushiki Kaisha Information processing apparatus and method for controlling information processing apparatus
CN109271013B (en) * 2017-07-18 2023-08-15 佳能株式会社 Information processing apparatus, control method for information processing apparatus, and computer-readable recording medium

Similar Documents

Publication Publication Date Title
US8289555B2 (en) Print system, recording medium that stores printing program codes and method of printing
JP6882080B2 (en) Image processing equipment, methods, programs and systems
US7681041B2 (en) Image formation apparatus, data reception method, program for performing data reception method, and storage medium for storing program
JP6390123B2 (en) Information processing system and authentication information providing method
JP5729137B2 (en) Information processing apparatus, information management method, and information management program
EP2286346B3 (en) Providing authenticated communications to a replaceable printer component
US10037415B2 (en) Information processing system that authenticates license of application program installed in information processing apparatus, and information processing method
JP5377062B2 (en) Image forming apparatus
JP2016177551A (en) Output device, program, output system, and output method
US20190196801A1 (en) Method and apparatus for application development environment
JP2016212545A (en) Printing device, program update system, and control method
JP6803109B2 (en) Authentication system, its control method and program, and authentication server, its control method and program
JP5217427B2 (en) Print job management apparatus and program
US20230030169A1 (en) Administrator's password resetting
JP2016212608A (en) Printing device, program update system, and control method
JP4513901B2 (en) Data processing method, image processing apparatus, and program
JP2011154513A (en) Computer program, update method for computer program, computer, and recording apparatus
JP6834761B2 (en) Image log storage system, image log storage method, image forming device and program
JP7169193B2 (en) Method and apparatus for security protection in peripheral devices
JP6188469B2 (en) Printing system and control method thereof
JP2001341362A (en) Printer and print control method in print system
US20230308283A1 (en) Blockchain program verifications
EP3606122B1 (en) Information processing method and information processing system
JP5375884B2 (en) Authentication apparatus, authentication method, and computer program
JP5505534B2 (en) Job management apparatus and program