JP6264436B2 - Communication device - Google Patents

Communication device Download PDF

Info

Publication number
JP6264436B2
JP6264436B2 JP2016232589A JP2016232589A JP6264436B2 JP 6264436 B2 JP6264436 B2 JP 6264436B2 JP 2016232589 A JP2016232589 A JP 2016232589A JP 2016232589 A JP2016232589 A JP 2016232589A JP 6264436 B2 JP6264436 B2 JP 6264436B2
Authority
JP
Japan
Prior art keywords
communication
nfc
target data
communication link
external device
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2016232589A
Other languages
Japanese (ja)
Other versions
JP2017085588A (en
Inventor
弘崇 朝倉
弘崇 朝倉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Brother Industries Ltd
Original Assignee
Brother Industries Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Brother Industries Ltd filed Critical Brother Industries Ltd
Priority to JP2016232589A priority Critical patent/JP6264436B2/en
Publication of JP2017085588A publication Critical patent/JP2017085588A/en
Application granted granted Critical
Publication of JP6264436B2 publication Critical patent/JP6264436B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Description

本明細書によって開示される技術は、NFC(Near Field Communicationの略)規格に従った通信方式であるNFC方式で、通信対象の対象データの通信を外部装置と実行する通信装置に関する。   The technology disclosed in this specification relates to a communication device that performs communication of target data to be communicated with an external device in the NFC method, which is a communication method according to the NFC (abbreviation of Near Field Communication) standard.

特許文献1には、2個の通信装置が無線通信を実行するための技術が開示されている。この技術では、2個の通信装置は、NFC方式で通信情報の無線通信を実行する。通信情報は、NFC方式とは異なる通信方式(例えばIEEE802.11a)に従った無線通信を実行するための情報(即ち、通信方式を示す情報、暗号化方式を示す情報)を含む。これにより、2個の通信装置は、NFC方式とは異なる通信方式に従って、無線通信を実行可能になる。   Patent Document 1 discloses a technique for two communication devices to perform wireless communication. In this technique, the two communication apparatuses execute wireless communication of communication information by the NFC method. The communication information includes information for executing wireless communication according to a communication method (for example, IEEE 802.11a) different from the NFC method (that is, information indicating the communication method and information indicating the encryption method). Thus, the two communication devices can execute wireless communication according to a communication method different from the NFC method.

特開2007−166538号公報JP 2007-166538 A

本明細書では、通信装置が、NFC方式で通信対象の対象データを外部装置と適切に通信するための技術を提供する。   The present specification provides a technique for a communication device to appropriately communicate target data to be communicated with an external device using the NFC method.

本明細書によって開示される一つの技術は、NFC(Near Field Communication)規格に従った通信方式であるNFC方式で、通信対象の対象データの通信を外部装置と実行する通信装置であって、
前記NFC方式の通信を実行するためのNFCインターフェースと、
プロセッサと、
プログラムを格納しているメモリと、を備え、
前記プロセッサは、前記メモリに格納されている前記プログラムに従って、以下の各ステップ、即ち、
前記通信装置と前記外部装置との間に第1の通信リンクを確立するための第1の確立コマンドを、前記NFCインターフェースを介して、前記外部装置と通信して、前記第1の通信リンクを確立する第1の確立ステップと、
前記第1の通信リンクを利用して、前記NFCインターフェースを介して、第1の対象データを前記外部装置から受信する受信ステップと、
前記受信ステップが実行された後に、前記第1の通信リンクを切断する第1の切断ステップと、前記第1の通信リンクが切断された後に、前記NFCインターフェースの動作を一時的に停止させる動作制御ステップと、を含む第1のNFC制御ステップと、
前記第1のNFC制御ステップが実行された後に、前記通信装置と前記外部装置との間に第2の通信リンクを確立するための第2の確立コマンドを、前記NFCインターフェースを介して、前記外部装置と通信して、前記第2の通信リンクを確立する第2の確立ステップと、
前記第2の通信リンクを利用して、前記NFCインターフェースを介して、第2の対象データを前記外部装置に送信する送信ステップと、
前記送信ステップが実行された後に、前記第2の通信リンクを切断する第2の切断ステップを含み、前記動作制御ステップを含まない第2のNFC制御ステップと、
を実行する、通信装置である。
また、本明細書によって開示される一つの技術は、NFC(Near Field Communication)規格に従った通信方式であるNFC方式で、通信対象の対象データの通信を外部装置と実行する通信装置であって、
前記NFC方式の通信を実行するためのNFCインターフェースと、
プロセッサと、
プログラムを格納しているメモリと、を備え、
前記プロセッサは、前記メモリに格納されている前記プログラムに従って、以下の各ステップ、即ち、
特定の情報を前記メモリに記憶させる記憶ステップであって、前記特定の情報は、前記外部装置から第1の対象データを受信することに応じて第2の対象データが前記外部装置に送信されるべきであるのか否かを判断するための情報である、前記記憶ステップと、
前記NFCインターフェースを介して、前記外部装置との第1の通信リンクを確立する第1の確立ステップと、
前記第1の通信リンクを利用して、前記NFCインターフェースを介して、第1の対象データを前記外部装置から受信する受信ステップと、
前記第1の対象データを前記外部装置から受信することに応じて、前記特定の情報に基づいて、前記第2の対象データが前記外部装置に送信されるべきであるのか否かを判断する判断ステップと、
前記第2の対象データが前記外部装置に送信されるべきと判断される場合に、第1種の切断手法を利用して、前記第1の通信リンクを切断する第1の切断ステップと、
前記第1種の切断手法を利用して前記第1の通信リンクが切断された後に、前記NFCインターフェースを介して、前記外部装置との第2の通信リンクを確立する第2の確立ステップと、
前記第2の通信リンクを利用して、前記NFCインターフェースを介して、前記第2の対象データを前記外部装置に送信する送信ステップと、
前記第2の対象データが前記外部装置に送信されるべきでないと判断される場合に、前記第1種の切断手法とは異なる第2種の切断手法を利用して、前記第1の通信リンクを切断する第2の切断ステップと、
を実行する、通信装置である。
本明細書によって開示される一つの技術は、NFC(Near Field Communication)規格に従った通信方式であるNFC方式で、通信対象の対象データの通信を外部装置と実行する通信装置である。通信装置は、前記NFC方式の通信を実行するためのNFCインターフェースと、プロセッサと、プログラムを格納しているメモリと、を備える。
前記プロセッサは、前記メモリに格納されている前記プログラムに従って、以下の各ステップ、即ち、
前記通信装置と前記外部装置との間に第1の通信リンクを確立するための第1の確立コマンドを、前記NFCインターフェースを介して、前記外部装置と通信して、前記第1の通信リンクを確立する第1の確立ステップと、
前記第1の通信リンクを利用して、前記NFCインターフェースを介して、第1の対象データを前記外部装置から受信する受信ステップであって、前記第1の対象データは、特定のコマンドと、前記外部装置が前記NFC方式の通信を実行するための通信プログラムに関係する関係情報と、を含む、前記受信ステップと、
前記第1の対象データに含まれる前記特定のコマンドを処理して、第2の対象データを生成する生成ステップと、
前記第1の通信リンクを切断するための複数種の切断手法の中から、前記第1の対象データに含まれる前記関係情報に応じた1種類の切断手法を選択する選択ステップと、
選択済みの前記1種類の切断手法を利用して、前記第1の通信リンクを切断する切断ステップと、
前記第1の通信リンクが切断された後に、前記通信装置と前記外部装置との間に第2の通信リンクを確立するための第2の確立コマンドを、前記NFCインターフェースを介して、前記外部装置と通信して、前記第2の通信リンクを確立する第2の確立ステップと、
前記第2の通信リンクを利用して、前記NFCインターフェースを介して、前記第2の対象データを前記外部装置に送信する送信ステップと、
を実行する。
One technique disclosed in this specification is a communication device that performs communication of target data to be communicated with an external device in the NFC method that is a communication method in accordance with the NFC (Near Field Communication) standard,
An NFC interface for executing the NFC communication;
A processor;
And a memory storing a program,
The processor performs the following steps according to the program stored in the memory:
A first establishment command for establishing a first communication link between the communication device and the external device is communicated with the external device via the NFC interface, and the first communication link is established. A first establishing step to establish;
Receiving the first target data from the external device via the NFC interface using the first communication link;
A first disconnecting step for disconnecting the first communication link after the reception step is executed, and an operation control for temporarily stopping the operation of the NFC interface after the first communication link is disconnected. A first NFC control step comprising:
After the first NFC control step is executed, a second establishment command for establishing a second communication link between the communication device and the external device is sent via the NFC interface to the external device. A second establishing step of communicating with a device to establish the second communication link;
Transmitting the second target data to the external device via the NFC interface using the second communication link;
A second NFC control step including a second disconnection step of disconnecting the second communication link after the transmission step is performed, and not including the operation control step;
Is a communication device.
In addition, one technique disclosed in this specification is a communication device that performs communication of target data to be communicated with an external device in the NFC method, which is a communication method in accordance with the NFC (Near Field Communication) standard. ,
An NFC interface for executing the NFC communication;
A processor;
And a memory storing a program,
The processor performs the following steps according to the program stored in the memory:
A step of storing specific information in the memory, wherein the specific information is transmitted as second target data to the external device in response to receiving the first target data from the external device; The storage step, which is information for determining whether or not
A first establishing step of establishing a first communication link with the external device via the NFC interface;
Receiving the first target data from the external device via the NFC interface using the first communication link;
Judging whether or not the second target data should be transmitted to the external device based on the specific information in response to receiving the first target data from the external device Steps,
A first disconnecting step of disconnecting the first communication link using a first type disconnection method when it is determined that the second target data is to be transmitted to the external device;
A second establishing step of establishing a second communication link with the external device via the NFC interface after the first communication link is disconnected using the first type disconnection method;
Transmitting the second target data to the external device via the NFC interface using the second communication link;
When it is determined that the second target data should not be transmitted to the external device, the first communication link is made using a second type of disconnection method different from the first type of disconnection method. A second cutting step of cutting
Is a communication device.
One technique disclosed in the present specification is a communication device that performs communication of target data to be communicated with an external device in the NFC method, which is a communication method according to the NFC (Near Field Communication) standard. The communication device includes an NFC interface for executing the NFC communication, a processor, and a memory storing a program.
The processor performs the following steps according to the program stored in the memory:
A first establishment command for establishing a first communication link between the communication device and the external device is communicated with the external device via the NFC interface, and the first communication link is established. A first establishing step to establish;
Receiving the first target data from the external device via the NFC interface using the first communication link, wherein the first target data includes a specific command, Relation information related to a communication program for an external device to execute the NFC communication, and the reception step,
Generating the second target data by processing the specific command included in the first target data;
A selection step of selecting one type of disconnection method according to the relationship information included in the first target data from a plurality of types of disconnection methods for disconnecting the first communication link;
A disconnecting step of disconnecting the first communication link using the selected one disconnection method;
After the first communication link is disconnected, a second establishment command for establishing a second communication link between the communication device and the external device is sent via the NFC interface to the external device. Communicating with a second establishing step of establishing the second communication link;
Transmitting the second target data to the external device via the NFC interface using the second communication link;
Execute.

上記の構成によると、通信装置は、第1の通信リンクを利用して、第1の対象データを外部装置から受信した後に、同じ第1の通信リンクを利用して、第2の対象データを通信するのではなく、第1の通信リンクを一旦切断して、第2の通信リンクを新たに確立する。特に、通信装置は、複数種の切断手法の中から、第1の対象データに含まれる関係情報に応じた1種類の切断手法を選択し、選択済みの1種類の切断手法を利用して、第1の通信リンクを切断する。このために、通信装置は、第1の通信リンクを適切に切断して、第2の通信リンクを適切に確立し得る。従って、通信装置は、第2の通信リンクを利用して、第2の対象データを外部装置に適切に送信し得る。   According to the above configuration, the communication device receives the first target data from the external device using the first communication link, and then uses the same first communication link to transmit the second target data. Instead of communicating, the first communication link is temporarily disconnected and a second communication link is newly established. In particular, the communication device selects one type of cutting method according to the relationship information included in the first target data from a plurality of types of cutting methods, and uses the selected one type of cutting method, Disconnect the first communication link. For this purpose, the communication device can appropriately disconnect the first communication link and appropriately establish the second communication link. Therefore, the communication device can appropriately transmit the second target data to the external device using the second communication link.

(1)前記第1の確立コマンドを前記外部装置に送信して、前記第1の通信リンクを確立する場合において、(1−1)前記第1の対象データが、第1の通信プログラムの種類を示す第1の種類情報と、前記第1の通信プログラムの第1のバージョンを示す第1のバージョン情報と、を含む第1の関係情報を含む場合には、前記選択ステップは、第1種の切断手法を選択し、(1−2)前記第1の対象データが、前記第1の種類情報と、前記第1の通信プログラムの第2のバージョンであって、前記第1のバージョンとは異なる前記第2のバージョンを示す第2のバージョン情報と、を含む第2の関係情報を含む場合には、前記選択ステップは、前記第1種の切断手法とは異なる第2種の切断手法を選択してもよい。この構成によると、通信装置は、第1の確立コマンドを外部装置に送信して、第1の通信リンクを確立する場合に、第1又は第2の関係情報に応じた適切な切断手法を選択し得る。   (1) When the first communication command is established by transmitting the first establishment command to the external device, (1-1) the first target data is a type of the first communication program. The first type information indicating the first version information indicating the first version of the first communication program, the selection step includes the first type information. (1-2) The first target data is the first type information and the second version of the first communication program, and the first version is A second type of cutting method different from the first type of cutting method when the second relation information including second version information indicating the different second version is included. You may choose. According to this configuration, when the communication device transmits the first establishment command to the external device to establish the first communication link, the communication device selects an appropriate disconnection method according to the first or second relationship information. Can do.

前記第1種の切断手法は、前記NFCインターフェースの動作を一時的に停止させる手法を含んでいてもよい。前記第2種の切断手法は、前記NFCインターフェースを介して、切断コマンドを前記外部装置に送信して、前記NFCインターフェースを介して、前記切断コマンドに対するレスポンスコマンドを前記外部装置から受信する手法を含んでいてもよい。この構成によると、通信装置は、第1種又は第2種の切断手法を選択する場合に、第1の通信リンクを適切に切断して、第2の通信リンクを適切に確立し得る。   The first type of cutting method may include a method of temporarily stopping the operation of the NFC interface. The second type of disconnection method includes a method of transmitting a disconnect command to the external device via the NFC interface and receiving a response command for the disconnect command from the external device via the NFC interface. You may go out. According to this configuration, when the communication device selects the first type or the second type of disconnection method, the communication device can appropriately disconnect the first communication link and appropriately establish the second communication link.

(1)前記第1の確立コマンドを前記外部装置に送信して、前記第1の通信リンクを確立する場合において、(1−1)前記第1の対象データが、第1の通信プログラムの種類を示す第1の種類情報を含む第1の関係情報を含む場合には、前記選択ステップは、第1種の切断手法を選択し、(1−3)前記第1の対象データが、前記第1の通信プログラムとは異なる第2の通信プログラムの種類を示す第2の種類情報を含む第3の関係情報を含む場合には、前記選択ステップは、前記第1種の切断手法とは異なる第3種の切断手法を選択してもよい。この構成によると、通信装置は、第1の確立コマンドを外部装置に送信して、第1の通信リンクを確立する場合に、第1又は第3の関係情報に応じた適切な切断手法を選択し得る。   (1) When the first communication command is established by transmitting the first establishment command to the external device, (1-1) the first target data is a type of the first communication program. In the case of including the first relation information including the first type information indicating, the selection step selects the first type of cutting method, and (1-3) the first target data is the first type data. When the third relation information including the second type information indicating the type of the second communication program different from the first communication program is included, the selection step is different from the first type cutting method. Three cutting methods may be selected. According to this configuration, when the communication device transmits the first establishment command to the external device and establishes the first communication link, the communication device selects an appropriate disconnection method according to the first or third relationship information. Can do.

前記第1種の切断手法は、前記NFCインターフェースの動作を一時的に停止させる手法を含んでいてもよい。前記第3種の切断手法は、前記NFCインターフェースを介して、前記外部装置に切断コマンドを送信して、前記NFCインターフェースを介して、前記切断コマンドに対するレスポンスコマンドを前記外部装置から受信し、その後、前記NFCインターフェースの動作を一時的に停止させる手法を含んでいてもよい。この構成によると、通信装置は、第1種又は第3種の切断手法を選択する場合に、第1の通信リンクを適切に切断して、第2の通信リンクを適切に確立し得る。   The first type of cutting method may include a method of temporarily stopping the operation of the NFC interface. The third type disconnection method transmits a disconnect command to the external device via the NFC interface, receives a response command for the disconnect command from the external device via the NFC interface, and then A method of temporarily stopping the operation of the NFC interface may be included. According to this configuration, when selecting the first type or the third type of disconnection method, the communication device can appropriately disconnect the first communication link and appropriately establish the second communication link.

(2)前記外部装置から前記第1の確立コマンドを受信して、前記第1の通信リンクを確立する場合において、(2−1)前記第1の対象データが、第1の通信プログラムの種類を示す第1の種類情報と、前記第1の通信プログラムの第1のバージョンを示す第1のバージョン情報と、を含む第1の関係情報を含む場合には、前記選択ステップは、第1種の切断手法を選択し、(2−2)前記第1の対象データが、前記第1の種類情報と、前記第1の通信プログラムの第2のバージョンであって、前記第1のバージョンとは異なる前記第2のバージョンを示す第2のバージョン情報と、を含む第2の関係情報を含む場合には、前記選択ステップは、前記第1種の切断手法とは異なる第4種の切断手法を選択してもよい。この構成によると、通信装置は、第1の確立コマンドを外部装置から受信して、第1の通信リンクを確立する場合に、第1又は第2の関係情報に応じた適切な切断手法を選択し得る。   (2) When receiving the first establishment command from the external device and establishing the first communication link, (2-1) the first target data is the type of the first communication program The first type information indicating the first version information indicating the first version of the first communication program, the selection step includes the first type information. (2-2) The first target data is the first type information and the second version of the first communication program, and the first version is A second type of cutting method different from the first type of cutting method, when the second relation information including second version information indicating the different second version is included. You may choose. According to this configuration, when the communication device receives the first establishment command from the external device and establishes the first communication link, the communication device selects an appropriate disconnection method according to the first or second relationship information. Can do.

第1種の切断手法は、前記NFCインターフェースの動作を、第1の期間に亘って一時的に停止させる手法を含んでいてもよい。第4種の切断手法は、前記NFCインターフェースの動作を、前記第1の期間とは異なる第2の期間に亘って一時的に停止させる手法を含んでいてもよい。この構成によると、通信装置は、第1種又は第4種の切断手法を選択する場合に、第1の通信リンクを適切に切断して、第2の通信リンクを適切に確立し得る。   The first type of disconnection method may include a method of temporarily stopping the operation of the NFC interface over a first period. The fourth type of disconnection method may include a method of temporarily stopping the operation of the NFC interface over a second period different from the first period. According to this configuration, when the first type or the fourth type of disconnection method is selected, the communication device can appropriately disconnect the first communication link and appropriately establish the second communication link.

前記外部装置から前記第1の確立コマンドを受信して、前記第1の通信リンクを確立する場合であり、かつ、前記通信装置が、前記NFC規格のP2Pモードに従って動作すべき場合において、前記第1の対象データが前記第1の関係情報を含む場合には、前記選択ステップは、前記第1種の切断手法を選択し、前記第1の対象データが前記第2の関係情報を含む場合には、前記選択ステップは、前記第4種の切断手法を選択してもよい。前記外部装置から前記第1の確立コマンドを受信して、前記第1の通信リンクを確立する場合であり、かつ、前記通信装置が、前記NFC規格のCard Emulationモードに従って動作すべき特定の場合において、前記第1の対象データが、前記第1の関係情報を含む場合でも、前記第2の関係情報を含む場合でも、前記選択ステップは、第5種の切断手法を選択してもよい。前記第5種の切断手法は、前記NFCインターフェースを介して、切断コマンドを前記外部装置から受信して、前記NFCインターフェースを介して、前記切断コマンドに対するレスポンスコマンドを前記外部装置に送信する手法を含んでいてもよい。この構成によると、通信装置は、第1の確立コマンドを外部装置から受信して、第1の通信リンクが確立する場合に、関係情報と、通信装置が動作すべきモードと、に応じた適切な切断手法を選択し得る。   The first establishment command is received from the external device to establish the first communication link, and the communication device is to operate in accordance with the P2P mode of the NFC standard. When one target data includes the first relation information, the selecting step selects the first type of cutting method, and the first target data includes the second relation information. In the selection step, the fourth type cutting method may be selected. In a specific case where the first establishment command is received by receiving the first establishment command from the external apparatus, and the communication apparatus is to operate in accordance with the card emulation mode of the NFC standard Whether the first target data includes the first relation information or the second relation information, the selection step may select a fifth cutting method. The fifth type of disconnection method includes a method of receiving a disconnect command from the external device via the NFC interface and transmitting a response command to the disconnect command to the external device via the NFC interface. You may go out. According to this configuration, when the communication device receives the first establishment command from the external device and establishes the first communication link, the communication device appropriately selects the relationship information and the mode in which the communication device should operate. A suitable cutting technique can be selected.

前記プロセッサは、前記メモリに格納されている前記プログラムに従って、さらに、前記特定の場合において、前記第5種の切断手法を利用して前記第1の通信リンクが切断された後に、動作制御ステップを実行してもよい。前記動作制御ステップは、前記第1の対象データが前記第1の関係情報を含む場合には、前記NFCインターフェースの動作を、前記第1の期間に亘って一時的に停止させ、前記第1の対象データが前記第2の関係情報を含む場合には、前記NFCインターフェースの動作を、前記第2の期間に亘って一時的に停止させてもよい。この構成によると、通信装置は、第1の通信リンクが切断された後に、第1又は第2の関係情報に応じた期間(即ち第1の期間又は第2の期間)に亘って、NFCインターフェースの動作を停止させる。このために、通信装置は、第1の対象データを通信した後に、外部装置を適切に動作させ得る。   In accordance with the program stored in the memory, the processor further performs an operation control step after the first communication link is disconnected using the fifth type disconnection method in the specific case. May be executed. When the first target data includes the first relationship information, the operation control step temporarily stops the operation of the NFC interface over the first period, and When the target data includes the second relation information, the operation of the NFC interface may be temporarily stopped over the second period. According to this configuration, after the first communication link is disconnected, the communication device has an NFC interface over a period according to the first or second relation information (that is, the first period or the second period). Stop the operation. For this reason, the communication device can appropriately operate the external device after communicating the first target data.

前記メモリは、さらに、前記第1の対象データが前記外部装置から受信された後に、前記第2の対象データが前記外部装置に送信されるべきであるのか否かを示す通信継続情報を格納してもよい。前記プロセッサは、前記メモリに格納されている前記プログラムに従って、さらに、前記通信継続情報を用いて、前記第2の対象データが前記外部装置に送信されるべきであるのか否かを判断する判断ステップを実行してもよい。前記選択ステップは、前記第2の対象データが前記外部装置に送信されるべきと判断される場合には、前記複数種の切断手法の中から、前記第1の対象データに含まれる前記関係情報に応じた前記1種類の切断手法を選択し、前記第2の対象データが前記外部装置に送信されるべきでないと判断される場合には、前記第1の対象データに含まれる前記関係情報に関わらず、予め決められている種類の切断手法を選択してもよい。この構成によると、通信装置は、第2の対象データが外部装置に送信されるべきであるのか否かに応じて、適切な切断手法を選択し得る。   The memory further stores communication continuation information indicating whether or not the second target data should be transmitted to the external device after the first target data is received from the external device. May be. In accordance with the program stored in the memory, the processor further uses the communication continuation information to determine whether the second target data should be transmitted to the external device. May be executed. In the selection step, when it is determined that the second target data should be transmitted to the external device, the relation information included in the first target data from the plurality of types of cutting methods. In the case where it is determined that the second target data should not be transmitted to the external device, the relationship information included in the first target data is included in the relation information. Regardless, a predetermined type of cutting method may be selected. According to this configuration, the communication device can select an appropriate disconnection method depending on whether or not the second target data should be transmitted to the external device.

なお、上記の通信装置を実現するための制御方法、コンピュータプログラム、及び、当該コンピュータプログラムを格納するコンピュータ読取可能記録媒体も、新規で有用である。また、上記の通信装置と外部装置とを含む通信システムも、新規で有用である。   Note that a control method, a computer program, and a computer-readable recording medium storing the computer program for realizing the communication device are also novel and useful. A communication system including the communication device and an external device is also new and useful.

通信システムの構成を示す。1 shows a configuration of a communication system. 切断手法テーブルの一例を示す。An example of the cutting | disconnection technique table is shown. 動作制御テーブルの一例を示す。An example of an operation control table is shown. MFPのListen処理のフローチャートを示す。6 shows a flowchart of MFP listen processing. 図4の続きのフローチャートを示す。FIG. 5 is a flowchart continued from FIG. 4. FIG. MFPのPoll処理のフローチャートを示す。2 shows a flowchart of poll processing of an MFP. 図6の続きのフローチャートを示す。FIG. 7 is a flowchart continued from FIG. 6. FIG. ケースAの通信のシーケンスチャートを示す。The sequence chart of communication of case A is shown. ケースBの通信のシーケンスチャートを示す。The sequence chart of communication of case B is shown. ケースCの通信のシーケンスチャートを示す。The sequence chart of communication of case C is shown. ケースDの通信のシーケンスチャートを示す。The sequence chart of communication of case D is shown. ケースEの通信のシーケンスチャートを示す。A sequence chart of communication in case E is shown.

(通信システム2の構成)
図1に示すように、通信システム2は、多機能機(以下では「MFP(Multi-Function Peripheralの略)」と呼ぶ)10と、携帯端末50と、を備える。MFP10と携帯端末50とは、それぞれ、NFC規格の通信方式(即ちNFC方式)の通信を実行可能である。本実施例では、NFC規格は、ISO/IEC21481又はISO/IEC18092の国際標準規格である。NFC方式の通信は、13.56MHz帯の電波を利用した無線通信である。また、MFP10と携帯端末50とは、それぞれ、NFC方式の通信リンクとは異なる通信ネットワークを利用して、有線通信又は無線通信を実行可能である。
(Configuration of communication system 2)
As shown in FIG. 1, the communication system 2 includes a multi-function device (hereinafter referred to as “MFP (abbreviation of Multi-Function Peripheral)”) 10 and a portable terminal 50. The MFP 10 and the portable terminal 50 can each execute communication in the NFC standard communication method (that is, the NFC method). In this embodiment, the NFC standard is an international standard of ISO / IEC21481 or ISO / IEC18092. NFC communication is wireless communication using radio waves in the 13.56 MHz band. Further, the MFP 10 and the mobile terminal 50 can execute wired communication or wireless communication using a communication network different from the NFC communication link.

(MFP10の構成)
MFP10は、操作部12と、表示部14と、ネットワークインターフェース(以下では、インターフェースのことを「I/F」と記載する)16と、印刷実行部18と、スキャン実行部20と、NFC I/F22と、制御部30と、を備える。
(Configuration of MFP 10)
The MFP 10 includes an operation unit 12, a display unit 14, a network interface (hereinafter referred to as “I / F”) 16, a print execution unit 18, a scan execution unit 20, an NFC I / O. F22 and the control part 30 are provided.

操作部12は、複数のキーを備える。ユーザは、操作部12を操作することによって、様々な指示をMFP10に入力することができる。表示部14は、様々な情報を表示するためのディスプレイである。ネットワークI/F16は、有線ネットワークに接続するためのI/Fであってもよいし、無線ネットワークに接続するためのI/Fであってもよい。なお、この無線ネットワークは、NFC方式の通信とは異なる無線通信を実行するためのネットワークであり、例えば、IEEE(The Institute of Electrical and Electronics Engineers, Inc.の略)の802.11の規格、及び、それに準ずる規格(例えば802.11a,11b,11g,11n等)に従ったネットワークである。印刷実行部18は、インクジェット方式、レーザ方式等の印刷機構である。スキャン実行部20は、CCD、CIS等のスキャン機構である。   The operation unit 12 includes a plurality of keys. The user can input various instructions to the MFP 10 by operating the operation unit 12. The display unit 14 is a display for displaying various information. The network I / F 16 may be an I / F for connecting to a wired network or an I / F for connecting to a wireless network. This wireless network is a network for performing wireless communication different from NFC communication. For example, IEEE (abbreviation of The Institute of Electrical and Electronics Engineers, Inc.) 802.11 standard, and The network conforms to a standard (for example, 802.11a, 11b, 11g, 11n, etc.) according to it. The print execution unit 18 is a printing mechanism such as an inkjet method or a laser method. The scan execution unit 20 is a scan mechanism such as a CCD or CIS.

NFC I/F22は、NFC方式の通信を実行するためのインターフェースである。NFC I/F22は、ネットワークI/F16とは異なるチップによって構成されている。なお、ネットワークI/F16が無線ネットワークに接続するためのI/Fである場合には、ネットワークI/F16とNFC I/F22とは、以下の点で異なる。   The NFC I / F 22 is an interface for executing NFC communication. The NFC I / F 22 is configured by a chip different from the network I / F 16. When the network I / F 16 is an I / F for connecting to a wireless network, the network I / F 16 and the NFC I / F 22 are different in the following points.

即ち、ネットワークI/F16を介した無線通信の通信速度は、NFC I/F22を介した無線通信の通信速度よりも速い。さらに、ネットワークI/F16を介した無線通信における搬送波の周波数は、NFC I/F22を介した無線通信における搬送波の周波数とは異なる。また、MFP10と携帯端末50との距離がおよそ10cm以下である場合に、MFP10は、NFC I/F22を介して、携帯端末50とNFC方式の通信を実行可能である。一方において、MFP10と携帯端末50との距離が、10cm以下である場合でも、10cm以上である場合でも、MFP10は、ネットワークI/F16を介して、携帯端末50と無線通信を実行可能である。即ち、MFP10が、ネットワークI/F16を介して、通信先の機器(例えば携帯端末50)と無線通信を実行可能な最大の距離は、MFP10が、NFC I/F22を介して、通信先の機器と無線通信を実行可能な最大の距離よりも大きい。なお、以下では、ネットワークI/F16を介した無線通信のことを、「ネットワーク無線通信」と呼ぶ。   That is, the communication speed of the wireless communication via the network I / F 16 is faster than the communication speed of the wireless communication via the NFC I / F 22. Furthermore, the frequency of the carrier wave in the wireless communication via the network I / F 16 is different from the frequency of the carrier wave in the wireless communication via the NFC I / F 22. Further, when the distance between the MFP 10 and the portable terminal 50 is approximately 10 cm or less, the MFP 10 can perform NFC communication with the portable terminal 50 via the NFC I / F 22. On the other hand, regardless of whether the distance between the MFP 10 and the portable terminal 50 is 10 cm or less or 10 cm or more, the MFP 10 can execute wireless communication with the portable terminal 50 via the network I / F 16. That is, the maximum distance that the MFP 10 can execute wireless communication with a communication destination device (for example, the portable terminal 50) via the network I / F 16 is the maximum distance that the MFP 10 can communicate with via the NFC I / F 22. And greater than the maximum distance that can perform wireless communication. Hereinafter, wireless communication via the network I / F 16 is referred to as “network wireless communication”.

制御部30は、CPU32とメモリ34とを備える。CPU32は、メモリ34に格納されているプログラム36,38に従って、様々な処理を実行する。メモリ34は、ROM、RAM、ハードディスク等によって構成される。メモリ34は、CPU32によって実行される上記のプログラム36,38を格納する。   The control unit 30 includes a CPU 32 and a memory 34. The CPU 32 executes various processes according to programs 36 and 38 stored in the memory 34. The memory 34 includes a ROM, a RAM, a hard disk, and the like. The memory 34 stores the programs 36 and 38 executed by the CPU 32.

アプリケーションプログラム36は、CPU32が、OSI参照モデルのアプリケーション層の処理を実行するためのプログラムである。プロトコルスタック38は、CPU32が、OSI参照モデルのアプリケーション層よりも下位層の処理を実行するためのプログラムである。プロトコルスタック38は、P2P(Peer to Peerの略)プログラムと、R/Wプログラムと、CEプログラムと、を含む。P2Pプログラムは、NFC規格のP2Pモードに従った処理を実行するためのプログラムである。R/Wプログラムは、NFC規格のReader/Writerモードに従った処理を実行するためのプログラムである。CEプログラムは、NFC規格のCE(Card Emulationの略)モードに従った処理を実行するためのプログラムである。これらのプログラムは、NFCフォーラムによって定められたNFC規格に準拠した処理を実行するためのプログラムである。   The application program 36 is a program for the CPU 32 to execute processing of the application layer of the OSI reference model. The protocol stack 38 is a program for the CPU 32 to execute processing in a layer lower than the application layer of the OSI reference model. The protocol stack 38 includes a P2P (Peer to Peer) program, an R / W program, and a CE program. The P2P program is a program for executing processing according to the NFC standard P2P mode. The R / W program is a program for executing processing according to the NFC standard Reader / Writer mode. The CE program is a program for executing processing according to the NFC standard CE (abbreviation for Card Emulation) mode. These programs are programs for executing processing compliant with the NFC standard defined by the NFC Forum.

メモリ34は、さらに、送信フラグと、継続フラグと、コマンドテーブル40と、切断手法テーブル42と、動作制御テーブル44と、を格納する。   The memory 34 further stores a transmission flag, a continuation flag, a command table 40, a cutting method table 42, and an operation control table 44.

送信フラグは、MFP10が、NFC方式の通信を利用して、通信対象の対象データを送信すべきか否かを示すフラグである。即ち、MFP10が対象データを送信すべき状況では、送信フラグは「1」に設定される。また、MFP10が対象データを送信すべきでない状況では、送信フラグは「0」に設定される。   The transmission flag is a flag indicating whether the MFP 10 should transmit the target data to be communicated using NFC communication. That is, in a situation where the MFP 10 should transmit the target data, the transmission flag is set to “1”. In a situation where the MFP 10 should not transmit the target data, the transmission flag is set to “0”.

継続フラグは、対象データの通信(送信又は受信)を継続して実行すべき状況であるのか否かを示すフラグである。後で詳しく述べるが、MFP10と携帯端末50との間では、1個以上の対象データの通信が順次実行される。例えば、携帯端末50からMFP10に第1の対象データが送信された後に、MFP10から携帯端末50に第2の対象データが送信されて、一連の通信が終了することがあり得る。この例において、第1の対象データの通信が実行された段階では、第2の対象データの通信を継続して実行すべき状況であるために、継続フラグは「1」に設定される。また、第2の対象データの通信が実行された段階では、対象データの通信を継続して実行すべきでない状況、即ち、全ての対象データの通信が終了した状況であるために、継続フラグは「0」に設定される。   The continuation flag is a flag indicating whether or not the communication (transmission or reception) of the target data is to be executed continuously. As will be described in detail later, communication of one or more target data is sequentially executed between the MFP 10 and the portable terminal 50. For example, after the first target data is transmitted from the portable terminal 50 to the MFP 10, the second target data is transmitted from the MFP 10 to the portable terminal 50, and a series of communications may end. In this example, at the stage where the communication of the first target data is executed, the continuation flag is set to “1” because the communication of the second target data should be continued. In addition, at the stage where the communication of the second target data is executed, the continuation flag is set because the communication of the target data should not be continued, that is, the communication of all the target data is finished. Set to “0”.

コマンドテーブル40は、MFP10がNFC方式の通信を利用して送信又は受信すべき各対象データに含まれ得る各コマンドを示す。例えば、パターンAに示されるように、MFP10は、A1コマンド(より正確に記載すると、A1コマンドを含む1個の対象データ)を受信する場合に、A2コマンドを送信し、次いで、A3コマンドを受信し、次いで、A4コマンドを送信する。このようなコマンドテーブル40がメモリ24に記憶されているために、制御部30は、例えば、A1コマンドを含む1個の対象データを受信した際に、A2コマンドを含む1個の対象データを送信すべき状況であることを知ることができる。また、制御部30は、例えば、A4コマンドを含む1個の対象データを送信した際に、A4コマンドが最後のコマンドであること、即ち、複数個の対象データの一連の通信が終了したこと、を知ることができる。   The command table 40 indicates each command that can be included in each target data that the MFP 10 should transmit or receive using NFC communication. For example, as shown in pattern A, when the MFP 10 receives an A1 command (more precisely, one target data including the A1 command), the MFP 10 transmits an A2 command and then receives an A3 command. Then, an A4 command is transmitted. Since such a command table 40 is stored in the memory 24, for example, when the control unit 30 receives one target data including an A1 command, the control unit 30 transmits one target data including an A2 command. You can know that the situation should be. For example, when the control unit 30 transmits one target data including an A4 command, the A4 command is the last command, that is, a series of communication of a plurality of target data is completed. Can know.

なお、本実施例では、複数個の対象データの一連の通信において、MFP10が、最初の対象データを送信することはなく、最初の対象データを受信することを前提としている。従って、コマンドテーブル40では、MFP10が最初のコマンド(即ちA1、B1)を受信する旨が記述されている。   In the present embodiment, it is assumed that the MFP 10 does not transmit the first target data but receives the first target data in a series of communication of a plurality of target data. Accordingly, the command table 40 describes that the MFP 10 receives the first command (that is, A1, B1).

(切断手法テーブル42の内容;図2)
図2に示されるように、切断手法テーブル42は、「状況」と、「OS情報」と、「モード」と、「切断手法」と、が対応付けられているテーブルである。詳しくは後述するが、MFP10は、切断手法テーブル42を参照して、NFC方式の通信リンクを切断するための切断手法を選択する(図4のS38等参照)。
(Contents of cutting method table 42; FIG. 2)
As illustrated in FIG. 2, the cutting method table 42 is a table in which “situation”, “OS information”, “mode”, and “cutting method” are associated with each other. As will be described in detail later, the MFP 10 refers to the disconnection method table 42 and selects a disconnection method for disconnecting the NFC communication link (see S38 in FIG. 4).

「状況」は、NFC方式の通信リンクを切断すべき状況を意味し、Poll継続、Listen継続、Poll終了、及び、Listen終了に分類される。Poll継続は、後述のPoll機器であるMFP10が、対象データの通信を実行した際に、次の対象データの通信を継続して実行すべき状況を意味する。Listen継続は、後述のListen機器であるMFP10が、対象データの通信を実行した際に、次の対象データの通信を継続して実行すべき状況を意味する。Poll終了は、Poll機器であるMFP10が、対象データの通信を実行した際に、次の対象データの通信を継続して実行すべきでない状況を意味する。Listen終了は、Listen機器であるMFP10が、対象データの通信を実行した際に、次の対象データの通信を継続して実行すべきでない状況を意味する。   The “situation” means a situation in which the NFC communication link should be disconnected, and is classified into poll continuation, listen continuation, poll end, and listen end. The “Poll continuation” means a situation in which, when the MFP 10, which is a Poll device described later, executes communication of target data, the communication of the next target data should be continued. “Listen continuation” refers to a situation in which when the MFP 10, which will be described later, performs communication of target data, communication of the next target data should be continued. The end of the poll means a situation where the MFP 10 that is a poll device should not continue to execute communication of the next target data when the communication of the target data is executed. “Listen end” means a situation in which when the MFP 10 which is a Listen device executes communication of target data, communication of the next target data should not be continued.

「OS情報」は、OS(Operating Systemの略)プログラムの種類を示す種類情報と、OSプログラムのバージョンを示すバージョン情報と、の組合せである。種類情報T1は、例えば、Android(登録商標)であり、種類情報T2は、例えば、Windows8(登録商標)である。また、バージョン情報V1,V2は、種類情報T1によって特定されるOSプログラム(例えばAndroid(登録商標))のバージョン情報である。バージョン情報V1は、バージョン情報V2よりも新しいバージョンである。例えば、バージョン情報V1は、Android(登録商標)のバージョン4.0.0及びそれよりも新しいバージョンであり、バージョン情報V2は、Android(登録商標)のバージョン2.3.4である。また、バージョン情報V3は、種類情報T2によって特定されるOSプログラム(例えばWindows8(登録商標))のバージョン情報である。バージョン情報V3は、例えば、Windows8(登録商標)のバージョンSP1である。なお、「OS情報」の欄に記述されている「any」は、いずれのOS情報でもよいこと、即ち、OS情報に依存せずに切断手法が選択されること、を意味する。   “OS information” is a combination of type information indicating the type of an OS (Operating System) program and version information indicating the version of the OS program. The type information T1 is, for example, Android (registered trademark), and the type information T2 is, for example, Windows 8 (registered trademark). The version information V1 and V2 is version information of the OS program (for example, Android (registered trademark)) specified by the type information T1. The version information V1 is a newer version than the version information V2. For example, the version information V1 is Android (registered trademark) version 4.0.0 and a newer version, and the version information V2 is Android (registered trademark) version 2.3.4. The version information V3 is version information of an OS program (for example, Windows 8 (registered trademark)) specified by the type information T2. The version information V3 is, for example, the version SP1 of Windows 8 (registered trademark). Note that “any” described in the “OS information” column means that any OS information may be used, that is, the disconnection method is selected without depending on the OS information.

「モード」は、NFC規格で利用されるモードを意味し、P2Pモード、Readerモード、Writerモード、及び、CEモードに分類される。なお、以下では、NFC方式の通信を実行可能な機器(MFP10、携帯端末50等)のことを「NFC機器」と呼ぶ。また、以下では、Readerモード及びWriterモードを合わせて、「R/Wモード」と簡単に記載することがある。   “Mode” means a mode used in the NFC standard, and is classified into a P2P mode, a Reader mode, a Writer mode, and a CE mode. In the following, devices (MFP 10, portable terminal 50, etc.) capable of executing NFC communication are referred to as “NFC devices”. Hereinafter, the reader mode and the writer mode may be simply described as “R / W mode”.

NFC機器の中には、P2Pモード、R/Wモード、及び、CEモードの3つのモードの全てを利用可能な機器も存在するし、上記の3つのモードのうちの1つ又は2つのモードのみを利用可能な機器も存在する。本実施例では、MFP10は、上記の3つのモードの全てを利用可能な機器である。ただし、携帯端末50は、上記の3つのモードの全てを利用可能な機器であってもよいし、上記の3つのモードのうち、R/Wモード及びCEモードの2つのモードのみを利用可能であってもよい。   Some NFC devices can use all three modes of P2P mode, R / W mode, and CE mode, and only one or two of the above three modes can be used. There are also devices that can be used. In this embodiment, the MFP 10 is a device that can use all of the above three modes. However, the portable terminal 50 may be a device that can use all of the above three modes, and can use only two modes of the R / W mode and the CE mode among the above three modes. There may be.

P2Pモードは、一対のNFC機器の間で双方向通信を実行するためのモードである。
例えば、第1のNFC機器と第2のNFC機器との両方が、P2Pモードに従って動作する状況を想定する。この場合、第1のNFC機器と第2のNFC機器との間で、P2Pモードに従った通信を実行するための通信リンクが確立される。例えば、第1のNFC機器は、通信リンクを利用して、第1の対象データを第2のNFC機器に送信する。その後、第2のNFC機器は、通常、同じ通信リンクを利用して、第2の対象データを第1のNFC機器に送信する。これにより、双方向通信が実現される。NFCフォーラムによって定められるISO/IEC 1443のTypeAであるNFC機器、及び、ISO/IEC 18092のTypeFであるNFC機器は、P2Pモードに従って動作することができるが、ISO/IEC 1443のTypeBであるNFC機器は、P2Pモードに従って動作することができない。
The P2P mode is a mode for executing bidirectional communication between a pair of NFC devices.
For example, assume a situation where both the first NFC device and the second NFC device operate according to the P2P mode. In this case, a communication link for executing communication according to the P2P mode is established between the first NFC device and the second NFC device. For example, the first NFC device transmits the first target data to the second NFC device using the communication link. Thereafter, the second NFC device normally transmits the second target data to the first NFC device using the same communication link. Thereby, bidirectional communication is realized. An NFC device that is Type A of ISO / IEC 1443 and an NFC device that is Type F of ISO / IEC 18092 defined by the NFC Forum can operate according to the P2P mode, but an NFC device that is Type B of ISO / IEC 1443 Cannot operate according to the P2P mode.

R/Wモード及びCEモードは、一対のNFC機器の間で単方向通信を実行するためのモードである。CEモードは、NFC機器がNFCフォーラムによって定められた形式である「カード」として動作するためのモードである。TypeAのNFC機器と、TypeFのNFC機器と、TypeBのNFC機器と、のいずれも、CEモードに従って動作することができる。Readerモードは、CEモードでカードとして動作するNFC機器からデータを読み出すためのモードである。Writerモードは、CEモードでカードとして動作するNFC機器にデータを書き込むためのモードである。なお、Readerモードでは、NFC規格のカードからデータを読み出すこともできる。また、Writerモードでは、NFC規格のカードにデータを書き込むこともできる。   The R / W mode and the CE mode are modes for executing unidirectional communication between a pair of NFC devices. The CE mode is a mode for the NFC device to operate as a “card” that is a format defined by the NFC forum. Any of the Type A NFC device, the Type F NFC device, and the Type B NFC device can operate according to the CE mode. The Reader mode is a mode for reading data from an NFC device operating as a card in the CE mode. The writer mode is a mode for writing data to an NFC device operating as a card in the CE mode. In the Reader mode, data can also be read from an NFC standard card. In the writer mode, data can also be written to an NFC standard card.

例えば、第1のNFC機器がReaderモードに従って動作し、第2のNFC機器がCEモードに従って動作する状況を想定する。この場合、第1のNFC機器と第2のNFC機器との間で、Readerモード及びCEモードに従った通信を実行するための通信リンクが確立される。第1のNFC機器は、第2のNFC機器内の擬似的なカードから対象データを読み出すための動作を実行することによって、当該対象データを第2のNFC機器から受信することができる。   For example, a situation is assumed in which the first NFC device operates according to the Reader mode and the second NFC device operates according to the CE mode. In this case, a communication link for executing communication according to the Reader mode and the CE mode is established between the first NFC device and the second NFC device. The first NFC device can receive the target data from the second NFC device by executing an operation for reading the target data from the pseudo card in the second NFC device.

また、例えば、第1のNFC機器がWriterモードに従って動作し、第2のNFC機器がCEモードに従って動作する状況を想定する。この場合、第1のNFC機器と第2のNFC機器との間で、Writerモード及びCEモードに従った通信を実行するための通信リンクが確立される。第1のNFC機器は、第2のNFC機器内の擬似的なカードに対象データを書き込むための動作を実行することによって、当該対象データを第2のNFC機器に送信することができる。   Further, for example, a situation is assumed in which the first NFC device operates in accordance with the writer mode and the second NFC device operates in accordance with the CE mode. In this case, a communication link for executing communication according to the writer mode and the CE mode is established between the first NFC device and the second NFC device. The first NFC device can transmit the target data to the second NFC device by executing an operation for writing the target data to a pseudo card in the second NFC device.

上述したように、一対のNFC機器がNFC方式の通信を実行するためには、様々なモードの組合せが考えられる。例えば、MFP10及び携帯端末50のモードの組合せとして、以下の5つのパターン、即ち、「P2Pモード、P2Pモード」、「Readerモード、CEモード」、「Writerモード、CEモード」、「CEモード、Readerモード」、「CEモード、Writerモード」が考えられる。   As described above, in order for a pair of NFC devices to perform NFC communication, various mode combinations are possible. For example, as combinations of modes of the MFP 10 and the portable terminal 50, the following five patterns are used: “P2P mode, P2P mode”, “Reader mode, CE mode”, “Writer mode, CE mode”, “CE mode, Reader "Mode", "CE mode, Writer mode" can be considered.

「切断手法」は、NFC方式の通信リンクを切断するための手法を意味し、第1のハード切断、第2のハード切断、第1のソフト切断、第2のソフト切断、及び、ソフト+ハード切断に分類される。なお、切断手法テーブル42において、切断手法が記述されていない欄は、通常あり得ない「状況」及び「モード」の組合せに対応する欄である。例えば、後述のPoll機器がCEモードに従って動作することはあり得ないために、「Poll継続」又は「Poll終了」と、「CE」と、に対応する各欄には、切断手法が記述されていない。   “Disconnection method” means a method for disconnecting an NFC communication link, and includes a first hard disconnection, a second hard disconnection, a first soft disconnection, a second soft disconnection, and a soft + hardware. Classified as cutting. In the cutting method table 42, the column in which the cutting method is not described is a column corresponding to a combination of “situation” and “mode” that is not normally possible. For example, since a Poll device described later cannot operate according to the CE mode, a cutting method is described in each column corresponding to “Poll continuation” or “Poll end” and “CE”. Absent.

第1のハード切断は、NFC I/F22の動作を200msに亘って停止させることによって、通信リンクを切断するための手法である。具体的に言うと、第1のハード切断では、例えば、制御部30は、NFC I/F22の動作を停止させるための停止指示を、NFC I/F22に送信する。これにより、NFC I/F22は、外部からの信号の受信、外部への信号の送信、後述のPoll動作、後述のListen動作等を含む全ての動作を一時的に停止する。制御部30は、200msの待機期間を経た後に、NFC I/F22の動作を再開させるための再開指示を、NFC I/F22に送信する。これにより、NFC I/F22は、動作を再開する。この結果、NFC I/F22の動作を200msに亘って停止させることができる。動作を再開したNFC I/F22は、後述のPoll動作及びListen動作を実行可能な状態に戻る。   The first hard disconnection is a method for disconnecting the communication link by stopping the operation of the NFC I / F 22 for 200 ms. Specifically, in the first hard disconnection, for example, the control unit 30 transmits a stop instruction for stopping the operation of the NFC I / F 22 to the NFC I / F 22. Thereby, the NFC I / F 22 temporarily stops all operations including reception of signals from the outside, transmission of signals to the outside, a poll operation described later, a listen operation described later, and the like. The control unit 30 transmits a restart instruction for restarting the operation of the NFC I / F 22 to the NFC I / F 22 after a standby period of 200 ms. As a result, the NFC I / F 22 resumes operation. As a result, the operation of the NFC I / F 22 can be stopped for 200 ms. The NFC I / F 22 that has resumed the operation returns to a state in which a Poll operation and a Listen operation described later can be performed.

なお、第1のハード切断は、上記のように、停止指示及び再開指示をNFC I/F22に送信する手法に限られない。例えば、制御部30は、NFC I/F22への電力供給を200msに亘って停止させてもよい。本手法でも、NFC I/F22の動作を200msに亘って停止させることができる。後述の第2のハード切断、ソフト+ハード切断、第1のハード制御(図3参照)、及び、第2のハード制御(図3参照)のいずれも、停止指示及び再開指示をNFC I/F22に送信する手法であってもよいし、NFC I/F22への電力供給を停止させる手法であってもよい。   Note that the first hard disconnection is not limited to the method of transmitting the stop instruction and the restart instruction to the NFC I / F 22 as described above. For example, the control unit 30 may stop the power supply to the NFC I / F 22 for 200 ms. Even in this method, the operation of the NFC I / F 22 can be stopped for 200 ms. Any of the second hard disconnection, soft + hard disconnection, first hardware control (see FIG. 3), and second hardware control (see FIG. 3), which will be described later, sends a stop instruction and a restart instruction to the NFC I / F 22. May be used, or may be a method of stopping the power supply to the NFC I / F 22.

第2のハード切断は、NFC I/F22の動作を300msに亘って停止させることによって、通信リンクを切断するための手法である。NFC I/F22の動作を停止させる期間(300ms)が、第1のハード切断(200ms)とは異なる点を除くと、第2のハード切断は、第1のハード切断と同様である。   The second hard disconnection is a method for disconnecting the communication link by stopping the operation of the NFC I / F 22 for 300 ms. The second hard disconnection is the same as the first hard disconnection except that the period (300 ms) during which the operation of the NFC I / F 22 is stopped is different from the first hard disconnection (200 ms).

第1のソフト切断は、通信リンクを切断するためのコマンドであるDeactivationコマンドを送信して、OKコマンドを受信することによって、通信リンクを切断するための手法である。また、第2のソフト切断は、Deactivationコマンドを受信して、OKコマンドを送信することによって、通信リンクを切断するための手法である。また、ソフト+ハード切断は、Deactivationコマンドを送信して、OKコマンドを受信し、その後、NFC I/F22の動作を10msに亘って停止させることによって、通信リンクを切断するための手法である。   The first soft disconnection is a technique for disconnecting a communication link by transmitting a Deactivation command that is a command for disconnecting the communication link and receiving an OK command. The second soft disconnection is a technique for disconnecting a communication link by receiving a Deactivation command and transmitting an OK command. Soft + hardware disconnection is a technique for disconnecting a communication link by transmitting a Deactivation command, receiving an OK command, and then stopping the operation of the NFC I / F 22 for 10 ms.

第1のソフト切断及び第2のソフト切断は、NFCフォーラムによって定義されている一般的な切断手法である。従って、一般的なNFC機器は、通常、第1のソフト切断及び第2のソフト切断を利用して、通信リンクを切断する。これに対し、第1のハード切断、第2のハード切断、及び、ソフト+ハード切断は、一般的な切断手法ではなく、本実施例のMFP10に特有の切断手法である。詳しくは後述するが、MFP10は、切断手法テーブル42を参照して、複数種の切断手法(本実施例では5種の切断手法)の中から、「状況」と「OS情報」と「モード」とに応じた切断手法を選択して、通信リンクを切断する。「状況」等に応じて選択される切断手法が変わる理由については、後で詳しく説明する(図8〜図12の具体的なケースで説明する)。   The first soft cutting and the second soft cutting are general cutting methods defined by the NFC Forum. Therefore, a general NFC device normally disconnects the communication link by using the first soft disconnection and the second soft disconnection. In contrast, the first hard cutting, the second hard cutting, and the soft + hard cutting are not general cutting methods, but are cutting methods specific to the MFP 10 of the present embodiment. As will be described in detail later, the MFP 10 refers to the cutting method table 42 and selects “situation”, “OS information”, and “mode” from a plurality of cutting methods (in this embodiment, five cutting methods). The communication link is disconnected by selecting a disconnection method according to the above. The reason why the selected cutting method changes according to the “situation” and the like will be described later in detail (described in the specific cases of FIGS. 8 to 12).

(動作制御テーブル44の内容;図3)
図3に示されるように、動作制御テーブル44は、「状況」と、「OS情報」と、「モード」と、「動作制御手法」と、が対応付けられているテーブルである。「状況」、「OS情報」、及び、「モード」は、上記のとおりである。「動作制御手法」は、通信リンクが切断された後に、NFC I/F22の動作を制御するための手法を意味し、第1のハード制御、及び、第2のハード制御に分類される。なお、動作制御テーブル44において、動作制御手法が記述されていない欄は、通信リンクが切断された後に、NFC I/F22の動作の制御が実行されないことを意味する。
(Contents of operation control table 44; FIG. 3)
As illustrated in FIG. 3, the operation control table 44 is a table in which “situation”, “OS information”, “mode”, and “operation control method” are associated with each other. The “situation”, “OS information”, and “mode” are as described above. The “operation control method” means a method for controlling the operation of the NFC I / F 22 after the communication link is disconnected, and is classified into a first hardware control and a second hardware control. In the operation control table 44, a column in which no operation control method is described means that the operation control of the NFC I / F 22 is not executed after the communication link is disconnected.

第1のハード制御は、図2の第1のハード切断と同様に、NFC I/F22の動作を200msに亘って停止させることによって、NFC I/F22の動作を制御する手法である。第2のハード制御は、図2の第2のハード切断と同様に、NFC I/F22の動作を300msに亘って停止させることによって、NFC I/F22の動作を制御する手法である。   The first hardware control is a method of controlling the operation of the NFC I / F 22 by stopping the operation of the NFC I / F 22 for 200 ms, similarly to the first hard disconnection in FIG. The second hardware control is a method of controlling the operation of the NFC I / F 22 by stopping the operation of the NFC I / F 22 for 300 ms, similarly to the second hard disconnection in FIG.

一般的なNFC機器は、通常、第1及び第2のハード制御を実行しない。即ち、第1及び第2のハード制御は、本実施例のMFP10に特有の手法である。第1及び第2のハード制御を実行する理由については、後で詳しく説明する(図5、図7のフローチャートで説明する)。   A general NFC device normally does not execute the first and second hardware controls. That is, the first and second hardware controls are methods unique to the MFP 10 of the present embodiment. The reason why the first and second hardware controls are executed will be described later in detail (described in the flowcharts of FIGS. 5 and 7).

(携帯端末50の構成)
携帯端末50は、例えば、携帯電話(例えばスマートフォン)、PDA、ノートPC、タブレットPC、携帯型音楽再生装置、携帯型動画再生装置等の可搬型の端末である。携帯端末50は、無線ネットワークに接続するためのネットワークI/Fと、NFC I/Fと、を備える。従って、携帯端末50は、ネットワークI/Fを介して、MFP10と無線通信を実行可能であると共に、NFC I/Fを利用して、MFP10と無線通信を実行可能である。
(Configuration of mobile terminal 50)
The portable terminal 50 is a portable terminal such as a mobile phone (for example, a smartphone), a PDA, a notebook PC, a tablet PC, a portable music playback device, a portable video playback device, and the like. The portable terminal 50 includes a network I / F for connecting to a wireless network and an NFC I / F. Therefore, the portable terminal 50 can execute wireless communication with the MFP 10 via the network I / F and can execute wireless communication with the MFP 10 using the NFC I / F.

携帯端末50は、MFP10に様々な機能(例えば、印刷機能、スキャン機能等)を実行させるためのアプリケーションプログラム(以下では「MFP用アプリケーション」と呼ぶ)を備える。なお、MFP用アプリケーションは、例えば、MFP10のベンダによって提供されるサーバから携帯端末50にインストールされてもよいし、MFP10と共に出荷されるメディアから携帯端末50にインストールされてもよい。   The portable terminal 50 includes an application program (hereinafter referred to as “MFP application”) for causing the MFP 10 to execute various functions (for example, a print function, a scan function, etc.). Note that the MFP application may be installed on the portable terminal 50 from a server provided by the vendor of the MFP 10 or may be installed on the portable terminal 50 from a medium shipped with the MFP 10.

(通信対象の対象データ)
続いて、MFP10と携帯端末50との間で実行されるNFC方式の通信の対象である対象データの一例を以下に列挙する。
(Target data for communication)
Next, an example of target data that is a target of NFC communication executed between the MFP 10 and the portable terminal 50 is listed below.

(第1の例)
MFP10が、携帯端末50から印刷データを受信して、当該印刷データに従った印刷機能を実行すべき状況を想定する。携帯端末50のユーザは、携帯端末50のMFP用アプリケーションを起動させて、MFP10に印刷機能を実行させるための指示を携帯端末50に入力する。この場合、携帯端末50は、NFC方式の通信を利用して、印刷実行コマンドを含む第1の対象データをMFP10に送信する。なお、第1の対象データは、印刷データを含まない。
(First example)
Assume a situation in which the MFP 10 receives print data from the portable terminal 50 and should execute a print function according to the print data. The user of the portable terminal 50 activates the MFP application of the portable terminal 50 and inputs an instruction for causing the MFP 10 to execute the printing function to the portable terminal 50. In this case, the portable terminal 50 transmits the first target data including the print execution command to the MFP 10 using NFC communication. Note that the first target data does not include print data.

MFP10は、携帯端末50から、NFC I/F22を介して、第1の対象データを受信する。上述したように、NFC方式の通信の通信速度は、ネットワーク無線通信の通信速度よりも遅い。このために、仮に、携帯端末50からMFP10への印刷データの通信としてNFC方式の通信が利用されると、印刷データの通信に長時間を要する可能性がある。従って、本例では、MFP10が、ネットワーク無線通信を利用して、携帯端末50から印刷データを受信する構成を採用する。このような構成を採用するためには、携帯端末50は、MFP10とネットワーク無線通信を実行するための無線設定を知る必要がある。従って、MFP10は、携帯端末50から印刷実行コマンドを含む第1の対象データを受信する場合に、NFC I/F22を介して、無線設定と、当該無線設定を利用することを携帯端末50に指示する指示コマンドと、を含む第2の対象データを携帯端末50に送信する。   The MFP 10 receives the first target data from the portable terminal 50 via the NFC I / F 22. As described above, the communication speed of NFC communication is slower than the communication speed of network wireless communication. For this reason, if NFC communication is used as communication of print data from the portable terminal 50 to the MFP 10, it may take a long time for communication of print data. Therefore, in this example, a configuration is adopted in which the MFP 10 receives print data from the portable terminal 50 using network wireless communication. In order to employ such a configuration, the portable terminal 50 needs to know the wireless setting for executing network wireless communication with the MFP 10. Accordingly, when the MFP 10 receives the first target data including the print execution command from the portable terminal 50, the MFP 10 instructs the portable terminal 50 to use the wireless setting and the wireless setting via the NFC I / F 22. The second target data including the instruction command to be transmitted is transmitted to the portable terminal 50.

これにより、MFP10及び携帯端末50は、NFC方式の通信に代えて、ネットワーク無線通信を実行して、印刷データを通信することができる。従って、MFP10は、印刷機能を実行することができる。   Accordingly, the MFP 10 and the portable terminal 50 can communicate print data by executing network wireless communication instead of NFC communication. Therefore, the MFP 10 can execute the printing function.

(第2の例)
MFP10が、スキャンを実行してスキャンデータを生成して、当該スキャンデータを携帯端末50に送信するスキャン機能を実行すべき状況を想定する。携帯端末50のユーザは、携帯端末50のMFP用アプリケーションを起動させて、MFP10にスキャン機能を実行させるための指示を携帯端末50に入力する。この場合、携帯端末50は、NFC方式の通信を利用して、スキャン実行コマンドを含む第1の対象データをMFP10に送信する。
(Second example)
Assume a situation in which the MFP 10 executes a scan, generates scan data, and executes a scan function of transmitting the scan data to the portable terminal 50. The user of the portable terminal 50 activates the MFP application of the portable terminal 50 and inputs an instruction for causing the MFP 10 to execute the scan function to the portable terminal 50. In this case, the portable terminal 50 transmits the first target data including the scan execution command to the MFP 10 using NFC communication.

MFP10は、携帯端末50から、NFC I/F22を介して、第1の対象データを受信する。仮に、MFP10から携帯端末50へのスキャンデータの通信としてNFC方式の通信が利用されると、スキャンデータの通信に長時間を要する可能性がある。このために、本例では、MFP10が、ネットワーク無線通信を利用して、スキャンデータを携帯端末50に送信する構成を採用する。従って、MFP10は、携帯端末50からスキャン実行コマンドを含む第1の対象データを受信する場合に、NFC I/F22を介して、無線設定と、当該無線設定を利用することを携帯端末50に指示する指示コマンドと、を含む第2の対象データを携帯端末50に送信する。   The MFP 10 receives the first target data from the portable terminal 50 via the NFC I / F 22. If NFC communication is used as scan data communication from the MFP 10 to the portable terminal 50, the scan data communication may take a long time. Therefore, in this example, a configuration is employed in which the MFP 10 transmits scan data to the portable terminal 50 using network wireless communication. Therefore, when the MFP 10 receives the first target data including the scan execution command from the portable terminal 50, the MFP 10 instructs the portable terminal 50 to use the wireless setting and the wireless setting via the NFC I / F 22. The second target data including the instruction command to be transmitted is transmitted to the portable terminal 50.

これにより、MFP10及び携帯端末50は、NFC方式の通信に代えて、ネットワーク無線通信を実行して、スキャンデータを通信することができる。従って、MFP10は、スキャン機能を実行することができる。   Thereby, the MFP 10 and the portable terminal 50 can communicate scan data by executing network wireless communication instead of NFC communication. Therefore, the MFP 10 can execute the scan function.

(第3の例)
携帯端末50が、MFP10が利用すべき設定情報を、MFP10に送信すべき状況を想定する。上記の設定情報として、例えば、MFP10が印刷機能を実行するための印刷設定情報(例えば、印刷解像度、用紙サイズ等)、MFP10がスキャン機能を実行するためのスキャン設定情報(例えば、スキャン解像度等)、MFP10が通信機能を実行するための通信設定情報(例えば、IPアドレス、サブネットマスク、ゲートウェイアドレス等)を挙げることができる。
(Third example)
A situation is assumed in which the portable terminal 50 should transmit setting information to be used by the MFP 10 to the MFP 10. As the setting information, for example, print setting information (for example, print resolution, paper size, etc.) for the MFP 10 to execute the print function, scan setting information (for example, scan resolution, etc.) for the MFP 10 to execute the scan function, etc. Communication setting information (for example, IP address, subnet mask, gateway address, etc.) for the MFP 10 to execute a communication function can be listed.

携帯端末50のユーザは、携帯端末50のMFP用アプリケーションを起動させて、MFP10が利用すべき設定情報を携帯端末50に入力する。この場合、携帯端末50は、NFC方式の通信を利用して、設定情報と、設定情報をMFP10に設定させるための設定コマンドと、を含む第1の対象データをMFP10に送信する。   The user of the portable terminal 50 activates the MFP application of the portable terminal 50 and inputs setting information to be used by the MFP 10 to the portable terminal 50. In this case, the portable terminal 50 transmits the first target data including setting information and a setting command for causing the MFP 10 to set the setting information to the MFP 10 using NFC communication.

MFP10は、携帯端末50から、NFC I/F22を介して、第1の対象データを受信する。MFP10は、第1の対象データに含まれる設定情報を、MFP10が利用すべき設定情報として、メモリ34に格納する。これにより、MFP10は、設定情報を利用して、様々な機能を実行することができる。MFP10は、携帯端末50から第1の対象データを受信する場合に、第1の対象データを受信したことを示す応答コマンドを含む第2の対象データを、NFC I/F22を介して、携帯端末50に送信する。   The MFP 10 receives the first target data from the portable terminal 50 via the NFC I / F 22. The MFP 10 stores the setting information included in the first target data in the memory 34 as setting information to be used by the MFP 10. Thereby, the MFP 10 can execute various functions using the setting information. When the MFP 10 receives the first target data from the mobile terminal 50, the MFP 10 transmits the second target data including a response command indicating that the first target data has been received via the NFC I / F 22. 50.

(第4の例)
携帯端末50が、携帯端末50で現在利用されているアドレス帳に含まれるアドレス情報を、MFP10に送信すべき状況を想定する。携帯端末50のユーザは、携帯端末50のMFP用アプリケーションを起動させて、アドレス情報をMFP10に送信するための指示を携帯端末50に入力する。この場合、携帯端末50は、NFC方式の通信を利用して、アドレス情報と、アドレス情報をMFP10に設定させるための設定コマンドと、を含む第1の対象データをMFP10に送信する。
(Fourth example)
Assume a situation in which the mobile terminal 50 should transmit address information included in the address book currently used by the mobile terminal 50 to the MFP 10. The user of the portable terminal 50 activates the MFP application of the portable terminal 50 and inputs an instruction for transmitting address information to the MFP 10 to the portable terminal 50. In this case, the portable terminal 50 transmits the first target data including the address information and a setting command for causing the MFP 10 to set the address information to the MFP 10 using NFC communication.

MFP10は、携帯端末50から、NFC I/F22を介して、第1の対象データを受信する。MFP10は、第1の対象データに含まれるアドレス情報を、MFP10で現在利用されているアドレス帳(即ちメモリ34内のアドレス帳)に追加する。これにより、MFP10は、アドレス情報を利用して、通信機能を実行することができる。MFP10は、携帯端末50から第1の対象データを受信する場合に、第1の対象データを受信したことを示す応答コマンドを含む第2の対象データを、NFC I/F22を介して、携帯端末50に送信する。   The MFP 10 receives the first target data from the portable terminal 50 via the NFC I / F 22. The MFP 10 adds the address information included in the first target data to the address book currently used by the MFP 10 (that is, the address book in the memory 34). Thereby, the MFP 10 can execute the communication function using the address information. When the MFP 10 receives the first target data from the mobile terminal 50, the MFP 10 transmits the second target data including a response command indicating that the first target data has been received via the NFC I / F 22. 50.

(第5の例)
上記の第1の例では、MFP10が、ネットワーク無線通信を利用して、印刷データを携帯端末50に送信する構成を採用している。これに代えて、例えば、MFP10は、携帯端末50から、NFC I/F22を介して、印刷データと、印刷実行コマンドと、を含む第1の対象データを受信してもよい。この場合、MFP10は、第1の対象データを受信したことを示す応答コマンドを含む第2の対象データを、NFC I/F22を介して、携帯端末50に送信してもよい。
(Fifth example)
In the first example described above, a configuration is employed in which the MFP 10 transmits print data to the portable terminal 50 using network wireless communication. Instead of this, for example, the MFP 10 may receive first target data including print data and a print execution command from the mobile terminal 50 via the NFC I / F 22. In this case, the MFP 10 may transmit second target data including a response command indicating that the first target data has been received to the portable terminal 50 via the NFC I / F 22.

対象データの様々な例を説明したが、「第1の対象データ」と「第2の対象データ」の組合せは、上記の第1〜第5の例に限られず、他の組合せであってもよい。即ち、「第1の対象データ」は、MFP10がNFC方式の通信を利用して受信するデータであれば、どのような種類のデータであってもよく、「第2の対象データ」は、第1の対象データに含まれるコマンドを処理することによって生成されるデータ(即ち、第1の対象データとは異なるデータ)であれば、どのような種類のデータであってもよい。   Although various examples of the target data have been described, the combination of the “first target data” and the “second target data” is not limited to the above first to fifth examples, and other combinations may be used. Good. That is, the “first target data” may be any type of data as long as the MFP 10 receives data using NFC communication, and the “second target data” Any type of data may be used as long as it is data generated by processing a command included in one target data (that is, data different from the first target data).

なお、上記の第1〜第5の例では、MFP10が、第1の対象データを受信して、第2の対象データを送信すれば、複数個の対象データの一連の通信が終了する。従って、上記の第1〜第5の例では、例えば、図1のコマンドテーブル40内のパターンBに示されるように、第1の対象データに含まれるコマンドが「B1コマンド」に対応し、第2の対象データに含まれるコマンドが「B2コマンド」に対応し、それらの2個のコマンドの通信が終了すると、複数個の対象データの一連の通信が終了する。   In the first to fifth examples, when the MFP 10 receives the first target data and transmits the second target data, a series of communication of the plurality of target data is completed. Therefore, in the above first to fifth examples, for example, as shown in the pattern B in the command table 40 of FIG. 1, the command included in the first target data corresponds to the “B1 command”. When the command included in the two target data corresponds to the “B2 command” and communication of these two commands is completed, a series of communication of the plurality of target data is completed.

ただし、図1のコマンドテーブル40内のパターンAに示されるように、3個以上の対象データが通信されることがあり得る。例えば、上記の第3の例において、MFP10は、(1)設定情報のうちの一部の情報と、設定コマンド(例えば「A1コマンド」)と、を含む第1の対象データを携帯端末50から受信し、(2)次いで、応答コマンド(例えば「A2コマンド」)を含む第2の対象データを携帯端末50に送信し、(3)次いで、設定情報のうちの残りの情報と、設定コマンド(例えば「A3コマンド」)と、を含む第3の対象データを携帯端末50から受信し、(4)次いで、応答コマンド(例えば「A4コマンド」)を含む第4の対象データを携帯端末50に送信してもよい。   However, as shown in the pattern A in the command table 40 of FIG. 1, three or more target data may be communicated. For example, in the third example described above, the MFP 10 receives from the portable terminal 50 the first target data including (1) a part of setting information and a setting command (for example, “A1 command”). (2) Next, the second target data including a response command (for example, “A2 command”) is transmitted to the portable terminal 50. (3) Next, the remaining information of the setting information and the setting command ( For example, the third target data including “A3 command”) is received from the portable terminal 50. (4) Next, the fourth target data including the response command (for example, “A4 command”) is transmitted to the portable terminal 50. May be.

(Poll動作及びListen動作)
続いて、NFC機器によって実行されるPoll動作及びListen動作について説明する。例えば、MFP10では、CPU32が、プログラム36,38に従ってPoll動作及びListen動作を実行するのではなく、NFC I/F22が、Poll動作及びListen動作を実行する。Poll動作は、ポーリング信号を送信して、ポーリング信号に対するレスポンス信号を受信する動作である。また、Listen動作は、ポーリング信号を受信して、ポーリング信号に対するレスポンス信号を送信する動作である。
(Poll operation and Listen operation)
Next, the poll operation and listen operation executed by the NFC device will be described. For example, in the MFP 10, the CPU 32 does not execute the poll operation and listen operation according to the programs 36 and 38, but the NFC I / F 22 executes the poll operation and listen operation. The poll operation is an operation for transmitting a polling signal and receiving a response signal for the polling signal. The Listen operation is an operation that receives a polling signal and transmits a response signal to the polling signal.

MFP10のNFC I/F22は、Poll動作を実行するためのPollモードと、Listen動作を実行するためのListenモードと、Poll動作及びListen動作のどちらも実行しないモード(以下では「不実行モード」と呼ぶ)と、のうちのいずれかのモードで動作可能である。NFC I/F22は、Pollモード、Listenモード、及び、不実行モードで、順次動作する。例えば、NFC I/F22は、Pollモードで動作し、次いで、Listenモードで動作し、次いで、不実行モードで動作する、という1セットの動作を実行する。NFC I/F22は、上記の1セットの動作を繰り返し実行する。   The NFC I / F 22 of the MFP 10 performs a poll mode for executing the poll operation, a listen mode for executing the listen operation, a mode in which neither the poll operation nor the listen operation is executed (hereinafter referred to as “non-execution mode”). Can be operated in any one of the modes. The NFC I / F 22 sequentially operates in a poll mode, a listen mode, and a non-execution mode. For example, the NFC I / F 22 performs a set of operations that operate in the poll mode, then operate in the listen mode, and then operate in the non-execution mode. The NFC I / F 22 repeatedly executes the above one set of operations.

Pollモードでは、NFC I/F22は、ポーリング信号を送信して、レスポンス信号を受信することを監視する。具体的に言うと、NFC I/F22は、(1)TypeAのNFC機器が応答可能なポーリング信号(即ちTypeAに対応するポーリング信号)を送信して、レスポンス信号の受信を所定時間監視し、(2)レスポンス信号を受信しなければ、TypeBのNFC機器が応答可能なポーリング信号(即ちTypeBに対応するポーリング信号)を送信して、レスポンス信号の受信を所定時間監視し、(3)レスポンス信号を受信しなければ、TypeFのNFC機器が応答可能なポーリング信号(即ちTypeFに対応するポーリング信号)を送信して、レスポンス信号の受信を所定時間監視する、という動作を繰り返す。NFC I/F22が所定時間内にNFC機器からレスポンス信号を受信する場合には、当該NFC機器は、当該レスポンス信号の送信の直前に受信したポーリング信号に対応するTypeのNFC機器であると言える。NFC I/F22は、レスポンス信号を受信する場合に、さらに、当該レスポンス信号の送信元のNFC機器が、どのモードで動作可能であるのかを問い合わせる問い合わせ信号を、当該NFC機器に送信する。この結果、NFC I/F22は、当該NFC機器から動作可能モード信号を受信する。動作可能モード信号は、当該NFC機器がP2Pモード及びCEモードのどちらでも動作可能であることを示すか、あるいは、当該NFC機器がCEモードのみで動作可能であることを示す。   In the poll mode, the NFC I / F 22 transmits a polling signal and monitors whether a response signal is received. Specifically, the NFC I / F 22 transmits a polling signal (that is, a polling signal corresponding to Type A) that can be responded to by the Type A NFC device, and monitors the reception of the response signal for a predetermined time. 2) If a response signal is not received, a Type B NFC device transmits a polling signal that can be responded (that is, a polling signal corresponding to Type B), monitors reception of the response signal for a predetermined time, and (3) If not received, the operation of transmitting a polling signal (that is, a polling signal corresponding to Type F) that can be answered by the Type F NFC device and monitoring the reception of the response signal for a predetermined time is repeated. When the NFC I / F 22 receives a response signal from the NFC device within a predetermined time, it can be said that the NFC device is a Type NFC device corresponding to the polling signal received immediately before the response signal is transmitted. When the NFC I / F 22 receives a response signal, the NFC I / F 22 further transmits to the NFC device an inquiry signal inquiring in which mode the NFC device that is the transmission source of the response signal can operate. As a result, the NFC I / F 22 receives the operable mode signal from the NFC device. The operable mode signal indicates that the NFC device can operate in either the P2P mode or the CE mode, or indicates that the NFC device can operate only in the CE mode.

Listenモードでは、NFC I/F22は、ポーリング信号を受信することを監視して、ポーリング信号を受信すると、レスポンス信号を送信する。NFC I/F22は、NFC I/F22に対応するTypeのポーリング信号を受信する場合にのみ、ポーリング信号の送信元のNFC機器にレスポンス信号を送信する。NFC I/F22は、当該NFC機器にレスポンス信号を送信する場合に、当該NFC機器から問い合わせ信号を受信して、動作可能モード信号を当該NFC機器に送信する。   In the Listen mode, the NFC I / F 22 monitors reception of a polling signal and transmits a response signal when receiving the polling signal. The NFC I / F 22 transmits a response signal to the NFC device that is the source of the polling signal only when receiving the type polling signal corresponding to the NFC I / F 22. When transmitting a response signal to the NFC device, the NFC I / F 22 receives an inquiry signal from the NFC device and transmits an operable mode signal to the NFC device.

不実行モードでは、NFC I/F22は、ポーリング信号を送信せず、さらに、ポーリング信号を受信しても、レスポンス信号を送信しない。   In the non-execution mode, the NFC I / F 22 does not transmit a polling signal, and does not transmit a response signal even when the polling signal is received.

携帯端末50も、上記の1セットの動作を繰り返し実行する。従って、例えば、MFP10と携帯端末50との間の距離が10cm未満であり、かつ、MFP10のNFC I/F22がPollモードで動作する期間と、携帯端末50がListenモードで動作する期間と、が一致する場合には、NFC I/F22は、ポーリング信号を携帯端末50に送信して、レスポンス信号を携帯端末50から受信するPoll動作を実行する。また、例えば、MFP10と携帯端末50との間の距離が10cm未満であり、NFC I/F22がListenモードで動作する期間と、携帯端末50がPollモードで動作する期間と、が一致すると、NFC I/F22は、ポーリング信号を携帯端末50から受信して、レスポンス信号を携帯端末50に送信するListen動作を実行する。   The portable terminal 50 also repeatedly executes the above one set of operations. Therefore, for example, the distance between the MFP 10 and the portable terminal 50 is less than 10 cm, and the period in which the NFC I / F 22 of the MFP 10 operates in the poll mode and the period in which the portable terminal 50 operates in the listen mode are If they match, the NFC I / F 22 transmits a polling signal to the portable terminal 50 and executes a poll operation for receiving a response signal from the portable terminal 50. For example, if the distance between the MFP 10 and the portable terminal 50 is less than 10 cm and the period during which the NFC I / F 22 operates in the Listen mode and the period during which the portable terminal 50 operates in the Poll mode match, The I / F 22 receives a polling signal from the mobile terminal 50 and executes a Listen operation for transmitting a response signal to the mobile terminal 50.

NFC規格では、Poll動作を実行したNFC機器(以下では「Poll機器」と呼ぶ)は、P2Pモード又はR/Wモードで動作することができるが、CEモードで動作することができない。従って、MFP10がPoll機器である場合には、CPU32は、まず、MFP10がP2Pモード又はR/Wモードで動作すべきことを決定する。また、NFC規格では、Listen動作を実行したNFC機器(以下では「Listen機器」と呼ぶ)は、P2Pモード又はCEモードで動作することができるが、R/Wモードで動作することができない。従って、上述したように、MFP10がPoll機器である場合には、CPU32は、MFP10がP2Pモード又はCEモードで動作すべきことを決定する。   In the NFC standard, an NFC device that has performed a poll operation (hereinafter referred to as a “Poll device”) can operate in the P2P mode or the R / W mode, but cannot operate in the CE mode. Therefore, when the MFP 10 is a poll device, the CPU 32 first determines that the MFP 10 should operate in the P2P mode or the R / W mode. In the NFC standard, an NFC device that has performed the Listen operation (hereinafter referred to as “Listen device”) can operate in the P2P mode or the CE mode, but cannot operate in the R / W mode. Therefore, as described above, when the MFP 10 is a Poll device, the CPU 32 determines that the MFP 10 should operate in the P2P mode or the CE mode.

NFC I/F22がPoll動作を実行する場合には、以降の通信のための各処理は、CPU32に引き継がれる。具体的に言うと、携帯端末50がどのモードの動作を実行可能であるのかを示す情報(即ち、受信済みの動作可能モード信号が示す情報)が、NFC I/F22からCPU32に受け渡される。CPU32は、NFC I/F22から受け渡された情報に基づいて、MFP10がどのモードで動作すべきかを決定する。例えば、MFP10が全てのモードで動作可能であり、かつ、受信済みの動作可能モード信号がP2Pモード及びCEモードで動作可能であることを示す場合には、CPU32は、MFP10がP2Pモードで動作すべきことを決定する。この場合、CPU32は、P2Pモードに対応するActivationコマンドを携帯端末50に送信する(図6のS112)。Activationコマンドは、NFC規格で採用されているコマンドであり、MFP10と携帯端末50との間にNFC方式の通信リンクを確立するためのコマンドである。また、例えば、MFP10が全てのモードで動作可能であり、かつ、受信済みの動作可能モード信号がCEモードのみで動作可能であることを示す場合には、CPU32は、MFP10がR/Wモードで動作すべきことを決定する。この場合、CPU32は、R/Wモードに対応するActivationコマンドを携帯端末50に送信する(図7のS160)。   When the NFC I / F 22 executes the poll operation, each process for subsequent communication is taken over by the CPU 32. Specifically, information indicating which mode of operation the portable terminal 50 can execute (that is, information indicated by the received operable mode signal) is transferred from the NFC I / F 22 to the CPU 32. The CPU 32 determines in which mode the MFP 10 should operate based on the information delivered from the NFC I / F 22. For example, when the MFP 10 is operable in all modes and the received operable mode signal indicates that the MFP 10 can operate in the P2P mode and the CE mode, the CPU 32 operates the MFP 10 in the P2P mode. Decide what to do. In this case, the CPU 32 transmits an activation command corresponding to the P2P mode to the portable terminal 50 (S112 in FIG. 6). The Activation command is a command adopted in the NFC standard, and is a command for establishing an NFC communication link between the MFP 10 and the portable terminal 50. Further, for example, when the MFP 10 is operable in all modes and the received operable mode signal indicates that it is operable only in the CE mode, the CPU 32 determines that the MFP 10 is in the R / W mode. Decide what to do. In this case, the CPU 32 transmits an activation command corresponding to the R / W mode to the portable terminal 50 (S160 in FIG. 7).

また、NFC I/F22がListen動作を実行する場合も、以降の通信のための各処理は、CPU32に引き継がれる。具体的に言うと、CPU32は、携帯端末50が動作すべきモードに対応するActivationコマンドを、携帯端末50から受信する(図4のS10参照)。CPU32は、P2Pモードに対応するActivationコマンドを受信する場合に、MFP10がP2Pモードで動作すべきことを決定し、R/Wモードに対応するActivationコマンドを受信する場合に、MFP10がCEモードで動作すべきことを決定する。   Further, when the NFC I / F 22 executes the Listen operation, each process for subsequent communication is taken over by the CPU 32. Specifically, the CPU 32 receives an activation command corresponding to the mode in which the portable terminal 50 should operate from the portable terminal 50 (see S10 in FIG. 4). When receiving an activation command corresponding to the P2P mode, the CPU 32 determines that the MFP 10 should operate in the P2P mode, and when receiving an activation command corresponding to the R / W mode, the MFP 10 operates in the CE mode. Decide what to do.

上述したように、CPU32は、NFC I/F22がPoll動作又はListen動作を実行すれば、MFP10の近傍に携帯端末50が存在することを知ることができ、さらに、MFP10がどのモードで動作すべきかを知ることができ、その後の通信のための各処理(後述の図4〜図7参照)を実行する。   As described above, when the NFC I / F 22 performs the poll operation or the listen operation, the CPU 32 can know that the portable terminal 50 exists in the vicinity of the MFP 10, and in which mode the MFP 10 should operate. Each process for subsequent communication (see FIGS. 4 to 7 described later) is executed.

(MFP10が実行する処理;図4〜図7)
続いて、図4〜図7を参照して、MFP10が実行する処理について説明する。なお、CPU32は、メモリ34内のプログラム36,38に従って、図4〜図7の各処理を実行する。以下では、まず、NFC I/F22がListen動作を実行した場合(即ちMFP10がListen機器である場合)に、CPU32が実行する処理(図4及び図5;以下では「MFPのListen処理」と呼ぶ)の内容を説明する。次いで、NFC I/F22がPoll動作を実行した場合(即ちMFP10がPoll機器である場合)に、CPU32が実行する処理(図6及び図7;以下では「MFPのPoll処理」と呼ぶ)の内容を説明する。
(Processes executed by the MFP 10; FIGS. 4 to 7)
Next, processing executed by the MFP 10 will be described with reference to FIGS. The CPU 32 executes the processes shown in FIGS. 4 to 7 according to the programs 36 and 38 in the memory 34. In the following, first, when the NFC I / F 22 executes the Listen operation (that is, when the MFP 10 is a Listen device), the process executed by the CPU 32 (FIGS. 4 and 5; hereinafter referred to as “MFP Listen process”). ) Is explained. Next, when the NFC I / F 22 executes the poll operation (that is, when the MFP 10 is a poll device), the contents of the processing executed by the CPU 32 (FIGS. 6 and 7; hereinafter referred to as “MFP poll processing”). Will be explained.

なお、アプリケーションプログラム36は、プロトコルスタック38に従ったListen処理の開始を、プロトコルスタックのAPIを用いてCPU32に指令するコードを含む。CPU32がアプリケーションプログラム36に従って動作している状態では、CPU32は、プロトコルスタック38に従ったListen処理の開始の指令を受ける場合に、プロトコルスタック38に従ったListen処理を開始する。アプリケーションプログラム36は、さらに、プロトコルスタック38に従ったPoll処理の開始を、プロトコルスタック38のAPIを用いてCPU32に指令するコードを含む。CPU32がアプリケーションプログラム36に従って動作している状態では、CPU32は、プロトコルスタック38に従ったPoll処理の開始の指令を受ける場合に、プロトコルスタック38に従ったPoll処理を開始する。   The application program 36 includes a code that instructs the CPU 32 to start the Listen process according to the protocol stack 38 using the API of the protocol stack. In a state where the CPU 32 is operating in accordance with the application program 36, the CPU 32 starts the Listen process according to the protocol stack 38 when receiving an instruction to start the Listen process according to the protocol stack 38. The application program 36 further includes code for instructing the CPU 32 to start poll processing according to the protocol stack 38 using the API of the protocol stack 38. In a state where the CPU 32 is operating according to the application program 36, the CPU 32 starts the poll processing according to the protocol stack 38 when receiving a command for starting the poll processing according to the protocol stack 38.

(MFPのListen処理;図4及び図5)
上述したように、NFC I/F22がListen動作を実行する場合(即ち携帯端末50がPoll動作を実行する場合)には、携帯端末50は、携帯端末50が動作すべきモードに対応するActivationコマンドをMFP10に送信する。S10において、CPU32は、携帯端末50から、NFC I/F22を介して、Activationコマンドを受信する。
(Listen processing of MFP; FIGS. 4 and 5)
As described above, when the NFC I / F 22 performs the Listen operation (that is, when the mobile terminal 50 executes the Poll operation), the mobile terminal 50 activates the activation command corresponding to the mode in which the mobile terminal 50 should operate. Is transmitted to the MFP 10. In S <b> 10, the CPU 32 receives an activation command from the portable terminal 50 via the NFC I / F 22.

次いで、S12において、CPU32は、MFP10が、P2Pモードで動作すべきか、CEモードで動作すべきかを判断する。CPU32は、P2Pモードに対応するActivationコマンドを受信する場合に、MFP10がP2Pモードで動作すべきと判断して(S12でYES)、S14に進む。一方において、CPU32は、R/Wモードに対応するActivationコマンドを受信する場合に、MFP10がCEモードで動作すべきと判断して(S12でNO)、図5のS62に進む。なお、CPU32がCEモードに対応するActivationコマンドを受信することはあり得ない。上述したように、Poll機器(即ち携帯端末50)は、P2Pモード又はR/Wモードで動作することができるが、CEモードで動作することができないからである。   Next, in S12, the CPU 32 determines whether the MFP 10 should operate in the P2P mode or the CE mode. When receiving the activation command corresponding to the P2P mode, the CPU 32 determines that the MFP 10 should operate in the P2P mode (YES in S12), and proceeds to S14. On the other hand, when the CPU 32 receives the activation command corresponding to the R / W mode, the CPU 32 determines that the MFP 10 should operate in the CE mode (NO in S12), and proceeds to S62 in FIG. Note that the CPU 32 cannot receive an activation command corresponding to the CE mode. As described above, the Poll device (that is, the portable terminal 50) can operate in the P2P mode or the R / W mode, but cannot operate in the CE mode.

(MFPのListen処理;P2Pモード)
S14では、CPU32は、Activationコマンドに対するレスポンスコマンド(即ちOKコマンド)を、NFC I/F22を介して、携帯端末50に送信する。これにより、MFP10と携帯端末50との間にNFC方式の通信リンクが確立される。即ち、CPU32は、Activationコマンドを受信して、OKコマンドを送信することによって、通信リンクを適切に確立することができる。
(Listen processing of MFP; P2P mode)
In S <b> 14, the CPU 32 transmits a response command (that is, an OK command) to the activation command to the portable terminal 50 via the NFC I / F 22. As a result, an NFC communication link is established between the MFP 10 and the portable terminal 50. That is, the CPU 32 can appropriately establish a communication link by receiving the activation command and transmitting the OK command.

なお、MFPのListen処理では、MFP10から携帯端末50にActivationコマンドを送信することができない。Poll機器(即ち携帯端末50)はActivationコマンドを送信することができるが、Listen機器(即ちMFP10)はActivationコマンドを送信することができないからである。   In the Listen process of the MFP, the activation command cannot be transmitted from the MFP 10 to the portable terminal 50. This is because the Poll device (that is, the portable terminal 50) can transmit the Activation command, but the Listen device (that is, the MFP 10) cannot transmit the Activation command.

次いで、S16では、CPU32は、確認コマンド応答処理を開始する。確認コマンドは、Poll機器からListen機器に送信されるコマンドであり、通信リンクを維持するための否かを確認するためのコマンドである。上述したように、現時点では、MFP10がListen機器であり、携帯端末50がPoll機器である。従って、確認コマンド応答処理では、CPU32は、携帯端末50から、NFC I/F22を介して、確認コマンドを受信して、確認コマンドに対するレスポンスコマンド(即ちOKコマンド)を、NFC I/F22を介して、携帯端末50に送信する。   Next, in S16, the CPU 32 starts a confirmation command response process. The confirmation command is a command transmitted from the Poll device to the Listen device, and is a command for confirming whether or not to maintain the communication link. As described above, at present, the MFP 10 is a Listen device, and the portable terminal 50 is a Poll device. Accordingly, in the confirmation command response process, the CPU 32 receives the confirmation command from the portable terminal 50 via the NFC I / F 22 and sends a response command (that is, an OK command) to the confirmation command via the NFC I / F 22. To the mobile terminal 50.

なお、フローチャートには示されていないが、CPU32は、S16で確認コマンド応答処理を開始すると、後述のS40が実行されるまで、確認コマンド応答処理を継続して実行する。なお、CPU32は、プロトコルスタック38に従って、S10〜S16の処理を実行する。   Although not shown in the flowchart, when starting the confirmation command response process in S16, the CPU 32 continuously executes the confirmation command response process until S40 described later is executed. The CPU 32 executes the processes of S10 to S16 according to the protocol stack 38.

プロトコルスタック38は、確認コマンドの受信イベントの発生を示すデータの出力を、CPU32に指令するコードを含む。CPU32は、S16で最初の確認コマンドを受信すると、確認コマンドの受信イベントの発生を示すデータを出力する。アプリケーションプログラム36は、確認コマンド受信イベントの発生を示すデータが出力される場合に、S18の実行をCPU32に指令するコードを含む。従って、CPU32は、S16で最初の確認コマンドを受信すると、アプリケーションプログラム36に従って、S18を実行する。   The protocol stack 38 includes code for instructing the CPU 32 to output data indicating the occurrence of a confirmation command reception event. When receiving the first confirmation command in S16, the CPU 32 outputs data indicating the occurrence of the confirmation command reception event. The application program 36 includes a code that instructs the CPU 32 to execute S18 when data indicating the occurrence of the confirmation command reception event is output. Accordingly, when receiving the first confirmation command in S16, the CPU 32 executes S18 in accordance with the application program 36.

S18では、CPU32は、メモリ34内の送信フラグが「1」であるのか否かを判断する。送信フラグは、後述のS28、S36、又は、S37において、「0」又は「1」に設定される。CPU32は、メモリ34内の送信フラグが「1」である場合に、S18でYESと判断して、S30に進む。一方において、CPU32は、メモリ34内の送信フラグが「0」である場合に、S18でNOと判断して、S20に進む。なお、S18でYES又はNOの場合には、CPU32は、SNEP(Simple NDEF Exchange Protocolの略)に従って通信するクライアントとして動作することを示すデータを、プロトコルスタック38のAPIを用いて設定する。NDEFは、NFC Data Exchange Formatの略である。プロトコルスタック38は、APIを用いた設定に従って、クライアントとして動作するためのネゴシエーションを実行することを、CPU32に指令するコードを含む。従って、CPU32は、S18を終えると、プロトコルスタック38に従って、S20又はS30の処理を実行する。   In S <b> 18, the CPU 32 determines whether or not the transmission flag in the memory 34 is “1”. The transmission flag is set to “0” or “1” in S28, S36, or S37 described later. If the transmission flag in the memory 34 is “1”, the CPU 32 determines YES in S18 and proceeds to S30. On the other hand, when the transmission flag in the memory 34 is “0”, the CPU 32 determines NO in S18 and proceeds to S20. If YES or NO in S18, the CPU 32 sets data indicating that it operates as a client communicating according to SNEP (abbreviation of Simple NDEF Exchange Protocol) using the API of the protocol stack 38. NDEF is an abbreviation for NFC Data Exchange Format. The protocol stack 38 includes code for instructing the CPU 32 to execute negotiation for operating as a client in accordance with the setting using the API. Therefore, after finishing S18, the CPU 32 executes the process of S20 or S30 according to the protocol stack 38.

S20では、CPU32は、NFC I/F22を介して、携帯端末50とネゴシエーションを実行する。具体的に言うと、CPU32は、まず、MFP10がSNEPのクライアントとして動作することを決定する。次いで、CPU32は、MFP10がクライアントとして動作し、携帯端末50がSNEPのサーバとして動作するように、SNEPに従った通信を実行する。これにより、携帯端末50は、クライアント(即ちMFP10)からのリクエストに応じて、処理を実行するサーバとして動作する。   In S <b> 20, the CPU 32 performs negotiation with the portable terminal 50 via the NFC I / F 22. Specifically, the CPU 32 first determines that the MFP 10 operates as a SNEP client. Next, the CPU 32 executes communication according to the SNEP so that the MFP 10 operates as a client and the portable terminal 50 operates as a SNEP server. Accordingly, the portable terminal 50 operates as a server that executes processing in response to a request from the client (that is, the MFP 10).

S20では、CPU32は、さらに、MFP10がデータ受信を実行すること(即ち携帯端末50がデータ送信を実行すること)を、携帯端末50に通知する。これにより、携帯端末50は、対象データをMFP10に送信すべきことを知ることができ、対象データをMFP10に送信する。   In S <b> 20, the CPU 32 further notifies the portable terminal 50 that the MFP 10 executes data reception (that is, the portable terminal 50 executes data transmission). Thereby, the portable terminal 50 can know that the target data should be transmitted to the MFP 10, and transmits the target data to the MFP 10.

次いで、S22では、CPU32は、プロトコルスタック38に従って、S14で確立された通信リンクを利用して、携帯端末50から、NFC I/F22を介して、対象データを受信する。S22で受信される対象データは、CPU32によって処理されるべきコマンドを含む。例えば、上記の第1、第2、又は、第5の例では、S22で受信される第1の対象データは、印刷実行コマンド又はスキャン実行コマンドを含み、上記の第3又は第4の例では、S22で受信される第1の対象データは、設定コマンドを含む。また、S22で受信される対象データは、携帯端末50に搭載されているOSプログラムに関係するOS情報を含む。OS情報は、OSプログラムの種類を示す種類情報(例えば「T1」)と、当該OSプログラムのバージョンを示すバージョン情報(例えば「V1」)と、を含む。   Next, in S22, the CPU 32 receives the target data from the portable terminal 50 via the NFC I / F 22 using the communication link established in S14 according to the protocol stack 38. The target data received in S22 includes a command to be processed by the CPU 32. For example, in the first, second, or fifth example, the first target data received in S22 includes a print execution command or a scan execution command. In the third or fourth example, The first target data received in S22 includes a setting command. Further, the target data received in S22 includes OS information related to the OS program installed in the portable terminal 50. The OS information includes type information (for example, “T1”) indicating the type of the OS program and version information (for example, “V1”) indicating the version of the OS program.

プロトコルスタック38は、対象データの受信イベントの発生を示すデータの出力を、CPU32に指令するコードを含む。CPU32は、S22で対象データを受信すると、対象データの受信イベントの発生を示すデータを出力する。アプリケーションプログラム36は、対象データの受信イベントの発生を示すデータが、プロトコルスタック38から出力される場合に、S24の実行をCPU32に指令するコードを含む。従って、CPU32は、S22で対象データを受信すると、アプリケーションプログラム36に従って、S24を実行する。   The protocol stack 38 includes code for instructing the CPU 32 to output data indicating the occurrence of the reception event of the target data. When receiving the target data in S22, the CPU 32 outputs data indicating the occurrence of the target data reception event. The application program 36 includes code for instructing the CPU 32 to execute S24 when data indicating the occurrence of the reception event of the target data is output from the protocol stack 38. Accordingly, when receiving the target data in S22, the CPU 32 executes S24 according to the application program 36.

S24では、CPU32は、アプリケーションプログラム36に従って、S22で受信された対象データを処理する。例えば、上記の第1又は第2の例では、CPU32は、S22で受信された第1の対象データに含まれる印刷実行コマンド又はスキャン実行コマンドに従って、無線設定と、当該無線設定を利用することを携帯端末50に指示する指示コマンドと、を含む第2の対象データを生成する。また、例えば、上記の第3の例では、CPU32は、S22で受信された第1の対象にデータに含まれる設定コマンドに従って、第1の対象データに含まれる設定情報をメモリ34に記憶させ、設定情報を受信したことを示す応答コマンドを含む第2の対象データを生成する。また、例えば、上記の第4の例では、CPU32は、S22で受信された第1の対象データに含まれる設定コマンドに従って、第1の対象データに含まれるアドレス情報をメモリ34内のアドレス帳に追加し、アドレス情報を受信したことを示す応答コマンドを含む第2の対象データを生成する。また、例えば、上記の第5の例では、CPU32は、S22で受信された第1の対象データに含まれる印刷実行コマンドに従って、第1の対象データに含まれる印刷データを用いた印刷機能を実行し、印刷データを受信したことを示す応答コマンドを含む第2の対象データを生成する。   In S24, the CPU 32 processes the target data received in S22 according to the application program 36. For example, in the first or second example described above, the CPU 32 uses the wireless setting and the wireless setting according to the print execution command or the scan execution command included in the first target data received in S22. Second target data including an instruction command for instructing the portable terminal 50 is generated. Further, for example, in the third example, the CPU 32 stores the setting information included in the first target data in the memory 34 in accordance with the setting command included in the data in the first target received in S22. Second target data including a response command indicating that the setting information has been received is generated. Further, for example, in the above fourth example, the CPU 32 stores the address information included in the first target data in the address book in the memory 34 in accordance with the setting command included in the first target data received in S22. In addition, second target data including a response command indicating that the address information has been received is generated. Further, for example, in the fifth example, the CPU 32 executes a print function using the print data included in the first target data in accordance with the print execution command included in the first target data received in S22. Then, second target data including a response command indicating that the print data has been received is generated.

次いで、S26では、CPU32は、アプリケーションプログラム36に従って、メモリ34内のコマンドテーブル40を参照して、S22で受信された対象データに含まれるコマンドが、最後のコマンドであるのか否かを判断する。例えば、S22で受信された対象データに含まれるコマンドが、コマンドテーブル40内の「A1コマンド」、「B1コマンド」、又は、「B3コマンド」である場合には、「A2コマンド」等の通信が継続して実行されるべきであるために、CPU32は、最後のコマンドでないと判断して(S26でNO)、S28に進む。   Next, in S26, the CPU 32 refers to the command table 40 in the memory 34 according to the application program 36, and determines whether or not the command included in the target data received in S22 is the last command. For example, when the command included in the target data received in S22 is “A1 command”, “B1 command”, or “B3 command” in the command table 40, communication such as “A2 command” is performed. Since it should be continuously executed, the CPU 32 determines that it is not the last command (NO in S26), and proceeds to S28.

S28では、CPU32は、アプリケーションプログラム36に従って、メモリ34内の送信フラグを「1」に設定し、メモリ34内の継続フラグを「1」に設定する。送信フラグが「1」に設定されるために、次の通信リンクが確立された場合に、CPU32は、対象データを携帯端末50に送信することができる。また、継続フラグが「1」に設定されるために、後述のS38において、CPU32は、MFP10の現在の状況が「Listen継続」であることを知ることができる。S28を終えると、S38に進む。   In S28, according to the application program 36, the CPU 32 sets the transmission flag in the memory 34 to “1” and sets the continuation flag in the memory 34 to “1”. Since the transmission flag is set to “1”, the CPU 32 can transmit the target data to the portable terminal 50 when the next communication link is established. Further, since the continuation flag is set to “1”, in S38 described later, the CPU 32 can know that the current status of the MFP 10 is “Listen continuation”. When S28 ends, the process proceeds to S38.

一方において、CPU32は、最後のコマンドであると判断する場合(S26でYES)に、S37に進む。S37では、CPU32は、アプリケーションプログラム36に従って、メモリ34内の送信フラグを「0」に設定し、メモリ34内の継続フラグを「0」に設定する。送信フラグが「0」に設定されるために、次の通信リンクが確立された場合に、CPU32は、対象データを携帯端末50から受信することができる。また、継続フラグが「0」に設定されるために、後述のS38において、CPU32は、MFP10の現在の状況が「Listen終了」であることを知ることができる。S37を終えると、S38に進む。   On the other hand, if the CPU 32 determines that it is the last command (YES in S26), it proceeds to S37. In S37, the CPU 32 sets the transmission flag in the memory 34 to “0” and sets the continuation flag in the memory 34 to “0” according to the application program 36. Since the transmission flag is set to “0”, the CPU 32 can receive the target data from the portable terminal 50 when the next communication link is established. Further, since the continuation flag is set to “0”, in S38 described later, the CPU 32 can know that the current status of the MFP 10 is “Listen end”. When S37 ends, the process proceeds to S38.

S18でYESの場合(即ち送信フラグが「1」である場合)には、S30において、CPU32は、プロトコルスタック38に従って、S20と同様に、MFP10がP2Pモードのクライアントとして動作し、携帯端末50がP2Pモードのサーバとして動作するように、ネゴシエーションを実行する。S30では、CPU32は、さらに、MFP10がデータ送信を実行すること(即ち携帯端末50がデータ受信を実行すること)を、携帯端末50に通知する。これにより、携帯端末50は、MFP10から対象データを受信するまで待機する。   If YES in S18 (that is, if the transmission flag is “1”), in S30, the CPU 32 operates as a client in the P2P mode according to the protocol stack 38, as in S20, and the portable terminal 50 is Negotiation is performed to operate as a server in P2P mode. In S <b> 30, the CPU 32 further notifies the portable terminal 50 that the MFP 10 executes data transmission (that is, the portable terminal 50 executes data reception). Thereby, the portable terminal 50 stands by until the target data is received from the MFP 10.

次いで、S32において、CPU32は、アプリケーションプログラム36に従って、プロトコルスタック38のAPIを用いて、S14で確立された通信リンクを利用して、NFC I/F22を介して、携帯端末50に対象データを送信する。例えば、上記の第1〜第5の例では、CPU32は、例えば、前回のMFPのListen処理のS24、又は、前回のMFPのPoll処理(図6)のS124において、第1の対象データに含まれるコマンドを処理して、第2の対象データを生成する。この場合、S32では、CPU32は、生成済みの第2の対象データを携帯端末50に送信する。   Next, in S32, the CPU 32 transmits the target data to the mobile terminal 50 via the NFC I / F 22 using the communication link established in S14 using the API of the protocol stack 38 according to the application program 36. To do. For example, in the above first to fifth examples, the CPU 32 is included in the first target data in S24 of the previous MFP listen process or S124 of the previous MFP poll process (FIG. 6), for example. The second target data is generated by processing the command. In this case, in S <b> 32, the CPU 32 transmits the generated second target data to the portable terminal 50.

次いで、S34では、CPU32は、アプリケーションプログラム36に従って、メモリ34内のコマンドテーブル40を参照して、S32で送信された対象データに含まれるコマンドが、最後のコマンドであるのか否かを判断する。例えば、S32で送信された対象データに含まれるコマンドが、コマンドテーブル40内の「A2コマンド」である場合には、「A3コマンド」等の通信が継続して実行されるべきであるために、CPU32は、最後のコマンドでないと判断して(S34でNO)、S36に進む。S36では、CPU32は、アプリケーションプログラム36に従って、メモリ34内の送信フラグを「0」に設定し、メモリ34内の継続フラグを「1」に設定する。S36を終えると、S38に進む。   Next, in S34, the CPU 32 refers to the command table 40 in the memory 34 according to the application program 36, and determines whether or not the command included in the target data transmitted in S32 is the last command. For example, when the command included in the target data transmitted in S32 is “A2 command” in the command table 40, communication such as “A3 command” should be continuously executed. The CPU 32 determines that it is not the last command (NO in S34), and proceeds to S36. In S36, according to the application program 36, the CPU 32 sets the transmission flag in the memory 34 to “0” and sets the continuation flag in the memory 34 to “1”. When S36 ends, the process proceeds to S38.

一方において、例えば、S32で送信された対象データに含まれるコマンドが、コマンドテーブル40内の「B2コマンド」である場合には、CPU32は、最後のコマンドであると判断して(S34でYES)、S37に進む。S37では、CPU32は、アプリケーションプログラム36に従って、メモリ34内の送信フラグを「0」に設定し、メモリ34内の継続フラグを「0」に設定する。S37を終えると、S38に進む。   On the other hand, for example, when the command included in the target data transmitted in S32 is the “B2 command” in the command table 40, the CPU 32 determines that it is the last command (YES in S34). , Go to S37. In S37, the CPU 32 sets the transmission flag in the memory 34 to “0” and sets the continuation flag in the memory 34 to “0” according to the application program 36. When S37 ends, the process proceeds to S38.

S38では、CPU32は、アプリケーションプログラム36に従って、メモリ34内の切断手法テーブル42と、メモリ34内の継続フラグの値と、携帯端末50のOS情報と、を参照して、複数種の切断手法の中から、S14で確立された通信リンクを切断するための切断手法を選択する。S38の時点では、プリンタ10がListen機器であるために、プリンタ10の現在の状況は、「Listen継続」及び「Listen終了」のどちらかである。そして、継続フラグが「1」である場合には、プリンタ10の現在の状況は「Listen継続」であり、継続フラグが「0」である場合には、プリンタ10の現在の状況は「Listen終了」である。また、S38の時点では、プリンタ10のモードは「P2P」である。   In S38, the CPU 32 refers to the disconnection method table 42 in the memory 34, the value of the continuation flag in the memory 34, and the OS information of the portable terminal 50 according to the application program 36, and uses a plurality of disconnection methods. From among them, a disconnection method for disconnecting the communication link established in S14 is selected. Since the printer 10 is a listen device at the time of S38, the current status of the printer 10 is either “listen continuation” or “listen end”. When the continuation flag is “1”, the current status of the printer 10 is “Listen continuation”. When the continuation flag is “0”, the current status of the printer 10 is “Listen end”. It is. At the time of S38, the mode of the printer 10 is “P2P”.

例えば、S22を経てS38が実行される場合には、S22で受信された対象データは、携帯端末50のOS情報を含む。従って、S38では、CPU32は、S22で受信された対象データに含まれる携帯端末50のOS情報を利用して、切断手法を選択する。   For example, when S38 is executed through S22, the target data received in S22 includes the OS information of the portable terminal 50. Therefore, in S38, the CPU 32 selects a cutting method using the OS information of the mobile terminal 50 included in the target data received in S22.

また、例えば、S32を経てS38が実行される場合には、S22が実行されないが、上述したように、本実施例では、複数個の対象データの一連の通信において、MFP10が、最初の対象データを携帯端末50に送信することはなく、最初の対象データを携帯端末50から受信する。従って、S32が実行される場合には、S14で確立された通信リンクの前回の通信リンクが確立された際に、CPU32は、対象データを携帯端末50から受信している。従って、S38では、CPU32は、当該対象データ(即ち、携帯端末50から前回に受信された対象データ)に含まれる携帯端末50のOS情報を利用して、切断手法を選択する。   Further, for example, when S38 is executed via S32, S22 is not executed. However, as described above, in this embodiment, the MFP 10 performs the first target data in a series of communication of a plurality of target data. Is not transmitted to the portable terminal 50, and the first target data is received from the portable terminal 50. Therefore, when S32 is executed, the CPU 32 receives the target data from the portable terminal 50 when the previous communication link of the communication link established in S14 is established. Therefore, in S38, the CPU 32 selects the disconnection method using the OS information of the mobile terminal 50 included in the target data (that is, the target data previously received from the mobile terminal 50).

例えば、プリンタ10の現在の状況が「Listen継続」である場合には、S38では、CPU32は、携帯端末50のOS情報に応じた切断手法を選択する。具体的に言うと、CPU32は、携帯端末50のOS情報が「T1」及び「V1」を含む場合には、第1のハード切断を選択し、携帯端末50のOS情報が「T1」及び「V2」を含む場合には、第2のハード切断を選択し、携帯端末50のOS情報が「T2」及び「V3」を含む場合には、第2のハード切断を選択する(図2参照)。一方において、例えば、プリンタ10の現在の状況が「Listen終了」である場合には、S38では、CPU32は、携帯端末50のOS情報に関わらず(図2の「any」参照)、第2のソフト切断を選択する。   For example, when the current status of the printer 10 is “Listen Continue”, in S38, the CPU 32 selects a cutting method according to the OS information of the portable terminal 50. Specifically, when the OS information of the portable terminal 50 includes “T1” and “V1”, the CPU 32 selects the first hard disconnection, and the OS information of the portable terminal 50 indicates “T1” and “V1”. If it includes “V2”, the second hard disconnection is selected. If the OS information of the portable terminal 50 includes “T2” and “V3”, the second hard disconnection is selected (see FIG. 2). . On the other hand, for example, if the current status of the printer 10 is “Listen end”, in S38, the CPU 32 determines the second regardless of the OS information of the portable terminal 50 (see “any” in FIG. 2). Select soft cutting.

次いで、S40において、CPU32は、S38で選択された切断手法を利用して、S14で確立された通信リンクを切断する。例えば、S38で選択された切断手法が第2のソフト切断である場合には、S40では、CPU32は、まず、アプリケーションプログラム36に従って、プロトコルスタック38のAPIを用いて、S16で開始された確認コマンド応答処理を終了させる。即ち、CPU32は、携帯端末50から確認コマンドを受信しても、確認コマンドに対するレスポンスコマンド(即ちOKコマンド)を携帯端末50に送信しなくなる。これにより、携帯端末50は、MFP10が通信リンクを維持することを望まないことを知ることができ、通信リンクを切断するためのDeactivationコマンドをMFP10に送信する。従って、CPU32は、プロトコルスタック38に従って、携帯端末50から、NFC I/F22を介して、Deactivationコマンドを受信する。この場合、CPU32は、プロトコルスタック38に従って、Deactivationコマンドに対するレスポンスコマンド(即ちOKコマンド)を、NFC I/F22を介して、携帯端末50に送信する。これにより、S14で確立された通信リンクが切断される。   Next, in S40, the CPU 32 disconnects the communication link established in S14 by using the disconnection method selected in S38. For example, if the cutting method selected in S38 is the second soft cutting, in S40, the CPU 32 first uses the API of the protocol stack 38 in accordance with the application program 36, and the confirmation command started in S16. The response process is terminated. That is, even if the CPU 32 receives a confirmation command from the portable terminal 50, the CPU 32 does not transmit a response command (that is, an OK command) to the confirmation command to the portable terminal 50. Thereby, the mobile terminal 50 can know that the MFP 10 does not want to maintain the communication link, and transmits a Deactivation command for disconnecting the communication link to the MFP 10. Therefore, the CPU 32 receives a Deactivation command from the portable terminal 50 via the NFC I / F 22 according to the protocol stack 38. In this case, the CPU 32 transmits a response command (that is, an OK command) to the Deactivation command to the portable terminal 50 via the NFC I / F 22 according to the protocol stack 38. As a result, the communication link established in S14 is disconnected.

なお、MFPのListen処理では、MFP10から携帯端末50にDeactivationコマンドを送信することはできない。Poll機器(即ち携帯端末50)はDeactivationコマンドを送信することができるが、Listen機器(即ちMFP10)はDeactivationコマンドを送信することができないからである。   It should be noted that the Deactivation command cannot be transmitted from the MFP 10 to the portable terminal 50 in the listen process of the MFP. This is because the Poll device (that is, the portable terminal 50) can transmit the Deactivation command, but the Listen device (that is, the MFP 10) cannot transmit the Deactivation command.

また、例えば、S38で選択された切断手法が第1のハード切断である場合には、S40では、CPU32は、NFC I/F22の電源を200msに亘って切断し、再度接続する。これにより、NFC I/F22の動作は、200msに亘って一時的に停止される。また、例えば、S38で選択された切断手法が第2のハード切断である場合には、S40では、CPU32は、NFC I/F22の電源を300msに亘って切断し、再度接続する。これにより、NFC I/F22の動作は、300msに亘って一時的に停止される。この結果、NFC I/F22は、外部からの信号の受信、外部への信号の送信、Poll動作、Listen動作等を含む全ての動作を一時的に停止する。従って、CPU32は、NFC I/F22を介して、S16で開始された確認コマンド応答処理を実行することができなくなる。   For example, when the disconnection method selected in S38 is the first hard disconnection, in S40, the CPU 32 disconnects the power supply of the NFC I / F 22 for 200 ms and reconnects. Thereby, the operation of the NFC I / F 22 is temporarily stopped for 200 ms. For example, when the disconnection method selected in S38 is the second hard disconnection, in S40, the CPU 32 disconnects the power of the NFC I / F 22 for 300 ms and reconnects it. Thereby, the operation of the NFC I / F 22 is temporarily stopped for 300 ms. As a result, the NFC I / F 22 temporarily stops all operations including external signal reception, external signal transmission, poll operation, listen operation, and the like. Therefore, the CPU 32 cannot execute the confirmation command response process started in S16 via the NFC I / F 22.

なお、S38で選択された切断手法が第1又は第2のハード切断である場合に、S40では、CPU32は、上記の停止指示をNFC I/F22に入力して、プロトコルスタック38に従ったCPU32の動作を終了させ、その後、上記の再開指示をNFC I/F22に入力して、プロトコルスタック38に従ったCPU32の動作を再起動させてもよい。この場合も、NFC I/F22の動作(即ち、外部からの信号の受信、外部への信号の送信、Poll動作、Listen動作等を含む全ての動作)を一時的に停止させることができる。   If the disconnection method selected in S38 is the first or second hard disconnection, in S40, the CPU 32 inputs the above stop instruction to the NFC I / F 22, and the CPU 32 conforms to the protocol stack 38. After that, the above restart instruction may be input to the NFC I / F 22 to restart the operation of the CPU 32 according to the protocol stack 38. Also in this case, the operation of the NFC I / F 22 (that is, all operations including reception of signals from the outside, transmission of signals to the outside, poll operation, listen operation, etc.) can be temporarily stopped.

第1又は第2のハード切断が実行されると、第2のソフト切断の場合と同様に、携帯端末50は、確認コマンドに対するレスポンスコマンド(即ちOKコマンド)を受信することができない。この場合、携帯端末50は、通信リンクを切断するためのDeactivationコマンドをMFP10に送信するが、MFP10のNFC I/F22の動作が停止されているために、Deactivationコマンドに対するレスポンスコマンド(即ちOKコマンド)を受信することもできない。従って、携帯端末50は、タイムアウトと判断して、通信リンクを維持するための処理(即ち、確認コマンドを送信する処理等)を終了する。これにより、S14で確立された通信リンクが切断される。S40が終了すると、MFPのListen処理が終了する。   When the first or second hard disconnection is executed, the portable terminal 50 cannot receive a response command (that is, an OK command) for the confirmation command, as in the case of the second soft disconnection. In this case, the portable terminal 50 transmits a Deactivation command for disconnecting the communication link to the MFP 10, but since the operation of the NFC I / F 22 of the MFP 10 is stopped, a response command (that is, an OK command) to the Deactivation command Can not receive. Therefore, the portable terminal 50 determines that a time-out has occurred, and ends the process for maintaining the communication link (that is, the process of transmitting a confirmation command, etc.). As a result, the communication link established in S14 is disconnected. When S40 ends, the listen process of the MFP ends.

なお、図2の切断手法テーブル42及び図4のフローチャートでは示していないが、携帯端末50のOS情報が、「T1」及び「T2」とは異なる種類情報(例えばiOSを示す「T3」)を含む場合には、CPU32は、S38及びS40を実行せずに(即ち通信リンクを切断せずに)、同じ通信リンクを利用して、複数個の対象データの双方向通信を実行してもよい。   Although not shown in the cutting method table 42 in FIG. 2 and the flowchart in FIG. 4, the OS information of the portable terminal 50 is different from “T1” and “T2” (for example, “T3” indicating iOS). If included, the CPU 32 may execute bidirectional communication of a plurality of target data using the same communication link without executing S38 and S40 (that is, without disconnecting the communication link). .

(MFPのListen処理;CEモード(図5))
続いて、図5を参照して、図4のS12でNOと判断される場合(即ち、MFP10がCEモードで動作すべきことが判断される場合)の処理の内容を説明する。S62は、図4のS14と同様である。なお、MFP10がCEモードで動作し、携帯端末50がR/Wモードで動作する場合には、P2Pモードの場合と異なり、確認コマンド応答処理(図2のS16参照)が実行されない。単方向通信のためのモードであるために(即ち、1回の対象データの通信のみが実行されるモードであるために)、通信リンクを維持するのか否かを確認する必要がないからである。
(Listen processing of MFP; CE mode (FIG. 5))
Next, with reference to FIG. 5, the contents of the process when it is determined NO in S12 of FIG. 4 (that is, when it is determined that the MFP 10 should operate in the CE mode) will be described. S62 is the same as S14 of FIG. Note that when the MFP 10 operates in the CE mode and the portable terminal 50 operates in the R / W mode, the confirmation command response process (see S16 in FIG. 2) is not executed unlike in the P2P mode. This is because it is not necessary to confirm whether or not to maintain a communication link because it is a mode for unidirectional communication (that is, only one communication of target data is performed). .

なお、S62は、プロトコルスタック38に従って実行される。また、S64,S68,S70,S72,S76,S78,S82,S86は、アプリケーションプログラム36に従って実行される。また、S66,S74,S80,S84,S88は、アプリケーションプログラム36に従って、プロトコルスタック38のAPIを用いて実行される。   Note that S62 is executed according to the protocol stack 38. Further, S64, S68, S70, S72, S76, S78, S82, and S86 are executed according to the application program 36. S66, S74, S80, S84, and S88 are executed using the API of the protocol stack 38 in accordance with the application program 36.

S64〜S72は、図2のS18,S22〜S28と同様である。S74〜S78は、図4のS32〜S36と同様である。S72又はS78を経た場合には、S80に進む。また、S70でYES又はS76でYESの場合には、S86に進む。S86は、図4のS37と同様である。S86を終えると、S88に進む。   S64 to S72 are the same as S18 and S22 to S28 in FIG. S74 to S78 are the same as S32 to S36 of FIG. If S72 or S78 is passed, the process proceeds to S80. If YES in S70 or YES in S76, the process proceeds to S86. S86 is the same as S37 of FIG. When S86 ends, the process proceeds to S88.

S80又はS88では、CPU32は、まず、切断手法テーブル42を参照して、S62で確立された通信リンクを切断するための切断手法を選択する。S80又はS88の時点では、MFP10の現在の状況は「Listen継続」及び「Listen終了」のどちらかであり、MFP10のモードは「CE」である。従って、CPU32は、携帯端末50のOS情報に関わらず、第2のソフト切断を選択する(図2参照)。S80又はS88では、CPU32は、選択済みの第2のソフト切断を利用して、S62で確立された通信リンクを切断する。第2のソフト切断の内容は、上述したとおりである。S80が終了する場合には、S82及びS84が実行された後に、MFPのListen処理が終了する。一方において、S88が終了する場合には、S82及びS84が実行されずに、MFPのListen処理が終了する。   In S80 or S88, the CPU 32 first refers to the disconnection method table 42, and selects a disconnection method for disconnecting the communication link established in S62. At the time of S80 or S88, the current status of the MFP 10 is either “Listen Continue” or “Listen End”, and the mode of the MFP 10 is “CE”. Therefore, the CPU 32 selects the second soft disconnection regardless of the OS information of the portable terminal 50 (see FIG. 2). In S80 or S88, the CPU 32 disconnects the communication link established in S62 using the selected second soft disconnection. The contents of the second soft cutting are as described above. When S80 ends, the Listen process of the MFP ends after S82 and S84 are executed. On the other hand, when S88 ends, S82 and S84 are not executed, and the Listen process of the MFP ends.

S82では、CPU32は、メモリ34内の動作制御テーブル44と、携帯端末50のOS情報と、を参照して、複数種の動作制御手法の中から、1個の動作制御手法を選択する。S82では、CPU32は、携帯端末50のOS情報に応じた動作制御手法を選択する。例えば、S66を経てS82が実行される場合には、S82では、CPU32は、S66で受信された対象データに含まれる携帯端末50のOS情報を利用して、動作制御手法を選択する。また、例えば、S74を経てS82が実行される場合には、S82では、CPU32は、携帯端末50から前回に受信された対象データに含まれる携帯端末50のOS情報を利用して、動作制御手法を選択する。具体的に言うと、CPU32は、携帯端末50のOS情報が「T1」及び「V1」を含む場合には、第1のハード制御を選択し、携帯端末50のOS情報が「T1」及び「V2」を含む場合には、第2のハード制御を選択し、携帯端末50のOS情報が「T2」及び「V3」を含む場合には、第2のハード制御を選択する(図3参照)。   In S82, the CPU 32 refers to the operation control table 44 in the memory 34 and the OS information of the portable terminal 50, and selects one operation control method from among a plurality of types of operation control methods. In S <b> 82, the CPU 32 selects an operation control method according to the OS information of the mobile terminal 50. For example, when S82 is executed through S66, in S82, the CPU 32 selects an operation control method using the OS information of the portable terminal 50 included in the target data received in S66. Further, for example, when S82 is executed via S74, in S82, the CPU 32 uses the OS information of the mobile terminal 50 included in the target data received last time from the mobile terminal 50 to perform an operation control method. Select. Specifically, when the OS information of the portable terminal 50 includes “T1” and “V1”, the CPU 32 selects the first hardware control, and the OS information of the portable terminal 50 indicates “T1” and “V1”. If it includes “V2”, the second hardware control is selected, and if the OS information of the portable terminal 50 includes “T2” and “V3”, the second hardware control is selected (see FIG. 3). .

S84では、CPU32は、S82で選択された動作制御手法を利用して、動作制御処理を実行する。例えば、S82で選択された動作制御手法が第1のハード制御である場合には、S84では、CPU32は、NFC I/F22の動作を200msに亘って一時的に停止させる。また、例えば、S82で選択された動作制御手法が第2のハード制御である場合には、S84では、CPU32は、NFC I/F22の動作を300msに亘って一時的に停止させる。   In S84, the CPU 32 executes an operation control process using the operation control method selected in S82. For example, when the operation control method selected in S82 is the first hardware control, in S84, the CPU 32 temporarily stops the operation of the NFC I / F 22 for 200 ms. For example, when the operation control method selected in S82 is the second hardware control, in S84, the CPU 32 temporarily stops the operation of the NFC I / F 22 for 300 ms.

S80で通信リンクが切断されると、携帯端末50は、Pollモード及びListenモードで再び順次動作する。ただし、S84において、MFP10のNFC I/F22の動作が一時的に停止されるために、携帯端末50は、ポーリング信号を送信しても、レスポンス信号を受信しない。また、携帯端末50は、MFP10からポーリング信号を受信しない。このために、携帯端末50は、MFP10と携帯端末50の間の距離が大きくなったこと、即ち、通信相手が離反したこと、を検知することができる。   When the communication link is disconnected in S80, the mobile terminal 50 sequentially operates again in the poll mode and the listen mode. However, since the operation of the NFC I / F 22 of the MFP 10 is temporarily stopped in S84, the portable terminal 50 does not receive a response signal even if it transmits a polling signal. In addition, the portable terminal 50 does not receive a polling signal from the MFP 10. For this reason, the mobile terminal 50 can detect that the distance between the MFP 10 and the mobile terminal 50 has increased, that is, that the communication partner has moved away.

携帯端末50に通信相手の離反を検知させるのは(即ちS84の動作制御処理を実行するのは)、以下の理由である。CEモード及びR/Wモードに対応する通信リンクでは、1回の対象データの通信のみが実行されることが前提となっている。従って、一対のNFC機器のそれぞれは、CEモード及びR/Wモードに従って、対象データの通信を実行すると、通常、通信リンクを切断する。その後、仮に、一対のNFC機器が近接している状態が維持され続けると、一対のNFC機器は、Poll動作及びListen動作を再び実行して通信リンクを再び確立し、同じ対象データの通信を実行し得る。即ち、一対のNFC機器が近接している状態が維持される場合には、同じ対象データが何回も通信されるという事象が発生し得る。   The reason why the portable terminal 50 detects the separation of the communication partner (that is, the operation control process of S84 is executed) is as follows. In the communication link corresponding to the CE mode and the R / W mode, it is assumed that only one communication of target data is executed. Therefore, each of the pair of NFC devices normally disconnects the communication link when the target data is communicated according to the CE mode and the R / W mode. After that, if the pair of NFC devices continue to be kept close to each other, the pair of NFC devices executes the poll operation and the listen operation again to re-establish the communication link and execute the communication of the same target data. Can do. That is, when a state where a pair of NFC devices are close to each other is maintained, an event that the same target data is communicated many times may occur.

従って、NFC機器は、通常、CEモード及びR/Wモードに対応する通信リンクを切断した後に、通信相手の離反を検知しない場合には、Poll動作及びListen動作を再び実行しても、通信リンクを再び確立しないようにプログラムされている。そして、NFC機器は、例えば、ポーリング信号を何回か送信しても、レスポンス信号を通信相手から受信しない場合や、所定期間に亘って通信相手からポーリング信号を受信しない場合に、通信相手の離反を検知する。NFC機器は、このようにして通信相手の離反を検知すると、同じ通信相手と通信リンクを再び確立することができる。   Therefore, the NFC device normally does not detect the separation of the communication partner after disconnecting the communication link corresponding to the CE mode and the R / W mode, and even if the Poll operation and the Listen operation are performed again, the communication link Is programmed not to establish again. The NFC device, for example, transmits a polling signal several times, and does not receive a response signal from the communication partner or does not receive a polling signal from the communication partner for a predetermined period. Is detected. When the NFC device detects the separation of the communication partner in this manner, the NFC device can reestablish a communication link with the same communication partner.

本実施例では、第1の対象データの通信が実行された後に、第2の対象データの通信が実行される。従って、第1の対象データの通信のための通信リンクが切断された後に、MFP10と携帯端末50とが近接している状態が維持されていても、第2の対象データの通信のための新たな通信リンクを再び確立させる仕組みが必要である。この仕組みが、S84の動作制御処理である。即ち、MFP10がS84の動作制御処理を実行すれば、MFP10と携帯端末50とが近接している状態が維持されていても、携帯端末50は、MFP10の離反を検知することができる。その後、MFP10及び携帯端末50がPoll動作及びListen動作を実行すれば、MFP10及び携帯端末50の間に通信リンクを再び確立させることができる。   In the present embodiment, the communication of the second target data is executed after the communication of the first target data is executed. Therefore, after the communication link for communication of the first target data is disconnected, even if the state where the MFP 10 and the portable terminal 50 are close to each other is maintained, the new communication for the communication of the second target data is performed. A mechanism to re-establish a reliable communication link is necessary. This mechanism is the operation control process of S84. In other words, if the MFP 10 executes the operation control process of S84, the portable terminal 50 can detect the separation of the MFP 10 even if the state where the MFP 10 and the portable terminal 50 are close to each other is maintained. Thereafter, if the MFP 10 and the portable terminal 50 execute the poll operation and the listen operation, the communication link can be established again between the MFP 10 and the portable terminal 50.

(MFPのPoll処理;図6及び図7)
続いて、図6及び図7を参照して、MFPのPoll処理の内容を説明する。上述したように、NFC I/F22がPoll動作を実行する場合には、MFP10は、受信済みの動作可能モード信号に従って、P2Pモード及びR/Wモードのうちのどちらかのモードで動作する。S110では、CPU32は、受信済みの動作可能モード信号に基づいて、MFP10が、P2Pモードで動作すべきか、R/Wモードで動作すべきか、を判断する。CPU32は、MFP10がP2Pモードで動作すべきと判断する場合(S110でYESの場合)に、S112に進み、MFP10がR/Wモードで動作すべきと判断する場合(S110でNOの場合)に、図7のS160に進む。
(Poll processing of MFP; FIGS. 6 and 7)
Next, the contents of the poll processing of the MFP will be described with reference to FIGS. As described above, when the NFC I / F 22 executes the poll operation, the MFP 10 operates in one of the P2P mode and the R / W mode according to the received operable mode signal. In S110, the CPU 32 determines whether the MFP 10 should operate in the P2P mode or the R / W mode based on the received operable mode signal. If the CPU 32 determines that the MFP 10 should operate in the P2P mode (YES in S110), the CPU 32 proceeds to S112, and if it determines that the MFP 10 should operate in the R / W mode (NO in S110). The process proceeds to S160 in FIG.

(MFPのPoll処理;P2Pモード(図6))
S110,S112,S114,S116は、プロトコルスタック38に従って実行される。また、S118,S124,S126,S128,S134,S136,S137,S138は、アプリケーションプログラム36に従って実行される。また、S120,S122,S130,S132,S140は、アプリケーションプログラム36に従って、プロトコルスタック38のAPIを用いて実行される。
(Poll processing of MFP; P2P mode (FIG. 6))
S110, S112, S114, and S116 are executed according to the protocol stack 38. S118, S124, S126, S128, S134, S136, S137, and S138 are executed according to the application program 36. Further, S120, S122, S130, S132, and S140 are executed using the API of the protocol stack 38 in accordance with the application program 36.

S112では、CPU32は、NFC I/F22を介して、P2Pモードに対応するActivationコマンドを携帯端末50に送信する。次いで、S114では、CPU32は、携帯端末50から、NFC I/F22を介して、Activationコマンドに対するレスポンスコマンド(即ちOKコマンド)を受信する。これにより、MFP10と携帯端末50との間にNFC方式の通信リンクが確立される。   In S112, the CPU 32 transmits an activation command corresponding to the P2P mode to the portable terminal 50 via the NFC I / F 22. Next, in S <b> 114, the CPU 32 receives a response command (that is, an OK command) for the activation command from the portable terminal 50 via the NFC I / F 22. As a result, an NFC communication link is established between the MFP 10 and the portable terminal 50.

次いで、S116では、CPU32は、確認コマンド送信処理を開始する。確認コマンド送信処理では、CPU32は、確認コマンドを、NFC I/F22を介して、携帯端末50に送信して、携帯端末50から、NFC I/F22を介して、確認コマンドに対するレスポンスコマンド(即ちOKコマンド)を受信する。なお、CPU32は、S116で確認コマンド送信処理を開始すると、後述のS140が実行されるまで、確認コマンド送信処理を継続して実行する。   Next, in S116, the CPU 32 starts a confirmation command transmission process. In the confirmation command transmission process, the CPU 32 transmits a confirmation command to the portable terminal 50 via the NFC I / F 22, and a response command (that is, OK) to the confirmation command from the portable terminal 50 via the NFC I / F 22. Command). When the confirmation command transmission process is started in S116, the CPU 32 continues to execute the confirmation command transmission process until S140 described later is executed.

S118〜S128は、図4のS18〜S28と同様である。S130〜S137は、図4のS30〜S37と同様である。   S118 to S128 are the same as S18 to S28 of FIG. S130 to S137 are the same as S30 to S37 of FIG.

S138では、CPU32は、メモリ34内の切断手法テーブル42と、メモリ34内の継続フラグの値と、携帯端末50のOS情報と、を参照して、複数種の切断手法の中から、S114で確立された通信リンクを切断するための切断手法を選択する。S138の時点では、プリンタ10がPoll機器であるために、プリンタ10の現在の状況は、「Poll継続」及び「Poll終了」のどちらかである。そして、継続フラグが「1」である場合には、プリンタ10の現在の状況は「Poll継続」であり、継続フラグが「0」である場合には、プリンタ10の現在の状況は「Poll終了」である。また、S138の時点では、プリンタ10のモードは「P2P」である。   In S138, the CPU 32 refers to the disconnection method table 42 in the memory 34, the value of the continuation flag in the memory 34, and the OS information of the portable terminal 50, and from among a plurality of disconnection methods, in S114. Select a disconnect method for disconnecting an established communication link. Since the printer 10 is a poll device at the time of S138, the current status of the printer 10 is either “Poll continuation” or “Poll end”. When the continuation flag is “1”, the current status of the printer 10 is “Poll continuation”. When the continuation flag is “0”, the current status of the printer 10 is “Poll end”. It is. At the time of S138, the mode of the printer 10 is “P2P”.

例えば、S122を経てS138が実行される場合には、S138では、CPU32は、S122で受信された対象データに含まれる携帯端末50のOS情報を利用して、切断手法を選択する。また、例えば、S132を経てS138が実行される場合には、S138では、CPU32は、携帯端末50から前回に受信された対象データに含まれる携帯端末50のOS情報を利用して、切断手法を選択する。   For example, when S138 is executed through S122, in S138, the CPU 32 selects a cutting method using the OS information of the portable terminal 50 included in the target data received in S122. Further, for example, when S138 is executed via S132, in S138, the CPU 32 uses the OS information of the mobile terminal 50 included in the target data received from the mobile terminal 50 last time to perform a disconnection method. select.

例えば、プリンタ10の現在の状況が「Poll継続」である場合には、S138では、CPU32は、携帯端末50のOS情報に応じた切断手法を選択する。具体的に言うと、CPU32は、携帯端末50のOS情報が「T1」及び「V1」を含む場合には、第1のハード切断を選択し、携帯端末50のOS情報が「T1」及び「V2」を含む場合には、第1のソフト切断を選択し、携帯端末50のOS情報が「T2」及び「V3」を含む場合には、ソフト+ハード切断を選択する(図2参照)。一方において、例えば、プリンタ10の現在の状況が「Poll終了」である場合には、S138では、CPU32は、携帯端末50のOS情報に関わらず(図2の「any」参照)、第1のソフト切断を選択する。   For example, when the current status of the printer 10 is “Poll continuation”, in S138, the CPU 32 selects a cutting method according to the OS information of the portable terminal 50. Specifically, when the OS information of the portable terminal 50 includes “T1” and “V1”, the CPU 32 selects the first hard disconnection, and the OS information of the portable terminal 50 indicates “T1” and “V1”. When it includes “V2”, the first soft disconnection is selected, and when the OS information of the portable terminal 50 includes “T2” and “V3”, soft + hard disconnection is selected (see FIG. 2). On the other hand, for example, if the current status of the printer 10 is “Poll end”, in S138, the CPU 32 determines the first regardless of the OS information of the portable terminal 50 (see “any” in FIG. 2). Select soft cutting.

次いで、S140において、CPU32は、S138で選択された切断手法を利用して、S114で確立された通信リンクを切断する。例えば、S138で選択された切断手法が第1のソフト切断である場合には、S140では、CPU32は、NFC I/F22を介して、Deactivationコマンドを携帯端末50に送信する。次いで、CPU32は、携帯端末50から、NFC I/F22を介して、Deactivationコマンドに対するレスポンスコマンド(即ちOKコマンド)を受信する。これにより、S114で確立された通信リンクが切断される。   Next, in S140, the CPU 32 disconnects the communication link established in S114 using the disconnection method selected in S138. For example, when the cutting method selected in S138 is the first soft cutting, in S140, the CPU 32 transmits a Deactivation command to the portable terminal 50 via the NFC I / F 22. Next, the CPU 32 receives a response command (that is, an OK command) for the Deactivation command from the portable terminal 50 via the NFC I / F 22. As a result, the communication link established in S114 is disconnected.

また、例えば、S138で選択された切断手法が第1のハード切断である場合には、S140では、CPU32は、NFC I/F22の動作を200msに亘って一時的に停止させる。従って、CPU32は、NFC I/F22を介して、S116で開始された確認コマンド送信処理を実行することができなくなる。この場合、携帯端末50は、タイムアウトと判断し、通信リンクに関する処理(即ち、確認コマンドの受信の監視等)を終了し、この結果、通信リンクが切断される。   For example, when the cutting method selected in S138 is the first hard cutting, in S140, the CPU 32 temporarily stops the operation of the NFC I / F 22 for 200 ms. Therefore, the CPU 32 cannot execute the confirmation command transmission process started in S116 via the NFC I / F 22. In this case, the portable terminal 50 determines that a time-out has occurred, ends the processing related to the communication link (that is, monitoring of reception of the confirmation command, etc.), and as a result, the communication link is disconnected.

また、例えば、S138で選択された切断手法がソフト+ハード切断である場合には、S140では、CPU32は、まず、NFC I/F22を介して、Deactivationコマンドを携帯端末50に送信する。次いで、CPU32は、携帯端末50から、NFC I/F22を介して、Deactivationコマンドに対するレスポンスコマンド(即ちOKコマンド)を受信する。その後、CPU32は、NFC I/F22の動作を10msに亘って一時的に停止させる。これにより、S114で確立された通信リンクが切断される。S140が終了すると、MFPのPoll処理が終了する。   For example, when the cutting method selected in S138 is soft + hard cutting, in S140, the CPU 32 first transmits a Deactivation command to the portable terminal 50 via the NFC I / F 22. Next, the CPU 32 receives a response command (that is, an OK command) for the Deactivation command from the portable terminal 50 via the NFC I / F 22. Thereafter, the CPU 32 temporarily stops the operation of the NFC I / F 22 for 10 ms. As a result, the communication link established in S114 is disconnected. When S140 ends, the poll processing of the MFP ends.

なお、図2の切断手法テーブル42及び図6のフローチャートでは示していないが、携帯端末50のOS情報が、「T1」及び「T2」とは異なる種類情報(例えばiOSを示す「T3」)を含む場合には、CPU32は、S138及びS140を実行せずに(即ち通信リンクを切断せずに)、同じ通信リンクを利用して、複数個の対象データの双方向通信を実行してもよい。   Although not shown in the cutting method table 42 in FIG. 2 and the flowchart in FIG. 6, the OS information of the mobile terminal 50 is different from “T1” and “T2” (for example, “T3” indicating iOS). If included, the CPU 32 may execute bidirectional communication of a plurality of target data using the same communication link without executing S138 and S140 (that is, without disconnecting the communication link). .

(MFPのPoll処理;R/Wモード(図7))
続いて、図7を参照して、図6のS110でNOと判断される場合(即ちMFP10がR/Wモードで動作すべきと判断される場合)の処理の内容を説明する。なお、S160,S162は、プロトコルスタック38に従って実行される。また、S164,S168,S170,S172,S176,S178,S182,S186は、アプリケーションプログラム36に従って実行される。また、S165,S166,S173,S174,S180,S184,S188は、アプリケーションプログラム36に従って、プロトコルスタック38のAPIを用いて実行される。
(Poll processing of MFP; R / W mode (FIG. 7))
Next, with reference to FIG. 7, the contents of the process when it is determined NO in S110 of FIG. 6 (that is, when it is determined that the MFP 10 should operate in the R / W mode) will be described. Note that S160 and S162 are executed according to the protocol stack 38. Further, S164, S168, S170, S172, S176, S178, S182, and S186 are executed according to the application program 36. S165, S166, S173, S174, S180, S184, and S188 are executed using the API of the protocol stack 38 in accordance with the application program 36.

S160〜S164は、図6のS112,S114,S118と同様である。ただし、S160では、CPU32は、R/Wモードに対応するActivationコマンドを送信する。   S160 to S164 are the same as S112, S114, and S118 of FIG. However, in S160, the CPU 32 transmits an activation command corresponding to the R / W mode.

S164でNOの場合(即ち送信フラグが「0」である場合)には、S165において、CPU32は、MFP10がReaderモードに従って動作すべきことを決定する。これにより、CPU32は、携帯端末50の擬似的なカードから対象データを読み出すこと、即ち、携帯端末50から対象データを受信することができる。この後に実行されるS166〜S172は、図5のS66〜S72と同様である。   If NO in S164 (that is, if the transmission flag is “0”), in S165, the CPU 32 determines that the MFP 10 should operate according to the Reader mode. Thereby, the CPU 32 can read the target data from the pseudo card of the mobile terminal 50, that is, can receive the target data from the mobile terminal 50. Subsequent S166 to S172 are the same as S66 to S72 of FIG.

一方において、S164でYESの場合(即ち送信フラグが「1」である場合)には、S173において、CPU32は、MFP10がWriterモードに従って動作すべきことを決定する。これにより、CPU32は、携帯端末50の擬似的なカードに対象データを書き込むこと、即ち、携帯端末50に対象データを送信することができる。この後に実行されるS174〜S178は、図5のS74〜S78と同様である。   On the other hand, if YES in S164 (that is, if the transmission flag is “1”), in S173, the CPU 32 determines that the MFP 10 should operate according to the writer mode. Thereby, the CPU 32 can write the target data to the pseudo card of the mobile terminal 50, that is, can transmit the target data to the mobile terminal 50. Subsequent S174 to S178 are the same as S74 to S78 in FIG.

S172又はS178を経た場合には、S180に進む。また、S170でYES又はS176でYESの場合には、S186に進む。S186は、図5のS86と同様である。S186を終えると、S188に進む。   If S172 or S178 is passed, the process proceeds to S180. If YES in S170 or YES in S176, the process proceeds to S186. S186 is the same as S86 of FIG. When S186 ends, the process proceeds to S188.

S180又はS188では、CPU32は、まず、切断手法テーブル42を参照して、S162で確立された通信リンクを切断するための切断手法を選択する。S180又はS188の時点では、MFP10の現在の状況は「Poll継続」及び「Poll終了」のどちらかであり、MFP10のモードは「R/W」である。CPU32は、携帯端末50のOS情報に関わらず、第1のソフト切断を選択する(図2参照)。S180又はS188では、CPU32は、選択済みの第1のソフト切断を利用して、S162で確立された通信リンクを切断する。第1のソフト切断の内容は、上述したとおりである。S180が終了する場合には、S182及びS184が実行された後に、MFPのPoll処理が終了する。一方において、S188が終了する場合には、S182及びS184が実行されずに、MFPのPoll処理が終了する。   In S180 or S188, the CPU 32 first refers to the disconnection method table 42 and selects a disconnection method for disconnecting the communication link established in S162. At the time of S180 or S188, the current status of the MFP 10 is either “Poll continuation” or “Poll end”, and the mode of the MFP 10 is “R / W”. The CPU 32 selects the first soft disconnection regardless of the OS information of the portable terminal 50 (see FIG. 2). In S180 or S188, the CPU 32 uses the selected first soft disconnection to disconnect the communication link established in S162. The contents of the first soft cutting are as described above. When S180 ends, the poll processing of the MFP ends after S182 and S184 are executed. On the other hand, when S188 ends, S182 and S184 are not executed, and the poll processing of the MFP ends.

S182では、CPU32は、メモリ34内の動作制御テーブル44と、携帯端末50のOS情報と、を参照して、複数種の動作制御手法の中から、1個の動作制御手法を選択する。S182では、CPU32は、携帯端末50のOS情報に応じた動作制御手法を選択する。例えば、S166を経てS182が実行される場合には、S182では、CPU32は、S166で受信された対象データに含まれる携帯端末50のOS情報を利用して、動作制御手法を選択する。また、例えば、S174を経てS182が実行される場合には、S182では、CPU32は、携帯端末50から前回に受信された対象データに含まれる携帯端末50のOS情報を利用して、動作制御手法を選択する。具体的に言うと、CPU32は、携帯端末50のOS情報が「T1」及び「V1」を含む場合には、第1のハード制御を選択し、携帯端末50のOS情報が「T2」及び「V3」を含む場合には、第2のハード制御を選択する。なお、CPU32は、携帯端末50のOS情報が「T1」及び「V2」を含む場合には、いずれの動作制御手法も選択せずに(図3参照)、S184の処理をスキップして、MFPのPoll処理を終了する。   In S182, the CPU 32 refers to the operation control table 44 in the memory 34 and the OS information of the mobile terminal 50, and selects one operation control method from among a plurality of types of operation control methods. In S <b> 182, the CPU 32 selects an operation control method according to the OS information of the portable terminal 50. For example, when S182 is executed via S166, in S182, the CPU 32 selects an operation control method using the OS information of the portable terminal 50 included in the target data received in S166. Further, for example, when S182 is executed via S174, in S182, the CPU 32 uses the OS information of the mobile terminal 50 included in the target data received last time from the mobile terminal 50 to perform an operation control method. Select. Specifically, when the OS information of the mobile terminal 50 includes “T1” and “V1”, the CPU 32 selects the first hardware control, and the OS information of the mobile terminal 50 indicates “T2” and “ In the case of including “V3”, the second hardware control is selected. When the OS information of the portable terminal 50 includes “T1” and “V2”, the CPU 32 skips the process of S184 without selecting any operation control method (see FIG. 3), and The Poll process is terminated.

S184では、CPU32は、S182で選択された動作制御手法を利用して、動作制御処理を実行する。第1及び第2のハード制御については、上述のとおりである。S184の動作制御処理を実行する理由は、図5のS84の動作制御処理を実行する理由と同様である。   In S184, the CPU 32 executes an operation control process using the operation control method selected in S182. The first and second hardware controls are as described above. The reason for executing the operation control process of S184 is the same as the reason for executing the operation control process of S84 of FIG.

(具体的なケース)
続いて、本実施例によって実現される具体的なケースを説明する。以下の各ケースは、MFP10が図4〜図7の各処理を実行することによって、実現される。なお、以下の各ケースでは、図1のコマンドテーブル40内のパターンBに示されるように、携帯端末50からMFP10に第1の対象データが送信され、次いで、MFP10から携帯端末50に第2の対象データが送信されて、複数個の対象データの一連の通信が終了する状況を想定している。
(Specific case)
Subsequently, a specific case realized by this embodiment will be described. The following cases are realized by the MFP 10 executing the processes shown in FIGS. 4 to 7. In each of the following cases, the first target data is transmitted from the portable terminal 50 to the MFP 10 as shown in the pattern B in the command table 40 of FIG. 1, and then the second target is transmitted from the MFP 10 to the portable terminal 50. It is assumed that the target data is transmitted and a series of communication of a plurality of target data ends.

(ケースA;図8)
ケースAでは、MFP10がPoll動作を実行し(即ち携帯端末50がListen動作を実行し)、さらに、携帯端末50がP2Pモードに従って動作可能である。携帯端末50は、種類情報「T1」及びバージョン情報「V1」を有するOSプログラムを備える。
(Case A; Fig. 8)
In case A, the MFP 10 executes the poll operation (that is, the portable terminal 50 executes the listen operation), and the portable terminal 50 can operate according to the P2P mode. The portable terminal 50 includes an OS program having type information “T1” and version information “V1”.

MFP10は、Activationコマンドを携帯端末50に送信して(図6のS112)、携帯端末50からOKコマンドを受信する(S114)。これにより、MFP10と携帯端末50との間に通信リンクL1が確立される。この場合、MFP10は、確認コマンド送信処理を開始する(S116)。即ち、MFP10は、確認コマンドを携帯端末50に送信して、OKコマンドを携帯端末50から受信する。   The MFP 10 transmits an activation command to the portable terminal 50 (S112 in FIG. 6), and receives an OK command from the portable terminal 50 (S114). As a result, the communication link L1 is established between the MFP 10 and the portable terminal 50. In this case, the MFP 10 starts confirmation command transmission processing (S116). That is, the MFP 10 transmits a confirmation command to the portable terminal 50 and receives an OK command from the portable terminal 50.

通信リンクL1が確立された時点では、送信フラグが「0」である。この場合、MFP10は、S118でNOと判断し、次いで、ネゴシエーションを実行して、MFP10がデータ受信を実行することを、携帯端末50に通知する(S120)。MFP10は、携帯端末50から第1の対象データを受信する(S122)。第1の対象データは、MFP10によって処理されるべきコマンドと、「T1」及び「V1」を示すOS情報と、を含む。MFP10は、第1の対象データに含まれるコマンドを処理して、第2の対象データを生成する(S124)。この場合、MFP10は、送信フラグを「1」に設定し、継続フラグを「1」に設定する(S128)。   At the time when the communication link L1 is established, the transmission flag is “0”. In this case, the MFP 10 determines NO in S118, and then performs negotiation, and notifies the portable terminal 50 that the MFP 10 executes data reception (S120). The MFP 10 receives the first target data from the portable terminal 50 (S122). The first target data includes a command to be processed by the MFP 10 and OS information indicating “T1” and “V1”. The MFP 10 processes the command included in the first target data to generate second target data (S124). In this case, the MFP 10 sets the transmission flag to “1” and sets the continuation flag to “1” (S128).

MFP10の現在の状況は「Poll継続」であり、MFP10のモードは「P2P」であり、携帯端末50のOS情報は「T1」及び「V1」を含む。従って、MFP10は、第1のハード切断を選択する(S138、図2参照)。次いで、MFP10は、選択済みの第1のハード切断に従って、NFC I/F22の動作を200msに亘って停止させる(S140)。このために、MFP10は、確認コマンドを送信することができない。これにより、携帯端末50は、タイムアウトと判断し、この結果、通信リンクL1が切断される。   The current status of the MFP 10 is “Poll continuation”, the mode of the MFP 10 is “P2P”, and the OS information of the portable terminal 50 includes “T1” and “V1”. Accordingly, the MFP 10 selects the first hard disconnection (S138, see FIG. 2). Next, the MFP 10 stops the operation of the NFC I / F 22 for 200 ms in accordance with the selected first hard disconnection (S140). For this reason, the MFP 10 cannot transmit a confirmation command. As a result, the mobile terminal 50 determines that a timeout has occurred, and as a result, the communication link L1 is disconnected.

その後、MFP10がPoll動作を再び実行する(即ち携帯端末50がListen動作を再び実行する)。MFP10は、Activationコマンドを携帯端末50に送信して(S112)、携帯端末50からOKコマンドを受信する(S114)。この結果、MFP10と携帯端末50との間に通信リンクL2が確立される。   Thereafter, the MFP 10 executes the poll operation again (that is, the portable terminal 50 executes the listen operation again). The MFP 10 transmits an activation command to the portable terminal 50 (S112), and receives an OK command from the portable terminal 50 (S114). As a result, a communication link L2 is established between the MFP 10 and the portable terminal 50.

第1の対象データが通信された際に、送信フラグが「1」に設定されている。従って、MFP10は、S118でYESと判断し、次いで、ネゴシエーションを実行して、MFP10がデータ送信を実行することを、携帯端末50に通知する(S130)。MFP10は、第2の対象データを携帯端末50に送信する(S132)。この場合、MFP10は、送信フラグを「0」に設定し、継続フラグを「0」に設定する(S137)。   The transmission flag is set to “1” when the first target data is communicated. Therefore, the MFP 10 determines YES in S118, and then executes negotiation to notify the portable terminal 50 that the MFP 10 executes data transmission (S130). The MFP 10 transmits the second target data to the portable terminal 50 (S132). In this case, the MFP 10 sets the transmission flag to “0” and sets the continuation flag to “0” (S137).

MFP10の現在の状況は「Poll終了」であり、MFP10のモードは「P2P」である。従って、MFP10は、第1のソフト切断を選択する(S138、図2参照)。次いで、MFP10は、選択済みの第1のソフト切断に従って、Deactivationコマンドを携帯端末50に送信して、携帯端末50からOKコマンドを受信する(S140)。この結果、通信リンクL2が切断される。   The current status of the MFP 10 is “Poll end”, and the mode of the MFP 10 is “P2P”. Therefore, the MFP 10 selects the first soft disconnection (S138, see FIG. 2). Next, in accordance with the selected first soft disconnection, the MFP 10 transmits a Deactivation command to the portable terminal 50 and receives an OK command from the portable terminal 50 (S140). As a result, the communication link L2 is disconnected.

上述したように、P2Pモードは、双方向通信のためのモードである。従って、同じ通信リンクL1を利用して、第1及び第2の対象データの両方を通信する構成が考えられる。しかしながら、携帯端末50が、P2Pモードに従って、双方向通信を適切に実行することができない可能性がある。例えば、携帯端末50のOSプログラムが、種類情報「T1」及びバージョン情報「V1」を有する場合には、当該OSプログラムは、通信リンクL1を利用して、第1の対象データを送信した後に、同じ通信リンクL1を利用して、第2の対象データを受信する動作を許容しない。   As described above, the P2P mode is a mode for bidirectional communication. Therefore, the structure which communicates both the 1st and 2nd object data using the same communication link L1 can be considered. However, there is a possibility that the mobile terminal 50 cannot properly execute bidirectional communication according to the P2P mode. For example, when the OS program of the portable terminal 50 has the type information “T1” and the version information “V1”, the OS program uses the communication link L1 to transmit the first target data, The operation of receiving the second target data using the same communication link L1 is not permitted.

このような実情に鑑みて、ケースAでは、MFP10は、通信リンクL1を利用して、携帯端末50から第1の対象データを受信すると、通信リンクL1を一旦切断する。次いで、MFP10は、通信リンクL2を再確立し、通信リンクL2を利用して、第2の対象データを携帯端末50に送信する。従って、携帯端末50がP2Pモードの双方向通信を許容しない場合でも、MFP10は、P2Pモードに従って、第1の対象データ及び第2の対象データの両方を、携帯端末50と適切に通信することができる。   In view of such a situation, in case A, when the MFP 10 receives the first target data from the portable terminal 50 using the communication link L1, the MFP 10 temporarily disconnects the communication link L1. Next, the MFP 10 re-establishes the communication link L2, and transmits the second target data to the portable terminal 50 using the communication link L2. Therefore, even when the portable terminal 50 does not allow the two-way communication in the P2P mode, the MFP 10 can appropriately communicate both the first target data and the second target data with the portable terminal 50 according to the P2P mode. it can.

一般的なPoll機器は、通常、NFCフォーラムによって定められている第1のソフト切断を利用して、通信リンクを切断する。しかしながら、上述したように、ケースAでは、MFP10は、第1のソフト切断ではなく、第1のハード切断を利用して、通信リンクL1を切断する。その理由は、以下のとおりである。即ち、ケースAでは、携帯端末50のOSプログラムは、種類情報「T1」及びバージョン情報「V1」を有する。このようなOS情報「T1−V1」を有する携帯端末50では、仮に、第1のソフト切断によって通信リンクL1が切断されると、携帯端末50のP2Pのプロトコルススタックのレベルで致命的なエラーが発生し得る。当該エラーが発生すると、携帯端末50は、通信リンクL2を利用して、第2の対象データを受信しても、第2の対象データが第1の対象データのレスポンスのデータであることを認識することができない。この結果、携帯端末50は、第2の対象データに含まれるコマンド(例えば、上記の第1の例では「指示コマンド」)に従って、適切に処理を実行することができない。   A typical poll device normally disconnects the communication link by using the first soft disconnection defined by the NFC forum. However, as described above, in case A, the MFP 10 disconnects the communication link L1 using the first hard disconnection instead of the first soft disconnection. The reason is as follows. That is, in case A, the OS program of the portable terminal 50 has type information “T1” and version information “V1”. In the mobile terminal 50 having such OS information “T1-V1”, if the communication link L1 is disconnected by the first soft disconnection, a fatal error occurs at the P2P protocol stack level of the mobile terminal 50. Can occur. When the error occurs, the mobile terminal 50 recognizes that the second target data is the response data of the first target data even if the second target data is received using the communication link L2. Can not do it. As a result, the portable terminal 50 cannot appropriately execute the process according to the command included in the second target data (for example, “instruction command” in the first example).

このような実情に鑑みて、本実施例では、図2に示されるように、「Poll継続」と「P2P」と「T1−V1」とに対応する切断手法として、「第1のハード切断」が採用されている。なお、第1のハード切断の待機期間(即ち200ms)は、携帯端末50がタイムアウトを検出可能な期間に設定されている。第1のハード切断によって通信リンクL1が切断されても、携帯端末50でエラーが発生しない。このために、携帯端末50は、通信リンクL2を利用して、第2の対象データを受信すると、第2の対象データに含まれるコマンドに従って、適切に処理を実行することができる。   In view of such circumstances, in the present embodiment, as shown in FIG. 2, as a cutting method corresponding to “Poll continuation”, “P2P”, and “T1-V1”, “first hard cutting” Is adopted. Note that the first hard disconnection waiting period (that is, 200 ms) is set to a period during which the portable terminal 50 can detect a timeout. Even if the communication link L1 is disconnected by the first hard disconnection, no error occurs in the portable terminal 50. For this reason, when the mobile terminal 50 receives the second target data using the communication link L2, the mobile terminal 50 can appropriately execute the process according to the command included in the second target data.

一方において、図2に示されるように、「Poll終了」と「P2P」とに対応する切断手法として、NFCフォーラムによって定められている一般的な「第1のソフト切断」が採用されている。上述したように、第1のソフト切断が利用されると、携帯端末50でエラーが発生し得るが、MFP10の状況が「Poll終了」である場合には、複数個の対象データの一連の通信が終了しているので、携帯端末50でエラーが発生しても問題がない。しかも、第1のソフト切断は、第1のハード切断と比べると、通信リンクを迅速に切断可能な切断手法である。第1のソフト切断では、第1のハード切断のように200msの待機期間が必要なく、さらに、第1のハード切断のようにハードウェア(即ちNFC I/F22)の切断から復帰までの復帰期間が必要ないからである。このために、MFP10は、通信リンクL2を迅速に切断して、他の処理(例えばPoll動作やListen動作)を迅速に実行することができる。   On the other hand, as shown in FIG. 2, the general “first soft disconnection” defined by the NFC Forum is adopted as a disconnection method corresponding to “Poll end” and “P2P”. As described above, when the first soft disconnection is used, an error may occur in the portable terminal 50. When the status of the MFP 10 is “Poll end”, a series of communication of a plurality of target data is performed. Therefore, there is no problem even if an error occurs in the portable terminal 50. Moreover, the first soft disconnection is a disconnection method that can disconnect the communication link more quickly than the first hard disconnection. The first soft disconnection does not require a waiting period of 200 ms unlike the first hard disconnection, and further, the return period from the disconnection of the hardware (that is, NFC I / F 22) to the return unlike the first hard disconnection. Because there is no need. For this reason, the MFP 10 can quickly disconnect the communication link L2 and quickly execute other processing (for example, a poll operation or a listen operation).

(ケースB;図9)
ケースBでは、MFP10がPoll動作を実行し(即ち携帯端末50がListen動作を実行し)、さらに、携帯端末50がP2Pモードに従って動作可能である。携帯端末50は、種類情報「T1」及びバージョン情報「V2」を有するOSプログラムを備える。「T1」及び「V2」を有するOSプログラムを備える携帯端末50は、ケースAと同様に、P2Pモードに従って双方向通信を適切に実行することができない。従って、ケースBでも、MFP10は、通信リンクL1を切断して、通信リンクL2を再確立する。
(Case B; Fig. 9)
In case B, the MFP 10 performs a poll operation (that is, the portable terminal 50 executes a listen operation), and the portable terminal 50 can operate according to the P2P mode. The portable terminal 50 includes an OS program having type information “T1” and version information “V2”. As in the case A, the portable terminal 50 including the OS program having “T1” and “V2” cannot appropriately execute bidirectional communication according to the P2P mode. Accordingly, even in case B, the MFP 10 disconnects the communication link L1 and reestablishes the communication link L2.

ケースBでは、MFP10は、第1のソフト切断を利用して、通信リンクL1を切断する。この点のみが、ケースAとは異なる。ケースBでは、携帯端末50のOSプログラムは、種類情報「T1」及びバージョン情報「V2」を有する。このようなOS情報「T1−V2」を有する携帯端末50では、第1のソフト切断によって通信リンクL1が切断されても、エラーが発生しない。   In Case B, the MFP 10 disconnects the communication link L1 using the first soft disconnection. Only this point is different from Case A. In Case B, the OS program of the portable terminal 50 has type information “T1” and version information “V2”. In the mobile terminal 50 having such OS information “T1-V2”, no error occurs even if the communication link L1 is disconnected by the first soft disconnection.

このような実情に鑑みて、本実施例では、図2に示されるように、「Poll継続」と「P2P」と「T1−V2」とに対応する切断手法として、通信リンクを迅速に切断可能である「第1のソフト切断」が採用されている。このために、MFP10は、通信リンクL1を迅速に切断して、通信リンクL2を迅速に確立することができる。   In view of such circumstances, in this embodiment, as shown in FIG. 2, the communication link can be quickly disconnected as a disconnection method corresponding to “Poll continuation”, “P2P”, and “T1-V2”. The “first soft cutting” is adopted. Therefore, the MFP 10 can quickly disconnect the communication link L1 and quickly establish the communication link L2.

(ケースC;図10)
ケースCでは、MFP10がPoll動作を実行し(即ち携帯端末50がListen動作を実行し)、さらに、携帯端末50がP2Pモードに従って動作可能である。携帯端末50は、種類情報「T2」及びバージョン情報「V3」を有するOSプログラムを備える。「T2」及び「V3」を有するOSプログラムを備える携帯端末50は、ケースAと同様に、P2Pモードに従って双方向通信を適切に実行することができない。従って、ケースCでも、MFP10は、通信リンクL1を切断して、通信リンクL2を再確立する。
(Case C; FIG. 10)
In case C, the MFP 10 performs a poll operation (that is, the portable terminal 50 executes a listen operation), and the portable terminal 50 can operate according to the P2P mode. The portable terminal 50 includes an OS program having type information “T2” and version information “V3”. As in the case A, the portable terminal 50 including the OS program having “T2” and “V3” cannot appropriately execute bidirectional communication according to the P2P mode. Accordingly, even in case C, the MFP 10 disconnects the communication link L1 and reestablishes the communication link L2.

ケースCでは、MFP10は、ソフト+ハード切断を利用して、通信リンクL1を切断する。この点のみが、ケースAとは異なる。ケースCでは、携帯端末50のOSプログラムは、種類情報「T2」及びバージョン情報「V3」を有する。このようなOS情報「T2−V3」を有する携帯端末50は、仮に、第1のソフト切断のみが実行されても、通信リンクL1の切断を適切に認識することができない。携帯端末50が通信リンクL1の切断を認識することができないと、MFP10と携帯端末50との間に、通信リンクL2を適切に確立することができない。   In Case C, the MFP 10 disconnects the communication link L1 using soft + hard disconnect. Only this point is different from Case A. In Case C, the OS program of the portable terminal 50 has type information “T2” and version information “V3”. Even if only the first soft disconnection is executed, the mobile terminal 50 having such OS information “T2-V3” cannot appropriately recognize the disconnection of the communication link L1. If the portable terminal 50 cannot recognize the disconnection of the communication link L1, the communication link L2 cannot be properly established between the MFP 10 and the portable terminal 50.

このような実情に鑑みて、本実施例では、図2に示されるように、「Poll継続」と「P2P」と「T2−V3」とに対応する切断手法として、「ソフト+ハード切断」が採用されている。ソフト+ハード切断は、第1のソフト切断と同様に、Deactivationコマンド及びOKコマンドの通信が実行された後に、NFC I/F22の動作を10msに亘って停止させる手法である。NFC I/F22の動作を停止させると、当該停止期間において、携帯端末50は、NFC方式の通信(例えば、ポーリング信号、レスポンス信号の通信)をMFP10と実行することができない。この結果、携帯端末50は、通信リンクL1の切断を適切に認識することができる。このために、MFP10と携帯端末50との間に、通信リンクL2を適切に確立することができる。   In view of such circumstances, in this embodiment, as shown in FIG. 2, “soft + hard cutting” is a cutting method corresponding to “Poll continuation”, “P2P”, and “T2-V3”. It has been adopted. The soft + hard disconnection is a method of stopping the operation of the NFC I / F 22 for 10 ms after the Deactivation command and the OK command communication are executed, as in the first soft disconnection. When the operation of the NFC I / F 22 is stopped, the portable terminal 50 cannot execute NFC communication (for example, polling signal and response signal communication) with the MFP 10 during the stop period. As a result, the mobile terminal 50 can appropriately recognize the disconnection of the communication link L1. For this reason, the communication link L <b> 2 can be appropriately established between the MFP 10 and the portable terminal 50.

(ケースD;図11)
ケースDでは、MFP10がListen動作を実行し(即ち携帯端末50がPoll動作を実行し)、さらに、携帯端末50がP2Pモードに従って動作可能である。携帯端末50は、種類情報「T1」及びバージョン情報「V1」を有するOSプログラム、又は、種類情報「T1」及びバージョン情報「V2」を有するOSプログラムを備える。
(Case D; FIG. 11)
In Case D, the MFP 10 executes the Listen operation (that is, the portable terminal 50 executes the Poll operation), and the portable terminal 50 can operate according to the P2P mode. The portable terminal 50 includes an OS program having type information “T1” and version information “V1”, or an OS program having type information “T1” and version information “V2”.

MFP10は、携帯端末50からActivationコマンドを受信して(図4のS10)、OKコマンドを携帯端末50に送信する(S14)。これにより、MFP10と携帯端末50との間に通信リンクL1が確立される。この場合、MFP10は、確認コマンド応答処理を開始する(S16)。即ち、MFP10は、携帯端末50から確認コマンドを受信して、OKコマンドを携帯端末50に送信する。   The MFP 10 receives the activation command from the portable terminal 50 (S10 in FIG. 4), and transmits an OK command to the portable terminal 50 (S14). As a result, the communication link L1 is established between the MFP 10 and the portable terminal 50. In this case, the MFP 10 starts a confirmation command response process (S16). That is, the MFP 10 receives the confirmation command from the mobile terminal 50 and transmits an OK command to the mobile terminal 50.

通信リンクL1が確立された時点では、送信フラグが「0」である。従って、MFP10は、S18でNOと判断し、次いで、ネゴシエーションを実行して、MFP10がデータ受信を実行することを、携帯端末50に通知する(S20)。MFP10は、携帯端末50から第1の対象データを受信する(S22)。第1の対象データは、MFP10によって処理されるべきコマンドと、「T1」及び「V1」を示すOS情報(又は「T1」及び「V2」を示すOS情報)と、を含む。MFP10は、第1の対象データに含まれるコマンドを処理して、第2の対象データを生成する(S24)。この場合、MFP10は、送信フラグを「1」に設定し、継続フラグを「1」に設定する(S28)。   At the time when the communication link L1 is established, the transmission flag is “0”. Therefore, the MFP 10 determines NO in S18, and then executes negotiation to notify the portable terminal 50 that the MFP 10 executes data reception (S20). The MFP 10 receives the first target data from the portable terminal 50 (S22). The first target data includes a command to be processed by the MFP 10 and OS information indicating “T1” and “V1” (or OS information indicating “T1” and “V2”). The MFP 10 processes the command included in the first target data to generate second target data (S24). In this case, the MFP 10 sets the transmission flag to “1” and sets the continuation flag to “1” (S28).

MFP10の現在の状況は「Listen継続」であり、MFP10のモードは「P2P」である。例えば、携帯端末50のOS情報が「T1」及び「V1」を含む場合には、MFP10は、第1のハード切断を選択する(S38、図2参照)。また、例えば、携帯端末50のOS情報が「T1」及び「V2」を含む場合には、MFP10は、第2のハード切断を選択する(S38、図2参照)。次いで、MFP10は、選択済みの第1のハード切断又は第2のハード切断に従って、NFC I/F22の動作を200ms又は300msに亘って停止させる(S40)。このために、MFP10は、携帯端末50から確認コマンドを受信しても、OKコマンドを送信しない。また、MFP10は、携帯端末50からDeactivationコマンドを受信しても、OKコマンドを送信しない。これにより、携帯端末50は、タイムアウトと判断し、この結果、通信リンクL1が切断される。   The current status of the MFP 10 is “Listen Continue”, and the mode of the MFP 10 is “P2P”. For example, when the OS information of the portable terminal 50 includes “T1” and “V1”, the MFP 10 selects the first hard disconnection (S38, see FIG. 2). For example, when the OS information of the portable terminal 50 includes “T1” and “V2”, the MFP 10 selects the second hard disconnection (S38, see FIG. 2). Next, the MFP 10 stops the operation of the NFC I / F 22 for 200 ms or 300 ms in accordance with the selected first hard disconnection or second hard disconnection (S40). For this reason, even if the MFP 10 receives a confirmation command from the portable terminal 50, the MFP 10 does not transmit an OK command. Further, even when the MFP 10 receives the Deactivation command from the portable terminal 50, the MFP 10 does not transmit the OK command. As a result, the mobile terminal 50 determines that a timeout has occurred, and as a result, the communication link L1 is disconnected.

その後、MFP10がListen動作を再び実行する(即ち携帯端末50がPoll動作を再び実行する)。MFP10は、携帯端末50からActivationコマンドを受信して(S10)、OKコマンドを携帯端末50に送信する(S14)。この結果、MFP10と携帯端末50との間に通信リンクL2が確立される。   Thereafter, the MFP 10 executes the Listen operation again (that is, the portable terminal 50 executes the Polling operation again). The MFP 10 receives the activation command from the portable terminal 50 (S10), and transmits an OK command to the portable terminal 50 (S14). As a result, a communication link L2 is established between the MFP 10 and the portable terminal 50.

第1の対象データが通信された際に、送信フラグが「1」に設定されている。従って、MFP10は、S18でYESと判断し、次いで、ネゴシエーションを実行して、MFP10がデータ送信を実行することを、携帯端末50に通知する(S30)。MFP10は、第2の対象データを携帯端末50に送信する(S32)。この場合、MFP10は、送信フラグを「0」に設定し、継続フラグを「0」に設定する(S37)。   The transmission flag is set to “1” when the first target data is communicated. Accordingly, the MFP 10 determines YES in S18, and then executes negotiation to notify the portable terminal 50 that the MFP 10 executes data transmission (S30). The MFP 10 transmits the second target data to the portable terminal 50 (S32). In this case, the MFP 10 sets the transmission flag to “0” and sets the continuation flag to “0” (S37).

MFP10の現在の状況は「Listen終了」であり、MFP10のモードは「P2P」である。従って、MFP10は、第2のソフト切断を選択する(S38、図2参照)。次いで、MFP10は、選択済みの第2のソフト切断に従って、Deactivationコマンドを携帯端末50から受信して、OKコマンドを携帯端末50に送信する(S40)。この結果、通信リンクL2が切断される。   The current status of the MFP 10 is “Listen end”, and the mode of the MFP 10 is “P2P”. Accordingly, the MFP 10 selects the second soft disconnection (S38, see FIG. 2). Next, the MFP 10 receives a Deactivation command from the portable terminal 50 according to the selected second soft disconnection, and transmits an OK command to the portable terminal 50 (S40). As a result, the communication link L2 is disconnected.

一般的なListen機器は、通常、NFCフォーラムによって定められている第2のソフト切断を利用して、通信リンクを切断する。しかしながら、上述したように、ケースDでは、MFP10は、第2のソフト切断ではなく、第1のハード切断又は第2のハード切断を利用して、通信リンクL2を切断する。その理由は、以下のとおりである。即ち、ケースDでは、携帯端末50のOSプログラムは、種類情報「T1」及びバージョン情報「V1」、又は、種類情報「T1」及びバージョン情報「V2」を有する。このようなOS情報「T1−V1」又は「T1−V2」を有する携帯端末50では、仮に、第2のソフト切断によって通信リンクL1が切断されると、エラーが発生し得る。ケースAで説明したように、当該エラーが発生すると、携帯端末50は、第2の対象データに含まれるコマンドに従って、適切に処理を実行することができない。   A typical Listen device normally disconnects the communication link using a second soft disconnection established by the NFC Forum. However, as described above, in Case D, the MFP 10 disconnects the communication link L2 by using the first hard disconnection or the second hard disconnection instead of the second soft disconnection. The reason is as follows. That is, in case D, the OS program of the portable terminal 50 has type information “T1” and version information “V1”, or type information “T1” and version information “V2”. In the portable terminal 50 having such OS information “T1-V1” or “T1-V2”, if the communication link L1 is disconnected by the second soft disconnection, an error may occur. As described in case A, when the error occurs, the mobile terminal 50 cannot appropriately execute the process according to the command included in the second target data.

このような実情に鑑みて、本実施例では、図2に示されるように、「Listen継続」と「P2P」と「T1−V1」とに対応する切断手法として、「第1のハード切断」が採用されている。また、図2に示されるように、「Listen継続」と「P2P」と「T1−V2」とに対応する切断手法として、「第2のハード切断」が採用されている。第1及び第2のハード切断の待機期間(即ち200ms及び300ms)は、携帯端末50がタイムアウトを検出可能な期間に設定されている。OS情報「T1−V2」を有する携帯端末50がタイムアウトを検出可能な期間は、OS情報「T1−V1」を有する携帯端末50がタイムアウトを検出可能な期間よりも長い。第1のハード切断又は第2のハード切断によって通信リンクL1が切断されても、携帯端末50でエラーが発生しない。このために、携帯端末50は、通信リンクL2を利用して、第2の対象データを受信すると、第2の対象データに含まれるコマンドに従って、適切に処理を実行することができる。   In view of such a situation, in this embodiment, as shown in FIG. 2, as a cutting method corresponding to “Listen continuation”, “P2P”, and “T1-V1”, “first hard cutting” Is adopted. Further, as shown in FIG. 2, “second hard cutting” is adopted as a cutting method corresponding to “Listen continuation”, “P2P”, and “T1-V2”. The waiting periods for the first and second hard disconnections (that is, 200 ms and 300 ms) are set to periods during which the portable terminal 50 can detect a timeout. The period in which the portable terminal 50 having the OS information “T1-V2” can detect the timeout is longer than the period in which the portable terminal 50 having the OS information “T1-V1” can detect the timeout. Even if the communication link L1 is disconnected by the first hard disconnection or the second hard disconnection, no error occurs in the portable terminal 50. For this reason, when the mobile terminal 50 receives the second target data using the communication link L2, the mobile terminal 50 can appropriately execute the process according to the command included in the second target data.

一方において、図2に示されるように、「Listen終了」と「P2P」とに対応する切断手法として、通信リンクを迅速に切断可能な「第2のソフト切断」が採用されている。このために、MFP10は、通信リンクL2を迅速に切断して、他の処理(例えばPoll動作やListen動作)を迅速に実行することができる。   On the other hand, as shown in FIG. 2, “second soft disconnection” capable of quickly disconnecting the communication link is adopted as a disconnection method corresponding to “Listen end” and “P2P”. For this reason, the MFP 10 can quickly disconnect the communication link L2 and quickly execute other processing (for example, a poll operation or a listen operation).

なお、図8〜図11のシーケンス図には関係しないが、OS情報「T2−V3」を有する携帯端末50は、仮に、第2のソフト切断が実行されると、通信リンクL1の切断を適切に認識することができない。従って、図2に示されるように、「Listen継続」と「P2P」と「T2−V3」とに対応する切断手法として、「第2のハード切断」が採用されている。OS情報「T2−V3」を有する携帯端末50は、第2のハード切断が実行されると、通信リンクL1の切断を適切に認識することができる。このために、MFP10と携帯端末50との間に、通信リンクL2を適切に確立することができる。   Although not related to the sequence diagrams of FIGS. 8 to 11, the portable terminal 50 having the OS information “T2-V3” appropriately disconnects the communication link L1 if the second soft disconnection is executed. Can not be recognized. Therefore, as shown in FIG. 2, “second hard cutting” is employed as a cutting method corresponding to “Listen continuation”, “P2P”, and “T2-V3”. When the second hard disconnection is executed, the mobile terminal 50 having the OS information “T2-V3” can appropriately recognize the disconnection of the communication link L1. For this reason, the communication link L <b> 2 can be appropriately established between the MFP 10 and the portable terminal 50.

(ケースE;図12)
ケースEでは、MFP10がListen動作を実行し(即ち携帯端末50がPoll動作を実行し)、さらに、携帯端末50がP2Pモードに従って動作不可能である(即ち、R/Wモード及びCEモードのみに従って動作可能である)。従って、MFP10がCEモードに従って動作し、携帯端末50がR/Wモードに従って動作する。携帯端末50は、種類情報「T1」及びバージョン情報「V1」を有するOSプログラム、又は、種類情報「T1」及びバージョン情報「V2」を有するOSプログラムを備える。
(Case E; FIG. 12)
In Case E, the MFP 10 performs the Listen operation (that is, the portable terminal 50 performs the Poll operation), and the portable terminal 50 is not operable according to the P2P mode (that is, only according to the R / W mode and the CE mode). Is operational). Accordingly, the MFP 10 operates according to the CE mode, and the portable terminal 50 operates according to the R / W mode. The portable terminal 50 includes an OS program having type information “T1” and version information “V1”, or an OS program having type information “T1” and version information “V2”.

MFP10は、携帯端末50からActivationコマンドを受信して(図4のS10)、OKコマンドを携帯端末50に送信する(図5のS62)。これにより、MFP10と携帯端末50との間に通信リンクL1が確立される。   The MFP 10 receives the activation command from the portable terminal 50 (S10 in FIG. 4), and transmits an OK command to the portable terminal 50 (S62 in FIG. 5). As a result, the communication link L1 is established between the MFP 10 and the portable terminal 50.

通信リンクL1が確立された時点では、送信フラグが「0」である。この場合、MFP10は、S64でNOと判断し、携帯端末50から第1の対象データを受信する(S66)。第1の対象データは、MFP10によって処理されるべきコマンドと、「T1」及び「V1」を示すOS情報(又は「T1」及び「V2」を示すOS情報)と、を含む。MFP10は、第1の対象データに含まれるコマンドを処理して、第2の対象データを生成する(S68)。この場合、MFP10は、送信フラグを「1」に設定し、継続フラグを「1」に設定する(S72)。   At the time when the communication link L1 is established, the transmission flag is “0”. In this case, the MFP 10 determines NO in S64 and receives the first target data from the portable terminal 50 (S66). The first target data includes a command to be processed by the MFP 10 and OS information indicating “T1” and “V1” (or OS information indicating “T1” and “V2”). The MFP 10 processes the command included in the first target data to generate second target data (S68). In this case, the MFP 10 sets the transmission flag to “1” and sets the continuation flag to “1” (S72).

MFP10の現在の状況は「Listen継続」であり、MFP10のモードは「CE」である。従って、MFP10は、携帯端末50のOS情報に関わらず、第2のソフト切断を選択する(S80、図2参照)。次いで、MFP10は、選択済みの第2のソフト切断に従って、Deactivationコマンドを携帯端末50から受信して、OKコマンドを携帯端末50に送信する(S80)。この結果、通信リンクL1が切断される。   The current status of the MFP 10 is “Listen Continue”, and the mode of the MFP 10 is “CE”. Therefore, the MFP 10 selects the second soft disconnection regardless of the OS information of the portable terminal 50 (S80, see FIG. 2). Next, in accordance with the selected second soft disconnection, the MFP 10 receives a Deactivation command from the portable terminal 50 and transmits an OK command to the portable terminal 50 (S80). As a result, the communication link L1 is disconnected.

次いで、MFP10は、動作制御手法を選択する(S82)。例えば、携帯端末50のOS情報が「T1」及び「V1」を含む場合には、MFP10は、第1のハード制御を選択する(S82、図3参照)。また、例えば、携帯端末50のOS情報が「T1」及び「V2」を含む場合には、MFP10は、第2のハード制御を選択する(S82、図3参照)。次いで、MFP10は、選択済みの第1のハード制御又は第2のハード制御に従って、NFC I/F22の動作を200ms又は300msに亘って停止させる(S84)。即ち、MFP10は、携帯端末50からポーリング信号を受信しても、レスポンス信号を送信しない(即ち、NFC I/F22がListen動作を一時的に実行しない)。また、MFP10は、ポーリング信号を携帯端末50に送信しない(即ち、NFC I/F22がPoll動作を一時的に実行しない)。これにより、携帯端末50は、MFP10の離反を検知する。この結果、MFP10及び携帯端末50が近接している状態が維持されても、後述の通信リンクL2を適切に確立することができる。   Next, the MFP 10 selects an operation control method (S82). For example, when the OS information of the portable terminal 50 includes “T1” and “V1”, the MFP 10 selects the first hardware control (S82, see FIG. 3). For example, when the OS information of the portable terminal 50 includes “T1” and “V2”, the MFP 10 selects the second hardware control (S82, see FIG. 3). Next, the MFP 10 stops the operation of the NFC I / F 22 for 200 ms or 300 ms in accordance with the selected first hardware control or second hardware control (S84). That is, even if the MFP 10 receives a polling signal from the portable terminal 50, the MFP 10 does not transmit a response signal (that is, the NFC I / F 22 temporarily does not execute the Listen operation). Further, the MFP 10 does not transmit a polling signal to the portable terminal 50 (that is, the NFC I / F 22 does not temporarily execute the poll operation). Thereby, the portable terminal 50 detects the separation of the MFP 10. As a result, even if the MFP 10 and the portable terminal 50 are kept close to each other, a communication link L2 described later can be appropriately established.

その後、MFP10がListen動作を再び実行する(即ち携帯端末50がPoll動作を再び実行する)。MFP10は、携帯端末50からActivationコマンドを受信して(図4のS10)、OKコマンドを携帯端末50に送信する(図5のS62)。この結果、MFP10と携帯端末50との間に通信リンクL2が確立される。   Thereafter, the MFP 10 executes the Listen operation again (that is, the portable terminal 50 executes the Polling operation again). The MFP 10 receives the activation command from the portable terminal 50 (S10 in FIG. 4), and transmits an OK command to the portable terminal 50 (S62 in FIG. 5). As a result, a communication link L2 is established between the MFP 10 and the portable terminal 50.

第1の対象データが通信された際に、送信フラグが「1」に設定されている。従って、MFP10は、図5のS64でYESと判断し、第2の対象データを携帯端末50に送信する(S74)。この場合、MFP10は、送信フラグを「0」に設定し、継続フラグを「0」に設定する(S86)。   The transmission flag is set to “1” when the first target data is communicated. Accordingly, the MFP 10 determines YES in S64 of FIG. 5 and transmits the second target data to the portable terminal 50 (S74). In this case, the MFP 10 sets the transmission flag to “0” and sets the continuation flag to “0” (S86).

MFP10の現在の状況は「Listen終了」であり、MFP10のモードは「CE」である。従って、MFP10は、携帯端末50のOS情報に関わらず、第2のソフト切断を選択する(S88、図2参照)。次いで、MFP10は、選択済みの第2のソフト切断に従って、Deactivationコマンドを携帯端末50から受信して、OKコマンドを携帯端末50に送信する(S88)。この結果、通信リンクL2が切断される。   The current status of the MFP 10 is “Listen end”, and the mode of the MFP 10 is “CE”. Therefore, the MFP 10 selects the second soft disconnection regardless of the OS information of the portable terminal 50 (S88, see FIG. 2). Next, the MFP 10 receives the Deactivation command from the portable terminal 50 according to the selected second soft disconnection, and transmits an OK command to the portable terminal 50 (S88). As a result, the communication link L2 is disconnected.

上述したように、R/Wモード及びCEモードは、単方向通信のためのモードである。従って、同じ通信リンクL1を利用して、第1及び第2の対象データの両方を通信することができない。本実施例では、ケースEに示されるように、MFP10は、通信リンクL1を利用して、携帯端末50から第1の対象データを受信すると、通信リンクL1を切断する。次いで、MFP10は、通信リンクL2を再確立し、通信リンクL2を利用して、第2の対象データを携帯端末50に送信する。従って、MFP10及び携帯端末50がR/Wモード及びCEモードに従って動作する場合でも、MFP10は、第1の対象データと第2の対象データの両方を、携帯端末50と適切に通信することができる。即ち、MFP10は、擬似的な双方向通信を実現することができる。   As described above, the R / W mode and the CE mode are modes for unidirectional communication. Therefore, it is impossible to communicate both the first and second target data using the same communication link L1. In the present embodiment, as shown in Case E, when the MFP 10 receives the first target data from the mobile terminal 50 using the communication link L1, the MFP 10 disconnects the communication link L1. Next, the MFP 10 re-establishes the communication link L2, and transmits the second target data to the portable terminal 50 using the communication link L2. Therefore, even when the MFP 10 and the portable terminal 50 operate according to the R / W mode and the CE mode, the MFP 10 can appropriately communicate both the first target data and the second target data with the portable terminal 50. . That is, the MFP 10 can realize pseudo two-way communication.

本実施例では、図2に示されるように、「CE」に対応する切断手法として、携帯端末50のOS情報に関わらず、通信リンクを迅速に切断可能な「第2のソフト切断」が採用されている。このために、MFP10は、通信リンクを迅速に切断して、他の処理を迅速に実行することができる。   In this embodiment, as shown in FIG. 2, “second soft disconnection” that can quickly disconnect the communication link is adopted as a disconnection method corresponding to “CE” regardless of the OS information of the mobile terminal 50. Has been. Therefore, the MFP 10 can quickly disconnect the communication link and quickly execute other processing.

また、図3に示されるように、「Listen継続」と「CE」と「T1−V1」とに対応する動作制御手法として、「第1のハード制御」が採用されている。また、図3に示されるように、「Listen継続」と「CE」と「T1−V2」とに対応する動作制御手法として、「第2のハード制御」が採用されている。第1及び第2のハード制御の待機期間(即ち200ms及び300ms)は、携帯端末50が通信相手の離反を検知可能な期間に設定されている。OS情報「T1−V2」を有する携帯端末50が通信相手の離反を検知可能な期間は、OS情報「T1−V1」を有する携帯端末50が通信相手の離反を検知可能な期間よりも長い。このように、携帯端末50のOS情報に応じた第1又は第2のハード制御が実行されるために、MFP10は、携帯端末50に通信相手の離反を適切に検知させることができる。   Further, as shown in FIG. 3, “first hardware control” is adopted as an operation control method corresponding to “Listen continuation”, “CE”, and “T1-V1”. Further, as shown in FIG. 3, “second hardware control” is adopted as an operation control method corresponding to “Listen continuation”, “CE”, and “T1-V2”. The first and second hardware control standby periods (that is, 200 ms and 300 ms) are set to periods during which the portable terminal 50 can detect the separation of the communication partner. The period in which the portable terminal 50 having the OS information “T1-V2” can detect the separation of the communication partner is longer than the period in which the portable terminal 50 having the OS information “T1-V1” can detect the separation of the communication partner. As described above, since the first or second hardware control according to the OS information of the portable terminal 50 is executed, the MFP 10 can appropriately cause the portable terminal 50 to detect the separation of the communication partner.

なお、図12のシーケンス図には関係しないが、図3に示されるように、「Listen継続」と「CE」と「T2−V3」とに対応する動作制御手法として、「第2のハード制御」が採用されている。OS情報「T2−V3」を有する携帯端末50は、第2のハード制御が実行されると、通信相手の離反を検知することができる。MFP10は、携帯端末50に通信相手の離反を適切に検知させることができる。   Although not related to the sequence diagram of FIG. 12, as shown in FIG. 3, as the operation control method corresponding to “Listen continuation”, “CE”, and “T2-V3”, “second hardware control” Is adopted. When the second hardware control is executed, the portable terminal 50 having the OS information “T2-V3” can detect the separation of the communication partner. The MFP 10 can cause the portable terminal 50 to appropriately detect the separation of the communication partner.

また、図3に示されるように、「Listen終了」と「CE」とに対応する動作制御手法が記述されていない。これは、動作制御処理を実行しないことを意味する。複数個の対象データの一連の通信が終了しているために、携帯端末50のユーザは、携帯端末50をMFP10から離反させる。このために、動作制御処理が実行されなくても、携帯端末50は、通信相手の離反を検知することができる。従って、MFP10は、動作制御処理を実行しない。この結果、MFP10は、他の処理を迅速に実行することができる。   Further, as shown in FIG. 3, the operation control method corresponding to “Listen end” and “CE” is not described. This means that the operation control process is not executed. Since a series of communication of a plurality of target data has been completed, the user of the mobile terminal 50 moves the mobile terminal 50 away from the MFP 10. For this reason, even if the operation control process is not executed, the mobile terminal 50 can detect the separation of the communication partner. Therefore, the MFP 10 does not execute the operation control process. As a result, the MFP 10 can quickly execute other processes.

(その他のケース)
シーケンス図を省略しているが、図2に示されるように、「Poll継続」と「R/W」に対応する切断手法として、「第1のソフト切断」が採用されている。また、「Poll終了」と「R/W」に対応する切断手法として、「第1のソフト切断」が採用されている。このために、MFP10は、通信リンクを迅速に切断して、他の処理を迅速に実行することができる。
(Other cases)
Although the sequence diagram is omitted, as shown in FIG. 2, “first soft cutting” is adopted as a cutting method corresponding to “Poll continuation” and “R / W”. Further, “first soft cutting” is adopted as a cutting method corresponding to “Poll end” and “R / W”. Therefore, the MFP 10 can quickly disconnect the communication link and quickly execute other processing.

また、図3に示されるように、「Poll継続」と「T1−V1」と「R/W」とに対応する動作制御手法として、「第1のハード制御」が採用されている。また、「Poll継続」と「T2−V3」と「R/W」とに対応する動作制御手法として、「第2のハード制御」が採用されている。このように、携帯端末50のOS情報に応じた第1又は第2のハード制御が実行されるために、MFP10は、携帯端末50に通信相手の離反を適切に検出させることができる。なお、図3では、「Poll継続」と「T1−V2」と「R/W」とに対応する動作制御手法が記述されていない。OS情報「T1−V2」を有する携帯端末50は、通信リンクが切断されると、動作制御処理が実行されなくても、通信相手の離反を適切に検出することができる。従って、MFP10は、動作制御処理を実行しない。この結果、MFP10は、他の処理を迅速に実行することができる。   Further, as shown in FIG. 3, “first hardware control” is adopted as an operation control method corresponding to “Poll continuation”, “T1-V1”, and “R / W”. Further, “second hardware control” is adopted as an operation control method corresponding to “Poll continuation”, “T2-V3”, and “R / W”. As described above, since the first or second hardware control according to the OS information of the portable terminal 50 is executed, the MFP 10 can appropriately cause the portable terminal 50 to detect the separation of the communication partner. In FIG. 3, the operation control method corresponding to “Poll continuation”, “T1-V2”, and “R / W” is not described. When the communication link is disconnected, the portable terminal 50 having the OS information “T1-V2” can appropriately detect the separation of the communication partner even if the operation control process is not executed. Therefore, the MFP 10 does not execute the operation control process. As a result, the MFP 10 can quickly execute other processes.

また、図3に示されるように、「Poll終了」と「R/W」とに対応する動作制御手法が記述されていない。複数個の対象データの一連の通信が終了しているために、携帯端末50のユーザは、携帯端末50をMFP10から離反させる。このために、動作制御処理が実行されなくても、携帯端末50は、通信相手の離反を検知することができる。従って、MFP10は、動作制御処理を実行しない。この結果、MFP10は、他の処理を迅速に実行することができる。   Further, as shown in FIG. 3, the operation control method corresponding to “Poll end” and “R / W” is not described. Since a series of communication of a plurality of target data has been completed, the user of the mobile terminal 50 moves the mobile terminal 50 away from the MFP 10. For this reason, even if the operation control process is not executed, the mobile terminal 50 can detect the separation of the communication partner. Therefore, the MFP 10 does not execute the operation control process. As a result, the MFP 10 can quickly execute other processes.

(対応関係)
MFP10、携帯端末50が、それぞれ、「通信装置」、「外部装置」の一例である。Activationコマンドが、「第1の確立コマンド」及び「第2の確立コマンド」の一例である。Deactivationコマンドが、「切断コマンド」の一例である。通信リンクL1、通信リンクL2が、それぞれ、「第1の通信リンク」、「第2の通信リンク」の一例である。OS情報が、「関係情報」の一例である。また、図1のコマンドテーブル40が、「通信継続情報」の一例である。
(Correspondence)
The MFP 10 and the portable terminal 50 are examples of “communication device” and “external device”, respectively. The Activation command is an example of “first establishment command” and “second establishment command”. The Deactivation command is an example of a “disconnect command”. The communication link L1 and the communication link L2 are examples of the “first communication link” and the “second communication link”, respectively. The OS information is an example of “relation information”. The command table 40 in FIG. 1 is an example of “communication continuation information”.

また、OS情報「T1−V1」、OS情報「T1−V2」、OS情報「T2−V3」が、それぞれ、「第1の関係情報」、「第2の関係情報」、「第3の関係情報」の一例である。図8のケースAで選択される第1のハード切断、図9のケースBで選択される第1のソフト切断、図10のケースCで選択されるソフト+ハード切断、図11のケースDで選択される第2のハード切断、図12のケースEで選択される第2のソフト切断が、それぞれ、「第1種の切断手法」、「第2種の切断手法」、「第3種の切断手法」、「第4種の切断手法」、「第5種の切断手法」の一例である。図2の「Po11終了」又は「Listen終了」に対応する「第1のソフト制御」又は「第2のソフト制御」が、「予め決められている種類の切断手法」の一例である。また、第1のハード切断(又は第1のハード制御)の200ms、第2のハード切断(又は第2のハード制御)の300msが、それぞれ、「第1の期間」、「第2の期間」の一例である。   The OS information “T1-V1”, the OS information “T1-V2”, and the OS information “T2-V3” are respectively “first relation information”, “second relation information”, and “third relation”. It is an example of “information”. First hard cutting selected in case A in FIG. 8, first soft cutting selected in case B in FIG. 9, soft + hard cutting selected in case C in FIG. 10, in case D in FIG. The second hard cutting selected and the second soft cutting selected in case E of FIG. 12 are respectively “first type cutting method”, “second type cutting method”, “third type cutting method”. This is an example of “cutting method”, “fourth type cutting method”, and “fifth type cutting method”. “First soft control” or “second soft control” corresponding to “Po11 end” or “Listen end” in FIG. 2 is an example of a “predetermined type of cutting method”. Further, 200 ms for the first hard disconnection (or first hard control) and 300 ms for the second hard disconnection (or second hard control) are respectively “first period” and “second period”. It is an example.

図4のS10,S14、図5のS62、図6のS112,S114、図7のS160,S162が、「第1の確立ステップ(さらに第1の確立手段)」及び「第2の確立ステップ(さらに第2の確立手段)」の一例である。図4のS22、図5のS66、図6のS122、図7のS166が、「受信ステップ(さらに受信手段)」の一例である。図4のS24、図5のS68、図6のS124、図7のS168が、「生成ステップ(さらに生成手段)」の一例である。図4のS38、図5のS80,S88、図6のS138、図7のS180,S188が、「選択ステップ(さらに選択手段)」の一例である。図4のS40、図5のS80,S88、図6のS140、図7のS180,S188が、「切断ステップ(さらに切断手段)」の一例である。図4のS32、図5のS74、図6のS132、図7のS174が、「送信ステップ(さらに送信手段)」の一例である。図5のS82,S84、図7のS182,S184が、「動作制御ステップ」の一例である。また、図4のS26,S34、図5のS70,S76、図6のS126,S134、図7のS170,S176が、「判断ステップ」の一例である。   S10 and S14 in FIG. 4, S62 in FIG. 5, S112 and S114 in FIG. 6, and S160 and S162 in FIG. 7 are “first establishment step (further first establishment means)” and “second establishment step ( Furthermore, it is an example of “second establishing means”. S22 in FIG. 4, S66 in FIG. 5, S122 in FIG. 6, and S166 in FIG. 7 are examples of the “reception step (reception means)”. S24 in FIG. 4, S68 in FIG. 5, S124 in FIG. 6, and S168 in FIG. 7 are examples of “generating step (further generating means)”. S38 in FIG. 4, S80 and S88 in FIG. 5, S138 in FIG. 6, and S180 and S188 in FIG. 7 are examples of “selection step (further selection means)”. S40 in FIG. 4, S80 and S88 in FIG. 5, S140 in FIG. 6, and S180 and S188 in FIG. 7 are examples of “cutting step (further cutting means)”. S32 in FIG. 4, S74 in FIG. 5, S132 in FIG. 6, and S174 in FIG. 7 are examples of “transmission step (further transmission means)”. S82 and S84 in FIG. 5 and S182 and S184 in FIG. 7 are examples of the “operation control step”. Further, S26 and S34 in FIG. 4, S70 and S76 in FIG. 5, S126 and S134 in FIG. 6, and S170 and S176 in FIG.

以上、本発明の具体例を詳細に説明したが、これらは例示にすぎず、特許請求の範囲を限定するものではない。特許請求の範囲に記載の技術には以上に例示した具体例を様々に変形、変更したものが含まれる。上記の実施例の変形例を以下に列挙する。   Specific examples of the present invention have been described in detail above, but these are merely examples and do not limit the scope of the claims. The technology described in the claims includes various modifications and changes of the specific examples illustrated above. The modifications of the above embodiment are listed below.

(変形例1)「通信装置」は、印刷機能及びスキャン機能を実行可能な多機能機(即ちMFP10)に限られず、印刷機能及びスキャン機能のうちの印刷機能のみを実行可能なプリンタであってもよいし、印刷機能及びスキャン機能のうちのスキャン機能のみを実行可能なスキャナであってもよい。また、「通信装置」は、印刷機能及びスキャン機能とは異なる機能(例えば、画像の表示機能、データの演算機能)を実行する装置(例えば、PC、サーバ、携帯端末(携帯電話、スマートフォン、PDA等))であってもよい。即ち、「通信装置」は、NFC方式の通信を実行可能なあらゆるデバイスを含む。 (Modification 1) The “communication device” is not limited to a multi-function device (that is, the MFP 10) that can execute a print function and a scan function, and is a printer that can execute only the print function of the print function and the scan function. Alternatively, it may be a scanner that can execute only the scan function of the print function and the scan function. The “communication device” is a device (for example, a PC, a server, a mobile terminal (a mobile phone, a smartphone, a PDA) that executes a function (for example, an image display function, a data calculation function) different from the print function and the scan function. Etc.)). That is, the “communication apparatus” includes any device that can execute NFC communication.

(変形例2)「関係情報」は、OS情報に限られず、外部装置がNFC方式の通信を実行するための通信プログラムに関係する関係情報であれば、どのような情報であってもよい。例えば、「関係情報」は、携帯端末50に搭載されているプロトコルスタックを特定する特定情報(例えば、プロトコルスタックの識別番号、プロトコルスタックを提供する会社名等)であってもよい。また、例えば、「関係情報」は、携帯端末50のベンダ名であってもよい。本変形例では、図2及び図3のテーブル42,44において、OS情報の欄の代わりに、上記の特定情報の欄や上記のベンダ名の欄が設けられる。 (Modification 2) “Relational information” is not limited to OS information, and may be any information as long as it is related information related to a communication program for an external device to perform NFC communication. For example, the “related information” may be specific information (for example, the identification number of the protocol stack, the name of the company that provides the protocol stack, etc.) that identifies the protocol stack mounted on the portable terminal 50. For example, the “relation information” may be the vendor name of the mobile terminal 50. In this modification, in the tables 42 and 44 in FIGS. 2 and 3, the above-described specific information column and the above-described vendor name column are provided instead of the OS information column.

(変形例3)「複数種の切断手法」は、図2に記述されている5種の切断手法に限られず、携帯端末50のOS情報に応じた他の切断手法を含んでいてもよい。例えば、「複数種の切断手法」は、NFC I/F22の動作を、200ms又は300msとは異なる期間(例えば400ms)に亘って、一時的に停止させる第3のハード切断を含んでいてもよい。本変形例では、第1のハード切断、第3のハード切断が、それぞれ、「第1種の切断手法」、「第2種の切断手法」の一例である。一般的に言うと、第1種及び第2種の切断手法は、異なる切断手法であればよい。同様に、第1種及び第3種の切断手法(又は第1種及び第4種の切断手法)は、異なる切断手法であればよい。なお、第2種、第3種、及び、第4種の切断手法は、互いに異なる切断手法であってもよいし、同じ切断手法であってもよい。 (Modification 3) The “plural types of cutting methods” are not limited to the five types of cutting methods described in FIG. 2, and may include other cutting methods according to the OS information of the mobile terminal 50. For example, the “plurality of cutting methods” may include a third hard cutting that temporarily stops the operation of the NFC I / F 22 for a period (for example, 400 ms) different from 200 ms or 300 ms. . In the present modification, the first hard cutting and the third hard cutting are examples of the “first type cutting method” and the “second type cutting method”, respectively. Generally speaking, the first and second cutting methods may be different cutting methods. Similarly, the first and third cutting methods (or the first and fourth cutting methods) may be different cutting methods. Note that the second type, the third type, and the fourth type of cutting method may be different cutting methods or the same cutting method.

(変形例4)上記の各実施例では、図4〜図7の各処理がソフトウェア(即ちプログラム36,38)によって実現されるが、図4〜図7の各処理のうちの少なくとも1つが論理回路等のハードウェアによって実現されてもよい。 (Modification 4) In each of the above embodiments, each process of FIGS. 4 to 7 is realized by software (that is, programs 36 and 38). At least one of the processes of FIGS. It may be realized by hardware such as a circuit.

また、本明細書または図面に説明した技術要素は、単独であるいは各種の組合せによって技術的有用性を発揮するものであり、出願時請求項記載の組合せに限定されるものではない。また、本明細書または図面に例示した技術は複数目的を同時に達成するものであり、そのうちの一つの目的を達成すること自体で技術的有用性を持つものである。   The technical elements described in this specification or the drawings exhibit technical usefulness alone or in various combinations, and are not limited to the combinations described in the claims at the time of filing. In addition, the technology illustrated in the present specification or the drawings achieves a plurality of objects at the same time, and has technical utility by achieving one of the objects.

2:通信システム、10:多機能機(MFP)、30:制御部、32:CPU、34:メモリ、40:コマンドテーブル、42:切断手法テーブル、44:動作制御テーブル、50:携帯端末、L1,L2:通信リンク   2: Communication system, 10: Multi-function device (MFP), 30: Control unit, 32: CPU, 34: Memory, 40: Command table, 42: Cutting method table, 44: Operation control table, 50: Mobile terminal, L1 , L2: Communication link

Claims (14)

NFC(Near Field Communication)規格に従った通信方式であるNFC方式で、通信対象の対象データの通信を外部装置と実行する通信装置であって、
前記NFC方式の通信を実行するためのNFCインターフェースと、
プロセッサと、
プログラムを格納しているメモリと、を備え、
前記プロセッサは、前記メモリに格納されている前記プログラムに従って、以下の各ステップ、即ち、
前記通信装置と前記外部装置との間に第1の通信リンクを確立するための第1の確立コマンドを、前記NFCインターフェースを介して、前記外部装置と通信して、前記第1の通信リンクを確立する第1の確立ステップと、
前記第1の通信リンクを利用して、前記NFCインターフェースを介して、第1の対象データを前記外部装置から受信する受信ステップと、
前記受信ステップが実行された後に、前記第1の通信リンクを切断する第1の切断ステップと、前記第1の通信リンクが切断された後に、前記NFCインターフェースの動作を一時的に停止させる動作制御ステップと、を含む第1のNFC制御ステップと、
前記第1のNFC制御ステップが実行された後に、前記通信装置と前記外部装置との間に第2の通信リンクを確立するための第2の確立コマンドを、前記NFCインターフェースを介して、前記外部装置と通信して、前記第2の通信リンクを確立する第2の確立ステップと、
前記第2の通信リンクを利用して、前記NFCインターフェースを介して、第2の対象データを前記外部装置に送信する送信ステップと、
前記送信ステップが実行された後に、前記第2の通信リンクを切断する第2の切断ステップを含み、前記動作制御ステップを含まない第2のNFC制御ステップと、
を実行する、通信装置。
A communication device that performs communication of target data to be communicated with an external device in the NFC method, which is a communication method in accordance with the NFC (Near Field Communication) standard,
An NFC interface for executing the NFC communication;
A processor;
And a memory storing a program,
The processor performs the following steps according to the program stored in the memory:
A first establishment command for establishing a first communication link between the communication device and the external device is communicated with the external device via the NFC interface, and the first communication link is established. A first establishing step to establish;
By using the first communication link, and receiving steps via the NFC interface, it receives the first target data from the external device,
After the receiving step is performed, a first cutting step of cutting the pre-Symbol first communication link, after the first communication link is disconnected, the operation to temporarily stop the operation of the NFC interface A first NFC control step comprising: a control step;
After the first NFC control step is executed, a second establishment command for establishing a second communication link between the communication device and the external device is sent via the NFC interface to the external device. A second establishing step of communicating with a device to establish the second communication link;
Transmitting the second target data to the external device via the NFC interface using the second communication link;
A second NFC control step including a second disconnection step of disconnecting the second communication link after the transmission step is performed, and not including the operation control step;
A communication device for executing.
前記プロセッサは、前記第1の確立ステップが実行されても、前記第1のNFC制御ステップと、前記第2の確立ステップと、が実行されない限り、前記NFCインターフェースを介して、前記第2の対象データを前記外部装置に送信しない、請求項1に記載に通信装置。 Even if the first establishment step is executed, the processor does not execute the first NFC control step and the second establishment step through the NFC interface, unless the first NFC control step and the second establishment step are executed. The communication device according to claim 1 , wherein data is not transmitted to the external device. 前記動作制御ステップは、前記第1の通信リンクが切断された後に、前記NFCインターフェースの動作を停止させるための停止指示を前記NFCインターフェースに送信し、所定期間が経過した後に、前記NFCインターフェースの動作を再開させるための再開指示を前記NFCインターフェースに送信することによって、前記NFCインターフェースの動作を一時的に停止させる、請求項1又は2に記載の通信装置。 The operation control step transmits a stop instruction for stopping the operation of the NFC interface to the NFC interface after the first communication link is disconnected, and the operation of the NFC interface is performed after a predetermined period has elapsed. The communication apparatus according to claim 1 , wherein the operation of the NFC interface is temporarily stopped by transmitting a restart instruction for restarting the NFC interface to the NFC interface . 前記動作制御ステップは、前記第1の通信リンクが切断された後に、前記NFCインターフェースへの電力供給を所定期間に亘って停止させることによって、前記NFCインターフェースの動作を一時的に停止させる、請求項1又は2に記載の通信装置。 The operation control step temporarily stops the operation of the NFC interface by stopping power supply to the NFC interface for a predetermined period after the first communication link is disconnected. The communication apparatus according to 1 or 2 . 前記プロセッサは、
前記通信装置が前記NFC規格のReaderモードに従って動作すると共に、前記外部装置が前記NFC規格のCard Emulationモードに従って動作する状態で、前記受信ステップを実行し、
前記通信装置が前記NFC規格のP2Pモードに従って動作すると共に、前記外部装置が前記NFC規格のP2Pモードに従って動作する状態で、前記送信ステップを実行する、請求項1から4のいずれか一項に記載の通信装置。
The processor is
In the state where the communication device operates in accordance with the Reader mode of the NFC standard and the external device operates in accordance with the Card Emulsion mode of the NFC standard, the reception step is executed.
Together with the communication device operates in accordance P2P mode of the NFC standard, in a state in which the external device is operated in accordance P2P mode of the NFC standard, executing the transmitting step, according to any one of claims 1 4 Communication equipment.
前記第1の対象データは、前記外部装置が前記NFC方式の通信を実行するための通信プログラムに関係する関係情報を含み、
前記動作制御ステップは、
前記第1の対象データが、第1の通信プログラムの種類を示す第1の種類情報を含む場合に、前記第1の通信リンクが切断された後に、前記NFCインターフェースの動作を第1の期間に亘って一時的に停止させ、
前記第1の対象データが、前記第1の通信プログラムとは異なる第2の通信プログラムの種類を示す第2の種類情報を含む場合に、前記第1の通信リンクが切断された後に、前記NFCインターフェースの動作を前記第1の期間とは異なる第2の期間に亘って一時的に停止させる、請求項5に記載の通信装置。
The first target data includes related information related to a communication program for the external device to execute the NFC communication.
The operation control step includes
In a case where the first target data includes first type information indicating the type of the first communication program, the operation of the NFC interface is performed in the first period after the first communication link is disconnected. Temporarily stopped,
When the first target data includes second type information indicating a type of a second communication program different from the first communication program, the NFC is disconnected after the first communication link is disconnected. The communication device according to claim 5, wherein the operation of the interface is temporarily stopped over a second period different from the first period .
前記第1の対象データは、前記外部装置が前記NFC方式の通信を実行するための通信プログラムに関係する関係情報を含み、
前記動作制御ステップは、前記第1の対象データが、第1の通信プログラムの種類を示す第1の種類情報と、前記第1の通信プログラムの第1のバージョンを示す第1のバージョン情報と、を含む場合に、前記第1の通信リンクが切断された後に、前記NFCインターフェースの動作を一時的に停止させ、
前記プロセッサは、前記第1の対象データが、前記第1の通信プログラムの種類を示す前記第1の種類情報と、前記第1の通信プログラムの前記第1のバージョンとは異なる第2のバージョンを示す第2のバージョン情報と、を含む場合に、前記第1の通信リンクが切断された後に、前記NFCインターフェースの動作を一時的に停止させない、請求項5又は6に記載の通信装置。
The first target data includes related information related to a communication program for the external device to execute the NFC communication.
In the operation control step, the first target data includes first type information indicating a type of a first communication program, first version information indicating a first version of the first communication program, The NFC interface is temporarily stopped after the first communication link is disconnected,
In the processor, the first target data includes a first version information indicating a type of the first communication program and a second version different from the first version of the first communication program. 7. The communication device according to claim 5 , wherein when the first communication link is included, the operation of the NFC interface is not temporarily stopped after the first communication link is disconnected .
NFC(Near Field Communication)規格に従った通信方式であるNFC方式で、通信対象の対象データの通信を外部装置と実行する通信装置のためのコンピュータプログラムであって、
前記コンピュータプログラムは、前記通信装置のプロセッサに、以下の各ステップ、即ち、
前記通信装置と前記外部装置との間に第1の通信リンクを確立するための第1の確立コマンドを、前記NFCインターフェースを介して、前記外部装置と通信して、前記第1の通信リンクを確立する第1の確立ステップと、
前記第1の通信リンクを利用して、前記NFCインターフェースを介して、第1の対象データを前記外部装置から受信する受信ステップと、
前記受信ステップが実行された後に、前記第1の通信リンクを切断する第1の切断ステップと、前記第1の通信リンクが切断された後に、前記NFCインターフェースの動作を一時的に停止させる動作制御ステップと、を含む第1のNFC制御ステップと、
前記第1のNFC制御ステップが実行された後に、前記通信装置と前記外部装置との間に第2の通信リンクを確立するための第2の確立コマンドを、前記NFCインターフェースを介して、前記外部装置と通信して、前記第2の通信リンクを確立する第2の確立ステップと、
前記第2の通信リンクを利用して、前記NFCインターフェースを介して、第2の対象データを前記外部装置に送信する送信ステップと、
前記送信ステップが実行された後に、前記第2の通信リンクを切断する第2の切断ステップを含み、前記動作制御ステップを含まない第2のNFC制御ステップと、
を実行する、コンピュータプログラム。
A computer program for a communication device that performs communication of target data to be communicated with an external device in the NFC method, which is a communication method according to the NFC (Near Field Communication) standard,
The computer program causes the processor of the communication device to perform the following steps:
A first establishment command for establishing a first communication link between the communication device and the external device is communicated with the external device via the NFC interface, and the first communication link is established. A first establishing step to establish;
By using the first communication link, and receiving steps via the NFC interface, it receives the first target data from the external device,
After the receiving step is performed, a first cutting step of cutting the pre-Symbol first communication link, after the first communication link is disconnected, the operation to temporarily stop the operation of the NFC interface A first NFC control step comprising: a control step;
After the first NFC control step is executed, a second establishment command for establishing a second communication link between the communication device and the external device is sent via the NFC interface to the external device. A second establishing step of communicating with a device to establish the second communication link;
Transmitting the second target data to the external device via the NFC interface using the second communication link;
A second NFC control step including a second disconnection step of disconnecting the second communication link after the transmission step is performed, and not including the operation control step;
A computer program that executes.
NFC(Near Field Communication)規格に従った通信方式であるNFC方式で、通信対象の対象データの通信を外部装置と実行する通信装置であって、
前記NFC方式の通信を実行するためのNFCインターフェースと、
プロセッサと、
プログラムを格納しているメモリと、を備え、
前記プロセッサは、前記メモリに格納されている前記プログラムに従って、以下の各ステップ、即ち、
特定の情報を前記メモリに記憶させる記憶ステップであって、前記特定の情報は、前記外部装置から第1の対象データを受信することに応じて第2の対象データが前記外部装置に送信されるべきであるのか否かを判断するための情報である、前記記憶ステップと、
記NFCインターフェースを介して、前記外部装置と第1の通信リンクを確立する第1の確立ステップと、
前記第1の通信リンクを利用して、前記NFCインターフェースを介して、第1の対象データを前記外部装置から受信する受信ステップと、
前記第1の対象データを前記外部装置から受信することに応じて、前記特定の情報に基づいて、前記第2の対象データが前記外部装置に送信されるべきであるのか否かを判断する判断ステップと、
前記第2の対象データが前記外部装置に送信されるべきと判断される場合に、第1種の切断手法を利用して、前記第1の通信リンクを切断する第1の切断ステップと、
前記第1種の切断手法を利用して前記第1の通信リンクが切断された後に、前記NFCインターフェースを介して、前記外部装置と第2の通信リンクを確立する第2の確立ステップと、
前記第2の通信リンクを利用して、前記NFCインターフェースを介して、前記第2の対象データを前記外部装置に送信する送信ステップと、
前記第2の対象データが前記外部装置に送信されるべきでないと判断される場合に、前記第1種の切断手法とは異なる第2種の切断手法を利用して、前記第1の通信リンクを切断する第2の切断ステップと、
を実行する、通信装置。
A communication device that performs communication of target data to be communicated with an external device in the NFC method, which is a communication method in accordance with the NFC (Near Field Communication) standard,
An NFC interface for executing the NFC communication;
A processor;
And a memory storing a program,
The processor performs the following steps according to the program stored in the memory:
A step of storing specific information in the memory, wherein the specific information is transmitted as second target data to the external device in response to receiving the first target data from the external device; The storage step, which is information for determining whether or not
Through the pre-Symbol NFC interface, the first establishing step of establishing a first communication link with the external device,
Receiving the first target data from the external device via the NFC interface using the first communication link;
Judging whether or not the second target data should be transmitted to the external device based on the specific information in response to receiving the first target data from the external device Steps,
A first disconnecting step of disconnecting the first communication link using a first type disconnection method when it is determined that the second target data is to be transmitted to the external device ;
After the using the first type of cutting technique first communication link is disconnected, via the NFC interface, a second establishing step of establishing a second communication link with the external device,
Transmitting the second target data to the external device via the NFC interface using the second communication link;
When it is determined that the second target data should not be transmitted to the external device, the first communication link is made using a second type of disconnection method different from the first type of disconnection method. A second cutting step of cutting
A communication device for executing .
前記第1の切断ステップは、複数個の第1種の切断手法のうちの1個の第1種の切断手法を利用して、前記第1の通信リンクを切断し、
前記第2の切断ステップは、予め決められている1個の切断手法である前記第2種の切断手法を利用して、前記第1の通信リンクを切断する、請求項9に記載の通信装置。
The first disconnecting step disconnects the first communication link by using one first type disconnection method among a plurality of first type disconnection methods,
The communication device according to claim 9, wherein the second disconnecting step disconnects the first communication link by using the second type of disconnection method which is a predetermined one disconnection method. .
前記第1の対象データは、前記外部装置が前記NFC方式の通信を実行するための通信プログラムに関係する関係情報を含み、
前記プロセッサは、さらに、
前記第2の対象データが前記外部装置に送信されるべきと判断される場合に、前記複数個の第1種の切断手法の中から前記1個の第1種の切断手法を選択する選択ステップを実行し、
前記第1の切断ステップは、選択済みの前記1個の第1種の切断手法を利用して、前記第1の通信リンクを切断し、
前記選択ステップは、
前記第1の対象データが、第1の通信プログラムの種類を示す第1の種類情報を含む場合に、前記複数個の第1種の切断手法のうちの第1の手法を前記1個の第1種の切断手法として選択し、
前記第1の対象データが、前記第1の通信プログラムとは異なる第2の通信プログラムの種類を示す第2の種類情報を含む場合に、前記複数個の第1種の切断手法のうちの前記第1の手法とは異なる第2の手法を前記1個の第1種の切断手法として選択する、請求項10に記載の通信装置。
The first target data includes related information related to a communication program for the external device to execute the NFC communication.
The processor further includes:
A selection step of selecting the one first type cutting method from the plurality of first type cutting methods when it is determined that the second target data should be transmitted to the external device. Run
The first disconnecting step disconnects the first communication link using the selected one first type disconnection method,
The selection step includes
When the first target data includes first type information indicating the type of the first communication program, the first method of the plurality of first type cutting methods is changed to the one first type. Select as one cutting method,
In the case where the first target data includes second type information indicating a type of a second communication program different from the first communication program, the cutting method among the plurality of first type cutting methods. The communication apparatus according to claim 10 , wherein a second method different from the first method is selected as the one first-type cutting method .
前記第1の対象データは、前記外部装置が前記NFC方式の通信を実行するための通信プログラムに関係する関係情報を含み、The first target data includes related information related to a communication program for the external device to execute the NFC communication.
前記プロセッサは、さらに、The processor further includes:
前記第2の対象データが前記外部装置に送信されるべきと判断される場合に、前記複数個の第1種の切断手法の中から前記1個の第1種の切断手法を選択する選択ステップを実行し、A selection step of selecting the one first type cutting method from the plurality of first type cutting methods when it is determined that the second target data should be transmitted to the external device. Run
前記第1の切断ステップは、選択済みの前記1個の第1種の切断手法を利用して、前記第1の通信リンクを切断し、The first disconnecting step disconnects the first communication link using the selected one first type disconnection method,
前記選択ステップは、The selection step includes
前記第1の対象データが、第1の通信プログラムの種類を示す第1の種類情報と、前記第1の通信プログラムの第1のバージョンを示す第1のバージョン情報と、を含む場合に、前記複数個の第1種の切断手法のうちの第3の手法を前記1個の第1種の切断手法として選択し、When the first target data includes first type information indicating a type of the first communication program and first version information indicating a first version of the first communication program, Selecting a third method of the plurality of first-type cutting methods as the one first-type cutting method;
前記第1の対象データが、前記第1の種類情報と、前記第1の通信プログラムの前記第1のバージョンとは異なる第2のバージョンを示す第2のバージョン情報と、を含む場合に、前記複数個の第1種の切断手法のうちの前記第3の手法とは異なる第4の手法を前記1個の第1種の切断手法として選択する、請求項10又は11に記載の通信装置。When the first target data includes the first type information and second version information indicating a second version different from the first version of the first communication program, The communication apparatus according to claim 10 or 11, wherein a fourth method different from the third method among a plurality of first type cutting methods is selected as the one first type cutting method.
前記プロセッサは、The processor is
前記通信装置が前記NFC規格のP2Pモードに従って動作すると共に、前記外部装置が前記NFC規格のP2Pモードに従って動作する状態で、前記受信ステップを実行し、The communication device operates in accordance with the NFC standard P2P mode and the external device operates in accordance with the NFC standard P2P mode.
前記通信装置が前記NFC規格のP2Pモードに従って動作すると共に、前記外部装置が前記NFC規格のP2Pモードに従って動作する状態で、前記送信ステップを実行する、請求項9から12のいずれか一項に記載の通信装置。13. The transmission step according to claim 9, wherein the transmission step is executed in a state where the communication device operates in accordance with the P2P mode of the NFC standard and the external device operates in accordance with the P2P mode of the NFC standard. Communication equipment.
NFC(Near Field Communication)規格に従った通信方式であるNFC方式で、通信対象の対象データの通信を外部装置と実行する通信装置のためのコンピュータプログラムであって、
前記コンピュータプログラムは、前記通信装置のプロセッサに、以下の各ステップ、即ち、
特定の情報をメモリに記憶させる記憶ステップであって、前記特定の情報は、前記外部装置から第1の対象データを受信することに応じて第2の対象データが前記外部装置に送信されるべきであるのか否かを判断するための情報である、前記記憶ステップと、
記外部装置と第1の通信リンクを確立する第1の確立ステップと、
前記第1の通信リンクを利用して、第1の対象データを前記外部装置から受信する受信ステップと
前記第1の対象データを前記外部装置から受信することに応じて、前記特定の情報に基づいて、前記第2の対象データが前記外部装置に送信されるべきであるのか否かを判断する判断ステップと、
前記第2の対象データが前記外部装置に送信されるべきと判断される場合に、第1種の切断手法を利用して、前記第1の通信リンクを切断する第1の切断ステップと、
前記第1種の切断手法を利用して前記第1の通信リンクが切断された後に、前記通信装置と前記外部装置との間に前記NFC方式に従った第2の通信リンクを確立するための第2の確立コマンドを、前記外部装置と第2の通信リンクを確立する第2の確立ステップと、
前記第2の通信リンクを利用して、前記第2の対象データを前記外部装置に送信する送信ステップと、
前記第2の対象データが前記外部装置に送信されるべきでないと判断される場合に、前記第1種の切断手法とは異なる第2種の切断手法を利用して、前記第1の通信リンクを切断する第2の切断ステップと、
を実行させるコンピュータプログラム。
A computer program for a communication device that performs communication of target data to be communicated with an external device in the NFC method, which is a communication method according to the NFC (Near Field Communication) standard,
The computer program causes the processor of the communication device to perform the following steps:
A step of storing specific information in a memory, wherein the specific information is a second target data to be transmitted to the external device in response to receiving the first target data from the external device; The storage step, which is information for determining whether or not
A first establishing step of establishing a first communication link with the previous Kigaibu device,
By using the first communication link, and receiving steps of the first object data received from said external device,
Judging whether or not the second target data should be transmitted to the external device based on the specific information in response to receiving the first target data from the external device Steps,
A first disconnecting step of disconnecting the first communication link using a first type disconnection method when it is determined that the second target data is to be transmitted to the external device ;
For establishing a second communication link according to the NFC scheme between the communication device and the external device after the first communication link is disconnected using the first type disconnection method a second establishing command, the second establishing step of establishing a second communication link with the external device,
Transmitting the second target data to the external device using the second communication link;
When it is determined that the second target data should not be transmitted to the external device, the first communication link is made using a second type of disconnection method different from the first type of disconnection method. A second cutting step of cutting
A computer program that executes
JP2016232589A 2016-11-30 2016-11-30 Communication device Active JP6264436B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2016232589A JP6264436B2 (en) 2016-11-30 2016-11-30 Communication device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2016232589A JP6264436B2 (en) 2016-11-30 2016-11-30 Communication device

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2016000954A Division JP6052438B2 (en) 2016-01-06 2016-01-06 Communication device

Publications (2)

Publication Number Publication Date
JP2017085588A JP2017085588A (en) 2017-05-18
JP6264436B2 true JP6264436B2 (en) 2018-01-24

Family

ID=58713363

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2016232589A Active JP6264436B2 (en) 2016-11-30 2016-11-30 Communication device

Country Status (1)

Country Link
JP (1) JP6264436B2 (en)

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008252212A (en) * 2007-03-29 2008-10-16 Fujifilm Corp Information communication system and method
JP4524703B2 (en) * 2008-02-29 2010-08-18 ソニー株式会社 Information processing apparatus and method, and program
JP5049900B2 (en) * 2008-06-30 2012-10-17 キヤノン株式会社 SETTING DEVICE, IMAGE OUTPUT DEVICE, CONTROL METHOD AND PROGRAM THEREOF
JP2011044092A (en) * 2009-08-24 2011-03-03 Ricoh Co Ltd Communication system, information processing device, information processing method, and information processing program
US8224246B2 (en) * 2010-05-10 2012-07-17 Nokia Corporation Device to device connection setup using near-field communication

Also Published As

Publication number Publication date
JP2017085588A (en) 2017-05-18

Similar Documents

Publication Publication Date Title
US11381280B2 (en) Communication device
JP5867319B2 (en) Communication device
JP6123416B2 (en) Communication device
JP6264436B2 (en) Communication device
JP6195004B2 (en) Communication device
JP6052438B2 (en) Communication device
JP2018137584A (en) Communication device and computer program for terminal device
JP6673448B2 (en) Communication device
JP6443512B2 (en) Communication device
JP6919738B2 (en) Communication device
JP6168201B2 (en) Communication device
JP6337984B2 (en) Communication device
JP6070880B2 (en) Communication device
JP6414283B2 (en) Communication device
JP6406364B2 (en) Communication device
JP2022059043A (en) Communication device
JP2016028536A (en) Communication device

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20171031

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: 20171121

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20171204

R150 Certificate of patent or registration of utility model

Ref document number: 6264436

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150