JP5527233B2 - Communication device - Google Patents

Communication device Download PDF

Info

Publication number
JP5527233B2
JP5527233B2 JP2011015910A JP2011015910A JP5527233B2 JP 5527233 B2 JP5527233 B2 JP 5527233B2 JP 2011015910 A JP2011015910 A JP 2011015910A JP 2011015910 A JP2011015910 A JP 2011015910A JP 5527233 B2 JP5527233 B2 JP 5527233B2
Authority
JP
Japan
Prior art keywords
address
communication device
specific
communication
printer
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2011015910A
Other languages
Japanese (ja)
Other versions
JP2012156910A (en
Inventor
健 斉藤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Brother Industries Ltd
Original Assignee
Brother Industries Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Brother Industries Ltd filed Critical Brother Industries Ltd
Priority to JP2011015910A priority Critical patent/JP5527233B2/en
Publication of JP2012156910A publication Critical patent/JP2012156910A/en
Application granted granted Critical
Publication of JP5527233B2 publication Critical patent/JP5527233B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本明細書によって開示される技術は、ローカルエリアネットワークを介して、外部装置と通信する通信装置に関する。   The technology disclosed in this specification relates to a communication device that communicates with an external device via a local area network.

例えば、特許文献1には、PCと複数個のプリンタとがローカルエリアネットワークに接続されているシステムが開示されている。PCは、SNMPのGETコマンドをブロードキャストすることによって、各プリンタから、各プリンタのIPアドレスを取得する。PCは、例えば、PCと異なるネットワークアドレスを含むIPアドレスを有する1個以上のプリンタを表示する。ユーザは、PCの操作部を操作して、1個以上のプリンタの中から特定のプリンタを選択すると共に、IPアドレスを入力する。PCは、ユーザによって入力されたIPアドレスを含むSNMPのSETコマンドをブロードキャストする。これにより、特定のプリンタは、特定のプリンタ自身のIPアドレスを、ユーザによって入力されたIPアドレスに変更する。この結果、特定のプリンタは、PCとのユニキャスト通信を実行可能な状態になり得る。   For example, Patent Document 1 discloses a system in which a PC and a plurality of printers are connected to a local area network. The PC acquires the IP address of each printer from each printer by broadcasting an SNMP GET command. For example, the PC displays one or more printers having an IP address including a network address different from that of the PC. The user operates the operation unit of the PC, selects a specific printer from one or more printers, and inputs an IP address. The PC broadcasts an SNMP SET command including the IP address input by the user. Accordingly, the specific printer changes the IP address of the specific printer itself to the IP address input by the user. As a result, the specific printer can be in a state where it can execute unicast communication with the PC.

特開2003−264556号公報JP 2003-264556 A

特許文献1の技術では、プリンタは、PCからの指示がなければ、プリンタのIPアドレスを変更しない。即ち、プリンタは、PCとのユニキャスト通信を実行可能な状態になるために、プリンタのIPアドレスを主体的に変更しない。   In the technique of Patent Document 1, the printer does not change the IP address of the printer unless there is an instruction from the PC. That is, the printer does not change the IP address of the printer in order to be able to execute unicast communication with the PC.

本明細書では、通信装置が、外部装置とのユニキャスト通信を実行可能な状態になるために、通信装置のIPアドレスを主体的に変更し得る技術を提供する。   In the present specification, a technique is provided in which the communication device can change the IP address of the communication device in order to be able to execute unicast communication with an external device.

本明細書では、ローカルエリアネットワークを介して、特定のIPアドレスを有する外部装置と通信する通信装置を開示する。通信装置は、受信部と、判断部と、変更部と、を備える。受信部は、外部装置からブロードキャスト通信によって送信される特定の信号であって、特定のIPアドレスを含む特定の信号を受信する。判断部は、特定の信号が受信される場合に、通信装置が、通信装置自身の現在のIPアドレスである第1のIPアドレスと、特定の信号に含まれる特定のIPアドレスと、を用いたユニキャスト通信を、外部装置と実行可能であるのか否かを判断する。変更部は、通信装置がユニキャスト通信を外部装置と実行不可能であると判断される特定の場合に、通信装置のIPアドレスを、第1のIPアドレスから、第1のIPアドレスと異なる第2のIPアドレスに変更する。   The present specification discloses a communication device that communicates with an external device having a specific IP address via a local area network. The communication device includes a receiving unit, a determining unit, and a changing unit. The receiving unit receives a specific signal that is transmitted from an external device by broadcast communication and includes a specific IP address. When the specific signal is received, the determination unit uses the first IP address, which is the current IP address of the communication device itself, and the specific IP address included in the specific signal. It is determined whether unicast communication can be executed with an external device. The changing unit is configured to change the IP address of the communication device from the first IP address to the first IP address in a specific case where the communication device is determined to be unable to perform unicast communication with the external device. Change the IP address to 2.

上記の構成では、通信装置は、外部装置からブロードキャストされる特定の信号を受信する場合に、外部装置とのユニキャスト通信を実行可能であるのか否かを判断する。通信装置は、外部装置とのユニキャスト通信を実行不可能であると判断する場合に、通信装置のIPアドレスを変更する。通信装置のIPアドレスが変更されるために、通信装置と外部装置とがユニキャスト通信を実行可能な状態になり得る。しかも、通信装置は、上記の判断を実行するために、通信装置のIPアドレスを変更する必要があるのか否かを主体的に判断することができる。従って、通信装置は、通信装置のIPアドレスを変更する必要があると判断する場合(即ち、外部装置とのユニキャスト通信を実行不可能であると判断する場合)に、例えば外部装置からの指示を受けなくても、通信装置のIPアドレスを主体的に変更し得る。   In the above configuration, when receiving a specific signal broadcast from an external device, the communication device determines whether or not unicast communication with the external device can be performed. The communication device changes the IP address of the communication device when determining that the unicast communication with the external device cannot be performed. Since the IP address of the communication device is changed, the communication device and the external device can be in a state where unicast communication can be performed. Moreover, the communication device can independently determine whether or not it is necessary to change the IP address of the communication device in order to execute the above determination. Accordingly, when the communication device determines that the IP address of the communication device needs to be changed (that is, when it is determined that unicast communication with the external device cannot be performed), for example, an instruction from the external device Even without receiving, the IP address of the communication device can be changed independently.

変更部は、ユーザからの指示を受けることなく、通信装置のIPアドレスを、第1のIPアドレスから第2のIPアドレスに変更してもよい。この構成によると、通信装置は、ユーザからの指示(例えば外部装置からの指示)を受けなくても、通信装置のIPアドレスを主体的に変更し得る。   The changing unit may change the IP address of the communication device from the first IP address to the second IP address without receiving an instruction from the user. According to this configuration, the communication device can independently change the IP address of the communication device without receiving an instruction from the user (for example, an instruction from an external device).

外部装置とのユニキャスト通信を実行可能な適切なIPアドレスを通信装置に設定するために、以下の(A)〜(E)のいずれかの手法を採用してもよい。   In order to set an appropriate IP address capable of performing unicast communication with an external device in the communication device, any of the following methods (A) to (E) may be employed.

(A)通信装置は、ローカルエリアネットワークに接続される各デバイスにIPアドレスを割り当てるIPアドレス割当サーバから、第2のIPアドレスを取得する取得部をさらに備えていてもよい。変更部は、特定の場合に、通信装置のIPアドレスを、第1のIPアドレスから、取得済みの第2のIPアドレスに変更してもよい。 (A) The communication apparatus may further include an acquisition unit that acquires a second IP address from an IP address assignment server that assigns an IP address to each device connected to the local area network. The changing unit may change the IP address of the communication device from the first IP address to the acquired second IP address in a specific case.

(B)通信装置は、特定のIPアドレスの値が、IPアドレスを生成するための所定のアルゴリズムによって生成され得るIPアドレスの値の範囲に含まれる場合に、上記の所定のアルゴリズムを用いて、第2のIPアドレスを生成する第1の生成部をさらに備えていてもよい。変更部は、特定の場合に、通信装置のIPアドレスを、第1のIPアドレスから、生成済みの第2のIPアドレスに変更してもよい。 (B) When the value of a specific IP address is included in the range of IP address values that can be generated by a predetermined algorithm for generating an IP address, the communication device uses the predetermined algorithm, You may further provide the 1st production | generation part which produces | generates a 2nd IP address. The changing unit may change the IP address of the communication device from the first IP address to the generated second IP address in a specific case.

(C)通信装置は、特定のIPアドレスの全部の値のうちの一部を変更することによって、特定のIPアドレスから第2のIPアドレスを生成する第2の生成部をさらに備えていてもよい。変更部は、特定の場合に、通信装置のIPアドレスを、第1のIPアドレスから、生成済みの第2のIPアドレスに変更してもよい。 (C) The communication apparatus may further include a second generation unit that generates a second IP address from the specific IP address by changing a part of all values of the specific IP address. Good. The changing unit may change the IP address of the communication device from the first IP address to the generated second IP address in a specific case.

(D)通信装置は、通信装置の過去のIPアドレスである第3のIPアドレスを得るために利用されたIPアドレス設定手法を示す手法情報を格納するための手法メモリをさらに備えていてもよい。第3のIPアドレスは、外部装置とのユニキャスト通信を実行可能であったIPアドレスであってもよい。変更部は、特定の場合に、通信装置のIPアドレスを、第1のIPアドレスから、手法メモリ内の手法情報が示すIPアドレス設定手法を利用して得られる第2のIPアドレスに変更してもよい。 (D) The communication apparatus may further include a technique memory for storing technique information indicating an IP address setting technique used for obtaining a third IP address that is a past IP address of the communication apparatus. . The third IP address may be an IP address that could execute unicast communication with an external device. In a specific case, the changing unit changes the IP address of the communication device from the first IP address to the second IP address obtained by using the IP address setting technique indicated by the technique information in the technique memory. Also good.

(E)通信装置は、通信装置の過去のIPアドレスである第2のIPアドレスを格納するためのアドレスメモリをさらに備えていてもよい。第2のIPアドレスは、外部装置とのユニキャスト通信を実行可能であったIPアドレスであってもよい。変更部は、特定の場合に、通信装置のIPアドレスを、第1のIPアドレスから、アドレスメモリ内の第2のIPアドレスに変更してもよい。 (E) The communication device may further include an address memory for storing a second IP address that is a past IP address of the communication device. The second IP address may be an IP address that could execute unicast communication with an external device. In a specific case, the changing unit may change the IP address of the communication device from the first IP address to the second IP address in the address memory.

通信装置は、第2のIPアドレスが、ローカルエリアネットワークに接続されている他のデバイスのIPアドレスであるのか否かを確認する確認部をさらに備えていてもよい。変更部は、特定の場合において、第2のIPアドレスが他のデバイスのIPアドレスでないと確認される場合に、通信装置のIPアドレスを、第1のIPアドレスから、第2のIPアドレスに変更し、特定の場合において、第2のIPアドレスが他のデバイスのIPアドレスであると確認される場合に、通信装置のIPアドレスを、第1のIPアドレスから、第1及び第2のIPアドレスと異なるIPアドレスに変更してもよい。この構成によると、通信装置と他のデバイスとの両方に同じIPアドレスが設定されることを抑制することができる。   The communication apparatus may further include a confirmation unit that confirms whether or not the second IP address is an IP address of another device connected to the local area network. The changing unit changes the IP address of the communication device from the first IP address to the second IP address when it is confirmed that the second IP address is not the IP address of another device in a specific case. In a specific case, when it is confirmed that the second IP address is an IP address of another device, the IP address of the communication device is changed from the first IP address to the first and second IP addresses. It may be changed to a different IP address. According to this configuration, it is possible to prevent the same IP address from being set in both the communication apparatus and other devices.

判断部は、特定のIPアドレスが送信先として含まれる第1の信号であって、第1のIPアドレスが送信元として含まれる第1の信号を送信して、第1の信号の応答信号を受信した場合に、通信装置がユニキャスト通信を外部装置と実行可能であると判断し、第1の信号を送信して、第1の信号の応答信号を受信しなかった場合に、通信装置がユニキャスト通信を外部装置と実行不可能であると判断してもよい。この構成によると、通信装置は、外部装置とのユニキャスト通信を実行可能であるのか否かについて、適切な判断を実行し得る。   The determination unit transmits a first signal that includes a specific IP address as a transmission destination and includes the first IP address as a transmission source, and returns a response signal of the first signal. If it is received, the communication device determines that the unicast communication can be performed with the external device, transmits the first signal, and does not receive the response signal of the first signal. It may be determined that unicast communication cannot be performed with an external device. According to this configuration, the communication device can make an appropriate determination as to whether or not unicast communication with an external device can be performed.

判断部は、第1のIPアドレスのネットワークアドレス部の値と、特定のIPアドレスのネットワークアドレス部の値と、が一致する場合に、通信装置がユニキャスト通信を外部装置と実行可能であると判断し、第1のIPアドレスのネットワークアドレス部の値と、特定のIPアドレスのネットワークアドレス部の値と、が一致しない場合に、通信装置がユニキャスト通信を外部装置と実行不可能であると判断してもよい。この構成によると、通信装置は、外部装置とのユニキャスト通信を実行可能であるのか否かについて、適切な判断を実行し得る。   The determination unit determines that the communication device can execute unicast communication with an external device when the value of the network address portion of the first IP address matches the value of the network address portion of the specific IP address. If the network address portion value of the first IP address does not match the network address portion value of the specific IP address, the communication device cannot execute unicast communication with the external device. You may judge. According to this configuration, the communication device can make an appropriate determination as to whether or not unicast communication with an external device can be performed.

通信装置は、通信装置のIPアドレスが、第1のIPアドレスから第2のIPアドレスに変更された後に、特定のIPアドレスが送信先として含まれる第2の信号であって、第2のIPアドレスが送信元として含まれる第2の信号を送信する送信部をさらに備えていてもよい。この構成によると、通信装置は、特定のIPアドレスと、第2のIPアドレスと、を用いたユニキャスト通信を、外部装置と実行し得る。   The communication device is a second signal including a specific IP address as a transmission destination after the IP address of the communication device is changed from the first IP address to the second IP address, and the second IP You may further provide the transmission part which transmits the 2nd signal in which an address is contained as a transmission source. According to this configuration, the communication device can execute unicast communication using the specific IP address and the second IP address with the external device.

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

通信システムの構成の一例を示す。An example of a structure of a communication system is shown. メイン処理のフローチャートを示す。The flowchart of a main process is shown. IPアドレス変更処理のフローチャートを示す。The flowchart of an IP address change process is shown. 成功手法処理のフローチャートを示す。The flowchart of a successful technique process is shown. ユニキャスト通信を実行不可能なケースの一例を示す。An example of a case in which unicast communication is not possible is shown.

(実施例)
(システムの構成)
図1に示されるように、通信システム2は、プリンタ10(PC80の周辺機器)と、PC80と、DHCP(Dynamic Host Configuration Protocol)サーバ90と、を備える。各デバイス10,80,90は、LAN4に接続されている。各デバイス10,80,90は、LAN4を介して、相互に通信可能である。
(Example)
(System configuration)
As shown in FIG. 1, the communication system 2 includes a printer 10 (peripheral device of the PC 80), the PC 80, and a DHCP (Dynamic Host Configuration Protocol) server 90. Each device 10, 80, 90 is connected to the LAN 4. The devices 10, 80, and 90 can communicate with each other via the LAN 4.

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

制御部20は、CPU22とメモリ30とを備える。CPU22は、メモリ30に格納されているプログラム(図示省略)に従って、様々な処理を実行する。CPU22が当該プログラムに従って処理を実行することによって、各部50〜64の機能が実現される。メモリ30は、不揮発性メモリ、揮発性メモリ等によって構成される。メモリ30は、設定記憶領域32と、成功手法記憶領域34と、成功IP記憶領域36と、受信IP記憶領域38と、を備える。   The control unit 20 includes a CPU 22 and a memory 30. The CPU 22 executes various processes according to a program (not shown) stored in the memory 30. When the CPU 22 executes processing according to the program, the functions of the units 50 to 64 are realized. The memory 30 is configured by a nonvolatile memory, a volatile memory, or the like. The memory 30 includes a setting storage area 32, a successful technique storage area 34, a success IP storage area 36, and a reception IP storage area 38.

設定記憶領域32は、プリンタ10の現在のIPアドレスと、プリンタ10の現在のサブネットマスクと、プリンタ10の現在のIPアドレス設定手法を示す手法情報と、を記憶する。なお、詳しくは後述するが、本実施例では、IPアドレス設定手法として、5種類の手法(「STATIC」、「DHCP」、「BOOTP(Bootstrap Protocol)」、「RARP(Reverse Address Resolution Protocol)」、及び、「APIPA(Automatic Private IP Addressing)」)が存在する。   The setting storage area 32 stores the current IP address of the printer 10, the current subnet mask of the printer 10, and method information indicating the current IP address setting method of the printer 10. Although details will be described later, in this embodiment, as IP address setting methods, five types of methods (“STATIC”, “DHCP”, “BOOTP (Bootstrap Protocol)”, “RARP (Reverse Address Resolution Protocol)”), And “APIPA (Automatic Private IP Addressing)”.

成功手法記憶領域34は、PC80とのユニキャスト通信を実行可能であったプリンタ10の過去のIPアドレスを得るために利用されたIPアドレス設定手法(以下では「成功手法」と呼ぶ)を示す手法情報を記憶する。本実施例では、成功手法記憶領域34は、最新の1個の成功手法を示す手法情報を記憶する。ただし、変形例では、成功手法記憶領域34は、複数個の成功手法を示す複数個の手法情報を記憶可能であってもよい。   The successful technique storage area 34 is a technique that indicates an IP address setting technique (hereinafter referred to as “success technique”) used to obtain a past IP address of the printer 10 that could execute unicast communication with the PC 80. Store information. In the present embodiment, the successful technique storage area 34 stores technique information indicating the latest one successful technique. However, in the modified example, the successful technique storage area 34 may be capable of storing a plurality of pieces of technique information indicating a plurality of successful techniques.

成功IP記憶領域36は、PC80とのユニキャスト通信を実行可能であったプリンタ10の過去のIPアドレス(以下では「成功IPアドレス」と呼ぶ)を記憶する。特に、成功IP記憶領域36は、「STATIC」に従って設定された成功IPアドレスを記憶する。成功IP記憶領域36は、最新の1個の成功IPアドレスを記憶する。ただし、変形例では、成功IP記憶領域36は、複数個の成功IPアドレスを記憶可能であってもよい。なお、成功IP記憶領域36は、成功IPアドレスと同時に利用されていたプリンタ10の過去のサブネットマスクも記憶する。   The successful IP storage area 36 stores a past IP address (hereinafter referred to as “successful IP address”) of the printer 10 that was able to execute unicast communication with the PC 80. In particular, the success IP storage area 36 stores a success IP address set according to “STATIC”. The successful IP storage area 36 stores the latest one successful IP address. However, in a modified example, the success IP storage area 36 may be capable of storing a plurality of success IP addresses. The successful IP storage area 36 also stores the past subnet mask of the printer 10 that was used simultaneously with the successful IP address.

受信IP記憶領域38は、プリンタ10が過去に受信したパケットに含まれる送信元IPアドレスを記憶する。受信IP記憶領域38が記憶可能なIPアドレスの数は、予め決められている(以下では「所定数」と呼ぶ)。制御部20は、受信IP記憶領域38に上記の所定数のIPアドレスが記憶されている状態で新たなパケットを受信すると、受信IP記憶領域38に記憶されている最も古いIPアドレスを削除し、当該新たなパケットに含まれる送信元IPアドレスを受信IP記憶領域38に記憶させる。   The reception IP storage area 38 stores a transmission source IP address included in a packet received by the printer 10 in the past. The number of IP addresses that can be stored in the reception IP storage area 38 is determined in advance (hereinafter referred to as “predetermined number”). When receiving a new packet with the predetermined number of IP addresses stored in the reception IP storage area 38, the control unit 20 deletes the oldest IP address stored in the reception IP storage area 38, The source IP address included in the new packet is stored in the received IP storage area 38.

(PC80の構成)
PC80は、図示省略の操作部、表示部、制御部等を備える。PC80には、プリンタ10のためのプリンタドライバがインストールされている。プリンタドライバがPC80にインストールされる際に、プリンタポートが生成される。プリンタポートでは、プリンタ10のノード名が指定されている。ユーザは、PC80の操作部を操作して、印刷対象のデータ(以下では「印刷データ」と呼ぶ)を選択することができる。この場合、PC80の制御部は、印刷データをプリンタ10で印刷させるための処理(後述する)を実行する。
(Configuration of PC80)
The PC 80 includes an operation unit, a display unit, a control unit, etc. (not shown). A printer driver for the printer 10 is installed in the PC 80. When the printer driver is installed in the PC 80, a printer port is generated. In the printer port, the node name of the printer 10 is designated. The user can select data to be printed (hereinafter referred to as “print data”) by operating the operation unit of the PC 80. In this case, the control unit of the PC 80 executes processing (described later) for causing the printer 10 to print the print data.

(DHCPサーバ90の構成)
DHCPサーバ90は、LAN4に接続されているデバイス(例えば、プリンタ10、PC80等)からの要求に応じて、上記のデバイスにIPアドレス及びサブネットマスクを割り当てる。例えば、プリンタ10のIPアドレス設定手法が「DHCP」である場合には、プリンタ10の制御部20は、IPアドレスの割り当てを要求するコマンドをDHCPサーバ90に送信する。この場合、DHCPサーバ90は、予め決められているIPアドレスの範囲内から選択されるIPアドレスと、予め決められているサブネットマスクと、をプリンタ10に割り当てる(送信する)。これにより、プリンタ10の制御部20は、DHCPサーバ90からIPアドレス及びサブネットマスクを取得して、プリンタ10の設定値として記憶することができる(即ち設定記憶領域32に記憶させることができる)。同様に、PC80の制御部は、DHCPサーバ90からIPアドレス及びサブネットマスクを取得して、PC80の設定値として記憶することができる。
(Configuration of DHCP server 90)
The DHCP server 90 assigns an IP address and a subnet mask to the above device in response to a request from a device (for example, the printer 10 or the PC 80) connected to the LAN 4. For example, when the IP address setting method of the printer 10 is “DHCP”, the control unit 20 of the printer 10 transmits a command requesting IP address assignment to the DHCP server 90. In this case, the DHCP server 90 assigns (transmits) an IP address selected from a predetermined IP address range and a predetermined subnet mask to the printer 10. Thereby, the control unit 20 of the printer 10 can acquire the IP address and the subnet mask from the DHCP server 90 and store them as setting values of the printer 10 (that is, can be stored in the setting storage area 32). Similarly, the control unit of the PC 80 can acquire the IP address and subnet mask from the DHCP server 90 and store them as setting values of the PC 80.

(プリンタ10のIPアドレス設定手法)
上述したように、プリンタ10のIPアドレス設定手法として、「STATIC」、「DHCP」、「BOOTP」、「RARP」、及び、「APIPA」が存在する。ユーザは、プリンタ10の操作部12を操作することによって、上記の5種類のIPアドレス設定手法の中から、1種類のIPアドレス設定手法を選択する。この場合、制御部20は、ユーザによって選択されたIPアドレス設定手法を示す手法情報(例えば、「STATIC」が選択された場合には、「STATIC」を示す情報)を、設定記憶領域32に記憶させる。
(IP address setting method of the printer 10)
As described above, “STATIC”, “DHCP”, “BOOTP”, “RARP”, and “APIPA” exist as IP address setting methods for the printer 10. The user operates the operation unit 12 of the printer 10 to select one type of IP address setting method from the above five types of IP address setting methods. In this case, the control unit 20 stores method information indicating the IP address setting method selected by the user (for example, information indicating “STATIC” when “STATIC” is selected) in the setting storage area 32. Let

(STATIC)
ユーザは、「STATIC」を選択する場合に、さらに、操作部12を操作して、プリンタ10に設定されるべきIPアドレス及びサブネットマスクをプリンタ10に入力する。制御部20は、ユーザによって入力されたIPアドレス及びサブネットマスクを、プリンタ10の設定値として記憶する(即ち設定記憶領域32に記憶させる)。
(STATIC)
When selecting “STATIC”, the user further operates the operation unit 12 to input the IP address and subnet mask to be set in the printer 10 to the printer 10. The control unit 20 stores the IP address and subnet mask input by the user as setting values of the printer 10 (that is, stores them in the setting storage area 32).

(DHCP)
「DHCP」が選択される場合には、制御部20は、IPアドレスの割り当てを要求するコマンドをDHCPサーバ90に送信して、DHCPサーバ90からIPアドレス及びサブネットマスクを取得する。プリンタ10は、DHCPサーバ90から取得されるIPアドレス及びサブネットマスクを、プリンタ10の設定値として記憶する。
(DHCP)
When “DHCP” is selected, the control unit 20 transmits a command requesting assignment of an IP address to the DHCP server 90 and acquires the IP address and the subnet mask from the DHCP server 90. The printer 10 stores the IP address and subnet mask acquired from the DHCP server 90 as setting values of the printer 10.

(BOOTP)
「BOOTP」が選択される場合には、制御部20は、IPアドレスの割り当てを要求するコマンドをBOOTPサーバ(図示省略)に送信して、BOOTPサーバからIPアドレス及びサブネットマスクを取得する。「BOOTP」は、コマンドの送信先がBOOTPサーバである点を除くと、「DHCP」と同様である。
(BOOTP)
When “BOOTP” is selected, the control unit 20 transmits a command requesting IP address assignment to a BOOTP server (not shown), and acquires an IP address and a subnet mask from the BOOTP server. “BOOTP” is the same as “DHCP” except that the destination of the command is a BOOTP server.

(RARP)
ユーザは、「RARP」を選択する場合に、RARPサーバ(図示省略)の操作部を操作して、プリンタ10に設定されるべきIPアドレスと、プリンタ10に設定されるべきサブネットマスクと、プリンタ10のMACアドレスと、が対応付けられている情報を、RARPサーバに登録する。プリンタ10は、RARPサーバに自己のMACアドレスを含むコマンドを送信する。RARPサーバは、コマンドに含まれるMACアドレスに対応づけられているIPアドレス及びサブネットマスクを、プリンタ10に送信する。これにより、プリンタ10は、RARPサーバからIPアドレスを取得する。プリンタ10は、RARPサーバから取得されるIPアドレス及びサブネットマスクを、プリンタ10の設定値として記憶する。
(RARP)
When the user selects “RARP”, the user operates an operation unit of a RARP server (not shown) to set an IP address to be set in the printer 10, a subnet mask to be set in the printer 10, and the printer 10. Is registered in the RARP server. The printer 10 transmits a command including its own MAC address to the RARP server. The RARP server transmits the IP address and subnet mask associated with the MAC address included in the command to the printer 10. As a result, the printer 10 acquires an IP address from the RARP server. The printer 10 stores the IP address and subnet mask acquired from the RARP server as setting values for the printer 10.

(APIPA)
「APIPA」が選択される場合には、制御部20は、APIPAに従ってIPアドレス及びサブネットマスクを生成して、プリンタ10の設定値として記憶する。なお、APIPAで生成され得るIPアドレスの範囲は、予め決められている。具体的には、「169.254.0.0」〜「169.254.255.255」の範囲である。
(APIPA)
When “APIPA” is selected, the control unit 20 generates an IP address and a subnet mask according to APIPA and stores them as setting values of the printer 10. Note that the range of IP addresses that can be generated by APIPA is determined in advance. Specifically, the range is from “169.254.0.0” to “169.254.255.255”.

なお、「STATIC」及び「RARP」では、ユーザが、IPアドレス設定手法を変更したり、IPアドレスを変更したりしない限り、プリンタ10のIPアドレスは変化しない。従って、「STATIC」及び「RARP」は、ユーザによって指定される静的なIPアドレスをプリンタ10に設定するためのIPアドレス設定手法である、と言える。なお、「APIPA」も、静的なIPアドレスをプリンタ10に設定するためのIPアドレス設定手法である、と言える。これに対し、「DHCP」及び「BOOTP」では、プリンタ10の電源がONされる毎に、DHCPサーバ90からプリンタ10に新たなIPアドレスが割り当てられる。従って、「DHCP」及び「BOOTP」は、動的なIPアドレスをプリンタ10に設定するためのIPアドレス設定手法である、と言える。   In “STATIC” and “RARP”, the IP address of the printer 10 does not change unless the user changes the IP address setting method or changes the IP address. Therefore, it can be said that “STATIC” and “RARP” are IP address setting methods for setting the printer 10 with a static IP address designated by the user. Note that “APIPA” is also an IP address setting method for setting a static IP address in the printer 10. On the other hand, in “DHCP” and “BOOTP”, a new IP address is assigned to the printer 10 from the DHCP server 90 every time the printer 10 is powered on. Accordingly, it can be said that “DHCP” and “BOOTP” are IP address setting methods for setting a dynamic IP address in the printer 10.

(メイン処理(図2))
続いて、プリンタ10が実行する処理について説明する。上述したように、PC80のユーザは、PC80の操作部を操作して、印刷データを選択することができる。この場合、PC80の制御部は、NetBIOS(Network Basic Input Output System)の一手法を用いて、プリンタ10のIPアドレスを取得することを試行する(即ち名前解決を実行する)。なお、これは、DNS(Domain Name System)サーバを用いた名前解決とは異なる手法である。具体的に言うと、PC80の制御部は、プリンタポートで指定されているプリンタ10のノード名を含む名前解決パケットを、ブロードキャストする。即ち、名前解決パケットでは、送信先IPアドレスが不特定である。なお、名前解決パケットは、送信元IPアドレスとして、PC80の現在のIPアドレスを含む。
(Main processing (Fig. 2))
Next, processing executed by the printer 10 will be described. As described above, the user of the PC 80 can select print data by operating the operation unit of the PC 80. In this case, the control unit of the PC 80 tries to acquire the IP address of the printer 10 using one method of NetBIOS (Network Basic Input Output System) (that is, executes name resolution). This is a method different from name resolution using a DNS (Domain Name System) server. Specifically, the control unit of the PC 80 broadcasts a name resolution packet including the node name of the printer 10 designated by the printer port. That is, the destination IP address is unspecified in the name resolution packet. The name resolution packet includes the current IP address of the PC 80 as the source IP address.

プリンタ10の受信部50(図1参照)は、PC80からブロードキャストされる名前解決パケットを受信する。この場合、判断部52(図1参照)は、名前解決パケットに含まれるノード名がプリンタ10のノード名であるのか否かを判断する。判断部52は、名前解決パケットに含まれるノード名がプリンタ10のノード名である場合に、図2のS10でYESと判断して、S12に進む。一方において、判断部52は、名前解決パケットに含まれるノード名がプリンタ10のノード名でない場合に、図2のS10でNOと判断する。   The receiving unit 50 (see FIG. 1) of the printer 10 receives a name resolution packet broadcast from the PC 80. In this case, the determination unit 52 (see FIG. 1) determines whether or not the node name included in the name resolution packet is the node name of the printer 10. If the node name included in the name resolution packet is the node name of the printer 10, the determination unit 52 determines YES in S10 of FIG. 2 and proceeds to S12. On the other hand, when the node name included in the name resolution packet is not the node name of the printer 10, the determination unit 52 determines NO in S10 of FIG.

S12では、判断部52は、PINGパケットを送信する。このPINGパケットは、送信先IPアドレスとして、PC80の現在のIPアドレスを含み、送信元IPアドレスとして、プリンタ10の現在のIPアドレス(即ち設定記憶領域32に現在記憶されているIPアドレス)を含む。   In S12, the determination unit 52 transmits a PING packet. This PING packet includes the current IP address of the PC 80 as the transmission destination IP address, and includes the current IP address of the printer 10 (that is, the IP address currently stored in the setting storage area 32) as the transmission source IP address. .

次いで、S14において、判断部52は、S12で送信されたPINGパケットの応答パケットを受信することを監視する。なお、詳しくは後述するが、PINGパケットの応答パケットが受信される場合は、プリンタ10がPC80とユニキャスト通信を実行可能であることを意味し、PINGパケットの応答パケットが受信されない場合は、プリンタ10がPC80とユニキャスト通信を実行不可能であることを意味する。判断部52は、PINGの応答パケットを受信することを監視することによって、プリンタ10がPC80とユニキャスト通信を実行可能であるのか否かについて、適切な判断を実行することができる。   Next, in S14, the determination unit 52 monitors whether a response packet of the PING packet transmitted in S12 is received. As will be described in detail later, if a response packet of a PING packet is received, it means that the printer 10 can execute unicast communication with the PC 80, and if a response packet of the PING packet is not received, the printer 10 10 means that unicast communication with the PC 80 cannot be executed. The determination unit 52 can execute an appropriate determination as to whether or not the printer 10 can execute unicast communication with the PC 80 by monitoring the reception of the PING response packet.

判断部52は、応答パケットを受信する場合(S14でYESの場合)に、S16〜S20をスキップして、S22に進む。一方において、判断部52は、S12でPINGパケットを送信してから所定時間が経過しても、応答パケットを受信しない場合に、S14でNOと判断してS16に進む。   When receiving a response packet (YES in S14), the determination unit 52 skips S16 to S20 and proceeds to S22. On the other hand, the determination unit 52 determines NO in S14 and proceeds to S16 when no response packet is received even after a predetermined time has elapsed since the PING packet was transmitted in S12.

なお、上述したように、S14でYESの場合は、プリンタ10がPC80とユニキャスト通信を実行可能であることを意味する。従って、フローチャート内の処理を図示省略しているが、S14でYESの場合には、制御部20は、設定記憶領域32に現在記憶されている手法情報を、成功手法記憶領域34に記憶させる。また、設定記憶領域32に現在記憶されている手法情報が「STATIC」を示す場合には、制御部20は、さらに、設定記憶領域32に現在記憶されているIPアドレス及びサブネットマスクを、成功IP記憶領域36に記憶させる。   Note that, as described above, if YES in S14, it means that the printer 10 can execute unicast communication with the PC 80. Accordingly, although the process in the flowchart is omitted in the drawing, in the case of YES in S14, the control unit 20 stores the technique information currently stored in the setting storage area 32 in the successful technique storage area 34. When the method information currently stored in the setting storage area 32 indicates “STATIC”, the control unit 20 further sets the IP address and subnet mask currently stored in the setting storage area 32 to the success IP. The data is stored in the storage area 36.

S16では、制御部20は、IPアドレス変更処理(図3参照)を実行する。次いで、S18では、制御部20は、S16のIPアドレス変更処理でIPアドレスが変更されたのか否かを判断する。制御部20は、IPアドレスが変更されたと判断する場合(S18でYESの場合)に、S22に進む。一方において、制御部20は、IPアドレスが変更されなかったと判断する場合(S18でNOの場合)、即ち、後述の図3のS66で元の各設定値に戻された場合に、S20に進む。   In S16, the control unit 20 executes an IP address change process (see FIG. 3). Next, in S18, the control unit 20 determines whether or not the IP address has been changed in the IP address changing process in S16. When determining that the IP address has been changed (YES in S18), the control unit 20 proceeds to S22. On the other hand, when the control unit 20 determines that the IP address has not been changed (in the case of NO in S18), that is, when it is returned to the original set values in S66 of FIG. .

S20では、制御部20は、IPアドレス変更処理が実行されたが、PC80とのユニキャスト通信を実行可能なIPアドレスに変更することができなかったことを示すメッセージをユーザに通知する。制御部20は、プリンタ10の表示部14にメッセージを表示させてもよいし、予め決められているデバイスにメッセージを送信してもよい(例えば電子メールを用いて送信してもよい)。S20を終えると、図2の処理が終了する。   In S20, the control unit 20 notifies the user of a message indicating that the IP address changing process has been executed, but the IP address cannot be changed to an IP address capable of performing unicast communication with the PC 80. The control unit 20 may display a message on the display unit 14 of the printer 10 or may transmit the message to a predetermined device (for example, may be transmitted using e-mail). When S20 ends, the process of FIG. 2 ends.

S22では、送信部64(図1参照)は、S10で受信された名前解決パケットの応答パケットを送信する。この応答パケットは、送信先IPアドレスとして、PC80の現在のIPアドレスを含み、送信元IPアドレスとして、プリンタ10の現在のIPアドレス(例えば、S16のIPアドレス変更処理が実行された場合には、変更後のIPアドレス)を含む。PC80は、名前解決パケットの応答パケットを受信し、この結果、プリンタ10のIPアドレスを取得することができる(即ち名前解決が成功する)。   In S22, the transmission unit 64 (see FIG. 1) transmits the response packet for the name resolution packet received in S10. This response packet includes the current IP address of the PC 80 as the transmission destination IP address, and the current IP address of the printer 10 as the transmission source IP address (for example, when the IP address change process of S16 is executed) IP address after change). The PC 80 receives the response packet for the name resolution packet, and as a result, can obtain the IP address of the printer 10 (that is, name resolution succeeds).

次いで、S24では、制御部20は、S16のIPアドレス変更処理でIPアドレスが変更されたのか否かを判断する。制御部20は、IPアドレスが変更されたと判断する場合(S24でYESの場合)に、S26に進む。一方において、制御部20は、IPアドレスが変更されなかったと判断する場合(S24でNOの場合)に、S26をスキップして、図2の処理を終了する。   Next, in S24, the control unit 20 determines whether or not the IP address has been changed in the IP address changing process in S16. When the control unit 20 determines that the IP address has been changed (YES in S24), the control unit 20 proceeds to S26. On the other hand, when determining that the IP address has not been changed (NO in S24), the control unit 20 skips S26 and ends the process of FIG.

S26では、制御部20は、IPアドレス変更処理によってIPアドレスが変更されたことを示すメッセージをユーザに通知する。メッセージは、変更前のIPアドレスと、変更後のIPアドレスと、を含む。また、IPアドレス設定手法も変更された場合には、メッセージは、さらに、変更前のIPアドレス設定手法と、変更後のIPアドレス設定手法と、を含んでいてもよい。また、サブネットマスクも変更された場合には、メッセージは、さらに、変更前のサブネットマスクと、変更後のサブネットマスクと、を含んでいてもよい。なお、メッセージの通知先は、上記のS20と同様である。S26を終えると、図2の処理が終了する。   In S26, the control unit 20 notifies the user of a message indicating that the IP address has been changed by the IP address changing process. The message includes the IP address before the change and the IP address after the change. When the IP address setting method is also changed, the message may further include an IP address setting method before the change and an IP address setting method after the change. If the subnet mask is also changed, the message may further include a subnet mask before the change and a subnet mask after the change. Note that the notification destination of the message is the same as in S20 above. When S26 ends, the process of FIG. 2 ends.

(IPアドレス変更処理)
続いて、図2のS16で実行されるIPアドレス変更処理の内容について、詳しく説明する。
(IP address change processing)
Next, the details of the IP address changing process executed in S16 of FIG. 2 will be described in detail.

(DHCPの利用)
図3に示されるように、S40において、変更部54(図1参照)は、設定記憶領域32に現在記憶されている手法情報を参照して、プリンタ10の現在のIPアドレス設定手法が「STATIC」であるのか否かを判断する。プリンタ10の現在のIPアドレス設定手法が「STATIC」である場合(S40でYESの場合)には、S42に進み、プリンタ10の現在のIPアドレス設定手法が「STATIC」でない場合(S40でNOの場合)には、S48に進む。
(Use of DHCP)
As shown in FIG. 3, in S <b> 40, the changing unit 54 (see FIG. 1) refers to the technique information currently stored in the setting storage area 32 and the current IP address setting technique of the printer 10 is “STATIC”. It is determined whether or not. If the current IP address setting method of the printer 10 is “STATIC” (YES in S40), the process proceeds to S42, and if the current IP address setting method of the printer 10 is not “STATIC” (NO in S40). In the case), the process proceeds to S48.

S42では、変更部54は、設定記憶領域32内の手法情報を、「STATIC」を示す手法情報から、「DHCP」を示す手法情報に変更する。次いで、S44において、取得部56(図1参照)は、IPアドレスの割り当てを要求するコマンドをDHCPサーバ90に送信して、DHCPサーバ90からIPアドレス及びサブネットマスクを取得する。次いで、S46において、変更部54は、設定記憶領域32内のIPアドレス及びサブネットマスクを、S44で取得されたIPアドレス及びサブネットマスクに変更する。この構成によると、PC80とのユニキャスト通信を実行可能な適切なIPアドレスを、プリンタ10に新たに設定し得る。S46を終えると、S60に進む。   In S <b> 42, the changing unit 54 changes the method information in the setting storage area 32 from the method information indicating “STATIC” to the method information indicating “DHCP”. Next, in S <b> 44, the acquisition unit 56 (see FIG. 1) transmits a command requesting IP address assignment to the DHCP server 90 and acquires the IP address and subnet mask from the DHCP server 90. Next, in S46, the changing unit 54 changes the IP address and subnet mask in the setting storage area 32 to the IP address and subnet mask acquired in S44. According to this configuration, an appropriate IP address capable of performing unicast communication with the PC 80 can be newly set in the printer 10. When S46 ends, the process proceeds to S60.

(APIPAの利用)
S48では、変更部54は、PC80の現在のIPアドレスが、APIPAで生成され得るIPアドレスの範囲、即ち、「169.254.0.0」〜「169.254.255.255」に含まれるのか否かを判断する。PC80の現在のIPアドレスが上記の範囲に含まれる場合(S48でYESの場合)には、S50に進み、PC80の現在のIPアドレスが上記の範囲に含まれない場合(S48でNOの場合)には、S56に進む。
(Use of APIPA)
In S48, the changing unit 54 includes the current IP address of the PC 80 in a range of IP addresses that can be generated by APIPA, that is, “169.254.0.0” to “169.254.255.255”. It is determined whether or not. If the current IP address of the PC 80 is included in the above range (YES in S48), the process proceeds to S50, and if the current IP address of the PC 80 is not included in the above range (NO in S48). The process proceeds to S56.

S50では、変更部54は、設定記憶領域32内の手法情報を、「APIPA」を示す手法情報に変更する。なお、S50が実行される時点において、設定記憶領域32内の手法情報が、「APIPA」を示す手法情報である場合には、S50がスキップされる。次いで、S52において、第1の生成部58(図1参照)は、APIPAのアルゴリズムを用いて、IPアドレスを生成する。即ち、第1の生成部58は、「169.254.0.0」〜「169.254.255.255」の中から、1個のIPアドレスを選択することによって、IPアドレスを生成する。なお、S52では、さらに、第1の生成部58は、APIPAで予め決められているサブネットマスク「255.255.0.0」を生成する。次いで、S54において、変更部54は、設定記憶領域32内のIPアドレス及びサブネットマスクを、S52で生成されたIPアドレス及びサブネットマスクに変更する。この構成によると、PC80とのユニキャスト通信を実行可能な適切なIPアドレスを、プリンタ10に新たに設定し得る。S54を終えると、S60に進む。   In S50, the changing unit 54 changes the technique information in the setting storage area 32 to the technique information indicating “APIPA”. When the method information in the setting storage area 32 is the method information indicating “APIPA” at the time when S50 is executed, S50 is skipped. Next, in S52, the first generation unit 58 (see FIG. 1) generates an IP address using an APIPA algorithm. That is, the first generation unit 58 generates an IP address by selecting one IP address from “169.254.0.0” to “169.254.255.255”. In S52, the first generation unit 58 further generates a subnet mask “255.255.0.0” predetermined by APIPA. Next, in S54, the changing unit 54 changes the IP address and subnet mask in the setting storage area 32 to the IP address and subnet mask generated in S52. According to this configuration, an appropriate IP address capable of performing unicast communication with the PC 80 can be newly set in the printer 10. When S54 ends, the process proceeds to S60.

(成功手法の利用)
S56では、変更部54は、成功手法を示す手法情報(以下では「成功手法情報」と呼ぶ)が成功手法記憶領域34に記憶されているのか否かを判断する。成功手法情報が成功手法記憶領域34に記憶されている場合(S56でYESの場合)には、S58に進み、成功手法情報が成功手法記憶領域34に記憶されていない場合(S56でNOの場合)には、図4のS90に進む。
(Use of successful methods)
In S <b> 56, the changing unit 54 determines whether or not technique information indicating a successful technique (hereinafter referred to as “success technique information”) is stored in the successful technique storage area 34. If the successful technique information is stored in the successful technique storage area 34 (YES in S56), the process proceeds to S58, and if the successful technique information is not stored in the successful technique storage area 34 (NO in S56). ) Proceeds to S90 of FIG.

S58では、制御部20は、成功手法処理を実行する。図4に示されるように、成功手法処理では、S80において、変更部54は、成功手法情報が示す成功手法が「STATIC」であるのか否かを判断する。成功手法が「STATIC」である場合(S80でYESの場合)には、S82に進み、成功手法が「STATIC」でない場合(S80でNOの場合)には、S86に進む。   In S58, the control unit 20 executes a successful technique process. As shown in FIG. 4, in the successful technique process, in S80, the changing unit 54 determines whether or not the successful technique indicated by the successful technique information is “STATIC”. If the successful technique is “STATIC” (YES in S80), the process proceeds to S82, and if the successful technique is not “STATIC” (NO in S80), the process proceeds to S86.

成功手法が「STATIC」である場合には、通常、成功IP記憶領域36に成功IPアドレス及びサブネットマスクが記憶されている。S82では、確認部62(図1参照)は、成功IP記憶領域36に記憶されている成功IPアドレスを含むARPパケットをブロードキャストする。   When the success method is “STATIC”, the success IP address and the subnet mask are usually stored in the success IP storage area 36. In S <b> 82, the confirmation unit 62 (see FIG. 1) broadcasts an ARP packet including the successful IP address stored in the successful IP storage area 36.

次いで、S84において、確認部62は、ARPパケットの応答パケットを受信することを監視する。例えば、ARPパケットに含まれる成功IPアドレスが、LAN4に接続されている他のデバイスに現在設定されている場合には、当該他のデバイスは、ARPパケットの応答パケットを送信する。この場合、確認部62は、ARPパケットの応答パケットを受信して、S84でYESと判断し、S90に進む。一方において、ARPパケットに含まれる成功IPアドレスが、LAN4に接続されているいずれのデバイスにも現在設定されていない場合には、確認部62は、ARPパケットの応答パケットを受信せず、S84でNOと判断し、S86に進む。S82及びS84でARPパケットが利用されるために、他のデバイスのIPアドレスと同じIPアドレスが、プリンタ10に設定されるのを抑制することができる。   Next, in S84, the confirmation unit 62 monitors reception of a response packet for the ARP packet. For example, when the successful IP address included in the ARP packet is currently set in another device connected to the LAN 4, the other device transmits a response packet of the ARP packet. In this case, the confirmation unit 62 receives the response packet of the ARP packet, determines YES in S84, and proceeds to S90. On the other hand, if the successful IP address included in the ARP packet is not currently set in any device connected to the LAN 4, the confirmation unit 62 does not receive the response packet of the ARP packet, and in S84 NO is determined and the process proceeds to S86. Since the ARP packet is used in S82 and S84, it is possible to prevent the printer 10 from being set to the same IP address as the IP address of another device.

S86では、変更部54は、成功手法に対応するIPアドレスを取得可能であるのか否かを判断する。例えば、S84でNOの場合に実行されるS88では、成功手法が「STATIC」であり、成功IPアドレス及びサブネットマスクが成功IP記憶領域36に記憶されている。従って、この場合、変更部54は、成功手法に対応するIPアドレス(即ち成功IPアドレス)を取得可能であるために、S86でYESと判断して、S88に進む。   In S86, the changing unit 54 determines whether or not an IP address corresponding to the successful technique can be acquired. For example, in S88 executed when NO in S84, the success technique is “STATIC”, and the success IP address and subnet mask are stored in the success IP storage area. Therefore, in this case, since the changing unit 54 can acquire the IP address corresponding to the successful technique (that is, the successful IP address), it determines YES in S86 and proceeds to S88.

また、S80でNOと判断される場合には、成功手法は、「DCHP」、「BOOTP」、「RARP」、及び、「APIPA」のいずれかである。例えば、成功手法が「DHCP」又は「BOOTP」である場合には、S86において、取得部56は、IPアドレスの割り当てを要求するコマンドをDHCPサーバ90又はBOOTPサーバに送信して、IPアドレス及びサブネットマスクを取得することを試行する。また、例えば、成功手法が「RARP」である場合には、変更部54は、プリンタ10のMACアドレスを含むコマンドをRARPサーバに送信して、IPアドレス及びサブネットマスクを取得することを試行する。変更部54は、上記の試行が成功した場合(即ちコマンドの送信先のサーバからIPアドレス及びサブネットマスクが取得された場合)に、S86でYESと判断して、S88に進み、上記の試行が成功しなかった場合に、S86でNOと判断して、S90に進む。なお、例えば、成功手法が「APIPA」である場合には、S86において、第1の生成部58は、APIPAのアルゴリズムを用いて、IPアドレスを生成する。この場合、変更部54は、成功手法に対応するIPアドレスを取得可能であるために、S86でYESと判断して、S88に進む。   If NO is determined in S80, the successful technique is any one of “DCHP”, “BOOTP”, “RARP”, and “APIPA”. For example, if the successful technique is “DHCP” or “BOOTP”, in S86, the acquisition unit 56 transmits a command requesting IP address assignment to the DHCP server 90 or the BOOTP server, and the IP address and subnet Try to get the mask. For example, when the success method is “RARP”, the changing unit 54 transmits a command including the MAC address of the printer 10 to the RARP server and tries to acquire the IP address and the subnet mask. The changing unit 54 determines YES in S86 when the above trial is successful (that is, when the IP address and the subnet mask are acquired from the server to which the command is transmitted), and proceeds to S88. If not successful, NO is determined in S86, and the process proceeds to S90. For example, when the success technique is “APIPA”, in S86, the first generation unit 58 generates an IP address using an APIPA algorithm. In this case, since the changing unit 54 can acquire the IP address corresponding to the successful technique, the changing unit 54 determines YES in S86 and proceeds to S88.

S88では、変更部54は、設定記憶領域32内の手法情報を、成功手法記憶領域34に記憶されている成功手法情報に変更する。なお、S88が実行される時点において、設定記憶領域32内の手法情報と、成功手法情報と、が一致する場合には、S88がスキップされる。S88を終えると、S98に進む。   In S88, the changing unit 54 changes the technique information in the setting storage area 32 to the successful technique information stored in the successful technique storage area 34. Note that, when the method information in the setting storage area 32 matches the successful method information at the time when S88 is executed, S88 is skipped. When S88 ends, the process proceeds to S98.

S90では、第2の生成部60(図1参照)は、PC80の現在のIPアドレスの一部の値を変更することによって、候補のIPアドレスを生成する。なお、第2の生成部60は、受信IP記憶領域38に記憶されている複数のIPアドレスのいずれにも一致しない候補のIPアドレスを生成する。S90の具体例として、以下の(第1の例)及び(第2の例)を挙げることができる。   In S90, the second generation unit 60 (see FIG. 1) generates a candidate IP address by changing a part of the value of the current IP address of the PC 80. The second generation unit 60 generates a candidate IP address that does not match any of the plurality of IP addresses stored in the received IP storage area 38. Specific examples of S90 include the following (first example) and (second example).

(S90の具体例:第1の例)
例えば、プリンタ10の現在のサブネットマスクが、先頭の16ビットをマスクするものである場合(即ち「255.255.0.0」である場合)には、第2の生成部60は、PC80の現在のサブネットマスクが、先頭の24ビットをマスクするものであると仮定する(即ち仮のサブネットマスク=「255.255.255.0」)。次いで、第2の生成部60は、PC80の現在のIPアドレス(例えば「192.168.1.2」)と、仮のサブネットマスク(例えば「255.255.255.0」)と、を用いて、ネットワークアドレス部の値(例えば「192.168.1」)を決定する。次いで、第2の生成部60は、PC80の現在のIPアドレスに含まれる最後の8ビットの値(例えば「2」)と異なる値(例えば「3」)を、候補の値として決定する。次いで、第2の生成部60は、ネットワークアドレス部の値(例えば「192.168.1」)と、候補の値(例えば「3」)と、を用いて(即ち論理和を算出して)、候補のIPアドレス(例えば「192.168.1.3」)を生成する。
(Specific example of S90: first example)
For example, if the current subnet mask of the printer 10 masks the first 16 bits (that is, “255.255.0.0”), the second generation unit 60 sets the PC 80 Assume that the current subnet mask masks the first 24 bits (ie, temporary subnet mask = “255.255.255.0”). Next, the second generation unit 60 uses the current IP address of the PC 80 (for example, “192.168.1.2”) and a temporary subnet mask (for example, “255.255.255.0”). Then, the value of the network address portion (for example, “192.168.1”) is determined. Next, the second generation unit 60 determines a value (for example, “3”) different from the last 8-bit value (for example, “2”) included in the current IP address of the PC 80 as a candidate value. Next, the second generation unit 60 uses the value of the network address part (for example, “192.168.1”) and the candidate value (for example, “3”) (that is, calculates a logical sum). , A candidate IP address (for example, “192.168.1.3”) is generated.

(S90の具体例:第2の例)
例えば、プリンタ10の現在のサブネットマスクが、先頭の24ビットをマスクするものである場合(即ち「255.255.255.0」である場合)には、第2の生成部60は、PC80の現在のサブネットマスクが、先頭の28ビットをマスクするものであると仮定する(即ち仮のサブネットマスク=「255.255.255.240」と仮定する)。後の処理は、上記の第1の例と同様である。
(Specific example of S90: second example)
For example, if the current subnet mask of the printer 10 masks the first 24 bits (that is, “255.255.255.0”), the second generation unit 60 sets the PC 80 Assume that the current subnet mask is to mask the first 28 bits (ie tentative subnet mask = “255.255.255.240”). The subsequent processing is the same as in the first example.

上記のS90の処理は、以下のように表現することができる。即ち、第2の生成部60は、PC80の現在のIPアドレスのうちの第1の部分(第1の例では先頭の24ビット、第2の例では先頭の28ビット)をマスクして、PC80の現在のIPアドレスのうちの第1の部分と異なる第2の部分の値を変更することによって、候補のIPアドレスを生成する。第1の部分の桁数は、プリンタ10の現在のサブネットマスクのマスク部分の桁数(第1の例では先頭の16ビット、第2の例では先頭の24ビット)よりも大きい。   The process of S90 can be expressed as follows. That is, the second generation unit 60 masks the first portion of the current IP address of the PC 80 (the first 24 bits in the first example, the first 28 bits in the second example), and the PC 80 The candidate IP address is generated by changing the value of the second part of the current IP address different from the first part. The number of digits of the first part is larger than the number of digits of the mask part of the current subnet mask of the printer 10 (first 16 bits in the first example, first 24 bits in the second example).

S90を終えると、S92において、確認部62は、S90で生成された候補のIPアドレスを含むARPパケットをブロードキャストする。次いで、S94において、確認部62は、ARPパケットの応答パケットを受信することを監視する。ARPパケットの応答パケットが受信される場合(S94でYESの場合)は、他のデバイスに候補のIPアドレスが現在設定されていることを意味する。従って、第2の生成部60は、S90において、前回の候補のIPアドレスと異なる新たな候補のIPアドレスを再び生成する。一方において、ARPパケットの応答パケットが受信されない場合(S94でNOの場合)は、他のデバイスに候補のIPアドレスが現在設定されていないことを意味する。この場合、S96に進む。S92及びS94でARPパケットが利用されるために、他のデバイスのIPアドレスと同じIPアドレスが、プリンタ10に設定されるのを抑制することができる。   When S90 ends, in S92, the confirmation unit 62 broadcasts an ARP packet including the candidate IP address generated in S90. Next, in S94, the confirmation unit 62 monitors whether a response packet for the ARP packet is received. When the response packet of the ARP packet is received (YES in S94), it means that the candidate IP address is currently set in another device. Accordingly, in S90, the second generation unit 60 generates again a new candidate IP address different from the previous candidate IP address. On the other hand, when the response packet of the ARP packet is not received (NO in S94), it means that no candidate IP address is currently set in another device. In this case, the process proceeds to S96. Since the ARP packet is used in S92 and S94, it is possible to prevent the printer 10 from being set to the same IP address as the IP address of another device.

S96では、変更部54は、設定記憶領域32内の手法情報を、「STATIC」を示す手法情報に変更する。なお、S96が実行される時点において、設定記憶領域32内の手法情報が、「STATIC」を示す手法情報である場合には、S96がスキップされる。S96を終えると、S98に進む。   In S96, the changing unit 54 changes the method information in the setting storage area 32 to the method information indicating “STATIC”. When the method information in the setting storage area 32 is the method information indicating “STATIC” at the time when S96 is executed, S96 is skipped. When S96 ends, the process proceeds to S98.

S98では、変更部54は、設定記憶領域32内のIPアドレス及びサブネットマスクを変更する。例えば、S84でNOの場合に実行されるS98では、変更部54は、設定記憶領域32内のIPアドレス及びサブネットマスクを、成功IP記憶領域36に記憶されている成功IPアドレス及びサブネットマクスに変更する。また、S80でNOと判断され、かつ、S86でYESと判断される場合に実行されるS98では、変更部54は、設定記憶領域32内のIPアドレス及びサブネットマスクを、S86で取得されたIPアドレス及びサブネットマクスに変更する。また、S96を経て実行されるS98では、変更部54は、設定記憶領域32内のIPアドレス及びサブネットマスクを、S90で生成された候補のIPアドレス及び仮のサブネットマスクに変更する。この構成によると、PC80とのユニキャスト通信を実行可能な適切なIPアドレスを、プリンタ10に新たに設定し得る。S98を終えると、成功手法処理が終了する。   In S98, the changing unit 54 changes the IP address and subnet mask in the setting storage area 32. For example, in S98 executed when NO in S84, the changing unit 54 changes the IP address and subnet mask in the setting storage area 32 to the successful IP address and subnet max stored in the success IP storage area 36. To do. In S98 executed when NO is determined in S80 and YES is determined in S86, the changing unit 54 sets the IP address and subnet mask in the setting storage area 32 to the IP acquired in S86. Change to address and subnet max. In S98 executed through S96, the changing unit 54 changes the IP address and subnet mask in the setting storage area 32 to the candidate IP address and temporary subnet mask generated in S90. According to this configuration, an appropriate IP address capable of performing unicast communication with the PC 80 can be newly set in the printer 10. When S98 ends, the successful technique processing ends.

(図3のS60以降の処理)
成功手法処理が終了すると、図3のS60に進む。S60では、制御部20は、PINGパケットを送信する。このPINGパケットは、送信先IPアドレスとして、PC80の現在のIPアドレスを含み、送信元IPアドレスとして、プリンタ10の変更後のIPアドレス(即ち設定記憶領域32に現在記憶されているIPアドレス)を含む。
(Processing after S60 in FIG. 3)
When the successful technique process ends, the process proceeds to S60 of FIG. In S60, the control unit 20 transmits a PING packet. This PING packet includes the current IP address of the PC 80 as the transmission destination IP address, and the changed IP address of the printer 10 (that is, the IP address currently stored in the setting storage area 32) as the transmission source IP address. Including.

次いで、S62において、制御部20は、S60で送信されたPINGパケットの応答パケットを受信すること監視する。制御部20は、応答パケットを受信する場合(S62でYESの場合)に、S64及びS66をスキップして、図3の処理を終了する。一方において、制御部20は、S60でPINGパケットを送信してから所定時間が経過しても、応答パケットを受信しない場合に、S62でNOと判断してS64に進む。   Next, in S62, the control unit 20 monitors to receive the response packet of the PING packet transmitted in S60. When receiving the response packet (YES in S62), the control unit 20 skips S64 and S66 and ends the process of FIG. On the other hand, the control unit 20 determines NO in S62 and proceeds to S64 when no response packet is received even after a predetermined time has elapsed since the PING packet was transmitted in S60.

S64では、制御部20は、設定記憶領域32に記憶されているIPアドレスが変更された回数(以下では「リトライ回数」と呼ぶ)が、所定値に達したのか否かを判断する。、制御部20は、リトライ回数が所定値に達していない場合(S64でNOの場合)に、S40に戻り、リトライ回数が所定値に達した場合(S64でYESの場合)に、S66に進む。S66では、変更部54は、設定記憶領域32内の各設定値(IPアドレス、サブネットマスク、IPアドレス設定手法)を、図3のIPアドレス変更処理が実行される前の各設定値に戻す。S66を終えると、図3の処理が終了する。   In S64, the control unit 20 determines whether or not the number of times the IP address stored in the setting storage area 32 has been changed (hereinafter referred to as “retry number”) has reached a predetermined value. The control unit 20 returns to S40 when the number of retries has not reached the predetermined value (NO in S64), and proceeds to S66 when the number of retries reaches the predetermined value (YES in S64). . In S66, the changing unit 54 returns each setting value (IP address, subnet mask, IP address setting method) in the setting storage area 32 to each setting value before the IP address changing process of FIG. 3 is executed. When S66 ends, the process of FIG. 3 ends.

以上のように、本実施例によると、プリンタ10は、PC80からの指示、又は、操作部12を介した指示を受けなくても、上記の種々の方法を用いて、プリンタ10のIPアドレスを主体的に変更することができる。即ち、ユーザがプリンタ10のIPアドレスを変更するための作業を行なわなくても、プリンタ10のIPアドレスを変更可能である。   As described above, according to the present embodiment, the printer 10 can obtain the IP address of the printer 10 using the above-described various methods without receiving an instruction from the PC 80 or an instruction via the operation unit 12. It can be changed independently. That is, the IP address of the printer 10 can be changed without the user performing an operation for changing the IP address of the printer 10.

(具体的なケース(図5))
図5に示されるように、PC80では、IPアドレス設定手法が「DHCP」であり、IPアドレスが「192.168.1.2」であり、サブネットマスクが「255.255.255.0」である。従って、PC80のIPアドレスのネットワークアドレス部の値は、「192.168.1」である。
(Specific case (Fig. 5))
As shown in FIG. 5, in the PC 80, the IP address setting method is “DHCP”, the IP address is “192.168.1.2”, and the subnet mask is “255.255.255.0”. is there. Therefore, the value of the network address part of the IP address of the PC 80 is “192.168.1.”

図5では、ユーザが、プリンタ10のIPアドレス設定手法を、「DHCP」から「STATIC」に変更する場合を想定している。上述したように、PC80のIPアドレス設定手法は、「DHCP」である。従って、プリンタ10のIPアドレス設定手法が「DHCP」から「STATIC」に変更される前には、プリンタ10及びPC80のそれぞれに、DHCPサーバ90からIPアドレス及びサブネットマスクが割り当てられる。この場合、プリンタ10及びPC80は、通常、適切にユニキャスト通信を実行し得る。ただし、プリンタ10のIPアドレス設定手法が「DHCP」から「STATIC」に変更される場合には、プリンタ10のIPアドレス及びサブネットマスクが、ユーザによって指定される。   In FIG. 5, it is assumed that the user changes the IP address setting method of the printer 10 from “DHCP” to “STATIC”. As described above, the IP address setting method of the PC 80 is “DHCP”. Therefore, before the IP address setting method of the printer 10 is changed from “DHCP” to “STATIC”, an IP address and a subnet mask are assigned from the DHCP server 90 to each of the printer 10 and the PC 80. In this case, the printer 10 and the PC 80 can normally perform unicast communication appropriately. However, when the IP address setting method of the printer 10 is changed from “DHCP” to “STATIC”, the IP address and subnet mask of the printer 10 are designated by the user.

図5は、ユーザによって指定されたプリンタ10のIPアドレス及びサブネットマスクを示す。即ち、プリンタ10では、IPアドレス設定手法が「STATIC」であり、IPアドレスが「192.168.2.3」であり、サブネットマスクが「255.255.0.0」である。従って、プリンタ10のIPアドレスのネットワークアドレス部の値は、「192.168」である。上述したように、PC80のIPアドレスのネットワークアドレス部の値は、「192.168.1」である。従って、プリンタ10とPC80との間でネットワークアドレスが異なる。   FIG. 5 shows the IP address and subnet mask of the printer 10 designated by the user. That is, in the printer 10, the IP address setting method is “STATIC”, the IP address is “192.168.2.3”, and the subnet mask is “255.255.0.0”. Therefore, the value of the network address part of the IP address of the printer 10 is “192.168.”. As described above, the value of the network address portion of the IP address of the PC 80 is “192.168.1.” Therefore, the network address is different between the printer 10 and the PC 80.

上述したように、PC80は、プリンタ10のノード名「AAA」を含む名前解決パケットNPをブロードキャストする。なお、名前解決パケットNPは、送信元IPアドレスとして、PC80の現在のIPアドレス「192.168.1.2」を含む。   As described above, the PC 80 broadcasts the name resolution packet NP including the node name “AAA” of the printer 10. The name resolution packet NP includes the current IP address “192.168.1.2” of the PC 80 as the source IP address.

プリンタ10の受信部50は、名前解決パケットNPを受信する(図2のS10参照)。プリンタ10の制御部20は、通常、パケットが受信される毎に、当該パケットが妥当であるのか否かを判断する。制御部20は、妥当であると判断されるパケットについて、当該パケットに従った処理を実行し、妥当でないと判断されるパケットについて、当該パケットに従った処理を実行せずに、当該パケットを破棄する。パケットの妥当性は、当該パケットがプリンタ10と同じネットワークから送信されたものであるのか否かに基づいて、判断される。具体的に言うと、制御部20は、名前解決パケットNPに含まれる送信元IPアドレス「192.168.1.2」が、プリンタ10のネットワークアドレス「192.168」を含むのか否かを判断する。この例では、制御部20は、名前解決パケットNPが妥当であると判断する。即ち、プリンタ10とPC80との間でネットワークアドレスが異なるにも関わらず、制御部20は、名前解決パケットNPが妥当であると判断して、名前解決パケットNPを破棄しない。   The receiving unit 50 of the printer 10 receives the name resolution packet NP (see S10 in FIG. 2). The control unit 20 of the printer 10 normally determines whether or not the packet is valid every time the packet is received. The control unit 20 performs a process according to the packet for a packet determined to be valid, and discards the packet for a packet determined to be invalid without performing a process according to the packet. To do. The validity of the packet is determined based on whether or not the packet is transmitted from the same network as the printer 10. Specifically, the control unit 20 determines whether the transmission source IP address “192.168.1.2” included in the name resolution packet NP includes the network address “192.168.168” of the printer 10. To do. In this example, the control unit 20 determines that the name resolution packet NP is valid. That is, although the network address is different between the printer 10 and the PC 80, the control unit 20 determines that the name resolution packet NP is valid and does not discard the name resolution packet NP.

次いで、プリンタ10の判断部52は、PINGパケットP1を送信する(図2のS12参照)。なお、PINGパケットP1は、送信先IPアドレスとして、PC80の現在のIPアドレス「192.168.1.2」を含み、送信元IPアドレスとして、プリンタ10の現在のIPアドレス「192.168.2.3」を含む。   Next, the determination unit 52 of the printer 10 transmits the PING packet P1 (see S12 in FIG. 2). The PING packet P1 includes the current IP address “192.168.1.2” of the PC 80 as the destination IP address, and the current IP address “192.168.8.2” of the printer 10 as the source IP address. .3 ".

PC80は、PINGパケットP1が妥当であるのか否かを判断する。即ち、PC80は、PINGパケットP1に含まれる送信元IPアドレス「192.168.2.3」が、PC80のネットワークアドレス「192.168.1」を含むのか否かを判断する。この例では、PC80は、PINGパケットP1が妥当でないと判断して、PINGパケットP1を破棄する。即ち、PC80は、PINGパケットP1の応答パケットを送信しない。従って、このような状況では、プリンタ10は、プリンタ10のIPアドレス「192.168.2.3」と、PC80のIPアドレス「192.168.1.2」と、を用いて、PC80とのユニキャスト通信を実行不可能である。   The PC 80 determines whether or not the PING packet P1 is valid. That is, the PC 80 determines whether or not the transmission source IP address “192.168.2.3” included in the PING packet P1 includes the network address “192.168.1” of the PC 80. In this example, the PC 80 determines that the PING packet P1 is not valid and discards the PING packet P1. That is, the PC 80 does not transmit a response packet for the PING packet P1. Therefore, in such a situation, the printer 10 uses the IP address “192.168.2.3” of the printer 10 and the IP address “192.168.1.2” of the PC 80 to communicate with the PC 80. Unicast communication is not possible.

図5の例では、PC80からPINGパケットP1の応答パケットが送信されないために、プリンタ10の判断部52は、PC80とのユニキャスト通信を実行不可能であると判断して、図2のS14でNOと判断する。即ち、図2のS14の判断処理は、PC80とのユニキャスト通信を実行可能であるのか否かを判断することに等しい。より具体的に言うと、図2のS14の判断処理は、プリンタ10のIPアドレスのネットワークアドレス部の値と、PC80のIPアドレスのネットワークアドレス部の値と、が一致するのか否かを判断することに等しい。   In the example of FIG. 5, since the response packet of the PING packet P1 is not transmitted from the PC 80, the determination unit 52 of the printer 10 determines that unicast communication with the PC 80 cannot be performed, and in S14 of FIG. Judge NO. That is, the determination process in S14 of FIG. 2 is equivalent to determining whether or not unicast communication with the PC 80 can be performed. More specifically, the determination process in S14 of FIG. 2 determines whether or not the value of the network address part of the IP address of the printer 10 matches the value of the network address part of the IP address of the PC 80. Is equal.

PC80とのユニキャスト通信を実行不可能であると判断される場合(図2のS14でNOの場合)には、制御部20は、IPアドレス変更処理を実行する(図2のS16参照)。図5の例では、プリンタ10のIPアドレス設定手法が「STATIC」である。従って、図3のS40でYESと判断されるために、S42において、変更部54は、プリンタ10のIPアドレス設定手法を、「STATIC」から「DHCP」に変更する。さらに、S44において、取得部56は、DHCPサーバ90から、IPアドレス「192.168.1.3」及びサブネットマスク「255.255.255.0」を取得する。PC80が利用しているDHCPサーバ90から、IPアドレス及ぶサブネットマスクが取得されるために、当該IPアドレスのネットワークアドレス部の値「192.168.1」は、PC80のIPアドレスのネットワークアドレス部の値に一致する。次いで、S46において、変更部54は、設定記憶領域32内のIPアドレス及びサブネットマスクを、「192.168.2.3」及び「255.255.0.0」から、「192.168.1.3」及び「255.255.255.0」に変更する。   When it is determined that unicast communication with the PC 80 cannot be performed (NO in S14 of FIG. 2), the control unit 20 executes an IP address change process (see S16 of FIG. 2). In the example of FIG. 5, the IP address setting method of the printer 10 is “STATIC”. Accordingly, in order to determine YES in S40 of FIG. 3, in S42, the changing unit 54 changes the IP address setting method of the printer 10 from “STATIC” to “DHCP”. In S <b> 44, the acquisition unit 56 acquires the IP address “192.168.1.3” and the subnet mask “255.255.255.0” from the DHCP server 90. Since the subnet mask including the IP address is acquired from the DHCP server 90 used by the PC 80, the value “192.168.1” of the network address portion of the IP address is the network address portion of the IP address of the PC 80. Match the value. Next, in S46, the changing unit 54 changes the IP address and subnet mask in the setting storage area 32 from “192.168.2.3” and “255.255.0.0” to “192.168.1. .3 "and" 255.255.255.0 ".

次いで、S60において、制御部20は、PINGパケットP2(図5参照)を送信する。なお、PINGパケットP2は、送信先IPアドレスとして、PC80の現在のIPアドレス「192.168.1.2」を含み、送信元IPアドレスとして、プリンタ10の変更後のIPアドレス「192.168.1.3」を含む。   Next, in S60, the control unit 20 transmits a PING packet P2 (see FIG. 5). Note that the PING packet P2 includes the current IP address “192.168.1.2” of the PC 80 as the transmission destination IP address, and the IP address “192.168 .. 1.3 ".

PINGパケットP2に含まれる送信元IPアドレス「192.168.1.3」が、PC80のネットワークアドレス「192.168.1」を含むために、PC80は、PINGパケットP2が妥当であると判断する。このために、PC80は、PINGパケットP2の応答パケットR1を送信する。従って、プリンタ10の制御部20は、S62でYESと判断し、図3のIPアドレス変更処理(即ち図2のS16)を終了する。このように、IPアドレス変更処理が実行されることにより、プリンタ10とPC80とがユニキャスト通信を実行可能な状態が構築される。   Since the source IP address “192.168.1.3” included in the PING packet P2 includes the network address “192.168.1” of the PC 80, the PC 80 determines that the PING packet P2 is valid. . For this purpose, the PC 80 transmits a response packet R1 of the PING packet P2. Accordingly, the control unit 20 of the printer 10 determines YES in S62, and ends the IP address changing process of FIG. 3 (that is, S16 of FIG. 2). As described above, by executing the IP address changing process, a state in which the printer 10 and the PC 80 can execute unicast communication is constructed.

次いで、図2のS22において、送信部64は、名前解決パケットNPの応答パケットR2を送信する。この応答パケットR2は、送信先IPアドレスとして、PC80の現在のIPアドレス「192.168.1.2」を含み、送信元IPアドレスとして、プリンタ10の変更後のIPアドレス「192.168.1.3」を含む。   Next, in S22 of FIG. 2, the transmission unit 64 transmits a response packet R2 of the name resolution packet NP. This response packet R2 includes the current IP address “192.168.1.2” of the PC 80 as the destination IP address, and the IP address “192.168.1” after the change of the printer 10 as the source IP address. .3 ".

PC80は、応答パケットR2を受信することによって、プリンタ10のIPアドレス「192.168.1.3」を取得することができる。この場合、PC80は、プリンタ10のIPアドレス「192.168.1.3」を送信先IPアドレスとして、印刷データPDを送信する。これにより、プリンタ10の制御部20は、印刷データPDに従って、印刷実行部16に印刷を実行させる印刷処理を実行する。   The PC 80 can obtain the IP address “192.168.1.3” of the printer 10 by receiving the response packet R2. In this case, the PC 80 transmits the print data PD using the IP address “192.168.1.3” of the printer 10 as the transmission destination IP address. As a result, the control unit 20 of the printer 10 executes print processing for causing the print execution unit 16 to execute printing in accordance with the print data PD.

(本実施例の効果)
本実施例によると、プリンタ10は、PC80からブロードキャストされる名前解決パケットNPを受信する場合に、PC80とのユニキャスト通信を実行可能であるのか否かを判断する(図2のS14参照)。プリンタ10は、PC80とのユニキャスト通信を実行不可能であると判断する場合(図2のS14でNOの場合)に、プリンタ10のIPアドレスを変更する(図2のS16参照)。プリンタ10のIPアドレスが変更されるために、プリンタ10とPC80とがユニキャスト通信を実行可能な状態になり得る。しかも、プリンタ10は、上記の判断を実行して、プリンタ10のIPアドレスを変更する必要があるのか否かを主体的に決定する。そして、プリンタ10は、プリンタ10のIPアドレスを変更する必要があると判断する場合(即ち、PC80とのユニキャスト通信を実行不可能であると判断する場合)に、PC80からの指示を受けなくても、プリンタ10のIPアドレスを主体的に変更する。即ち、プリンタ10は、PC80からの印刷データに従って印刷処理を実行可能な状態に自動的に復帰する。ユーザは、PC80において、プリンタ10のIPアドレスを変更するための作業を行なう必要がない。従って、ユーザの作業負担を軽減することができる。
(Effect of this embodiment)
According to this embodiment, when receiving the name resolution packet NP broadcast from the PC 80, the printer 10 determines whether or not unicast communication with the PC 80 can be performed (see S14 in FIG. 2). When the printer 10 determines that unicast communication with the PC 80 cannot be performed (NO in S14 of FIG. 2), the printer 10 changes the IP address of the printer 10 (see S16 of FIG. 2). Since the IP address of the printer 10 is changed, the printer 10 and the PC 80 can be in a state where unicast communication can be performed. In addition, the printer 10 performs the above-described determination to determine whether or not it is necessary to change the IP address of the printer 10. When the printer 10 determines that it is necessary to change the IP address of the printer 10 (that is, when it is determined that unicast communication with the PC 80 cannot be performed), the printer 10 does not receive an instruction from the PC 80. However, the IP address of the printer 10 is changed proactively. That is, the printer 10 automatically returns to a state where print processing can be executed in accordance with the print data from the PC 80. The user does not need to perform an operation for changing the IP address of the printer 10 in the PC 80. Therefore, the work burden on the user can be reduced.

(対応関係)
プリンタ10、PC80が、それぞれ、「通信装置」、「外部装置」の一例である。名前解決パケットNP、PINGパケットP1、応答パケットR2が、それぞれ、「特定の信号」、「第1の信号」、「第2の信号」の一例である。また、図5に示される各IPアドレス、即ち、「192.168.1.2」、「192.168.2.3」、「192.168.1.3」が、それぞれ、「特定のIPアドレス」、「第1のIPアドレス」、「第2のIPアドレス」の一例である。なお、図3のS52で生成されるIPアドレス、図4のS86で取得されるIPアドレス、及び、図4のS90で生成されるIPアドレスも、「第2のIPアドレス」の一例である。さらに、図4のS94でYESの場合にS90で再び生成されるIPアドレスが、「第1及び第2のIPアドレスと異なるIPアドレス」の一例である。また、成功手法記憶領域34、成功IP記憶領域36が、それぞれ、「手法メモリ」、「アドレスメモリ」の一例である。DHCPサーバ90及びBOOTPサーバが、「IPアドレス割当サーバ」の一例である。また、APIPAが、「所定のアルゴリズム」の一例である。
(Correspondence)
The printer 10 and the PC 80 are examples of “communication device” and “external device”, respectively. The name resolution packet NP, the PING packet P1, and the response packet R2 are examples of “specific signal”, “first signal”, and “second signal”, respectively. In addition, each IP address shown in FIG. 5, that is, “192.168.1.2”, “192.168.2.3”, “192.168.1.3” is “specific IP”. This is an example of “address”, “first IP address”, and “second IP address”. Note that the IP address generated in S52 of FIG. 3, the IP address acquired in S86 of FIG. 4, and the IP address generated in S90 of FIG. 4 are also examples of the “second IP address”. Furthermore, the IP address generated again in S90 in the case of YES in S94 of FIG. 4 is an example of “an IP address different from the first and second IP addresses”. The successful technique storage area 34 and the successful IP storage area 36 are examples of “method memory” and “address memory”, respectively. The DHCP server 90 and the BOOTP server are examples of the “IP address assignment server”. APIPA is an example of a “predetermined algorithm”.

以上、本発明の具体例を詳細に説明したが、これらは例示にすぎず、特許請求の範囲を限定するものではない。特許請求の範囲に記載の技術には、以上に例示した具体例を様々に変形、変更したものが含まれる。上記の実施例の変形例を以下に列挙する。   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、電話機、多機能機、携帯電話、PDA等であってもよい。 (1) In the above embodiment, the printer 10 is an example of a “communication device”. The “communication device” is, for example, a PC, a server, a scanner, a FAX, a telephone, a multi-function device, a mobile phone, a PDA, or the like. There may be.

(2)上記の実施例では、図5に示されるように、PC80がPINGパケットP1の応答パケットを送信しない状況として、プリンタ10とPC80との間でネットワークアドレスが異なる場合を想定している。ただし、例えば、PC80は、IPアドレスのフィルタリング機能を備えていてもよい。即ち、PC80は、フィルタリングの対象のIPアドレス(例えばユーザによって予め指定されたIPアドレス)を送信元IPアドレスとして含むパケットを破棄してもよい。このような状況では、例えば、プリンタ10のIPアドレスがフィルタリングの対象のIPアドレスである場合には、プリンタ10とPC80との間でネットワークアドレスが同じであっても、PC80は、PINGパケットP1の応答パケットを送信しない。即ち、一般的に言うと、「ユニキャスト通信を外部装置と実行不可能である」は、通信装置と外部装置との間でネットワークアドレスが異なる場合のみならず、外部装置が通信装置のIPアドレスをフィルタリングしている場合を含む。 (2) In the above embodiment, as shown in FIG. 5, it is assumed that the network address is different between the printer 10 and the PC 80 as a situation where the PC 80 does not transmit the response packet of the PING packet P1. However, for example, the PC 80 may have an IP address filtering function. In other words, the PC 80 may discard a packet that includes a filtering target IP address (for example, an IP address designated in advance by the user) as a transmission source IP address. In such a situation, for example, when the IP address of the printer 10 is an IP address to be filtered, even if the network address is the same between the printer 10 and the PC 80, the PC 80 does not receive the PING packet P1. Do not send response packets. That is, generally speaking, “unicast communication cannot be performed with an external device” is not only when the network address is different between the communication device and the external device, but also when the external device is the IP address of the communication device. Including the case of filtering.

(3)上記の実施例では、判断部52は、PINGパケットP1の応答パケットを受信することを監視することによって、PC80とのユニキャスト通信を実行可能であるのか否かを判断する。即ち、一般的に言うと、判断部は、第1の信号の応答信号を受信することを監視することによって、通信装置がユニキャスト通信を外部装置と実行可能であるのか否かを判断する。ただし、判断部は、外部装置のIPアドレス及びサブネットマスクを取得可能である場合には、外部装置のIPアドレス及びサブネットマスクを用いて、外部装置のIPアドレスのネットワークアドレス部の値を特定してもよい。これに代えて、判断部は、通信装置のIPアドレス及びサブネットマスクを用いて、外部装置のIPアドレスのネットワークアドレス部の値を推定してもよい。そして、判断部は、特定済み又は推定済みのネットワークアドレス部の値を用いて、通信装置と外部装置との間でIPアドレスのネットワークアドレス部の値が同じであるのか否かを判断することによって、通信装置がユニキャスト通信を外部装置と実行可能であるのか否かを判断してもよい。即ち、一般的に言うと、「ユニキャスト通信を外部装置と実行可能であるのか否かを判断する」は、第1の信号(例えばPINGパケットP1)を送信して判断する場合も、第1の信号(例えばPINGパケットP1)を送信せずに判断する場合も含む。 (3) In the above embodiment, the determination unit 52 determines whether or not unicast communication with the PC 80 can be performed by monitoring the reception of the response packet of the PING packet P1. That is, generally speaking, the determination unit determines whether or not the communication device can execute the unicast communication with the external device by monitoring the reception of the response signal of the first signal. However, if the determination unit can acquire the IP address and subnet mask of the external device, the determination unit specifies the value of the network address part of the IP address of the external device using the IP address and subnet mask of the external device. Also good. Alternatively, the determination unit may estimate the value of the network address part of the IP address of the external device using the IP address and subnet mask of the communication device. Then, the determination unit determines whether the value of the network address portion of the IP address is the same between the communication device and the external device, using the value of the specified or estimated network address portion. The communication device may determine whether or not unicast communication can be performed with an external device. In other words, generally speaking, “determining whether or not unicast communication can be performed with an external device” means that the first signal (for example, PING packet P1) is transmitted even when the first signal is determined. This includes the case where the determination is made without transmitting the signal (for example, the PING packet P1).

(4)上記の実施例では、プリンタ10のIPアドレスが変更される場合に、プリンタ10が変更後のIPアドレスを利用し続けることを想定している。しかしながら、プリンタ10は、変更後のIPアドレスを一時的に利用してもよい。例えば、プリンタ10は、PC80から印刷データを受信して印刷処理を実行すると、プリンタ10のIPアドレスを、変更前のIPアドレスに戻してもよい。一般的に言うと、通信装置は、第2のIPアドレスを永続的に利用してもよいし、第2のIPアドレスを一時的に利用してもよい。 (4) In the above embodiment, it is assumed that when the IP address of the printer 10 is changed, the printer 10 continues to use the changed IP address. However, the printer 10 may temporarily use the changed IP address. For example, when the printer 10 receives print data from the PC 80 and executes print processing, the printer 10 may return the IP address of the printer 10 to the IP address before the change. Generally speaking, the communication device may permanently use the second IP address or may temporarily use the second IP address.

(5)上記の実施例では、CPU22がプログラムに従った処理を実行することによって、各部50〜64の機能が実現される。ただし、各部50〜64のうちの少なくとも1つは、論理回路等のハードウェアによって実現されてもよい。 (5) In the above-described embodiment, the functions of the units 50 to 64 are realized by the CPU 22 executing processing according to the program. However, at least one of the units 50 to 64 may be realized by hardware such as a logic circuit.

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

2:通信システム、10:プリンタ、80:PC、90:DHCPサーバ、NP:名前解決パケット、P1,P2:PINGパケット、R1,R2:応答パケット、PD:印刷データ   2: Communication system, 10: Printer, 80: PC, 90: DHCP server, NP: Name resolution packet, P1, P2: PING packet, R1, R2: Response packet, PD: Print data

Claims (11)

ローカルエリアネットワークを介して、特定のIPアドレスを有する外部装置と通信する通信装置であって、
前記外部装置からブロードキャスト通信によって送信される特定の信号であって、前記通信装置を識別するための識別情報と、前記特定のIPアドレスと、を含む前記特定の信号を受信する受信部と、
前記識別情報を含む前記特定の信号が受信される場合に、前記通信装置が、前記通信装置自身の現在のIPアドレスである第1のIPアドレスと、前記特定の信号に含まれる前記特定のIPアドレスと、を用いたユニキャスト通信を、前記外部装置と実行可能であるのか否かを判断する判断部と、
前記通信装置が前記ユニキャスト通信を前記外部装置と実行不可能であると判断される特定の場合に、前記ブロードキャスト通信によって受信された前記特定の信号に含まれる前記特定のIPアドレスを利用して、前記通信装置のIPアドレスを、前記第1のIPアドレスから、前記第1のIPアドレスと異なる第2のIPアドレスに変更する変更部と、
を備える通信装置。
A communication device for communicating with an external device having a specific IP address via a local area network,
A reception unit that receives the specific signal, which is a specific signal transmitted from the external device by broadcast communication , including identification information for identifying the communication device, and the specific IP address;
When the specific signal including the identification information is received, the communication device has a first IP address that is the current IP address of the communication device itself and the specific IP included in the specific signal. A determination unit that determines whether or not unicast communication using the address is executable with the external device;
In the specific case where it is determined that the communication device cannot execute the unicast communication with the external device, the specific IP address included in the specific signal received by the broadcast communication is used. , the IP address of the communication device, from the first IP address, a changing unit to change the first IP address is different from the second IP address,
A communication device comprising:
前記変更部は、ユーザからの指示を受けることなく、前記通信装置の前記IPアドレスを、前記第1のIPアドレスから前記第2のIPアドレスに変更する、請求項1に記載の通信装置。   The communication device according to claim 1, wherein the changing unit changes the IP address of the communication device from the first IP address to the second IP address without receiving an instruction from a user. 前記特定のIPアドレスの値が、IPアドレスを生成するための所定のアルゴリズムによって生成され得るIPアドレスの値の範囲に含まれる場合に、前記所定のアルゴリズムを用いて、前記第2のIPアドレスを生成する第1の生成部をさらに備え、
前記変更部は、前記特定の場合に、前記通信装置の前記IPアドレスを、前記第1のIPアドレスから、生成済みの前記第2のIPアドレスに変更する、請求項2に記載の通信装置。
When the value of the specific IP address is included in a range of IP address values that can be generated by a predetermined algorithm for generating an IP address, the second IP address is set using the predetermined algorithm. A first generation unit for generating,
The communication device according to claim 2, wherein the changing unit changes the IP address of the communication device from the first IP address to the generated second IP address in the specific case.
前記特定のIPアドレスの全部の値のうちの一部を変更することによって、前記特定のIPアドレスから前記第2のIPアドレスを生成する第2の生成部をさらに備え、
前記変更部は、前記特定の場合に、前記通信装置の前記IPアドレスを、前記第1のIPアドレスから、生成済みの前記第2のIPアドレスに変更する、請求項2に記載の通信装置。
A second generation unit configured to generate the second IP address from the specific IP address by changing a part of all values of the specific IP address;
The communication device according to claim 2, wherein the changing unit changes the IP address of the communication device from the first IP address to the generated second IP address in the specific case.
前記第2のIPアドレスが、前記ローカルエリアネットワークに接続されている他のデバイスのIPアドレスであるのか否かを確認する確認部をさらに備え、
前記変更部は、
前記特定の場合において、前記第2のIPアドレスが前記他のデバイスのIPアドレスでないと確認される場合に、前記通信装置の前記IPアドレスを、前記第1のIPアドレスから、前記第2のIPアドレスに変更し、
前記特定の場合において、前記第2のIPアドレスが前記他のデバイスのIPアドレスであると確認される場合に、前記通信装置の前記IPアドレスを、前記第1のIPアドレスから、前記第1及び第2のIPアドレスと異なるIPアドレスに変更する、請求項1,2及びのいずれか一項に記載の通信装置。
A confirmation unit for confirming whether the second IP address is an IP address of another device connected to the local area network;
The changing unit is
In the specific case, when it is confirmed that the second IP address is not the IP address of the other device, the IP address of the communication device is changed from the first IP address to the second IP address. Change to the address,
In the specific case, when it is confirmed that the second IP address is an IP address of the other device, the IP address of the communication device is changed from the first IP address to the first and second IP addresses. It is changed to the second IP address and different IP addresses, the communication device according to any one of claims 1, 2 and 4.
前記判断部は、
前記特定のIPアドレスが送信先として含まれる第1の信号であって、前記第1のIPアドレスが送信元として含まれる前記第1の信号を送信して、前記第1の信号の応答信号を受信した場合に、前記通信装置が前記ユニキャスト通信を前記外部装置と実行可能であると判断し、
前記第1の信号を送信して、前記第1の信号の前記応答信号を受信しなかった場合に、前記通信装置が前記ユニキャスト通信を前記外部装置と実行不可能であると判断する、請求項1からのいずれか一項に記載の通信装置。
The determination unit
The first signal including the specific IP address as a transmission destination, the first signal including the first IP address as a transmission source, and a response signal of the first signal If received, the communication device determines that the unicast communication can be performed with the external device;
The communication apparatus determines that the unicast communication cannot be performed with the external apparatus when the first signal is transmitted and the response signal of the first signal is not received. Item 6. The communication device according to any one of Items 1 to 5 .
前記判断部は、
前記第1のIPアドレスのネットワークアドレス部の値と、前記特定のIPアドレスのネットワークアドレス部の値と、が一致する場合に、前記通信装置が前記ユニキャスト通信を前記外部装置と実行可能であると判断し、
前記第1のIPアドレスの前記ネットワークアドレス部の前記値と、前記特定のIPアドレスの前記ネットワークアドレス部の前記値と、が一致しない場合に、前記通信装置が前記ユニキャスト通信を前記外部装置と実行不可能であると判断する、請求項1からのいずれか一項に記載の通信装置。
The determination unit
When the value of the network address part of the first IP address matches the value of the network address part of the specific IP address, the communication device can execute the unicast communication with the external device. And
When the value of the network address portion of the first IP address does not match the value of the network address portion of the specific IP address, the communication device performs the unicast communication with the external device. The communication apparatus according to any one of claims 1 to 6 , wherein the communication apparatus determines that execution is impossible.
前記通信装置の前記IPアドレスが、前記第1のIPアドレスから前記第2のIPアドレスに変更された後に、前記特定のIPアドレスが送信先として含まれる第2の信号であって、前記第2のIPアドレスが送信元として含まれる前記第2の信号を送信する送信部をさらに備える、請求項1からのいずれか一項に記載の通信装置。 After the IP address of the communication device is changed from the first IP address to the second IP address, the second signal includes the specific IP address as a destination, the second signal IP address further comprises a transmitter for transmitting the second signal included as a source, the communication device according to any one of claims 1 to 7. ローカルエリアネットワークを介して、特定のIPアドレスを有する外部装置と通信する通信装置のためのコンピュータプログラムであって、
前記通信装置に搭載されるコンピュータに、
前記外部装置からブロードキャスト通信によって送信される特定の信号であって、前記通信装置を識別するための識別情報と、前記特定のIPアドレスと、を含む前記特定の信号を受信する受信処理と、
前記識別情報を含む前記特定の信号が受信される場合に、前記通信装置が、前記通信装置自身の現在のIPアドレスである第1のIPアドレスと、前記特定の信号に含まれる前記特定のIPアドレスと、を用いたユニキャスト通信を、前記外部装置と実行可能であるのか否かを判断する判断処理と、
前記通信装置が前記ユニキャスト通信を前記外部装置と実行不可能であると判断される特定の場合に、前記ブロードキャスト通信によって受信された前記特定の信号に含まれる前記特定のIPアドレスを利用して、前記通信装置のIPアドレスを、前記第1のIPアドレスから、前記第1のIPアドレスと異なる第2のIPアドレスに変更する変更処理と、
を実行させるコンピュータプログラム。
A computer program for a communication device for communicating with an external device having a specific IP address via a local area network,
In a computer mounted on the communication device,
A reception process for receiving the specific signal, which is a specific signal transmitted by broadcast communication from the external device , and includes identification information for identifying the communication device and the specific IP address;
When the specific signal including the identification information is received, the communication device has a first IP address that is the current IP address of the communication device itself and the specific IP included in the specific signal. A determination process for determining whether or not unicast communication using the address can be executed with the external device;
In the specific case where it is determined that the communication device cannot execute the unicast communication with the external device, the specific IP address included in the specific signal received by the broadcast communication is used. , the IP address of the communication device, from the first IP address, and changing process for changing the first IP address is different from the second IP address,
A computer program that executes
ローカルエリアネットワークを介して、特定のIPアドレスを有する外部装置と通信する通信装置であって、
前記通信装置の過去のIPアドレスを得るために利用されたIPアドレス設定手法を示す手法情報を格納するための手法メモリであって、前記過去のIPアドレスは、前記外部装置とのユニキャスト通信を実行可能であったIPアドレスである、前記手法メモリと、
前記外部装置からブロードキャスト通信によって送信される特定の信号であって、前記特定のIPアドレスを含む前記特定の信号を受信する受信部と、
前記特定の信号が受信される場合に、前記通信装置が、前記通信装置自身の現在のIPアドレスである第1のIPアドレスと、前記特定の信号に含まれる前記特定のIPアドレスと、を用いたユニキャスト通信を、前記外部装置と実行可能であるのか否かを判断する判断部と、
前記通信装置が前記ユニキャスト通信を前記外部装置と実行不可能であると判断される特定の場合に、ユーザからの指示を受けることなく、前記通信装置のIPアドレスを、前記第1のIPアドレスから、前記第1のIPアドレスと異なる第2のIPアドレスであって、前記手法メモリ内の前記手法情報が示す前記IPアドレス設定手法を利用して得られる前記第2のIPアドレスに変更する変更部と、
を備える通信装置。
A communication device for communicating with an external device having a specific IP address via a local area network,
A method memory for storing method information indicating an IP address setting method used for obtaining a past IP address of the communication device, wherein the past IP address is a unicast communication with the external device. The technique memory being an executable IP address;
A reception unit that receives the specific signal that is a specific signal transmitted by broadcast communication from the external device and includes the specific IP address;
When the specific signal is received, the communication device uses a first IP address that is the current IP address of the communication device itself and the specific IP address included in the specific signal. A determination unit that determines whether or not the unicast communication performed can be performed with the external device;
In a specific case where it is determined that the communication device cannot execute the unicast communication with the external device, the IP address of the communication device is changed to the first IP address without receiving an instruction from a user. To change to the second IP address that is different from the first IP address and is obtained by using the IP address setting technique indicated by the technique information in the technique memory And
A communication device comprising:
ローカルエリアネットワークを介して、特定のIPアドレスを有する外部装置と通信する通信装置のためのコンピュータプログラムであって、
前記通信装置は、前記通信装置の過去のIPアドレスを得るために利用されたIPアドレス設定手法を示す手法情報を格納するための手法メモリであって、前記過去のIPアドレスは、前記外部装置とのユニキャスト通信を実行可能であったIPアドレスである、前記手法メモリを備え、
前記通信装置に搭載されるコンピュータに、
前記外部装置からブロードキャスト通信によって送信される特定の信号であって、前記特定のIPアドレスを含む前記特定の信号を受信する受信処理と、
前記特定の信号が受信される場合に、前記通信装置が、前記通信装置自身の現在のIPアドレスである第1のIPアドレスと、前記特定の信号に含まれる前記特定のIPアドレスと、を用いたユニキャスト通信を、前記外部装置と実行可能であるのか否かを判断する判断処理と、
前記通信装置が前記ユニキャスト通信を前記外部装置と実行不可能であると判断される特定の場合に、ユーザからの指示を受けることなく、前記通信装置のIPアドレスを、前記第1のIPアドレスから、前記第1のIPアドレスと異なる第2のIPアドレスであって、前記手法メモリ内の前記手法情報が示す前記IPアドレス設定手法を利用して得られる前記第2のIPアドレスに変更する変更処理と、
を実行させるコンピュータプログラム。
A computer program for a communication device for communicating with an external device having a specific IP address via a local area network,
The communication apparatus is a technique memory for storing technique information indicating an IP address setting technique used to obtain a past IP address of the communication apparatus, and the past IP address is the same as that of the external apparatus. The method memory, which is an IP address that was able to execute the unicast communication of
In a computer mounted on the communication device,
A reception process for receiving the specific signal transmitted from the external device by broadcast communication and including the specific IP address;
When the specific signal is received, the communication device uses a first IP address that is the current IP address of the communication device itself and the specific IP address included in the specific signal. Determination processing for determining whether or not the unicast communication performed with the external device can be performed;
In a specific case where it is determined that the communication device cannot execute the unicast communication with the external device, the IP address of the communication device is changed to the first IP address without receiving an instruction from a user. To change to the second IP address that is different from the first IP address and is obtained by using the IP address setting technique indicated by the technique information in the technique memory Processing,
A computer program that executes
JP2011015910A 2011-01-28 2011-01-28 Communication device Active JP5527233B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2011015910A JP5527233B2 (en) 2011-01-28 2011-01-28 Communication device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2011015910A JP5527233B2 (en) 2011-01-28 2011-01-28 Communication device

Publications (2)

Publication Number Publication Date
JP2012156910A JP2012156910A (en) 2012-08-16
JP5527233B2 true JP5527233B2 (en) 2014-06-18

Family

ID=46838150

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011015910A Active JP5527233B2 (en) 2011-01-28 2011-01-28 Communication device

Country Status (1)

Country Link
JP (1) JP5527233B2 (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014060570A (en) * 2012-09-18 2014-04-03 Sanken Electric Co Ltd Information communication method and information communication system
JP6248822B2 (en) * 2014-06-16 2017-12-20 三菱電機ビルテクノサービス株式会社 Communication address management system, building management system, and communication address management program
JP7024602B2 (en) * 2018-05-23 2022-02-24 コニカミノルタ株式会社 Image processing equipment, network connection method and network connection program
CN112187964A (en) * 2020-08-31 2021-01-05 北京三快在线科技有限公司 IP address modification method and device, electronic equipment and computer readable medium
KR102298731B1 (en) * 2021-03-24 2021-09-06 퍼시픽 센츄리 주식회사 Device for Wireless Communications and Driving Method Thereof

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003046519A (en) * 2001-08-03 2003-02-14 Fujitsu Ltd Address automatic setting method
JP4701799B2 (en) * 2004-05-31 2011-06-15 セイコーエプソン株式会社 Printer and printer system
JP2008236543A (en) * 2007-03-22 2008-10-02 Hitachi Ltd Communication path control method and program, and communication apparatus
JP5178539B2 (en) * 2008-04-04 2013-04-10 キヤノン株式会社 Information processing apparatus, information processing apparatus control method, session management system, and program

Also Published As

Publication number Publication date
JP2012156910A (en) 2012-08-16

Similar Documents

Publication Publication Date Title
JP5093277B2 (en) Communication apparatus and computer program
JP5527233B2 (en) Communication device
JP5820106B2 (en) Communication apparatus and control method thereof
JP2009010772A (en) Communication apparatus and control method thereof
JP2006050286A (en) Network system, communication method therein, and host device
JP5882855B2 (en) Method, system and program for protecting a host device
US8601271B2 (en) Method and system for power management using ICMPV6 options
JP4775437B2 (en) Computer program for installing software
JP2006067480A (en) Network device management system, its control method, and program
US10728211B2 (en) Electronic apparatus, communication system, and a non-transitory computer-readable recording medium
US8516141B2 (en) Method and system for modifying and/or changing a MAC ID utilizing an IPv6 network connection
JP2012029139A (en) Device to be connected to network
JP5338597B2 (en) IP address determination device, terminal device, and computer program
US20140122680A1 (en) Information processing apparatus and method, and non-transitory computer readable medium
JP6088959B2 (en) Electronics
JP5664399B2 (en) Information providing server
JP6119187B2 (en) Management device, address information management program, and address information management system
US10574837B2 (en) Information processing apparatus for data communication with external apparatus and control method for the same, and storage medium
JP4368776B2 (en) Network device, network device control method, program, and recording medium
JP2015195533A (en) communication device
JP6460346B2 (en) Electronic equipment and power control program
US8953614B2 (en) Data communication system and address setting method for setting an IP address
JP6444174B2 (en) Image forming apparatus, image forming apparatus control method, and program
JP5454463B2 (en) Communication device
JP5234062B2 (en) Communication device and multi-function communication device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20130325

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20131211

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20131217

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20140213

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20140331

R150 Certificate of patent or registration of utility model

Ref document number: 5527233

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150