JP6742812B2 - Communication device, control method thereof, and program - Google Patents

Communication device, control method thereof, and program Download PDF

Info

Publication number
JP6742812B2
JP6742812B2 JP2016101793A JP2016101793A JP6742812B2 JP 6742812 B2 JP6742812 B2 JP 6742812B2 JP 2016101793 A JP2016101793 A JP 2016101793A JP 2016101793 A JP2016101793 A JP 2016101793A JP 6742812 B2 JP6742812 B2 JP 6742812B2
Authority
JP
Japan
Prior art keywords
connection
communication
communication device
external device
search
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
JP2016101793A
Other languages
Japanese (ja)
Other versions
JP2017208777A (en
JP2017208777A5 (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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP2016101793A priority Critical patent/JP6742812B2/en
Publication of JP2017208777A publication Critical patent/JP2017208777A/en
Publication of JP2017208777A5 publication Critical patent/JP2017208777A5/ja
Application granted granted Critical
Publication of JP6742812B2 publication Critical patent/JP6742812B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、通信装置及びその制御方法、プログラムに関するものである。 The present invention relates to a communication device, a control method thereof, and a program.

無線ルーター(外部アクセスポイント)等の外部装置を介した端末装置との接続(以後、インフラ接続)と、外部装置を介さない端末装置との直接的な接続(以後、P2P接続)とを同時に(並行して)確立可能な通信装置が知られている。なお、前述のようにして、2種類の接続を同時に(並行して)確立した状態を維持して動作することを、以後、同時動作という。このような通信装置は、外部装置との接続が切断された場合、当該外部装置と再度接続するために、外部装置を検索する処理を行う。 A connection with a terminal device via an external device such as a wireless router (external access point) (hereinafter, infrastructure connection) and a direct connection with the terminal device without an external device (hereinafter, P2P connection) are simultaneously performed ( In parallel, communication devices that can be established are known. Note that, as described above, the operation in which the two types of connections are simultaneously (parallelly) established and maintained is hereinafter referred to as simultaneous operation. When the connection with the external device is disconnected, such a communication device performs a process of searching for the external device in order to reconnect with the external device.

特許文献1は、同時動作している状態でアクセスポイント(AP)との接続が切断された場合に、端末装置との直接的な接続に使用されているチャネルによってAPを検索する装置を開示している。また、特許文献1は、端末装置との直接的な接続に使用されているチャネルによるAPの検索によってAPを検出できなかった場合、使用可能なチャネルを順に使用してAPを検索する装置を開示している。 Patent Document 1 discloses a device that searches for an AP by a channel used for a direct connection with a terminal device when the connection with an access point (AP) is disconnected while operating simultaneously. ing. Further, Patent Document 1 discloses a device that searches for an AP by sequentially using available channels when an AP cannot be detected by searching for an AP using a channel used for direct connection with a terminal device. doing.

特開2014−216956号公報JP, 2014-216956, A

ところで、同時動作している状態でインフラ接続が切断された場合に実行される外部装置の検索中は、例えば、P2P接続している端末装置との通信においてパケットロス等が生じるおそれがある。そのため、同時動作している状態でインフラ接続が切断された場合には、例えば、P2P接続している端末装置と通信装置との通信状態を適宜取得可能な制御手段が、当該通信状態を考慮して外部装置の検索を行うことが望ましい。一方で、P2P接続していない状態でインフラ接続が切断された場合には、P2P接続している端末装置と通信装置との通信状態を考慮した制御が必要ない。それにも係わらず、P2P接続していない状態でインフラ接続が切断された場合も、同時動作している状態でインフラ接続が切断された場合も、同一の制御手段が外部装置を検索すると、当該制御手段に負荷が集中してしまう。今日、特許文献1のような、通信装置の多機能化等に伴い、通信装置内の制御手段にかかる負荷を分散させ、外部装置の検索時における通信装置全体としてのパフォーマンスを向上させることが以前にも増して要望されている。 By the way, during the search of the external device which is executed when the infrastructure connection is disconnected in the state of simultaneous operation, for example, packet loss may occur in communication with the P2P-connected terminal device. Therefore, when the infrastructure connection is disconnected while operating simultaneously, for example, the control unit that can appropriately acquire the communication state between the P2P-connected terminal device and the communication device considers the communication state. It is desirable to search external devices. On the other hand, when the infrastructure connection is disconnected while the P2P connection is not made, it is not necessary to perform control in consideration of the communication state between the P2P connected terminal device and the communication device. Nevertheless, regardless of whether the infrastructure connection is disconnected while the P2P connection is not made or when the infrastructure connection is disconnected while the P2P connection is operating simultaneously, when the same control unit searches for the external device, the control is performed. The load is concentrated on the means. In recent years, with the multi-functionalization of communication devices as in Patent Document 1, it has been previously attempted to distribute the load on the control means in the communication device and improve the performance of the entire communication device when searching for external devices. More demanded.

そこで、本発明は、外部装置を検索する処理にかかる負荷を分散させることができ、且つ通信装置の通信状態に応じた方法で外部装置の検索を実行できる通信装置、その制御方法及びプログラムを提供することを目的とする。 Therefore, the present invention provides a communication device that can disperse the load on the process of searching for an external device and that can search the external device by a method according to the communication state of the communication device, a control method thereof, and a program. The purpose is to

上記課題を解決するため、本発明にかかる通信装置は、通信装置であって、
前記通信装置が使用可能なチャネルのうち、所定のチャネルを用いた外部装置と前記通信装置との第1の無線ネットワークにおける接続を確立させ、前記所定のチャネルを用いた端末装置と前記通信装置との第2の無線ネットワークにおける接続を確立させる接続手段と、
前記端末装置と前記通信装置との通信状態を取得し、前記通信状態に基づいた制御を行う第1制御手段と、
前記第1の制御手段と異なる第2の制御手段と、を有し、
前記所定のチャネルを用いた前記外部装置と前記通信装置との前記第1の無線ネットワークにおける接続と、前記所定のチャネルを用いた前記端末装置と前記通信装置との前記第2の無線ネットワークにおける接続が並行して確立されている状態で、前記所定のチャネルを用いた前記外部装置と前記通信装置との接続が切断された場合、前記第1制御手段が、前記第1制御手段が実行可能な複数の検索方法のうち前記端末装置と前記通信装置との通信状態に応じて特定される検索方法で前記外部装置を検索し、
前記所定のチャネルを用いた前記外部装置と前記通信装置との前記第1の無線ネットワークにおける接続が確立されており、前記所定のチャネルを用いた前記端末装置と前記通信装置との前記第2の無線ネットワークにおける接続が確立されていない状態で、前記所定のチャネルを用いた前記外部装置と前記通信装置との接続が切断された場合、前記第2の制御手段が、前記端末装置と前記通信装置との通信状態にかかわらず所定の方法で前記外部装置を検索することを特徴とする。
In order to solve the above problems, a communication device according to the present invention is a communication device,
Of the channels usable by the communication device, a connection is established between the external device and the communication device in a first wireless network using a predetermined channel, and the terminal device and the communication device are used in the predetermined channel. Connection means for establishing a connection in the second wireless network of
And acquires the communication state between the terminal device and the communication device, a first control means for performing control based on the communication state,
A second control means different from the first control means,
Connection of the external device and the communication device in the first wireless network using the predetermined channel, and connection of the terminal device and the communication device in the second wireless network using the predetermined channel while There has been established in parallel, when the connection with the external device using the predetermined channel and the communication device is disconnected, the first control means, said first control means executes Searching the external device by a search method specified according to the communication state between the terminal device and the communication device among a plurality of possible search methods,
A connection in the first wireless network is established between the external device and the communication device using the predetermined channel, and the second device is connected to the terminal device and the communication device using the predetermined channel. When the connection between the external device and the communication device using the predetermined channel is disconnected in a state where the connection in the wireless network is not established, the second control unit causes the second control unit to communicate with the terminal device and the communication device. The external device is searched by a predetermined method regardless of the communication state with the external device.

本発明によると、外部装置を検索する処理にかかる負荷を分散させることができ、且つ通信装置の通信状態に応じた方法で外部装置の検索を実行できる。 ADVANTAGE OF THE INVENTION According to this invention, the load concerning the process which searches an external device can be disperse|distributed, and an external device search can be performed by the method according to the communication state of a communication device.

通信システムの構成の一例を示す図である。It is a figure which shows an example of a structure of a communication system. 端末装置の外観の一例を示す図である。It is a figure which shows an example of the external appearance of a terminal device. MFPの外観の一例を示す図である。FIG. 3 is a diagram showing an example of an external appearance of an MFP. MFPの操作表示部に表示される画面の一例を示す図である。FIG. 6 is a diagram illustrating an example of a screen displayed on the operation display unit of the MFP. 端末装置の構成を示すブロック図であるIt is a block diagram which shows the structure of a terminal device. MFPの構成を示すブロック図である。FIG. 3 is a block diagram showing the configuration of the MFP. ソフトウェアAPモードにおける無線接続シーケンスを示す図である。It is a figure which shows the wireless connection sequence in software AP mode. WFDモードにおける無線接続シーケンスを示す図である。It is a figure which shows the wireless connection sequence in WFD mode. インフラストラクチャモードにおける無線接続シーケンスを示す図である。It is a figure which shows the wireless connection sequence in an infrastructure mode. MFPのドメイン構成を示すソフトウエア構成図である。It is a software block diagram which shows the domain structure of MFP. メインシステムのCPUがI/F接続Mgrタスクによって実行する処理を示すフローチャートである。It is a flow chart which shows processing which a CPU of a main system performs by an I/F connection Mgr task. メインシステムのCPUがコントロールAPIタスクによって実行する処理を示すフローチャートを示す図である。It is a figure which shows the flowchart which shows the process which a CPU of a main system performs by a control API task. I/FドメインとNWサブシステム間のコントロールAPIの制御フロー図である。It is a control flow diagram of a control API between the I/F domain and the NW subsystem. APサーチの実行パターンを示すテーブルを示す図である。It is a figure which shows the table which shows the execution pattern of AP search. NWサブシステムのCPUによって実行されるインフラ接続処理を示すフローチャートである。It is a flowchart which shows the infrastructure connection process performed by CPU of a NW subsystem. メインシステムのCPUがI/F接続Mgrタスクによって実行する処理を示すフローチャートである。It is a flow chart which shows processing which a CPU of a main system performs by an I/F connection Mgr task. MFPが同時動作している状態で、MFPとアクセスポイント400との接続が切断された場合に行われる再接続処理のシーケンスを示す図である。FIG. 9 is a diagram showing a sequence of reconnection processing performed when the connection between the MFP and the access point 400 is disconnected while the MFPs are simultaneously operating. MFPが、切断されたインフラ接続に使用していたチャネル以外のチャネルによってアクセスポイントを検索する処理を含む再接続処理のシーケンスを示す図である。FIG. 6 is a diagram showing a sequence of reconnection processing including a processing in which the MFP searches for an access point by a channel other than the channel used for the disconnected infrastructure connection.

以下に、図面を参照しながら、本発明の実施形態を例示的に詳しく説明する。但し、本実施形態に記載されている構成要素の相対配置、表示画面等は、特に、特定的な記載がない限りは、この発明の範囲をそれらのみに限定する趣旨のものではない。 Embodiments of the present invention will be illustratively described in detail below with reference to the drawings. However, the relative arrangement of the constituent elements, the display screen, and the like described in the present embodiment are not intended to limit the scope of the present invention to them unless otherwise specified.

(第1実施形態)
本実施形態の端末装置及び通信装置について説明する。端末装置として、本実施形態ではスマートホンを例示している。スマートホンとは、携帯電話の機能の他に、カメラや、ウェブブラウザ、電子メール機能等を搭載した多機能型の携帯電話のことである。なお、本発明を適用可能な端末装置は、スマートホンに限定されず、後述の通信装置と通信可能な装置であれば良い。例えば、端末装置として、デジタルカメラ、携帯端末、ノートPC、タブレット端末、PDA(Personal Digital Assistant)、音楽再生デバイス等を適用可能である。また、通信装置として、本実施形態では、複写機能、FAX機能、印刷機能を備えるマルチファンクションペリフェラル(以後、MFP)を例示しているが、これに限定されず、端末装置と通信を行うことが可能な装置であれば、種々のものを適用可能である。例えば、プリンタであれば、インクジェットプリンタ、フルカラーレーザービームプリンタ、モノクロプリンタ等を適用可能である。また、プリンタのみならず複写機やファクシミリ装置、スマートホン、携帯端末、ノートPC、タブレット端末、PDA、デジタルカメラ、音楽再生デバイス、ストレージ等も適用可能である。その他、単一の機能を備えるシングルファンクションプリンタ(以後、SFP)も適用可能である。
(First embodiment)
The terminal device and the communication device of this embodiment will be described. In the present embodiment, a smartphone is exemplified as the terminal device. A smart phone is a multifunctional mobile phone equipped with a camera, a web browser, an electronic mail function, and the like in addition to the functions of the mobile phone. The terminal device to which the present invention can be applied is not limited to the smart phone, and may be any device that can communicate with the communication device described below. For example, a digital camera, a mobile terminal, a notebook PC, a tablet terminal, a PDA (Personal Digital Assistant), a music playback device, or the like can be applied as the terminal device. Further, in the present embodiment, a multi-function peripheral (hereinafter, referred to as an MFP) having a copy function, a FAX function, and a print function is illustrated as the communication device, but the communication device is not limited to this, and can communicate with a terminal device. Various devices can be applied as long as they are possible devices. For example, if it is a printer, an inkjet printer, a full-color laser beam printer, a monochrome printer, etc. can be applied. Further, not only a printer but also a copying machine, a facsimile machine, a smart phone, a mobile terminal, a notebook PC, a tablet terminal, a PDA, a digital camera, a music reproducing device, a storage, etc. are applicable. In addition, a single function printer (hereinafter, SFP) having a single function is also applicable.

<システム構成>
まず、本実施形態を実現するためのシステム構成について、図1〜図6を用いて説明する。
<System configuration>
First, a system configuration for realizing the present embodiment will be described with reference to FIGS.

図1は、本実施形態の通信システムの構成を示す図である。このシステムは、アクセスポイント400、端末装置200及びMFP300を含むものとする。 FIG. 1 is a diagram showing the configuration of the communication system of the present embodiment. This system includes an access point 400, a terminal device 200, and an MFP 300.

端末装置200は、本実施形態の端末装置である。MFP300は、本実施形態の通信装置である。また、MFP300と端末装置200は、それぞれの装置外部のアクセスポイント400を介してWLAN(Wireless Local Area Network)接続し、相互に通信することが可能である。また、MFP300や端末装置200は、それぞれの装置自身がアクセスポイントとして動作することもできる。そのため、例えばどちらか一方の装置がアクセスポイントとなり、もう一方の装置が当該アクセスポイントに接続することで、端末装置200とMFP300はアクセスポイント400を介さずに直接無線LAN接続することも可能である。また、端末装置200とMFP300は共にWLANの機能を有するため、認証処理を実行することによってピアツーピア(以後、P2P)の通信が可能となる。なお、各装置は、アクセスポイントとして動作する場合、通信相手の装置と無線LANを形成し、ビーコン(Beacon)信号を定期的に送信する。さらに、各装置は、アクセスポイントとして動作する場合、無線通信のために使用されるチャネルを決定したり、通信相手の装置から送信される接続情報(パスワード等)の認証処理を行う。 The terminal device 200 is the terminal device of the present embodiment. The MFP 300 is the communication device of this embodiment. Further, the MFP 300 and the terminal device 200 can communicate with each other through a WLAN (Wireless Local Area Network) connection via an access point 400 outside each device. Further, each of the MFP 300 and the terminal device 200 can operate as an access point. Therefore, for example, when one of the devices serves as an access point and the other device connects to the access point, the terminal device 200 and the MFP 300 can be directly connected to the wireless LAN without the access point 400. .. Further, since both the terminal device 200 and the MFP 300 have a WLAN function, it is possible to perform peer-to-peer (hereinafter, P2P) communication by executing the authentication process. When each device operates as an access point, each device forms a wireless LAN with a device of a communication partner, and periodically transmits a beacon signal. Further, when each device operates as an access point, each device determines a channel used for wireless communication, and performs authentication processing of connection information (password and the like) transmitted from a communication partner device.

アクセスポイントとクライアントから構成される無線通信システムについて説明する。アクセスポイントとなる装置は、まず、ビーコン信号を送信する。そして、クライアントは、ビーコン信号を受信すると、アクセスポイントに機器探索コマンド(Probe Requestフレーム)を送信して通信相手となる装置(通信相手装置)を探索して発見する。探索側の装置は、機器探索コマンドに、種々の属性(パラメータ)を付随することが可能である。特にP2P無線接続の場合には、機器探索コマンドに、P2P無線接続に関する情報(P2Pエレメント)が含まれている。して、アクセスポイントが、受信した機器探索コマンドを参照して応答コマンド(Probe Responseフレーム)を送信すると、相互に相手側の装置を発見することができる(装置探索(Discovery))。以降、装置の種類を示す機器情報やIPアドレスの確認等のシーケンスが実行され、その後に、印刷等の各種アプリケーションの実行が可能となる。 A wireless communication system including an access point and clients will be described. The device serving as an access point first transmits a beacon signal. When the client receives the beacon signal, the client transmits a device search command (Probe Request frame) to the access point to search for and discover a device (communication partner device) as a communication partner. The device on the search side can attach various attributes (parameters) to the device search command. Particularly in the case of P2P wireless connection, the device search command includes information (P2P element) related to P2P wireless connection. Then, when the access point transmits a response command (Probe Response frame) with reference to the received device search command, it is possible to mutually discover the devices on the other side (device search (Discovery)). After that, a sequence such as confirmation of device information indicating the type of device and an IP address is executed, and then various applications such as printing can be executed.

図2は端末装置200の外観を示す図である。 FIG. 2 is a view showing the outer appearance of the terminal device 200.

WLANユニット201は、WLANによって無線通信を行うためのユニットである。WLANユニット201は、例えばIEEE802.11シリーズに準拠したWLANシステムにおけるデータ(パケット)通信が可能であるものとする。すなわち、WLANユニット201は、例えば、Wi−Fi(登録商標)による通信を実行可能であるものとする。WLANユニット201は、WLAN接続を確立するための、ビーコン検知処理や認証処理、WLAN接続を確立した通信装置への印刷ジョブの送信等の機能を担う。また、WLANユニット201は、Wi−Fi Direct(WFD)をベースにした通信、ソフトウェアAPモード、アドホックモード、インフラストラクチャモードによる通信などが可能である。Wi−Fi Direct(WFD)をベースにした通信、ソフトウェアAPモードによる通信、アドホックモードによる通信とは、アクセスポイントとして動作している通信相手の装置(MFP300等)とダイレクトに(中継装置を介さず)通信することを指す。また、インフラストラクチャモードによる通信とは、ネットワーク上に設置された端末装置200外部の中継装置(アクセスポイント400等)を介して、通信相手の装置と通信することを指す。 The WLAN unit 201 is a unit for performing wireless communication by WLAN. The WLAN unit 201 is assumed to be capable of data (packet) communication in a WLAN system conforming to the IEEE 802.11 series, for example. That is, it is assumed that the WLAN unit 201 can execute communication by Wi-Fi (registered trademark), for example. The WLAN unit 201 has functions such as beacon detection processing and authentication processing for establishing a WLAN connection, and transmission of a print job to a communication device that has established a WLAN connection. Further, the WLAN unit 201 is capable of communication based on Wi-Fi Direct (WFD), software AP mode, ad hoc mode, infrastructure mode communication, and the like. Wi-Fi Direct (WFD)-based communication, software AP mode communication, and ad hoc mode communication are direct communication with a communication partner device (such as the MFP 300) operating as an access point (without passing through a relay device). ) Refers to communicating. In addition, the communication in the infrastructure mode refers to communication with a communication partner device via a relay device (access point 400 or the like) outside the terminal device 200 installed on the network.

表示部202は、例えば、LCD方式の表示機構を備えたディスプレイである。具体的には、表示部202は、ボタンアイコンやソフトウェアキーボードの表示を行う。 The display unit 202 is, for example, a display including an LCD type display mechanism. Specifically, the display unit 202 displays a button icon and a software keyboard.

操作部203は、タッチパネル方式の操作機構を備えており、ユーザによる操作を検知する。具体的には、操作部203は、表示部202が表示するボタンアイコンやソフトウェアキーボードにユーザが触れることによって発生する操作イベントを検知する。 The operation unit 203 includes a touch panel type operation mechanism and detects an operation by the user. Specifically, the operation unit 203 detects an operation event that occurs when the user touches the button icon or the software keyboard displayed on the display unit 202.

電源キー204は電源をオン及びオフをする際に用いられるハードキーである。 The power key 204 is a hard key used when turning the power on and off.

図3はMFP300の外観を示す図である。原稿台301は、スキャナ(読取部)によって読み取られる原稿が載せられるガラス状の透明な台である。原稿蓋302は、スキャナによって読取が行われる際に原稿を押さえたり、読取の際に原稿に照射される読取光が外部に漏れないようにしたりするための蓋である。 FIG. 3 is a diagram showing an appearance of the MFP 300. The document table 301 is a glass-like transparent table on which a document read by a scanner (reading unit) is placed. The document cover 302 is a cover for holding the document when the scanner reads the document and for preventing the reading light emitted to the document during the reading from leaking to the outside.

印刷用紙挿入口303は様々なサイズの用紙をセット可能な挿入口である。印刷用紙挿入口303にセットされた用紙は、図示しない印刷部に一枚ずつ搬送され、印刷部で印刷が行われて印刷用紙排出口304から排出される。 The printing paper insertion slot 303 is an insertion slot into which various sizes of paper can be set. The sheets set in the printing sheet insertion port 303 are conveyed one by one to a printing unit (not shown), printed by the printing unit, and ejected from the printing sheet ejection port 304.

操作表示部305は、文字入力キー、カーソルキー、決定キー、取り消しキー等のキーと、LED(発光ダイオード)やLCD(液晶ディスプレイ)などから構成され、ユーザから、MFPとしての各種機能の起動や各種設定を受け付けることができる。なお、操作表示部305は、タッチパネルで構成されてもよい。 The operation display unit 305 includes keys such as a character input key, a cursor key, an enter key, and a cancel key, and an LED (light emitting diode), an LCD (liquid crystal display), and the like, and a user activates various functions as an MFP. Various settings can be accepted. The operation display unit 305 may be configured with a touch panel.

WLANアンテナ306は、WLANによって通信するためのアンテナである。 The WLAN antenna 306 is an antenna for communicating by WLAN.

図4は、操作表示部305に表示される画面の一例を示した図である。図4(a)は、MFP300が印刷やスキャン等の動作をしていない状態(アイドル状態)で操作表示部305に表示される画面(ホーム画面)である。MFP300は、操作表示部305にホーム画面が表示されている状態で、ユーザからキー操作やタッチパネル操作を受け付けることで、コピーやスキャン、インターネット通信を利用したクラウド機能のメニュー表示や各種設定、機能を実行可能である。操作表示部305は、上述の操作を受け付けることによって、シームレスに図4(a)に示すホーム画面とは異なる画面を表示することができる。図4(b)は、その一例である。MFP300は、操作表示部305に図4(b)に示すホーム画面が表示されている状態で、ユーザによってキー操作やタッチパネル操作を受け付けることで、プリントやフォト機能の実行やLAN設定の変更を実行可能である。図4(c)は、操作表示部305に図4(b)の画面が表示されている状態で、LAN設定を実行するための操作がユーザによって行われた際に表示される画面である。MFP300は、図4(c)に示す画面における「無線LAN」がユーザ操作によって選択された場合、後述するインフラストラクチャモードの有効/無効設定をユーザから受け付ける。また、このとき、MFP300は、後述するインフラ接続におけるMFP300の接続相手(アクセスポイント400等)の設定もユーザから受け付ける。また、MFP300は、図4(c)に示す画面における「無線ダイレクト」がユーザ操作によって選択された場合、WFD機能の有効/無効設定をユーザから受け付ける。また、MFP300は、図4(c)に示す画面における「無線ダイレクトネゴシエーション」がユーザ操作によって選択された場合、後述するネゴシエーション設定の有り/無しの設定をユーザから受け付ける。 FIG. 4 is a diagram showing an example of a screen displayed on the operation display unit 305. FIG. 4A is a screen (home screen) displayed on the operation display unit 305 when the MFP 300 is not performing an operation such as printing or scanning (idle state). The MFP 300 receives a key operation or a touch panel operation from the user while the home screen is displayed on the operation display unit 305 to display a cloud function menu display, various settings, and functions using the copy/scan or Internet communication. It is feasible. The operation display unit 305 can seamlessly display a screen different from the home screen shown in FIG. 4A by receiving the above-described operation. FIG. 4B is an example thereof. The MFP 300 executes a print or photo function or changes LAN settings by accepting a key operation or a touch panel operation by the user while the home screen shown in FIG. 4B is displayed on the operation display unit 305. It is possible. FIG. 4C is a screen displayed when the user performs an operation for executing LAN setting while the screen of FIG. 4B is displayed on the operation display unit 305. When “wireless LAN” on the screen shown in FIG. 4C is selected by the user operation, the MFP 300 receives from the user the valid/invalid setting of the infrastructure mode described later. At this time, the MFP 300 also accepts the setting of the connection partner (access point 400 or the like) of the MFP 300 in the infrastructure connection described later from the user. In addition, the MFP 300 accepts the valid/invalid setting of the WFD function from the user when “Wireless Direct” on the screen illustrated in FIG. 4C is selected by the user operation. Further, when the “wireless direct negotiation” on the screen shown in FIG. 4C is selected by the user operation, the MFP 300 receives from the user the setting for whether or not there is a negotiation setting to be described later.

図5は、端末装置200の構成を示すブロック図である。 FIG. 5 is a block diagram showing the configuration of the terminal device 200.

端末装置200は、装置自身のメインの制御を行うメインボード501と、WLAN通信を行うWLANユニット517とを有する。 The terminal device 200 has a main board 501 that performs main control of the device itself and a WLAN unit 517 that performs WLAN communication.

メインボード501において、CPU(中央演算処理部)502は、システム制御部であり、ROM503に格納されたプログラムの実行やハードウェアの起動により、端末装置200の全体を制御する。なお、端末装置200が実行する後述の処理は、CPU502による制御によって実行される。 In the main board 501, a CPU (central processing unit) 502 is a system control unit, and controls the entire terminal device 200 by executing programs stored in the ROM 503 and activating hardware. It should be noted that the processing to be described later executed by the terminal device 200 is executed under the control of the CPU 502.

ROM503は、CPU502が実行する制御プログラムや組込オペレーティングシステム(OS)プログラム等を記憶する。本実施形態では、ROM503に記憶されている各制御プログラムは、ROM503に記憶されている組込OSの管理下で、スケジューリングやタスクスイッチ等のソフトウェア制御を行う。 The ROM 503 stores a control program executed by the CPU 502, an embedded operating system (OS) program, and the like. In this embodiment, each control program stored in the ROM 503 controls software such as scheduling and task switch under the control of the embedded OS stored in the ROM 503.

RAM504は、SRAM(Static Random Access Memory)やDRAM(Dynamic Random Access Memory)等で構成されるメモリである。RAM504は、プログラム制御変数等のデータや、ユーザが登録した設定値や端末装置200の管理データ等のデータを記憶する。なお、RAM504には、各種ワーク用バッファ領域が設けられている。 The RAM 504 is a memory including an SRAM (Static Random Access Memory) and a DRAM (Dynamic Random Access Memory). The RAM 504 stores data such as program control variables, setting values registered by the user, management data of the terminal device 200, and the like. The RAM 504 is provided with various work buffer areas.

画像メモリ505は、DRAM等のメモリで構成され、WLANユニット517を介して受信した画像データや、データ蓄積部513から読み出した画像データを、CPU502によって処理するために一時的に記憶する。 The image memory 505 is composed of a memory such as a DRAM, and temporarily stores the image data received via the WLAN unit 517 and the image data read from the data storage unit 513 for processing by the CPU 502.

不揮発性メモリ512は、フラッシュメモリ(flash memory)等のメモリで構成され、電源がオフされても保持されるべきデータを記憶する。 The non-volatile memory 512 is configured by a memory such as a flash memory and stores data that should be retained even when the power is turned off.

なお、端末装置200が保持するメモリ構成はこの形態に限定されるものではなく、用途や目的に応じて、その数や特性、記憶容量等が適宜変更されても良い。例えば、画像メモリ505とRAM504を共有させてもよいし、データ蓄積部513にデータのバックアップ等が行われてもよい。また、本実施形態では、画像メモリ505にDRAMが用いられているものとするが、例えば、ハードディスク(HDD)や不揮発性メモリ等の他の記憶媒体を使用しても良い。 It should be noted that the memory configuration held by the terminal device 200 is not limited to this mode, and the number, characteristics, storage capacity, etc. may be appropriately changed depending on the use or purpose. For example, the image memory 505 and the RAM 504 may be shared, or data backup may be performed in the data storage unit 513. Further, in the present embodiment, a DRAM is used as the image memory 505, but another storage medium such as a hard disk (HDD) or a non-volatile memory may be used.

データ変換部506は、種々の形式のデータの解析や、画像データに対する色変換、画像変換等のデータ変換を行う。 The data conversion unit 506 analyzes data of various formats and performs data conversion such as color conversion and image conversion on image data.

電話部507は、電話回線の制御を行い、スピーカ部514を介して入出力される音声データを処理することで電話による通信を実現する。 The telephone unit 507 realizes telephone communication by controlling a telephone line and processing voice data input/output via the speaker unit 514.

操作部508は、操作部204から出力される信号を制御し、ユーザによる操作を検知する。 The operation unit 508 controls a signal output from the operation unit 204 and detects an operation by the user.

GPS(Global Positioning System)509は、端末装置200の現在の緯度や経度等の位置情報を取得する。 A GPS (Global Positioning System) 509 acquires position information such as the current latitude and longitude of the terminal device 200.

表示部510は、表示部202に表示させる画面の内容を電子的に制御しており、表示部202に、各種入力操作画面や、MFP300の動作状況画面、ステータス状況画面の表示等を行うことができる。 Display unit 510 electronically controls the content of the screen displayed on display unit 202, and can display various input operation screens, operation status screens of MFP 300, status status screens, and the like on display unit 202. it can.

カメラ部511は、レンズを介して入力された画像を電子的に記録して符号化する機能を有している。カメラ部511で撮影された画像に対応する画像データはデータ蓄積部513に保存される。 The camera unit 511 has a function of electronically recording and encoding an image input via the lens. Image data corresponding to the image captured by the camera unit 511 is stored in the data storage unit 513.

スピーカ部514は電話機能のための音声を入力または出力する機能や、その他、アラーム通知等の機能を実現する。 The speaker unit 514 realizes a function of inputting or outputting a voice for a telephone function and other functions such as alarm notification.

電源部515は、携帯可能な電池であり、端末装置200内への電力供給制御を行う。端末装置200の電源状態には、電池に残量が無い電池切れ状態、電源キー205が押下されていない電源オフ状態、通常起動している起動状態、起動しているが起動状態よりも消費電力が小さい省電力状態がある。 The power supply unit 515 is a portable battery and controls power supply to the inside of the terminal device 200. The power supply state of the terminal device 200 includes a dead battery state in which the battery has no remaining capacity, a power off state in which the power key 205 is not pressed, a normally activated start state, and a power consumption that is higher than the activated state. There is a small power saving state.

WLANユニット517は、WLANによって無線通信を行うためのユニットである。WLANユニット517は、例えばIEEE802.11シリーズに準拠したWLANシステムにおけるデータ(パケット)通信が可能であるものとする。すなわち、WLANユニット517は、例えば、Wi−Fi(登録商標)による通信を実行可能であるものとする。WLANユニット517は、WLAN接続を確立するための、ビーコン検知処理や認証処理、WLAN接続を確立した通信装置への印刷ジョブの送信等の機能を担う。WLANユニット517により、端末装置200は、MFP300等の他デバイスとのデータ通信を行う。WLANユニット517は、データをパケットに変換し、他デバイスにパケット送信を行ったり、逆に、外部の他デバイスからのパケットを、元のデータに復元してCPU502に対して送信したりする。なお、WLANユニット517はバスケーブル516介してメインボード501に接続されている。 The WLAN unit 517 is a unit for performing wireless communication by WLAN. The WLAN unit 517 is assumed to be capable of data (packet) communication in a WLAN system conforming to the IEEE 802.11 series, for example. That is, the WLAN unit 517 is assumed to be able to execute Wi-Fi (registered trademark) communication, for example. The WLAN unit 517 has functions such as beacon detection processing and authentication processing for establishing a WLAN connection, and transmission of a print job to a communication device that has established a WLAN connection. With the WLAN unit 517, the terminal device 200 performs data communication with other devices such as the MFP 300. The WLAN unit 517 converts data into a packet and transmits the packet to another device, or conversely, restores a packet from another external device to the original data and transmits it to the CPU 502. The WLAN unit 517 is connected to the main board 501 via the bus cable 516.

メインボード501内の各種構成要素(503〜515及び517)は、CPU502が管理するシステムバス519を介して、相互に接続されている。 Various components (503 to 515 and 517) in the main board 501 are connected to each other via a system bus 519 managed by the CPU 502.

図6はMFP300の構成を示すブロック図である。 FIG. 6 is a block diagram showing the configuration of the MFP 300.

MFP300は、装置自身のメインの制御を行うメインボード601と、WLAN通信を行うWLANユニット616とを有する。 The MFP 300 has a main board 601 that performs main control of the apparatus itself, and a WLAN unit 616 that performs WLAN communication.

メインボード601において、CPU602は、システム制御部であり、ROM603に格納されたプログラムの実行やハードウェアの起動により、MFP300の全体を制御する。また、CPU602は、MFP300の装置状態を把握して、後述の各処理を実行する。また、CPU602は、MFP300の全体を制御するため、後述のAPサーチ以外の処理(例えば、印刷制御やスキャン制御等の処理)を実行する役割も担う。 In the main board 601, a CPU 602 is a system control unit and controls the entire MFP 300 by executing a program stored in the ROM 603 and activating hardware. Further, the CPU 602 grasps the apparatus state of the MFP 300 and executes each processing described later. Further, the CPU 602 also has a role of executing processing (for example, processing such as print control and scan control) other than the AP search described later in order to control the entire MFP 300.

ROM603は、CPU602が実行する制御プログラムや組込OSプログラム等を記憶する。本実施形態では、ROM603に記憶されている各制御プログラムは、ROM603に記憶されている組込OSの管理下で、スケジューリングやタスクスイッチ等のソフトウェア制御を行う。 The ROM 603 stores a control program executed by the CPU 602, an embedded OS program, and the like. In this embodiment, each control program stored in the ROM 603 performs software control such as scheduling and task switch under the control of the embedded OS stored in the ROM 603.

RAM604は、SRAMやDRAM等で構成されるメモリである。RAM604は、プログラム制御変数等のデータや、ユーザが登録した設定値、MFP300の管理データ等のデータを記憶する。なお、RAM604には、各種ワーク用バッファ領域が設けられている。 The RAM 604 is a memory composed of SRAM, DRAM and the like. The RAM 604 stores data such as program control variables, setting values registered by the user, management data of the MFP 300, and the like. The RAM 604 is provided with various work buffer areas.

不揮発性メモリ605は、フラッシュメモリ等のメモリで構成され、電源がオフされても保持されるべきデータを記憶する。 The non-volatile memory 605 includes a memory such as a flash memory and stores data that should be retained even when the power is turned off.

画像メモリ606は、DRAM等のメモリで構成され、WLANユニットを介して受信した画像データや、符号復号化処理部611で処理した画像データなどを蓄積する。 The image memory 606 is configured by a memory such as a DRAM and stores image data received via the WLAN unit, image data processed by the encoding/decoding processing unit 611, and the like.

また、端末装置200が保持するメモリ構成と同様に、MFP300が保持するメモリ構成はこの形態に限定されるものではなく、用途や目的に応じて、その数や特性、記憶容量等が適宜変更されても良い。 Further, similarly to the memory configuration held by the terminal device 200, the memory configuration held by the MFP 300 is not limited to this mode, and the number, characteristics, storage capacity, etc. may be changed as appropriate according to the application or purpose. May be.

データ変換部608は、種々の形式のデータの解析や、画像データから印刷データへの変換等を行う。 The data conversion unit 608 analyzes data in various formats and converts image data into print data.

読取制御部607は、読取部609(例えば、CISイメージセンサ(密着型イメージセンサ))を制御して、原稿上の画像を光学的に読み取る。そして読取制御部607は、読み取った画像を電気的な画像データに変換した画像信号を出力する。このとき読取制御部607は、2値化処理や中間調処理等の各種画像処理を施してから画像信号を出力しても良い。 The reading control unit 607 controls the reading unit 609 (for example, a CIS image sensor (contact image sensor)) to optically read an image on a document. Then, the reading control unit 607 outputs an image signal obtained by converting the read image into electrical image data. At this time, the reading control unit 607 may output various image signals after performing various image processing such as binarization processing and halftone processing.

操作表示部610は、操作表示部305に対応し、ユーザから、MFPとしての各種機能の起動や各種設定を受け付ける。 The operation display unit 610 corresponds to the operation display unit 305, and receives activation of various functions as the MFP and various settings from the user.

符号復号化処理部611は、MFP300で扱う画像データ(JPEG、PNG等)に対して符号復号化処理や、拡大縮小処理を行う。 The encoding/decoding processing unit 611 performs encoding/decoding processing and enlargement/reduction processing on image data (JPEG, PNG, etc.) handled by the MFP 300.

給紙部613は印刷のための記録媒体を保持する。なお、給紙部613は、複数種類の記録媒体を一つの装置に保持するために、複数用意されていても良い。 The paper feeding unit 613 holds a recording medium for printing. Note that a plurality of paper feeding units 613 may be prepared in order to hold a plurality of types of recording media in one device.

印刷制御部614は、給紙部613を制御し、印刷部612に記録媒体を供給することができる。なお、給紙部613が複数用意されている場合、印刷制御部614は、複数の給紙部613のうちいずれの給紙部から給紙を行うかの制御を行うことができる。 The print control unit 614 can control the paper feeding unit 613 and supply the recording medium to the printing unit 612. When a plurality of paper feed units 613 are prepared, the print control unit 614 can control from which paper feed unit of the plurality of paper feed units 613 the paper is fed.

印刷制御部614は、印刷される画像データに対し、スムージング処理や印刷濃度補正処理、色補正等の各種画像処理を施してから印刷部612に出力する。 The print control unit 614 performs various image processing such as smoothing processing, print density correction processing, and color correction on the image data to be printed, and then outputs it to the printing unit 612.

印刷部612は、インクタンクから供給されるインクをプリントヘッドから吐出させて画像を印刷するインクジェットプリンタである。なお、印刷部612は、インクジェットプリンタでなくとも良く、例えば、レーザービームプリンタ等であっても良い。また、印刷制御部614は、印刷部612の情報を定期的に読み出してRAM604の情報を更新する。具体的には、印刷制御部614は、インクタンクの残量やプリントヘッドの状態等のステータス情報を更新する。WLANユニット616は、WLANユニット201に対応するため、説明を省略する。WLANユニット616はバスケーブル615を介してメインボード601に接続されている。なお、端末装置200及びMFP300は各装置が備えるWLANユニットによってWi−Fi Direct(WFD)をベースにした通信が可能であり、ソフトウェアアクセスポイント(ソフトウェアAP)機能を有している。ソフトウェアAP機能とは、当該機能を実行する装置を、ソフトウェアベースのアクセスポイントとして動作させるための機能である。 The printing unit 612 is an inkjet printer that prints an image by ejecting ink supplied from an ink tank from a print head. The printing unit 612 does not have to be an inkjet printer, and may be, for example, a laser beam printer or the like. Further, the print control unit 614 periodically reads the information of the printing unit 612 and updates the information of the RAM 604. Specifically, the print control unit 614 updates status information such as the remaining amount of the ink tank and the state of the print head. Since the WLAN unit 616 corresponds to the WLAN unit 201, its description is omitted. The WLAN unit 616 is connected to the main board 601 via a bus cable 615. Note that the terminal device 200 and the MFP 300 can perform Wi-Fi Direct (WFD)-based communication by a WLAN unit included in each device, and have a software access point (software AP) function. The software AP function is a function for causing a device that executes the function to operate as a software-based access point.

NWサブシステム620は、CPU602の制御負荷を低減させるためのサブシステムであり、ネットワーク通信関連の入出力制御をつかさどる。NWサブCPU621は、ネットワーク通信関連の入出力制御を実行するためのCPUである。NWサブCPU621は、CPU602が実行可能な処理のうち一部の処理をCPU602の代わりに実行することで、CPU602の制御負荷を低減させるためのCPUである。そのため、本実施形態では、NWサブCPU621が実行する処理の範囲は、CPU602が実行する処理の範囲より狭いものとする。また、例えば処理速度やキャッシュ容量に関する性能は、NWサブCPU621よりCPU602の方が高いものとする。また、NWサブCPU621は、CPU602と比較して、アクセス可能な領域が限定されており、例えば、MFP300の装置情報等を取得するためには、CPU602からCPU間通信によって取得する必要がある。RAM604の一部にはNWサブCPU621によって実行される制御コードが保存されており、当該制御コードは、CPU602のブートシーケンスにおいて、RAM604からRAM622へDMA(Direct Memory Access)転送される。なお、当該制御コードは、621がネットワーク通信関連の入出力制御を実行するためのコードである。NWサブシステム内の各モジュール(621、622、623)は、メイン側システムバス618とは分離されたローカルバス624を介して相互接続されている。NWサブシステム620が、ネットワーク通信関連の機能モジュールのうち、特にハードウェアレイヤに近い層の機能を担うことで、メインボード上の他のモジュールの負荷状況の影響を最小化した、独立性が高いネットワーク制御を実現している。 The NW subsystem 620 is a subsystem for reducing the control load of the CPU 602, and controls input/output control related to network communication. The NW sub CPU 621 is a CPU for executing input/output control related to network communication. The NW sub CPU 621 is a CPU for reducing the control load of the CPU 602 by executing a part of the processing that can be executed by the CPU 602 instead of the CPU 602. Therefore, in the present embodiment, the range of processing executed by the NW sub CPU 621 is narrower than the range of processing executed by the CPU 602. Further, for example, the performance regarding the processing speed and the cache capacity of the CPU 602 is higher than that of the NW sub CPU 621. Further, the NW sub CPU 621 has a limited accessible area as compared with the CPU 602, and for example, in order to acquire the device information of the MFP 300 and the like, it is necessary to acquire from the CPU 602 by inter-CPU communication. A control code executed by the NW sub CPU 621 is stored in a part of the RAM 604, and the control code is DMA (Direct Memory Access) transferred from the RAM 604 to the RAM 622 in the boot sequence of the CPU 602. The control code is a code for the 621 to execute input/output control related to network communication. The modules (621, 622, 623) in the NW subsystem are interconnected via a local bus 624 that is separated from the main system bus 618. Since the NW subsystem 620 takes on the function of a layer particularly close to the hardware layer among the functional modules related to network communication, the influence of the load status of other modules on the main board is minimized and the independence is high. Realizes network control.

WLANユニット616は、端末装置200が備えるWLANユニットと同様の機能を有するため、説明を省略する。なお、WLANユニット616は、NWサブシステム620内のUHOSTモジュール623とUSBバス625を介して接続されている。なお、以下、メインボード601におけるNWサブシステム620以外のシステムを本体サブシステムという。 The WLAN unit 616 has the same function as the WLAN unit included in the terminal device 200, and a description thereof will be omitted. The WLAN unit 616 is connected to the UHOST module 623 in the NW subsystem 620 via the USB bus 625. Note that, hereinafter, the systems on the main board 601 other than the NW subsystem 620 are referred to as main system subsystems.

メインボード601内の各種構成要素(602〜614、616〜617、620)は、CPU602が管理するシステムバス618を介して、相互に接続されている。 Various components (602 to 614, 616 to 617, 620) in the main board 601 are connected to each other via a system bus 618 managed by the CPU 602.

<P2P(Peer to Peer)モードについて>
WLANにおける通信においてP2P方式の接続を確立するために、本実施形態のMFP300は、P2Pモード(ソフトウェアAPモード又はWi−Fi Direct(WFD)モード)で動作するものとする。なお、本実施形態では、P2P方式の接続とは、外部装置を介さずに装置同士が直接的に無線接続する形態を指す。MFP300が外部装置を介さずに端末装置200と接続する場合、MFP300の通信モードとしてP2Pモードが設定される。なお、MFP300と端末装置200とのP2P接続が切断されたり、MFP300の電源がオフされても、設定変更等によりMFP300の通信モードが変更されない限りは、MFP300はP2Pモードとして動作し続ける。なお、本実施形態において、P2Pモードの設定変更は、MFP300のWFD機能のオン/オフに対応する。
<P2P (Peer to Peer) mode>
In order to establish a P2P connection in WLAN communication, the MFP 300 according to the present embodiment operates in a P2P mode (software AP mode or Wi-Fi Direct (WFD) mode). In this embodiment, the P2P connection refers to a mode in which devices directly wirelessly connect to each other without an external device. When the MFP 300 connects to the terminal device 200 without using an external device, the P2P mode is set as the communication mode of the MFP 300. Even if the P2P connection between the MFP 300 and the terminal device 200 is disconnected or the power of the MFP 300 is turned off, the MFP 300 continues to operate in the P2P mode unless the communication mode of the MFP 300 is changed due to a setting change or the like. In the present embodiment, changing the setting of the P2P mode corresponds to turning on/off the WFD function of the MFP 300.

なお、WFDは、WiFi Allianceによって策定された規格である。WFD対応機器である端末装置200及びMFP300は、アクセスポイントとして動作するためのソフトウェアアクセスポイント(ソフトAP)機能を有している。そのため、端末装置200及びMFP300は、WFDにより、他のアクセスポイントを介さずに相互に直接、無線接続することが可能となる。なお、WFDによって通信するWFD対応機器のうちいずれがソフトAPとして動作するかは、GroupOwnerNegotiationというシーケンス(以下、ネゴシエーション)に従って決定される。具体的には、各装置に予め設定されているインテント値の大小に基づいて、いずれがソフトAPとして動作するかが各装置間で決定される。以下、ソフトAPの役割を果たす装置を特に、GroupOwnerという。なお、本実施形態では、装置間の通信には、Wi−Fi標準規格で規定された、2.4GHz周波数帯の1〜13チャネルが利用されるものとする。GroupOwnerは、装置間の通信に使用するチャネルを決定する役割を担う。そのため、ネゴシエーションは、装置間の通信に利用されるチャネルを決定する装置として動作するか否かを特定する処理とも言える。なお、MFP300が利用するチャネルは、1〜13チャネルに限定されない。例えば、MFP300は、2.4GHzと5GHzの周波数帯を使って通信可能な場合、1〜13、36〜140チャネルを利用可能である。 The WFD is a standard established by the WiFi Alliance. The terminal device 200 and the MFP 300, which are WFD compatible devices, have a software access point (soft AP) function for operating as an access point. Therefore, the terminal device 200 and the MFP 300 can be directly wirelessly connected to each other by the WFD without using another access point. Which of the WFD-compatible devices that communicate by WFD operates as the soft AP is determined according to a sequence called Group Owner Negotiation (hereinafter, negotiation). Specifically, which device operates as the soft AP is determined among the devices based on the magnitude of the intent value preset in each device. Hereinafter, the device that plays the role of the soft AP is particularly referred to as GroupOwner. In the present embodiment, it is assumed that channels 1 to 13 in the 2.4 GHz frequency band defined by the Wi-Fi standard are used for communication between devices. GroupOwner plays a role of determining a channel used for communication between devices. Therefore, the negotiation can be said to be a process of specifying whether or not the device operates as a device that determines a channel used for communication between the devices. The channels used by MFP 300 are not limited to channels 1 to 13. For example, the MFP 300 can use channels 1 to 13 and 36 to 140 when communication is possible using the frequency bands of 2.4 GHz and 5 GHz.

なお、各モードによって通信する装置からなる通信システムでは、探索側の装置が機器探索コマンド(例えば、Probe Requestフレーム)を使用して通信相手となる装置(通信相手装置)を探索して発見する。探索側の装置は、機器探索コマンドに、種々の属性(パラメータ)を付随することが可能である。特にP2P方式による接続のための探索時には、機器探索コマンドに、P2P無線接続に関する情報(P2Pエレメント)が含まれている。機器探索コマンドに応答する装置は、探索コマンドに属性が指定されていた場合には、通常、探索側の装置のモードの仕様および前提となる仕様(WFDであればWi−Fi)で規定されている範囲で、解釈可能な属性に最大限応答をする事が推奨されている。また、機器探索コマンドに応答する装置は、機器探索コマンドに付随する情報(上記属性を含む)が解釈できない場合であっても、解釈できる情報のみを元に応答することも可能である。 In a communication system including devices that communicate in each mode, a device on the search side searches for and finds a device (communication partner device) that is a communication partner using a device search command (for example, a Probe Request frame). The device on the search side can attach various attributes (parameters) to the device search command. In particular, at the time of searching for connection by the P2P method, the device search command includes information (P2P element) regarding the P2P wireless connection. When an attribute is specified in the search command, the device that responds to the device search command is normally specified by the mode specification of the device on the search side and the prerequisite specifications (Wi-Fi for WFD). It is recommended to give maximum response to interpretable attributes within the range. Further, even if the information (including the above attributes) accompanying the device search command cannot be interpreted, the device that responds to the device search command can respond based on only the information that can be interpreted.

以下、各モードにおける無線接続シーケンスについて、図7、図8を用いて説明する。 The wireless connection sequence in each mode will be described below with reference to FIGS. 7 and 8.

図7はソフトウェアAPモードにおける無線接続シーケンスを示す図である。なお、本シーケンスにおいて各装置が実行する処理は、各装置が備えるROM等のメモリに格納された各種プログラムを、各装置が備えるCPUがRAMに読み出して実行することにより実現される。また、本シーケンスは、端末装置200がクライアント、MFP300がソフトウェアAPとして動作し、MFP300がビーコン(Beacon)信号を発信している状態で開始されるものとする。なお、MFP300は、ソフトウェアAPとして動作するための所定の操作をユーザから受け付けた場合、ソフトウェアAPとしての動作を開始する。なお、所定の操作とは例えば、LAN設定画面における、ソフトウェアAPとしての動作を開始させるための所定のアイコンを選択する操作である。 FIG. 7 is a diagram showing a wireless connection sequence in the software AP mode. The processing executed by each device in this sequence is realized by the CPU of each device reading the various programs stored in the memory such as the ROM of each device into the RAM and executing the programs. In addition, it is assumed that the present sequence is started in a state in which the terminal device 200 operates as a client and the MFP 300 operates as a software AP, and the MFP 300 transmits a beacon signal. When a predetermined operation for operating as software AP is received from the user, MFP 300 starts operating as software AP. The predetermined operation is, for example, an operation of selecting a predetermined icon for starting the operation as the software AP on the LAN setting screen.

まず、S701にて、端末装置200は、端末装置200が利用可能なチャネルを順に使用して機器探索コマンドを送信し、ソフトウェアAPとなる装置を検索する。 First, in step S<b>701, the terminal device 200 sequentially transmits a device search command by using channels available to the terminal device 200, and searches for a device serving as the software AP.

続いて、S702にて、MFP300は、端末装置200から送信された機器探索コマンドを受信した場合、機器探索コマンドに対する応答である機器探索応答を端末装置200に送信する。なお、MFP300は、自身が使用可能なチャネル以外のチャネルで送信された機器探索コマンドに対しては機器探索応答を送信しない。例えば、MFP300が使用可能なチャネルが第4チャネルであるとすると、MFP300は、第1チャネルを使用して送信された装置探索リクエストコマンドに対しては応答コマンドを送信しない。そのため、端末装置200は、第1チャネルを使用して機器探索コマンドを送信した後、一定時間以上MFP300からの応答がない場合には、第2チャネルを使用して装置探索リクエストコマンドを送信する。端末装置200は、以上のような試行を、使用するチャネルの番号をインクリメントしながら繰り返す。そして例えば、MFP300は、端末装置200が第4チャネルを使用して送信した機器探索コマンドを受信すると、端末装置200に機器探索応答を送信する。これにより、端末装置200は、MFP300を発見することになる。なお、機器探索応答の送信に利用されたチャネルが、以後、端末装置200とMFP300との間の通信に利用されるチャネルとして決定される。すなわち、端末装置200とMFP300との間の通信に利用されるチャネルは、ソフトAPとして動作するMFP300によって決定される。 Subsequently, in S702, when the MFP 300 receives the device search command transmitted from the terminal device 200, the MFP 300 transmits a device search response, which is a response to the device search command, to the terminal device 200. It should be noted that the MFP 300 does not transmit a device search response to a device search command transmitted on a channel other than a channel that the MFP 300 can use. For example, assuming that the channel that can be used by the MFP 300 is the fourth channel, the MFP 300 does not send a response command to the device search request command sent using the first channel. Therefore, after transmitting the device search command using the first channel, terminal device 200 transmits the device search request command using the second channel when there is no response from MFP 300 for a certain period of time. The terminal device 200 repeats the above-described trial while incrementing the channel number to be used. Then, for example, when the terminal device 200 receives the device search command transmitted using the fourth channel, the MFP 300 transmits a device search response to the terminal device 200. As a result, the terminal device 200 discovers the MFP 300. The channel used for transmitting the device search response is subsequently determined as the channel used for communication between the terminal device 200 and the MFP 300. That is, the channel used for communication between the terminal device 200 and the MFP 300 is determined by the MFP 300 operating as the soft AP.

続いて、S703にて、端末装置200とMFP300との間で、公知の無線接続の確立処理を実行する。具体的には、接続要求の送信や、接続要求の認証、IPアドレスの割当等の処理が行われる。なお、端末装置200とMFP300との間での無線接続の確立処理において送受信されるコマンドやパラメータについては、Wi−Fi規格で規定されているものが用いられればよく、ここでの説明は省略する。 Subsequently, in S703, a known wireless connection establishment process is executed between the terminal device 200 and the MFP 300. Specifically, processing such as connection request transmission, connection request authentication, and IP address allocation is performed. The commands and parameters transmitted and received in the process of establishing the wireless connection between the terminal device 200 and the MFP 300 may be those defined by the Wi-Fi standard, and description thereof will be omitted here. ..

図8はWFDモードにおける無線接続シーケンスを示す図である。なお、本シーケンスにおいて各装置が実行する処理は、各装置が備えるROM等のメモリに格納された各種プログラムを、各装置が備えるCPUがRAMに読み出して実行することにより実現される。また、本処理は、各装置がWFD機能を実行するための所定のアプリケーションを起動している状態で、WFDによる接続を確立するための所定の操作をユーザから受け付けた場合に開始されるものとする。 FIG. 8 is a diagram showing a wireless connection sequence in the WFD mode. The processing executed by each device in this sequence is realized by the CPU included in each device reading the various programs stored in the memory such as the ROM included in each device into the RAM and executing the programs. Further, the present process is supposed to be started when a predetermined operation for establishing a connection by WFD is received from the user in a state where each device is running a predetermined application for executing the WFD function. To do.

まず、S801にて、端末装置200は、機器探索コマンドを送信し、通信相手の装置として、WFD機能に対応している装置を検索する。 First, in step S801, the terminal device 200 transmits a device search command, and searches for a device compatible with the WFD function as a communication partner device.

続いて、S802にて、MFP300は、受信した機器探索コマンドに対する応答である機器探索応答を端末装置200に送信する。これにより、端末装置200は、WFD機能に対応している装置として、MFP300を発見することになる。なお、端末装置200がMFP300を発見した後、各装置の間で、各装置が供給可能なサービスや機能に関する情報を交換する処理が行われても良い。 Subsequently, in step S802, the MFP 300 transmits a device search response, which is a response to the received device search command, to the terminal device 200. As a result, the terminal device 200 discovers the MFP 300 as a device compatible with the WFD function. After the terminal device 200 discovers the MFP 300, a process of exchanging information regarding services and functions that can be provided by each device may be performed between the devices.

続いて、S803にて、端末装置200とMFP300との間で、ネゴシエーション処理を行う。ネゴシエーション処理とは、各装置が保持する所定の設定値を用いて、P2P方式による通信における役割(GroupOwnerとクライアント)を決定する処理である。なお、ネゴシエーション処理により各装置の役割が決定された場合、各装置の間で、Wi−Fi Directによる通信を行うためのパラメータが交換される(パラメータ交換フェーズ)。パラメータ交換フェーズは、例えば、Wi−Fi Protected Setupによって自動的に無線LANセキュリティのパラメータが交換されることに対応する。なお、ネゴシエーションが行われた後、GroupOwnerが、以後の通信に利用するチャネルを決定する。 Subsequently, in S803, a negotiation process is performed between the terminal device 200 and the MFP 300. The negotiation process is a process of determining a role (GroupOwner and client) in P2P communication by using a predetermined setting value held by each device. When the role of each device is determined by the negotiation process, parameters for performing Wi-Fi Direct communication are exchanged between the devices (parameter exchange phase). The parameter exchange phase corresponds to automatic exchange of wireless LAN security parameters by Wi-Fi Protected Setup, for example. After the negotiation is performed, the GroupOwner determines the channel used for the subsequent communication.

その後、S804にて、各装置は、交換したパラメータに基づいて、無線接続の確立処理を実行する。 After that, in S804, each device executes a wireless connection establishment process based on the exchanged parameters.

なお、MFP300は、WFDモードにおける無線接続シーケンスにおいてネゴシエーションを実行するか否かの設定をユーザから受け付け可能であっても良い。MFP300は、ネゴシエーションを実行しないものとして設定されている場合は、自身がGroupOwnerとして動作する。 Note that the MFP 300 may be able to accept from the user the setting as to whether or not to execute negotiation in the wireless connection sequence in the WFD mode. When the MFP 300 is set not to execute the negotiation, the MFP 300 operates as the GroupOwner itself.

なお、以後、P2Pモードによって通信するための接続(アクセスポイント400を介さない端末装置200との接続)をP2P接続という。 Note that, hereinafter, the connection for communicating in the P2P mode (connection with the terminal device 200 not via the access point 400) is referred to as P2P connection.

<インフラストラクチャモードについて>
上述したように、インフラストラクチャモードとは、通信を行う装置(例えば、端末装置200とMFP300)が、ネットワークを統括する外部装置(例えば、アクセスポイント400)を介して通信する形態である。MFP300がアクセスポイント400を介して端末装置200と接続する場合、MFP300の通信モードとしてインフラストラクチャモードが設定される。なお、MFP300とアクセスポイント400との接続が切断されたり、MFP300の電源がオフされても、設定変更等によりMFP300の通信モードが変更されない限りは、MFP300はインフラストラクチャモードとして動作し続ける。
<About infrastructure mode>
As described above, the infrastructure mode is a mode in which the communication devices (for example, the terminal device 200 and the MFP 300) communicate with each other via the external device (for example, the access point 400) that controls the network. When MFP 300 connects to terminal device 200 via access point 400, infrastructure mode is set as the communication mode of MFP 300. Even if the connection between the MFP 300 and the access point 400 is disconnected or the power of the MFP 300 is turned off, the MFP 300 continues to operate in the infrastructure mode unless the communication mode of the MFP 300 is changed due to a setting change or the like.

図9は、インフラストラクチャモードにおける無線接続シーケンスを示す図である。なお、本シーケンスにおいて各装置が実行する処理は、各装置が備えるROM等のメモリに格納された各種プログラムを、各装置が備えるCPUがRAMに読み出して実行することにより実現される。 FIG. 9 is a diagram showing a wireless connection sequence in the infrastructure mode. The processing executed by each device in this sequence is realized by the CPU included in each device reading the various programs stored in the memory such as the ROM included in each device into the RAM and executing the programs.

まず、S901にて、端末装置200は、端末装置200が利用可能なチャネルを順に使用して機器探索コマンドを送信し、ソフトウェアAPとなる装置を検索する。 First, in step S901, the terminal device 200 sequentially transmits a device search command using channels available to the terminal device 200, and searches for a device serving as the software AP.

続いて、S902にて、アクセスポイント400は、端末装置200から送信された機器探索コマンドを受信した場合、機器探索コマンドに対する応答である機器探索応答コマンドを端末装置200に送信する。なお、S702の説明において述べたように、アクセスポイント400は、自身が使用可能なチャネルで送信された機器探索コマンドに対してのみ機器探索応答コマンドを送信する。これにより、端末装置200は、アクセスポイント400を発見することになる。なお、機器探索応答コマンドの送信に利用されたチャネルが、以後、端末装置200とアクセスポイント400との間の通信に利用されるチャネルとして決定される。すなわち、インフラストラクチャモードによる通信に利用されるチャネルは、アクセスポイント400によって決定される。 Subsequently, in S902, when the access point 400 receives the device search command transmitted from the terminal device 200, the access point 400 transmits a device search response command, which is a response to the device search command, to the terminal device 200. As described in the description of S702, the access point 400 transmits the device search response command only to the device search command transmitted by the channel that can be used by itself. As a result, the terminal device 200 discovers the access point 400. The channel used for transmitting the device search response command is subsequently determined as the channel used for communication between the terminal device 200 and the access point 400. That is, the channel used for communication in the infrastructure mode is determined by the access point 400.

続いて、S903にて、端末装置200とアクセスポイント400との間で、公知の無線接続の確立処理を実行する。具体的には、接続要求の送信や、接続要求の認証、IPアドレスの割当等の処理が行われる。なお、P2Pモードと同様、端末装置200とMFP300との間での無線接続の確立処理において送受信されるコマンドやパラメータについては、Wi−Fi規格で規定されているものが用いられればよく、ここでの説明は省略する。 Subsequently, in S903, a known wireless connection establishment process is executed between the terminal device 200 and the access point 400. Specifically, processing such as connection request transmission, connection request authentication, and IP address allocation is performed. As in the P2P mode, the commands and parameters transmitted and received in the process of establishing the wireless connection between the terminal device 200 and the MFP 300 may be those defined by the Wi-Fi standard. The description of is omitted.

S904〜S906では、S901〜S903と同様の処理が、MFP300とアクセスポイント400との間で実行される。なお、このときアクセスポイント400は、機器探索応答コマンドを、端末装置200との通信に利用しているチャネルを用いてMFP300に送信する。すなわち、アクセスポイント400は、MFP300及び端末装置200と、同一のチャネルを用いて通信する。 In S904 to S906, the same processing as S901 to S903 is executed between the MFP 300 and the access point 400. At this time, the access point 400 transmits the device search response command to the MFP 300 using the channel used for communication with the terminal device 200. That is, the access point 400 communicates with the MFP 300 and the terminal device 200 using the same channel.

これにより、アクセスポイント400を介してMFP300と端末装置200とが接続することとなり、MFP300と端末装置200との間で、アクセスポイント400を介した通信が可能となる。 As a result, the MFP 300 and the terminal device 200 are connected via the access point 400, and communication between the MFP 300 and the terminal device 200 via the access point 400 becomes possible.

なお、以後、インフラストラクチャモードによって通信するための接続(アクセスポイント400を介した端末装置200との接続)をインフラ接続という。 Note that, hereinafter, the connection for communication in the infrastructure mode (connection with the terminal device 200 via the access point 400) is referred to as infrastructure connection.

<同時動作モードについて>
MFP300は、インフラストラクチャモードによる通信と、P2Pモードによる通信を、同時に(並行して)実行可能であり、インフラストラクチャモードとしての動作とP2Pモードとしての動作を同時に(並行して)実行可能であるものとする。そのため、MFP300は、インフラストラクチャモードによって通信するための接続と、P2Pモードによって通信するための接続とを同時に(並行して)確立することができる。以後、インフラストラクチャモードによって通信するための接続(アクセスポイント400を介した端末装置200との接続)をインフラ接続という。また、P2Pモードによって通信するための接続(アクセスポイント400を介さない端末装置200との接続)をP2P接続という。また、以後、インフラ接続とP2P接続を同時に(並行して)維持して動作することを、同時動作という。MFP300がインフラストラクチャモードとしての動作とP2Pモードとしての動作を同時に(並行して)実行する場合、MFP300の通信モードとしてインフラストラクチャモードが設定される。なお、MFP300と端末装置200との接続やMFP300とアクセスポイント400との接続が切断されたり、MFP300の電源がオフされても、MFP300の通信モードが変更されない限りは、MFP300は同時動作モードで動作し続ける。
<About simultaneous operation mode>
The MFP 300 can execute the communication in the infrastructure mode and the communication in the P2P mode at the same time (in parallel), and can perform the operation in the infrastructure mode and the operation in the P2P mode at the same time (in parallel). I shall. Therefore, the MFP 300 can simultaneously (in parallel) establish a connection for communication in the infrastructure mode and a connection for communication in the P2P mode. Hereinafter, a connection for communication in the infrastructure mode (connection with the terminal device 200 via the access point 400) is referred to as an infrastructure connection. A connection for communicating in the P2P mode (connection with the terminal device 200 not via the access point 400) is called a P2P connection. Further, hereinafter, to operate while maintaining the infrastructure connection and the P2P connection at the same time (in parallel) is referred to as a simultaneous operation. When the MFP 300 executes the operation as the infrastructure mode and the operation as the P2P mode at the same time (in parallel), the infrastructure mode is set as the communication mode of the MFP 300. Even if the connection between the MFP 300 and the terminal device 200, the connection between the MFP 300 and the access point 400 is disconnected, or the power of the MFP 300 is turned off, the MFP 300 operates in the simultaneous operation mode unless the communication mode of the MFP 300 is changed. Keep doing

本実施形態においては、MFP300は、WFDモードにおける無線接続シーケンスにおいてネゴシエーションを実行するか否かの設定をユーザから受け付け可能であり、ネゴシエーションを実行する設定がなされている場合は、同時動作しないものとする。 In the present embodiment, the MFP 300 can accept from the user the setting as to whether or not to execute negotiation in the wireless connection sequence in the WFD mode, and if the setting to execute negotiation is made, it will not operate simultaneously. To do.

<同時動作モードにおけるチャネル決定シーケンス>
インフラストラクチャモードによる通信及びP2Pモードによる通信は、特定の周波数帯域(特定のチャネル)を使用して行われる。そのため、インフラストラクチャモードによる通信とP2Pモードによる通信のいずれにおいても、通信が開始される前に、まず、各装置間の通信・接続に利用されるチャネルが決定される必要がある。なお、1つの無線ICチップに同時に複数のチャネルを割り当てて通信させる形態では、通信を行う各装置の構成や各装置が実行する処理が複雑となってしまう。従って、例えば、MFP300が同時動作する場合は、各モードにおける通信において、共通のチャネルが使用されることが望ましい。すなわち、MFP300は、同時動作している場合においても、1つのチャネルのみを使用することが望ましい。そのため、本実施形態では、WLANユニット616は、所定のチャネルによる通信を実現する無線ICチップを1つのみ有するものとし、MFP300は、同時に複数のチャネルを用いて通信しないものとする。
<Channel decision sequence in simultaneous operation mode>
Communication in the infrastructure mode and communication in the P2P mode are performed using a specific frequency band (specific channel). Therefore, in both the communication in the infrastructure mode and the communication in the P2P mode, it is necessary to first determine the channel used for communication/connection between each device before communication is started. In a mode in which a plurality of channels are simultaneously assigned to one wireless IC chip for communication, the configuration of each device that performs communication and the processing executed by each device become complicated. Therefore, for example, when the MFPs 300 operate simultaneously, it is desirable that a common channel be used in communication in each mode. That is, it is desirable that the MFP 300 uses only one channel even when operating simultaneously. Therefore, in the present embodiment, the WLAN unit 616 has only one wireless IC chip that realizes communication through a predetermined channel, and the MFP 300 does not communicate using a plurality of channels at the same time.

上述したように、MFP300がGroupOwnerまたはソフトAPとして動作しているのであれば、P2P接続に利用されるチャネルは、MFP300が自由に決定可能である。しかしながら、インフラ接続に利用されるチャネルは、アクセスポイント400によって決定される。そのため、MFP300は、同時動作する場合は、アクセスポイントによって決定された、インフラ接続に利用するチャネルを、P2P接続に利用するチャネルとして決定することが好ましい。 As described above, if the MFP 300 operates as the GroupOwner or the soft AP, the MFP 300 can freely determine the channel used for the P2P connection. However, the channel used for infrastructure connection is determined by the access point 400. Therefore, when the MFPs 300 operate simultaneously, it is preferable that the channel used for infrastructure connection determined by the access point is determined as the channel used for P2P connection.

なお、本実施形態では、インフラ接続、及びP2P接続では、いずれもWi−Fi標準規格で規定された、2.4GHz周波数帯の1〜13チャネルが利用されるものとする。しかしながら、異なる周波数帯ではチャネル数が増えたり、国や地域によっては周波数帯の規制により、同じ周波数帯でも1〜11チャネルに限定されたりする。そのため、MFP300によって利用されるチャネルは、1〜13チャネルに限定されるものではない。また、例えば、IEEE 802.11aの規格では、5GHzの周波数帯の36〜140チャネルが利用可能である。また、MFP300は、2.4GHz(1〜13チャネル)と5GHz(36〜140チャネル)の周波数帯を使う場合、利用可能なチャネル数は、どちらか一方の周波数帯を使う形態と比較して多くなる。そのため、両周波数帯が用いられる場合、アクセスポイントに機器探索コマンドを送信すべきチャネル数は増える。 In the present embodiment, it is assumed that the infrastructure connection and the P2P connection use 1 to 13 channels in the 2.4 GHz frequency band defined by the Wi-Fi standard. However, the number of channels is increased in different frequency bands, or the number of channels is limited to 1 to 11 even in the same frequency band due to restrictions on frequency bands in some countries or regions. Therefore, the channels used by MFP 300 are not limited to channels 1 to 13. Further, for example, in the IEEE 802.11a standard, 36 to 140 channels in the frequency band of 5 GHz can be used. Further, when the MFP 300 uses the frequency bands of 2.4 GHz (1 to 13 channels) and 5 GHz (36 to 140 channels), the number of available channels is larger than that in the case of using one of the frequency bands. Become. Therefore, when both frequency bands are used, the number of channels for transmitting the device search command to the access point increases.

<再接続処理について>
例えば、電波状況が悪くなったり、接続に用いられるチャネルの設定が変更されること等を切断要因として、MFP300とアクセスポイント400との間の無線接続が切断される場合がある。この場合、MFP300は、アクセスポイント400との再接続を試みる。ここでは、MFP300がアクセスポイント400と再接続するために実行する処理(再接続処理)について説明する。
<About reconnection processing>
For example, the wireless connection between the MFP 300 and the access point 400 may be disconnected due to a disconnection factor such as a poor radio wave condition or a change in the setting of the channel used for the connection. In this case, the MFP 300 tries to reconnect with the access point 400. Here, a process (reconnection process) executed by the MFP 300 to reconnect to the access point 400 will be described.

図17は、MFP300が同時動作している状態で、MFP300とアクセスポイント400との接続が切断された場合に行われる再接続処理のシーケンスを示す図である。なお、本シーケンスにおいて各装置が実行する処理は、各装置が備えるROM等のメモリに格納された各種プログラムを、各装置が備えるCPUがRAMに読み出して実行することにより実現される。また、本シーケンスが示す処理は、MFP300が、ソフトウェアAPとして動作している状態で開始されるものとする。 FIG. 17 is a diagram showing a sequence of a reconnection process performed when the connection between the MFP 300 and the access point 400 is disconnected while the MFPs 300 are simultaneously operating. The processing executed by each device in this sequence is realized by the CPU included in each device reading the various programs stored in the memory such as the ROM included in each device into the RAM and executing the programs. Further, it is assumed that the processing indicated by this sequence is started while MFP 300 is operating as software AP.

まず、S1701にて、図9の説明において述べた処理と同様にして、MFP300とアクセスポイント400が無線接続を確立し、アクセスポイント400を介してMFP300と通信相手装置がインフラ接続を確立する。なおここでは、MFP300とアクセスポイント400との接続(インフラ接続)に利用されるチャネルは、第pチャネルとして決定されたものとする。 First, in step S1701, the MFP 300 and the access point 400 establish a wireless connection, and the MFP 300 and the communication partner device establish an infrastructure connection via the access point 400, in the same manner as the processing described in the description of FIG. Here, it is assumed that the channel used for the connection (infrastructure connection) between MFP 300 and access point 400 is determined as the p-th channel.

また、S1702にて、図8の説明において述べた処理と同様にして、MFP300と端末装置200がP2P接続を確立する。なお、MFP300とアクセスポイント400との間の接続に利用されるチャネルが第pチャネルであるため、MFP300と端末装置200との接続(P2P接続)に利用されるチャネルも第pチャネルとして決定される。 In step S1702, the MFP 300 and the terminal device 200 establish a P2P connection in the same manner as the process described in the description of FIG. Since the channel used for the connection between the MFP 300 and the access point 400 is the p-th channel, the channel used for the connection between the MFP 300 and the terminal device 200 (P2P connection) is also determined as the p-th channel. ..

続いて、S1703にて、上述した切断要因等により、MFP300とアクセスポイント400との接続(インフラ接続)が切断される。すなわち、MFP300が、アクセスポイント400を介した通信相手装置とのインフラ接続と、端末装置200とのP2P接続を並行して確立している状態で、MFP300とアクセスポイント400との接続が切断される。このとき具体的には、アクセスポイント400が、切断コマンドをMFP300に送信する。 Subsequently, in step S1703, the connection (infrastructure connection) between the MFP 300 and the access point 400 is disconnected due to the disconnection factor described above. That is, the connection between the MFP 300 and the access point 400 is disconnected while the MFP 300 is establishing the infrastructure connection with the communication partner device via the access point 400 and the P2P connection with the terminal device 200 in parallel. .. At this time, specifically, the access point 400 transmits a disconnection command to the MFP 300.

なお、図17では、S1703にてMFP300とアクセスポイント400との接続が切断されたとしても、端末装置200とMFP300のP2P接続は維持されているものとする。 In FIG. 17, it is assumed that the P2P connection between the terminal device 200 and the MFP 300 is maintained even if the connection between the MFP 300 and the access point 400 is disconnected in S1703.

続いて、S1704にて、MFP300は、アクセスポイント400を再度発見して接続するために、切断されたインフラ接続において使用されていて且つ現在P2P接続において使用している第pチャネルを使用してアクセスポイント400の検索を行う。すなわち、MFP300は、第pチャネルを使用して装置探索リクエストコマンドをアクセスポイント400に送信する。なおこのとき、MFP300は、装置探索リクエストコマンドの送信を複数回実行しても良い。また、以後、アクセスポイント400の検索をAPサーチという。 Subsequently, in step S1704, the MFP 300 uses the p-th channel which is used in the disconnected infrastructure connection and is currently used in the P2P connection in order to rediscover and connect to the access point 400. The point 400 is searched. That is, the MFP 300 transmits the device search request command to the access point 400 using the p-th channel. At this time, the MFP 300 may execute the transmission of the device search request command a plurality of times. In addition, hereinafter, the search for the access point 400 is referred to as an AP search.

続いて、S1705にて、装置探索リクエストコマンドを受信したアクセスポイント400は、装置探索リクエストコマンドに対する応答である機器探索応答コマンドをMFP300に送信する。その後、S1706にて公知の接続処理が実行されることにより、MFP300とアクセスポイント400との接続が再開される。 Subsequently, in step S1705, the access point 400 receiving the device search request command transmits a device search response command, which is a response to the device search request command, to the MFP 300. After that, a publicly-known connection process is executed in S1706 to restart the connection between the MFP 300 and the access point 400.

これにより、MFP300は、MFP300とアクセスポイント400との接続が一旦切断されても、第pチャネルを使用して、インフラ接続を再度確立することができる。 Thereby, even if the connection between MFP 300 and access point 400 is once disconnected, MFP 300 can use the p-th channel to reestablish the infrastructure connection.

しかしながら例えば、接続の切断後に、アクセスポイント400が自律的に周囲の電波環境の混雑状況を参照して使用チャネルを比較的空いているチャネルに遷移させた場合等には、アクセスポイント400が利用するチャネルが、接続の切断前から変化する。また、アクセスポイント400が接続に利用するチャネルが変更されたことが、そもそも接続が切断された要因である場合もある。 However, for example, when the access point 400 autonomously changes the used channel to a relatively idle channel after disconnection by referring to the congestion state of the surrounding radio wave environment, the access point 400 uses the channel. The channel changes from before the disconnect. In addition, a change in the channel used by the access point 400 for connection may be the cause of disconnection in the first place.

アクセスポイント400が利用するチャネルが変更された場合、アクセスポイント400は、変更後のチャネルにより送信される装置探索リクエストコマンドにしか応答しない。そのため、MFP300は、切断されたインフラ接続に使用していたチャネル(つまり第pチャネル)によるAPサーチでは、アクセスポイント400と再接続することができない。そこで本実施形態のMFP300は、切断されたインフラ接続に使用していたチャネルによってAPサーチを実行した結果、再接続が実行できなかった場合に、切断されたインフラ接続に使用していたチャネル以外のチャネルによってAPサーチを実行する。 When the channel used by the access point 400 is changed, the access point 400 responds only to the device search request command transmitted by the changed channel. Therefore, the MFP 300 cannot reconnect to the access point 400 by the AP search using the channel used for the disconnected infrastructure connection (that is, the p-th channel). Therefore, the MFP 300 according to the present embodiment executes an AP search using the channel used for the disconnected infrastructure connection. As a result, if reconnection cannot be performed, the MFP 300 other than the channel used for the disconnected infrastructure connection is not used. Perform AP search by channel.

図18は、MFP300が、切断されたインフラ接続に使用していたチャネル以外のチャネルによってアクセスポイント400を検索する処理を含む再接続処理のシーケンスを示す図である。なお、本シーケンスにおいて各装置が実行する処理は、各装置が備えるROM等のメモリに格納された各種プログラムを、各装置が備えるCPUがRAMに読み出して実行することにより実現される。また、本シーケンスが示す処理は、MFP300が、ソフトウェアAPとして動作している状態で開始されるものとする。 FIG. 18 is a diagram showing a sequence of a reconnection process including a process in which the MFP 300 searches for the access point 400 using a channel other than the channel used for the disconnected infrastructure connection. The processing executed by each device in this sequence is realized by the CPU included in each device reading the various programs stored in the memory such as the ROM included in each device into the RAM and executing the programs. Further, it is assumed that the processing indicated by this sequence is started while MFP 300 is operating as software AP.

S1801〜S1804までの処理は、S1701〜S1704までの処理と同様であるため、説明を省略する。なお、S1803において、MFP300とアクセスポイント400との接続が切断された後、アクセスポイント400が使用するチャネルが、第pチャネルから第qチャネルに変更されたものとする。 The processing of S1801 to S1804 is the same as the processing of S1701 to S1704, and thus the description thereof is omitted. In step S1803, it is assumed that the channel used by the access point 400 is changed from the p-th channel to the q-th channel after the connection between the MFP 300 and the access point 400 is disconnected.

上述のようにアクセスポイント400が使用するチャネルが変更されたため、MFP300は、S1804における第pチャネルを用いたAPサーチでは、アクセスポイント400を検出することはできない。そのため、MFP300は、第pチャネルを用いたAPサーチを、アクセスポイント400を検出することなく所定の回数繰り返した場合、S1805にて、第pチャネル以外のチャネルを使用したAPサーチを行う。具体的には、MFP300は、使用可能な全チャネルを第1チャネルから順に使用して、APサーチを行う。なお、MFP300は、各チャネルを使用したAPサーチにおいて、装置探索リクエストコマンドの送信を複数回実行しても良い。なお、このとき、MFP300が利用可能な全てのチャネルで装置探索リクエストが送信されなくとも良い。すなわち、MFP300とアクセスポイント400との接続が切断される直前に、MFP300とアクセスポイント400との間の通信において使用されていたチャネル以外のチャネルが少なくとも使用されて装置探索リクエストが送信されれば良い。 Since the channel used by the access point 400 has been changed as described above, the MFP 300 cannot detect the access point 400 in the AP search using the p-th channel in S1804. Therefore, when the MFP 300 repeats the AP search using the p-th channel a predetermined number of times without detecting the access point 400, the MFP 300 performs an AP search using a channel other than the p-th channel in S1805. Specifically, the MFP 300 performs an AP search by sequentially using all available channels from the first channel. It should be noted that MFP 300 may execute transmission of the device search request command a plurality of times in the AP search using each channel. At this time, the device search request may not be transmitted on all channels available to MFP 300. That is, just before the connection between the MFP 300 and the access point 400 is disconnected, the device search request may be transmitted using at least a channel other than the channel used in the communication between the MFP 300 and the access point 400. ..

アクセスポイント400が使用するチャネルは第qチャネルであるため、MFP300が第qチャネルを使用してAPサーチを行った場合、S1806にて、アクセスポイント400は、機器探索応答コマンドをMFP300に送信する。 Since the channel used by access point 400 is the qth channel, when MFP 300 performs the AP search using the qth channel, access point 400 transmits a device search response command to MFP 300 in step S1806.

その後、S1807にて、MFP300は、P2P接続に利用するチャネルを切り替えるため、一旦端末装置200とのP2P接続を切断する。なお、端末装置200とのP2P接続が切断されるタイミングは、S1806の後に限定されず、例えば、MFP300とアクセスポイント400との接続が切断された後、P2Pモードによって通信されたデータの処理が完了したタイミング等であっても良い。 After that, in S1807, the MFP 300 disconnects the P2P connection with the terminal device 200 once in order to switch the channel used for the P2P connection. Note that the timing of disconnecting the P2P connection with the terminal device 200 is not limited to after S1806. For example, after the connection between the MFP 300 and the access point 400 is disconnected, processing of data communicated in the P2P mode is completed. It may be the timing of the start.

その後、S1808及び1109にて、公知の接続処理が実行されることにより、MFP300とアクセスポイント400との接続(インフラ接続)及びMFP300と端末装置200との接続(P2P接続)が再開される。 Thereafter, in steps S1808 and 1109, a publicly-known connection process is executed to restart the connection between the MFP 300 and the access point 400 (infrastructure connection) and the connection between the MFP 300 and the terminal device 200 (P2P connection).

なお、装置間で無線接続を再開する場合に送受信されるコマンドやパラメータについては、Wi−Fi規格で規定されているものが用いられればよく、ここでの説明は省略する。 The commands and parameters transmitted/received when the wireless connection is restarted between the devices may be those defined by the Wi-Fi standard, and the description thereof will be omitted here.

なお上述の形態において、MFP300とアクセスポイント400との接続が切断された後にアクセスポイント400が使用するチャネルが変更されていなければ、MFP300は、S1804におけるAPサーチによってアクセスポイント400と再接続する。この場合は、MFP300は、S1805の処理を省略する。 In the above-described embodiment, if the channel used by access point 400 has not been changed after the connection between MFP 300 and access point 400 has been disconnected, MFP 300 reconnects to access point 400 by the AP search in step S1804. In this case, the MFP 300 omits the process of S1805.

これにより、MFP300は、MFP300とアクセスポイント400との接続が切断された後、何らかの要因でアクセスポイント400が使用するチャネルが変更された場合も、アクセスポイント400と再接続することができる。 As a result, the MFP 300 can reconnect to the access point 400 even if the channel used by the access point 400 is changed due to some reason after the connection between the MFP 300 and the access point 400 is disconnected.

しかしながら、上述したように、本実施形態のMFP300は、同時に(並行して)複数のチャネルを使用しない。そのため、MFP300は、インフラ接続に使用していたチャネル(現在P2P接続に使用しているチャネル)以外のチャネルによってAPサーチを実行する場合、P2Pモードによる通信を一旦停止する必要がある。この場合、P2Pモードによる通信において、パケットロスや、送信パケットの遅延が発生したりするおそれがある。なお、パケットロスとは、P2P接続に使用するチャネルを用いて端末装置200が送信したパケットが、P2P接続に使用するチャネル以外のチャネルをMFP300が使用していたことによりMFP300に受信されず失われてしまうことをいう。また、送信パケットの遅延とは、MFP300がP2P接続に使用するチャネル以外のチャネルを使用していることで端末装置200へパケット送信できなかった場合、P2P接続に使用するチャネルが使用可能となるまでパケットの送信が遅延することをいう。 However, as described above, the MFP 300 of this embodiment does not use a plurality of channels at the same time (in parallel). Therefore, when performing an AP search using a channel other than the channel used for the infrastructure connection (the channel currently used for the P2P connection), the MFP 300 needs to temporarily stop the communication in the P2P mode. In this case, in communication in the P2P mode, there is a possibility that a packet loss or a transmission packet delay may occur. Note that packet loss means that a packet transmitted by the terminal device 200 using the channel used for P2P connection is not received by the MFP 300 and lost because the channel other than the channel used for P2P connection was used by the MFP 300. It means to end up. In addition, the transmission packet delay means that when the packet cannot be transmitted to the terminal device 200 because the MFP 300 uses a channel other than the channel used for the P2P connection, the channel used for the P2P connection becomes available. It means that the packet transmission is delayed.

なお、P2Pモードによる通信がTCP層を経由したネットワーク通信であれば、パケットロスが発生しても、ロスされたパケットが再送されるが、UDP層を経由したネットワーク通信である場合は、ロスされたパケットが再送されることはない。そのため、端末装置200のOS、ドライバ、またはアプリケーションの挙動によっては、パケットロスが生じることによって、P2Pモードによる通信における通信相手装置が検出できなかったり、アプリケーションが利用できなかったりするおそれがある。 If the communication in the P2P mode is network communication via the TCP layer, the lost packet is retransmitted even if a packet loss occurs, but if it is network communication via the UDP layer, it is lost. Packets will not be retransmitted. Therefore, depending on the behavior of the OS, the driver, or the application of the terminal device 200, packet loss may occur, so that the communication partner device in the P2P mode communication may not be detected or the application may not be used.

そこで、図18に示す再接続処理では、現在P2P接続に使用しているチャネルによるAPサーチを先に実行する形態としている。これにより、インフラ接続切断後にアクセスポイントが使用するチャネルが変更されていなければ、P2Pモードによる通信におけるパケットロスや送信パケット遅延をできるだけ発生させずにアクセスポイントを検出することができる。 Therefore, in the reconnection process shown in FIG. 18, the AP search by the channel currently used for P2P connection is executed first. As a result, if the channel used by the access point has not been changed after disconnection of the infrastructure, the access point can be detected without causing packet loss or transmission packet delay in communication in the P2P mode.

なお、上述した再接続処理はあくまで一例であり、本実施形態では、上述した再接続処理のほか、後述する図14に示すような、MFP300の状態に応じた種々の再接続処理が実行される。 Note that the reconnection process described above is merely an example, and in the present embodiment, in addition to the reconnection process described above, various reconnection processes depending on the state of the MFP 300 as shown in FIG. 14 described later are executed. ..

図10に、CPU602およびNWサブCPU621が実行するソフトウェアのドメインブロック図を示す。なお、1000〜1030のソフトウェアはROM603に、1031〜1034のソフトウェアはWLANユニット616が備えるメモリに格納されているものとする。また、1000〜1019のソフトウェアはCPU602によって実行され、1020−1030のソフトウェアはNWサブCPU621によって実行されるものとする。また、1031〜1034のソフトウェアはWLANユニット616が備えるCPUによって実行されるものとする。メインシステム1000は、CPU602によって実行される、μItron規格準拠の組込OS1001、装置全体に関わる状態遷移をつかさどるシステムタスクが含まれるSYSドメイン1002、および各機能ドメインによって全体が構成される。 FIG. 10 shows a domain block diagram of software executed by the CPU 602 and the NW sub CPU 621. The software of 1000 to 1030 is stored in the ROM 603, and the software of 1031 to 1034 is stored in the memory of the WLAN unit 616. The software of 1000 to 1019 is executed by the CPU 602, and the software of 1020-1030 is executed by the NW sub CPU 621. Further, the software of 1031 to 1034 is assumed to be executed by the CPU included in the WLAN unit 616. The main system 1000 is entirely configured by a μItron standard-compliant embedded OS 1001 executed by the CPU 602, a SYS domain 1002 including system tasks that control state transitions related to the entire apparatus, and functional domains.

NWサブシステム620は、メインシステム1000の一部であり、NWサブCPU621によって実行される組込OS1020とNWサブシステム内の状態遷移をつかさどるSYSドメイン1021、およびネットワーク関連の各機能ドメインで構成される。 The NW subsystem 620 is a part of the main system 1000, and includes an embedded OS 1020 executed by the NW sub CPU 621, a SYS domain 1021 that controls state transitions in the NW subsystem, and network-related functional domains. ..

CPU602が実行するI/Fドメイン1010には、アプリドメイン1005と連携した各種サービスプロトコル毎のインターフェース制御ブロック群が含まれる。WSD(WebServiceForDevice)1014は、WSDに準拠した印刷やスキャン、FAXを実行するためのソフトウェアである。IPP(InternetPrintingProtocol)1015は、IPPに準拠した印刷やスキャン、FAXを実行するためのソフトウェアである。I/FアプリMgrタスク1016は、WSD1014やIPP1015等の各サービスプロトコルに割り当てるHTTPタスク1017のリソース(本数)を管理することによって、各サービスの実行状態を把握するためのソフトウェアである。CPU602は、各サービスプロトコルによって、各サービスプロトコルに割り当てられたHTTPタスクを経由したソケットAPI1019によって、NWサブシステム620との間で双方向のCPU間データ通信を実施する。各ソケットのパラメータには、インターフェース情報としてインフラストラクチャーモード/WFDモード/ソフトウェアAPモードを示す接続モード情報が付加されている。 The I/F domain 1010 executed by the CPU 602 includes an interface control block group for each service protocol linked with the application domain 1005. A WSD (Web Service For Device) 1014 is software for executing printing, scanning, and FAX based on WSD. An IPP (Internet Printing Protocol) 1015 is software for executing printing, scanning, and FAX based on IPP. The I/F application Mgr task 1016 is software for grasping the execution state of each service by managing the resources (number) of the HTTP task 1017 assigned to each service protocol such as WSD 1014 and IPP 1015. The CPU 602 performs bidirectional data communication between the CPUs with the NW subsystem 620 by the socket API 1019 via the HTTP task assigned to each service protocol according to each service protocol. Connection mode information indicating infrastructure mode/WFD mode/software AP mode is added to the parameters of each socket as interface information.

CPU602は、ソケットAPI経由の送受信パケットを、NWサブシステム620内のTCP/IPタスク1026やUDPタスク1027でハンドリングする。そして、CPU602は、ソケットAPI経由の送受信パケットを経路制御し、インターフェース情報に応じて、インフラコントローラ1024やP2Pコントローラ1025、データコントローラ1028に渡す。その後、CPU602は、ソケットAPI経由の送受信パケットを、WLANチップコントローラ1029によって、パケットデータと802.11等の通信規格に沿ったデータにフォーマット変換する。そして最後に、CPU602は、変換後のデータを、USBのパケットサイズである512バイト単位に分割し、USBHOSTドライバタスク1030によるDMA制御によって、WLANユニット616に到達させる。 The CPU 602 handles the transmission/reception packet via the socket API by the TCP/IP task 1026 and the UDP task 1027 in the NW subsystem 620. Then, the CPU 602 routes the transmission/reception packet via the socket API, and passes it to the infrastructure controller 1024, the P2P controller 1025, and the data controller 1028 according to the interface information. After that, the CPU 602 converts the format of the transmission/reception packet via the socket API into the packet data and the data according to the communication standard such as 802.11 by the WLAN chip controller 1029. Finally, the CPU 602 divides the converted data into 512-byte units, which is the USB packet size, and makes the WLAN unit 616 reach the WLAN unit 616 by DMA control by the USBHOST driver task 1030.

WLANユニット内には、ユニット間データ送受信を担うUSBモジュール1031、802.11規格に準拠した制御用の2つのモジュール(データ制御モジュール1032、波形制御モジュール1033)が存在する。また、WLANユニット内には、単一無線アンテナの送受信のためのWLANRFモジュール1034が存在する。 In the WLAN unit, there are two modules (data control module 1032, waveform control module 1033) for control conforming to the USB module 1031 and 802.11 standard, which are responsible for data transmission and reception between the units. There is also a WLAN RF module 1034 for transmitting and receiving a single radio antenna in the WLAN unit.

また、CPU602及びNWサブシステム620が共通して実行するソフトウェアとして、パケットデータ送受信用のソケットAPIや、コントロールAPI1018が存在する。コントロールAPI1018は、NWサブシステム内の各制御モジュールの設定変更や実行コマンドの指示、およびネットワーク状態変化の通知等を行うためのAPIである。I/Fドメイン内の、I/F接続Mgr1011・同時動作接続シーケンサ1012・APサーチハンドラ1013からは、コントロールAPI経由で、I/Fドメイン内の状態や周辺ドメインの状態に応じたコマンドが発行される。 Further, as software commonly executed by the CPU 602 and the NW subsystem 620, there are a socket API for packet data transmission/reception and a control API 1018. The control API 1018 is an API for changing the setting of each control module in the NW subsystem, instructing an execution command, notifying a network state change, and the like. The I/F connection Mgr 1011/simultaneous operation connection sequencer 1012/AP search handler 1013 in the I/F domain issues a command according to the status in the I/F domain and the status of the peripheral domains via the control API. It

NWサブCPU621は、NWサブMgr1022によって、I/Fドメイン内の各要素から発行されたコマンドをハンドリングする。NWサブCPU621は、ハンドリングするコマンドの種類に応じて、インフラコントローラ1024やP2Pコントローラ1025を用いて、インフラストラクチャモードやP2Pモードの起動・終了制御と設定変更指示を行う。また、本実施形態では、MFP300が同時動作しており、装置状態や周辺ドメイン状態が考慮された接続処理が必要な場合には、同時動作接続シーケンサ1012によってCPU602単独で接続を実行する。一方、本実施形態では、MFP300が同時動作しておらず、装置状態や周辺ドメイン状態が考慮された接続処理が必要ない場合には、NWサブ接続シーケンサ1023によってNWサブCPU621単独で接続を実行する。例えば、ユーザ操作(本体UI操作等)に起因しない再接続処理が行われる場合は、NWサブ接続シーケンサ1023により、バックグランドでAPサーチが実行され続ける。なお、ユーザ操作に起因しない再接続処理が行われる場合とは、具体的には例えば、インフラストラクチャモードで動作するMFP300とアクセスポイントとの接続が切断された場合である。また、このとき、NWサブ接続シーケンサ1023により、MFP300が使用可能な全てのチャネルによってAPサーチが実行される。このような構成とすることで、APが使用するチャネルが変更された場合にも、MFP300とAPとを再接続させることが可能である。 The NW sub CPU 621 handles the command issued from each element in the I/F domain by the NW sub Mgr 1022. The NW sub CPU 621 uses the infrastructure controller 1024 and the P2P controller 1025 to perform start/end control of the infrastructure mode and the P2P mode and a setting change instruction according to the type of command to be handled. Further, in the present embodiment, when the MFPs 300 are simultaneously operating and a connection process in which the device state and the peripheral domain state are taken into consideration is required, the simultaneous operation connection sequencer 1012 executes the connection by the CPU 602 alone. On the other hand, in the present embodiment, when the MFPs 300 are not operating simultaneously and the connection processing in consideration of the device status and the peripheral domain status is not required, the NW sub connection sequencer 1023 executes the connection by the NW sub CPU 621 alone. .. For example, when reconnection processing that is not caused by a user operation (UI operation on the main body or the like) is performed, the NW sub connection sequencer 1023 continues to execute the AP search in the background. Note that the case where the reconnection process that is not caused by the user operation is performed is, for example, a case where the connection between the MFP 300 operating in the infrastructure mode and the access point is disconnected. Further, at this time, the NW sub-connection sequencer 1023 executes the AP search by all the channels available to the MFP 300. With such a configuration, even when the channel used by the AP is changed, the MFP 300 and the AP can be reconnected.

本実施形態では、種々のコマンドがCPU602とNWサブCPU621間で通信される。ここで、CPU602とNWサブCPU621間のCPU間通信について説明する。 In this embodiment, various commands are communicated between the CPU 602 and the NW sub CPU 621. Here, the inter-CPU communication between the CPU 602 and the NW sub CPU 621 will be described.

図12は、CPU602がコントロールAPIタスクによって実行する処理を示すフローチャートを示す図である。コントロールAPIタスクは、CPU602とNWサブCPU621間のCPU間通信を実行するタスクであり、コマンド送信と状態通知イベント受信(NWサブCPU側からみればコマンド受信と状態通知イベント配信)の責務を担っている。コマンド送信におけるコマンドとパラメータ、イベント受信におけるイベントと通知情報は、双方のCPUからアクセス可能なRAM604の一部に確保された共有RAMとCPU間割込信号とによって、イベントドリブン形式でやり取りされる。なお、本フローチャートが示す処理は、例えば、ROM603等のメモリに格納されたコントロールAPI1018に対応するプログラムをCPU602がRAM604に読み出して実行することにより実現される。 FIG. 12 is a diagram showing a flowchart showing the processing executed by the CPU 602 by the control API task. The control API task is a task that executes inter-CPU communication between the CPU 602 and the NW sub CPU 621, and is responsible for command transmission and status notification event reception (command reception and status notification event delivery from the NW sub CPU side). There is. Commands and parameters in command transmission, and event and notification information in event reception are exchanged in an event driven format by a shared RAM secured in a part of RAM 604 accessible by both CPUs and an inter-CPU interrupt signal. The process shown in this flowchart is realized by the CPU 602 reading a program corresponding to the control API 1018 stored in a memory such as the ROM 603 into the RAM 604 and executing the program.

まずCPU602は、I/Fドメイン1010内の各タスクからコマンドメッセージが発行された時、又はNWサブCPU621からの状態通知イベント割込みが発生した時にWAITタスクから復帰して、コントロールAPIタスクを実行する(S1200)。その後、CPU602は、NWサブCPU621に送信するコマンドがあるか否かを判定する(S1201)。例えば、CPU602は、後述するS1105・S1112・S1121・S1126等でコマンドをNWサブCPU621に送信する場合には、送信するコマンドとパラメータを共有RAMにセットする(S1202)。その後、CPU602は、NWサブCPU621にセットしたコマンドを送信する(S1203)。NWサブCPU621は、送信された各コマンドを、NWサブMgr1022によって受け付けた後、NWサブ接続シーケンサ1023・インフラコントローラ1024・P2Pコントローラ1025の各タスクに配信し、コマンドに応じた処理を実行する。 First, the CPU 602 returns from the WAIT task and executes the control API task when a command message is issued from each task in the I/F domain 1010 or a status notification event interrupt is generated from the NW sub CPU 621 ( S1200). After that, the CPU 602 determines whether or not there is a command to be transmitted to the NW sub CPU 621 (S1201). For example, when transmitting a command to the NW sub CPU 621 in S1105/S1112/S1121/S1126, which will be described later, the CPU 602 sets the command and parameter to be transmitted in the shared RAM (S1202). After that, the CPU 602 transmits the command set in the NW sub CPU 621 (S1203). The NW sub CPU 621 receives each transmitted command by the NW sub Mgr 1022, then distributes it to each task of the NW sub connection sequencer 1023, the infrastructure controller 1024, and the P2P controller 1025, and executes a process according to the command.

一方、CPU602は、NWサブCPU621に送信するコマンドがない場合には、NWサブCPU621から受け付けた通知に応じて各処理を実行する。 On the other hand, when there is no command to be transmitted to the NW sub CPU 621, the CPU 602 executes each process according to the notification received from the NW sub CPU 621.

後述するS1105やS1121において送信されるインフラ接続コマンドに対応して、NWサブCPU621がインフラ接続処理を実行した場合、CPU602は、インフラ接続完了通知をNWサブCPU621から受信する(S1210)。CPU602は、共有RAM経由で情報を取得し(S1270)、取得情報に含まれる、インフラ接続に成功したチャネルの番号や割り当てられたIPアドレス等を保存する(S1211)。その後、CPU602は、S1106やS1122で参照されるインフラ接続完了イベントを発生させる(S1212)。 When the NW sub CPU 621 executes the infrastructure connection processing in response to the infrastructure connection command transmitted in S1105 or S1121 described later, the CPU 602 receives the infrastructure connection completion notification from the NW sub CPU 621 (S1210). The CPU 602 acquires information via the shared RAM (S1270), and stores the channel number of the successfully connected infrastructure, the assigned IP address, and the like included in the acquired information (S1211). After that, the CPU 602 generates an infrastructure connection completion event referenced in S1106 and S1122 (S1212).

また、MFP300がアクセスポイント400を介して通信相手装置とインフラ接続している状態で、MFP300とアクセスポイント400との接続が切断される場合がある。この場合、NWサブCPU621からCPU602へ、インフラ接続が切断されたことを示す切断イベントが通知される(S1220)。その後、CPU602は、切断イベントの通知において、NWサブCPU621から通知される情報がある場合には、共有RAM経由で情報を取得する(S1270)。なおこのとき、NWサブCPU621から通知される情報がない場合には、S1270の処理は省略される。その後、CPU602は、後述の再接続処理において参照されるインフラ再接続Msegを発行する(S1221)。 In addition, the connection between the MFP 300 and the access point 400 may be disconnected while the MFP 300 is in infrastructure connection with the communication partner device via the access point 400. In this case, the NW sub CPU 621 notifies the CPU 602 of a disconnection event indicating that the infrastructure connection has been disconnected (S1220). After that, if there is information notified from the NW sub CPU 621 in the notification of the disconnection event, the CPU 602 acquires the information via the shared RAM (S1270). At this time, if there is no information notified from the NW sub CPU 621, the process of S1270 is omitted. After that, the CPU 602 issues the infrastructure reconnection Mseg referred to in the reconnection processing described later (S1221).

また、後述するS1112やS1126において送信されるP2P起動コマンドに対応して、NWサブCPU621は、P2Pコントローラ1025を起動し、MFP300をソフトウェアAPとして動作させる。これにより、ソフトウェアAPとして動作するMFP300の識別子となるSSID名(プリンタSSID名)を含むビーコン信号がWLANユニット616から周期的にブロードキャストされる。そして、NWサブCPU621は、ビーコンを検出した端末装置200からの機器探索リクエスト(ProbeRequest)を受け付けた場合、P2Pコントローラ1025によって機器探索応答(ProbeResponse)を端末装置200に送信する。機器探索応答を受け付けた端末装置200は、ソフトウェアAPとして動作しているMFP300への接続要求を送信する。NWサブCPU621は、接続要求を受信し、パスワード認証が成功した場合、端末装置200へ接続許可を送信することで、MFP300と端末装置200とのP2P接続が確立することになる。 Further, in response to the P2P activation command transmitted in S1112 or S1126 described later, the NW sub CPU 621 activates the P2P controller 1025 to operate the MFP 300 as a software AP. As a result, a beacon signal including the SSID name (printer SSID name) serving as the identifier of the MFP 300 operating as the software AP is periodically broadcast from the WLAN unit 616. Then, when the NW sub CPU 621 receives the device search request (ProbeRequest) from the terminal device 200 that has detected the beacon, the PW controller 1025 transmits a device search response (ProbeResponse) to the terminal device 200. The terminal device 200 that has received the device search response transmits a connection request to the MFP 300 operating as the software AP. When the NW sub CPU 621 receives the connection request and the password authentication is successful, the NW sub CPU 621 transmits the connection permission to the terminal device 200, so that the P2P connection between the MFP 300 and the terminal device 200 is established.

本実施形態では、MFP300は、MFP300がGroupOwnerなるP2P接続において、最大5台までの端末装置200との接続を許可している。P2P接続中の端末装置の台数(P2P接続台数)の管理のために、CPU602は、P2P接続時はP2Pデバイス接続通知を受信する(S1230)。そして、MFP300は、P2P接続の切断(端末装置200の離脱)時はP2Pデバイス切断通知(S1240)をNWサブCPU621から受信する。その後、CPU602は、NWサブCPU621から通知される情報がある場合には、共有RAM経由で情報を取得する(S1270)。なおこのとき、NWサブCPU621から通知される情報がない場合には、S1270の処理は省略される。そして、CPU602は、受け付けた通知に応じて、RAM等のメモリに保存されているP2P接続台数の値を加減し(S1231・S1241)、接続Msegや切断Msegを発行する(S1232・S1242)。 In the present embodiment, the MFP 300 permits connection with up to five terminal devices 200 in a P2P connection in which the MFP 300 is a GroupOwner. In order to manage the number of terminal devices in P2P connection (the number of P2P connections), the CPU 602 receives a P2P device connection notification during P2P connection (S1230). Then, the MFP 300 receives the P2P device disconnection notification (S1240) from the NW sub CPU 621 when the P2P connection is disconnected (the terminal device 200 is disconnected). After that, if there is information notified from the NW sub CPU 621, the CPU 602 acquires the information via the shared RAM (S1270). At this time, if there is no information notified from the NW sub CPU 621, the process of S1270 is omitted. Then, the CPU 602 adds or subtracts the value of the number of P2P connections stored in the memory such as the RAM according to the received notification (S1231 and S1241), and issues the connection Mseg and the disconnection Mseg (S1232 and S1242).

CPU602は、接続Msegを発行すると、I/FアプリMgrタスクによって、アプリドメイン1005および各サービスプロトコル1014・1015等と連携し、物理層での接続に続くアプリケーション・サービス層での接続処理を実施する(不図示)。 When the CPU 602 issues the connection Mseg, the I/F application Mgr task cooperates with the application domain 1005 and each of the service protocols 1014-1015, and executes the connection processing in the application/service layer following the connection in the physical layer. (Not shown).

また、CPU602は、切断Msegを発行すると、I/FアプリMgrタスクによって、P2P接続が解除された端末装置200に割り当てられていたHTTPリソースの解放処理を実施する(不図示)。P2P接続台数情報やHTTPのリソース情報は、後述する、同時動作におけるインフラ切断後の再接続処理で参照されることになる。 Further, when the CPU 602 issues the disconnection Mseg, the I/F application Mgr task executes a process of releasing the HTTP resource assigned to the terminal device 200 whose P2P connection has been released (not shown). The P2P connection number information and the HTTP resource information will be referred to in the reconnection process after disconnection of the infrastructure in the simultaneous operation, which will be described later.

また、APサーチの結果、WLANユニット616がアクセスポイント400から機器探索応答(ProbeResponse)を受信した場合、CPU602は、APサーチ完了通知をNWサブCPU621から受信する(S1250)。その後、CPU602は、共有RAM経由で情報を取得する(S1270)。そしてCPU602は、取得した情報に含まれる、検出したアクセスポイント400のMACアドレス及び検出に成功した通信チャネルの番号を内部RAMに保存し(S1251)、同時接続シーケンサタスクにAPサーチ完了イベントを発行する。(S1252)
また、APサーチの結果、WLANユニット616がアクセスポイント400から接続許可応答のレスポンスを受信した場合、CPU602は、AP JOIN完了通知をNWサブCPU621から受信する(S1260)。その後、CPU602は、共有RAM経由で情報を取得する(S1270)。そしてCPU602は、取得した情報に含まれる、アクセスポイント400から割り振られたIPアドレスおよびインフラ接続に利用する通信チャネル番号を内部RAMに保存し(S1261)、AP JOIN完了イベントを発行する(S1262)。
When the WLAN unit 616 receives the device search response (ProbeResponse) from the access point 400 as a result of the AP search, the CPU 602 receives the AP search completion notification from the NW sub CPU 621 (S1250). After that, the CPU 602 acquires information via the shared RAM (S1270). Then, the CPU 602 stores the MAC address of the detected access point 400 and the number of the communication channel that has been successfully detected, which are included in the acquired information, in the internal RAM (S1251) and issues an AP search completion event to the simultaneous connection sequencer task. .. (S1252)
When the WLAN unit 616 receives the response of the connection permission response from the access point 400 as a result of the AP search, the CPU 602 receives the AP JOIN completion notification from the NW sub CPU 621 (S1260). After that, the CPU 602 acquires information via the shared RAM (S1270). Then, the CPU 602 saves the IP address allocated from the access point 400 and the communication channel number used for infrastructure connection, which is included in the acquired information, in the internal RAM (S1261) and issues an AP JOIN completion event (S1262).

続いて、ネットワークの接続・切断・再接続のシーケンスを説明する。 Next, a sequence of network connection/disconnection/reconnection will be described.

図11は、CPU602がI/F接続Mgr1011によって実行する処理を示すフローチャートである。無線ネットワークの接続処理を中心に、パワーオン時の処理・切断再接続時の処理・パラメータ変更時の処理とを、順に説明していく。なお、本フローチャートが示す処理は、例えば、ROM603等のメモリに格納されたI/F接続Mgr1011に対応するプログラムをCPU602がRAM604に読み出して実行することにより実現される。 FIG. 11 is a flowchart showing the processing executed by the CPU 602 by the I/F connection Mgr 1011. The process of powering on, the process of disconnecting and reconnecting, and the process of changing parameters will be described in order centering on the connection process of the wireless network. The process shown in this flowchart is realized by the CPU 602 reading a program corresponding to the I/F connection Mgr 1011 stored in a memory such as the ROM 603 into the RAM 604 and executing the program.

[パワーオン(電源オン)時の処理]
以下、MFP300の電源がオフ状態からオン状態に復帰した際に実行される接続処理について説明する。以下の処理は、MFP300が電源オフ状態になる前のMFP300の接続状態を復帰させる処理である。
[Processing at power-on]
Hereinafter, a connection process executed when the power of the MFP 300 returns from the off state to the on state will be described. The following process is a process of restoring the connection state of the MFP 300 before the MFP 300 is turned off.

MFP300のパワーオン時には、パワーオンMsegが、SYSドメインから各ドメインに発行される。CPU602は、I/Fドメインに発行されたパワーオンMsegを、接続Mgr1011によって処理する(S1101)。 When the MFP 300 is powered on, a power-on Mseg is issued from the SYS domain to each domain. The CPU 602 processes the power-on Mseg issued to the I/F domain by the connection Mgr 1011 (S1101).

その後、CPU602は、MFP300内の不揮発性メモリ(不図示)に保持されているユーザ設定値を参照し、MFP300が同時動作モードか否かを判定する(S1102)。 After that, the CPU 602 refers to the user setting value held in the non-volatile memory (not shown) in the MFP 300, and determines whether the MFP 300 is in the simultaneous operation mode (S1102).

CPU602は、MFP300が同時動作モードでないと判定した場合は、MFP300がインフラストラクチャモードか否かを判定する(S1103)。CPU602は、MFP300がインフラストラクチャモードであると判定した場合、インフラ接続を確立するための接続処理を実行する。具体的には、まずCPU602は、不揮発性メモリに保存されている、インフラ接続を実行するためのネットワークパラメータ(SSID・認証方法・パスワード等)を取得する(S1104)。このネットワークパラメータは、前回のパワーオフ時にインフラ接続していたアクセスポイントと接続するためのパラメータに相当する。そして、CPU602は、コントロールAPIタスクで取得したパラメータをコマンド引数としたインフラ接続コマンドを、コントロールAPIタスク経由でNWサブCPU621に発行する(S1105)。なお、インフラ接続コマンドとは、取得したパラメータによってインフラ接続を再度確立させる再接続処理をNWサブCPU621に実行させるためのコマンドである。すなわち、CPU602は、パワーオン時にMFP300がインフラストラクチャモードである場合、再接続処理を、NWサブCPU621に実行させることを特定する。 When determining that the MFP 300 is not in the simultaneous operation mode, the CPU 602 determines whether the MFP 300 is in the infrastructure mode (S1103). When determining that the MFP 300 is in the infrastructure mode, the CPU 602 executes a connection process for establishing an infrastructure connection. Specifically, first, the CPU 602 acquires network parameters (SSID, authentication method, password, etc.) for executing infrastructure connection, which are stored in the nonvolatile memory (S1104). This network parameter corresponds to the parameter for connecting to the access point that was connected to the infrastructure at the previous power off. Then, the CPU 602 issues an infrastructure connection command using the parameter acquired by the control API task as a command argument to the NW sub CPU 621 via the control API task (S1105). The infrastructure connection command is a command for causing the NW sub CPU 621 to execute reconnection processing for reestablishing the infrastructure connection according to the acquired parameters. That is, CPU 602 specifies to cause NW sub CPU 621 to execute the reconnection process when MFP 300 is in the infrastructure mode at power-on.

インフラ接続コマンドを受け付けたNWサブCPU621は、NWサブ接続シーケンサ1023によって、アクセスポイントの検索処理及び検出したアクセスポイントとの接続処理から構成されるシーケンス処理を実行する。具体的には、NWサブCPU621は、図18に示す再接続処理におけるS1804〜S1806、S1808の処理を実行する。 Upon receiving the infrastructure connection command, the NW sub CPU 621 executes, by the NW sub connection sequencer 1023, a sequence process including an access point search process and a connection process with the detected access point. Specifically, the NW sub CPU 621 executes the processing of S1804 to S1806 and S1808 in the reconnection processing shown in FIG.

続いて、CPU602は、NWサブCPU621が実行する再接続処理により、アクセスポイントとの接続が完了したか否かを判定する(S1106)。具体的には、CPU602は、コントロールAPIタスク経由のインフラ接続完了イベントが発生したか否かを判定する。CPU602は、アクセスポイントとの接続が完了していないと判定した場合、S1106の処理を再度実行する。一方、CPU602は、アクセスポイントとの接続が完了したと判定した場合、接続に成功したチャネルの番号や、接続完了後にアクセスポイントからMFP300に割り振られるIPアドレス等の接続情報を取得し(S1107)、不揮発性メモリに保存する。 Subsequently, the CPU 602 determines whether or not the connection with the access point is completed by the reconnection process executed by the NW sub CPU 621 (S1106). Specifically, the CPU 602 determines whether an infrastructure connection completion event via the control API task has occurred. When the CPU 602 determines that the connection with the access point is not completed, the CPU 602 executes the process of S1106 again. On the other hand, when the CPU 602 determines that the connection with the access point is completed, the CPU 602 acquires the connection number such as the number of the channel that has been successfully connected and the IP address assigned to the MFP 300 from the access point after the connection is completed (S1107). Save to non-volatile memory.

このように、CPU602は、パワーオン時にMFP300がインフラストラクチャモードである場合は、パワーオフ時に切断されたインフラ接続を、パワーオン時に再開することができる。 As described above, when the MFP 300 is in the infrastructure mode at the time of power-on, the CPU 602 can restart the infrastructure connection disconnected at the time of power-off at the time of power-on.

また、CPU602は、S1103において、MFP300がインフラストラクチャモードでないと判定した場合(MFP300がP2Pモードの場合)は、P2Pモード時に使用されるMFP300内のアクセスポイントを有効にする。具体的にはまず、CPU602は、MFP300内のアクセスポイント経由での通信(P2Pモードによる通信)に利用するチャネルを決定する(S1110)。なお、利用されるチャネルの番号は、デフォルト値が設定されているものとし、ここでは3番のチャネルが利用されるものとする。なお、この番号のチャネルに限定されず、任意の番号のチャネルが利用されて良い。 If the CPU 602 determines in S1103 that the MFP 300 is not in the infrastructure mode (when the MFP 300 is in the P2P mode), the CPU 602 validates the access point in the MFP 300 used in the P2P mode. Specifically, first, CPU 602 determines a channel to be used for communication (communication in the P2P mode) via the access point in MFP 300 (S1110). It should be noted that the channel number to be used is set to a default value, and the channel number 3 is used here. Note that the channel is not limited to this number, and a channel with an arbitrary number may be used.

続いて、CPU602は、MFP300内のアクセスポイントとの接続に利用されるネットワークパラメータ(SSID、パスワード、利用されるチャネル番号等)を取得する(S1111)。そして、CPU602は、取得したパラメータをコマンド引数としたAP起動コマンドを、コントロールAPIタスク経由でNWサブCPU621に発行する(S1112)。なお、AP起動コマンドとは、取得したパラメータによって接続可能なソフトAPを起動させる処理をNWサブCPU621に実行させるためのコマンドである。 Subsequently, the CPU 602 acquires network parameters (SSID, password, channel number used, etc.) used for connection with the access point in the MFP 300 (S1111). Then, the CPU 602 issues an AP start command using the acquired parameter as a command argument to the NW sub CPU 621 via the control API task (S1112). The AP activation command is a command for causing the NW sub CPU 621 to execute a process of activating a connectable software AP according to the acquired parameters.

AP起動コマンドを受け付けたNWサブCPU621は、AP起動コマンドに含まれるネットワークパラメータを参照し、P2P接続に利用するチャネル番号(3番)を特定する。そして、NWサブCPU621は、MFP300内のアクセスポイントを有効化し、3番のチャネルを用いて、MFP300内のアクセスポイントのSSID等が含まれるビーコン信号を周期的に発信する。その後、NWサブCPU621は、端末装置200からの機器探索リクエストを待ち、機器探索リクエストを受信した場合は、機器探索応答を端末装置200に送信して、MFP300と端末装置200とのP2P接続を確立する。 The NW sub CPU 621 that has received the AP start command refers to the network parameter included in the AP start command and specifies the channel number (No. 3) used for P2P connection. Then, the NW sub CPU 621 validates the access point in the MFP 300, and periodically transmits a beacon signal including the SSID of the access point in the MFP 300 using the third channel. After that, the NW sub CPU 621 waits for a device search request from the terminal device 200, and when a device search request is received, transmits a device search response to the terminal device 200 to establish a P2P connection between the MFP 300 and the terminal device 200. To do.

このように、CPU602は、パワーオン時にMFP300がP2Pモードである場合は、パワーオフ時に切断されたP2P接続を、パワーオン時に再開することができる。 As described above, when the MFP 300 is in the P2P mode at power-on, the CPU 602 can restart the P2P connection disconnected at power-off at power-on.

また、上述したように、パワーオン時にMFP300がインフラストラクチャモードである場合、及びパワーオン時にMFP300がP2Pモードである場合には、再接続処理をNWサブCPU621が実行する。このような形態とすることで、再接続処理にかかる負荷がCPU602にかかることを抑制できる。 Further, as described above, when the MFP 300 is in the infrastructure mode at the time of power-on and when the MFP 300 is in the P2P mode at the time of power-on, the NW sub CPU 621 executes the reconnection process. With such a configuration, it is possible to prevent the load on the reconnection processing from being applied to the CPU 602.

一方、CPU602は、S1102において、MFP300が同時動作モードであると判定した場合、同時動作を実行するために、インフラ接続の確立及びMFP300内のアクセスポイントの有効化を行う。具体的には、CPU602は、S1120〜S1123において、S1104〜S1107と同様の処理を行い、MFP300とアクセスポイントとの接続を確立する。その後、CPU602は、S1124〜S1126において、S1110〜S1112と同様の処理を行い、MFP300内のアクセスポイントの有効化を行う。なお、S1124において、CPU602は、アクセスポイントとの接続に成功したチャネルの番号を特定し、特定した番号のチャネルを、MFP300内のアクセスポイント経由での通信(P2Pモードによる通信)に利用するチャネルとして決定する。そして、CPU602は、S1111及びS1112と同様の処理を実行することで(S1125、S1126)、S1124において決定したチャネルで接続可能なMFP300内のアクセスポイントが起動する。 On the other hand, when the CPU 602 determines in S1102 that the MFP 300 is in the simultaneous operation mode, the CPU 602 establishes the infrastructure connection and validates the access point in the MFP 300 to execute the simultaneous operation. Specifically, in S1120 to S1123, the CPU 602 performs the same processing as S1104 to S1107 to establish a connection between the MFP 300 and the access point. After that, in S1124 to S1126, the CPU 602 performs the same process as in S1110 to S1112 to validate the access point in the MFP 300. Note that in step S1124, the CPU 602 identifies the number of the channel that has been successfully connected to the access point, and uses the channel of the identified number as the channel to be used for communication (communication in the P2P mode) via the access point in the MFP 300. decide. Then, the CPU 602 executes the same processing as S1111 and S1112 (S1125, S1126), thereby activating the access point in the MFP 300 that can be connected through the channel determined in S1124.

このように、CPU602は、パワーオン時にMFP300が同時動作モードである場合は、パワーオフ時に切断されたP2P接続及びインフラ接続を、パワーオン時に再開することができる。 In this manner, the CPU 602 can restart the P2P connection and the infrastructure connection that were disconnected at the time of power-off when the MFP 300 is in the simultaneous operation mode at the time of power-on.

また、上述したように、パワーオン時にMFP300が同時動作モードである場合には、再接続処理をNWサブCPU621が実行する。これは、パワーオン時には、インフラ接続とP2P接続が共に切断された状態であるため、各接続によって通信されるデータの処理等を担うアプリケーションが実行されておらず、MFP300本体の状態に応じた再接続処理が実行される必要がないためである。再接続処理をNWサブCPU621が実行することにより、再接続処理にかかる負荷がCPU602にかかることを抑制できる。 Further, as described above, when MFP 300 is in the simultaneous operation mode at the time of power-on, NW sub CPU 621 executes reconnection processing. This is because both the infrastructure connection and the P2P connection are disconnected at the time of power-on, so an application responsible for processing data communicated by each connection is not executed, and the replay corresponding to the status of the MFP 300 main body is not executed. This is because the connection process need not be executed. Since the NW sub CPU 621 executes the reconnection process, it is possible to suppress the load of the reconnection process on the CPU 602.

以上で、パワーオン処理の無線ネットワーク接続処理に関して説明した。パワーオン時は、CPU602は、エンジンドメインやUIドメイン等を用いた装置全体の起動処理を行う必要がある。そのためパワーオン時の再接続処理をCPU602が実行する形態では、接続処理シーケンスが複雑化するだけでなく、装置全体の起動処理にかけられるリソース不足により起動処理に時間がかかり、ユーザーの利便性が損なわれてしまう。そこで、本実施形態においては、パワーオン時の再接続処理をNWサブCPU621が実行することで、無線接続シーケンスが負荷分散され、CPU602は、スムーズに起動処理を遂行することができる。 The wireless network connection process of the power-on process has been described above. At the time of power-on, the CPU 602 needs to perform a startup process of the entire device using an engine domain, a UI domain, or the like. Therefore, in the mode in which the CPU 602 executes the reconnection process at the time of power-on, not only the connection process sequence becomes complicated, but also the startup process takes a long time due to the lack of resources required for the startup process of the entire device, and the convenience for the user is impaired. Get lost. Therefore, in the present embodiment, the NW sub CPU 621 executes the reconnection process at the time of power-on, the load of the wireless connection sequence is distributed, and the CPU 602 can smoothly perform the startup process.

なお、本実施形態は、後述のLAN設定変更処理やインフラ再接続処理においては、MFP300が同時動作モードの場合には、MFP300の装置状態に応じた再接続処理が実行される。そのため、MFP300の装置状態を速やかに取得可能なCPU602が再接続処理を実行する。一方、パワーオン処理においては、MFP300が同時動作モードの場合にもNWサブCPU621が再接続処理を実行する。これは、パワーオン処理においては、MFP300が同時動作モードであっても、P2P接続とインフラ接続共に切断されている状態であるため、P2P接続とインフラ接続で共通のチャネルを利用していることによる再接続時の問題が発生しないためである。そのため、CPU602にかかる負荷を軽減することを優先し、NWサブCPU621に再接続処理を実行させる。 In the present embodiment, in the LAN setting change process and the infrastructure reconnection process described later, when the MFP 300 is in the simultaneous operation mode, the reconnection process according to the device state of the MFP 300 is executed. Therefore, the CPU 602 capable of promptly acquiring the device status of the MFP 300 executes the reconnection process. On the other hand, in the power-on process, NW sub CPU 621 executes the reconnection process even when MFP 300 is in the simultaneous operation mode. This is because in the power-on process, even if the MFP 300 is in the simultaneous operation mode, both the P2P connection and the infrastructure connection are disconnected, so that the common channel is used for the P2P connection and the infrastructure connection. This is because no problem occurs when reconnecting. Therefore, priority is given to reducing the load on the CPU 602, and the NW sub CPU 621 is made to execute the reconnection processing.

[LAN設定変更処理]
以下、図4(c)のLAN設定変更画面に対する入力のために操作表示部610をユーザが操作することで、ユーザからLAN設定の変更が指示された場合に実行される接続処理について説明する。なお、指示されるLAN設定変更は、例えば、インフラストラクチャモードの有効/無効設定や、WFD機能の有効/無効設定、MFP300がP2Pモード時に有効なソフトAPの接続情報(SSIDやパスワード)の変更設定、ネゴシエーション設定等である。他にも、例えば、インフラストラクチャモードによる通信に利用される暗号方式の設定等が指示されても良い。
[LAN setting change processing]
Hereinafter, the connection process executed when the user instructs the LAN setting change by operating the operation display unit 610 for input on the LAN setting change screen of FIG. 4C, will be described. It should be noted that the instructed LAN setting change is, for example, valid/invalid setting of the infrastructure mode, valid/invalid setting of the WFD function, and change setting of the connection information (SSID or password) of the soft AP valid when the MFP 300 is in the P2P mode. , Negotiation settings, etc. In addition, for example, the setting of the encryption method used for communication in the infrastructure mode may be instructed.

ユーザからLAN設定の変更が指示された場合、UIドメイン1004からI/F接続Mgr1011にLAN設定変更Msegが発行されるため、CPU602は、LAN設定変更処理を開始する(S1130)。 When the user instructs to change the LAN setting, the UI domain 1004 issues the LAN setting change Mseg to the I/F connection Mgr 1011. Therefore, the CPU 602 starts the LAN setting change process (S1130).

続いて、CPU602は、MFP300内の不揮発性メモリ(不図示)に保持されているユーザ設定値を参照し、MFP300が同時動作モードか否かを判定する(S1131)。CPU602は、MFP300が同時動作モードでないと判定した場合は、コントロールAPIタスク経由でNWサブCPU621にLAN設定変更コマンドを発行する(S1132)。なお、LAN設定変更コマンドとは、ユーザから指示されたLAN設定の変更をNWサブCPU621に実行させるためのコマンドである。 Subsequently, the CPU 602 refers to a user setting value held in a non-volatile memory (not shown) in the MFP 300 and determines whether the MFP 300 is in the simultaneous operation mode (S1131). When the CPU 602 determines that the MFP 300 is not in the simultaneous operation mode, it issues a LAN setting change command to the NW sub CPU 621 via the control API task (S1132). The LAN setting change command is a command for causing the NW sub CPU 621 to change the LAN setting instructed by the user.

LAN設定変更コマンドを受け付けたNWサブCPU621は、ユーザから指示されたLAN設定の変更内容に応じて、インフラコントローラ1024もしくはP2Pコントローラ1025に実行処理メッセージを受け渡す。これにより、NWサブCPU621は、ユーザから指示されたLAN設定の変更内容を適用する処理を実行する。 Upon receiving the LAN setting change command, the NW sub CPU 621 delivers the execution processing message to the infrastructure controller 1024 or the P2P controller 1025 according to the change content of the LAN setting instructed by the user. As a result, the NW sub CPU 621 executes a process of applying the LAN setting change content instructed by the user.

一方、CPU602は、MFP300が同時動作モードであると判定した場合は、後述するS1142以降の処理を実行する。 On the other hand, when the CPU 602 determines that the MFP 300 is in the simultaneous operation mode, the CPU 602 executes the processing of S1142 and subsequent steps, which will be described later.

詳細は後述するが、MFP300が同時動作モードであれば、CPU602がLAN設定変更処理を実行し、MFP300が同時動作モードでなければ、NWサブCPU621がLAN設定変更処理を実行する。LAN設定変更処理には、例えば、通信帯域の変更や通信に利用されるチャネルの変更等が伴う場合がある。また、同時動作モードでは、MFP300は、インフラストラクチャモードによる通信と、P2Pモードによる通信とを、同じ通信帯域や同じチャネルによって実行している。そのため、MFP300が同時動作モードで動作している状態におけるLAN設定変更処理においては、パラメータの整合性や、パラメータ変更のタイミングと装置動作状態との整合性の確認が必要になる場合がある。そこで、本実施形態では、MFP300の装置状態やMFP300で実行中のアプリの実行状態まできめ細かく把握することができるCPU602が、MFP300が同時動作モードで動作している状態におけるLAN設定変更処理を実行するものとする。 Although details will be described later, if the MFP 300 is in the simultaneous operation mode, the CPU 602 executes the LAN setting change processing, and if the MFP 300 is not in the simultaneous operation mode, the NW sub CPU 621 executes the LAN setting change processing. The LAN setting changing process may be accompanied by, for example, changing the communication band or changing the channel used for communication. Further, in the simultaneous operation mode, the MFP 300 executes the communication in the infrastructure mode and the communication in the P2P mode in the same communication band and the same channel. Therefore, in the LAN setting change process when the MFP 300 is operating in the simultaneous operation mode, it may be necessary to confirm the consistency of the parameters and the consistency between the parameter change timing and the device operation state. Therefore, in the present embodiment, the CPU 602, which can finely understand the device state of the MFP 300 and the execution state of the application being executed in the MFP 300, executes the LAN setting change process in the state where the MFP 300 is operating in the simultaneous operation mode. I shall.

[インフラ再接続処理]
以下、MFP300がアクセスポイント400を介して通信相手装置とインフラ接続している状態で、MFP300とアクセスポイント400との接続が切断された(インフラ接続が切断された)場合に実行される再接続処理について説明する。
[Infrastructure reconnection processing]
Hereinafter, reconnection processing executed when the connection between the MFP 300 and the access point 400 is disconnected (the infrastructure connection is disconnected) while the MFP 300 is connected to the communication partner device via the access point 400 via the infrastructure. Will be described.

MFP300とアクセスポイント400との接続が切断された場合、NWサブCPU621が、インフラ接続の切断を検知する。その後、NWサブCPU621からCPU602へ、インフラ接続が切断されたことを示す切断イベントが通知される。CPU602は、切断イベントを受信すると、コントロールAPI1018によってイベント通知をハンドリングする(S1220)。これにより、インフラ再接続Msegが発行されるため(S1221)、CPU602は、S1140以降の再接続処理が実行される。 When the connection between the MFP 300 and the access point 400 is disconnected, the NW sub CPU 621 detects disconnection of the infrastructure connection. After that, the NW sub CPU 621 notifies the CPU 602 of a disconnection event indicating that the infrastructure connection has been disconnected. Upon receiving the disconnection event, the CPU 602 handles the event notification by the control API 1018 (S1220). As a result, the infrastructure reconnection Mseg is issued (S1221), so that the CPU 602 executes the reconnection processing after S1140.

CPU602は、インフラ再接続Msegが発行されたことに応じて、インフラ接続を再開することを試みる(S1140)。まず、CPU602は、MFP300内の不揮発性メモリ(不図示)に保持されているユーザ設定値を参照し、MFP300が同時動作モードか否かを判定する(S1141)。 The CPU 602 attempts to restart the infrastructure connection in response to the issuance of the infrastructure reconnection Mseg (S1140). First, the CPU 602 refers to a user setting value stored in a non-volatile memory (not shown) in the MFP 300 and determines whether the MFP 300 is in the simultaneous operation mode (S1141).

CPU602は、MFP300が同時動作モードでないと判定した場合は、パワーオン時の処理と同様に、S1104以降の処理を実行する。これにより、MFP300が同時動作モードでない場合には、NWサブCPU621によって、インフラ接続の再接続処理が実行される。 If the CPU 602 determines that the MFP 300 is not in the simultaneous operation mode, the CPU 602 executes the processes of S1104 and subsequent steps, similarly to the process at power-on. As a result, when the MFP 300 is not in the simultaneous operation mode, the NW sub CPU 621 executes reconnection processing for infrastructure connection.

一方、CPU602は、MFP300が同時動作モードであると判定した場合は、S1142以降の処理を実行することで、インフラ接続の再接続処理を実行する。すなわち、MFP300が同時動作モードでない状態でMFP300とアクセスポイント400との接続が切断された場合は、NWサブCPU621によって再接続処理が実行される。そして、MFP300が同時動作モードである状態でMFP300とアクセスポイント400との接続が切断された場合は、CPU602によって再接続処理が実行される。 On the other hand, when the CPU 602 determines that the MFP 300 is in the simultaneous operation mode, the CPU 602 executes the process of S1142 and thereafter to execute the reconnection process of the infrastructure connection. That is, if the connection between MFP 300 and access point 400 is disconnected while MFP 300 is not in the simultaneous operation mode, reconnection processing is executed by NW sub CPU 621. Then, when the connection between the MFP 300 and the access point 400 is disconnected while the MFP 300 is in the simultaneous operation mode, the CPU 602 executes the reconnection process.

CPU602は、まず、MFP300の状態情報を参照する(S1142)。具体的には、CPU602は、I/FアプリMgrタスクによって管理しているP2Pデバイス(現在MFP300とP2P接続中の装置)の台数や同時動作モード時に実行されるアプリ・サービスの利用状況(HTTPリソースの利用本数等)を参照する。 The CPU 602 first refers to the status information of the MFP 300 (S1142). Specifically, the CPU 602 determines the number of P2P devices (devices currently in P2P connection with the MFP 300) managed by the I/F application Mgr task, and the usage status of application services (HTTP resources) executed in the simultaneous operation mode. (The number of items used, etc.)

続いて、CPU602は、参照したMFP300の状態情報に応じて、いずれのTypeの接続シーケンスを実行するかを特定する(S1143)。なお、LAN設定変更処理におけるS1143の処理であれば、ユーザから指示されたLAN設定の変更内容も、接続シーケンスの特定において参照される。 Subsequently, the CPU 602 identifies which Type of connection sequence is to be executed, in accordance with the referred state information of the MFP 300 (S1143). Note that, in the case of the process of S1143 in the LAN setting change process, the LAN setting change content instructed by the user is also referred to in specifying the connection sequence.

続いて、CPU602は、不揮発性メモリに保存されている、インフラ接続を実行するためのネットワークパラメータ(SSID・認証方法・パスワード等)を取得する(S1144)。このネットワークパラメータは、再接続対象のアクセスポイント(アクセスポイント400)と接続するためのパラメータに相当する。なお、LAN設定変更処理におけるS1144の処理であれば、ネットワークパラメータは、ユーザによって指示されたアクセスポイントと接続するためのパラメータに相当する。 Subsequently, the CPU 602 acquires network parameters (SSID, authentication method, password, etc.) for executing infrastructure connection, which are stored in the non-volatile memory (S1144). This network parameter corresponds to a parameter for connecting to the access point (access point 400) to be reconnected. In the case of the process of S1144 in the LAN setting change process, the network parameter corresponds to the parameter for connecting to the access point designated by the user.

その後、CPU602は、同時動作接続シーケンサタスクを起動し、取得したパラメータ及び特定したTypeの接続シーケンスに基づいてインフラ接続処理を実行する(S1145)。この処理の詳細は後述する。 After that, the CPU 602 activates the simultaneous operation connection sequencer task, and executes the infrastructure connection process based on the acquired parameter and the specified Type connection sequence (S1145). Details of this processing will be described later.

これによって、I/Fの種類ごとのアプリの動作状況が加味されたうえでの再接続処理が実行されることになる。LAN設定変更処理においても、設定内容によっては、ユーザー操作(指示)に対するフィードバックをいち早く返却することが可能であり、ユースケースに応じたきめ細かな対応が可能になる。 As a result, the reconnection process is executed after considering the operation status of the application for each I/F type. Even in the LAN setting change process, depending on the setting contents, it is possible to promptly return the feedback for the user operation (instruction), and it is possible to make a detailed response according to the use case.

図13は、CPU602によって実行されるインフラ接続処理を示すフローチャートである。なお、本フローチャートが示す処理は、ROM603等のメモリに格納された同時動作接続シーケンサ1012に対応するプログラムをCPU602がRAM604に読み出して実行することにより実現される。なお、本フローチャートに示す処理は、S1145で、同時動作接続シーケンサタスクが起動された後の処理に対応する。 FIG. 13 is a flowchart showing the infrastructure connection processing executed by the CPU 602. The process shown in this flowchart is realized by the CPU 602 reading the program corresponding to the simultaneous operation connection sequencer 1012 stored in the memory such as the ROM 603 into the RAM 604 and executing the program. The process shown in this flowchart corresponds to the process after the simultaneous operation connection sequencer task is activated in S1145.

以下、CPU602は、S1143で特定したTypeの接続シーケンスを実行する。なお、Type1〜Type3は、LAN設定変更処理において、ユーザから指示された設定変更内容に応じて特定される接続シーケンスである。また、Type4は、インフラ再接続処理において特定される接続シーケンスである。なお、本説明では、接続シーケンスとして4つのTypeを示したが、ユーザから指示された設定変更内容や、インフラ再接続処理のMFP300の状態等に応じて、その他のTypeの接続シーケンスが用意されても良い。 Thereafter, the CPU 602 executes the Type connection sequence specified in S1143. It should be noted that Type 1 to Type 3 are connection sequences specified in the LAN setting change process according to the setting change contents instructed by the user. Type 4 is a connection sequence specified in the infrastructure reconnection process. Although four types are shown as the connection sequence in the present description, other type connection sequences are prepared according to the setting change contents instructed by the user, the state of the MFP 300 in the infrastructure reconnection process, and the like. Is also good.

CPU602は、ユーザから指示された設定変更内容が、接続処理を伴わないパラメータ変更設定のみの場合、S1143でType1の接続シーケンスを特定するため、S1310に進む。接続処理を伴わないパラメータ変更設定とはネゴシエーション設定や、インフラストラクチャモードによる通信に利用される暗号方式の設定等である。そして、CPU602は、当該パラメータ変更に対応するNWサブシステム側のコントローラに、コントロールAPI経由で、パラメータセットコマンドを発行する(S1131)。これにより、NWサブCPU621が、各コントローラを用いて、ユーザから指示された設定変更内容を適用する処理を行う。 When the setting change content instructed by the user is only the parameter change setting that does not involve connection processing, the CPU 602 proceeds to step S1310 in order to specify the connection sequence of Type 1 in step S1143. Parameter change settings without connection processing are negotiation settings, settings of encryption methods used for communication in the infrastructure mode, and the like. Then, the CPU 602 issues a parameter set command to the controller on the NW subsystem side corresponding to the parameter change via the control API (S1131). As a result, the NW sub CPU 621 performs a process of applying the setting change content instructed by the user, using each controller.

CPU602は、NWサブシステム側のコントローラの再起動処理が必要な場合、より具体的にはP2Pコントローラの再起動が必要な場合、S1143でType2の接続シーケンスを特定するため、S1320に進む。P2Pコントローラの再起動が必要な場合とは例えば、ユーザから指示された設定変更内容が、MFP300がP2Pモード時に有効なソフトAPの接続情報(SSIDやパスワード等)の変更設定であった場合に相当する。CPU602は、NWサブCPU621に、P2PコントローラSTOPコマンドを発行し(S1321)、MFP300がソフトウェアAPとして動作することを停止させた後、NWサブCPU621にパラメータセットコマンドを発行する(S1322)。パラメータセットコマンドは、ユーザから指示された設定変更内容を適用するためのコマンドである。これにより、例えば、MFP300がP2Pモード時に有効なソフトAPのSSID名やパスワードが変更される。その後、CPU602は、NWサブCPU621に、P2P起動コマンドを発行して(S1323)、MFP300がソフトウェアAPとして動作することを再開させる。 When the controller 602 on the NW subsystem side needs to be restarted, more specifically, the P2P controller needs to be restarted, the CPU 602 proceeds to step S1320 in order to identify the connection sequence of Type 2 in step S1143. The case where the P2P controller needs to be restarted corresponds to, for example, the case where the setting change content instructed by the user is the change setting of the connection information (SSID, password, etc.) of the software AP that is valid in the P2P mode of the MFP 300. To do. The CPU 602 issues a P2P controller STOP command to the NW sub CPU 621 (S1321), stops the MFP 300 from operating as the software AP, and then issues a parameter set command to the NW sub CPU 621 (S1322). The parameter set command is a command for applying the setting change content instructed by the user. As a result, for example, the SSID name and password of the soft AP that is valid when the MFP 300 is in the P2P mode are changed. After that, the CPU 602 issues a P2P activation command to the NW sub CPU 621 (S1323), and restarts the operation of the MFP 300 as the software AP.

CPU602は、ユーザから指示された設定変更内容が、アクセスポイント400のパスワードが変更されたことにより切断されたインフラ接続の再接続処理である場合、S1143でType3の接続シーケンスを特定するため、S1330に進む。なお、このとき、インフラ接続の切断要因はパスワードの変更であり、インフラ接続に利用される通信チャネル番号は変更されていない。そのため、インフラ接続を再開してもP2Pモードによる通信で使用するチャネルは変更されないため、CPU602は、P2Pモードによる通信を停止する必要はない。そこで、CPU602は、NWサブCPU621にインフラコントローラSTOPコマンドを発行することで、インフラコントローラの動作のみを停止する(S1331)。その後、CPU602は、切断されたインフラ接続で利用していた通信チャネル(現在P2P接続に利用している通信チャネル)によって、APサーチを実行することを特定する(S1332)。なおこのとき、APサーチの周期は200msec、リトライ限度回数は3回とする。CPU602は、APサーチを実行する場合、APサーチハンドラを起動し、APサーチに利用するチャネルの番号の情報を含むAPサーチコマンドを、コントロールAPIを経由してNWサブシステム側のインフラコントローラ1024に発行する。これにより、APサーチが実行され、切断されたインフラ接続で利用していた通信チャネルで機器探索リクエスト(ProbeRequest)が、WLANユニット616から無線出力される。そして、ProbeRequestを受けたアクセスポイント400は、機器探索応答(ProbeResponse)を無線出力する。 If the setting change content instructed by the user is the reconnection process of the infrastructure connection disconnected due to the change of the password of the access point 400, the CPU 602 proceeds to S1330 to identify the connection sequence of Type3 in S1143. move on. At this time, the cause of disconnection of the infrastructure connection is the password change, and the communication channel number used for the infrastructure connection is not changed. Therefore, even if the infrastructure connection is restarted, the channel used in the P2P mode communication is not changed, and therefore the CPU 602 does not need to stop the P2P mode communication. Therefore, the CPU 602 stops only the operation of the infra controller by issuing the infra controller STOP command to the NW sub CPU 621 (S1331). After that, the CPU 602 specifies to execute the AP search by the communication channel used in the disconnected infrastructure connection (the communication channel currently used in the P2P connection) (S1332). At this time, the AP search cycle is 200 msec, and the retry limit number is 3 times. When executing the AP search, the CPU 602 activates the AP search handler and issues an AP search command including information on the channel number used for the AP search to the infrastructure controller 1024 on the NW subsystem side via the control API. To do. As a result, the AP search is executed, and the device search request (ProbeRequest) is wirelessly output from the WLAN unit 616 through the communication channel used in the disconnected infrastructure connection. Then, the access point 400 that receives the Probe Request wirelessly outputs a device search response (ProbeResponse).

CPU602は、所定時間(50msec)のWaitタスク中(S1334)に、S1250〜S1252の処理が実行されてAPサーチ完了イベントが発行されるのを待つ。CPU602は、Wait後、アクセスポイント400を検出したか否かを判定する。具体的には、CPU602は、Waitタスク中に、APサーチ完了イベントが発行されたか否かを判定する(S1335)。CPU602は、アクセスポイント400を検出していないと判定した場合、再度S1334にてWaitする。一方、CPU602は、アクセスポイント400を検出したと判定した場合、検出したアクセスポイント400のSSID名・パスワードを引数にして、NWサブCPU621にAPJOINコマンドを発行する(S1336)。NWサブCPU621によってAPJOINコマンドが受信されると、APサーチで検出されたアクセスポイント400に対する機器接続リクエストが、WLANユニット616から無線出力される。無線出力されたデータの中には、認証方法やパスワードが含まれており、アクセスポイント400は、受信した情報が、内部に保持する認証方法およびパスワードと一致するか否かの判定を行って、一致した場合には、接続許可応答のレスポンスを無線出力する。 The CPU 602 waits for the processing of S1250 to S1252 to be executed and the AP search completion event to be issued during the Wait task (S1334) for a predetermined time (50 msec). After the Wait, the CPU 602 determines whether or not the access point 400 is detected. Specifically, the CPU 602 determines whether an AP search completion event has been issued during the Wait task (S1335). If the CPU 602 determines that the access point 400 is not detected, it waits again in step S1334. On the other hand, when determining that the access point 400 is detected, the CPU 602 issues an APJOIN command to the NW sub CPU 621 using the SSID name/password of the detected access point 400 as an argument (S1336). When the NW sub CPU 621 receives the APJOIN command, the device connection request to the access point 400 detected by the AP search is wirelessly output from the WLAN unit 616. The wirelessly output data includes an authentication method and a password, and the access point 400 determines whether the received information matches the internally held authentication method and password, If they match, the response of the connection permission response is wirelessly output.

CPU602は、S1260〜S1262の処理が実行されてAP JOIN完了イベントが発行されたか否かを判定し、AP JOIN完了イベントが発行されたと判定した場合は、APサーチハンドラの起動を終了する(S1338)。これにより、CPU602は、同時動作接続シーケンサタスク処理を完了する。 The CPU 602 determines whether or not the processes of S1260 to S1262 have been executed and the AP JOIN completion event has been issued, and when determining that the AP JOIN completion event has been issued, the activation of the AP search handler ends (S1338). .. As a result, the CPU 602 completes the simultaneous operation connection sequencer task processing.

CPU602は、インフラ再接続処理においてS1143の処理を実行する場合、Type4の接続シーケンスを特定するため、S1310に進む。 When executing the processing of S1143 in the infrastructure reconnection processing, the CPU 602 proceeds to S1310 in order to specify the connection sequence of Type4.

切断された接続はインフラ接続のため、CPU602は、まずインフラコントローラ1024の動作を停止するためのコマンドをNWサブCPU621に送信する(S1341)。その後、CPU602は、S1142で取得したMFP300の状態情報に応じてAPサーチの実行パターンを決定する(S1342)。本実施形態では、APサーチの実行パターンとして、図14に示すような4つパターンが用意されるものとする。 Since the disconnected connection is an infrastructure connection, the CPU 602 first transmits a command for stopping the operation of the infrastructure controller 1024 to the NW sub CPU 621 (S1341). After that, the CPU 602 determines an AP search execution pattern according to the status information of the MFP 300 acquired in S1142 (S1342). In this embodiment, four patterns as shown in FIG. 14 are prepared as AP search execution patterns.

図14に示すAPサーチシーケンステーブルは、APサーチ時に参照されるテーブルである。本テーブルでは、各実行パターンにおけるAPサーチのシーケンスナンバー(SeqNo)・サーチタイプ(Type)・サーチ周期(周期)・リトライ限度回数(Retry)の値がそれぞれ定義されている。シーケンスナンバーは、各実行パターンにおける各APサーチの順番を示す。CPU602は、シーケンスナンバーの番号順に、各番号に対応する各APサーチを実行する。サーチタイプ(Type)は、各APサーチのTypeを示す。サーチタイプが固定の場合、CPU602は、RAM604に保存されている、切断されたインフラ接続において利用していた通信チャネル(現在P2P接続に利用している通信チャネル)によってAPサーチを実行する。サーチタイプがALLの場合、CPU602は、MFP300が使用可能な全ての通信チャネルを番号の小さいチャネルから順に用いてAPサーチを実行する。なお、MFP300は、各チャネルを使用したAPサーチにおいて、装置探索リクエストコマンドの送信を複数回実行しても良い。また、このとき、CPU602は、MFP300が使用可能な全ての通信チャネルを使用せずとも良く、切断されたインフラ接続において利用していた通信チャネル以外の通信チャネルを少なくとも使用すれば良い。また、このとき利用されるチャネルの順番は特に限定されず、例えば、CPU602は、まず初めに現在P2P接続に使用しているチャネルを使用してAPサーチを実行した後、第1チャネルから順に使用してAPサーチを実行してもよい。また、CPU602は、2.4GHz(1〜13チャネル)と5GHz(36〜140チャネル)の周波数帯を使う場合、どちらかの周波数帯(例えば5GHz)に対応するチャネルを優先して用いてAPサーチを開始してもよい。サーチ周期(周期)は、各シーケンスナンバーに対応するAPサーチを実行する周期を示す。リトライ限度回数(Retry)は、アクセスポイントを発見できなかった場合に各シーケンスナンバーに対応するAPサーチをリトライする回数を示す。なお、リトライ回数がForeverの場合、CPU602は、アクセスポイントを発見する等などしてAPサーチハンドラが終了されるまで、対応するシーケンスナンバーのAPサーチのリトライを繰り返す。また、リトライ回数がP2PBusyの場合は、CPU602は、P2Pモードによる通信が終了するまで、対応するシーケンスナンバーのAPサーチのリトライを繰り返し、その後次のシーケンスナンバーのAPサーチを行う。 The AP search sequence table shown in FIG. 14 is a table referred to during AP search. In this table, AP search sequence number (SeqNo), search type (Type), search cycle (cycle), and retry limit number of times (Retry) are defined for each execution pattern. The sequence number indicates the order of each AP search in each execution pattern. The CPU 602 executes each AP search corresponding to each number in order of the sequence number. The search type (Type) indicates the type of each AP search. When the search type is fixed, the CPU 602 executes the AP search using the communication channel stored in the RAM 604 and used in the disconnected infrastructure connection (the communication channel currently used for the P2P connection). When the search type is ALL, CPU 602 executes an AP search by using all communication channels available to MFP 300 in order from the smallest numbered channel. It should be noted that MFP 300 may execute transmission of the device search request command a plurality of times in the AP search using each channel. Further, at this time, CPU 602 does not have to use all the communication channels that can be used by MFP 300, and at least use the communication channels other than the communication channel used in the disconnected infrastructure connection. The order of the channels used at this time is not particularly limited. For example, the CPU 602 first executes the AP search using the channel currently used for the P2P connection, and then uses the channels in order from the first channel. Then, the AP search may be executed. When using the frequency bands of 2.4 GHz (1 to 13 channels) and 5 GHz (36 to 140 channels), the CPU 602 preferentially uses a channel corresponding to one of the frequency bands (for example, 5 GHz) to perform an AP search. May start. The search cycle (cycle) indicates a cycle for executing the AP search corresponding to each sequence number. The retry limit number (Retry) indicates the number of times to retry the AP search corresponding to each sequence number when the access point cannot be found. When the number of retries is Forever, the CPU 602 repeats the AP search retries with the corresponding sequence numbers until the AP search handler is terminated by finding an access point or the like. If the number of retries is P2PBusy, the CPU 602 repeats the AP search retry of the corresponding sequence number until the communication in the P2P mode is completed, and then performs the AP search of the next sequence number.

パターン(a)は、アクセスポイント400と接続するためのパスワードが変更されたことが切断要因であるインフラ接続の再接続処理で選択される実行パターンである。CPU602は、パターン(a)を選択した場合、切断されたインフラ接続において利用していた通信チャネル(現在P2P接続に利用している通信チャネル)によって、200msecの周期で最大3回のAPサーチを実行する。サーチタイプが固定のAPサーチのみが実行されるのは、パスワード変更がインフラ接続の切断要因である場合には、アクセスポイント400が使用するチャネルは変更されていない可能性が高いためである。また、アクセスポイント400が使用するチャネルは変更されていない場合は、サーチタイプが固定のAPサーチによってすぐにアクセスポイントを検出できる。そのため、CPU602は、200msecという短い周期且つ少ないリトライ限度回数でAPサーチを実行する。 The pattern (a) is an execution pattern selected in the reconnection process of the infrastructure connection whose disconnection factor is that the password for connecting to the access point 400 has been changed. When the pattern (a) is selected, the CPU 602 executes the AP search up to three times at a cycle of 200 msec by the communication channel used in the disconnected infrastructure connection (the communication channel currently used for the P2P connection). To do. The reason why only the AP search with the fixed search type is executed is that the channel used by the access point 400 is likely not changed when the password change is the disconnection factor of the infrastructure connection. Further, when the channel used by the access point 400 is not changed, the access point can be immediately detected by the AP search whose search type is fixed. Therefore, the CPU 602 executes the AP search with a short cycle of 200 msec and a small number of retry limits.

パターン(b)は、MFP300が同時動作モードで且つP2Pモードによる通信を実行していない(P2P通信状態が休止(Idle)状態)の場合の再接続処理で選択される実行パターンである。すなわち、パターン(b)は、P2Pデバイスの接続台数が0台の場合の再接続処理で選択される実行パターンである。CPU602は、パターン(b)を選択した場合、まず、切断されたインフラ接続において利用していた通信チャネル(現在P2P接続に利用している通信チャネル)によって、10secの周期で最大3回のAPサーチを実行する。その後、シーケンスナンバーの1のAPサーチでアクセスポイントを検出できなかった場合は、CPU602は、MFP300が使用可能な全ての通信チャネルを順に用いて、10secの周期で、アクセスポイントを検出するまでAPサーチを実行する。サーチタイプが固定のAPサーチ後に、サーチタイプがALLのAPサーチを実行するのは、インフラ接続切断後にアクセスポイントが使用するチャネルが変更されていても、アクセスポイントを検出できるようにするためである。また、CPU602は、サーチタイプが固定のAPサーチを先に実行する。このような形態とすることで、インフラ接続切断後にアクセスポイントが使用するチャネルが変更されていなければ、P2Pモードによる通信におけるパケットロスや送信パケット遅延等をできるだけ発生させずにアクセスポイントを検出することができる。 The pattern (b) is an execution pattern selected in the reconnection process when the MFP 300 is not executing the communication in the simultaneous operation mode and the P2P mode (the P2P communication state is the idle state). That is, the pattern (b) is an execution pattern selected in the reconnection process when the number of P2P devices connected is 0. When the pattern (b) is selected, the CPU 602 first uses the communication channel used in the disconnected infrastructure connection (the communication channel currently used for the P2P connection) to perform an AP search up to three times in a cycle of 10 seconds. To execute. After that, when the access point cannot be detected by the AP search with the sequence number 1, the CPU 602 sequentially uses all the communication channels that can be used by the MFP 300 in a cycle of 10 seconds until the AP is detected until the AP is detected. To execute. The AP search whose search type is ALL is executed after the AP search whose search type is fixed, so that the access point can be detected even if the channel used by the access point is changed after the disconnection of the infrastructure. .. Further, the CPU 602 first executes an AP search whose search type is fixed. By adopting such a form, if the channel used by the access point has not been changed after disconnecting the infrastructure, the access point can be detected without causing packet loss or transmission packet delay in communication in the P2P mode as much as possible. You can

パターン(c)は、MFP300が同時動作モードで且つP2Pモードによる通信を実行している(P2P通信状態が動作(Busy)状態)の場合の再接続処理で選択される実行パターンである。CPU602は、パターン(c)を選択した場合、まず、切断されたインフラ接続において利用していた通信チャネル(現在P2P接続に利用している通信チャネル)によって、10secの周期で、P2Pモードによる通信が終了するまでAPサーチを実行する。その後、シーケンスナンバーの1のAPサーチでアクセスポイントを検出できなかった場合は、CPU602は、MFP300が使用可能な全ての通信チャネルを順に用いて、2secの周期で、最大3回のAPサーチを実行する。その後、シーケンスナンバーの2のAPサーチでアクセスポイントを検出できなかった場合は、CPU602は、MFP300が使用可能な全ての通信チャネルを順に用いて、30secの周期で、アクセスポイントを検出するまでAPサーチを実行する。P2Pモードによる通信を実行している間は、現在P2P接続に利用している通信チャネル以外のチャネルを使用すると、パケットロスや送信パケット遅延の課題が発生しやすい。そのため、パターン(c)では、P2Pモードによる通信が終了するまでは、サーチタイプが固定のAPサーチを実行する。また、シーケンスナンバーの2のAPサーチの周期より、シーケンスナンバーの3のAPサーチの周期を遅くする。これにより、アクセスポイントが検出できない状態にもかかわらず、サーチタイプがALLのAPサーチが短い周期で実行されることに起因してパケットロスや送信パケット遅延が頻繁に発生してしまうことを抑制できる。 The pattern (c) is an execution pattern selected in the reconnection process when the MFP 300 is executing communication in the simultaneous operation mode and the P2P mode (P2P communication state is operation (Busy) state). When the pattern (c) is selected, the CPU 602 first performs communication in the P2P mode at a cycle of 10 seconds by the communication channel used in the disconnected infrastructure connection (the communication channel currently used for the P2P connection). The AP search is executed until the end. After that, when the access point cannot be detected by the AP search with the sequence number 1, the CPU 602 sequentially uses all the communication channels that can be used by the MFP 300, and executes the AP search up to three times in a cycle of 2 sec. To do. After that, when the access point cannot be detected by the AP search with the sequence number 2, the CPU 602 sequentially uses all the communication channels that can be used by the MFP 300, and in the cycle of 30 sec, the CPU search proceeds until the AP is detected. To execute. If a channel other than the communication channel currently used for P2P connection is used during the communication in the P2P mode, problems such as packet loss and transmission packet delay are likely to occur. Therefore, in pattern (c), an AP search with a fixed search type is executed until the communication in the P2P mode ends. Further, the cycle of the AP search for the sequence number 3 is delayed from the cycle of the AP search for the sequence number 2. As a result, it is possible to suppress frequent occurrence of packet loss and transmission packet delay due to AP search whose search type is ALL being executed in a short cycle, even in a state in which the access point cannot be detected. ..

パターン(d)は、MFP300が同時動作モードで且つインフラストラクチャモードによる通信を実行している(インフラ通信状態が動作(Busy)状態)の場合の再接続処理で選択される実行パターンである。例えば、インフラストラクチャモードによる通信を実行している最中に、電波の干渉等によってインフラ接続が切断されるケースがある。インフラ接続が切断されているのに、インフラ通信状態が動作(Busy)状態であケースとは、このようなケースに相当する。このようなケースでは、インフラストラクチャモードによる通信を速やかに復帰させる必要がある。そのため、パターン(d)では、パターン(b)やパターン(c)と比較して短い周期で各APサーチを実行する。 Pattern (d) is an execution pattern selected in the reconnection process when the MFP 300 is executing communication in the simultaneous operation mode and the infrastructure mode (the infrastructure communication state is the operation (Busy) state). For example, there is a case where the infrastructure connection is disconnected due to radio wave interference or the like while executing communication in the infrastructure mode. The case where the infrastructure connection is disconnected but the infrastructure communication state is in the operation (Busy) state corresponds to such a case. In such a case, it is necessary to promptly restore the communication in the infrastructure mode. Therefore, in the pattern (d), each AP search is executed in a shorter cycle than the patterns (b) and (c).

なお、例えば、MFP300の状態として、P2Pデバイスが接続してはいるがP2Pモードによる通信が実行されていない状態や、P2Pモードによる通信が実行されていても通信周期が数十秒周期で間欠的に行われる状態も考えられる。そのため、実行パターンは、上述の4パターンに限定されるわけではなく、ユースケースに応じてより細かなパターンが用意されても良い。また、各パターンのAPサーチにおけるリトライ周期やリトライ回数は、上述した関係性が各シーケンスナンバーのAPサーチ間で満たされていれば、上述した値に限定されない。 Note that, for example, as the state of the MFP 300, a state in which a P2P device is connected but communication in the P2P mode is not executed, or even if communication in the P2P mode is executed, the communication cycle is intermittent with a cycle of several tens of seconds. It is also conceivable that the situation will be carried out at. Therefore, the execution pattern is not limited to the above four patterns, and a finer pattern may be prepared according to the use case. Further, the retry period and the number of retries in the AP search of each pattern are not limited to the above values as long as the above-described relationship is satisfied between the AP searches of each sequence number.

上述のように、本実施形態では、MFP300が同時動作モードで動作する状態でインフラ接続が切断された場合は、MFP300の通信状態や接続状態に応じて異なる再接続処理が実行される。これにより、MFP300の通信状態や接続状態に応じた適切な再接続処理が実行されることになり、パケットロスや送信パケット遅延等の課題をできるだけ発生させずに、アクセスポイントを検出できる可能性を向上させることができる。 As described above, in the present embodiment, when the infrastructure connection is disconnected while the MFP 300 is operating in the simultaneous operation mode, different reconnection processing is executed depending on the communication state or connection state of the MFP 300. As a result, an appropriate reconnection process is executed according to the communication state and connection state of the MFP 300, and it is possible to detect the access point without causing problems such as packet loss and transmission packet delay as much as possible. Can be improved.

また、本実施形態では、MFP300が同時動作モードで動作する状態でインフラ接続が切断された場合に実行される再接続処理を、NWサブCPU621でなく、CPU602が実行する。CPU602は、装置全体の制御を担うため、NWサブCPU621と比較して、アクセス可能な情報の範囲が広く、情報へのアクセススピードも速い。またNWサブCPU621は、例えば、MFP300の通信状態や接続状態の情報を取得するためには、CPU間通信によってCPU602から取得する必要がある。そのため、CPU602は、NWサブCPU621と比較して、MFP300の通信状態や接続状態の情報に応じた処理を速やかに実行できる。上述したような場合には、CPU602が再接続処理を実行することにより、MFP300の通信状態や接続状態に応じた適切な再接続処理が実行される。 Further, in the present embodiment, the reconnection process executed when the infrastructure connection is disconnected while the MFP 300 is operating in the simultaneous operation mode is executed by the CPU 602 instead of the NW sub CPU 621. Since the CPU 602 is responsible for controlling the entire apparatus, the range of accessible information is wider and the access speed to the information is faster than that of the NW sub CPU 621. Further, the NW sub CPU 621 needs to acquire the information on the communication state and connection state of the MFP 300 from the CPU 602 through inter-CPU communication, for example. Therefore, CPU 602 can execute a process in accordance with the information on the communication state and connection state of MFP 300 more quickly than NW sub CPU 621. In the case as described above, the CPU 602 executes the reconnection process, thereby executing the appropriate reconnection process according to the communication state or connection state of the MFP 300.

CPU602は、S1342にて実行パターンを決定したら、APサーチハンドラを起動し、決定した実行パターンに基づいたAPサーチを開始する(S1343)。 After determining the execution pattern in S1342, the CPU 602 activates the AP search handler and starts the AP search based on the determined execution pattern (S1343).

その後、CPU602は、所定時間(50msec)のWaitタスク中(S1344)に、S1250〜S1252の処理が実行されてAPサーチ完了イベントが発行されるのを待つ。CPU602は、Wait後、アクセスポイント400を検出したか否かを判定する。具体的には、CPU602は、Waitタスク中に、APサーチ完了イベントが発行されたか否かを判定する(S1345)。CPU602は、アクセスポイント400を検出していないと判定した場合、再度S1334にてWaitする。一方CPU602は、アクセスポイント400を検出したと判定した場合、アクセスポイント400の検出に成功したチャネルの番号が、アクセスポイント400との以前のインフラ接続において利用されていたチャネルの番号から変更されたか否かを判定する。(S1346)すなわち、CPU602は、アクセスポイント400の検出に成功したチャネルの番号が、現在P2P接続に利用しているチャネルの番号と一致するか否かを判定する。 After that, the CPU 602 waits until the AP search completion event is issued by executing the processes of S1250 to S1252 during the Wait task (S1344) of the predetermined time (50 msec). After the Wait, the CPU 602 determines whether or not the access point 400 is detected. Specifically, the CPU 602 determines whether an AP search completion event has been issued during the Wait task (S1345). If the CPU 602 determines that the access point 400 is not detected, it waits again in step S1334. On the other hand, when the CPU 602 determines that the access point 400 has been detected, whether or not the channel number for which the access point 400 has been successfully detected has been changed from the channel number used in the previous infrastructure connection with the access point 400. Determine whether. (S1346) That is, the CPU 602 determines whether or not the channel number of which the access point 400 has been successfully detected matches the channel number currently used for P2P connection.

アクセスポイント400の検出に成功したチャネルの番号が、現在P2P接続に利用しているチャネルの番号と一致しない場合は、現在P2P接続に利用しているチャネルを切り替えるため、P2P接続を一旦切断し、その後再接続する必要がある。しかし、P2Pモードによる通信中にP2P接続を切断したら、P2PデバイスとMFP300間で通信しているデータが失われてしまう可能性がある。そこで、CPU602は、S1346にてアクセスポイント400の検出に成功したチャネルの番号が、現在P2P接続に利用しているチャネルの番号と一致しないと判定した場合は、P2Pモードによる通信が行われているか否かを判定する(S1347)。CPU602は、P2Pモードによる通信が行われていると判定した場合、S1344の処理を再度行う。一方、CPU602は、P2Pモードによる通信が行われていないと判定した場合、NWサブCPU621に、P2PSTOPコマンドを送信し、MFP300のP2P接続を解除する(S1348)。その後、CPU602は、S1349〜S1351の処理を行う。S1349〜S1351の処理は、S1336〜S1338と同様であるため、説明を省略する。 If the channel number of which the access point 400 has been successfully detected does not match the channel number currently used for P2P connection, the channel currently used for P2P connection is switched, so the P2P connection is temporarily disconnected, You will then need to reconnect. However, if the P2P connection is disconnected during the communication in the P2P mode, the data communicated between the P2P device and the MFP 300 may be lost. Therefore, when the CPU 602 determines in S1346 that the channel number of which the access point 400 has been successfully detected does not match the channel number currently used for P2P connection, whether communication in the P2P mode is being performed. It is determined whether or not (S1347). When the CPU 602 determines that communication in the P2P mode is being performed, the CPU 602 performs the process of S1344 again. On the other hand, when the CPU 602 determines that communication in the P2P mode is not being performed, the CPU 602 transmits a P2PSTOP command to the NW sub CPU 621 to release the P2P connection of the MFP 300 (S1348). After that, the CPU 602 performs the processes of S1349 to S1351. The processes of S1349 to S1351 are the same as S1336 to S1338, and thus the description thereof will be omitted.

その後、CPU602は、アクセスポイント400との接続に成功した通信チャネルの番号を含むP2Pのパラメータセットコマンド及びP2P起動コマンドをNWサブCPU621に発行する(S1351、S1352)。これにより、CPU602は、MFP300のソフトウェアAPを再起動する。切断されたP2P接続は、再度、端末装置200から接続要求を受け付けることで再開される。なお、このときP2P接続に利用されるチャネルは、アクセスポイント400の検出及び接続に成功したチャネルである。 After that, the CPU 602 issues a P2P parameter set command including the number of the communication channel successfully connected to the access point 400 and a P2P activation command to the NW sub CPU 621 (S1351, S1352). As a result, the CPU 602 restarts the software AP of the MFP 300. The disconnected P2P connection is restarted by accepting a connection request from the terminal device 200 again. The channel used for P2P connection at this time is a channel for which the access point 400 has been successfully detected and connected.

一方、CPU602は、S1346にてアクセスポイント400の検出に成功したチャネルの番号が、現在P2P接続に利用しているチャネルの番号と一致すると判定した場合は、現在P2P接続に利用しているチャネルを切り替える必要がない。そのため、CPU602は、S1354〜S1356の処理を行う。S1354〜S1356の処理は、S1336〜S1338と同様であるため、説明を省略する。このように、本実施形態では、MFP300が同時動作モードである場合のインフラ接続処理は、CPU602が実行する。CPU602は、NWサブCPU621と異なり、MFP300の装置状態や、受け付けたLAN設定変更の内容を確認して、確認した情報に対応する接続シーケンスを実行できる。 On the other hand, if the CPU 602 determines in S1346 that the channel number of which the access point 400 has been successfully detected matches the channel number currently used for P2P connection, it determines the channel currently used for P2P connection. No need to switch. Therefore, the CPU 602 performs the processes of S1354 to S1356. The processing of S1354 to S1356 is the same as that of S1336 to S1338, and thus the description thereof is omitted. As described above, in this embodiment, the CPU 602 executes the infrastructure connection process when the MFP 300 is in the simultaneous operation mode. Unlike the NW sub CPU 621, the CPU 602 can confirm the device state of the MFP 300 and the content of the received LAN setting change, and execute the connection sequence corresponding to the confirmed information.

図15に、NWサブCPU621によって実行されるインフラ接続処理を示すフローチャートである。なお、本フローチャートが示す処理は、ROM603等のメモリに格納されたNWサブ接続シーケンサ1023に対応するプログラムをNWサブCPU621がRAM622に読み出して実行することにより実現される。なお、本フローチャートに示す処理は、S1105、S1121で、NWサブCPU621にインフラ接続コマンドが送信された場合に開始される。 FIG. 15 is a flowchart showing the infrastructure connection processing executed by the NW sub CPU 621. The process shown in this flowchart is realized by the NW sub CPU 621 reading a program corresponding to the NW sub connection sequencer 1023 stored in the memory such as the ROM 603 into the RAM 622 and executing the program. The process shown in this flowchart is started when an infrastructure connection command is transmitted to the NW sub CPU 621 in S1105 and S1121.

まず、NWサブCPU621は、インフラ接続コマンドを受信する。その後、NWサブCPU621は、アクセスポイント400の検索に使用するチャネル(サーチCh)を1に初期化する(S1502)。その後、NWサブCPU621は、インフラ接続コマンドの引数で渡されたSSID名のアクセスポイントを検索する(S1503)。具体的には、NWサブCPU621は、APサーチMsegをインフラコントローラ1024に発行し、サーチChによって機器探索リクエスト(ProbeRequest)を、WLANユニット616から無線出力させる。そして、NWサブCPU621は、所定の時間(100msec)アクセスポイントからの機器探索応答を待つ。 First, the NW sub CPU 621 receives an infrastructure connection command. After that, the NW sub CPU 621 initializes the channel (search Ch) used for searching the access point 400 to 1 (S1502). After that, the NW sub CPU 621 searches for an access point having the SSID name passed in the argument of the infrastructure connection command (S1503). Specifically, the NW sub CPU 621 issues an AP search Mseg to the infrastructure controller 1024, and causes the WLAN unit 616 to wirelessly output a device search request (ProbeRequest) by the search Ch. Then, the NW sub CPU 621 waits for a device search response from the access point for a predetermined time (100 msec).

その後、NWサブCPU621は、S1503におけるAPサーチによってアクセスポイントの検出に成功したか否かを判定する(S1504)。具体的には、NWサブCPU621は、アクセスポイントから機器探索応答を受信したか否かを判定する。NWサブCPU621は、アクセスポイントの検出に成功しなかったと判定した場合、次のAPサーチに使用するチャネルを決定する。具体的には、サーチChをインクリメントする(S1508)。 After that, the NW sub CPU 621 determines whether or not the access point has been successfully detected by the AP search in S1503 (S1504). Specifically, the NW sub CPU 621 determines whether or not the device search response has been received from the access point. When the NW sub CPU 621 determines that the access point has not been successfully detected, the NW sub CPU 621 determines a channel to be used for the next AP search. Specifically, the search Ch is incremented (S1508).

その後、次のAPサーチに使用するチャネルとして決定したチャネルの番号が上限値か否かを判定する。すなわち、NWサブCPU621は、使用可能な全てのチャネルを用いてAPサーチを実行したか否かを判定する(S1509)。NWサブCPU621は、チャネルの番号が上限値であると判定した場合、所定の時間(500msec)Waitする(S1510)。これは、NWサブシステム内の他のタスクを実行可能なように、一時的にNWサブCPU621を開放するためである。その後、NWサブCPU621は、S1502の処理を再度行う。一方、NWサブCPU621は、チャネルの番号が上限値でないと判定した場合、S1508で決定したチャネルを用いて、S1503でAPサーチを行う。すなわち、NWサブCPU621は、アクセスポイントの検出に失敗した場合は、使用可能なチャネルを順に使用してAPサーチを行う。
一方、NWサブCPU621は、アクセスポイントの検出に成功したと判定した場合は、通信チャネル番号・SSID名・暗号方法・パスワード等を引数としてインフラコントローラ1024にAP JOIN Msegを発行する(S1506)。また、このとき、NWサブCPU621は、APサーチ完了通知をCPU602に送信し、検出したアクセスポイントのMACアドレス及び検出に成功した通信チャネルの番号を共有RAMに保存する。AP JOIN Msegが発行されると、WLANユニット616が、S1503におけるAPサーチにより検出されたアクセスポイントに対して機器接続リクエストを無線出力する。アクセスポイントは、機器接続リクエストを受信すると、受信した機器接続リクエスト中に含まれる認証方法やパスワードと、アクセスポイント内部に保持される認証方法およびパスワードが一致するか否かの判定を行う。アクセスポイントは、それらが一致する場合には、接続許可応答を無線出力し、一致しない場合には、接続不許可応答を無線出力する。
AP JOIN Msegを発行後、NWサブCPU621は、アクセスポイントとの接続が成功したか否かを判定する。具体的には、NWサブCPU621は、接続許可応答をアクセスポイントから受信したか否かを判定する。NWサブCPU621は、接続許可応答をアクセスポイントから受信せず、アクセスポイントとの接続が失敗したと判定した場合、アクセスポイントとの接続が失敗した旨と、接続が失敗した理由(例えば、パスワード不一致)をCPU602に通知する。一方、NWサブCPU621は、接続許可応答をアクセスポイントから受信し、アクセスポイントとの接続が成功したと判定した場合、接続に成功したAP JOIN完了通知をCPU602に通知する。
Then, it is determined whether or not the channel number determined as the channel to be used for the next AP search is the upper limit value. That is, the NW sub CPU 621 determines whether or not the AP search has been executed using all available channels (S1509). When the NW sub CPU 621 determines that the channel number is the upper limit value, it waits for a predetermined time (500 msec) (S1510). This is because the NW sub CPU 621 is temporarily released so that other tasks in the NW subsystem can be executed. After that, the NW sub CPU 621 performs the process of S1502 again. On the other hand, when the NW sub CPU 621 determines that the channel number is not the upper limit value, the NW sub CPU 621 performs an AP search in S1503 using the channel determined in S1508. That is, if the NW sub CPU 621 fails to detect the access point, the NW sub CPU 621 sequentially performs the AP search by sequentially using the available channels.
On the other hand, when the NW sub CPU 621 determines that the access point has been successfully detected, it issues an AP JOIN Mseg to the infrastructure controller 1024 with the communication channel number, SSID name, encryption method, password, etc. as arguments (S1506). Further, at this time, the NW sub CPU 621 transmits an AP search completion notification to the CPU 602, and stores the MAC address of the detected access point and the communication channel number that has been successfully detected in the shared RAM. When the AP JOIN Mseg is issued, the WLAN unit 616 wirelessly outputs a device connection request to the access point detected by the AP search in S1503. Upon receiving the device connection request, the access point determines whether or not the authentication method and password included in the received device connection request match the authentication method and password held inside the access point. If they match, the access point wirelessly outputs a connection permission response, and if they do not match, a connection non-permission response is wirelessly output.
After issuing the AP JOIN Mseg, the NW sub CPU 621 determines whether or not the connection with the access point is successful. Specifically, the NW sub CPU 621 determines whether or not the connection permission response is received from the access point. When the NW sub CPU 621 does not receive the connection permission response from the access point and determines that the connection with the access point has failed, the fact that the connection with the access point has failed and the reason why the connection has failed (for example, password mismatch) ) Is notified to the CPU 602. On the other hand, when the NW sub CPU 621 receives the connection permission response from the access point and determines that the connection with the access point is successful, the NW sub CPU 621 notifies the CPU 602 of the AP JOIN completion notification of successful connection.

なお、NWサブCPU621は、各チャネルを使用したAPサーチにおいて、装置探索リクエストコマンドの送信を複数回実行しても良い。また、このとき、CPU602は、MFP300が実行可能な全ての通信チャネルを使用せずとも良く、切断されたインフラ接続において利用していた通信チャネル以外の通信チャネルを少なくとも使用すれば良い。また、このとき利用されるチャネルの順番は特に限定されず、例えば、CPU602は、まず初めに現在P2P接続に使用しているチャネルを使用してAPサーチを実行した後、第1チャネルから順に使用してAPサーチを実行してもよい。また、CPU602は、2.4GHz(1〜13チャネル)と5GHz(36〜140チャネル)の周波数帯を使う場合、どちらかの周波数帯(例えば5GHz)に対応するチャネルを優先して用いてAPサーチを開始してもよい。 Note that the NW sub CPU 621 may transmit the device search request command a plurality of times in the AP search using each channel. Further, at this time, CPU 602 does not have to use all the communication channels that can be executed by MFP 300, and at least use the communication channels other than the communication channel used in the disconnected infrastructure connection. The order of the channels used at this time is not particularly limited. For example, the CPU 602 first executes the AP search using the channel currently used for the P2P connection, and then uses the channels in order from the first channel. Then, the AP search may be executed. When using the frequency bands of 2.4 GHz (1 to 13 channels) and 5 GHz (36 to 140 channels), the CPU 602 preferentially uses a channel corresponding to one of the frequency bands (for example, 5 GHz) to perform an AP search. May start.

このように、MFP300が同時動作モードでない状態でインフラ接続が切断された場合や、MFP300の電源がオンされた場合には、インフラ接続の再接続処理を、CPU602でなく、NWサブCPU621が実行する。また、NWサブCPU621はMFP300の装置状態や通信状態に係わらず、同一の方法でAPサーチを実行する。これは、上述の場合には、P2P接続は確立されておらず、P2Pモードによる通信におけるパケットロスや送信パケット遅延の課題が生じないため、MFP300の装置状態や通信状態に応じたインフラ接続の再接続処理が必要ないためである。また、上述の場合における再接続処理を、CPU602でなくNWサブCPU621が実行する形態とすることで、CPU602にかかる負荷を軽減することができる。そして、このような負荷分散システムによって、インフラ接続の再接続処理時のMFP300全体としてのパフォーマンスを向上させることができる。 As described above, when the infrastructure connection is disconnected while the MFP 300 is not in the simultaneous operation mode or when the power of the MFP 300 is turned on, the infrastructure connection reconnection process is executed by the NW sub CPU 621 instead of the CPU 602. .. Further, the NW sub CPU 621 executes the AP search by the same method regardless of the device state and communication state of the MFP 300. In the above case, the P2P connection is not established, and the problems of packet loss and transmission packet delay in the communication in the P2P mode do not occur. Therefore, the infrastructure connection is re-established according to the device state and communication state of the MFP 300. This is because connection processing is not required. Further, the reconnection process in the above case is executed by the NW sub CPU 621 instead of the CPU 602, so that the load on the CPU 602 can be reduced. With such a load balancing system, it is possible to improve the performance of the entire MFP 300 during the reconnection process of the infrastructure connection.

また、NWサブCPU621は、MFP300が実行可能な全ての通信チャネルを番号の小さいチャネルから順に用いて、500msecの周期で、アクセスポイントを検出するまでAPサーチを実行する。上述したように、NWサブCPU621が再接続処理を実行するのは、MFP300が同時動作モードでない状態でインフラ接続が切断された場合や、MFP300の電源がオンされた場合である。しかし、このような場合には、P2Pモードによる通信におけるパケットロスや送信パケット遅延の課題は生じない。そのため、NWサブCPU621は、サーチタイプがALLのAPサーチを、短い周期で実行することができる。 Further, NW sub CPU 621 uses all communication channels that can be executed by MFP 300 in order from the channel with the smallest number, and executes an AP search at a cycle of 500 msec until an access point is detected. As described above, the NW sub CPU 621 executes the reconnection process when the infrastructure connection is disconnected while the MFP 300 is not in the simultaneous operation mode or when the power of the MFP 300 is turned on. However, in such a case, problems such as packet loss and transmission packet delay in communication in the P2P mode do not occur. Therefore, the NW sub CPU 621 can execute an AP search whose search type is ALL in a short cycle.

また一方で、MFP300が同時動作モードである状態でインフラ接続が切断された場合やMFP300が同時動作モードである状態でLAN設定変更処理が実行される場合は、インフラ接続の再接続処理を、NWサブCPU621でなくCPU602が実行する。これにより、MFP300が同時動作モードである状態では、MFP300の装置状態や通信状態に応じた接続処理が実行される。 On the other hand, if the infrastructure connection is disconnected while the MFP 300 is in the simultaneous operation mode, or if the LAN setting change processing is executed while the MFP 300 is in the simultaneous operation mode, the infrastructure connection reconnection processing is performed by the NW. It is executed by the CPU 602 instead of the sub CPU 621. As a result, in a state where the MFP 300 is in the simultaneous operation mode, connection processing is executed according to the device state and communication state of the MFP 300.

<第2実施形態>
上述の実施形態では、インフラ接続が切断された際に、MFP300が同時動作モードか否かに応じて、再接続処理を実行する主体となるCPUを切り替えていた。本実施形態では、さらに他の要素を考慮して、再接続処理を実行する主体となるCPUを切り替える形態を説明する。
<Second Embodiment>
In the above-described embodiment, when the infrastructure connection is disconnected, the CPU that is the main body that executes the reconnection process is switched depending on whether or not the MFP 300 is in the simultaneous operation mode. In the present embodiment, a mode will be described in which the CPU that is the main body that executes the reconnection process is switched in consideration of other factors.

なお、本実施形態の通信システムや各装置の構成等は、第1実施形態と同様であるものとする。 The communication system and the configuration of each device of this embodiment are the same as those of the first embodiment.

図16は、CPU602がI/F接続Mgr1011によって実行する処理を示すフローチャートである。なお、本フローチャートが示す処理は、例えば、ROM603等のメモリに格納されたI/F接続Mgr1011に対応するプログラムをCPU602がRAM604に読み出して実行することにより実現される。また、パワーオン時の処理は、第1実施形態と同様であるため説明を省略する。 FIG. 16 is a flowchart showing the processing executed by the CPU 602 by the I/F connection Mgr 1011. The process shown in this flowchart is realized by the CPU 602 reading a program corresponding to the I/F connection Mgr 1011 stored in a memory such as the ROM 603 into the RAM 604 and executing the program. Further, the processing at the time of power-on is the same as that in the first embodiment, and thus the description thereof will be omitted.

〔LAN設定変更処理〕
S1630〜S1632の処理は、S1130〜S1132の処理と同様であるため説明を省略する。
[LAN setting change processing]
The processing of S1630 to S1632 is the same as the processing of S1130 to S1132, and thus the description thereof is omitted.

CPU602は、S1631にて、MFP300が同時動作モードであると判定した場合は、ユーザが操作表示部610を操作しているか否かを判定する(S1633)。一方、LAN設定の変更を指示したユーザは、引き続き操作表示部610を操作している可能性が高い。特に、MFP300が操作表示部610としてタッチパネルを搭載している場合は、CPU602は、タッチやドラッグといったタッチパネルに対するユーザ操作に追従して、タッチパネル上のGUIパーツの描画を行う必要がある。一般的に、タッチに対するユーザ操作に対して、GUIパーツの描画が100msec以上遅れると、ユーザに違和感を感じさせてしまう。そのため、ユーザが操作表示部610を操作している場合は、CPU602は、GUIパーツの描画等の、UIドメイン内の処理を優先しなければならない。そこで、CPU602は、ユーザが操作表示部610を操作していると判定した場合は、S1632に進み、再接続処理をNWサブCPU621に実行させる。これにより、CPU602は、ユーザが操作表示部610を操作している場合は、UIドメイン内の処理に注力することができ、ユーザに違和感を感じさせることなく、GUIパーツの描画等の処理を実行できる。なお、CPU602は、ユーザが操作表示部610を操作していないと判定した場合は、S1643以降の処理を行う。S1643〜S1646の処理は、S1142〜S1145の処理と同様のため、説明を省略する。 When the CPU 602 determines in S1631 that the MFP 300 is in the simultaneous operation mode, the CPU 602 determines whether the user is operating the operation display unit 610 (S1633). On the other hand, it is highly possible that the user who has instructed to change the LAN setting is still operating the operation display unit 610. In particular, when the MFP 300 is equipped with a touch panel as the operation display unit 610, the CPU 602 needs to draw GUI parts on the touch panel in accordance with user operations such as touch and drag on the touch panel. Generally, if the drawing of the GUI part is delayed by 100 msec or more with respect to the user operation with respect to the touch, the user feels uncomfortable. Therefore, when the user is operating the operation display unit 610, the CPU 602 must give priority to processing within the UI domain, such as drawing of GUI parts. Therefore, when the CPU 602 determines that the user is operating the operation display unit 610, the CPU 602 proceeds to S1632 and causes the NW sub CPU 621 to execute the reconnection process. As a result, the CPU 602 can focus on processing within the UI domain when the user is operating the operation display unit 610, and executes processing such as drawing of GUI parts without making the user feel uncomfortable. it can. If the CPU 602 determines that the user is not operating the operation display unit 610, the CPU 602 performs the processing from S1643. The processing of S1643 to S1646 is the same as the processing of S1142 to S1145, and thus the description thereof is omitted.

〔インフラ再接続処理〕
S1640、S1641の処理は、S1140、S1141の処理と同様であるため説明を省略する。
[Infrastructure reconnection processing]
The processing of S1640 and S1641 is the same as the processing of S1140 and S1141, and thus the description thereof is omitted.

CPU602は、S1641にて、MFP300が同時動作モードであると判定した場合は、MFP300とP2P接続している装置があるか否かを判定する(S1642)。上述したように、MFP300が一旦同時動作モードに設定されたら、P2P接続やインフラ接続が切断されても、通信モードの設定変更が行われないかぎり同時動作モードは解除されない。すなわち、MFP300は、同時動作モードであっても、P2P接続を実行していない場合がある。同時動作モードであっても、P2P接続が実行されていない場合は、インフラ接続の再接続処理がP2Pモードによる通信に与える影響はなく、P2Pモードによる通信におけるパケットロスや送信パケット遅延等の課題は発生しない。そのため、CPU602による、MFP300の装置状態に応じた、インフラ接続の再接続処理が実行される必要はない。よって、CPU602は、MFP300とP2P接続している装置がないと判定した場合、S1647に進み、NWサブCPU621にP2PコントローラSTOPコマンドを発行し、MFP300がソフトウェアAPとして動作することを停止させる。その後、CPU602は、インフラ接続の再接続処理をNWサブCPU621に実行させる。これにより、CPU602への負荷が軽減された、インフラ接続の再接続処理が実行される。なお、CPU602は、MFP300とP2P接続している装置がないと判定した場合は、S1643以降の処理を行う。S1643〜S1646の処理は、S1142〜S1145の処理と同様のため、説明を省略する。 When the CPU 602 determines in S1641 that the MFP 300 is in the simultaneous operation mode, the CPU 602 determines whether or not there is a device that is P2P connected to the MFP 300 (S1642). As described above, once the MFP 300 is set to the simultaneous operation mode, even if the P2P connection or the infrastructure connection is disconnected, the simultaneous operation mode is not canceled unless the setting of the communication mode is changed. That is, the MFP 300 may not execute the P2P connection even in the simultaneous operation mode. Even in the simultaneous operation mode, when the P2P connection is not executed, the reconnection process of the infrastructure connection does not affect the communication in the P2P mode, and there are problems such as packet loss and transmission packet delay in the communication in the P2P mode. Does not occur. Therefore, it is not necessary for the CPU 602 to execute the infrastructure connection reconnection processing according to the apparatus state of the MFP 300. Therefore, when the CPU 602 determines that there is no device P2P-connected to the MFP 300, the CPU 602 proceeds to step S1647 and issues a P2P controller STOP command to the NW sub CPU 621 to stop the MFP 300 from operating as a software AP. After that, the CPU 602 causes the NW sub CPU 621 to execute reconnection processing for infrastructure connection. As a result, the reconnection process of the infrastructure connection is executed with the load on the CPU 602 reduced. If the CPU 602 determines that there is no device that is P2P connected to the MFP 300, the CPU 602 performs the processes from S1643. The processing of S1643 to S1646 is the same as the processing of S1142 to S1145, and thus the description thereof is omitted.

<その他の実施形態>
本発明は、メインサブシステム側とNWサブシステム側の双方に無線接続シーケンサを配置し、状況に応じた接続シーケンスの負荷分散を行うことである。いずれの接続シーケンスを用いるかの判断は、ユーザ設定に応じて判断してもいいし、ユーザ操作状況、ユーザ使用状況、あるいはその複合条件で判断してもよい。
<Other embodiments>
The present invention is to dispose a wireless connection sequencer on both the main subsystem side and the NW subsystem side to perform load distribution of the connection sequence according to the situation. The connection sequence to be used may be determined according to the user setting, or may be determined based on the user operation status, the user usage status, or a composite condition thereof.

上述の実施形態のインフラ再接続処理における、MFP300が同時動作モードか否かの判定を、MFP300が端末装置200とP2P接続中か否かを判定することで行っても良い。又は、MFP300がGroupOwner(もしくはソフトウェアAP)として動作しているか否かを判定することで行っても良い。なお、上述の実施形態では、MFP300は、WFDモードにおける無線接続シーケンスにおいてネゴシエーションを実行するか否かの設定をユーザから受け付け可能であり、ネゴシエーションを実行する設定がなされている場合は、同時動作を実行しない。そのため、MFP300とアクセスポイント400との接続が切断されたタイミングにおいてMFP300は、GroupOwnerとして動作している端末装置200とP2P接続していることはない。MFP300がP2P接続しているならば、MFP300がGroupOwner(もしくはソフトウェアAP)として動作している。よって、CPU602は、MFP300がGroupOwner(もしくはソフトウェアAP)として動作しているか否かを判定することで、MFP300が端末装置200とP2P接続中か否かを判定できる。CPU602は、MFP300がGroupOwner(もしくはソフトウェアAP)として動作していない場合は、MFP300がP2P接続中でないと判定する。一方、CPU602は、MFP300がGroupOwner(もしくはソフトウェアAP)として動作している場合は、MFP300がP2P接続中であると判定する。MFP300がP2P接続中でなければ、インフラストラクチャモードによる通信を実行するためのインターフェースのみが単独で動作していることになる。すなわち、MFP300が同時動作を実行していない状態で、MFP300とアクセスポイント400との接続が切断されたことになる。そのため、CPU602は、MFP300がP2P接続中でないと判定した場合は、NWサブCPU621に再接続処理を実行させる。なお、MFP300が同時動作モードか否かの判定を、MFP300が端末装置200とP2P接続中か否かを判定することで行う場合は、S1642における判定は省略する。 In the infrastructure reconnection process of the above-described embodiment, the determination of whether the MFP 300 is in the simultaneous operation mode may be performed by determining whether the MFP 300 is in the P2P connection with the terminal device 200. Alternatively, it may be performed by determining whether or not the MFP 300 is operating as a GroupOwner (or software AP). It should be noted that in the above-described embodiment, the MFP 300 can accept the setting of whether or not to execute the negotiation in the wireless connection sequence in the WFD mode from the user, and if the setting for executing the negotiation is made, the simultaneous operation is performed. Do not run. Therefore, at the timing when the connection between the MFP 300 and the access point 400 is disconnected, the MFP 300 does not make the P2P connection with the terminal device 200 operating as the GroupOwner. If the MFP 300 is P2P-connected, the MFP 300 is operating as a GroupOwner (or software AP). Therefore, the CPU 602 can determine whether the MFP 300 is in the P2P connection with the terminal device 200 by determining whether the MFP 300 is operating as the GroupOwner (or software AP). When the MFP 300 is not operating as the GroupOwner (or the software AP), the CPU 602 determines that the MFP 300 is not in the P2P connection. On the other hand, the CPU 602 determines that the MFP 300 is in the P2P connection when the MFP 300 is operating as the GroupOwner (or software AP). If the MFP 300 is not in the P2P connection, only the interface for executing the communication in the infrastructure mode is operating independently. That is, the connection between the MFP 300 and the access point 400 is disconnected while the MFP 300 is not performing the simultaneous operation. Therefore, when determining that the MFP 300 is not in the P2P connection, the CPU 602 causes the NW sub CPU 621 to execute the reconnection process. When determining whether or not the MFP 300 is in the simultaneous operation mode by determining whether or not the MFP 300 is in the P2P connection with the terminal device 200, the determination in S1642 is omitted.

上述の実施形態では、MFP300は、P2Pモードによる通信やインフラストラクチャモードによる通信を実行するために、Wi−Fiを用いるものとしたが、この形態に限定されない。例えば、Bluetooth等、他の通信方式が用いられても良い。
上述した実施形態は、以下の処理を実行することによっても実現される。すなわち、上述した実施形態の機能を実現するソフトウエア(プログラム)を、ネットワーク又は各種記憶媒体を介してシステム或いは装置に供給し、そのシステム或いは装置のコンピュータ(CPUやMPU等)がプログラムを読み出して実行する処理である。また、プログラムは、1つのコンピュータで実行させても、複数のコンピュータを連動させて実行させるようにしてもよい。また、上記した処理の全てをソフトウエアで実現する必要はなく、処理の一部または全部をASIC等のハードウェアで実現するようにしてもよい。また、CPUも1つのCPUで全ての処理を行うものに限らず、複数のCPUが適宜連携をしながら処理を行うものとしてもよい。
In the above-described embodiment, the MFP 300 uses Wi-Fi to execute the communication in the P2P mode and the communication in the infrastructure mode, but the present invention is not limited to this. For example, another communication method such as Bluetooth may be used.
The embodiment described above is also realized by executing the following processing. That is, software (program) that realizes the functions of the above-described embodiments is supplied to a system or device via a network or various storage media, and the computer (CPU, MPU, etc.) of the system or device reads the program. This is the process to be executed. Further, the program may be executed by one computer or may be executed by interlocking a plurality of computers. Further, it is not necessary to realize all of the above-mentioned processing by software, and some or all of the processing may be realized by hardware such as ASIC. Further, the CPU is not limited to one in which all the processes are performed, and a plurality of CPUs may perform the processes while cooperating appropriately.

200 端末装置
300 MFP
400 アクセスポイント
602 CPU
621 NWサブCPU
200 Terminal device 300 MFP
400 Access point 602 CPU
621 NW sub CPU

Claims (15)

通信装置であって、
前記通信装置が使用可能なチャネルのうち、所定のチャネルを用いた外部装置と前記通信装置との第1の無線ネットワークにおける接続を確立させ、前記所定のチャネルを用いた端末装置と前記通信装置との第2の無線ネットワークにおける接続を確立させる接続手段と、
前記端末装置と前記通信装置との通信状態を取得し、前記通信状態に基づいた制御を行う第1の制御手段と、
前記第1の制御手段と異なる第2の制御手段と、を有し、
前記所定のチャネルを用いた前記外部装置と前記通信装置との前記第1の無線ネットワークにおける接続と、前記所定のチャネルを用いた前記端末装置と前記通信装置との前記第2の無線ネットワークにおける接続が並行して確立されている状態で、前記所定のチャネルを用いた前記外部装置と前記通信装置との接続が切断された場合、前記第1の制御手段が、前記第1の制御手段が実行可能な複数の検索方法のうち前記端末装置と前記通信装置との通信状態に応じて特定される検索方法で前記外部装置を検索し、
前記所定のチャネルを用いた前記外部装置と前記通信装置との前記第1の無線ネットワークにおける接続が確立されており、前記所定のチャネルを用いた前記端末装置と前記通信装置との前記第2の無線ネットワークにおける接続が確立されていない状態で、前記所定のチャネルを用いた前記外部装置と前記通信装置との接続が切断された場合、前記第2の制御手段が、前記端末装置と前記通信装置との通信状態にかかわらず所定の方法で前記外部装置を検索することを特徴とする通信装置。
A communication device,
Of the channels usable by the communication device, a connection is established between the external device and the communication device in a first wireless network using a predetermined channel, and the terminal device and the communication device are used in the predetermined channel. Connection means for establishing a connection in the second wireless network of
A first control unit that acquires a communication state between the terminal device and the communication device and performs control based on the communication state;
A second control means different from the first control means,
Connection of the external device and the communication device in the first wireless network using the predetermined channel, and connection of the terminal device and the communication device in the second wireless network using the predetermined channel When the connection between the external device and the communication device using the predetermined channel is disconnected in a state in which the first control device and the communication device are established in parallel, the first control unit executes the first control unit. Searching the external device by a search method specified according to the communication state between the terminal device and the communication device among a plurality of possible search methods,
A connection in the first wireless network is established between the external device and the communication device using the predetermined channel, and the second device is connected to the terminal device and the communication device using the predetermined channel. When the connection between the external device and the communication device using the predetermined channel is disconnected in a state where the connection in the wireless network is not established, the second control unit causes the second control unit to communicate with the terminal device and the communication device. A communication device for searching the external device by a predetermined method regardless of a communication state with the communication device.
前記第1の制御手段は、前記第2の制御手段より処理速度が速いことを特徴とする請求項1に記載の通信装置。 The communication device according to claim 1, wherein the first control unit has a processing speed higher than that of the second control unit. 前記所定のチャネルを用いた前記外部装置と前記通信装置との前記第1の無線ネットワークにおける接続と、前記所定のチャネルを用いた前記端末装置と前記通信装置との前記第2の無線ネットワークにおける接続が並行して確立されている状態で、前記外部装置と接続するための接続情報の設定が変更されたことで、前記所定のチャネルを用いた前記外部装置と前記通信装置との接続が切断された場合、前記第1の制御手段は、前記複数の検索方法のうち、前記所定のチャネルを用いて前記外部装置を検索し、前記所定のチャネル以外のチャネルを少なくとも用いて前記外部装置を検索しない検索方法で前記外部装置を検索することを特徴とする請求項1又は2に記載の通信装置。 Connection of the external device and the communication device in the first wireless network using the predetermined channel, and connection of the terminal device and the communication device in the second wireless network using the predetermined channel Are established in parallel, the connection between the external device and the communication device using the predetermined channel is disconnected by changing the setting of the connection information for connecting to the external device. In this case, the first control means searches the external device using the predetermined channel among the plurality of search methods, and does not search the external device using at least a channel other than the predetermined channel. The communication device according to claim 1 or 2, wherein the external device is searched by a search method. 前記所定のチャネルを用いた前記外部装置と前記通信装置との前記第1の無線ネットワークにおける接続と、前記所定のチャネルを用いた前記端末装置と前記通信装置との前記第2の無線ネットワークにおける接続が並行して確立されている状態で、前記所定のチャネルを用いた前記外部装置と前記通信装置との接続が切断された場合、前記第1の制御手段は、前記複数の検索方法のうち、前記端末装置と前記通信装置との通信が実行されていない状態では、前記所定のチャネルを用いて所定の回数、前記外部装置の検索を繰り返し、前記所定のチャネルを用いた前記外部装置の検索により前記外部装置が検出されなかった場合、前記所定のチャネル以外のチャネルを少なくとも用いて前記外部装置を検索する検索方法で前記外部装置を検索することを特徴とする請求項1乃至3のいずれか1項に記載の通信装置。 Connection of the external device and the communication device in the first wireless network using the predetermined channel, and connection of the terminal device and the communication device in the second wireless network using the predetermined channel Are established in parallel, when the connection between the external device and the communication device using the predetermined channel is disconnected, the first control means, among the plurality of search methods, In a state where communication between the terminal device and the communication device is not being executed, a search for the external device is repeated a predetermined number of times using the predetermined channel, and a search for the external device using the predetermined channel is performed. The external device is searched by a search method for searching the external device by using at least a channel other than the predetermined channel when the external device is not detected. The communication device according to the item. 前記所定のチャネルを用いた前記外部装置と前記通信装置との前記第1の無線ネットワークにおける接続と、前記所定のチャネルを用いた前記端末装置と前記通信装置との前記第2の無線ネットワークにおける接続が並行して確立されている状態で、前記所定のチャネルを用いた前記外部装置と前記通信装置との接続が切断された場合、前記第1の制御手段は、前記複数の検索方法のうち、前記端末装置と前記通信装置との通信が実行されていない状態では、前記所定のチャネルを用いて、第1の周期で所定の回数、前記外部装置の検索を繰り返し、前記所定のチャネルを用いて、前記第1の周期で前記所定の回数、前記外部装置の検索が繰り返されることにより前記外部装置が検出されなかった場合、前記所定のチャネル以外のチャネルを少なくとも用いて、前記第1の周期より長い第2の周期で前記外部装置の検索を繰り返す検索方法で前記外部装置を検索することを特徴とする請求項4に記載の通信装置。 Connection of the external device and the communication device in the first wireless network using the predetermined channel, and connection of the terminal device and the communication device in the second wireless network using the predetermined channel Are established in parallel, when the connection between the external device and the communication device using the predetermined channel is disconnected, the first control means, among the plurality of search methods, In a state where communication between the terminal device and the communication device is not being executed, the search for the external device is repeated a predetermined number of times in the first cycle using the predetermined channel, and the predetermined channel is used. If the external device is not detected by repeating the search for the external device for the predetermined number of times in the first period, at least a channel other than the predetermined channel is used, and The communication device according to claim 4, wherein the external device is searched by a search method in which the search for the external device is repeated in a long second cycle. 前記所定のチャネルを用いた前記外部装置と前記通信装置との前記第1の無線ネットワークにおける接続と、前記所定のチャネルを用いた前記端末装置と前記通信装置との前記第2の無線ネットワークにおける接続が並行して確立されており、且つ、前記外部装置と前記通信装置との通信が実行されている状態で、前記所定のチャネルを用いた前記外部装置と前記通信装置との接続が切断された場合、前記第1の制御手段は、前記複数の検索方法のうち、前記所定のチャネルを用いて所定の回数、前記外部装置の検索を繰り返し、前記所定のチャネルを用いて前記所定の回数、前記外部装置の検索が繰り返されることにより前記外部装置が検出されなかった場合、前記所定のチャネル以外のチャネルを少なくとも用いて前記外部装置を検索する検索方法で前記外部装置を検索することを特徴とする請求項1乃至5のいずれか1項に記載の通信装置。 Connection of the external device and the communication device in the first wireless network using the predetermined channel, and connection of the terminal device and the communication device in the second wireless network using the predetermined channel Are established in parallel, and the communication between the external device and the communication device is being executed, the connection between the external device and the communication device using the predetermined channel is disconnected. In this case, the first control means repeats the search for the external device a predetermined number of times using the predetermined channel among the plurality of search methods, and uses the predetermined channel for the predetermined number of times, When the external device is not detected by repeating the search for the external device, the external device is searched by a search method for searching the external device using at least a channel other than the predetermined channel. The communication device according to claim 1. 前記所定のチャネルを用いた前記外部装置と前記通信装置との前記第1の無線ネットワークにおける接続と、前記所定のチャネルを用いた前記端末装置と前記通信装置との前記第2の無線ネットワークにおける接続が並行して確立されており、且つ、前記外部装置と前記通信装置との通信が実行されている状態で、前記所定のチャネルを用いた前記外部装置と前記通信装置との接続が切断された場合、前記第1の制御手段は、前記複数の検索方法のうち、前記所定のチャネルを用いて、前記第1の周期よりも短い第3の周期で所定の回数、前記外部装置の検索を繰り返し、前記所定のチャネルを用いて、前記第3の周期で前記所定の回数、前記外部装置の検索が繰り返されることにより前記外部装置が検出されなかった場合、前記所定のチャネル以外のチャネルを少なくとも用いて、前記第2の周期より短く、且つ前記第3の周期より長い第4の周期で前記外部装置の検索を繰り返す検索方法で前記外部装置を検索することを特徴とする請求項6に記載の通信装置。 Connection of the external device and the communication device in the first wireless network using the predetermined channel, and connection of the terminal device and the communication device in the second wireless network using the predetermined channel Are established in parallel, and the communication between the external device and the communication device is being executed, the connection between the external device and the communication device using the predetermined channel is disconnected. In this case, the first control means repeats the search for the external device a predetermined number of times in a third cycle shorter than the first cycle using the predetermined channel among the plurality of search methods. If the external device is not detected by repeating the search for the external device for the predetermined number of times in the third cycle using the predetermined channel, at least a channel other than the predetermined channel is used. 7. The external device is searched by a search method in which the search for the external device is repeated in a fourth cycle that is shorter than the second cycle and longer than the third cycle. Communication device. 前記所定のチャネルを用いた前記外部装置と前記通信装置との前記第1の無線ネットワークにおける接続と、前記所定のチャネルを用いた前記端末装置と前記通信装置との前記第2の無線ネットワークにおける接続が並行して確立されている状態で、前記所定のチャネルを用いた前記外部装置と前記通信装置との接続が切断された場合、前記第1の制御手段は、前記複数の検索方法のうち、前記端末装置と前記通信装置との通信が実行されている状態では、前記端末装置と前記通信装置との通信が終了するまで、前記所定のチャネルを用いて、前記外部装置の検索を繰り返し、前記端末装置と前記通信装置との通信が終了するまで、前記所定のチャネルを用いて前記外部装置が検索されることにより前記外部装置が検出されなかった場合、前記所定のチャネル以外のチャネルを少なくとも用いて前記外部装置を検索する検索方法で前記外部装置を検索することを特徴とする請求項1乃至7のいずれか1項に記載の通信装置。 Connection of the external device and the communication device in the first wireless network using the predetermined channel, and connection of the terminal device and the communication device in the second wireless network using the predetermined channel Are established in parallel, when the connection between the external device and the communication device using the predetermined channel is disconnected, the first control means, among the plurality of search methods, In the state where the communication between the terminal device and the communication device is being performed, the search for the external device is repeated using the predetermined channel until the communication between the terminal device and the communication device is completed, Until the communication between the terminal device and the communication device is completed, if the external device is not detected by searching the external device using the predetermined channel, at least a channel other than the predetermined channel is used. The communication device according to any one of claims 1 to 7, wherein the external device is searched by a search method for searching for the external device. 前記所定のチャネルを用いた前記外部装置と前記通信装置との前記第1の無線ネットワークにおける接続と、前記所定のチャネルを用いた前記端末装置と前記通信装置との前記第2の無線ネットワークにおける接続が並行して確立されている状態で、前記所定のチャネルを用いた前記外部装置と前記通信装置との接続が切断された場合、前記第1の制御手段は、前記複数の検索方法のうち、前記端末装置と前記通信装置との通信が実行されている状態では、前記端末装置と前記通信装置との通信が終了するまで、前記所定のチャネルを用いて、前記外部装置の検索を繰り返し、前記端末装置と前記通信装置との通信が終了するまで、前記所定のチャネルを用いて前記外部装置が検索されることにより前記外部装置が検出されなかった場合、前記所定のチャネル以外のチャネルを少なくとも用いて、第5の周期で前記外部装置の検索を繰り返し、前記所定のチャネル以外のチャネルを少なくとも用いて、前記第5の周期で前記外部装置の検索が繰り返されることにより前記外部装置が検出されなかった場合、前記第5の周期よりも長い第6の周期で前記外部装置の検索を繰り返す検索方法で前記外部装置を検索することを特徴とする請求項8に記載の通信装置。 Connection of the external device and the communication device in the first wireless network using the predetermined channel, and connection of the terminal device and the communication device in the second wireless network using the predetermined channel Are established in parallel, when the connection between the external device and the communication device using the predetermined channel is disconnected, the first control means, among the plurality of search methods, In the state where the communication between the terminal device and the communication device is being performed, the search for the external device is repeated using the predetermined channel until the communication between the terminal device and the communication device is completed, Until the communication between the terminal device and the communication device is completed, if the external device is not detected by searching the external device using the predetermined channel, at least a channel other than the predetermined channel is used. Then, the external device is not detected by repeating the search for the external device in the fifth cycle and repeating the search for the external device in the fifth cycle using at least a channel other than the predetermined channel. 9. The communication device according to claim 8, wherein, in the case of the above, the external device is searched by a search method in which the search of the external device is repeated in a sixth cycle that is longer than the fifth cycle. 前記所定のチャネルを用いた前記外部装置と前記通信装置との前記第1の無線ネットワークにおける接続と、前記所定のチャネルを用いた前記端末装置と前記通信装置との前記第2の無線ネットワークにおける接続が並行して確立されている状態で、前記通信装置の電源がオフになったことにより、前記所定のチャネルを用いた前記外部装置と前記通信装置との接続が切断された後、前記通信装置の電源がオンになった場合、前記第2の制御手段が、前記端末装置と前記通信装置との通信状態にかかわらず前記所定の方法で前記外部装置を検索することを特徴とする請求項1乃至9のいずれか1項に記載の通信装置。 Connection of the external device and the communication device in the first wireless network using the predetermined channel, and connection of the terminal device and the communication device in the second wireless network using the predetermined channel Are established in parallel, the communication device is turned off, and the connection between the external device and the communication device using the predetermined channel is cut off. The second control means searches for the external device by the predetermined method regardless of the communication state between the terminal device and the communication device when the power of the device is turned on. The communication device according to any one of claims 1 to 9. 前記所定の方法は、前記通信装置が使用可能な全てのチャネルを用いて、前記外部装置を検索する検索方法であることを特徴とする請求項1乃至10のいずれか1項に記載の通信装置。 The communication device according to any one of claims 1 to 10, wherein the predetermined method is a search method for searching the external device using all channels available to the communication device. .. 前記第1の制御手段及び前記第2の制御手段は、前記通信装置が使用可能な全てのチャネルを用いて前記外部装置の検索を行う場合、前記通信装置が使用可能な全てのチャネルを順に使用して前記外部装置を検索することを特徴とする請求項1乃至11のいずれか1項に記載の通信装置。 The first control unit and the second control unit sequentially use all channels available to the communication device when searching for the external device using all channels available to the communication device. The communication device according to claim 1, wherein the communication device searches for the external device. 前記外部装置と前記通信装置との接続に用いられる前記所定のチャネルは、前記外部装置によって決定されることを特徴とする請求項1乃至12のいずれか1項に記載の通信装置。 The communication device according to any one of claims 1 to 12, wherein the predetermined channel used for connecting the external device and the communication device is determined by the external device. 前記端末装置との前記第1の無線ネットワークにおける接続は、Wi−Fi Direct(登録商標)によって形成されることを特徴とする請求項1乃至13のいずれか1項に記載の通信装置。 The communication device according to any one of claims 1 to 13, wherein a connection with the terminal device in the first wireless network is formed by Wi-Fi Direct (registered trademark). 端末装置との通信状態を取得し、前記通信状態に基づいた制御を行う第1の制御手段と、前記第1の制御手段と異なる第2の制御手段と、を有する通信装置の制御方法であって、
前記通信装置が使用可能なチャネルのうち、所定のチャネルを用いた外部装置と前記通信装置との第1の無線ネットワークにおける接続を確立させ、前記所定のチャネルを用いた端末装置と前記通信装置との第2の無線ネットワークにおける接続を確立させる接続ステップと、
前記所定のチャネルを用いた前記外部装置と前記通信装置との前記第1の無線ネットワークにおける接続と、前記所定のチャネルを用いた前記端末装置と前記通信装置との前記第2の無線ネットワークにおける接続が並行して確立されている状態で、前記所定のチャネルを用いた前記外部装置と前記通信装置との接続が切断された場合、前記第1の制御手段に、前記第1の制御手段が実行可能な複数の検索方法のうち前記端末装置と前記通信装置との通信状態に応じて特定される検索方法で前記外部装置を検索させ、前記所定のチャネルを用いた前記外部装置と前記通信装置との前記第1の無線ネットワークにおける接続が確立されており、前記所定のチャネルを用いた前記端末装置と前記通信装置との前記第2の無線ネットワークにおける接続が確立されていない状態で、前記所定のチャネルを用いた前記外部装置と前記通信装置との接続が切断された場合、前記第2の制御手段に、前記端末装置と前記通信装置との通信状態にかかわらず所定の方法で前記外部装置を検索させる検索ステップとを有することを特徴とする制御方法。
A method for controlling a communication device, comprising: first control means for acquiring a communication state with a terminal device and performing control based on the communication state; and second control means different from the first control means. hand,
Of the channels usable by the communication device, a connection is established between the external device and the communication device in a first wireless network using a predetermined channel, and the terminal device and the communication device are used in the predetermined channel. A connection step for establishing a connection in the second wireless network of
Connection of the external device and the communication device in the first wireless network using the predetermined channel, and connection of the terminal device and the communication device in the second wireless network using the predetermined channel When the connection between the external device and the communication device using the predetermined channel is disconnected in a state in which the first control unit is established in parallel, the first control unit executes the first control unit. Among the plurality of possible search methods, the external device is searched by the search method specified according to the communication state between the terminal device and the communication device, and the external device and the communication device using the predetermined channel The connection in the first wireless network is established and the connection between the terminal device and the communication device using the predetermined channel in the second wireless network is not established. When the connection between the external device and the communication device using a channel is cut off, the second control means is caused to control the external device by a predetermined method regardless of the communication state between the terminal device and the communication device. A control method comprising: a search step for searching.
JP2016101793A 2016-05-20 2016-05-20 Communication device, control method thereof, and program Active JP6742812B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2016101793A JP6742812B2 (en) 2016-05-20 2016-05-20 Communication device, control method thereof, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2016101793A JP6742812B2 (en) 2016-05-20 2016-05-20 Communication device, control method thereof, and program

Publications (3)

Publication Number Publication Date
JP2017208777A JP2017208777A (en) 2017-11-24
JP2017208777A5 JP2017208777A5 (en) 2019-06-27
JP6742812B2 true JP6742812B2 (en) 2020-08-19

Family

ID=60417423

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2016101793A Active JP6742812B2 (en) 2016-05-20 2016-05-20 Communication device, control method thereof, and program

Country Status (1)

Country Link
JP (1) JP6742812B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7277077B2 (en) * 2018-03-06 2023-05-18 キヤノン株式会社 PRINTING APPARATUS, PRINTING APPARATUS CONTROL METHOD AND PROGRAM
JP7389550B2 (en) * 2018-12-28 2023-11-30 キヤノン株式会社 Communication device, control method, program, and storage medium
CN114513750B (en) * 2020-11-16 2024-02-23 福建星网元智科技有限公司 Price tag searching method and storage device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6335437B2 (en) * 2013-04-26 2018-05-30 キヤノン株式会社 COMMUNICATION DEVICE, COMMUNICATION METHOD, AND PROGRAM

Also Published As

Publication number Publication date
JP2017208777A (en) 2017-11-24

Similar Documents

Publication Publication Date Title
JP6335437B2 (en) COMMUNICATION DEVICE, COMMUNICATION METHOD, AND PROGRAM
JP6676469B2 (en) Communication device, control method therefor, and program
JP6525771B2 (en) INFORMATION PROCESSING APPARATUS, CONTROL METHOD, AND PROGRAM
US11429332B2 (en) Communication apparatus, method of controlling same, and non-transitory computer-readable storage medium
KR102162568B1 (en) Communication apparatus, control method for the same, and recording medium
JP6742812B2 (en) Communication device, control method thereof, and program
CN107404770B (en) Communication apparatus, control method, and computer-readable storage medium
JP2017208783A (en) Communication device, control method, and program
JP6700972B2 (en) Communication device, control method, and program
JP6700971B2 (en) Communication device, control method, and program
JP6643185B2 (en) Communication device, communication method, and program
US20230247406A1 (en) Information processing apparatus that establishes connection to a communication apparatus, control method, and non-transitory computer-readable storage medium storing program
JP6707949B2 (en) Computer program for terminal device
JP6701116B2 (en) Printers and programs
CN115915498A (en) Communication apparatus, control method, and non-transitory computer-readable storage medium
JP2017212504A (en) Communication device, control method, and program
JP6730845B2 (en) Communication device, control method thereof, and program
JP2023075858A (en) Information processing apparatus, method for controlling the same, and program

Legal Events

Date Code Title Description
A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20190516

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20190516

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20191126

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20191129

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20200124

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20200212

A601 Written request for extension of time

Free format text: JAPANESE INTERMEDIATE CODE: A601

Effective date: 20200403

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20200427

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20200729

R151 Written notification of patent or utility model registration

Ref document number: 6742812

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151