JP2018050350A - Communication device - Google Patents

Communication device Download PDF

Info

Publication number
JP2018050350A
JP2018050350A JP2018000232A JP2018000232A JP2018050350A JP 2018050350 A JP2018050350 A JP 2018050350A JP 2018000232 A JP2018000232 A JP 2018000232A JP 2018000232 A JP2018000232 A JP 2018000232A JP 2018050350 A JP2018050350 A JP 2018050350A
Authority
JP
Japan
Prior art keywords
address
printer
wfd
communication device
network
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.)
Granted
Application number
JP2018000232A
Other languages
Japanese (ja)
Other versions
JP6519668B2 (en
Inventor
斉藤 健
Takeshi Saito
健 斉藤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Brother Industries Ltd
Original Assignee
Brother Industries Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Brother Industries Ltd filed Critical Brother Industries Ltd
Priority to JP2018000232A priority Critical patent/JP6519668B2/en
Publication of JP2018050350A publication Critical patent/JP2018050350A/en
Application granted granted Critical
Publication of JP6519668B2 publication Critical patent/JP6519668B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

PROBLEM TO BE SOLVED: To provide a technique that allows a communication device to communicate appropriately.SOLUTION: A printer 10 constructs a non-WFD network including an AP 4 and the printer 10. Next, if a WFD network should be constructed in the state of the non-WFD network being constructed, the printer 10 refers to an IP address for the non-WFD, i.e. an IP address of the printer 10 used in the non-WFD network, determines an IP address for the WFD of a mobile terminal 8 not included in a range of IP addresses available in the non-WFD network, and allocates the IP address for the WFD of the mobile terminal 8 to the mobile terminal 8.SELECTED DRAWING: Figure 5

Description

本明細書によって開示される技術は、通信装置に関する。   The technology disclosed by this specification is related with a communication apparatus.

特許文献1には、2個の無線LANカードが装着される無線アクセスポイントと、一方の無線LANカードに接続されるノートPCと、他方の無線LANカードに接続されるノートPCと、を備えるシステムが開示されている。前者のノートPCには、一方の無線LANカードに割り当てられたサブネットアドレスを含むIPアドレスが、イントラネット上のDHCPサーバから割り当てられる。後者のノートPCには、他方の無線LANカードに割り当てられたサブネットアドレスを含むIPアドレスが、無線アクセスポイント内のDHCPサーバから割り当てられる。この結果、前者のノートPCと後者のノートPCとが異なるサブネットに属することになる。   Patent Document 1 discloses a system including a wireless access point to which two wireless LAN cards are mounted, a notebook PC connected to one wireless LAN card, and a notebook PC connected to the other wireless LAN card. Is disclosed. An IP address including a subnet address assigned to one wireless LAN card is assigned to the former notebook PC from a DHCP server on the intranet. An IP address including a subnet address assigned to the other wireless LAN card is assigned to the latter notebook PC from a DHCP server in the wireless access point. As a result, the former notebook PC and the latter notebook PC belong to different subnets.

特開2006−019851号広報Japanese Laid-Open Patent Publication No. 2006-019851

本明細書では、通信装置が通信を適切に実行し得る技術を提供する。   The present specification provides a technique by which a communication device can appropriately execute communication.

本明細書では、通信装置を開示する。通信装置は、第1のデバイスと通信装置とを含む第1種のネットワークを構築する第1の構築部と、第1のデバイスとは異なる第2のデバイスと通信装置とを含む第2種のネットワークを構築する第2の構築部と、第1種のネットワーク及び第2種のネットワークのうちの一方が構築されている状態で、第1種のネットワーク及び第2種のネットワークのうちの他方が構築されるべき特定の場合に、第2種のネットワークで利用される通信装置のIPアドレスである特定のIPアドレスを参照して、第2種のネットワークで利用可能なIPアドレスの範囲である特定のアドレス範囲に含まれない対象のIPアドレスを決定し、対象のIPアドレスを第1のデバイスに割り当てるアドレス決定処理を実行する決定部と、を備える。   The present specification discloses a communication apparatus. The communication device includes a first construction unit that constructs a first type network including the first device and the communication device, and a second type including a second device and the communication device different from the first device. In a state where one of the second construction unit that constructs the network and the first type network and the second type network is constructed, the other of the first type network and the second type network is A specific range of IP addresses that can be used in the second type network with reference to a specific IP address that is an IP address of a communication device used in the second type network in a specific case to be constructed A determination unit that determines a target IP address that is not included in the address range and assigns the target IP address to the first device.

上記の構成によると、通信装置は、特定の場合に、第2種のネットワークで利用される通信装置のIPアドレス(即ち特定のIPアドレス)を参照して、第2種のネットワークで利用可能なIPアドレスの範囲である特定のアドレス範囲に含まれない第1のデバイスのIPアドレス(即ち対象のIPアドレス)を決定する。即ち、通信装置は、特定のIPアドレスに応じて、特定のアドレス範囲に含まれない対象のIPアドレスを動的に決定して第1のデバイスに割り当てることができる。このために、例えば、通信装置は、対象のIPアドレスを送信先として第1のデバイスにデータを送信すべき場合に、第1のデバイスにデータを適切に送信し得る。従って、通信装置は、通信を適切に実行し得る。   According to the above configuration, the communication device can be used in the second type network by referring to the IP address (that is, the specific IP address) of the communication device used in the second type network in a specific case. The IP address of the first device that is not included in the specific address range that is the IP address range (that is, the target IP address) is determined. That is, the communication apparatus can dynamically determine a target IP address not included in the specific address range and assign it to the first device according to the specific IP address. For this reason, for example, the communication apparatus can appropriately transmit data to the first device when the data is to be transmitted to the first device with the target IP address as the transmission destination. Therefore, the communication device can appropriately execute communication.

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

通信システムの構成の一例を示す。An example of a structure of a communication system is shown. WFDネットワーク構築処理のフローチャートを示す。The flowchart of a WFD network construction process is shown. IPアドレス動的決定処理のフローチャートを示す。The flowchart of an IP address dynamic determination process is shown. 非WFDネットワーク構築処理のフローチャートを示す。The flowchart of a non-WFD network construction process is shown. ケースA1のシーケンス図を示す。The sequence diagram of case A1 is shown. 図5の続きのシーケンス図を示す。FIG. 6 shows a sequence diagram continued from FIG. 5. ケースBのシーケンス図を示す。A sequence diagram of case B is shown. 図7の続きのシーケンス図を示す。FIG. 8 is a sequence diagram continued from FIG. 7. 第2実施例のWFDネットワーク構築処理のフローチャートを示す。The flowchart of the WFD network construction process of 2nd Example is shown. ケースA2のシーケンス図を示す。The sequence diagram of case A2 is shown.

(第1実施例)
(システムの構成)
図1に示されるように、通信システム2は、アクセスポイント(以下では「AP」と呼ぶ)4と、PC6と、携帯端末8と、プリンタ10(PC6、携帯端末8等の周辺機器)と、を備える。携帯端末8とプリンタ10とは、それぞれ、後述のWi−Fi Directに従った無線通信機能を実行可能である。なお、以下では、Wi−Fi Directのことを「WFD」と呼び、WFDに従った接続のことを「WFD接続」と呼ぶ。プリンタ10は、携帯端末8とのWFD接続を確立可能であり、これにより、WFDネットワークが構築される。この結果、携帯端末8とプリンタ10とは、印刷データ等の通信対象の対象データの無線通信を実行可能になる。
(First embodiment)
(System configuration)
As shown in FIG. 1, the communication system 2 includes an access point (hereinafter referred to as “AP”) 4, a PC 6, a mobile terminal 8, a printer 10 (peripheral devices such as the PC 6 and the mobile terminal 8), Is provided. Each of the portable terminal 8 and the printer 10 can execute a wireless communication function according to Wi-Fi Direct described later. Hereinafter, Wi-Fi Direct is referred to as “WFD”, and connection in accordance with WFD is referred to as “WFD connection”. The printer 10 can establish a WFD connection with the mobile terminal 8, and thereby a WFD network is constructed. As a result, the portable terminal 8 and the printer 10 can execute wireless communication of target data to be communicated such as print data.

プリンタ10は、WFDに従った無線通信機能に加えて、通常の無線通信機能(例えば、IEEE802.11に従った無線通信)を実行可能である。即ち、プリンタ10は、AP4との接続(以下では「非WFD接続」と呼ぶ)を確立可能であり、これにより、非WFDネットワークが構築される。なお、PC6も、AP4との非WFD接続を確立可能である。この結果、プリンタ10とPC6とは、AP4を介して、印刷データ等の通信対象の対象データの無線通信を実行可能になる。   The printer 10 can execute a normal wireless communication function (for example, wireless communication according to IEEE 802.11) in addition to the wireless communication function according to WFD. In other words, the printer 10 can establish a connection with the AP 4 (hereinafter referred to as “non-WFD connection”), and thereby a non-WFD network is constructed. Note that the PC 6 can also establish a non-WFD connection with the AP 4. As a result, the printer 10 and the PC 6 can execute wireless communication of target data to be communicated such as print data via the AP 4.

本実施例では、AP4とPC6とプリンタ10とが、例えば、特定の会社内に据え置きされる状況を想定している。即ち、特定の会社内では、AP4とPC6とプリンタ10とを含む非WFDネットワークが構築される。このために、PC6のユーザ(例えば特定の会社の社員)は、AP4を介して、プリンタ10に印刷を実行させることができる。そして、例えば、携帯端末8のユーザ(例えば特定の会社を訪問した者)は、携帯端末8とプリンタ10との間にWFD接続を一時的に確立させることができる。即ち、携帯端末8のユーザは、携帯端末8とプリンタ10とを含むWFDネットワークを一時的に構築させることができる。これにより、携帯端末8のユーザは、AP4を介さずに、プリンタ10に印刷を実行させることができる。このように、本実施例では、非WFDネットワークが定常的に構築されるべきネットワークであり、WFDネットワークが一時的に構築されるべきネットワークである状況を想定している。   In this embodiment, it is assumed that the AP 4, the PC 6, and the printer 10 are deferred in a specific company, for example. That is, in a specific company, a non-WFD network including the AP 4, the PC 6, and the printer 10 is constructed. For this reason, a user of the PC 6 (for example, an employee of a specific company) can cause the printer 10 to execute printing via the AP 4. For example, a user of the mobile terminal 8 (for example, a person who visited a specific company) can temporarily establish a WFD connection between the mobile terminal 8 and the printer 10. That is, the user of the mobile terminal 8 can temporarily construct a WFD network including the mobile terminal 8 and the printer 10. Thereby, the user of the portable terminal 8 can cause the printer 10 to execute printing without using the AP 4. As described above, in this embodiment, it is assumed that the non-WFD network is a network that is to be constantly constructed and the WFD network is a network that is to be temporarily constructed.

(プリンタ10の構成)
プリンタ10は、操作部12と、表示部14と、印刷実行部16と、無線インターフェイス18と、制御部20と、を備える。上記の各部12〜20は、バス線(符号省略)に接続されている。操作部12は、複数のキーによって構成される。ユーザは、操作部12を操作して、様々な指示をプリンタ10に与えることができる。表示部14は、様々な情報を表示するためのディスプレイである。印刷実行部16は、インクジェット方式、レーザ方式等の印刷機構を備え、制御部20からの指示に従って印刷を実行する。
(Configuration of Printer 10)
The printer 10 includes an operation unit 12, a display unit 14, a print execution unit 16, a wireless interface 18, and a control unit 20. Each of the above-described units 12 to 20 is connected to a bus line (reference numeral omitted). The operation unit 12 includes a plurality of keys. The user can give various instructions to the printer 10 by operating the operation unit 12. The display unit 14 is a display for displaying various information. The print execution unit 16 includes a printing mechanism such as an inkjet method or a laser method, and executes printing according to an instruction from the control unit 20.

無線インターフェイス18は、制御部20が無線通信を実行する際に利用されるインターフェイスである。無線インターフェイス18は、物理的には1個のインターフェイスである。ただし、無線インターフェイス18には、WFD接続で利用されるべきMACアドレスと、非WFD接続で利用されるべきMACアドレスと、の両方が割り当てられている。従って、制御部20は、無線インターフェイス18を利用して、WFDに従った無線通信機能と通常の無線通信機能との両方を同時的に実行し得る。この結果、後で詳しく説明するが、制御部20は、WFDネットワークと非WFDネットワークとの両方が構築されている状態を形成し得る。   The wireless interface 18 is an interface used when the control unit 20 executes wireless communication. The radio interface 18 is physically one interface. However, both the MAC address to be used for the WFD connection and the MAC address to be used for the non-WFD connection are assigned to the wireless interface 18. Therefore, the control unit 20 can simultaneously execute both the wireless communication function according to the WFD and the normal wireless communication function using the wireless interface 18. As a result, as will be described in detail later, the control unit 20 can form a state in which both the WFD network and the non-WFD network are constructed.

制御部20は、CPU22とメモリ24とを備える。CPU22は、メモリ24に格納されているプログラムに従って、様々な処理を実行する。メモリ24は、ROM、RAM、ハードディスク等によって構成される。メモリ24は、CPU22によって実行される上記のプログラムを格納したり、CPU22が処理を実行する過程で取得又は生成されるデータを格納したりする。CPU22が上記のプログラムに従って処理を実行することによって、各部30〜42の機能が実現される。   The control unit 20 includes a CPU 22 and a memory 24. The CPU 22 executes various processes according to programs stored in the memory 24. The memory 24 includes a ROM, a RAM, a hard disk, and the like. The memory 24 stores the above-described program executed by the CPU 22 and stores data acquired or generated in the process of the CPU 22 executing the process. The functions of the units 30 to 42 are realized by the CPU 22 executing the process according to the above program.

(AP4の構成)
AP4は、非WFDネットワークを構成する各機器(例えばPC6、プリンタ10)の間の無線通信を中継する。AP4は、さらに、非WFDネットワークを構成する各機器IPアドレスを割り当てるDHCP(Dynamic Host Configuration Protocol)サーバとして機能する。AP4は、非WFDネットワークで利用されるべきプリンタ10のIPアドレス(以下では「プリンタ10の非WFD用IPアドレス」と呼ぶ)を決定して、プリンタ10の非WFD用IPアドレスをプリンタ10に割り当てる。同様に、AP4は、PC6の非WFD用IPアドレスをPC6に割り当てる。これにより、プリンタ10(即ち第2の構築部32)は、AP4から割り当てられたプリンタ10の非WFD用IPアドレス(さらには、AP4のIPアドレス、PC6のIPアドレス)を利用して、印刷データ等の通信をPC6と実行することができる。本実施例では、このようにして、IPアドレスを利用した通信を開始することが、AP4とPC6とプリンタ10とを含む非WFDネットワークを構築することを意味する。なお、非WFDネットワークでは、IPv4(Internet Protocol version 4)のIPアドレスが利用される。
(Configuration of AP4)
The AP 4 relays wireless communication between devices (for example, the PC 6 and the printer 10) configuring the non-WFD network. The AP 4 further functions as a DHCP (Dynamic Host Configuration Protocol) server that assigns each device IP address that configures the non-WFD network. The AP 4 determines the IP address of the printer 10 to be used in the non-WFD network (hereinafter referred to as “the non-WFD IP address of the printer 10”), and assigns the non-WFD IP address of the printer 10 to the printer 10. . Similarly, the AP 4 assigns the non-WFD IP address of the PC 6 to the PC 6. As a result, the printer 10 (that is, the second construction unit 32) uses the non-WFD IP address of the printer 10 assigned from the AP 4 (in addition, the IP address of the AP 4 and the IP address of the PC 6) to print data. Communication with the PC 6 can be performed. In this embodiment, starting communication using the IP address in this way means that a non-WFD network including the AP 4, the PC 6, and the printer 10 is constructed. In the non-WFD network, an IPv4 (Internet Protocol version 4) IP address is used.

(PC6の構成)
PC6は、AP4との非WFD接続を確立することができる。PC6は、図示省略のCPU、メモリ、ディスプレイ等を備える。PC6のメモリは、プリンタ10のためのプリンタドライバプログラムを格納している。PC6のCPUは、プリンタドライバプログラムを利用して、印刷対象の印刷データを生成することができる。プリンタ10とAP4との間に非WFD接続が確立されていると共に、PC6とAP4との間に非WFD接続が確立されている状態では、PC6は、AP4を介して、印刷データをプリンタ10に無線で送信可能である。
(Configuration of PC6)
The PC 6 can establish a non-WFD connection with the AP 4. The PC 6 includes a CPU, a memory, a display, etc. (not shown). The memory of the PC 6 stores a printer driver program for the printer 10. The CPU of the PC 6 can generate print data to be printed using a printer driver program. In a state where a non-WFD connection is established between the printer 10 and the AP 4 and a non-WFD connection is established between the PC 6 and the AP 4, the PC 6 sends print data to the printer 10 via the AP 4. It can be transmitted wirelessly.

(携帯端末8の構成)
携帯端末8は、可搬型の端末であり、例えば、スマートフォン、PDA端末、ノートPC、タブレットPC等を含む。携帯端末8は、WFDに従った無線通信機能を実行可能である。携帯端末8は、プリンタ10とのWFD接続を確立可能である。携帯端末8は、図示省略のCPU、メモリ、ディスプレイ等を備える。携帯端末8のメモリは、プリンタ10のためのプリンタドライバプログラムを格納している。携帯端末8のCPUは、プリンタドライバプログラムを利用して、印刷対象の印刷データを生成することができる。プリンタ10と携帯端末8との間にWFD接続が確立されている状態では、携帯端末8は、AP4を介さずに、印刷データをプリンタ10に無線で送信可能である。
(Configuration of mobile terminal 8)
The portable terminal 8 is a portable terminal and includes, for example, a smartphone, a PDA terminal, a notebook PC, a tablet PC, and the like. The portable terminal 8 can execute a wireless communication function according to WFD. The mobile terminal 8 can establish a WFD connection with the printer 10. The portable terminal 8 includes a CPU, a memory, a display, etc. (not shown). The memory of the portable terminal 8 stores a printer driver program for the printer 10. The CPU of the portable terminal 8 can generate print data to be printed using a printer driver program. In a state where the WFD connection is established between the printer 10 and the mobile terminal 8, the mobile terminal 8 can wirelessly transmit print data to the printer 10 without using the AP 4.

(WFD)
WFDは、Wi−Fi Allianceによって策定された規格である。WFDは、Wi−Fi Allianceによって作成された「Wi−Fi Peer−to−Peer(P2P) Technical Specification Version1.1」に記述されている。
(WFD)
WFD is a standard established by the Wi-Fi Alliance. WFD is described in “Wi-Fi Peer-to-Peer (P2P) Technical Specification Version 1.1” created by Wi-Fi Alliance.

上述したように、プリンタ10と携帯端末8とは、それぞれ、WFDに従った無線通信機能を実行可能である。以下では、WFDに従った無線通信機能を実行可能な機器のことを「WFD対応機器」と呼ぶ。WFDの規格では、WFD対応機器の状態として、Group Owner状態(以下では「G/O状態」と呼ぶ)、クライアント状態、及び、デバイス状態の3つの状態が定義されている。WFD対応機器は、上記の3つの状態のうちの1つの状態で選択的に動作可能である。   As described above, the printer 10 and the mobile terminal 8 can each execute a wireless communication function according to WFD. Hereinafter, a device capable of executing a wireless communication function according to WFD is referred to as “WFD-compatible device”. In the WFD standard, three states of a Group Owner state (hereinafter referred to as “G / O state”), a client state, and a device state are defined as states of a WFD-compatible device. The WFD compatible device can selectively operate in one of the above three states.

G/O状態の機器とクライアント状態の機器とによって、1個のWFDネットワークが構成される。1個のWFDネットワークでは、G/O状態の機器が1個しか存在し得ないが、クライアント状態の機器が1個以上存在し得る。G/O状態の機器は、1個以上のクライアント状態の機器を管理する。具体的に言うと、G/O状態の機器は、1個以上のクライアント状態の機器のそれぞれの識別情報(即ちMACアドレス)が記述された管理リストを生成する。G/O状態の機器は、クライアント状態の機器がWFDネットワークに新たに参加すると、当該機器の識別情報を管理リストに追加し、クライアント状態の機器がWFDネットワークから離脱すると、当該機器の識別情報を管理リストから削除する。   One WFD network is configured by the devices in the G / O state and the devices in the client state. In one WFD network, there can be only one device in the G / O state, but there can be one or more devices in the client state. A device in the G / O state manages one or more devices in the client state. More specifically, the G / O state device generates a management list in which identification information (that is, MAC address) of each of one or more client state devices is described. When a device in the client state newly joins the WFD network, the device in the G / O state adds the identification information of the device to the management list, and when the device in the client state leaves the WFD network, the identification information of the device is added. Delete from the management list.

G/O状態の機器は、管理リストに登録されている機器、即ち、クライアント状態の機器との間で、通信対象の対象データ(例えば、OSI参照モデルのネットワーク層の情報を含むデータ(印刷データ等))の無線通信を実行可能である。しかしながら、G/O状態の機器は、管理リストに登録されていない機器との間で、WFDネットワークに参加するためのデータ(例えば、ネットワーク層の情報を含まないデータ(Probe Request信号、Probe Response信号等の物理層のデータ)の無線通信を実行可能であるが、上記の対象データの無線通信を実行不可能である。例えば、G/O状態のプリンタ10は、管理リストに登録されている携帯端末8(即ち、クライアント状態の携帯端末8)から印刷データを無線で受信可能であるが、管理リストに登録されていない機器から印刷データを無線で受信不可能である。   A device in the G / O state communicates with a device registered in the management list, that is, a device in a client state (for example, data including information on the network layer of the OSI reference model (print data). Etc.)) is possible. However, a device in the G / O state is not allowed to participate in the WFD network with a device that is not registered in the management list (for example, data not including network layer information (Probe Request signal, Probe Response signal). For example, the printer 10 in the G / O state is not registered in the management list, but the wireless communication of the target data cannot be performed. Although print data can be received wirelessly from the terminal 8 (that is, the mobile terminal 8 in the client state), print data cannot be received wirelessly from a device that is not registered in the management list.

また、G/O状態の機器は、複数個のクライアント状態の機器の間の対象データ(印刷データ等)の無線通信を中継可能である。例えば、クライアント状態の携帯端末8がクライアント状態の他のプリンタに印刷データを無線で送信すべき場合には、携帯端末8は、まず、印刷データをG/O状態のプリンタ10に無線で送信する。この場合、プリンタ10は、携帯端末8から印刷データを無線で受信して、上記の他のプリンタに印刷データを無線で送信する。即ち、G/O状態の機器は、無線ネットワークのAP(アクセスポイント)の機能を実行可能である。   In addition, a G / O state device can relay wireless communication of target data (print data, etc.) between a plurality of client state devices. For example, when the mobile terminal 8 in the client state should wirelessly transmit print data to another printer in the client state, the mobile terminal 8 first wirelessly transmits the print data to the printer 10 in the G / O state. . In this case, the printer 10 wirelessly receives print data from the portable terminal 8 and transmits the print data wirelessly to the other printer. That is, a device in the G / O state can execute a function of an AP (access point) of the wireless network.

G/O状態の機器は、さらに、クライアント状態の機器にIPアドレスを割り当てるDHCPサーバとして機能する。例えば、G/O状態のプリンタ10は、WFDネットワークで利用されるべきプリンタ10のIPアドレス(以下では「プリンタ10のWFD用IPアドレス」と呼ぶ)を決定する。また、G/O状態のプリンタ10は、クライアント状態の携帯端末8のIPアドレス(以下では「携帯端末8のWFD用IPアドレス」と呼ぶ)を決定して、携帯端末8のWFD用IPアドレスを携帯端末8に割り当てる。これにより、プリンタ10は、プリンタ10のWFD用IPアドレス(さらには、携帯端末8のWFD用IPアドレス)を利用して、印刷データ等の通信を携帯端末8と実行することができる。本実施例では、このようにして、IPアドレスを利用した通信を開始することが、携帯端末8とプリンタ10とを含むWFDネットワークを構築することを意味する。なお、WFDネットワークでも、IPv4のIPアドレスが利用される。   The device in the G / O state further functions as a DHCP server that assigns an IP address to the device in the client state. For example, the printer 10 in the G / O state determines the IP address of the printer 10 to be used in the WFD network (hereinafter referred to as “the WFD IP address of the printer 10”). Further, the printer 10 in the G / O state determines the IP address of the mobile terminal 8 in the client state (hereinafter referred to as “the WFD IP address of the mobile terminal 8”), and determines the WFD IP address of the mobile terminal 8. Assigned to the mobile terminal 8. Accordingly, the printer 10 can execute communication of print data and the like with the portable terminal 8 by using the WFD IP address of the printer 10 (and the WFD IP address of the portable terminal 8). In this embodiment, starting communication using an IP address in this way means that a WFD network including the mobile terminal 8 and the printer 10 is constructed. Note that an IPv4 IP address is also used in the WFD network.

なお、WFDネットワークに参加していないWFD対応機器(即ち、管理リストに登録されていない機器)が、デバイス状態の機器である。デバイス状態の機器は、WFDネットワークに参加するためのデータ(Probe Request信号、Probe Response信号等の物理層のデータ等)の無線通信を実行可能であるが、WFDネットワークを介して対象データ(印刷データ等)の無線通信を実行不可能である。   Note that a WFD compatible device that does not participate in the WFD network (that is, a device that is not registered in the management list) is a device in a device state. The device in the device state can execute wireless communication of data (physical layer data such as a probe request signal and a probe response signal) for participating in the WFD network, but the target data (print data) is transmitted via the WFD network. Etc.) cannot be performed.

(WFDネットワーク構築処理;図2)
図2を参照して、プリンタ10によって実行されるWFDネットワーク構築処理の内容を説明する。ユーザが予め決められているWFDネットワーク構築指示を操作部12に入力する場合に、制御部20は、図2のWFDネットワーク構築処理を開始する。
(WFD network construction processing; Fig. 2)
The contents of the WFD network construction process executed by the printer 10 will be described with reference to FIG. When the user inputs a predetermined WFD network construction instruction to the operation unit 12, the control unit 20 starts the WFD network construction process of FIG.

図2のフローチャートでは図示省略しているが、第1の構築部30は、WFDネットワーク構築指示がプリンタ10に入力される場合に、プリンタ10の周囲に存在するデバイス状態の各機器(例えば携帯端末8)を検索するためのSearch処理を実行する。さらに、第1の構築部30は、Search処理で見つかった各機器に関する情報(例えば、デバイス名、機種名、MACアドレス等)を含む機器リストを、表示部14に表示させる。プリンタ10のユーザは、機器リストの中から、プリンタ10との接続が確立されるべき機器を指定する。第1の構築部30は、ユーザの指示に従って、機器を選択する。以下では、携帯端末8が選択された場合を例として、説明を続ける。   Although not shown in the flowchart of FIG. 2, the first construction unit 30 receives each device in a device state around the printer 10 (for example, a portable terminal) when a WFD network construction instruction is input to the printer 10. 8) Search processing for searching is executed. Further, the first construction unit 30 causes the display unit 14 to display a device list including information (for example, device name, model name, MAC address, etc.) regarding each device found in the search process. The user of the printer 10 designates a device to be connected to the printer 10 from the device list. The first construction unit 30 selects a device according to a user instruction. Hereinafter, the description will be continued by taking the case where the mobile terminal 8 is selected as an example.

また、デバイス状態の携帯端末8は、WFDネットワーク構築指示が携帯端末8に入力される場合に、プリンタ10と同様に、Search処理を実行する。これにより、携帯端末8の表示部に、プリンタ10に関する情報を含む機器リストが表示される。携帯端末8のユーザは、機器リストの中から、携帯端末8との接続が確立されるべき機器を選択する。以下では、プリンタ10が選択された場合を例として、説明を続ける。   Further, the mobile terminal 8 in the device state executes the search process in the same manner as the printer 10 when a WFD network construction instruction is input to the mobile terminal 8. As a result, a device list including information related to the printer 10 is displayed on the display unit of the mobile terminal 8. The user of the mobile terminal 8 selects a device to be connected to the mobile terminal 8 from the device list. Hereinafter, the description will be continued by taking the case where the printer 10 is selected as an example.

S10では、第1の構築部30は、G/Oネゴシエーションを実行して、プリンタ10及び携帯端末8のうちの一方の機器をG/Oとして決定し、プリンタ10及び携帯端末8のうちの他方の機器をクライアントとして決定する。具体的に言うと、第1の構築部30は、まず、メモリ24に保存されているプリンタ10のIntent値を、携帯端末8に送信する。また、第1の構築部30は、携帯端末8に保存されている携帯端末8のIntent値を、携帯端末8から受信する。Intent値は、G/Oになるべき程度を示す設定値である。Intent値は、0〜15の数値範囲の中のいずれかの値である。Intent値が大きい程、G/Oになり易い。換言すると、Intent値が小さい程、クライアントになり易い。   In S10, the first construction unit 30 executes G / O negotiation, determines one of the printer 10 and the portable terminal 8 as G / O, and determines the other of the printer 10 and the portable terminal 8. Is determined as a client. Specifically, the first construction unit 30 first transmits the Intent value of the printer 10 stored in the memory 24 to the mobile terminal 8. Further, the first construction unit 30 receives the Intent value of the mobile terminal 8 stored in the mobile terminal 8 from the mobile terminal 8. The Intent value is a set value indicating the degree to which G / O should be achieved. The Intent value is any value within a numerical range of 0 to 15. The larger the Intent value, the more likely it is G / O. In other words, the smaller the Intent value, the easier it is to become a client.

例えば、CPU及びメモリの能力が比較的に高い機器(例えばPC)は、G/Oとして動作しながら、他の処理を高速で実行することができる。従って、このような機器には、通常、G/Oになり易いように、比較的に大きなIntent値が設定される。一方において、例えば、CPU及びメモリの能力が比較的に低い機器は、G/Oとして動作しながら、他の処理を高速で実行することができない可能性がある。従って、このような機器には、通常、G/Oになり難いように(即ち、クライアントになり易いように)、比較的に小さなIntent値が設定される。   For example, a device (for example, a PC) having relatively high CPU and memory capabilities can perform other processing at high speed while operating as a G / O. Therefore, a relatively large Intent value is usually set in such a device so that it is likely to be G / O. On the other hand, for example, a device having relatively low CPU and memory capabilities may not be able to execute other processes at high speed while operating as a G / O. Therefore, a relatively small Intent value is usually set in such a device so that it is difficult to become G / O (that is, easy to become a client).

本実施例では、プリンタ10のIntent値(即ちデフォルトのIntent値)として、「2」が利用される。プリンタ10は、通常、PC等と比べて、CPU及びメモリの能力が比較的に低い。このために、プリンタ10には、比較的に小さいデフォルトのIntent値が設定される。従って、S10では、第1の構築部30は、通常、プリンタ10のIntent値「2」を携帯端末8に送信する。ただし、詳しくは後述するが、図2のS34及び図4のS82が実行されると、プリンタ10のIntent値が「2」から「14」に変更される。従って、図2のS34及び図4のS82が実行された直後のS10では、第1の構築部30は、プリンタ10のIntent値「14」を携帯端末8に送信する。   In this embodiment, “2” is used as the Intent value (that is, the default Intent value) of the printer 10. The printer 10 usually has relatively low CPU and memory capabilities compared to a PC or the like. For this reason, a relatively small default Intent value is set in the printer 10. Accordingly, in S <b> 10, the first construction unit 30 normally transmits the Intent value “2” of the printer 10 to the mobile terminal 8. However, as will be described in detail later, when S34 in FIG. 2 and S82 in FIG. 4 are executed, the Intent value of the printer 10 is changed from “2” to “14”. Therefore, in S10 immediately after S34 in FIG. 2 and S82 in FIG. 4 are executed, the first construction unit 30 transmits the Intent value “14” of the printer 10 to the portable terminal 8.

S10では、第1の構築部30は、さらに、プリンタ10のIntent値と、携帯端末8のIntent値と、を比較して、G/O及びクライアントを決定する。例えば、プリンタ10のIntent値が、携帯端末8のIntent値よりも大きい場合には、第1の構築部30は、プリンタ10がG/Oになるべきことを決定すると共に、携帯端末8がクライアントになるべきことを決定する。また、例えば、プリンタ10のIntent値が、携帯端末8のIntent値よりも小さい場合には、第1の構築部30は、プリンタ10がクライアントになるべきことを決定すると共に、携帯端末8がG/Oになるべきことを決定する。なお、第1の構築部30は、プリンタ10のIntent値と、携帯端末8のIntent値と、が一致する場合には、プリンタ10のIntent値を変更し、変更後のIntent値を利用して、G/Oネゴシエーションを再び実行してもよいし、WFDネットワークを構築することができないことを示す情報を、表示部14に表示させてもよい。   In S <b> 10, the first construction unit 30 further compares the Intent value of the printer 10 with the Intent value of the mobile terminal 8 to determine G / O and a client. For example, when the Intent value of the printer 10 is larger than the Intent value of the mobile terminal 8, the first construction unit 30 determines that the printer 10 should be G / O and the mobile terminal 8 is the client. Decide what should be. For example, when the Intent value of the printer 10 is smaller than the Intent value of the mobile terminal 8, the first construction unit 30 determines that the printer 10 should be a client, and the mobile terminal 8 is G Decide what should be / O. Note that if the Intent value of the printer 10 and the Intent value of the mobile terminal 8 match, the first construction unit 30 changes the Intent value of the printer 10 and uses the changed Intent value. The G / O negotiation may be executed again, or information indicating that the WFD network cannot be constructed may be displayed on the display unit 14.

携帯端末8は、プリンタ10と同じ手法を利用して、プリンタ10のIntent値と携帯端末8のIntent値とに基づいて、G/O及びクライアントを決定する。S10のG/Oネゴシエーションが終了すると、S12に進む。   The portable terminal 8 determines the G / O and the client based on the Intent value of the printer 10 and the Intent value of the portable terminal 8 using the same method as the printer 10. When the G / O negotiation in S10 ends, the process proceeds to S12.

S12では、第1の構築部30は、WPS(Wi-Fi Protected Setup)ネゴシエーションを実行して、携帯端末8とのWFD接続を確立する。なお、プリンタ10がG/Oになるべきことが決定された場合には、第1の構築部30は、G/O状態用のWPSネゴシエーションを実行する。一方において、プリンタ10がクライアントになるべきことが決定された場合には、第1の構築部30は、クライアント状態用のWPSネゴシエーションを実行する。   In S <b> 12, the first construction unit 30 performs WPS (Wi-Fi Protected Setup) negotiation to establish a WFD connection with the mobile terminal 8. If it is determined that the printer 10 should be G / O, the first construction unit 30 executes WPS negotiation for the G / O state. On the other hand, when it is determined that the printer 10 should be a client, the first construction unit 30 executes WPS negotiation for the client state.

(G/O状態用のWPSネゴシエーション)
G/O状態用のWPSネゴシエーションでは、第1の構築部30は、WFD接続を確立するために必要な無線プロファイル(SSID、認証方式、暗号化方式、パスワード等)を示すデータを生成する。なお、認証方式及び暗号化方式は、予め決められている。また、第1の構築部30は、S12の処理の際にパスワードを生成する。なお、SSIDは、S12の処理の際に、第1の構築部30によって生成されてもよいし、予め決められていてもよい。続いて、第1の構築部30は、無線プロファイルを示すデータを、携帯端末8に送信する。
(WPS negotiation for G / O state)
In the WPS negotiation for the G / O state, the first construction unit 30 generates data indicating a wireless profile (SSID, authentication method, encryption method, password, etc.) necessary for establishing a WFD connection. Note that the authentication method and the encryption method are determined in advance. In addition, the first construction unit 30 generates a password during the process of S12. The SSID may be generated by the first construction unit 30 during the process of S12 or may be determined in advance. Subsequently, the first construction unit 30 transmits data indicating the wireless profile to the mobile terminal 8.

無線プロファイルがプリンタ10から携帯端末8に送信されることにより、プリンタ10及び携帯端末8が同じ無線プロファイルを利用することができる。第1の構築部30は、無線プロファイルを利用して、Authentication Request、Authentication Response、Association Request、Association Response、及び、4way handshakeの無線通信(以下では「特定の無線通信」と呼ぶ)を、携帯端末8と実行する。上記の特定の無線通信の過程で、SSIDの認証、認証方式及び暗号化方式の認証、パスワードの認証等の様々な認証処理が実行される。全ての認証が成功した場合に、プリンタ10及び携帯端末8の間にWFD接続が確立される。なお、第1の構築部30は、携帯端末8の識別情報(即ち、携帯端末8のMACアドレス)を管理リストに追加する。   By transmitting the wireless profile from the printer 10 to the portable terminal 8, the printer 10 and the portable terminal 8 can use the same wireless profile. The first construction unit 30 uses a wireless profile to perform authentication communication, authentication response, association request, association response, and 4-way handshake wireless communication (hereinafter referred to as “specific wireless communication”) using a wireless terminal. 8 is executed. In the process of the specific wireless communication, various authentication processes such as SSID authentication, authentication method and encryption method authentication, and password authentication are executed. When all the authentications are successful, a WFD connection is established between the printer 10 and the portable terminal 8. The first construction unit 30 adds the identification information of the mobile terminal 8 (that is, the MAC address of the mobile terminal 8) to the management list.

(クライアント状態用のWPSネゴシエーション)
一方において、クライアント状態用のWPSネゴシエーションでは、第1の構築部30は、無線プロファイルを示すデータを、携帯端末8から受信する。次いで、第1の構築部30は、無線プロファイルを利用して、上記の特定の無線通信を、携帯端末8と実行する。これにより、プリンタ10及び携帯端末8の間にWFD接続が確立される。なお、携帯端末8は、プリンタ10の識別情報(即ち、プリンタ10のMACアドレス)を管理リストに追加する。S12のWPSネゴシエーションが終了すると、S14に進む。
(WPS negotiation for client state)
On the other hand, in the WPS negotiation for the client state, the first construction unit 30 receives data indicating the wireless profile from the mobile terminal 8. Next, the first construction unit 30 executes the specific wireless communication with the mobile terminal 8 using the wireless profile. Thereby, a WFD connection is established between the printer 10 and the portable terminal 8. The portable terminal 8 adds the identification information of the printer 10 (that is, the MAC address of the printer 10) to the management list. When the WPS negotiation in S12 ends, the process proceeds to S14.

S14では、第1の構築部30は、非WFDネットワークが構築中であるのか否かを判断する。非WFDネットワークが構築中である場合(S14でYESの場合)には、S24に進み、非WFDネットワークが構築中でない場合(S14でNOの場合)には、S16に進む。   In S14, the first construction unit 30 determines whether or not a non-WFD network is being constructed. If a non-WFD network is being constructed (YES in S14), the process proceeds to S24. If a non-WFD network is not being constructed (NO in S14), the process proceeds to S16.

S16では、第1の構築部30は、プリンタ10の現在の状態が、G/O状態であるのか、クライアント状態であるのか、を判断する。プリンタ10の現在の状態がG/O状態である場合(S16でYESの場合)には、S18に進み、プリンタ10の現在の状態がクライアント状態である場合(S16でNOの場合)には、S22に進む。   In S <b> 16, the first construction unit 30 determines whether the current state of the printer 10 is the G / O state or the client state. If the current state of the printer 10 is the G / O state (YES in S16), the process proceeds to S18. If the current state of the printer 10 is the client state (NO in S16), Proceed to S22.

上述したように、G/O状態のプリンタ10は、DHCPサーバとして機能する。従って、S18では、決定部34は、プリンタ10のWFD用IPアドレスとして、予め準備されているデフォルトのIPアドレス(例えば192.168.1.1)を決定する。S18では、さらに、決定部34は、WFDネットワークで利用されるべきサブネットマスク(以下では「WFD用サブネットマスク」)を決定する。WFD用サブネットマスクも、予め準備されているデフォルトのサブネットマスク(例えば255.255.255.0)である。S18では、さらに、決定部34は、プリンタ10のDHCPサーバが割り当て可能なIPアドレスの範囲を決定する。ここで決定されるアドレス範囲も、予め準備されているデフォルトのアドレス範囲(例えば192.168.1.2-16)である。S18では、さらに、決定部34は、携帯端末8のWFD用IPアドレスとして、上記のアドレス範囲に含まれる1個のIPアドレス(例えば192.168.1.2)を決定する。   As described above, the printer 10 in the G / O state functions as a DHCP server. Accordingly, in S18, the determination unit 34 determines a default IP address (for example, 192.168.1.1) prepared in advance as the WFD IP address of the printer 10. In S18, the determination unit 34 further determines a subnet mask to be used in the WFD network (hereinafter referred to as “WFD subnet mask”). The subnet mask for WFD is also a default subnet mask (for example, 255.255.255.0) prepared in advance. In S <b> 18, the determination unit 34 further determines a range of IP addresses that can be assigned by the DHCP server of the printer 10. The address range determined here is also a default address range (for example, 192.168.1.2-16) prepared in advance. In S <b> 18, the determination unit 34 further determines one IP address (for example, 192.168.1.2) included in the address range as the WFD IP address of the mobile terminal 8.

次いで、S20において、決定部34は、S18で決定された携帯端末8のWFD用IPアドレス(さらにはプリンタ10のWFD用IPアドレス)と、S18で決定されたWFD用サブネットマスクと、を携帯端末8に通知(即ち送信)する。即ち、決定部34は、携帯端末8のWFD用IPアドレスを携帯端末8に割り当てる。これにより、第1の構築部30は、プリンタ10のWFD用IPアドレス(さらには携帯端末8のWFD用IPアドレス)を利用して、携帯端末8と無線通信を開始する。即ち、第1の構築部30は、携帯端末8とプリンタ10とを含むWFDネットワークを構築する。この結果、G/O状態のプリンタ10(即ち第1の構築部30)は、OSI参照モデルの物理層よりも上位層であるネットワーク層のデータを含む対象データ(印刷データ等)の通信を、クライアント状態の携帯端末8と実行する。なお、G/O状態のプリンタ10(即ち第1の構築部30)は、クライアント状態の携帯端末8と、管理リストに登録されているクライアント状態の他の機器と、の間の無線通信を中継することができる。S20が終了すると、図2のWFDネットワーク構築処理が終了する。   Next, in S20, the determination unit 34 displays the WFD IP address of the mobile terminal 8 determined in S18 (and the WFD IP address of the printer 10) and the WFD subnet mask determined in S18. 8 is notified (ie, transmitted). That is, the determination unit 34 assigns the WFD IP address of the mobile terminal 8 to the mobile terminal 8. As a result, the first construction unit 30 starts wireless communication with the mobile terminal 8 by using the WFD IP address of the printer 10 (and the WFD IP address of the mobile terminal 8). That is, the first construction unit 30 constructs a WFD network including the mobile terminal 8 and the printer 10. As a result, the printer 10 (that is, the first construction unit 30) in the G / O state performs communication of target data (print data or the like) including data of the network layer that is higher than the physical layer of the OSI reference model. Execute with the mobile terminal 8 in the client state. The printer 10 in the G / O state (that is, the first construction unit 30) relays wireless communication between the mobile terminal 8 in the client state and other devices in the client state registered in the management list. can do. When S20 ends, the WFD network construction process in FIG. 2 ends.

なお、S16でNOの場合(即ち、プリンタ10の現在の状態がクライアント状態である場合)には、G/O状態の携帯端末8がDHCPサーバとして機能する。従って、携帯端末8は、プリンタ10のWFD用IPアドレスと、WFD用サブネットマスクと、を決定する。S22では、取得部36は、携帯端末8から、プリンタ10のWFD用IPアドレス(さらには携帯端末8のWFD用IPアドレス)と、WFD用サブネットマスクと、を取得する。これにより、第1の構築部30は、プリンタ10のWFD用IPアドレス(さらには携帯端末8のWFD用IPアドレス)を利用して、携帯端末8と無線通信を開始する。即ち、第1の構築部30は、携帯端末8とプリンタ10とを含むWFDネットワークを構築する。S22が終了すると、図2のWFDネットワーク構築処理が終了する。   If NO in S16 (that is, if the current state of the printer 10 is the client state), the mobile terminal 8 in the G / O state functions as a DHCP server. Accordingly, the mobile terminal 8 determines the WFD IP address of the printer 10 and the WFD subnet mask. In S <b> 22, the acquisition unit 36 acquires the WFD IP address of the printer 10 (and the WFD IP address of the mobile terminal 8) and the WFD subnet mask from the mobile terminal 8. As a result, the first construction unit 30 starts wireless communication with the mobile terminal 8 by using the WFD IP address of the printer 10 (and the WFD IP address of the mobile terminal 8). That is, the first construction unit 30 constructs a WFD network including the mobile terminal 8 and the printer 10. When S22 ends, the WFD network construction process in FIG. 2 ends.

一方において、S14でYESの場合(即ち、非WFDネットワークが構築中である場合)には、S24において、第1の構築部30は、プリンタ10の現在の状態が、G/O状態であるのか、クライアント状態であるのか、を判断する。プリンタ10の現在の状態がG/O状態である場合(S24でYESの場合)には、S26に進み、プリンタ10の現在の状態がクライアント状態である場合(S24でNOの場合)には、S28に進む。   On the other hand, if YES in S14 (that is, if a non-WFD network is being constructed), in S24, the first construction unit 30 determines whether the current state of the printer 10 is the G / O state. , It is determined whether the client state. If the current state of the printer 10 is the G / O state (YES in S24), the process proceeds to S26. If the current state of the printer 10 is the client state (NO in S24), Proceed to S28.

(IPアドレス動的決定処理;図3)
S26では、決定部34は、IPアドレス動的決定処理を実行する。図3に示されるように、S50において、決定部34は、非WFDネットワークで現在利用されているサブネットマスク(以下では「非WFD用サブネットマスク」と呼ぶ)のマスク部分の桁数が、図2のS18で利用されるデフォルトのサブネットマスクのマスク部分の桁数以上であるのか否かを判断する。例えば、非WFD用サブネットマスクが「255.255.0.0」である場合には、非WFD用サブネットマスクのマスク部分の桁数は、16ビット(255.255)に相当する桁数である。また、例えば、デフォルトのサブネットマスクが「255.255.255.0」である場合には、デフォルトのサブネットマスクのマスク部分の桁数は、24ビット(255.255.255)に相当する桁数である。
(IP address dynamic decision processing; FIG. 3)
In S26, the determination unit 34 executes an IP address dynamic determination process. As shown in FIG. 3, in S50, the determination unit 34 determines that the number of digits of the mask portion of the subnet mask currently used in the non-WFD network (hereinafter referred to as “non-WFD subnet mask”) is as shown in FIG. It is determined whether or not the number of digits of the mask portion of the default subnet mask used in S18 is equal to or greater than that. For example, when the non-WFD subnet mask is “255.255.0.0”, the number of digits of the mask portion of the non-WFD subnet mask is the number of digits corresponding to 16 bits (255.255). For example, when the default subnet mask is “255.255.255.0”, the number of digits in the mask portion of the default subnet mask is the number of digits corresponding to 24 bits (255.255.255).

非WFD用サブネットマスクのマスク部分の桁数が、デフォルトのサブネットマスクのマスク部分の桁数以上である場合(S50でYESの場合)には、S52において、決定部34は、決定用サブネットマスクとして、デフォルトのサブネットマスクを決定する。一方において、非WFD用サブネットマスクのマスク部分の桁数が、デフォルトのサブネットマスクのマスク部分の桁数よりも小さい場合(S50でNOの場合)には、S54において、決定部34は、決定用サブネットマスクとして、非WFD用サブネットマスクを決定する。即ち、S50〜S54において、決定部34は、非WFD用サブネットマスクとデフォルトのサブネットマスクとのうち、マスク部分の桁数が少ないサブネットマスクを、決定用サブネットマスクとして決定する。   When the number of digits in the mask portion of the non-WFD subnet mask is equal to or greater than the number of digits in the mask portion of the default subnet mask (in the case of YES in S50), in S52, the determination unit 34 sets the determination subnet mask as the determination subnet mask. Determine the default subnet mask. On the other hand, when the number of digits of the mask portion of the non-WFD subnet mask is smaller than the number of digits of the mask portion of the default subnet mask (NO in S50), the determination unit 34 determines for determination in S54. A non-WFD subnet mask is determined as the subnet mask. That is, in S50 to S54, the determination unit 34 determines a subnet mask having a smaller number of digits in the mask portion, as a determination subnet mask, from the non-WFD subnet mask and the default subnet mask.

S52又はS54が終了すると、S56において、決定部34は、非WFDネットワークで現在利用されているプリンタ10の非WFD用IPアドレスのうち、決定用サブネットマスクによってマスクされている値を算出する。第1の例では、プリンタ10の非WFD用IPアドレスが「192.168.1.2」であり、S52で決定された決定用サブネットマスクが「255.255.255.0」である。この場合、S56では、決定部34は、「192.168.1」を算出する。また、第2の例では、プリンタ10の非WFD用IPアドレスが「192.168.1.2」であり、S54で決定された決定用サブネットマスクが「255.255.0.0」である。この場合、S56では、決定部34は、「192.168」を算出する。   When S52 or S54 ends, in S56, the determination unit 34 calculates a value masked by the determination subnet mask among the non-WFD IP addresses of the printer 10 currently used in the non-WFD network. In the first example, the non-WFD IP address of the printer 10 is “192.168.1.2”, and the determination subnet mask determined in S52 is “255.255.255.0”. In this case, in S56, the determination unit 34 calculates “192.168.1”. In the second example, the non-WFD IP address of the printer 10 is “192.168.1.2”, and the determination subnet mask determined in S54 is “255.255.0.0”. In this case, in S56, the determination unit 34 calculates “192.168”.

次いで、S58において、決定部34は、S56で算出された値とは異なる値(ただしS56で算出された値と同じ桁数を有する値)を決定する。上記の第1の例では、S58おいて、決定部34は、例えば、「192.169.1」を決定する。なお、この例では、9〜16ビット目の値が変更されているが、1〜8ビット目の値が変更されてもよいし(例えば「193.168.1」)、17〜24ビット目の値が変更されてもよい(例えば「192.168.2」)。また、上記の第2の例では、S58において、決定部34は、例えば、「192.169」を決定する。なお、この例では、9〜16ビット目の値が変更されているが、1〜8ビット目の値が変更されてもよい(例えば「193.168」)。   Next, in S58, the determination unit 34 determines a value different from the value calculated in S56 (however, a value having the same number of digits as the value calculated in S56). In the first example, in S58, the determination unit 34 determines, for example, “192.169.1”. In this example, the value of the 9th to 16th bits is changed, but the value of the 1st to 8th bits may be changed (for example, “193.168.1”), or the value of the 17th to 24th bits. May be changed (for example, “192.168.2”). In the second example, the determination unit 34 determines, for example, “192.169” in S58. In this example, the value of the 9th to 16th bits is changed, but the value of the 1st to 8th bits may be changed (for example, “193.168”).

次いで、S60において、決定部34は、プリンタ10のWFD用IPアドレスとしてS58で算出された値を含むIPアドレスを決定する。上記の第1の例では、S60において、決定部34は、例えば、「192.169.1」を含むIPアドレス「192.169.1.1」を決定する。また、上記の第2の例では、S60において、決定部34は、例えば、「192.169」を含むIPアドレス「192.169.1.1」を決定する。なお、図2のS18と同様に、S60では、決定部34は、WFD用サブネットマスクとして、デフォルトのサブネットマスク(例えば「255.255.255.0」)を決定する。S60では、決定部34は、さらに、プリンタ10のDHCPサーバが割り当て可能なIPアドレスの範囲を決定する。具体的には、決定部34は、プリンタ10のWFD用IPアドレス(例えば「192.169.1.1」)のうち、デフォルトのサブネットマスクでマスクされているネットワークアドレス(例えば「192.169.1」)を算出する。そして、決定部34は、ネットワークアドレス(例えば「192.169.1」)を含むアドレス範囲であって、プリンタ10のWFD用IPアドレス(例えば「192.169.1.1」)を含まないアドレス範囲(例えば「192.169.1.2-16」)を決定する。S60では、決定部34は、さらに、携帯端末8のWFD用IPアドレスとして、上記のアドレス範囲に含まれる1個のIPアドレス(例えば192.169.1.2)を決定する。   Next, in S <b> 60, the determination unit 34 determines an IP address including the value calculated in S <b> 58 as the WFD IP address of the printer 10. In the first example, in S60, the determination unit 34 determines, for example, the IP address “192.169.1.1” including “192.169.1”. In the second example, the determination unit 34 determines, for example, the IP address “192.169.1.1” including “192.169” in S60. 2, in S60, the determination unit 34 determines a default subnet mask (for example, “255.255.255.0”) as the WFD subnet mask. In S60, the determination unit 34 further determines an IP address range that can be assigned by the DHCP server of the printer 10. Specifically, the determination unit 34 calculates a network address (for example, “192.169.1”) masked by a default subnet mask among the WFD IP addresses (for example, “192.169.1.1”) of the printer 10. . Then, the determination unit 34 is an address range that includes the network address (for example, “192.169.1”) and does not include the WFD IP address (for example, “192.169.1.1”) of the printer 10 (for example, “192.169.”). 1.2-16 ”). In S60, the determination unit 34 further determines one IP address (for example, 192.169.1.2) included in the address range as the WFD IP address of the mobile terminal 8.

なお、図3のS50〜S54において、マスク部分の桁数が少ないサブネットマスクを決定用サブネットマスクとして利用するのは、以下の理由である。例えば、プリンタ10の非WFD用IPアドレスが「192.168.1.4」であり、非WFD用サブネットマスクが「255.255.255.0」である状況を想定する。即ち、非WFDネットワークで利用可能なIPアドレスの範囲が「192.168.1.1-255」である状況を想定する。なお、上記と同様に、WFD用サブネットマスク(即ちデフォルトのサブネットマスク)は、「255.255.0.0」である。   In S50 to S54 of FIG. 3, the reason why the subnet mask having a smaller number of digits in the mask portion is used as the determination subnet mask is as follows. For example, it is assumed that the non-WFD IP address of the printer 10 is “192.168.1.4” and the non-WFD subnet mask is “255.255.255.0”. That is, a situation is assumed in which the range of IP addresses that can be used in the non-WFD network is “192.168.1.1-255”. Similarly to the above, the WFD subnet mask (that is, the default subnet mask) is “255.255.0.0”.

上記の状況において、仮に、プリンタ10が、非WFD用IPアドレス「192.168.1.4」と、マスク部分の桁数が大きい非WFD用サブネットマスク「255.255.255.0」と、を利用して、S56及びS58を実行すると、S56で「192.168.1」を算出し、S58で「192.168.2」を決定し得る。この場合、プリンタ10は、プリンタ10のDHCPサーバが割り当て可能なIPアドレスの範囲として、例えば、算出済みの「192.168.2」のうち、WFD用サブネットマスク「255.255.0.0」でマスクされているネットワークアドレス「192.168」を含むアドレス範囲(例えば「192.168.1-255.1-255」)を決定し得る。この場合、WFDネットワークで利用可能なIPアドレスの範囲「192.168.1-255.1-255」と、非WFDネットワークで利用可能なIPアドレスの範囲「192.168.1.1-255」と、が重複してしまう。従って、非WFDネットワークで利用可能なIPアドレスの範囲「192.168.1.1-255」に含まれるIPアドレス(例えば「192.168.1.5」)が、携帯端末8のIPアドレスとして決定され得る。   In the above situation, if the printer 10 uses the non-WFD IP address “192.168.1.4” and the non-WFD subnet mask “255.255.255.0” having a large number of digits in the mask portion, S56 and S58 are used. Is executed, “192.168.1” is calculated in S56, and “192.168.2” can be determined in S58. In this case, the printer 10 uses, for example, a network that is masked by the WFD subnet mask “255.255.0.0” in the calculated “192.168.2” as the range of IP addresses that can be assigned by the DHCP server of the printer 10. An address range including the address “192.168” (eg, “192.168.1-255.1-255”) may be determined. In this case, the IP address range “192.168.1-255.1-255” that can be used in the WFD network overlaps with the IP address range “192.168.1.1-255” that can be used in the non-WFD network. Accordingly, an IP address (for example, “192.168.1.5”) included in the IP address range “192.168.1.1-255” that can be used in the non-WFD network can be determined as the IP address of the mobile terminal 8.

上記の事象が発生すると、プリンタ10は、例えば、IPアドレス「192.168.1.5」を送信先として携帯端末8にデータを送信すべき際に、WFDネットワーク及び非WFDネットワークのうちのどちらのネットワークにデータを送信すればよいのかを適切に判断することができず、この結果、データ通信を適切に実行することができない。また、プリンタ10は、例えば、IPアドレス「192.168.1.6」を送信先としてPC6にデータを送信すべき際に、どちらのネットワークにデータを送信すればよいのかを適切に判断することができず、この結果、データを適切に送信することができない。このような事象が発生するのを抑制するために、本実施例のプリンタ10は、マスク部分の桁数が少ないサブネットマスクを決定用サブネットマスクとして利用して、非WFDネットワークで利用可能なIPアドレスの範囲と、WFDネットワークで利用可能なIPアドレスの範囲と、が重複しないように、IPアドレス割当機能(即ちDHCPサーバ機能)を実行する。従って、プリンタ10は、携帯端末8のWFD用IPアドレス(さらにはプリンタ10のWFD用IPアドレス)を適切に決定することができる。この結果、プリンタ10は、WFDネットワークを利用して、携帯端末8にデータを適切に送信することができ、非WFDネットワークを利用して、AP4を介してPC6にデータを適切に送信することができる。   When the above event occurs, for example, when the printer 10 should transmit data to the portable terminal 8 with the IP address “192.168.1.5” as the transmission destination, the data is transmitted to either the WFD network or the non-WFD network. Therefore, it is not possible to appropriately determine whether or not to transmit the data, and as a result, the data communication cannot be appropriately performed. Further, for example, when the printer 10 is to transmit data to the PC 6 with the IP address “192.168.1.6” as the transmission destination, the printer 10 cannot appropriately determine which network the data should be transmitted to. As a result, data cannot be transmitted appropriately. In order to suppress the occurrence of such an event, the printer 10 of this embodiment uses an IP address that can be used in a non-WFD network by using a subnet mask having a small number of digits in the mask portion as a determining subnet mask. The IP address allocation function (that is, the DHCP server function) is executed so that the IP address range and the IP address range that can be used in the WFD network do not overlap. Therefore, the printer 10 can appropriately determine the WFD IP address of the mobile terminal 8 (and also the WFD IP address of the printer 10). As a result, the printer 10 can appropriately transmit data to the portable terminal 8 using the WFD network, and can appropriately transmit data to the PC 6 via the AP 4 using the non-WFD network. it can.

S60が終了すると、図3のIPアドレス動的決定処理(図2のS26)が終了する。この場合、図2のS20に進み、上記と同様に、決定部34は、携帯端末8のWFD用IPアドレスを携帯端末8に割り当てる。従って、第1の構築部30は、S26で決定されたプリンタ10のWFD用IPアドレス(さらには携帯端末8のWFD用IPアドレス)を利用して、携帯端末8と通信を開始する(即ち、WFDネットワークを構築する)。非WFDネットワークが既に構築されているために、WFDネットワークと非WFDネットワークとの両方が構築されている状態が形成される。   When S60 ends, the IP address dynamic determination process of FIG. 3 (S26 of FIG. 2) ends. In this case, the process proceeds to S <b> 20 in FIG. 2, and the determination unit 34 assigns the WFD IP address of the mobile terminal 8 to the mobile terminal 8 as described above. Therefore, the first construction unit 30 starts communication with the mobile terminal 8 by using the WFD IP address of the printer 10 determined in S26 (and also the WFD IP address of the mobile terminal 8) (that is, the first construction unit 30). Build a WFD network). Since the non-WFD network has already been established, a state is formed in which both the WFD network and the non-WFD network are established.

一方において、図2のS24でNOの場合(即ち、プリンタ10の現在の状態がクライアント状態である場合)には、携帯端末8がDHCPサーバとして機能する。このために、決定部34は、S26のIPアドレス動的決定処理を実行しない。この場合、S28において、取得部36は、携帯端末8から、プリンタ10のWFD用IPアドレス(さらには携帯端末8のWFD用IPアドレス)と、WFD用サブネットマスクと、を取得する。   On the other hand, in the case of NO in S24 of FIG. 2 (that is, when the current state of the printer 10 is the client state), the portable terminal 8 functions as a DHCP server. For this reason, the determination unit 34 does not execute the IP address dynamic determination process of S26. In this case, in S28, the acquisition unit 36 acquires the WFD IP address of the printer 10 (and the WFD IP address of the mobile terminal 8) and the WFD subnet mask from the mobile terminal 8.

次いで、S30において、第1の判断部38は、S28で取得されたプリンタ10のWFD用IPアドレスが、非WFDネットワークで利用可能なIPアドレスの範囲に含まれるのか否かを判断する。具体的に言うと、第1の判断部38は、まず、図3のS50〜S54と同様に、決定用サブネットマスク(例えば「255.255.0.0」)を決定する。次いで、第1の判断部38は、S28で取得されたプリンタ10のWFD用IPアドレス(例えば「192.168.1.4」)のうち、決定用サブネットマスクでマスクされている部分の値(例えば「192.168」)を算出する。第1の判断部38は、さらに、プリンタ10の非WFD用IPアドレス(例えば「192.168.1.2」)のうち、決定用サブネットマスクでマスクされている部分の値(例えば「192.168」)を算出する。第1の判断部38は、算出済みの2個の値が一致しない場合に、プリンタ10のWFD用IPアドレスが上記の範囲に含まれない(S30でNO)と判断してS32に進み、算出済みの2個の値が一致する場合に、プリンタ10のWFD用IPアドレスが上記の範囲に含まれる(S30でYES)と判断してS34に進む。   Next, in S <b> 30, the first determination unit 38 determines whether the WFD IP address of the printer 10 acquired in S <b> 28 is included in the range of IP addresses that can be used in the non-WFD network. Specifically, the first determination unit 38 first determines a determination subnet mask (for example, “255.255.0.0”) as in S50 to S54 of FIG. Next, the first determination unit 38 determines the value (for example, “192.168”) of the portion masked by the determination subnet mask in the WFD IP address (for example, “192.168.1.4”) of the printer 10 acquired in S28. ) Is calculated. The first determination unit 38 further calculates the value (for example, “192.168”) of the non-WFD IP address (for example, “192.168.1.2”) of the printer 10 that is masked by the determination subnet mask. . If the two calculated values do not match, the first determination unit 38 determines that the WFD IP address of the printer 10 is not included in the above range (NO in S30), and proceeds to S32 for calculation. When the two already-matched values match, it is determined that the WFD IP address of the printer 10 is included in the above range (YES in S30), and the process proceeds to S34.

S32では、第1の構築部30は、WFDネットワークで利用されるプリンタ10のIPアドレスとして、S28で取得されたプリンタ10のWFD用IPアドレスを採用する。即ち、第1の構築部30は、S28で取得されたプリンタ10のWFD用IPアドレスを利用して、携帯端末8と通信を開始する(即ち、WFDネットワークを構築する)。非WFDネットワークが既に構築されているために、WFDネットワークと非WFDネットワークとの両方が構築されている状態が形成される。   In S32, the first construction unit 30 employs the WFD IP address of the printer 10 acquired in S28 as the IP address of the printer 10 used in the WFD network. That is, the first construction unit 30 starts communication with the mobile terminal 8 using the WFD IP address of the printer 10 acquired in S28 (that is, constructs a WFD network). Since the non-WFD network has already been established, a state is formed in which both the WFD network and the non-WFD network are established.

一方において、S34では、第1の構築部30は、WFDネットワークで利用されるプリンタ10のIPアドレスとして、S28で取得されたプリンタ10のWFD用IPアドレスを採用しない。S34では、さらに、変更部42は、プリンタ10のIntent値を「2」から「14」に変更する。なお、変形例では、変更部42は、プリンタ10のIntent値を「14」とは異なる数値(例えば「13」、「15」等)に変更してもよい。即ち、変更部42は、プリンタ10のIntent値を、デフォルトのIntent値「2」よりも増加させればよい(この点は、後述の図4のS82でも同様である)。   On the other hand, in S34, the first construction unit 30 does not adopt the WFD IP address of the printer 10 acquired in S28 as the IP address of the printer 10 used in the WFD network. In S <b> 34, the changing unit 42 further changes the Intent value of the printer 10 from “2” to “14”. In the modification, the changing unit 42 may change the Intent value of the printer 10 to a numerical value different from “14” (for example, “13”, “15”, etc.). That is, the change unit 42 may increase the Intent value of the printer 10 beyond the default Intent value “2” (this is the same in S82 of FIG. 4 described later).

S34が実行されることにより、次回のG/Oネゴシエーション(S10)では、プリンタ10のIntent値として「14」が利用される。なお、フローチャートには示していないが、変更部42は、プリンタ10のIntent値が「2」から「14」に変更された後に、1回のG/Oネゴシエーションが実行されると、プリンタ10のIntent値を「14」から「2」に戻す。S34では、さらに、第1の構築部30は、プリンタ10の状態をクライアント状態からデバイス状態に変更する。従って、プリンタ10と携帯端末8との間のWFD接続(即ち、S12のWPSネゴシエーションで確立されたWFD接続)が切断される。この結果、非WFDネットワークのみが構築されている状態が形成される。   By executing S34, “14” is used as the Intent value of the printer 10 in the next G / O negotiation (S10). Although not shown in the flowchart, the changing unit 42 performs a G / O negotiation once after the Intent value of the printer 10 is changed from “2” to “14”. The Intent value is returned from “14” to “2”. In S34, the first construction unit 30 further changes the state of the printer 10 from the client state to the device state. Accordingly, the WFD connection between the printer 10 and the portable terminal 8 (that is, the WFD connection established by the WPS negotiation in S12) is disconnected. As a result, a state in which only the non-WFD network is constructed is formed.

なお、S34において、プリンタ10が、非WFDネットワークを切断して、WFDネットワークを構築する構成を採用することが考えられる。しかしながら、上述したように、非WFDネットワークは、定常的に構築されるべきネットワークであり、このようなネットワークが切断されると、PC6のユーザは、プリンタ10に印刷を実行させることができなくなる。このような事象が発生するのを抑制するために、本実施例では、S34において、現在構築されている非WFDネットワークを維持して、WFDネットワークを構築しない構成を採用している。即ち、本実施例では、一時的に構築されるべきWFDネットワークではなく、定常的に構築されるべき非WFDネットワークを優先する構成を採用している。S34が終了すると、図2のWFDネットワーク構築処理が終了する。   In S34, it is conceivable that the printer 10 adopts a configuration in which a non-WFD network is disconnected and a WFD network is constructed. However, as described above, the non-WFD network is a network that should be constantly constructed. When such a network is disconnected, the user of the PC 6 cannot cause the printer 10 to execute printing. In order to suppress the occurrence of such an event, in this embodiment, a configuration is adopted in which a non-WFD network that is currently constructed is maintained and a WFD network is not constructed in S34. That is, in the present embodiment, a configuration is adopted in which priority is given to a non-WFD network that is to be constructed steadily rather than a WFD network that is to be constructed temporarily. When S34 ends, the WFD network construction process in FIG. 2 ends.

(非WFDネットワーク構築処理;図4)
続いて、図4を参照して、プリンタ10によって実行される非WFDネットワーク構築処理の内容を説明する。ユーザが予め決められている非WFDネットワーク構築指示を操作部12に入力する場合に、制御部20は、図4の非WFDネットワーク構築処理を開始する。
(Non-WFD network construction processing; Fig. 4)
Next, the contents of the non-WFD network construction process executed by the printer 10 will be described with reference to FIG. When the user inputs a predetermined non-WFD network construction instruction to the operation unit 12, the control unit 20 starts the non-WFD network construction processing of FIG.

図4のフローチャートでは図示省略しているが、第2の構築部32は、非WFDネットワーク構築指示がプリンタ10に入力される場合に、プリンタ10の周囲に存在する各APを検索するためのScan処理を実行する。次いで、第2の構築部32は、Scan処理で見つかった各APに関する情報(例えば、SSID等)を含むAPリストを、表示部14に表示させる。プリンタ10のユーザは、APリストの中から、プリンタ10との接続が確立されるべきAPを指定する。第2の構築部32は、ユーザの指示に従って、APを選択する。以下では、AP4が選択された場合を例として、説明を続ける。   Although not shown in the flowchart of FIG. 4, the second construction unit 32 scans each AP existing around the printer 10 when a non-WFD network construction instruction is input to the printer 10. Execute the process. Next, the second construction unit 32 causes the display unit 14 to display an AP list including information (for example, SSID etc.) regarding each AP found in the Scan process. The user of the printer 10 designates an AP with which a connection with the printer 10 should be established from the AP list. The second construction unit 32 selects an AP according to a user instruction. Hereinafter, the description will be continued by taking the case where AP4 is selected as an example.

第2の構築部32は、第1の構築部30とは異なり、G/Oネゴシエーションを実行しない。S70において、第2の構築部32は、認証のための通信をAP4と実行する。ここで実行される通信では、第2の構築部32は、認証方式、暗号化方式、パスワード等のデータを、AP4に送信する。これにより、AP4は、認証方式、暗号化方式、パスワード等の認証を実行して、認証が成功すれば、認証成功を示すデータを、プリンタ10に送信する。これにより、プリンタ10とAP4との間に非WFD接続が確立される。   Unlike the first construction unit 30, the second construction unit 32 does not perform G / O negotiation. In S70, the second construction unit 32 performs communication for authentication with the AP 4. In the communication executed here, the second construction unit 32 transmits data such as an authentication method, an encryption method, and a password to the AP 4. As a result, the AP 4 executes authentication such as an authentication method, an encryption method, and a password, and transmits data indicating the authentication success to the printer 10 if the authentication is successful. Thereby, a non-WFD connection is established between the printer 10 and the AP 4.

上述したように、本実施例では、AP4がDHCPサーバとして機能する。AP4は、プリンタ10の非WFD用IPアドレスと、非WFD用サブネットマスクと、を決定する。S72では、第2の構築部32は、プリンタ10の非WFD用IPアドレス(さらにはAP4の非WFD用IPアドレス)と、非WFD用サブネットマスクと、をAP4から取得する。   As described above, in this embodiment, the AP 4 functions as a DHCP server. The AP 4 determines the non-WFD IP address of the printer 10 and the non-WFD subnet mask. In S72, the second construction unit 32 acquires the non-WFD IP address of the printer 10 (and the non-WFD IP address of AP4) and the non-WFD subnet mask from the AP4.

次いで、S74において、第2の構築部32は、プリンタ10の非WFD用IPアドレス(さらにはAP4の非WFD用IPアドレス)を利用して、AP4と無線通信を開始する。即ち、第2の構築部32は、AP4とプリンタ10とを含む非WFDネットワークを構築する。PC6がAP4に非WFD接続されている場合には、プリンタ10は、AP4を介してPC6と対象データの通信を実行することができる。   Next, in S74, the second construction unit 32 starts wireless communication with the AP 4 by using the non-WFD IP address of the printer 10 (and the non-WFD IP address of the AP 4). That is, the second construction unit 32 constructs a non-WFD network including the AP 4 and the printer 10. When the PC 6 is non-WFD connected to the AP 4, the printer 10 can execute communication of target data with the PC 6 via the AP 4.

次いで、S76において、第1の構築部30は、WFDネットワークが構築中であるのか否かを判断する。WFDネットワークが構築中である場合(S76でYESの場合)には、S78に進み、WFDネットワークが構築中でない場合(S76でNOの場合)には、図4の非WFDネットワーク構築処理が終了する。   Next, in S76, the first construction unit 30 determines whether or not the WFD network is being constructed. If the WFD network is being constructed (YES in S76), the process proceeds to S78. If the WFD network is not being constructed (NO in S76), the non-WFD network construction process in FIG. .

S78では、第2の判断部40は、WFDネットワークで利用されているプリンタ10の現在のWFD用IPアドレスが、非WFDネットワークで利用可能なIPアドレスの範囲に含まれるのか否かを判断する。S78の処理は、図2のS30と同様である。プリンタ10の現在のWFD用IPアドレスが上記の範囲に含まれない場合(S78でNOの場合)には、図4の非WFDネットワーク構築処理が終了する。即ち、決定部34は、S84のIPアドレス動的決定処理を実行しない。一方において、プリンタ10の現在のWFD用IPアドレスが上記の範囲に含まれる場合(S78でYESの場合)には、S80に進む。   In S78, the second determination unit 40 determines whether or not the current WFD IP address of the printer 10 used in the WFD network is included in the range of IP addresses that can be used in the non-WFD network. The process of S78 is the same as S30 of FIG. If the current WFD IP address of the printer 10 is not included in the above range (NO in S78), the non-WFD network construction process in FIG. 4 ends. That is, the determination unit 34 does not execute the IP address dynamic determination process of S84. On the other hand, if the current WFD IP address of the printer 10 is included in the above range (YES in S78), the process proceeds to S80.

S80では、第1の構築部30は、プリンタ10の現在の状態が、G/O状態であるのか、クライアント状態であるのか、を判断する。プリンタ10の現在の状態がG/O状態である場合(S80でYESの場合)には、S84に進み、プリンタ10の現在の状態がクライアント状態である場合(S80でNOの場合)には、S82に進む。   In S80, the first construction unit 30 determines whether the current state of the printer 10 is the G / O state or the client state. If the current state of the printer 10 is the G / O state (YES in S80), the process proceeds to S84. If the current state of the printer 10 is the client state (NO in S80), Proceed to S82.

S82の処理は、図2のS34の処理と同様である。即ち、変更部42は、プリンタ10のIntent値を「2」から「14」に変更する。また、第1の構築部30は、プリンタ10の状態をクライアント状態からデバイス状態に変更して、WFDネットワークを切断する。この結果、非WFDネットワークのみが構築されている状態が形成される。ここでも、定常的に確立されるべき非WFDネットワークを優先する構成を採用している。   The process of S82 is the same as the process of S34 of FIG. That is, the changing unit 42 changes the Intent value of the printer 10 from “2” to “14”. The first construction unit 30 changes the state of the printer 10 from the client state to the device state, and disconnects the WFD network. As a result, a state in which only the non-WFD network is constructed is formed. Also here, a configuration in which priority is given to a non-WFD network to be established constantly is adopted.

S84の処理は、図2のS26の処理(即ち図3の各処理)と同様である。即ち、決定部34は、非WFDネットワークで利用可能なIPアドレスの範囲に含まれないプリンタ10の新たなWFD用IPアドレスと、プリンタ10のDHCPサーバが割り当て可能なIPアドレスの新たな範囲と、携帯端末8の新たなWFD用IPアドレスと、を決定する(図3のS60)。   The process of S84 is the same as the process of S26 of FIG. 2 (that is, each process of FIG. 3). That is, the determination unit 34 includes a new IP address for WFD of the printer 10 that is not included in the range of IP addresses that can be used in the non-WFD network, a new range of IP addresses that can be assigned by the DHCP server of the printer 10, A new WFD IP address of the portable terminal 8 is determined (S60 in FIG. 3).

次いで、S86において、決定部34は、プリンタ10の現在のWFD用IPアドレスを、S84で決定されたプリンタ10の新たなWFD用IPアドレスに変更する。さらに、決定部34は、S84で決定された携帯端末8の新たなWFD用IPアドレスを、携帯端末8に割り当てる。これにより、携帯端末8は、携帯端末8の現在のWFD用IPアドレスに代えて、携帯端末8の新たなWFD用IPアドレスを利用する。第1の構築部30は、プリンタ10の新たなWFD用IPアドレス(さらには携帯端末8の新たなWFD用IPアドレス)を利用して、携帯端末8と無線通信を開始する。即ち、第1の構築部30は、非WFDネットワークを再構築する。この結果、WFDネットワークと非WFDネットワークとの両方が構築されている状態が形成される。S86が終了すると、図4の非WFDネットワーク構築処理が終了する。   Next, in S86, the determination unit 34 changes the current WFD IP address of the printer 10 to the new WFD IP address of the printer 10 determined in S84. Furthermore, the determination unit 34 assigns the new WFD IP address of the mobile terminal 8 determined in S <b> 84 to the mobile terminal 8. Accordingly, the mobile terminal 8 uses the new WFD IP address of the mobile terminal 8 instead of the current WFD IP address of the mobile terminal 8. The first construction unit 30 uses the new WFD IP address of the printer 10 (and the new WFD IP address of the mobile terminal 8) to start wireless communication with the mobile terminal 8. That is, the first construction unit 30 reconstructs the non-WFD network. As a result, a state is formed in which both the WFD network and the non-WFD network are constructed. When S86 ends, the non-WFD network construction process in FIG. 4 ends.

(具体例)
続いて、図5〜図8を参照して、各機器4,8,10が実行する処理の様々なケースについて説明する。なお、図5〜図8のシーケンスは、プリンタ10が図2〜図4のフローチャートに従って処理を実行することによって実現される。なお、以下では、プリンタ10は、デフォルトのWFD用サブネットマスクとして「255.255.255.0」を採用する。
(Concrete example)
Next, various cases of processing executed by the devices 4, 8, and 10 will be described with reference to FIGS. 5 to 8 is realized when the printer 10 executes processing according to the flowcharts of FIGS. 2 to 4. In the following description, the printer 10 adopts “255.255.255.0” as the default WFD subnet mask.

(ケースA1;図5及び図6)
ケースA1は、非WFDネットワークを構築させ、その後、WFDネットワークを構築させるケースを示す。プリンタ10に非WFDネットワーク構築指示が入力されると、プリンタ10は、認証のための通信をAP4と実行する(図4のS70)。次いで、プリンタ10は、プリンタ10の非WFD用IPアドレス「192.168.1.2」と、非WFD用サブネットマスク「255.255.0.0」と、をAP4から取得する(S72)。この結果、非WFDネットワークが構築される(S74)。
(Case A1; FIGS. 5 and 6)
Case A1 shows a case where a non-WFD network is constructed and then a WFD network is constructed. When a non-WFD network construction instruction is input to the printer 10, the printer 10 executes communication for authentication with the AP 4 (S70 in FIG. 4). Next, the printer 10 acquires the non-WFD IP address “192.168.1.2” and the non-WFD subnet mask “255.255.0.0” of the printer 10 from the AP 4 (S72). As a result, a non-WFD network is constructed (S74).

続いて、プリンタ10にWFDネットワーク構築指示が入力されると、プリンタ10は、G/Oネゴシエーション及びWPSネゴシエーションを携帯端末8と実行する(図2のS10,S12)。プリンタ10は、S14でYESと判断し、次いで、プリンタ10の現在の状態がG/O状態であれば、S24でYESと判断する。   Subsequently, when a WFD network construction instruction is input to the printer 10, the printer 10 executes G / O negotiation and WPS negotiation with the portable terminal 8 (S10 and S12 in FIG. 2). The printer 10 determines YES in S14, and then determines YES in S24 if the current state of the printer 10 is the G / O state.

次いで、プリンタ10は、プリンタ10の非WFD用IPアドレス「192.168.1.2」を参照して、プリンタ10のWFD用IPアドレス「192.169.1.1」と、携帯端末8のWFD用IPアドレス「192.169.1.2」と、を決定する(S26)。次いで、プリンタ10は、携帯端末8のWFD用IPアドレス「192.169.1.2」と、WFD用サブネットマスク「255.255.255.0」と、を携帯端末8に通知する(S20)。この結果、WFDネットワークが構築される(S20)。   Next, the printer 10 refers to the non-WFD IP address “192.168.1.2” of the printer 10, and the WFD IP address “192.169.1.1” of the printer 10 and the WFD IP address “192.169.1.2” of the mobile terminal 8. Is determined (S26). Next, the printer 10 notifies the mobile terminal 8 of the WFD IP address “192.169.1.2” of the mobile terminal 8 and the WFD subnet mask “255.255.255.0” (S20). As a result, a WFD network is constructed (S20).

上記のケースでは、非WFDネットワークで利用可能なIPアドレスの範囲「192.168.1-255.1-255」と、WFDネットワークで利用可能なIPアドレスの範囲「192.169.1.1-255」と、が重複しない。このために、プリンタ10は、非WFDネットワークで利用可能なIPアドレスの範囲に含まれない携帯端末8及びプリンタ10のIPアドレスを適切に決定することができる。従って、非WFDネットワークとWFDネットワークとの両方が構築されている状態において、プリンタ10は、それぞれのネットワークを利用して、適切な通信を実行することができる。   In the above case, the IP address range “192.168.1-255.1-255” that can be used in the non-WFD network and the IP address range “192.169.1.1-255” that can be used in the WFD network do not overlap. For this reason, the printer 10 can appropriately determine the IP addresses of the mobile terminal 8 and the printer 10 that are not included in the range of IP addresses that can be used in the non-WFD network. Therefore, in a state where both the non-WFD network and the WFD network are constructed, the printer 10 can execute appropriate communication using each network.

一方において、プリンタ10は、プリンタ10の現在の状態がクライアント状態であれば、S24でNOと判断する。この場合、プリンタ10は、プリンタ10のWFD用IPアドレスと、WFD用サブネットマスク「255.255.255.0」と、を携帯端末8から取得する(S28)。例えば、プリンタ10の非WFD用IPアドレスが「192.169.1.4」であれば、プリンタ10は、S30でNOと判断し、プリンタ10のWFD用IPアドレス「192.169.1.4」を利用して、WFDネットワークを構築する(S32)。このケースでも、非WFDネットワークで利用可能なIPアドレスの範囲「192.168.1-255.1-255」と、WFDネットワークで利用可能なIPアドレスの範囲「192.169.1.1-255」と、が重複しない。従って、プリンタ10は、それぞれのネットワークを利用して、適切な通信を実行することができる。   On the other hand, if the current state of the printer 10 is the client state, the printer 10 determines NO in S24. In this case, the printer 10 obtains the WFD IP address of the printer 10 and the WFD subnet mask “255.255.255.0” from the portable terminal 8 (S28). For example, if the non-WFD IP address of the printer 10 is “192.169.1.4”, the printer 10 determines NO in S30, and uses the WFD IP address “192.169.1.4” of the printer 10 to execute the WFD network. Is constructed (S32). Even in this case, the IP address range “192.168.1-255.1-255” usable in the non-WFD network and the IP address range “192.169.1.1-255” usable in the WFD network do not overlap. Accordingly, the printer 10 can execute appropriate communication using each network.

一方において、携帯端末8から取得されたプリンタ10のWFD用IPアドレスが「192.168.1.4」であれば、図6に示されるように、プリンタ10は、S30でYESと判断する。この場合、プリンタ10は、プリンタ10のIntent値を「2」から「14」に変更し(S34)、プリンタ10の状態をクライアント状態からデバイス状態に変更する(S34)。即ち、プリンタ10は、WFDネットワークを構築しない。   On the other hand, if the WFD IP address of the printer 10 acquired from the portable terminal 8 is “192.168.1.4”, as shown in FIG. 6, the printer 10 determines YES in S30. In this case, the printer 10 changes the Intent value of the printer 10 from “2” to “14” (S34), and changes the state of the printer 10 from the client state to the device state (S34). That is, the printer 10 does not construct a WFD network.

続いて、プリンタ10にWFDネットワーク構築指示が再び入力されると、プリンタ10は、G/Oネゴシエーション及びWPSネゴシエーションを携帯端末8と実行する(図2のS10,S12)。ここでのG/Oネゴシエーションでは、通常、プリンタ10がG/Oになるべきことが決定される。プリンタ10のIntent値として「14」が利用されるからである。従って、プリンタ10は、S14でYESと判断し、次いで、S24でYESと判断する。この後の処理は、図5に示されるS24でYESの場合の処理と同様である。このケースでは、プリンタ10のIntent値を「2」から「14」に変更するために、プリンタ10がG/Oになるべきことが決定され易い。このために、プリンタ10は、非WFDネットワークで利用可能なIPアドレスの範囲に含まれない携帯端末8及びプリンタ10のIPアドレスを適切に決定することができる。従って、プリンタ10は、それぞれのネットワークを利用して、適切な通信を実行することができる。   Subsequently, when the WFD network construction instruction is input again to the printer 10, the printer 10 executes G / O negotiation and WPS negotiation with the portable terminal 8 (S10 and S12 in FIG. 2). In the G / O negotiation here, it is usually determined that the printer 10 should become G / O. This is because “14” is used as the Intent value of the printer 10. Accordingly, the printer 10 determines YES in S14, and then determines YES in S24. The subsequent processing is the same as the processing in the case of YES in S24 shown in FIG. In this case, in order to change the Intent value of the printer 10 from “2” to “14”, it is easy to determine that the printer 10 should be G / O. For this reason, the printer 10 can appropriately determine the IP addresses of the mobile terminal 8 and the printer 10 that are not included in the range of IP addresses that can be used in the non-WFD network. Accordingly, the printer 10 can execute appropriate communication using each network.

(ケースB;図7及び図8)
ケースBは、WFDネットワークを構築させ、その後、非WFDネットワークを構築させるケースを示す。プリンタ10にWFDネットワーク構築指示が入力されると、プリンタ10は、G/Oネゴシエーション及びWPSネゴシエーションを携帯端末8と実行する(図2のS10,S12)。次いで、プリンタ10は、S14でNOと判断し、プリンタ10の現在の状態がG/O状態であれば、S16でYESと判断する。
(Case B; FIGS. 7 and 8)
Case B shows a case where a WFD network is constructed and then a non-WFD network is constructed. When a WFD network construction instruction is input to the printer 10, the printer 10 executes G / O negotiation and WPS negotiation with the portable terminal 8 (S10 and S12 in FIG. 2). Next, the printer 10 determines NO in S14. If the current state of the printer 10 is the G / O state, it determines YES in S16.

この時点では、非WFDネットワークが構築されていないために、プリンタ10には、非WFD用IPアドレスが割り当てられていない。従って、プリンタ10は、プリンタ10の非WFD用IPアドレスを参照せずに、プリンタ10のWFD用IPアドレス「192.168.1.1」と、携帯端末8のWFD用IPアドレス「192.168.1.2」と、を決定する(S18)。次いで、プリンタ10は、携帯端末8のWFD用IPアドレス「192.168.1.2」と、WFD用サブネットマスク「255.255.255.0」と、を携帯端末8に通知する(S20)。この結果、WFDネットワークが構築される(S20)。   At this time, since the non-WFD network is not constructed, the non-WFD IP address is not assigned to the printer 10. Accordingly, without referring to the non-WFD IP address of the printer 10, the printer 10 obtains the WFD IP address “192.168.1.1” of the printer 10 and the WFD IP address “192.168.1.2” of the mobile terminal 8. Determine (S18). Next, the printer 10 notifies the portable terminal 8 of the WFD IP address “192.168.1.2” of the portable terminal 8 and the WFD subnet mask “255.255.255.0” (S20). As a result, a WFD network is constructed (S20).

続いて、プリンタ10に非WFDネットワーク構築指示が入力されると、プリンタ10は、認証のための通信をAP4と実行する(図4のS70)。次いで、プリンタ10は、プリンタ10の非WFD用IPアドレスと、非WFD用サブネットマスク「255.255.0.0」と、をAP4から取得する(S72)。この結果、非WFDネットワークが構築される(S74)。プリンタ10の非WFD用IPアドレスが「192.169.1.4」であれば、プリンタ10は、S78でNOと判断し、プリンタ10のWFD用IPアドレス「192.168.1.1」を継続して利用して、WFDネットワークが構築されている状態を維持する。このケースでも、非WFDネットワークで利用可能なIPアドレスの範囲「192.169.1-255.1-255」と、WFDネットワークで利用可能なIPアドレスの範囲「192.168.1.1-255」と、が重複しない。従って、プリンタ10は、それぞれのネットワークを利用して、適切な通信を実行することができる。   Subsequently, when a non-WFD network construction instruction is input to the printer 10, the printer 10 executes communication for authentication with the AP 4 (S70 in FIG. 4). Next, the printer 10 acquires the non-WFD IP address of the printer 10 and the non-WFD subnet mask “255.255.0.0” from the AP 4 (S72). As a result, a non-WFD network is constructed (S74). If the non-WFD IP address of the printer 10 is “192.169.1.4”, the printer 10 determines NO in S78, and continues to use the WFD IP address “192.168.1.1” of the printer 10 to obtain the WFD. Keep the network built. Even in this case, the IP address range “192.169.1-255.1-255” usable in the non-WFD network and the IP address range “192.168.1.1-255” usable in the WFD network do not overlap. Accordingly, the printer 10 can execute appropriate communication using each network.

一方において、例えば、AP4から取得されたプリンタ10の非WFD用IPアドレスが「192.168.1.4」であれば、プリンタ10は、S78でYESと判断し、次いで、S80でYESと判断する。この場合、プリンタ10は、プリンタ10の非WFD用IPアドレス「192.168.1.4」を参照して、プリンタ10の新たなWFD用IPアドレス「192.169.1.1」と、携帯端末8の新たなWFD用IPアドレス「192.169.1.2」と、を決定する(S84)。次いで、プリンタ10は、携帯端末8の新たなWFD用IPアドレス「192.169.1.2」と、WFD用サブネットマスク「255.255.255.0」と、を携帯端末8に通知する(S86)。この結果、WFDネットワークが再構築される(S86)。このケースでも、非WFDネットワークで利用可能なIPアドレスの範囲「192.168.1-255.1-255」と、WFDネットワークで利用可能なIPアドレスの範囲「192.169.1.1-255」と、が重複しない。このために、プリンタ10は、非WFDネットワークで利用可能なIPアドレスの範囲に含まれない携帯端末8及びプリンタ10のIPアドレスを適切に決定することができる。従って、プリンタ10は、それぞれのネットワークを利用して、適切な通信を実行することができる。   On the other hand, for example, if the non-WFD IP address of the printer 10 acquired from the AP 4 is “192.168.1.4”, the printer 10 determines YES in S78, and then determines YES in S80. In this case, the printer 10 refers to the non-WFD IP address “192.168.1.4” of the printer 10, and the new WFD IP address “192.169.1.1” of the printer 10 and the new WFD IP address of the mobile terminal 8. The address “192.169.1.2” is determined (S84). Next, the printer 10 notifies the mobile terminal 8 of the new WFD IP address “192.169.1.2” and the WFD subnet mask “255.255.255.0” of the mobile terminal 8 (S86). As a result, the WFD network is reconstructed (S86). Even in this case, the IP address range “192.168.1-255.1-255” usable in the non-WFD network and the IP address range “192.169.1.1-255” usable in the WFD network do not overlap. For this reason, the printer 10 can appropriately determine the IP addresses of the mobile terminal 8 and the printer 10 that are not included in the range of IP addresses that can be used in the non-WFD network. Accordingly, the printer 10 can execute appropriate communication using each network.

一方において、プリンタ10は、プリンタ10の現在の状態がクライアント状態であれば、図8に示されるように、S16でNOと判断する。この場合、プリンタ10は、プリンタ10のWFD用IPアドレス「192.168.1.3」と、WFD用サブネットマスク「255.255.255.0」と、を携帯端末8から取得する(S22)。この結果、WFDネットワークが構築される(S22)。   On the other hand, if the current state of the printer 10 is the client state, the printer 10 determines NO in S16 as shown in FIG. In this case, the printer 10 acquires the WFD IP address “192.168.1.3” of the printer 10 and the WFD subnet mask “255.255.255.0” from the portable terminal 8 (S22). As a result, a WFD network is constructed (S22).

続いて、プリンタ10に非WFDネットワーク構築指示が入力されると、プリンタ10は、認証のための通信をAP4と実行する(図4のS70)。次いで、プリンタ10は、プリンタ10の非WFD用IPアドレスと、非WFD用サブネットマスク「255.255.0.0」と、をAP4から取得する(S72)。この結果、非WFDネットワークが構築される(S74)。例えば、AP4から取得されたプリンタ10の非WFD用IPアドレスが「192.169.1.4」であれば、プリンタ10は、S78でNOと判断し、プリンタ10のWFD用IPアドレス「192.168.1.3」を継続して利用して、WFDネットワークが構築されている状態を維持する。このケースでも、非WFDネットワークで利用可能なIPアドレスの範囲「192.169.1-255.1-255」と、WFDネットワークで利用可能なIPアドレスの範囲「192.168.1.1-255」と、が重複しない。従って、プリンタ10は、それぞれのネットワークを利用して、適切な通信を実行することができる。   Subsequently, when a non-WFD network construction instruction is input to the printer 10, the printer 10 executes communication for authentication with the AP 4 (S70 in FIG. 4). Next, the printer 10 acquires the non-WFD IP address of the printer 10 and the non-WFD subnet mask “255.255.0.0” from the AP 4 (S72). As a result, a non-WFD network is constructed (S74). For example, if the non-WFD IP address of the printer 10 acquired from the AP 4 is “192.169.1.4”, the printer 10 determines NO in S78 and continues the WFD IP address “192.168.1.3” of the printer 10. To maintain the state in which the WFD network is constructed. Even in this case, the IP address range “192.169.1-255.1-255” usable in the non-WFD network and the IP address range “192.168.1.1-255” usable in the WFD network do not overlap. Accordingly, the printer 10 can execute appropriate communication using each network.

一方において、例えば、AP4から取得されたプリンタ10の非WFD用IPアドレスが「192.168.1.4」であれば、プリンタ10は、S78でYESと判断する。この場合、プリンタ10は、プリンタ10のIntent値を「2」から「14」に変更し(S82)、プリンタ10の状態をクライアント状態からデバイス状態に変更する(S82)。即ち、プリンタ10は、WFDネットワークを切断する。   On the other hand, for example, if the non-WFD IP address of the printer 10 acquired from the AP 4 is “192.168.1.4”, the printer 10 determines YES in S78. In this case, the printer 10 changes the Intent value of the printer 10 from “2” to “14” (S82), and changes the state of the printer 10 from the client state to the device state (S82). That is, the printer 10 disconnects the WFD network.

続いて、プリンタ10にWFDネットワーク構築指示が再び入力されると、プリンタ10は、G/Oネゴシエーション及びWPSネゴシエーションを携帯端末8と実行する(図2のS10,S12)。ここでのG/Oネゴシエーションでは、通常、プリンタ10がG/Oになるべきことが決定される。プリンタ10のIntent値として「14」が利用されるからである。従って、プリンタ10は、S14でYESと判断し、次いで、S24でYESと判断する。この後の処理は、図5又は図6に示されるS24でYESの場合の処理と同様である。このケースでも、非WFDネットワークで利用可能なIPアドレスの範囲「192.168.1-255.1-255」と、WFDネットワークで利用可能なIPアドレスの範囲「192.169.1.1-255」と、が重複しない。このために、プリンタ10は、非WFDネットワークで利用可能なIPアドレスの範囲に含まれない携帯端末8及びプリンタ10のIPアドレスを適切に決定することができる。従って、プリンタ10は、それぞれのネットワークを利用して、適切な通信を実行することができる。   Subsequently, when the WFD network construction instruction is input again to the printer 10, the printer 10 executes G / O negotiation and WPS negotiation with the portable terminal 8 (S10 and S12 in FIG. 2). In the G / O negotiation here, it is usually determined that the printer 10 should become G / O. This is because “14” is used as the Intent value of the printer 10. Accordingly, the printer 10 determines YES in S14, and then determines YES in S24. The subsequent processing is the same as the processing in the case of YES in S24 shown in FIG. 5 or FIG. Even in this case, the IP address range “192.168.1-255.1-255” usable in the non-WFD network and the IP address range “192.169.1.1-255” usable in the WFD network do not overlap. For this reason, the printer 10 can appropriately determine the IP addresses of the mobile terminal 8 and the printer 10 that are not included in the range of IP addresses that can be used in the non-WFD network. Accordingly, the printer 10 can execute appropriate communication using each network.

(第1実施例の効果)
本実施例によると、図5のケースA1に示されるように、プリンタ10は、非WFDネットワークが構築されている状態で、WFDネットワークが構築されるべき場合に、プリンタ10の非WFD用IPアドレス「192.168.1.2」を参照して、携帯端末8のWFD用IPアドレス「192.169.1.2」を決定する。また、図7のケースBに示されるように、プリンタ10は、WFDネットワークが構築されている状態で、非WFDネットワークが構築されるべき場合に、プリンタ10の非WFD用IPアドレス「192.168.1.4」を参照して、携帯端末8のWFD用IPアドレス「192.169.1.2」を決定する。いずれのケースでも、プリンタ10は、非WFDネットワークで利用可能なIPアドレスの範囲に含まれない携帯端末8のWFD用IPアドレスを適切に決定することができる。即ち、プリンタ10は、非WFDネットワークで利用可能なIPアドレスの範囲と、WFDネットワークで利用可能なIPアドレスの範囲と、が重複しないように、IPアドレス割り当て機能を適切に実行することができる。従って、WFDネットワークと非WFDネットワークとの両方が構築されている状態において、プリンタ10は、WFDネットワークを利用して、携帯端末8にデータを適切に送信することができ、さらに、非WFDネットワークを利用して、AP4を介してPC6にデータを適切に送信することができる。
(Effects of the first embodiment)
According to the present embodiment, as shown in case A1 of FIG. 5, when the WFD network is to be constructed in a state where the non-WFD network is constructed, the printer 10 has an IP address for the non-WFD of the printer 10. With reference to “192.168.1.2”, the WFD IP address “192.169.1.2” of the mobile terminal 8 is determined. Further, as shown in Case B of FIG. 7, the printer 10 has a non-WFD IP address “192.168.1.4” when the non-WFD network is to be constructed in a state where the WFD network is constructed. ”To determine the WFD IP address“ 192.169.1.2 ”of the portable terminal 8. In any case, the printer 10 can appropriately determine the WFD IP address of the mobile terminal 8 that is not included in the range of IP addresses that can be used in the non-WFD network. That is, the printer 10 can appropriately execute the IP address assignment function so that the range of IP addresses that can be used in the non-WFD network and the range of IP addresses that can be used in the WFD network do not overlap. Therefore, in a state where both the WFD network and the non-WFD network are constructed, the printer 10 can appropriately transmit data to the portable terminal 8 using the WFD network, and further, the non-WFD network can be used. By using this, data can be appropriately transmitted to the PC 6 via the AP 4.

(対応関係)
プリンタ10、携帯端末8、AP4が、それぞれ、「通信装置」、「第1のデバイス」、「第2のデバイス」の一例である。また、AP4が、「通信装置とは異なるデバイス」の一例である。WDFネットワーク、非WDFネットワークが、それぞれ、「第1種のネットワーク」、「第2種のネットワーク」の一例である。プリンタ10の非WFD用IPアドレス、携帯端末8のWFD用IPアドレスが、それぞれ、「特定のIPアドレス」、「対象のIPアドレス」の一例である。図3のS60で決定されるプリンタ10のWFD用IPアドレスが、「第1のIPアドレス」の一例である。図2のS28で携帯端末8から取得されるプリンタ10のWFD用IPアドレスが、「第2のIPアドレス」の一例である。図4のS78の判断対象のプリンタ10のWFD用IPアドレスが、「第3のIPアドレス」の一例である。
(Correspondence)
The printer 10, the portable terminal 8, and the AP 4 are examples of “communication apparatus”, “first device”, and “second device”, respectively. AP4 is an example of “a device different from the communication apparatus”. A WDF network and a non-WDF network are examples of a “first type network” and a “second type network”, respectively. The non-WFD IP address of the printer 10 and the WFD IP address of the mobile terminal 8 are examples of “specific IP address” and “target IP address”, respectively. The IP address for WFD of the printer 10 determined in S60 of FIG. 3 is an example of “first IP address”. The WFD IP address of the printer 10 acquired from the mobile terminal 8 in S28 of FIG. 2 is an example of the “second IP address”. The WFD IP address of the determination target printer 10 in S78 of FIG. 4 is an example of “third IP address”.

図2のS24でYESの場合、NOの場合が、それぞれ、「第1の場合」、「第2の場合」の一例である。図4のS78でYESの場合、NOの場合が、それぞれ、「第3の場合」、「第4の場合」の一例である。また、図2のS14でNOの場合が、「別の場合」の一例である。G/O状態、クライアント状態が、それぞれ、「親局状態」、「子局状態」の一例である。G/Oネゴシエーションが、「状態決定処理」の一例である。図2のS26(又は図4のS84)のIPアドレス動的決定処理、及び、図2のS20(又は図4のS86)で携帯端末8のWFD用IPアドレスを通知することが、「IPアドレス動的決定処理」の一例である。Intent値「2」、Intent値「14」が、それぞれ、「第1の設定値」、「第2の設定値」の一例である。また、図3の例では、「255.255.255」、「255.255」が、それぞれ、「第1の桁数」、「第2の桁数」の一例である。S52を経て実行されるS56で算出される「192.168.1」、S52を経て実行されるS58で算出される「192.169.1」が、それぞれ、「第1の値」、「第2の値」の一例である。S54を経て実行されるS56で算出される「192.168」、S54を経て実行されるS58で算出される「192.169」が、それぞれ、「第3の値」、「第4の値」の一例である。   In the case of YES in S24 of FIG. 2, the case of NO is an example of “first case” and “second case”, respectively. In the case of YES in S78 of FIG. 4, the case of NO is an example of “third case” and “fourth case”, respectively. The case of NO in S14 of FIG. 2 is an example of “another case”. The G / O state and the client state are examples of the “master station state” and the “slave station state”, respectively. G / O negotiation is an example of “state determination processing”. The IP address dynamic determination process in S26 of FIG. 2 (or S84 of FIG. 4) and the notification of the IP address for WFD of the portable terminal 8 in S20 of FIG. 2 (or S86 of FIG. 4) It is an example of “dynamic determination processing”. Intent value “2” and Intent value “14” are examples of “first setting value” and “second setting value”, respectively. In the example of FIG. 3, “255.255.255” and “255.255” are examples of “first number of digits” and “second number of digits”, respectively. “192.168.1” calculated in S56 executed through S52 and “192.169.1” calculated in S58 executed through S52 are “first value” and “second value”, respectively. It is an example. “192.168” calculated in S56 executed through S54 and “192.169” calculated in S58 executed through S54 are examples of “third value” and “fourth value”, respectively. .

(第2実施例)
第1実施例と異なる点を説明する。本実施例では、図2のWFDネットワーク構築処理の代わりに、図9のWFDネットワーク構築処理が実行される。S100において、第1の構築部30は、非WFDネットワークが構築中であるのか否かを判断する。非WFDネットワークが構築中である場合(S100でYESの場合)には、S114に進み、非WFDネットワークが構築中でない場合(S100でNOの場合)には、S102に進む。S102〜S112は、図2のS10,S12,S16〜S22と同様である。
(Second embodiment)
Differences from the first embodiment will be described. In this embodiment, the WFD network construction process of FIG. 9 is executed instead of the WFD network construction process of FIG. In S100, the first construction unit 30 determines whether or not a non-WFD network is being constructed. If a non-WFD network is being constructed (YES in S100), the process proceeds to S114. If a non-WFD network is not being constructed (NO in S100), the process proceeds to S102. S102 to S112 are the same as S10, S12, and S16 to S22 of FIG.

S114では、第1の構築部30は、プリンタ10を自律G/Oモードに設定する。自律G/Oモードは、G/O状態で動作することをプリンタ10に維持させるモードである。従って、S114の段階ではWFD接続が確立されていないが、プリンタ10は、G/O状態に設定されている。この段階では、プリンタ10が管理している管理リストには、クライアント状態の機器の識別情報が記述されていない。   In S114, the first construction unit 30 sets the printer 10 to the autonomous G / O mode. The autonomous G / O mode is a mode in which the printer 10 maintains operation in the G / O state. Accordingly, the WFD connection is not established at the stage of S114, but the printer 10 is set to the G / O state. At this stage, the identification information of the device in the client state is not described in the management list managed by the printer 10.

S114でプリンタ10が自律G/Oモードに設定されると、プリンタ10は、G/Oネゴシエーションを実行しない。上述したように、携帯端末8は、WFD接続指示が携帯端末8に入力される場合に、携帯端末8の周囲に存在するクライアント状態の機器を検索するSearch処理を実行するが、それに加えて、携帯端末8の周囲に存在するG/O状態の機器(即ちプリンタ10)を検索するScan処理を実行する。これにより、携帯端末8の表示部に、プリンタ10に関する情報を含む機器リストが表示される。携帯端末8のユーザが機器リストの中からG/O状態のプリンタ10を選択すると、携帯端末8は、G/Oネゴシエーションを実行せずに、携帯端末8がクライアントになるべきことを決定する。   When the printer 10 is set to the autonomous G / O mode in S114, the printer 10 does not execute the G / O negotiation. As described above, when the WFD connection instruction is input to the mobile terminal 8, the mobile terminal 8 executes the search process for searching for the client-state devices that exist around the mobile terminal 8. Scan processing for searching for a device in the G / O state (that is, the printer 10) existing around the portable terminal 8 is executed. As a result, a device list including information related to the printer 10 is displayed on the display unit of the mobile terminal 8. When the user of the mobile terminal 8 selects the printer 10 in the G / O state from the device list, the mobile terminal 8 determines that the mobile terminal 8 should become a client without executing the G / O negotiation.

次いで、S116において、第1の構築部30は、G/O状態用のWPSネゴシエーションを実行する。これにより、プリンタ10と携帯端末8との間にWFD接続が確立される。次いで、S118において、決定部34は、IPアドレス動的決定処理を実行する。S118は、図3の各処理と同様である。S118が終了すると、S110に進む。   Next, in S <b> 116, the first construction unit 30 performs WPS negotiation for the G / O state. Thereby, a WFD connection is established between the printer 10 and the portable terminal 8. Next, in S118, the determination unit 34 executes an IP address dynamic determination process. S118 is the same as each process of FIG. When S118 ends, the process proceeds to S110.

(具体例;図10)
本実施例では、図5及び図6のケースA1の代わりに、図10のケースA2が実現される。非WFDネットワークが構築されるまでの各処理は、図5のケースA1と同様である。続いて、プリンタ10にWFDネットワーク構築指示が入力されると、プリンタ10は、プリンタ10を自律G/Oモードに設定し(図9のS114)、G/O状態用のWPSネゴシエーションを実行する(S116)。この後の処理は、図5に示されるS24でYESの場合の処理と同様である。
(Specific example: FIG. 10)
In the present embodiment, a case A2 in FIG. 10 is realized instead of the case A1 in FIGS. Each process until the non-WFD network is constructed is the same as the case A1 in FIG. Subsequently, when a WFD network construction instruction is input to the printer 10, the printer 10 sets the printer 10 to the autonomous G / O mode (S114 in FIG. 9) and executes WPS negotiation for the G / O state ( S116). The subsequent processing is the same as the processing in the case of YES in S24 shown in FIG.

(第2実施例の効果)
図10のケースA2に示されるように、非WFDネットワークが構築されている状態で、WFDネットワークが構築されるべき場合に、プリンタ10は、プリンタ10を自律G/Oモードに設定する。従って、第1実施例の図5のケースA1のように、プリンタ10がクライアント状態で動作する状況(図2のS24でNO)が発生しない。このために、プリンタ10は、IPアドレス動的決定処理(図10のS116)を確実に実行することができ、この結果、非WFDネットワークで利用可能なIPアドレスの範囲に含まれない携帯端末8のWFD用IPアドレスを適切に決定することができる。本実施例では、図9のS114でプリンタ10を自律G/Oモードに設定することが「特定の処理」の一例である。
(Effect of the second embodiment)
As shown in case A2 of FIG. 10, when the WFD network is to be constructed in a state where the non-WFD network is constructed, the printer 10 sets the printer 10 to the autonomous G / O mode. Therefore, unlike the case A1 of FIG. 5 of the first embodiment, the situation where the printer 10 operates in the client state (NO in S24 of FIG. 2) does not occur. Therefore, the printer 10 can surely execute the IP address dynamic determination process (S116 in FIG. 10), and as a result, the mobile terminal 8 that is not included in the range of IP addresses that can be used in the non-WFD network. The IP address for WFD can be appropriately determined. In this embodiment, setting the printer 10 to the autonomous G / O mode in S114 of FIG. 9 is an example of “specific processing”.

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

(変形例1)「通信装置」は、プリンタ10に限られず、通信可能な他の機器(例えば、携帯端末、PC、サーバ、FAX装置、コピー機、スキャナ、多機能機等)であってもよい。また、「第1のデバイス」及び「第2のデバイス」は、携帯端末8及びAP4に限られず、通信可能な他の機器(例えば、PC、サーバ、プリンタ、FAX装置、コピー機、スキャナ、多機能機等)であってもよい。 (Modification 1) The “communication device” is not limited to the printer 10, and may be another device capable of communication (for example, a portable terminal, a PC, a server, a FAX device, a copier, a scanner, a multi-function device, etc.). Good. The “first device” and the “second device” are not limited to the portable terminal 8 and the AP 4, but can communicate with other devices (for example, a PC, a server, a printer, a FAX apparatus, a copier, a scanner, A functional machine).

(変形例2)上記の各実施例では、第1の構築部30は、WFDネットワークを構築し、第2の構築部32が、AP4を含むインフラストラクチャの非WFDネットワークを構築する。例えば、第1の構築部30が、WFDネットワークの代わりに、アドホックの非WFDネットワーク(「第1種のネットワーク」の一例)を構築し、第2の構築部32が、インフラストラクチャの非WFDネットワーク(「第2種のネットワーク」の一例)を構築してもよい。本変形例でも、第1の構築部30は、インフラストラクチャの非WFDネットワークで利用されるプリンタ10のIPアドレスを参照して、アドホックの非WFDネットワークで利用される携帯端末8のIPアドレスを動的に決定することができる。また、例えば、第1の構築部30が、WFDネットワーク(「第1種のネットワーク」の一例)を構築し、第2の構築部32が、インフラストラクチャの非WFDネットワークの代わりに、アドホックの非WFDネットワーク(「第2種のネットワーク」の一例)を構築してもよい。また、例えば、第1の構築部30が、WFDネットワーク(「第1種のネットワーク」の一例)を構築し、第2の構築部32が、無線ネットワークである非WFDネットワークの代わりに、有線ネットワーク(「第2種のネットワーク」の一例)を構築してもよい。 (Modification 2) In each of the above-described embodiments, the first construction unit 30 constructs a WFD network, and the second construction unit 32 constructs an infrastructure non-WFD network including the AP 4. For example, the first construction unit 30 constructs an ad hoc non-WFD network (an example of “first type network”) instead of the WFD network, and the second construction unit 32 constructs an infrastructure non-WFD network. (An example of a “second type network”) may be constructed. Also in this modification, the first construction unit 30 refers to the IP address of the printer 10 used in the infrastructure non-WFD network, and moves the IP address of the mobile terminal 8 used in the ad hoc non-WFD network. Can be determined. Also, for example, the first construction unit 30 constructs a WFD network (an example of “first type network”), and the second construction unit 32 performs ad hoc non-instead of an infrastructure non-WFD network. A WFD network (an example of a “second type network”) may be constructed. Further, for example, the first construction unit 30 constructs a WFD network (an example of “first type network”), and the second construction unit 32 replaces a non-WFD network that is a wireless network with a wired network. (An example of a “second type network”) may be constructed.

(変形例3)決定部34は、図3のIPアドレス動的決定処理に代えて、以下のIPアドレス動的決定処理を実行してもよい。例えば、決定部34は、決定用サブネットマスクとして、予め決められている「255.255.0.0」を採用してもよい。即ち、決定部34は、非WFD用サブネットマスク及びWFD用サブネットマスクを参照せずに、予め決められているサブネットマスク「255.255.0.0」を参照して、携帯端末8のWFD用IPアドレスを決定してもよい。一般的なネットワークでは、通常、「255.255.0.0」よりもマスク部分の桁数が少ないサブネットマスク(例えば「255.0.0.0」)は利用されない。従って、決定部34は、決定用サブネットマスクとして「255.255.0.0」を採用すれば、非WFDネットワークで利用可能なIPアドレスの範囲に含まれない携帯端末8のWFD用IPアドレスを適切に決定することができる。また、例えば、決定部34は、決定用サブネットマスクとして、非WFD用サブネットマスクを必ず採用してもよい。即ち、決定部34は、WFD用サブネットマスク(デフォルトのサブネットマスク)を参照せずに、非WFD用サブネットマスクを参照して、携帯端末8のWFD用IPアドレスを決定してもよい。なお、この場合、決定部34は、決定部34は、WFD用サブネットマスクとして、デフォルトのサブネットマスクに代えて、非WFD用サブネットマスクと同じ値を採用してもよい。このようにしても、決定部34は、非WFDネットワークで利用可能なIPアドレスの範囲に含まれない携帯端末8のWFD用IPアドレスを適切に決定することができる。一般的に言うと、決定部は、少なくとも特定のIPアドレスを参照して、対象のIPアドレスを決定すればよい。 (Modification 3) The determination unit 34 may execute the following dynamic IP address determination process instead of the dynamic IP address determination process of FIG. For example, the determination unit 34 may adopt “255.255.0.0” determined in advance as the determination subnet mask. That is, the determination unit 34 determines the WFD IP address of the mobile terminal 8 by referring to the predetermined subnet mask “255.255.0.0” without referring to the non-WFD subnet mask and the WFD subnet mask. May be. In a general network, a subnet mask (for example, “255.0.0.0”) in which the number of digits of the mask portion is smaller than “255.255.0.0” is not normally used. Therefore, if “255.255.0.0” is adopted as the determination subnet mask, the determination unit 34 appropriately determines the WFD IP address of the mobile terminal 8 that is not included in the range of IP addresses that can be used in the non-WFD network. be able to. Further, for example, the determination unit 34 may always employ a non-WFD subnet mask as the determination subnet mask. That is, the determination unit 34 may determine the WFD IP address of the mobile terminal 8 by referring to the non-WFD subnet mask without referring to the WFD subnet mask (default subnet mask). In this case, the determination unit 34 may adopt the same value as the non-WFD subnet mask instead of the default subnet mask as the WFD subnet mask. Even in this case, the determination unit 34 can appropriately determine the WFD IP address of the mobile terminal 8 that is not included in the range of IP addresses that can be used in the non-WFD network. Generally speaking, the determination unit may determine the target IP address with reference to at least a specific IP address.

(変形例4)上記の各実施例では、AP4が、DHCPサーバとして機能して、プリンタ10の非WFD用IPアドレスを決定する。これに代えて、AP4とは別体である特定のDHCPサーバを含む非WFDネットワークが構築されてもよい。即ち、上記の特定のDHCPサーバが、プリンタ10の非WFD用IPアドレスを決定してもよい。この場合、上記の特定のDHCPサーバが、「通信装置とは異なるデバイス」の一例である。 (Modification 4) In each of the above embodiments, the AP 4 functions as a DHCP server and determines the non-WFD IP address of the printer 10. Alternatively, a non-WFD network including a specific DHCP server that is separate from the AP 4 may be constructed. That is, the specific DHCP server may determine the non-WFD IP address of the printer 10. In this case, the specific DHCP server is an example of “a device different from the communication apparatus”.

(変形例5)「親局状態」は、WFDのG/O状態に限られず、無線ネットワークを構成する他のデバイスを管理(例えば、他のデバイスに関する情報のリストを管理すること、他のデバイス間の無線通信を中継すること等)する状態であればよい。また、「子局状態」は、WFDのクライアント状態に限られず、親局状態の機器によって管理される状態であればよい。従って、「第1種のネットワーク」は、WFDネットワークではなく、他の種類の無線ネットワークであってもよい。 (Modification 5) The “master station state” is not limited to the G / O state of the WFD, but manages other devices configuring the wireless network (for example, managing a list of information on other devices, other devices) It may be in a state of relaying wireless communication between them). The “slave station state” is not limited to the WFD client state, but may be a state managed by a device in the parent station state. Therefore, the “first type network” may be not a WFD network but another type of wireless network.

(変形例6)上記の第1実施例では、図2のS34及び図4のS82において、変更部42は、プリンタ10のIntent値を「2」から「14」に変更する。これに代えて、図2のS34及び図4のS82において、第1の構築部30は、プリンタ10を自律G/Oモードに設定してもよい。本変形例でも、WFDネットワーク構築指示がプリンタ10に再び入力される場合に、プリンタ10がG/O状態で動作するために、プリンタ10は、携帯端末8のWFD用IPアドレスを適切に決定することができる。また、図2のS34及び図4のS82において、第1の構築部30は、Intent値を変更せずに(さらには自律G/Oモードの設定を実行せずに)、WFDネットワークを構築することができないことを、ユーザに通知してもよい(例えば表示部14にエラーを表示してもよい)。本変形例では、プリンタ10のユーザは、WFDネットワークが構築することができないことを知ることができ、WFDネットワークを構築させるための対策を実行することができる。例えば、ユーザは、プリンタ10の操作部12を操作して(即ち手動で)、プリンタ10を自律G/Oモードに設定することができる。 (Modification 6) In the first embodiment described above, in S34 of FIG. 2 and S82 of FIG. 4, the changing unit 42 changes the Intent value of the printer 10 from “2” to “14”. Instead, in S34 of FIG. 2 and S82 of FIG. 4, the first construction unit 30 may set the printer 10 to the autonomous G / O mode. Also in this modification, when the WFD network construction instruction is input again to the printer 10, the printer 10 appropriately determines the WFD IP address of the mobile terminal 8 in order for the printer 10 to operate in the G / O state. be able to. In S34 of FIG. 2 and S82 of FIG. 4, the first construction unit 30 constructs the WFD network without changing the Intent value (and without executing the setting of the autonomous G / O mode). It may be notified to the user that it is impossible (for example, an error may be displayed on the display unit 14). In this modification, the user of the printer 10 can know that the WFD network cannot be constructed, and can take measures for constructing the WFD network. For example, the user can operate the operation unit 12 of the printer 10 (that is, manually) to set the printer 10 to the autonomous G / O mode.

(変形例7)上記の第2実施例では、図9のS114において、第1の構築部30は、プリンタ10を自律G/Oモードに設定することに代えて、プリンタ10のIntent値を携帯端末8に送信する前に、携帯端末8のIntent値を受信し、携帯端末8のIntent値よりも大きいIntent値をプリンタ10のIntent値として利用してもよい。本変形例でも、プリンタ10がG/O状態で動作するために、プリンタ10は、携帯端末8のWFD用IPアドレスを適切に決定することができる。本変形例では、「携帯端末8のIntent値よりも大きいIntent値を利用すること」が、「特定の処理」の一例である。 (Modification 7) In the second embodiment described above, in S114 of FIG. 9, the first construction unit 30 carries the Intent value of the printer 10 instead of setting the printer 10 to the autonomous G / O mode. Before transmitting to the terminal 8, the Intent value of the mobile terminal 8 may be received, and an Intent value larger than the Intent value of the mobile terminal 8 may be used as the Intent value of the printer 10. Also in this modification, since the printer 10 operates in the G / O state, the printer 10 can appropriately determine the WFD IP address of the mobile terminal 8. In the present modification, “use an Intent value larger than the Intent value of the mobile terminal 8” is an example of “specific processing”.

(変形例8)また、図9のS114において、第1の構築部30は、プリンタ10を自律G/Oモードに設定することに代えて、プリンタ10のIntent値を、デフォルトのIntent値(例えば「2」)よりも大きい値(例えば「14」)に変更してもよい。本変形例でも、プリンタ10がG/O状態で動作し易くなるために、プリンタ10は、携帯端末8のWFD用IPアドレスを適切に決定することができる。本変形例では、「プリンタ10のIntent値を変更すること」が、「特定の処理」の一例である。 (Modification 8) Also, in S114 of FIG. 9, the first construction unit 30 sets the Intent value of the printer 10 to the default Intent value (for example, instead of setting the printer 10 to the autonomous G / O mode). It may be changed to a value (for example, “14”) larger than “2”). Also in this modification, the printer 10 can easily operate in the G / O state, so that the printer 10 can appropriately determine the WFD IP address of the mobile terminal 8. In the present modification, “changing the Intent value of the printer 10” is an example of “specific processing”.

(変形例9)上記の各実施例では、G/Oネゴシエーション(図2のS10参照)において、第1の構築部30は、プリンタ10のIntent値が、携帯端末8のIntent値よりも大きい場合に、プリンタ10がG/Oになるべきことを決定する。これに代えて、第1の構築部30は、プリンタ10のIntent値が、携帯端末8のIntent値よりも小さい場合に、プリンタ10がG/Oになるべきことを決定してもよい。上記の各実施例では、「第2の設定値」が「第1の設定値」よりも大きい値であるが、本変形例では、「第2の設定値」が「第1の設定値」よりも小さい値であってもよい。 (Modification 9) In each of the above embodiments, in the G / O negotiation (see S10 in FIG. 2), the first construction unit 30 determines that the Intent value of the printer 10 is larger than the Intent value of the mobile terminal 8 Then, it is determined that the printer 10 should be G / O. Instead, the first construction unit 30 may determine that the printer 10 should be G / O when the Intent value of the printer 10 is smaller than the Intent value of the mobile terminal 8. In each of the embodiments described above, the “second set value” is larger than the “first set value”. However, in the present modification, the “second set value” is the “first set value”. It may be a smaller value.

(変形例10)上記の各実施例では、IPv4のIPアドレスが利用される。これに代えて、IPv6のIPアドレスが利用されてもよい。即ち、決定部は、第2種のネットワーク(例えば非WFDネットワーク)で利用される通信装置(例えばプリンタ10)のIPv6アドレスを参照して、第2種のネットワークで利用可能なIPv6アドレスの範囲に含まれないIPv6アドレスを決定し、決定済みのIPv6アドレスを第1のデバイス(例えば携帯端末8)に割り当てるアドレス決定処理を実行してもよい。 (Modification 10) In each of the above embodiments, an IPv4 IP address is used. Instead, an IPv6 IP address may be used. That is, the determination unit refers to the IPv6 address of the communication device (for example, the printer 10) used in the second type network (for example, non-WFD network), and falls within the range of the IPv6 address that can be used in the second type network. An address determination process may be performed in which an IPv6 address that is not included is determined and the determined IPv6 address is assigned to the first device (for example, the mobile terminal 8).

(変形例11)上記の各実施例では、プリンタ10のCPU22がソフトウェアに従って処理を実行することによって、各部30〜42が実現される。これに代えて、各部30〜42のうちの少なくとも一部は、論理回路等のハードウェアによって実現されてもよい。 (Modification 11) In each of the above-described embodiments, the units 30 to 42 are realized by the CPU 22 of the printer 10 executing processing according to software. Instead, at least a part of each of the units 30 to 42 may be realized by hardware such as a logic circuit.

2:通信システム、4:AP、6:PC、8:携帯端末、10:プリンタ   2: communication system, 4: AP, 6: PC, 8: portable terminal, 10: printer

本明細書では、通信装置を開示する。通信装置は、第1種の無線ネットワークの親局として機能すべき親局状態に移行するための第1の指示を受け付ける第1の受付部と、前記第1の指示が受け付けられる場合に、前記通信装置の状態を、前記第1種の無線ネットワークの親局として動作していない特定の状態から、前記親局状態に移行する第1の移行部と、前記通信装置の状態が前記親局状態に移行する場合に、前記第1種の無線ネットワークを用いた第1のデバイスとの通信において利用されるべき前記通信装置のIPアドレスとして、第1のIPアドレスを決定する第1の決定部であって、前記第1のIPアドレスは、第1のネットワークアドレスを含む、前記第1の決定部と、前記通信装置の状態が前記親局状態である状況において、前記第1種の無線ネットワークとは異なる第2種の無線ネットワークを構築するための第2の指示を受け付ける第2の受付部と、前記第2の指示が受け付けられる場合に、アクセスポイントから、前記第2種の無線ネットワークを用いた前記アクセスポイントとの通信において利用されるべき前記通信装置のIPアドレスとして、第2のIPアドレスを取得する第1の取得部であって、前記第2のIPアドレスは、第2のネットワークアドレスを含む、前記第1の取得部と、前記第2の指示が受け付けられる場合に、前記アクセスポイントと前記通信装置とを含む前記第2種の無線ネットワークを構築する第1の構築部と、前記第1のネットワークアドレスが前記第2のネットワークアドレスを含む場合と、前記第2のネットワークアドレスが前記第1のネットワークアドレスを含む場合と、前記第1のネットワークアドレスが前記第2のネットワークアドレスに一致する場合と、のうちのいずれか一つの場合に、前記第1種の無線ネットワークを用いた前記第1のデバイスとの通信において利用されるべき前記通信装置のIPアドレスとして、前記第1のIPアドレスに代えて第3のIPアドレスを決定する第2の決定部であって、前記第3のIPアドレスは、前記第2のネットワークアドレスとは異なる第3のネットワークアドレスを含む、前記第2の決定部と、を備えてもよい。
また、他の通信装置は、第1のデバイスと通信装置とを含む第1種のネットワークを構築する第1の構築部と、第1のデバイスとは異なる第2のデバイスと通信装置とを含む第2種のネットワークを構築する第2の構築部と、第1種のネットワーク及び第2種のネットワークのうちの一方が構築されている状態で、第1種のネットワーク及び第2種のネットワークのうちの他方が構築されるべき特定の場合に、第2種のネットワークで利用される通信装置のIPアドレスである特定のIPアドレスを参照して、第2種のネットワークで利用可能なIPアドレスの範囲である特定のアドレス範囲に含まれない対象のIPアドレスを決定し、対象のIPアドレスを第1のデバイスに割り当てるアドレス決定処理を実行する決定部と、を備える。
The present specification discloses a communication apparatus. The communication device includes: a first reception unit that receives a first instruction for shifting to a parent station state that should function as a parent station of a first type wireless network; and the first instruction when the first instruction is received, A first transition unit that transitions the state of the communication device from a specific state that is not operating as a parent station of the first type wireless network to the parent station state, and the state of the communication device is the parent station state A first determination unit that determines a first IP address as an IP address of the communication apparatus to be used in communication with the first device using the first type wireless network The first IP address includes a first network address, and in the situation where the state of the communication device is the master station state, the first type wireless network Is A second accepting unit that accepts a second instruction for constructing a second type of wireless network, and when the second instruction is accepted, the second type of wireless network is used from an access point. A first acquisition unit that acquires a second IP address as an IP address of the communication device to be used in communication with the access point, wherein the second IP address is a second network address. Including a first construction unit that constructs the second type of wireless network including the access point and the communication device when the second instruction is received, and The first network address includes the second network address, and the second network address is the first network address. And the first device using the first type of wireless network in any one of a case where the first network address matches the second network address, and A second determination unit that determines a third IP address instead of the first IP address as an IP address of the communication device to be used in communication, wherein the third IP address is the second IP address And a second determination unit including a third network address different from the second network address.
In addition, the other communication apparatus includes a first construction unit that constructs a first type network including the first device and the communication apparatus, and a second device and a communication apparatus that are different from the first device. In a state where one of the second construction unit that constructs the second type network and the first type network and the second type network is constructed, the first type network and the second type network In a specific case where the other of them is to be constructed, the IP address of the IP address that can be used in the second type network is referred to by referring to the specific IP address that is the IP address of the communication device used in the second type network. A determination unit that determines a target IP address that is not included in a specific address range that is a range and assigns the target IP address to the first device.

Claims (12)

通信装置であって、
第1のデバイスと前記通信装置とを含む第1種のネットワークを構築する第1の構築部と、
前記第1のデバイスとは異なる第2のデバイスと前記通信装置とを含む第2種のネットワークを構築する第2の構築部と、
前記第1種のネットワーク及び前記第2種のネットワークのうちの一方が構築されている状態で、前記第1種のネットワーク及び前記第2種のネットワークのうちの他方が構築されるべき特定の場合に、前記第2種のネットワークで利用される前記通信装置のIPアドレスである特定のIPアドレスを参照して、前記第2種のネットワークで利用可能なIPアドレスの範囲である特定のアドレス範囲に含まれない対象のIPアドレスを決定し、前記対象のIPアドレスを前記第1のデバイスに割り当てるアドレス決定処理を実行する決定部と、
を備える通信装置。
A communication device,
A first construction unit for constructing a first type of network including a first device and the communication device;
A second construction unit for constructing a second type network including a second device different from the first device and the communication device;
A specific case in which one of the first type network and the second type network is constructed, and the other of the first type network and the second type network is constructed. In addition, referring to a specific IP address that is an IP address of the communication device used in the second type network, a specific address range that is a range of IP addresses that can be used in the second type network is set. A determination unit that determines a target IP address that is not included, and executes an address determination process that assigns the target IP address to the first device;
A communication device comprising:
前記決定部は、さらに、前記アドレス決定処理において、前記特定のIPアドレスを参照して、前記第1種のネットワークで利用される前記通信装置のIPアドレスである第1のIPアドレスであって、前記特定のアドレス範囲に含まれない前記第1のIPアドレスを決定する、請求項1に記載の通信装置。   The determination unit is further configured to refer to the specific IP address in the address determination process, and is a first IP address that is an IP address of the communication device used in the first type network, The communication apparatus according to claim 1, wherein the first IP address that is not included in the specific address range is determined. 前記特定のIPアドレスは、前記通信装置とは異なるデバイスによって決定されるIPアドレスである、請求項1又は2に記載の通信装置。   The communication device according to claim 1, wherein the specific IP address is an IP address determined by a device different from the communication device. 前記通信装置は、無線ネットワークの親局として機能する親局状態と、前記無線ネットワークの子局として機能する子局状態と、を含む複数の状態のうちのいずれか状態で選択的に動作可能な無線通信装置であり、
前記特定の場合は、前記第2種のネットワークが構築されている状態で、無線ネットワークである前記第1種のネットワークが構築されるべき場合であり、
前記第1の構築部は、さらに、前記特定の場合に、前記第1のデバイス及び前記通信装置のうちの一方が、前記親局状態で動作すべきことを決定すると共に、前記第1のデバイス及び前記通信装置のうちの他方が、前記子局状態で動作すべきことを決定する状態決定処理を実行し、
前記決定部は、
前記特定の場合であり、かつ、前記状態決定処理において、前記通信装置が前記親局状態で動作すべきことが決定される第1の場合に、前記アドレス決定処理を実行し、
前記特定の場合であり、かつ、前記状態決定処理において、前記通信装置が前記子局状態で動作すべきことが決定される第2の場合に、前記アドレス決定処理を実行しない、請求項1から3のいずれか一項に記載の通信装置。
The communication device can selectively operate in any one of a plurality of states including a parent station state that functions as a parent station of a wireless network and a child station state that functions as a child station of the wireless network. A wireless communication device,
The specific case is a case where the first type network that is a wireless network is to be constructed in a state where the second type network is constructed,
The first construction unit further determines that one of the first device and the communication apparatus should operate in the master station state in the specific case, and the first device And the other of the communication devices performs a state determination process for determining that it should operate in the slave station state,
The determination unit
In the first case that is the specific case and the state determination process determines that the communication device should operate in the master station state, the address determination process is executed,
The address determination process is not executed in the second case that is the specific case and in the second case in which it is determined in the state determination process that the communication apparatus should operate in the slave station state. 4. The communication device according to any one of 3.
前記通信装置は、さらに、
前記第2の場合に、前記第1のデバイスから第2のIPアドレスを取得する取得部と、
前記第2のIPアドレスが前記特定のアドレス範囲に含まれるのか否かを判断する第1の判断部と、を備え、
前記第1の構築部は、さらに、
前記第2の場合であり、かつ、前記第2のIPアドレスが前記特定のアドレス範囲に含まれないと判断される場合に、前記第1種のネットワークで利用される前記通信装置のIPアドレスとして、前記第2のIPアドレスを採用し、
前記第2の場合であり、かつ、前記第2のIPアドレスが前記特定のアドレス範囲に含まれると判断される場合に、前記第1種のネットワークで利用される前記通信装置のIPアドレスとして、前記第2のIPアドレスを採用しない、請求項4に記載の通信装置。
The communication device further includes:
An acquisition unit for acquiring a second IP address from the first device in the second case;
A first determination unit that determines whether or not the second IP address is included in the specific address range;
The first construction unit further includes:
In the second case and when it is determined that the second IP address is not included in the specific address range, as the IP address of the communication device used in the first type network , Adopting the second IP address,
In the second case and when it is determined that the second IP address is included in the specific address range, as the IP address of the communication device used in the first type network, The communication apparatus according to claim 4, wherein the second IP address is not adopted.
前記第1の構築部は、前記通信装置が保存する第1の設定値と、前記第1のデバイスが保存する設定値と、を比較することによって、前記状態決定処理を実行し、
前記通信装置は、さらに、
前記第2の場合であり、かつ、前記第2のIPアドレスが前記特定のアドレス範囲に含まれると判断される場合に、前記通信装置が保存する設定値を、前記第1の設定値から、前記第1の設定値と比べて前記状態決定処理において前記通信装置が前記親局状態で動作すべきことが決定され易い第2の設定値に変更する変更部を備える、請求項5に記載の通信装置。
The first construction unit executes the state determination process by comparing a first setting value stored by the communication device and a setting value stored by the first device,
The communication device further includes:
In the second case, and when it is determined that the second IP address is included in the specific address range, a setting value stored by the communication device is determined from the first setting value. The apparatus according to claim 5, further comprising a changing unit that changes to a second setting value that is easily determined that the communication device should operate in the master station state in the state determination process compared to the first setting value. Communication device.
前記通信装置は、無線ネットワークの親局として機能する親局状態と、前記無線ネットワークの子局として機能する子局状態と、を含む複数の状態のうちのいずれか状態で選択的に動作可能な無線通信装置であり、
前記特定の場合は、前記第2種のネットワークが構築されている状態で、無線ネットワークである前記第1種のネットワークが構築されるべき場合であり、
前記第1の構築部は、さらに、前記特定の場合に、前記通信装置を前記親局状態で動作させるための特定の処理を実行し、
前記決定部は、前記特定の場合に、前記特定の処理が実行された後に、前記アドレス決定処理を実行する、請求項1から6のいずれか一項に記載の通信装置。
The communication device can selectively operate in any one of a plurality of states including a parent station state that functions as a parent station of a wireless network and a child station state that functions as a child station of the wireless network. A wireless communication device,
The specific case is a case where the first type network that is a wireless network is to be constructed in a state where the second type network is constructed,
The first construction unit further performs a specific process for operating the communication device in the master station state in the specific case,
The communication device according to claim 1, wherein the determination unit executes the address determination process after the specific process is executed in the specific case.
前記特定の場合は、前記第1種のネットワークが構築されている状態で、前記第2種のネットワークが構築されるべき場合であり、
前記決定部は、前記特定の場合に、前記第1のデバイスが、前記第1種のネットワークで現在利用されている前記第1のデバイスのIPアドレスに代えて、前記対象のIPアドレスを利用するように、前記対象のIPアドレスを前記第1のデバイスに割り当てる、請求項1から3のいずれか一項に記載の通信装置。
The specific case is a case where the second type network is to be constructed in a state where the first type network is constructed,
In the specific case, the determination unit uses the target IP address instead of the IP address of the first device currently used in the first type network. As described above, the communication apparatus according to any one of claims 1 to 3, wherein the target IP address is assigned to the first device.
前記通信装置は、さらに、
前記特定の場合に、前記第1種のネットワークで現在利用されている前記通信装置のIPアドレスである第3のIPアドレスが、前記特定のアドレス範囲に含まれるのか否かを判断する第2の判断部を備え、
前記決定部は、
前記特定の場合であり、かつ、前記第3のIPアドレスが前記特定のアドレス範囲に含まれると判断される第3の場合に、前記アドレス決定処理を実行し、
前記特定の場合であり、かつ、前記第3のIPアドレスが前記特定のアドレス範囲に含まれないと判断される第4の場合に、前記アドレス決定処理を実行しない、請求項8に記載の通信装置。
The communication device further includes:
Determining whether or not a third IP address, which is an IP address of the communication device currently used in the first type network, is included in the specific address range in the specific case; It has a judgment part,
The determination unit
In the third case, and in the third case where it is determined that the third IP address is included in the specific address range, the address determination process is executed.
9. The communication according to claim 8, wherein the address determination process is not executed in the specific case and in a fourth case where it is determined that the third IP address is not included in the specific address range. apparatus.
前記通信装置は、無線ネットワークの親局として機能する親局状態と、前記無線ネットワークの子局として機能する子局状態と、を含む複数の状態のうちのいずれか状態で選択的に動作可能な無線通信装置であり、
前記第1の構築部は、さらに、前記第2種のネットワークが構築されていない状態で、前記第1種のネットワークが構築されるべき別の場合に、前記第1のデバイス及び前記通信装置のうちの一方が、前記親局状態で動作すべきことを決定すると共に、前記第1のデバイス及び前記通信装置のうちの他方が、前記子局状態で動作すべきことを決定する状態決定処理を実行し、
前記第1の構築部は、前記通信装置が保存する第1の設定値と、前記第1のデバイスが保存する設定値と、を比較することによって、前記状態決定処理を実行し、
前記特定の場合は、前記別の場合を経て前記第1種のネットワークが構築されている状態で、前記第2種のネットワークが構築されるべき場合であり、
前記決定部は、
前記第3の場合であり、かつ、前記通信装置が前記親局状態で動作している場合に、前記アドレス決定処理を実行し、
前記第3の場合であり、かつ、前記通信装置が前記子局状態で動作している場合に、前記アドレス決定処理を実行せず、
前記通信装置は、さらに、
前記第3の場合であり、かつ、前記通信装置が前記子局状態で動作している場合に、前記通信装置が保存する設定値を、前記第1の設定値から、前記第1の設定値と比べて前記状態決定処理において前記通信装置が前記親局状態で動作すべきことが決定され易い第2の設定値に変更する変更部を備える、請求項9に記載の通信装置。
The communication device can selectively operate in any one of a plurality of states including a parent station state that functions as a parent station of a wireless network and a child station state that functions as a child station of the wireless network. A wireless communication device,
The first construction unit further includes the first device and the communication apparatus in a case where the first type network is to be constructed in a state where the second type network is not constructed. A state determination process for determining that one of them should operate in the master station state and that the other of the first device and the communication apparatus should operate in the slave station state. Run,
The first construction unit executes the state determination process by comparing a first setting value stored by the communication device and a setting value stored by the first device,
The specific case is a case where the second type network is to be constructed in a state where the first type network is constructed through the other case,
The determination unit
In the third case, and when the communication device is operating in the master station state, the address determination process is executed,
In the third case, and when the communication device is operating in the slave station state, the address determination process is not executed,
The communication device further includes:
In the third case, and when the communication apparatus is operating in the slave station state, a setting value stored by the communication apparatus is changed from the first setting value to the first setting value. The communication device according to claim 9, further comprising: a changing unit that changes the communication device to a second setting value that is easily determined that the communication device should operate in the master station state in the state determination process.
前記特定の場合であり、かつ、前記第1種のネットワークで利用される第1のサブネットマスクのマスク部分の桁数である第1の桁数が、前記第2種のネットワークで利用される第2のサブネットマスクのマスク部分の桁数である第2の桁数以下である場合に、前記決定部は、前記アドレス決定処理において、前記特定のIPアドレスのうち、前記第1のサブネットマスクによってマスクされる第1の値を算出し、前記第1の値とは異なる第2の値であって、前記第1の桁数を有する前記第2の値を含む前記対象のIPアドレスを決定し、
前記特定の場合であり、かつ、前記第1の桁数が前記第2の桁数よりも大きい場合に、前記決定部は、前記特定のIPアドレスのうち、前記第2のサブネットマスクによってマスクされる第3の値を算出し、前記第3の値とは異なる第4の値であって、前記第2の桁数を有する前記第4の値を含む前記対象のIPアドレスを決定する、請求項1から10のいずれか一項に記載の通信装置。
In the specific case, the first number of digits, which is the number of digits of the mask portion of the first subnet mask used in the first type network, is used in the second type network. When the number of digits is equal to or less than the second number of digits of the mask part of the subnet mask of 2, the determination unit masks the specific IP address with the first subnet mask in the address determination process. Calculating a first value to be determined, and determining a target IP address including the second value which is a second value different from the first value and has the first number of digits,
In the specific case, and when the first number of digits is larger than the second number of digits, the determination unit is masked by the second subnet mask among the specific IP addresses. And determining a target IP address including the fourth value, which is a fourth value different from the third value and having the second number of digits. Item 11. The communication device according to any one of Items 1 to 10.
通信装置のためのコンピュータプログラムであって、
前記通信装置に搭載されるコンピュータに、以下の各処理、即ち、
第1のデバイスと前記通信装置とを含む第1種のネットワークを構築する第1の構築処理と、
前記第1のデバイスとは異なる第2のデバイスと前記通信装置とを含む第2種のネットワークを構築する第2の構築処理と、
前記第1種のネットワーク及び前記第2種のネットワークのうちの一方が構築されている状態で、前記第1種のネットワーク及び前記第2種のネットワークのうちの他方が構築されるべき特定の場合に、前記第2種のネットワークで利用される前記通信装置のIPアドレスである特定のIPアドレスを参照して、前記第2種のネットワークで利用可能なIPアドレスの範囲である特定のアドレス範囲に含まれない対象のIPアドレスを決定し、前記対象のIPアドレスを前記第1のデバイスに割り当てるアドレス決定処理と、
を実行させるコンピュータプログラム。
A computer program for a communication device,
In the computer mounted on the communication device, the following processes, that is,
A first construction process for constructing a first type network including a first device and the communication device;
A second construction process for constructing a second type of network including a second device different from the first device and the communication device;
A specific case in which one of the first type network and the second type network is constructed, and the other of the first type network and the second type network is constructed. In addition, referring to a specific IP address that is an IP address of the communication device used in the second type network, a specific address range that is a range of IP addresses that can be used in the second type network is set. An address determination process for determining a target IP address not included and allocating the target IP address to the first device;
A computer program that executes
JP2018000232A 2018-01-04 2018-01-04 Communication device Active JP6519668B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2018000232A JP6519668B2 (en) 2018-01-04 2018-01-04 Communication device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2018000232A JP6519668B2 (en) 2018-01-04 2018-01-04 Communication device

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2016163352A Division JP6269752B2 (en) 2016-08-24 2016-08-24 Communication device

Publications (2)

Publication Number Publication Date
JP2018050350A true JP2018050350A (en) 2018-03-29
JP6519668B2 JP6519668B2 (en) 2019-05-29

Family

ID=61766661

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2018000232A Active JP6519668B2 (en) 2018-01-04 2018-01-04 Communication device

Country Status (1)

Country Link
JP (1) JP6519668B2 (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006191570A (en) * 2004-12-30 2006-07-20 Lg Electronics Inc Method to allocate ip to radio terminal equipment which can not be connected to mobile communication network, and mobile communication terminal equipment to realize its method
JP2009044701A (en) * 2007-08-13 2009-02-26 Brother Ind Ltd Wireless communication connection system, and network device
JP2009049576A (en) * 2007-08-15 2009-03-05 Canon Inc Communication device and communication method thereof
JP2010268301A (en) * 2009-05-15 2010-11-25 Canon Inc Communication device, and method for controlling the same
JP2011114377A (en) * 2009-11-24 2011-06-09 Sony Corp Radio communication device, radio communication system, radio communication method, and program
JP2011124980A (en) * 2009-11-13 2011-06-23 Sony Corp Wireless communication device, wireless communication system, program, and wireless communication method
JP2011130205A (en) * 2009-12-17 2011-06-30 Canon Inc Information processing apparatus with multiple communication interfaces and control method
JP2011151660A (en) * 2010-01-22 2011-08-04 Sony Corp Radio communication equipment, program, radio communication method, and radio communication system

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006191570A (en) * 2004-12-30 2006-07-20 Lg Electronics Inc Method to allocate ip to radio terminal equipment which can not be connected to mobile communication network, and mobile communication terminal equipment to realize its method
JP2009044701A (en) * 2007-08-13 2009-02-26 Brother Ind Ltd Wireless communication connection system, and network device
JP2009049576A (en) * 2007-08-15 2009-03-05 Canon Inc Communication device and communication method thereof
JP2010268301A (en) * 2009-05-15 2010-11-25 Canon Inc Communication device, and method for controlling the same
JP2011124980A (en) * 2009-11-13 2011-06-23 Sony Corp Wireless communication device, wireless communication system, program, and wireless communication method
JP2011114377A (en) * 2009-11-24 2011-06-09 Sony Corp Radio communication device, radio communication system, radio communication method, and program
JP2011130205A (en) * 2009-12-17 2011-06-30 Canon Inc Information processing apparatus with multiple communication interfaces and control method
JP2011151660A (en) * 2010-01-22 2011-08-04 Sony Corp Radio communication equipment, program, radio communication method, and radio communication system

Also Published As

Publication number Publication date
JP6519668B2 (en) 2019-05-29

Similar Documents

Publication Publication Date Title
JP5994261B2 (en) Communication device
JP5857850B2 (en) Communication device
JP5945910B2 (en) Wireless communication device
JP6584210B2 (en) COMMUNICATION DEVICE, ITS CONTROL METHOD, PROGRAM, AND STORAGE MEDIUM
JP2014027384A (en) Communication device and mobile terminal
JP5820106B2 (en) Communication apparatus and control method thereof
JP5915314B2 (en) Communication device
JP6365594B2 (en) Wireless communication device
JP6183445B2 (en) Communication device
JP6269752B2 (en) Communication device
JP6519668B2 (en) Communication device
JP6249075B2 (en) Communication device and portable terminal
JP7435860B2 (en) wireless communication device
JP6662478B2 (en) Communication device and mobile terminal
JP6852755B2 (en) Wireless communication device
JP6481743B2 (en) Communication device and portable terminal
JP6544468B2 (en) Wireless communication device
JP6376250B2 (en) Wireless communication device
JP6601463B2 (en) Communication device
JP6164322B2 (en) Wireless communication device
JP2021090229A (en) Wireless communication device

Legal Events

Date Code Title Description
A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20180130

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20180131

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20190408

R150 Certificate of patent or registration of utility model

Ref document number: 6519668

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150