Communication apparatus

The communication device with multiple interfaces optimizes wireless connections by using Bluetooth Low Energy for proximity detection and Wi-Fi for data transfer, ensuring connections are made only when desired, addressing unwanted connections in existing technologies.

JP2024177340AActive Publication Date: 2024-12-19BROTHER KOGYO KK
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
JP2024173355
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2024-10-02
Publication Date
2024-12-19
Estimated Expiration
2035-03-27

AI Technical Summary

Technical Problem

Existing wireless communication technologies allow external devices to connect to an Access Point (AP) without user consent when information about the AP is transmitted via Bluetooth Low Energy (BLE), leading to unwanted connections.

Method used

A communication device equipped with multiple interfaces for different wireless communication methods, including Wi-Fi and Bluetooth Low Energy, that determines the appropriateness of re-establishing connections based on device identification information and network-related information, ensuring connections are made only when desired by the user.

Benefits of technology

Enables wireless connections to be established only in appropriate situations, reducing unwanted connections and optimizing power consumption by selectively using Bluetooth Low Energy for proximity detection and Wi-Fi for data transfer.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2024177340000001_ABST
    Figure 2024177340000001_ABST
Patent Text Reader

Abstract

To disclose a technique to allow wireless connection in accordance with a first communication system to be established in an appropriate situation after wireless communication in accordance with a second communication system is performed.SOLUTION: If a printer PR performs BT communication and receives distance information from a mobile terminal PT1, the printer PR determines that a BT device name "N1" in the distance information is already stored (T116A). In this case, the printer PR performs BT communication, transmits network information to the mobile terminal PT1 (T119), and establishes Wi-Fi connection with the mobile terminal PT1 (T132). Meanwhile, if the printer PR performs BT communication and receives distance information from a mobile terminal PT2, the printer PR determines that a BT device name "N2" in the distance information is not stored yet (T216A). In this case, the printer PR does not transmit the network information to the mobile terminal PT2, and does not establish Wi-Fi connection with the mobile terminal PT2.SELECTED DRAWING: Figure 9
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] This specification discloses a communication device capable of performing wireless communication according to a plurality of communication methods. [Background technology]

[0002] Patent Document 1 discloses a technique for a first terminal and an external device to execute wireless communication according to Wi-Fi. The first terminal transmits information (i.e., MAC address, SSID, channel number, security key, etc.) about an AP (abbreviation of Access Point) to which the first terminal itself is connected to the external device via BLE (abbreviation of Bluetooth (registered trademark) Low Energy). In this case, the external device activates a Wi-Fi module and connects to the AP using the information. This allows the first terminal and the external device to execute wireless communication according to Wi-Fi. [Prior art documents] [Patent documents]

[0003] [Patent Document 1] JP 2014-53007 A Summary of the Invention [Problem to be solved by the invention]

[0004] In the technology of Patent Document 1, even in a situation where the user does not want the external device to be connected to the AP, when information about the AP is transmitted from the first terminal to the external device via BLE, the external device is connected to the AP.

[0005] This specification discloses a technology that enables a wireless connection according to a first communication method to be established in an appropriate situation after wireless communication according to a second communication method is performed between a first communication device and a second communication device. [Means for solving the problem]

[0006] A first communication device disclosed in the present specification includes a first interface for performing wireless communication according to a first communication method, and a second interface for performing wireless communication according to a second communication method different from the first communication method, and a first network related information transmitting unit that transmits first network related information related to a first wireless network to the second communication device via the second interface when a distance between the first communication device and a second communication device is less than a predetermined distance, the first wireless network being a network for performing wireless communication via the first interface, and a first connection request receiving unit that receives a first wireless connection request via the first interface from the second communication device that has received the first network related information, and a first wireless connection request receiving unit that uses the first network related information to establish a first wireless connection with the second communication device via the first interface in response to receiving the first wireless connection request from the second communication device, and a first establishment unit for forming the first wireless network including a third communication device and a second communication device that is a third communication device, the second establishment unit comprising: a device identification information receiving unit for receiving, from the second communication device, second device identification information for identifying the second communication device; a storage control unit for storing the second device identification information in a memory of the first communication device; an identification information receiving unit for receiving, from a third communication device, identification information including third device identification information for identifying the third communication device, via the second interface after the second device identification information has been stored in the memory; an identification information determining unit for determining whether the third device identification information in the identification information matches the second device identification information in the memory; and a second network related information transmitting unit for transmitting, via the second interface, second network related information relating to the second wireless network to the second communication device that matches the third communication device, when it is determined that the third device identification information matches the second device identification information, and not transmitting the second network related information to the third communication device when it is determined that the third device identification information does not match the second device identification information,a second network related information transmitting unit that receives a second wireless connection request from the second communication device that has received the second network related information via the first interface, and a second establishment unit that, in response to receiving the second wireless connection request from the second communication device, uses the second network related information to establish a second wireless connection with the second communication device via the first interface, thereby forming the second wireless network to which both the first communication device and the second communication device belong.

[0007] According to the above configuration, the first communication device transmits the first network related information to the second communication device via the second interface in a state where the distance between the first communication device and the second communication device is less than a predetermined distance, that is, in a state where it is highly likely that the user desires to establish a wireless connection according to the first communication method. As a result, the first communication device can establish a first wireless connection according to the first communication method with the second communication device to form a first wireless network. Then, the first communication device receives second device identification information from the second communication device and stores it in the memory. After that, when the first communication device receives specific information from the third communication device via the second interface, it determines whether the third device identification information in the specific information matches the second device identification information in the memory. The third device identification information matching the second device identification information means that the third communication device matches the second communication device with which the first wireless connection according to the first communication method was previously established. Therefore, when the third device identification information matches the second device identification information, it is highly likely that the user desires a wireless connection according to the first communication method to be established again. On the other hand, when the third device identification information does not match the second device identification information, it is highly unlikely that the user desires a wireless connection according to the first communication method to be established. Therefore, when the first communication device determines that the third device identification information does not match the second device identification information, it does not transmit the second network related information to the third communication device, and as a result, does not establish a wireless connection according to the first communication method with the third communication device. Then, when the first communication device determines that the third device identification information matches the second device identification information, it transmits the second network related information to the second communication device that matches the third communication device via the second interface. As a result, the first communication device can establish a second wireless connection according to the first communication method with the second communication device to form a second wireless network. In this way, the first communication device may, in an appropriate situation, establish a wireless connection according to the first communication method after performing wireless communication according to the second communication method.

[0008] A control method and a computer program for implementing the above-mentioned first communication device, and a computer-readable recording medium storing the computer program, are also novel and useful.

[0009] This specification also discloses a computer program for a second communication device. The second communication device includes a first interface for performing wireless communication according to a first communication method, a second interface for performing wireless communication according to a second communication method different from the first communication method, and a processor. The computer program causes the processor to perform the following processes: a first network related information receiving process for receiving first network related information related to a first wireless network from the first communication device via the second interface when a distance between the first communication device and the second communication device is less than a predetermined distance, the first wireless network being a network for performing wireless communication via the first interface; a first connection request transmitting process for transmitting a first wireless connection request to the first communication device via the first interface in response to receiving the first network related information from the first communication device; and a first connection request transmitting process for transmitting the first wireless connection request to the first communication device via the first interface using the first network related information in response to transmitting the first wireless connection request to the first communication device. a first establishment process for establishing a wireless connection with the first communication device to form the first wireless network to which both the first communication device and the second communication device belong; a device identification information reception process for receiving first device identification information for identifying the first communication device from the first communication device; a storage control process for storing the first device identification information in a memory of the second communication device; a first predetermined signal reception process for receiving a first predetermined signal including third device identification information for identifying the third communication device from a third communication device via the second interface after the first device identification information has been stored in the memory; an identification information determination process for determining whether the third device identification information in the first predetermined signal matches the first device identification information in the memory;a first predetermined request transmission process for transmitting a first predetermined request for requesting network related information related to a wireless network to the first communication device that matches the third communication device, and not transmitting the first predetermined request to the third communication device when it is determined that the third device identification information does not match the first device identification information; and a second network related information reception process for receiving second network related information related to a second wireless network from the first communication device via the second interface in response to transmitting the first predetermined request to the first communication device, wherein the second wireless network is a network for performing wireless communication via the first interface. the second network related information is different from the first network related information; a second connection request transmission process of transmitting a second wireless connection request to the first communication device via the first interface in response to receiving the second network related information from the first communication device; and a second establishment process of establishing a second wireless connection with the first communication device via the first interface using the second network related information in response to transmitting the second wireless connection request to the first communication device, thereby forming the second wireless network to which both the first communication device and the second communication device belong.

[0010] The above computer program can realize the following second communication device. That is, the second communication device receives the first network related information from the first communication device via the second interface in a state where the distance between the first communication device and the second communication device is less than a predetermined distance, that is, in a state where the user is likely to desire the establishment of a wireless connection according to the first communication method. As a result, the second communication device can establish a first wireless connection according to the first communication method with the first communication device to form a first wireless network. Then, the second communication device receives the first device identification information from the first communication device and stores it in the memory. Thereafter, when the second communication device receives a first predetermined signal from the third communication device via the second interface, it determines whether or not the third device identification information in the first predetermined signal matches the first device identification information in the memory. The fact that the third device identification information matches the first device identification information means that the third communication device matches the first communication device with which the first wireless connection according to the first communication method was previously established. Therefore, it is highly likely that the user wants the wireless connection according to the first communication method to be established again. On the other hand, if the third device identification information does not match the first device identification information, it is low that the user wants the wireless connection according to the first communication method to be established. Therefore, if the second communication device determines that the third device identification information does not match the first device identification information, it does not transmit the first predetermined request to the third communication device, and as a result, does not establish a wireless connection according to the first communication method with the third communication device. Then, if the second communication device determines that the third device identification information matches the first device identification information, it transmits the first predetermined request via the second interface to the first communication device that matches the third communication device. Thereby, the second communication device can receive the second network related information from the first communication device via the second interface and establish a second wireless connection with the first communication device according to the first communication method to form a second wireless network. In this way, the second communication device can establish a wireless connection according to the first communication method in an appropriate situation after performing wireless communication according to the second communication method.

[0011] A computer-readable recording medium storing the above computer program is also novel and useful. The above second communication device itself is also novel and useful. A control method for realizing the above second communication device is also novel and useful. A communication system including the above first communication device and second communication device is also novel and useful. [Brief description of the drawings]

[0012] [Figure 1] 1 shows the configuration of a communication system. [Diagram 2] 4 shows a flowchart of the process of the printer in the first embodiment. [Diagram 3] 4 shows a flowchart of processing of the mobile terminal of the first embodiment. [Figure 4] 1 shows a sequence diagram of case A in the first embodiment. [Diagram 5] 11 shows a sequence diagram of cases B1 and B2 in the first embodiment. [Figure 6] 13 shows a flowchart of a process of a printer according to a second embodiment. [Figure 7] 13 shows a flowchart of processing of a mobile terminal according to a second embodiment. [Figure 8] 13 shows a sequence diagram of case C in the second embodiment. [Figure 9] 13 shows a sequence diagram of cases D1 and D2 in the second embodiment. [Figure 10] 13 shows a flowchart of a process of a printer according to a third embodiment. [Figure 11] 13 shows a flowchart of processing of a mobile terminal according to third and fourth embodiments. [Figure 12] 13 shows a sequence diagram of case E in the third and fourth embodiments. [Figure 13] 13 shows a sequence diagram of cases F1 and F2 in the third embodiment. [Figure 14] 13 shows a flowchart of a printer process according to a fourth embodiment. [Figure 15] 13 shows a sequence diagram of cases G1 and G2 of the fourth embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0013] (First Example) (Configuration of communication system 2) 1, the communication system 2 includes a printer PR and a plurality of portable terminals PT1, PT2. The printer PR and each of the portable terminals PT1, PT2 are capable of wireless communication with each other.

[0014] (Printer PR configuration) The printer PR is a peripheral device capable of executing a printing function, that is, a peripheral device such as a portable terminal PT1. The printer PR includes an operation unit 12, a display unit 14, a print execution unit 16, a Wi-Fi interface 20, a BT (abbreviation of Bluetooth (registered trademark)) interface 22, and a control unit 30. Each unit 12 to 30 is connected to a bus line (reference numerals omitted). In the following, the interface is referred to as "I / F". Note that, although an NFC (abbreviation of Near Field Communication) I / F 24 is also disclosed in FIG. 1, the NFC I / F 24 is an I / F used in the third and fourth embodiments described later, and may or may not be provided in the printer PR of the first and second embodiments.

[0015] The operation unit 12 has a plurality of keys. A user can input various instructions to the printer PR by operating the operation unit 12. The display unit 14 is a display for displaying various information. The display unit 14 also functions as a so-called touch panel. In other words, the display unit 14 also functions as an operation unit operated by the user. The print execution unit 16 is a printing mechanism such as an inkjet type or laser type.

[0016] The Wi-Fi I / F 20 is an I / F for performing wireless communication according to the Wi-Fi method (hereinafter referred to as "Wi-Fi communication"). The Wi-Fi method is a wireless communication method based on, for example, the IEEE (abbreviation of The Institute of Electrical and Electronics Engineers, Inc.) 802.11 standard and standards equivalent thereto (for example, 802.11a, 11b, 11g, 11n, etc.). More specifically, the Wi-Fi I / F 20 supports the WFD (abbreviation of Wi-Fi Direct (registered trademark)) method established by the Wi-Fi Alliance. The WFD method is a wireless communication method described in the specification "Wi-Fi Peer-to-Peer (P2P) Technical Specification Version 1.1" created by the Wi-Fi Alliance.

[0017] The BTI / F 22 is an I / F for performing wireless communication (hereinafter referred to as "BT communication") according to the Bluetooth method. The Bluetooth method is, for example, a wireless communication method based on the IEEE802.15.1 standard and standards equivalent thereto. More specifically, the BTI / F 22 supports BLE (short for Bluetooth Low Energy). BLE is a standard realized in Bluetooth method version 4.0 and later versions. Note that, hereinafter, Bluetooth method versions earlier than version 4.0 are referred to as "Classic BT". In order to perform BT communication according to BLE between a pair of BTI / Fs, one BTI / F may support "Bluetooth Smart Ready" defined in the BT method, and the other BTI / F may support "Bluetooth Smart Ready" or "Bluetooth Smart" defined in the BT method. A BTI / F that supports "Bluetooth Smart Ready" is an I / F that can perform both operations according to BLE and operations according to Classic BT (i.e., a so-called dual mode I / F). The BTI / F compatible with "Bluetooth Smart" is an I / F that can execute operations according to BLE, but cannot execute operations according to Classic BT. In this embodiment, BT communication according to BLE is executed between the printer PR and the portable terminals PT1 and PT2. Since the BTI / F (e.g., reference numeral 62) described later of the portable terminals PT1 and PT2 is compatible with "Bluetooth Smart Ready", the BTI / F 22 of the printer PR may be compatible with either "Bluetooth Smart Ready" or "Bluetooth Smart". However, in a modified example, when the BTI / F 22 of the printer PR is compatible with "Bluetooth Smart Ready", the BTI / F of the portable terminals PT1 and PT2 may be compatible with "Bluetooth Smart".

[0018] The differences between Classic BT and BLE are as follows. The number of channels in BLE (i.e. 40) is less than the number of channels in Classic BT (i.e. 79). The current consumption during data communication in BLE (e.g. 15 mA) is less than the current consumption during data communication in Classic BT (e.g. 35 mA). Therefore, the power consumption of BLE is lower than that of Classic BT. Also, BLE uses Advertise signals, but Classic BT does not use Advertise signals.

[0019] The differences between the Wi-Fi system and the BT system will be described. The communication speed of Wi-Fi communication (for example, the maximum communication speed is 600 Mbps) is faster than the communication speed of BT communication (for example, the maximum communication speed is 24 Mbps). The carrier frequency in Wi-Fi communication is the 2.4 GHz band or the 5.0 GHz band. The carrier frequency in BT communication is the 2.4 GHz band. That is, when the 5.0 GHz band is adopted as the carrier frequency in Wi-Fi communication, the carrier frequency in Wi-Fi communication is different from the carrier frequency in BT communication. In addition, the maximum distance at which Wi-Fi communication can be performed (for example, about 100 m) is greater than the maximum distance at which BT communication can be performed (for example, about several tens of meters).

[0020] The control unit 30 includes a CPU 32 and a memory 34. The CPU 32 executes various processes according to a program 36 stored in the memory 34. The memory 34 is composed of a volatile memory, a non-volatile memory, and the like. The memory 34 stores the BT device name "NP" of the printer PR. The BT device name "NP" is a unique name assigned to the BTI / F 22, in other words, a name used as information for identifying the printer PR so that the printer PR can perform BT communication. Note that in FIG. 1, the memory 34 is shown to include an area 40, but the area 40 is used in the second and fourth embodiments described below.

[0021] (Configuration of mobile terminals PT1 and PT2) Each of the portable terminals PT1 and PT2 is a portable terminal device such as a mobile phone (e.g., a smartphone), a PDA, a notebook PC, a tablet PC, a portable music player, a portable video player, etc. In the following, the configuration of the portable terminal PT1 will be described, but the portable terminal PT2 also has a similar configuration to the portable terminal PT1.

[0022] The portable terminal PT1 includes an operation unit 52, a display unit 54, a Wi-Fi I / F 60, a BTI / F 62, and a control unit 70. The units 52 to 70 are connected to a bus line (reference numbers omitted). The NFC I / F 64 is an I / F used in the third and fourth embodiments described below, and may or may not be provided in the portable terminal PT1 of the first and second embodiments.

[0023] The operation unit 52 includes a plurality of keys. The user can input various instructions to the portable terminal PT1 by operating the operation unit 52. The display unit 54 is a display for displaying various information. The display unit 54 also functions as a so-called touch panel (i.e., also functions as an operation unit). The Wi-Fi I / F 60 is an I / F for performing Wi-Fi communication. The Wi-Fi I / F 60 may or may not support WFD. The BTI / F 62 is an I / F for performing BT communication and supports BLE. The differences between the I / Fs 60 and 62 are similar to the differences between the I / Fs 20 and 22 of the printer PR.

[0024] The control unit 70 includes a CPU 72 and a memory 74. The CPU 72 executes various processes in accordance with an OS program 76 stored in the memory 74. The memory 74 is composed of a volatile memory, a non-volatile memory, and the like. The memory 74 stores not only the OS program 76 but also a printer application 78. The printer application 78 is an application for causing the printer PR to execute a print function. When a user wishes the printer PR to execute a print function, the printer application 78 is started by the user. The printer application 78 may be installed in the portable terminal PT1 from a server on the Internet provided by a vendor of the printer PR, for example, or may be installed in the portable terminal PT1 from a medium shipped together with the printer PR.

[0025] The memory 74 further stores the BT device name "N1" of the portable terminal PT1. The BT device name "N1" is a unique name assigned to the BTI / F 62, in other words, a name used as information for identifying the portable terminal PT1 in order for the portable terminal PT1 to perform BT communication. The portable terminal PT2 has a BT device name "N2" that is different from the BT device name "N1". The memory 74 includes a BT device name storage area 80. The BT device name storage area 80 is an area for storing the BT device name of a printer (hereinafter referred to as an "established printer") with which a wireless connection via the Wi-Fi I / F 60, i.e., a wireless connection according to the Wi-Fi method, has been established.

[0026] (Printer PR processing; Figure 2) Next, the process executed by the CPU 32 of the printer PR will be described with reference to Fig. 2. When the power supply of the printer PR is turned on, the CPU 32 starts the process of Fig. 2.

[0027] In S2, the CPU 32 generates an SSID (short for Service Set Identifier) ​​by randomly generating a character string. Then, the CPU 32 stores the SSID in the memory 34. The SSID is an identifier for identifying a wireless network for performing Wi-Fi communication.

[0028] In S4, the CPU 32 changes the BTI / F 22 from an OFF state to an ON state. Here, the OFF state of the BTI / F 22 is a state in which power is not supplied to the BTI / F 22, i.e., a state in which BT communication cannot be performed. The ON state of the BTI / F 22 is a state in which power is supplied to the BTI / F 22, i.e., a state in which BT communication can be performed. The power consumption of the BTI / F 22 in the ON state (i.e., the power consumption of BLE) is lower than the power consumption of the Wi-Fi I / F 20 in the ON state.

[0029] In S6, the CPU 32 starts a transmission process of repeatedly broadcasting an Advertise signal via the BTI / F 22. The Advertise signal includes the BT device name "NP" of the printer PR in the memory 34. The Advertise signal is a signal for informing devices around the printer PR of the presence of the printer itself. In particular, the CPU 32 transmits the Advertise signal to the outside without establishing a Bluetooth logical link (i.e., a Bluetooth wireless connection). More specifically, in the Bluetooth protocol stack, communication at the L2CAP layer or higher is not performed, and communication at a layer lower than the L2CAP layer (i.e., the Link Manager layer or the Link Layer layer) is performed to communicate the Advertise signal. The L2CAP layer is the highest layer for establishing a Bluetooth logical link. In other words, communication at the highest layer for establishing a logical link is not performed, and communication at a layer lower than the highest layer is performed to communicate the Advertise signal.

[0030] In S10, the CPU 32 monitors whether a Scan Request signal (hereinafter, referred to as a "Scan_Req signal") is received from the portable terminal via the BTI / F 22. The Scan_Req signal is a signal transmitted from the portable terminal that has received the Advertise signal. The Scan_Req signal is a unicast signal, and includes the BT device name "NP" of the printer PR as information indicating the destination, and also includes the BT device name of the portable terminal (for example, the BT device name "N1" of the portable terminal PT1) as information indicating the source. The Scan_Req signal is a signal for requesting network information including an SSID and a password from the printer PR. In particular, the CPU 32 can receive the Scan_Req signal without establishing a logical link. That is, communication in the highest layer for establishing a logical link is not performed, and communication in a layer lower than the highest layer is performed to transmit the Scan_Req signal. When the CPU 32 receives the Scan_Req signal, the CPU 32 determines YES in S10 and proceeds to S12.

[0031] In S12, the CPU 32 transmits a Scan Response signal (hereinafter, referred to as a "Scan_Res signal") to the portable terminal that is the sender of the Scan_Req signal via the BTI / F 22. The Scan_Res signal is a unicast signal that is a response signal to the Scan_Req signal, and includes the BT device name of the portable terminal (i.e., the sender BT device name in the Scan_Req signal) as information indicating the destination, and also includes the BT device name "NP" of the printer PR as information indicating the sender. The CPU 32 transmits the Scan_Res signal without establishing a logical link. In other words, communication in the highest layer for establishing a logical link is not performed, and communication in a layer lower than the highest layer is performed to communicate the Scan_Res signal.

[0032] The Scan_Res signal includes the SSID in the memory 34 and a predetermined password. As described above, in S2, the SSID is stored in the memory 34. However, when S32, which will be described later, is executed after S2 is executed, a new SSID is stored in the memory 34 in place of the old SSID in the memory 34. Therefore, in a situation where S32 has not been executed even once after S2 is executed, the SSID in the Scan_Res signal is the SSID generated in S2. Also, in a situation where S32 has been executed after S2 is executed, the SSID in the Scan_Res signal is the SSID generated in the latest S32. In the following, the SSID currently stored in the memory 34 is called the "current SSID". The predetermined password is a fixed character string that is preset in the printer PR. That is, in this embodiment, when the power of the printer PR is turned on or when S32, which will be described later, is executed, the SSID is changed, but the password is not changed.

[0033] In S14, the CPU 32 changes the Wi-Fi I / F 20 from an OFF state to an ON state. Here, the OFF state of the Wi-Fi I / F 20 means that no power is supplied to the Wi-Fi I / F 20, i.e., a state in which Wi-Fi communication cannot be performed. The ON state of the Wi-Fi I / F 20 means that power is supplied to the Wi-Fi I / F 20, i.e., a state in which Wi-Fi communication can be performed. Since the Wi-Fi I / F 20 can be set to the OFF state until S14 is executed, the power consumption of the printer PR can be reduced.

[0034] In S14, the CPU 32 further spontaneously transitions the operation state of the printer PR from the WFD device state to the G / O state without executing the G / O (short for Group Owner) negotiation of the WFD. The printer PR in the G / O state transmits a beacon signal to inform surrounding devices of its presence via the Wi-Fi I / F 20. On the other hand, the printer PR in a state other than the G / O state (for example, the above-mentioned device state and client state) does not transmit a beacon signal. For this reason, the power consumption of the printer PR in the G / O state is higher than the power consumption of the printer PR in a state other than the G / O state. Since the operation state of the printer PR can be set to the device state until S14 is executed, the power consumption of the printer PR can be reduced.

[0035] In S16, the CPU 32 receives a Wi-Fi connection request signal including the current SSID from the mobile terminal via the Wi-Fi I / F 20. The Wi-Fi connection request signal is a signal for requesting the printer PR to establish a wireless connection in accordance with the Wi-Fi standard (hereinafter referred to as a "Wi-Fi connection"), and is specifically an Association Request signal.

[0036] In S18, the CPU 32 establishes a Wi-Fi connection with the mobile terminal. Specifically, the CPU 32 executes communication of various signals (for example, transmission of an Association Response signal, communication of 4-Way Handshake, etc.) with the mobile terminal via the Wi-Fi I / F 20. In the process of communication of the various signals, the CPU 32 receives network information including an SSID and a password from the mobile terminal and executes authentication of the network information. When the received SSID matches the current SSID and the received password matches a predetermined password, the CPU 32 determines that authentication of the network information is successful and establishes a Wi-Fi connection with the mobile terminal. As described above, in S12, a Scan_Res signal including the current SSID and the predetermined password is transmitted to the mobile terminal, and therefore, network information including the current SSID and the predetermined password is received from the mobile terminal. Therefore, in S18, authentication of the network information is usually successful and a Wi-Fi connection with the mobile terminal is established.

[0037] As described above, in S18, a Wi-Fi connection is established between the printer PR and the portable terminal. This forms a Wi-Fi wireless network (hereinafter, referred to as a "Wi-Fi network") in which the printer PR operates in a G / O state and the portable terminal operates as a so-called legacy. Legacy refers to a device that participates in a Wi-Fi network without performing operations according to WFD. Since the printer PR in the G / O state manages the Wi-Fi network, the printer PR in the G / O state can be said to be a parent station (in other words, a master device) of the Wi-Fi network. In addition, since a legacy portable terminal participates in the Wi-Fi network, the legacy portable terminal can be said to be a child station (in other words, a slave device) of the Wi-Fi network.

[0038] Next, the CPU 32 repeats sequential execution of each monitoring process of S20 and S30. In S20, the CPU 32 uses the Wi-Fi network to determine whether or not print data representing an image to be printed has been received from the mobile terminal via the Wi-Fi I / F 20. If the CPU 32 receives print data (YES in S20), in S22, the CPU 32 supplies the print data to the print execution unit 16 and causes the print execution unit 16 to execute printing according to the print data. When S22 ends, the process returns to S20.

[0039] Also, in S30, the CPU 32 uses the Wi-Fi network to determine whether or not a disconnection signal has been received from the mobile terminal via the Wi-Fi I / F 20. The disconnection signal is a signal for requesting disconnection of the Wi-Fi connection. Therefore, if a disconnection signal is received (YES in S30), the Wi-Fi connection between the printer PR and the mobile terminal is disconnected, and the process proceeds to S32.

[0040] In S32, the CPU 32 shifts the operation state of the printer PR from the G / O state to the device state. This can reduce the power consumption of the printer PR. In addition, in S32, the CPU 32 further changes the Wi-Fi I / F 20 from the ON state to the OFF state. This can reduce the power consumption of the printer PR. In a modified example, instead of changing to the OFF state where power is not supplied, the printer PR may be changed to a standby state where power is supplied. Here, the power consumption of the standby state is lower than that of the ON state. In S32, the CPU 32 further generates a new SSID and stores the new SSID in the memory 34 in place of the old SSID in the memory 34. That is, the CPU 32 changes the SSID. In this way, the SSID is changed every time the printer PR stops the G / O state, so the security of the Wi-Fi network can be improved. When S32 ends, the process returns to S10.

[0041] (Processing of mobile terminal PT1; Figure 3) Next, the process executed by the CPU 72 of the portable terminal PT1 will be described with reference to Fig. 3. The portable terminal PT2 can also execute the same process. When an operation for starting the printer application 78 is executed on the portable terminal PT1, the CPU 72 starts the process of Fig. 3 in accordance with the printer application 78. The operation on the portable terminal PT1 may be executed on the operation unit 52 or on the display unit 54 (i.e., a touch panel). This also applies hereinafter.

[0042] In S50, the CPU 72 monitors whether an Advertise signal is received via the BTI / F 62. As described above, the printer PR broadcasts an Advertise signal including the BT device name "NP" (see S6 in FIG. 2). Therefore, if the distance between the printer PR and the portable terminal PT1 is shorter than the maximum distance at which BT communication can be performed, the CPU 72 receives an Advertise signal from the printer PR via the BTI / F 62. In this case, the CPU 72 determines YES in S50 and proceeds to S52.

[0043] In S52, the CPU 72 judges whether or not the BT device name in the received Advertise signal (i.e., the received BT device name) is stored in the BT device name storage area 80. As described above, the BT device name storage area 80 stores the BT device name of an established printer. Therefore, the judgment in S52 means judging whether or not the printer PR that sent the Advertise signal is an established printer. If the CPU 72 judges that the received BT device name is stored in the BT device name storage area 80 (YES in S52), the process proceeds to S60. On the other hand, if the CPU 72 judges that the received BT device name is not stored in the BT device name storage area 80 (NO in S52), the process proceeds to S54.

[0044] In S54, the CPU 72 judges whether the distance between the printer PR that is the sender of the Advertise signal and the portable terminal PT1 is less than a threshold value. Here, the threshold value is a distance (for example, 1 m) that is smaller than the maximum distance (for example, several tens of meters) at which BT communication can be performed. Specifically, the printer application 78 describes the radio wave strength of the Advertise signal at the time of transmission from the printer PR (hereinafter referred to as the "transmission strength"). Then, the CPU 72 acquires from the BTI / F 62 the radio wave strength of the Advertise signal at the time of reception by the BTI / F 62 (hereinafter referred to as the "reception strength"), and calculates the attenuation rate of the reception strength relative to the transmission strength. The printer application 78 further describes the relationship between the attenuation rate and the distance. The CPU 72 uses the calculated attenuation rate and the above relationship to specify the distance between the printer PR and the portable terminal PT1, and judges whether the specified distance is less than a threshold value. If the CPU 72 determines that the specified distance is less than the threshold (YES in S54), the process proceeds to S60, and if the CPU 72 determines that the specified distance is equal to or greater than the threshold (NO in S54), the process returns to S50.

[0045] In S60, the CPU 72 unicasts a Scan_Req signal to the printer PR via the BTI / F 62. This allows the Scan_Req signal to be received by the printer PR (see YES in S10 of FIG. 2). Then, in S62, the CPU 72 receives a Scan_Res signal from the printer PR via the BTI / F 62 (see S12 of FIG. 2).

[0046] In S64, the CPU 72 transmits a Wi-Fi connection request signal including the SSID in the Scan_Res signal received in S62 (i.e., the current SSID of the printer PR) to the printer PR via the Wi-Fi I / F 60. This allows the Wi-Fi connection request signal to be received by the printer PR (see S16 in FIG. 2).

[0047] In S66, the CPU 72 establishes a wireless connection (i.e., a Wi-Fi connection) with the printer PR via the Wi-Fi I / F 60. Specifically, the CPU 72 executes communication of various signals (e.g., receiving an Association Response signal, communicating 4-Way Handshake, etc.) with the printer PR via the Wi-Fi I / F 60. In the process of communication of the various signals described above, the CPU 72 transmits network information including the SSID and password in the Scan_Res signal received in S62 to the printer PR. If authentication of the network information is successful in the printer PR, a Wi-Fi connection with the printer PR is established. As a result, a Wi-Fi network is formed in which the printer PR operates in a G / O state and the portable terminal PT1 operates as a legacy network (see S18 in FIG. 2).

[0048] In S70, the CPU 72 judges whether or not a print instruction operation has been performed on the portable terminal PT1 by the user. The print instruction operation includes an operation of selecting one image file from one or more image files stored in the memory 74, and an operation of selecting a button indicating execution of printing. The image file selected here is print data representing an image to be printed by the printer PR. If a print instruction operation has been performed, the CPU 72 judges YES in S70 and proceeds to S72. On the other hand, if a print instruction operation has not been performed until a predetermined time has elapsed since the end of S66, or if an operation of selecting a button indicating cancellation has been performed on the portable terminal PT1 by the user, the CPU 72 judges NO in S70, skips S72 and S74, and proceeds to S80.

[0049] In S72, the CPU 72 uses the Wi-Fi network to send the print data to the printer PR via the Wi-Fi I / F 60. This allows the printer PR to print the image represented by the print data (see S22 in FIG. 2).

[0050] In S74, the CPU 72 stores the BT device name "NP" of the printer PR in the Scan_Res signal received in S62 in the BT device name storage area 80. As a result, the BT device name "NP" of the established printer is stored in the BT device name storage area 80. Note that when S74 is executed after YES is determined in S52, the BT device name "NP" has already been stored in the BT device name storage area 80. In this case, the CPU 72 skips S74 and proceeds to S80.

[0051] In S80, when the transmission of the print data to the printer PR is completed, the CPU 72 uses the Wi-Fi network to send a disconnection signal to the printer PR via the Wi-Fi I / F 60. As a result, the Wi-Fi connection between the printer PR and the portable terminal PT1 is disconnected (see YES in S30 in FIG. 2). When S80 ends, the process returns to S50.

[0052] (Specific case) Next, specific cases realized by the processes in Fig. 2 and Fig. 3 will be described with reference to Fig. 4 and Fig. 5. In Fig. 4 and Fig. 5, the thick arrow and thin arrow between the printer PR and the portable terminals PT1 and PT2 indicate Wi-Fi communication and BT communication, respectively. This point is the same in the second embodiment and subsequent examples described later.

[0053] (Case A; Figure 4) In the initial state of case A, the power supply of the printer PR is turned off. Also, the portable terminal PT1 has not established a Wi-Fi connection with the printer PR in the past. That is, the BT device name "NP" of the printer PR is not stored in the BT device name storage area 80 of the portable terminal PT1.

[0054] At A0, the printer PR is turned on by the user. In this case, the printer PR generates the SSID "X1" at T2 (S2 in FIG. 2), and changes the BTI / F22 to the ON state at T4 (S4). Then, at T6, the printer PR repeatedly transmits an Advertise signal (S6).

[0055] At A1, an operation for starting the printer application 78 is executed by the user on the portable terminal PT1. At this time, the distance between the printer PR and the portable terminal PT1 is equal to or greater than a threshold value (i.e., 1 m). In this case, when the portable terminal PT1 receives an Advertise signal from the printer PR (YES in S50 of FIG. 3), it determines at T10 that the BT device name "NP" in the Advertise signal has not been stored (NO in S52), and further determines that the distance between the printer PR and the portable terminal PT1 is equal to or greater than a threshold value (NO in S54). In this case, the portable terminal PT1 does not transmit a Scan_Req signal to the printer PR (does not proceed to S60 if NO in S54). As a result, a Wi-Fi connection is not established between the printer PR and the portable terminal PT1.

[0056] When the user desires to have the printer PR execute printing, the user moves the portable terminal PT1 closer to the printer PR at A2. As a result, the distance between the printer PR and the portable terminal PT1 becomes less than the threshold value. In this case, when the portable terminal PT1 receives an Advertise signal from the printer PR (YES in S50 of FIG. 3), it determines at T12 that the BT device name "NP" in the Advertise signal has not been stored (NO in S52), and further determines that the distance between the printer PR and the portable terminal PT1 is less than the threshold value (YES in S54). In this case, at T20, the portable terminal PT1 transmits a Scan_Req signal to the printer PR (S60). The Scan_Req signal includes the BT device name "NP" as information indicating the destination, and includes the BT device name "N1" as information indicating the source.

[0057] When the printer PR receives a Scan_Req signal from the portable terminal PT1, in T22, it transmits a Scan_Res signal to the portable terminal PT1 (YES in S10, S12 in FIG. 2). The Scan_Res signal includes the BT device name "N1" as information indicating the destination, and includes the BT device name "NP" as information indicating the source. The Scan_Res signal also includes the SSID "X1" and the password "PS". Then, in T24, the printer PR changes the Wi-Fi I / F 20 to the ON state, and transitions to the G / O state (S14).

[0058] When the portable terminal PT1 receives a Scan_Res signal from the printer PR (S62 in FIG. 3), in T30, the portable terminal PT1 transmits a Wi-Fi connection request signal including the SSID "X1" in the Scan_Res signal to the printer PR (S64). When the Wi-Fi connection request signal is transmitted from the portable terminal PT1 to the printer PR, in T32, a Wi-Fi connection is established between the printer PR and the portable terminal PT1 (S18 in FIG. 2, S66 in FIG. 3). Note that in the process of T32, the printer PR receives network information including the SSID "X1" and password "PS" from the portable terminal PT1 and executes authentication of the network information. Since the authentication is successful in this case, the printer PR establishes a Wi-Fi connection with the portable terminal PT1. As a result, a Wi-Fi network is formed in which the printer PR operates as a parent station and the portable terminal PT1 operates as a child station.

[0059] In A3, a print instruction operation is executed on the portable terminal PT1 (YES in S70 of FIG. 3). In this case, the portable terminal PT1 transmits print data to the printer PR using a Wi-Fi connection in T40 (S72), and stores the BT device name “NP” in the Scan_Res signal of T22 in T42 (S74).

[0060] When the printer PR receives print data from the portable terminal PT1, in T44 it executes print processing according to the print data (S22 in FIG. 2). Note that a configuration is conceivable in which the printer PR receives print data from the portable terminal PT1 using BT communication. However, the data size of the print data may be large, and the communication speed of BT communication is slower than the communication speed of Wi-Fi communication. Therefore, if a configuration is adopted in which print data is communicated using BT communication, it may take a long time to communicate the print data. In contrast, in this embodiment, the print data is communicated using Wi-Fi communication, so the print data can be communicated quickly.

[0061] After transmitting the print data to the printer PR, the portable terminal PT1 transmits a disconnection signal to the printer PR at T50 to disconnect the Wi-Fi connection (S80 in FIG. 3). This disconnects the Wi-Fi connection between the printer PR and the portable terminal PT1.

[0062] After receiving a disconnection signal from the portable terminal PT1 (YES in S30 in FIG. 2), the printer PR transitions from the G / O state to the device state in T52, turns off the Wi-Fi I / F 20, and generates an SSID "X2" that is different from the SSID "X1" (S32). Since T52 is executed, the power consumption of the printer PR can be reduced.

[0063] (Case B1; Figure 5) Case B1 in Fig. 5 is a continuation of case A in Fig. 4, where the Wi-Fi I / F 20 is OFF (see T52 in Fig. 4) and the BTI / F 22 is ON (see T4). Also, the BT device name storage area 80 of the portable terminal PT1 stores the BT device name "NP" of the printer PR, which is an established printer (see T42).

[0064] At A11, an operation for starting the printer application 78 is executed by the user on the portable terminal PT1. At this point, the distance between the printer PR and the portable terminal PT1 is equal to or greater than a threshold value. When the portable terminal PT1 receives an Advertise signal of T106 from the printer PR (YES in S50 of FIG. 3), it determines at T110 that the BT device name "NP" in the Advertise signal has been stored (YES in S52). Then, at T120, the portable terminal PT1 transmits a Scan_Req signal to the printer PR (S60), even though the distance between the printer PR and the portable terminal PT1 is equal to or greater than the threshold value.

[0065] A13 and T122 to T152 are the same as A3 and T22 to T52 in Fig. 4. However, it differs from case A in that SSID "X2" is used. Also, since the mobile terminal PT1 has already stored the BT device name "NP", the process corresponding to T42 in Fig. 4 is not executed. Also, in T152, SSID "X3", which is different from SSIDs "X1" and "X2", is generated.

[0066] (Case B2) Case B2 is a continuation of case A. The BT device name "NP" is not stored in the BT device name storage area (not shown) of the portable terminal PT2.

[0067] In A15, an operation for starting a printer application (not shown) is executed by the user on the portable terminal PT2. At this time, the distance between the printer PR and the portable terminal PT2 is equal to or greater than a threshold value. When the portable terminal PT2 receives an Advertise signal of T206 from the printer PR (YES in S50 of FIG. 3), the portable terminal PT2 determines in T210 that the BT device name "NP" in the Advertise signal has not been stored (NO in S52), and further determines that the distance between the printer PR and the portable terminal PT2 is equal to or greater than a threshold value (NO in S54). In this case, the portable terminal PT2 does not transmit a Scan_Req signal to the printer PR (does not proceed to S60 if NO in S54). As a result, a Wi-Fi connection is not established between the printer PR and the portable terminal PT2.

[0068] (Effects of this embodiment) When the portable terminal PT1 receives an Advertise signal from the printer PR (T6 in FIG. 4) in a state where the distance between the printer PR and the portable terminal PT1 is less than the threshold, that is, in a state where it is highly likely that the user wants a Wi-Fi connection to be established between the printer PR and the portable terminal PT1, the portable terminal PT1 transmits a Scan_Req signal to the printer PR (T20) and receives a Scan_Res signal (T22). This enables the portable terminal PT1 to establish a Wi-Fi connection with the printer PR using the network information in the Scan_Res signal and transmit print data to the printer PR (T30, T32, T40). The portable terminal PT1 then stores the BT device name "NP" of the printer PR, which is the established printer (T42).

[0069] After storing the BT device name "NP" of the printer PR, the portable terminal PT1 may receive an Advertise signal from an unconnected printer (not shown) with which a Wi-Fi connection with the portable terminal PT1 has not been established. In a state where the distance between the unconnected printer and the portable terminal PT1 is equal to or greater than a threshold, that is, in a state where it is unlikely that the user wants a Wi-Fi connection to be established between the unconnected printer and the portable terminal PT1, the portable terminal PT1 does not transmit a Scan_Req signal to the unconnected printer even if it receives an Advertise signal from the unconnected printer (NO in S52 and NO in S54 in FIG. 4). As a result, the portable terminal PT1 does not establish a Wi-Fi connection with the unconnected printer.

[0070] On the other hand, when the portable terminal PT1 receives an Advertise signal from the printer PR, which is an established printer (T106 in FIG. 5), it determines that the BT device name "NP" in the Advertise signal has been stored (T110). In this case, since the printer PR is an established printer, it is highly likely that the user wants a Wi-Fi connection to be re-established between the printer PR and the portable terminal PT1. Therefore, even though the distance between the printer PR and the portable terminal PT1 is equal to or greater than the threshold, the portable terminal PT1 transmits a Scan_Req signal to the printer PR (T120) and receives a Scan_Res signal (T122). This allows the portable terminal PT1 to re-establish a Wi-Fi connection with the printer PR by using the network information in the Scan_Res signal and transmit print data to the printer PR (T130, T132, T140). In this way, the portable terminal PT1 can establish a Wi-Fi connection with the printer PR, which is an established printer, in an appropriate situation after performing BT communication.

[0071] In this embodiment, the portable terminal PT1 receives an Advertise signal (for example, T106 in FIG. 5), transmits a Scan_Req signal (T120), and receives a Scan_Res signal (T122) without establishing a logical link in the BT system. Since there is no need to establish a logical link in the BT system, the processing load of the portable terminal PT1 can be reduced.

[0072] (Correspondence) The portable terminal PT1 is an example of a "second communication device". The printer PR is an example of a "first communication device" and a "third communication device". The BT device name "NP" of the printer PR is an example of a "first device identification information" and a "third device identification information". The Wi-Fi method and the BT method are examples of a "first communication method" and a "second communication method", respectively. The Wi-Fi I / F60 and the BTI / F62 of the portable terminal PT1 are examples of a "first interface" and a "second interface", respectively. The threshold value of S54 in FIG. 3 is an example of a "predetermined distance". The Advertise signal of T106 in FIG. 5 and the Advertise signal of T6 in FIG. 4 are examples of a "first predetermined signal" and a "second predetermined signal", respectively. The Scan_Req signal of T20 in FIG. 4 and the Scan_Req signal of T120 in FIG. 5 are examples of a "first predetermined request" and a "second predetermined request", respectively. The SSID "X1" and password "PS" in the Scan_Res signal of T22 in FIG. 4 are an example of "first network related information". The Wi-Fi connection request signal of T30 and the Wi-Fi connection of T32 are examples of a "first wireless connection request" and a "first wireless connection", respectively. The SSID "X2" and password "PS" in the Scan_Res signal of T122 in FIG. 5 are an example of "second network related information". The Wi-Fi connection request signal of T130 and the Wi-Fi connection of T132 are examples of a "second wireless connection request" and a "second wireless connection", respectively.

[0073] (Second Example) The following mainly describes the differences from the first embodiment. In this embodiment, the portable terminal PT1 does not have a BT device name storage area 80. The printer PR has a BT device name storage area 40, and can store the BT device name of a portable terminal with which a Wi-Fi connection with the printer PR has been established (hereinafter referred to as an "established terminal").

[0074] (Printer PR processing; Figure 6) The CPU 32 of the printer PR executes the process of FIG. 6 instead of the process of FIG. 2. S2 to S6 are the same as in FIG. 2. In S100, the CPU 32 monitors whether a BT connection request is received from a portable terminal via the BTI / F 22. The BT connection request is a signal transmitted from a portable terminal that has received an Advertise signal, and is a signal for requesting the establishment of a logical link of the BT method (i.e., a BT connection). The BT connection request is a unicast signal, and includes the BT device name "NP" of the printer PR as information indicating the destination, and also includes the BT device name of the portable terminal as information indicating the source. If the CPU 32 receives a BT connection request, it determines YES in S100 and proceeds to S102.

[0075] In S102, the CPU 32 transmits BT setting information to the mobile terminal via the BTI / F 22, and executes pairing with the mobile terminal using the BT setting information to establish a BT connection with the mobile terminal. The BT setting information is information that is pre-stored in the memory 34, and includes various information (authentication method, encryption method, passkey, etc.) for establishing a BT connection.

[0076] S104 is the same as S14 in FIG. 2. In S110, the CPU 32 monitors the reception of distance information via the BTI / F 22 using the BT connection. The distance information is a signal repeatedly transmitted from the portable terminal that has established the BT connection, and indicates the distance between the printer PR and the portable terminal. The distance information indicates either "Far", which means that the distance between the printer PR and the portable terminal is equal to or greater than a threshold, or "Near", which means that the distance is less than the threshold. Here, the threshold is a distance (e.g., 3 m) that is smaller than the maximum distance (e.g., several tens of meters) at which BT communication can be performed. The distance information is communicated using the BT connection. Therefore, the distance information is communicated by executing communication at the highest layer (i.e., L2CAP) for forming a logical link and communication at a further higher layer (e.g., Attribute Protocol, Generic Attribute Profile, etc.). The distance information is a unicast signal, and includes the BT device name "NP" of the printer PR as information indicating the destination, and the BT device name of the portable terminal as information indicating the source. If the CPU 32 has received distance information, it determines YES in S110 and proceeds to S112.

[0077] In S112, the CPU 32 judges whether or not the BT device name of the transmission source in the received distance information (i.e., the BT device name of the mobile terminal) is stored in the BT device name storage area 40. As described above, the BT device name storage area 40 stores the BT device name of an established terminal. Therefore, the judgment in S112 means judging whether or not the mobile terminal that transmitted the distance information is an established terminal. If the CPU 32 judges that the BT device name of the transmission source is stored in the BT device name storage area 40 (YES in S112), the process proceeds to S116. On the other hand, if the CPU 32 judges that the BT device name of the transmission source is not stored in the BT device name storage area 40 (NO in S112), the process proceeds to S114.

[0078] In S114, the CPU 32 judges whether the distance information indicates "Near". If the CPU 32 judges that the distance information indicates "Near" (YES in S114), the CPU 32 proceeds to S116, and if the CPU 32 judges that the distance information indicates "Far" (NO in S114), the CPU 32 returns to S110.

[0079] In S116, the CPU 32 uses the BT connection to transmit network information including the current SSID and a predetermined password to the mobile terminal via the BTI / F 22. The network information is transmitted by unicast communication, and includes the BT device name of the mobile terminal as information indicating the destination, and also includes the BT device name "NP" of the printer PR as information indicating the source. S16 to S32 thereafter are the same as those in FIG. 2. In S120 after S22, the CPU 32 stores the BT device name of the mobile terminal in the distance information received in S110 in the BT device name storage area 40. As a result, the BT device name of the established terminal is stored in the BT device name storage area 40. Note that if the BT device name in the distance information has already been stored in the BT device name storage area 40, S120 is skipped.

[0080] (Processing of mobile terminal PT1; Figure 7) The CPU 72 of the portable terminal PT1 executes the process of FIG. 7 instead of the process of FIG. 3. S50 is the same as in FIG. 3. In S150, the CPU 72 sends a BT connection request to the printer PR via the BTI / F 62 (see YES in S100 in FIG. 6). In S152, the CPU 72 receives BT setting information from the printer PR via the BTI / F 62, and executes pairing with the printer PR using the BT setting information to establish a BT connection with the printer PR (see S102 in FIG. 6).

[0081] In S154, the CPU 72 starts a transmission process to transmit distance information to the printer PR via the BTI / F 62 using the BT connection (see YES in S110 of FIG. 6). The method of identifying the distance between the printer PR and the portable terminal PT1 is the same as in the first embodiment.

[0082] In S160, the CPU 72 monitors whether network information including the current SSID and a specific password is received from the printer PR via the BTI / F 62 using the BT connection. If the network information is received, the CPU 72 determines YES in S160 and proceeds to S64. S64 to S80 are the same as in Fig. 3. However, in this embodiment, S74 in Fig. 3 is not executed.

[0083] (Case C: Figure 8) Next, specific cases realized by the processes in Fig. 6 and Fig. 7 will be described with reference to Fig. 8 and Fig. 9. The initial state of case C in Fig. 8 is similar to the initial state of case A in Fig. 4. The contents of case C will be described with a focus on the differences from case A in Fig. 4. A0, A1, T2 to T6 are similar to Fig. 4.

[0084] When the portable terminal PT1 receives an Advertise signal from the printer PR, at T13, it transmits a BT connection request to the printer PR regardless of the distance between the printer PR and the portable terminal PT1 (S150 in FIG. 7).

[0085] When the printer PR receives a BT connection request from the portable terminal PT1, in T14, it establishes a BT connection with the portable terminal PT1 (YES in S100, S102 in FIG. 6). T15 is the same as T24 in FIG.

[0086] At T16, the portable terminal PT1 uses the BT connection to send distance information to the printer PR (S154 in FIG. 7). At this point, the distance between the printer PR and the portable terminal PT1 is equal to or greater than the threshold. Therefore, the distance information indicates "Far."

[0087] When the printer PR receives the distance information of T16 from the portable terminal PT1, the printer PR determines in T16A that the BT device name "N1" in the distance information has not been stored (NO in S112 of FIG. 6), and further determines that the distance information indicates "Far" (NO in S114). In this case, the printer PR does not transmit network information to the portable terminal PT1 (does not proceed to S116 if NO in S114). As a result, a Wi-Fi connection is not established between the printer PR and the portable terminal PT1.

[0088] When the user desires to have the printer PR execute printing, at A2, the user moves the portable terminal PT1 closer to the printer PR. As a result, the distance between the printer PR and the portable terminal PT1 becomes less than the threshold value. In this case, at T18, the portable terminal PT1 uses the BT connection to send distance information indicating "Near" to the printer PR (S154 in FIG. 7).

[0089] When the printer PR receives the distance information of T18 from the portable terminal PT1, the printer PR determines in T18A that the BT device name "N1" of the portable terminal PT1 in the distance information has not been stored (NO in S112 of FIG. 6), and further determines that the distance information indicates "Near" (YES in S114). In this case, in T19, the printer PR transmits network information including the SSID "X1" and password "PS" to the portable terminal PT1 (S116). T30 to T52, except for T45, are the same as in FIG. 4. However, T42 in FIG. 4 is not executed. Also, in T45, the printer PR stores the BT device name "N1" in the distance information of T18 (S120).

[0090] (Case D1; Figure 9) Case D1 in Fig. 9 is a continuation of case C in Fig. 8, where the Wi-Fi I / F 20 is OFF (see T52 in Fig. 8) and the BTI / F 22 is ON (see T4). Also, the BT device name storage area 40 of the printer PR stores the BT device name "N1" of the mobile terminal PT1, which is an established terminal (see T45).

[0091] A11, T106 to T116 are the same as A1, T6 to T16 in Fig. 8. When the printer PR receives distance information of T116 (i.e., distance information indicating "Far") from the portable terminal PT1, it determines in T116A that the BT device name "N1" in the distance information has been stored (YES in S112 in Fig. 6). In this case, in T119, the printer PR transmits network information including the SSID "X2" and password "PS" to the portable terminal PT1, even though the distance between the printer PR and the portable terminal PT1 is equal to or greater than the threshold (S116). A13 and T130 to T152 are the same as Fig. 5.

[0092] (Case D2) Case D2 is a continuation of case C. The BT device name "N2" of the portable terminal PT2 is not stored in the BT device name storage area 40 of the printer PR. T106 to T115 are the same as case D1, except that the portable terminal PT2 is used instead of the portable terminal PT1.

[0093] When the printer PR receives the distance information of T216 from the portable terminal PT2, the printer PR determines in T216A that the BT device name "N2" in the distance information is not stored in the BT device name storage area 40 (NO in S112), and further determines that the distance information indicates "Far" (NO in S114). In this case, the printer PR does not transmit network information to the portable terminal PT2 (does not proceed to S116 if NO in S114). As a result, a Wi-Fi connection is not established between the printer PR and the portable terminal PT2.

[0094] (Effects of this embodiment) The printer PR transmits network information to the portable terminal PT1 when the distance between the printer PR and the portable terminal PT1 is less than the threshold, i.e., when it is highly likely that the user wants a Wi-Fi connection to be established between the printer PR and the portable terminal PT1 (T19 in FIG. 8). This enables the printer PR to establish a Wi-Fi connection with the portable terminal PT1 and receive print data from the portable terminal PT1 (T30, T32, T40). The printer PR then stores the BT device name "N1" of the portable terminal PT1, which is the established terminal (T45).

[0095] After storing the BT device name "N1", the printer PR receives distance information from the portable terminal PT2, which is an unconnected terminal with which a Wi-Fi connection has not been established (T216 in case D2 in FIG. 9). In a state where the distance between the printer PR and the unconnected terminal (i.e., the portable terminal PT2) is equal to or greater than a threshold, that is, in a state where it is unlikely that the user wants a Wi-Fi connection to be established with the unconnected terminal, the printer PR does not transmit network information to the unconnected terminal even if it receives distance information from the unconnected terminal (NO in S112 and NO in S114 in FIG. 6). As a result, the printer PR does not establish a Wi-Fi connection with the portable terminal PT2, which is an unconnected terminal.

[0096] On the other hand, when the printer PR receives distance information from the portable terminal PT1 (T116 in case D1 of FIG. 9), it determines that the BT device name "N1" in the distance information has been stored (T116A). In this case, since the portable terminal PT1 is an established terminal, it is highly likely that the user wants a Wi-Fi connection to be re-established between the printer PR and the portable terminal PT1. Therefore, the printer PR transmits network information to the printer PR even though the distance between the printer PR and the portable terminal PT1 is equal to or greater than the threshold (T119). This enables the printer PR to establish a Wi-Fi connection with the portable terminal PT1 and receive print data from the portable terminal PT1 (T130, T132, T140). In this way, the printer PR can establish a Wi-Fi connection with the portable terminal PT1, which is an established terminal, in an appropriate situation after performing BT communication.

[0097] (Correspondence) The printer PR is an example of a "first communication device". The portable terminal PT1 is an example of a "second communication device" and a "third communication device". The BT device name "N1" of the portable terminal PT1 is an example of a "second device identification information" and a "third device identification information". The Wi-Fi I / F20 and BTI / F22 of the printer PR are examples of a "first interface" and a "second interface", respectively. The threshold value (e.g., 3 m) of the boundary between "Near" and "Far" included in the distance information of S154 in FIG. 7 is an example of a "predetermined distance". The Advertise signal is an example of a "predetermined signal". The distance information of T16 (or T18) in FIG. 8 is an example of a "first distance information", and the distance information of T116 in FIG. 9 is an example of a "specific information" and a "second distance information". The network information of T19 in FIG. 8 and the network information of T119 in FIG. 9 are examples of "first network related information" and "second network related information", respectively.

[0098] (Third Example) The following mainly describes the differences from the first and second embodiments. As shown in Fig. 1, the printer PR has an NFC I / F 24 for performing wireless communication according to the NFC method (hereinafter referred to as "NFC communication"). The NFC I / F 24 has a memory 26. Furthermore, the portable terminals PT1 and PT2 each have an NFC I / F 64. In this embodiment, the portable terminal PT1 has a BT device name storage area 80, and the printer PR does not have a BT device name storage area 40.

[0099] The NFC method is a wireless communication method for so-called short-distance wireless communication, and is a wireless communication method based on the international standard specifications of ISO / IEC21481 or 18092, for example. The communication speed of NFC communication (for example, a maximum communication speed of 424 Kbps) is slower than the communication speed of BT communication (for example, a maximum communication speed of 24 Mbps). The carrier frequency in NFC communication (for example, 13.56 MHz band) is different from the carrier frequency in Wi-Fi communication (for example, 2.4 GHz band or 5.0 GHz band) and the carrier frequency in BT communication (for example, 2.4 GHz band). In addition, the maximum distance at which NFC communication can be performed (for example, about 10 cm) is shorter than the maximum distance at which BT communication can be performed (for example, about several tens of meters).

[0100] (Printer PR processing; Figure 10) The CPU 32 of the printer PR executes the process of FIG. 10 instead of the process of FIG. 2. S2 is the same as in FIG. 2. In S200, the CPU 32 changes the BTI / F 22 from an OFF state to an ON state, and further changes the NFC I / F 24 from an OFF state to an ON state (i.e., power is supplied to the NFC I / F 24). In S202, the CPU 32 supplies the SSID generated in S2 and a predetermined password to the NFC I / F 24. As a result, the current SSID and the predetermined password are stored in the memory 26 of the NFC I / F 24. S6 is the same as in FIG. 2. The CPU 32 repeats sequentially executing each monitoring process of S210 and S212.

[0101] In S210, the CPU 32 monitors whether a communication link via the NFC I / F 24 (hereinafter referred to as an "NFC link") has been established. When the CPU 32 acquires information indicating that an NFC link has been established from the NFC I / F 24, the CPU 32 determines YES in S210 and proceeds to S14. S14 to S18 are the same as in FIG. 2. In S220, the CPU 32 transmits the BT device name "NP" of the printer PR to the portable terminal via the Wi-Fi I / F 20 by using the Wi-Fi connection.

[0102] In S212, the CPU 32 monitors whether a Scan_Req signal is received from the portable terminal via the BTI / F 22. If the CPU 32 receives a Scan_Req signal, the CPU 32 determines YES in S212 and proceeds to S12. S12 to S18 are the same as in FIG.

[0103] S20 to S32 are the same as in Fig. 2. In S240, the CPU 32 supplies the SSID generated in S32 and a predetermined password to the NFC I / F 24. As a result, the predetermined password in the memory 26 of the NFC I / F 24 is not changed, but the current SSID in the memory 26 is changed.

[0104] (Processing of mobile terminal PT1; Figure 11) The CPU 72 of the portable terminal PT1 executes the process of Fig. 11 instead of the process of Fig. 3. The CPU 72 repeats sequential execution of each monitoring process of S50 and S250. S50 and S52 to S80 after YES in S50 are the same as in Fig. 3. However, in this embodiment, the process of S54 in Fig. 3 is not executed, and in the case of YES in S50, the process of S74 in Fig. 3 is not executed.

[0105] In S250, the CPU 72 monitors whether a communication link (i.e., an NFC link) via the NFC I / F64 has been established. When the CPU 72 acquires information indicating that an NFC link has been established from the NFC I / F64, the CPU 72 determines YES in S250 and proceeds to S64. S64 and S66 are the same as those in FIG. 3. In S260, the CPU 72 receives the BT device name "NP" from the printer PR via the Wi-Fi I / F 60 using a Wi-Fi connection (see S220 in FIG. 10). S70 to S80 after S260 are the same as those in FIG. 3. However, in S74, the CPU 72 stores the BT device name "NP" received in S260 by Wi-Fi communication in the BT device name storage area 80.

[0106] (Case E: Figure 12) Next, specific cases realized by the processes in Fig. 10 and Fig. 11 will be described with reference to Fig. 12 and Fig. 13. In Fig. 12 and Fig. 13, the thick arrow, thin arrow, and dashed arrow between the printer PR and the portable terminals PT1 and PT2 indicate Wi-Fi communication, BT communication, and NFC communication, respectively. This also applies to the fourth embodiment described later. The initial state of case E in Fig. 12 is the same as the initial state of case A in Fig. 4. The contents of case E will be described, focusing on the differences from case A in Fig. 4.

[0107] When the power is turned on by the user (A0), the printer PR generates an SSID "X1" in T302 (S2 in FIG. 10), changes the BTI / F22 and NFC I / F24 to the ON state in T304 (S200), and supplies the SSID "X1" and password "PS" to the NFC I / F24 in T305. A1 and T306 are the same as A1 and T6 in FIG.

[0108] When the portable terminal PT1 receives an Advertise signal from the printer PR, it determines in T310 that the BT device name "NP" in the Advertise signal has not been stored (NO in S52 of FIG. 11). In this case, the portable terminal PT1 does not transmit a Scan_Req signal to the printer PR (does not proceed to S60 if NO in S54). As a result, a Wi-Fi connection is not established between the printer PR and the portable terminal PT1.

[0109] When the user desires to have the printer PR execute printing, the user brings the portable terminal PT1 closer to the printer PR at A2. This makes the distance between the printer PR and the portable terminal PT1 less than the maximum distance (e.g., 10 cm) at which NFC communication can be performed. In this case, an NFC link is established between the printer PR and the portable terminal PT1.

[0110] The memory 26 of the NFC I / F 24 of the printer PR stores the SSID "X1" and the password "PS" (T305). Then, when an NFC link is established, the NFC I / F 24 transmits the SSID "X1" and the password "PS" in the memory 26 to the portable terminal PT1 in T320 without receiving an instruction from the CPU 32 of the control unit 30. T324, T330, and T332 are the same as T24, T30, and T32 in FIG. 4 (YES in S210, S14 to S18 in FIG. 10, YES in S250, S64, S66 in FIG. 11). Then, in T334, the printer PR transmits the BT device name "NP" to the portable terminal PT1 using the Wi-Fi connection (S220 in FIG. 10).

[0111] A3, T340 to T352 are similar to A3, T40 to T52 in Fig. 4. However, in T342, the portable terminal PT1 stores the BT device name "NP" received from the printer PR by the Wi-Fi communication in T334 (S74 in Fig. 11). In T354, the printer PR provides the SSID "X2" and password "PS" to the NFC I / F 24 (S240 in Fig. 10).

[0112] (Case F1; Figure 13) Case F1 in Fig. 13 is a continuation of case E in Fig. 12, where the Wi-Fi I / F 20 is OFF (see T352 in Fig. 12), and the BTI / F 22 and NFC I / F 24 are ON (see T304). Also, the BT device name storage area 80 of the portable terminal PT1 stores the BT device name "NP" of the printer PR, which is an established printer (see T342).

[0113] A11 and A13 are the same as in Fig. 5, and T406 to T452 are the same as T106 to T152 in Fig. 5 (YES at S212, S12 to S18, S30 to S32, YES at S50, YES at S52, S60 to S80 in Fig. 11). In T454, the printer PR supplies the SSID "X3" and password "PS" to the NFC I / F 24 (S240 in Fig. 10).

[0114] (Case F2) Case F2 is a continuation of case E. The BT device name "NP" of the printer PR is not stored in the BT device name storage area (not shown) of the portable terminal PT2.

[0115] A15 is the same as in Fig. 5. When the portable terminal PT2 receives an Advertise signal of T506 from the printer PR (YES in S50 of Fig. 11), it determines in T510 that the BT device name "NP" in the Advertise signal has not been stored (NO in S52). In this case, the portable terminal PT2 does not send a Scan_Req signal to the printer PR (does not proceed to S60 if NO in S52). As a result, a Wi-Fi connection is not established between the printer PR and the portable terminal PT2.

[0116] (Effects of this embodiment) In this embodiment, similarly to the first embodiment, the portable terminal PT1 can establish a Wi-Fi connection with the printer PR, which is an already-established printer, in an appropriate situation after performing BT communication. Also, since the portable terminal PT1 does not need to establish a logical link of the BT method, the processing load of the portable terminal PT1 can be reduced.

[0117] (Correspondence) The BT method and the NFC method are examples of a "first type of communication method" and a "second type of communication method", respectively. The BTI / F62 and NFC I / F64 of the portable terminal PT1 are examples of a "first type of interface" and a "second type of interface", respectively. The maximum distance at which NFC communication can be performed (e.g., 10 cm) is an example of a "predetermined distance". The SSID "X1" and password "PS" of T320 in FIG. 12 are an example of "first network related information", and the SSID "X2" and password "PS" in the Scan_Res signal of T422 in FIG. 13 are an example of "second network related information".

[0118] (Fourth Example) The following will focus on the differences from the third embodiment. In this embodiment, the printer PR has a BT device name storage area 40, and the portable terminal PT1 does not have a BT device name storage area 80.

[0119] (Printer PR processing; Figure 14) The CPU 32 of the printer PR executes the process of Fig. 14 instead of the process of Fig. 10. S2, S200, S202, S6, S210, and S212 are the same as Fig. 10. Also, S14 to S18 after YES in S210 are the same as Fig. 10. In S221 after S18, the CPU 32 receives the BT device name of the mobile terminal from the mobile terminal via the Wi-Fi I / F 20 using the Wi-Fi connection.

[0120] In S213 after YES in S212, the CPU 32 judges whether or not the BT device name of the transmission source in the Scan_Req signal is stored in the BT device name storage area 40. S12 to S18 after YES in S213 are the same as in Fig. 10. Also, S20 to S32 and S240 are the same as in Fig. 10. In S230, the CPU 32 stores the BT device name received in S221 in the BT device name storage area 40.

[0121] (Processing of mobile terminal PT1; Figure 11) The CPU 72 of the portable terminal PT1 executes the process of FIG. 11, but S260 is different from the third embodiment. In S260, the CPU 72 of the portable terminal PT1 uses the Wi-Fi connection to send the BT device name "N1" of the portable terminal PT1 to the printer PR via the Wi-Fi I / F 60 (see S221 of FIG. 14). Also, in this embodiment, S52 and S74 are not executed.

[0122] (Case E: Figure 12) Next, with reference to Fig. 12 and Fig. 15, a specific case realized by each process in Fig. 11 and Fig. 14 will be described. In case E in Fig. 12, T334 is not executed, and T336 is executed instead. In T336, the portable terminal PT1 transmits the BT device name "N1" of the portable terminal PT1 to the printer PR using a Wi-Fi connection (S260 in Fig. 11). Also, T342 is not executed, and T345 is executed instead. In T345, the printer PR stores the BT device name "N1" received from the portable terminal PT1 by the Wi-Fi communication of T336 (S230 in Fig. 14).

[0123] (Case G1; Figure 15) Case G1 in Fig. 15 is a continuation of case E in Fig. 12. The BT device name storage area 40 of the printer PR stores the BT device name "N1" of the portable terminal PT1, which is an established terminal (see T345 in Fig. 12). Case G1 will be explained, focusing on the differences from case F1 in Fig. 13.

[0124] A11 and T406 to T420 are the same as in Fig. 13. In T421, the printer PR determines that the BT device name "N1" in the Scan_Req signal has been stored (YES in S213 in Fig. 14). In this case, in T422, the printer PR transmits a Scan_Res signal including the SSID "X2" and password "PS" to the portable terminal PT1, even though the distance between the printer PR and the portable terminal PT1 is equal to or greater than the threshold (S12). A13 and T424 to T454 are the same as in Fig. 13.

[0125] (Case G2) Case G2 is a continuation of case E. The BT device name "N2" of the portable terminal PT2 is not stored in the BT device name storage area 40 of the printer PR.

[0126] When the portable terminal PT2 receives an Advertise signal T506 from the printer PR after the operation of A15 is executed (YES in S50 of FIG. 11), it sends a Scan_Req signal to the printer PR in T520, even though the distance between the printer PR and the portable terminal PT2 is equal to or greater than the threshold value.

[0127] When the printer PR receives a Scan_Req signal from the portable terminal PT2, it determines in T521 that the BT device name "N2" in the Scan_Req signal has not been stored (NO in S213 of FIG. 14). In this case, the printer PR does not transmit the SSID "X2" etc. to the portable terminal PT2 (does not proceed to S12 if NO in S213). As a result, a Wi-Fi connection is not established between the printer PR and the portable terminal PT2.

[0128] (Effects of this embodiment) In this embodiment, as in the second embodiment, the printer PR can establish a Wi-Fi connection with the printer PR that is an established printer in an appropriate situation after performing BT communication. Also, since the printer PR does not need to establish a BT-type logical link, the processing load of the printer PR can be reduced.

[0129] (Correspondence) The BTI / F22 and NFC I / F24 of the printer PR are examples of a "first type interface" and a "second type interface", respectively. The maximum distance at which NFC communication can be performed (e.g., 10 cm) is an example of a "predetermined distance". The Scan_Req signal of T420 in FIG. 15 is an example of a "predetermined request" and "specific information". Also, the Scan_Res signal of T422 is an example of a "response". The SSID "X1" and password "PS" of T320 in FIG. 12 are an example of "first network related information", and the SSID "X2" and password "PS" in the Scan_Res signal of T422 in FIG. 15 are an example of "second network related information".

[0130] Although specific examples of the present invention have been described above in detail, these are merely examples and do not limit the scope of the claims. The technology described in the claims includes various modifications and alterations of the specific examples exemplified above. Modifications of the above-mentioned embodiments are listed below.

[0131] (Variation 1) Instead of executing S60 and S62 in FIG. 3 or FIG. 11, the portable terminal PT1 may send a BT connection request to the printer PR, establish a BT connection with the printer PR, and then receive an SSID and a password from the printer PR using the BT connection. In this variation, the BT connection request is an example of a "first specified request" and a "second specified request". Generally speaking, the "first (or second) specified request" and the "first (or second) network related information" may be communicated without executing the highest layer communication for establishing a logical link of the second communication method, as in the first and third embodiments described above, or may be communicated using a logical link, as in this variation.

[0132] (Modification 2) When the portable terminal PT1 repeatedly transmits an Advertise signal, the printer PR may not execute S6 in FIG. 6. In this case, when the printer PR receives an Advertise signal from the portable terminal PT1, the printer PR may determine whether or not the BT device name "N1" of the portable terminal PT1 in the Advertise signal has been stored. When the printer PR determines that the BT device name "N1" has been stored, the printer PR may execute the process from S116 onward. When the printer PR determines that the BT device name "N1" has not been stored, the printer PR may determine whether or not the determined distance is less than a threshold value based on the radio wave intensity of the received Advertise signal. When the printer PR determines that the determined distance is less than the threshold value, the printer PR may execute the process from S116 onward, and when the printer PR determines that the determined distance is equal to or greater than the threshold value, the printer PR may not execute the process from S116 onward. In S116, the network information may be transmitted without establishing a BT connection, or the network information may be transmitted after establishing a BT connection. In this modification, the Advertise signal is an example of the "specific information", and the "predetermined signal transmitter" and the "distance information receiver" can be omitted.

[0133] (Variation 3) When the portable terminal PT1 repeatedly transmits an Advertise signal, the printer PR may not execute S6 in FIG. 14. In this case, when the printer PR receives an Advertise signal from the portable terminal PT1, the printer PR may determine whether or not the BT device name "N1" of the portable terminal PT1 in the Advertise signal has been stored. When the printer PR determines that the BT device name "N1" has been stored, the printer PR may execute the process from S12 onward, and when the printer PR determines that the BT device name "N1" has not been stored, the printer PR may not execute the process from S12 onward. In S12, the network information may be transmitted without establishing a BT connection, or the network information may be transmitted after the BT connection is established. In this variation, the Advertise signal is an example of the "specific information" and the "predetermined request".

[0134] (Variation 4) The portable terminal PT1 may receive the BT device name "NP" from the printer PR by NFC communication, without executing S260 of the third embodiment in Fig. 11. That is, in the "device identification information reception process", the first device identification information may be received via the first interface as in the third embodiment described above, or the first device identification information may be received via the second interface (particularly the second type of interface) as in this variation.

[0135] (Variation 5) The printer PR may receive the BT device name "N1" from the portable terminal PT1 by NFC communication without executing S221 in Fig. 14. That is, the "device identification information receiving unit" may receive the second device identification information via the first interface as in the above fourth embodiment, or may receive the second device identification information via the second interface (particularly the second type of interface) as in this variation.

[0136] (Variation 6) In each of the above embodiments, the printer PR transmits the SSID and password to the portable terminal PT1 (for example, S12 in FIG. 2). Alternatively, the printer PR transmits the SSID to the portable terminal PT1, but does not necessarily need to transmit the password to the portable terminal PT1. In this case, a password entry screen is displayed on the portable terminal PT1, and the password is entered into the portable terminal PT1 by the user. In this variation, only the SSID is an example of the "first (or second) network-related information."

[0137] (Variation 7) The BTI / F22 of the printer PR may include a CPU and a memory. The memory of the BTI / F22 may store a program. The CPU of the BTI / F22 may be able to execute the operations of the above-mentioned embodiments according to the program in the memory of the BTI / F22 without receiving an instruction from the CPU 32 in the control unit 30. Generally speaking, the "first communication device" may include two or more processors (e.g., the CPU 32 in the control unit 30 of the printer PR and the CPU in the BTI / F22) and two or more memories (e.g., the memory 34 in the control unit 30 and the memory in the BTI / F22), and each processor may execute processing according to each program stored in each memory.

[0138] (Modification 8) In the third and fourth embodiments, in S202 and S240 in FIG. 10 and FIG. 14, the CPU 32 of the printer PR supplies the current SSID and password to the NFC I / F 24 and stores these pieces of information in the memory 26 of the NFC I / F 24. As a result, when an NFC link with a portable terminal is established, the NFC I / F 24 can transmit the current SSID and password to the portable terminal without receiving an instruction from the control unit 30 (i.e., the CPU 32). Alternatively, when an NFC link with a portable terminal is established, the NFC I / F 24 may notify the control unit 30 (i.e., the CPU 32) that the NFC link has been established, obtain the current SSID and password from the control unit 30, and transmit these pieces of information to the portable terminal. Generally speaking, the "first network related information transmission unit" may transmit the first network related information to the second communication device via the second type interface.

[0139] (Modification 9) In each embodiment, the printer PR changes the Wi-Fi I / F 20 to the OFF state, for example, in S32 of Fig. 2. Alternatively, the Wi-Fi I / F 20 may be constantly maintained in the ON state while the power of the printer PR is ON.

[0140] (Variation 10) The printer PR may not support WFD, and may instead support so-called SoftAP. In this case, the printer PR starts SoftAP in S14 of FIG. 2, for example, and stops SoftAP in S32.

[0141] (Modification 11) The "device identification information" does not have to be the BT device name of the printer PR or the portable terminal PT1, and may be other identification information (for example, a MAC address, an IP address, etc.).

[0142] (Variation 12) The "first interface" does not have to be an I / F for performing Wi-Fi communication, but may be an I / F for performing wireless communication according to another communication method capable of constructing a wireless LAN. The "second interface" does not have to be an I / F for performing BT communication, but may be, for example, an I / F for performing wireless communication according to another communication method capable of performing short-range wireless communication (for example, the TransferJet (registered trademark) method).

[0143] (Variation 13) The "first communication device" does not have to be the printer PR, and may be, for example, a scanner. In this case, for example, in S20 of FIG. 2, the scanner may transmit scan data generated by scanning an original to the portable terminal PT1, instead of receiving print data from the portable terminal PT1. The "first communication device" may also be a device different from the printer and scanner (for example, a copy machine, a facsimile, a telephone, a PC, a server, a portable terminal, etc.). The "second communication device" does not have to be a portable terminal, and may be another device (for example, a printer, scanner, copy machine, facsimile, a telephone, a desktop PC, a server, etc.).

[0144] (Modification 14) In each embodiment, the CPU 32 of the printer PR and the CPU 72 of the portable terminal PT1 execute a program (i.e., software) to realize each process in Figures 2 to 15. Alternatively, at least one of the processes in Figures 2 to 15 may be realized by hardware such as a logic circuit.

[0145] In addition, the technical elements described in this specification or drawings exert technical utility alone or in various combinations, and are not limited to the combinations described in the claims at the time of filing. In addition, the technologies exemplified in this specification or drawings achieve multiple objectives simultaneously, and achieving one of those objectives is itself technically useful. [Explanation of symbols]

[0146] 2: communication system, PR: printer, 12: operation unit, 14: display unit, 16: print execution unit, 20: Wi-Fi I / F (interface), 22: BTI / F, 24: NFCI / F, 26: memory, 30: control unit, 32: CPU, 34: memory, 36: program, 40: BT device name storage area, PT1, PT2: mobile terminal, 52: operation unit, 54: display unit, 60: Wi-Fi I / F, 62: BTI / F, 64: NFCI / F, 70: control unit, 72: CPU, 74: memory, 76: OS program, 78: printer application, 80: BT device name storage area

Claims

1. A first communication device, a first interface for performing wireless communication according to a first communication method; a second interface for performing wireless communication according to a second communication method different from the first communication method; a first network related information transmission unit that transmits first network related information related to a first wireless network to the second communication device via the second interface when a distance between the first communication device and a second communication device is less than a predetermined distance, the first wireless network being a network for performing wireless communication via the first interface; a first connection request receiving unit that receives a first wireless connection request via the first interface from the second communication device that has received the first network related information; a first establishing unit that, in response to receiving the first wireless connection request from the second communication device, establishes a first wireless connection with the second communication device via the first interface by using the first network relation information, thereby forming the first wireless network to which both the first communication device and the second communication device belong; a device identification information receiving unit that receives, from the second communication device, second device identification information for identifying the second communication device; a storage control unit that stores the second device identification information in a memory of the first communication device; an identification information receiving unit that receives, from a third communication device via the second interface after the second device identification information is stored in the memory, identification information including third device identification information for identifying the third communication device; an identification information determination unit that determines whether the third device identification information in the specific information matches the second device identification information in the memory; a second network relationship information transmission unit that transmits second network relationship information related to a second wireless network to the second communication device that matches the third communication device via the second interface when it is determined that the third device identification information matches the second device identification information, and does not transmit the second network relationship information to the third communication device when it is determined that the third device identification information does not match the second device identification information, the second wireless network being a network for performing wireless communication via the first interface, and the second network relationship information being different from the first network relationship information; a second connection request receiving unit that receives a second wireless connection request via the first interface from the second communication device that has received the second network related information; a second establishing unit that, in response to receiving the second wireless connection request from the second communication device, establishes a second wireless connection with the second communication device via the first interface by using the second network relation information, thereby forming the second wireless network to which both the first communication device and the second communication device belong; A first communication device comprising:

2. The first communication device further comprises: a predetermined signal transmission unit that performs communication in a lower layer that is lower than the highest layer without performing communication in a highest layer for establishing a logical link of the second communication method, and repeats transmitting a predetermined signal via the second interface; The first communication device according to claim 1 , wherein the specific information receiving unit receives the specific information from the third communication device that has received the predetermined signal, via the second interface.

3. The first communication device further comprises: a distance information receiving unit that receives first distance information relating to a distance between the first communication device and the second communication device from the second communication device via the second interface; The first network related information transmission unit sending the first network related information to the second communication device via the second interface when the first distance information indicates that a distance between the first communication device and the second communication device is less than the predetermined distance; if the first distance information indicates that a distance between the first communication device and the second communication device is greater than the predetermined distance, not transmitting the first network related information to the second communication device; 3. The first communication device according to claim 1 or claim 2, wherein the specific information receiving unit receives the specific information, which is second distance information relating to the distance between the first communication device and the third communication device, from the third communication device via the second interface.

4. the distance information receiving unit receives the first distance information from the second communication device via the second interface by using a logical link of the second communication method established between the first communication device and the second communication device; 4. The first communication device according to claim 3, wherein the specific information receiving unit receives the specific information, which is the second distance information, from the third communication device via the second interface by utilizing a logical link of the second communication method established between the first communication device and the third communication device.

5. The first communication device according to claim 1 , wherein the device identification information receiving unit receives the second device identification information from the second communication device via the second interface.

6. The second interface includes: a first type of interface for performing wireless communication according to a first type of communication method among the second communication methods; a second type of interface for performing wireless communication according to a second type of communication method that is different from the first type of communication method, the second type of interface being a second type of communication method among the second type of communication methods, the second type of interface being shorter than a distance at which wireless communication via the second type of interface can be performed, the first network related information transmission unit transmits the first network related information to the second communication device via the second type of interface when a distance between the first communication device and the second communication device is less than the predetermined distance; the specific information receiving unit receives the specific information from the third communication device via the first type interface in a state in which a distance between the first communication device and the third communication device is greater than the predetermined distance; 3. The first communication device according to claim 1 or claim 2, wherein the second network related information transmission unit transmits the second network related information to the second communication device that matches the third communication device via the first type of interface when it is determined that the third device identification information matches the second device identification information.

7. The first communication device according to claim 6 , wherein the device identification information receiving unit receives the second device identification information from the second communication device via the first interface by using the first wireless network.

8. the specific information receiving unit receives the specific information, which is a predetermined request for requesting network-related information, from the third communication device via the first type interface; 8. The first communication device according to claim 6 or claim 7, wherein when it is determined that the third device identification information matches the second device identification information, the second network related information transmission unit transmits a response to the specified request, the response including the second network related information, to the second communication device that matches the third communication device via the first type of interface.

9. the specific information receiving unit does not perform communication of a highest layer for establishing a logical link of the first type of communication method, but performs communication of a lower layer that is lower than the highest layer, and receives the specific information, which is the predetermined request, from the third communication device via the first type interface; 9. The first communication device according to claim 8, wherein, when it is determined that the third device identification information matches the second device identification information, the second network related information transmission unit performs communication at the lower layer without performing communication at the highest layer, and transmits the response to the second communication device that matches the third communication device via the first type interface.

10. A computer program for a second communication device, comprising: The second communication device includes: a first interface for performing wireless communication according to a first communication method; a second interface for performing wireless communication according to a second communication method different from the first communication method; A processor, The computer program causes the processor to perform the following processes: a first network related information receiving process for receiving first network related information related to a first wireless network from a first communication device via the second interface in a state where a distance between the first communication device and the second communication device is less than a predetermined distance, the first wireless network being a network for performing wireless communication via the first interface; a first connection request transmission process of transmitting a first wireless connection request to the first communication device via the first interface in response to receiving the first network related information from the first communication device; a first establishment process for establishing a first wireless connection with the first communication device via the first interface by using the first network relationship information in response to transmitting the first wireless connection request to the first communication device, thereby forming the first wireless network to which both the first communication device and the second communication device belong; a device identification information receiving process for receiving, from the first communication device, first device identification information for identifying the first communication device; a storage control process for storing the first device identification information in a memory of the second communication device; a first predetermined signal receiving process for receiving, from a third communication device via the second interface, a first predetermined signal including third device identification information for identifying the third communication device, after the first device identification information is stored in the memory; an identification information determination process for determining whether the third device identification information in the first predetermined signal matches the first device identification information in the memory; a first predetermined request transmission process for transmitting, via the second interface, a first predetermined request for requesting network related information relating to a wireless network to the first communication device that matches the third communication device when it is determined that the third device identification information matches the first device identification information, and not transmitting the first predetermined request to the third communication device when it is determined that the third device identification information does not match the first device identification information; a second network related information receiving process for receiving second network related information related to a second wireless network from the first communication device via the second interface in response to transmitting the first predetermined request to the first communication device, the second wireless network being a network for performing wireless communication via the first interface, and the second network related information being different from the first network related information; a second connection request transmission process of transmitting a second wireless connection request to the first communication device via the first interface in response to receiving the second network related information from the first communication device; a second establishment process for establishing a second wireless connection with the first communication device via the first interface by using the second network relation information in response to transmitting the second wireless connection request to the first communication device, thereby forming the second wireless network to which both the first communication device and the second communication device belong; A computer program that executes the following:

11. 11. The computer program product according to claim 10, wherein in the first specified signal reception process, communication of a lower layer that is lower than the highest layer is performed without performing communication of a highest layer for establishing a logical link of the second communication method, and the first specified signal is received from the third communication device via the second interface.

12. in the first predetermined request transmission process, when it is determined that the third device identification information matches the first device identification information, a communication of a lower layer that is lower than the highest layer is executed without executing a communication of a highest layer for establishing a logical link of the second communication method, and the first predetermined request is transmitted to the first communication device that matches the third communication device via the second interface; 12. The computer program product according to claim 10, wherein in the second network related information reception process, communication at a lower layer is executed without executing communication at the highest layer, and the second network related information is received from the first communication device via the second interface.

13. The computer program further causes the processor to perform the following processes: a second predetermined signal receiving process of receiving a second predetermined signal including the first device identification information from the first communication device via the second interface; a distance determination process for determining whether or not the distance between the first communication device and the second communication device is less than the predetermined distance by using the radio wave intensity of the second predetermined signal; a second predetermined request transmission process for transmitting a second predetermined request to the first communication device via the second interface for requesting network related information relating to a wireless network when it is determined that the distance between the first communication device and the second communication device is less than the predetermined distance, and for not transmitting the second predetermined request to the first communication device when it is determined that the distance between the first communication device and the second communication device is not less than the predetermined distance; 13. The computer program product according to claim 10, wherein in the first network related information reception process, in response to transmitting the second specified request to the first communication device, the first network related information is received from the first communication device via the second interface.

14. 14. The computer program product according to claim 10, wherein in the device identification information reception process, the first device identification information is received from the first communication device via the second interface.

15. The second interface includes: a first type of interface for performing wireless communication according to a first type of communication method among the second communication methods; a second type of interface for performing wireless communication according to a second type of communication method that is different from the first type of communication method, the second type of interface being a second type of communication method among the second type of communication methods, the second type of interface being shorter than a distance at which wireless communication via the second type of interface can be performed, In the first network related information reception process, when a distance between the first communication device and the second communication device is less than the predetermined distance, the first network related information is received from the first communication device via the second type of interface; In the first predetermined signal reception process, the predetermined signal including the third device identification information is received from the third communication device via the first type interface in a state where a distance between the first communication device and the third communication device is greater than the predetermined distance; in the first predetermined request transmission process, when it is determined that the third device identification information matches the first device identification information, the predetermined request is transmitted to the first communication device that matches the third communication device via the first type interface; 13. The computer program product according to claim 10, wherein in the second network related information reception process, the second network related information is received from the first communication device via the first type of interface.

16. The computer program product according to claim 15 , wherein the device identification information receiving process receives the first device identification information from the first communication device via the first interface by using the first wireless network.

17. A second communication device, a first interface for performing wireless communication according to a first communication method; a second interface for performing wireless communication according to a second communication method different from the first communication method; a first network related information receiving unit that receives first network related information related to a first wireless network from the first communication device via the second interface when a distance between the first communication device and the second communication device is less than a predetermined distance, the first wireless network being a network for performing wireless communication via the first interface; a first connection request transmission unit that transmits a first wireless connection request to the first communication device via the first interface in response to receiving the first network related information from the first communication device; a first establishing unit that, in response to transmitting the first wireless connection request to the first communication device, establishes a first wireless connection with the first communication device via the first interface by using the first network relationship information, thereby forming the first wireless network to which both the first communication device and the second communication device belong; a device identification information receiving unit that receives, from the first communication device, first device identification information for identifying the first communication device; a storage control unit that stores the first device identification information in a memory of the second communication device; a first predetermined signal receiving unit that receives, from a third communication device via the second interface after the first device identification information is stored in the memory, a first predetermined signal including third device identification information for identifying the third communication device; an identification information determination unit that determines whether the third device identification information in the first predetermined signal matches the first device identification information in the memory; a first predetermined request transmitting unit that, when it is determined that the third device identification information matches the first device identification information, transmits a first predetermined request to the first communication device that matches the third communication device via the second interface, for requesting network related information related to a wireless network, and, when it is determined that the third device identification information does not match the first device identification information, does not transmit the first predetermined request to the third communication device; a second network related information receiving unit that receives second network related information related to a second wireless network from the first communication device via the second interface in response to transmitting the first predetermined request to the first communication device, the second wireless network being a network for performing wireless communication via the first interface, and the second network related information being different from the first network related information; a second connection request transmission unit that transmits a second wireless connection request to the first communication device via the first interface in response to receiving the second network related information from the first communication device; a second establishing unit that, in response to transmitting the second wireless connection request to the first communication device, establishes a second wireless connection with the first communication device via the first interface by using the second network relation information, thereby forming the second wireless network to which both the first communication device and the second communication device belong; A second communication device comprising:

Citation Information

Patent Citations

  • Communication device and mobile terminal

    JP2014027384A

  • Communication apparatus

    JP2014168215A

  • Radio communication device, radio communication terminal, re-connection program, radio communication method, and radio communication system

    JP2014175822A

  • Application execution method and terminal therefor

    JP2014053007A