Communication apparatus

The communication device uses multiple wireless interfaces to manage connections based on proximity and previous history, addressing unwanted connections and optimizing power usage by ensuring connections are made only when desired.

JP2025137742APending Publication Date: 2025-09-19BROTHER KOGYO KK
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
JP2025123409
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2025-07-23
Publication Date
2025-09-19

AI Technical Summary

Technical Problem

Existing technologies allow external devices to connect to an access point (AP) via Bluetooth Low Energy (BLE) without user consent, leading to unwanted wireless connections.

Method used

A communication device equipped with multiple interfaces for different wireless communication methods, including Bluetooth Low Energy and Wi-Fi, that transmits and receives specific network-related information to establish connections only when the user desires, based on proximity and previous connection history, thereby controlling when and with whom connections are made.

Benefits of technology

Enables controlled wireless connections according to user preferences by ensuring connections are established only when intended, reducing unwanted connections and optimizing power consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2025137742000001_ABST
    Figure 2025137742000001_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 perform wireless communication according to Wi-Fi. The first terminal transmits information (i.e., MAC address, SSID, channel number, security key, etc.) about the 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 perform wireless communication according to Wi-Fi. [Prior art documents] [Patent documents]

[0003] [Patent Document 1] Japanese Patent Application Laid-Open No. 2014-53007 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, if information about the AP is sent from the first terminal to the external device via BLE, the external device will be 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 this specification 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 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, 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 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 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 via the second interface, identification information including third device identification information for identifying the third communication device 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,The network is for performing wireless communication via the first interface, and the second network related information is different from the first network related information, and includes: a second network related information transmitting 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; 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, when the distance between the first communication device and the second communication device is less than a predetermined distance, i.e., when it is highly likely that the user desires to establish a wireless connection according to the first communication method, the first communication device transmits first network-related information to the second communication device via the second interface. This allows the first communication device to establish a first wireless connection according to the first communication method with the second communication device and form a first wireless network. The first communication device then receives second device identification information from the second communication device and stores it in its memory. When the first communication device subsequently receives identification information from a third communication device via the second interface, it determines whether the third device identification information in the identification information matches the second device identification information in its memory. The fact that the third device identification information matches the second device identification information means that the third communication device matches the second communication device with which a first wireless connection according to the first communication method was previously established. Therefore, if the third device identification information matches the second device identification information, it is highly likely that the user wants a 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 second device identification information, it is highly unlikely that the user wants a wireless connection according to the first communication method to be established. Therefore, if 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, if 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 and form a second wireless network. In this way, the first 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.

[0008] A control method and a computer program for implementing the first communication device described above, 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 the distance between the first communication device and the second communication device is less than a predetermined distance, where the first wireless network is a network for performing wireless communication via the first interface; a first connection request sending process for sending 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 sending process for sending the first wireless connection request to the first communication device via the first interface using the first network related information in response to sending 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 if 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. wherein the second network related information is different from the first network related information, and the second communication device executes: a second network related information receiving process; a second connection request sending process of sending 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 sending 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 first network-related information from the first communication device via the second interface when the distance between the first communication device and the second communication device is less than a predetermined distance, i.e., when it is highly likely that the user desires to establish 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 and form a first wireless network. Then, the second communication device receives first device identification information from the first communication device and stores it in memory. Thereafter, when the second communication device receives a first predetermined signal from a third communication device via the second interface, it determines whether 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 a first wireless connection according to the first communication method was previously established. Therefore, it is highly likely that the user wants a 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 highly unlikely that the user wants a 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 send the first predetermined request to the third communication device, and as a result, it 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 sends the first predetermined request via the second interface to the first communication device that matches the third communication device. As a result, 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 in accordance with the first communication method to form a second wireless network. In this way, after performing wireless communication in accordance with the second communication method, the second communication device can establish a wireless connection in accordance with the first communication method in an appropriate situation.

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

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

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

[0014] (Printer PR configuration) The printer PR is a peripheral device capable of executing a printing function, i.e., 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 for Bluetooth (registered trademark)) interface 22, and a control unit 30. Each unit 12 to 30 is connected to a bus line (reference numeral omitted). Hereinafter, the interface will be referred to as "I / F." Note that while FIG. 1 also discloses an NFC (abbreviation for Near Field Communication) I / F 24, the NFC I / F 24 is an I / F used in the third and fourth embodiments described below, 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. By operating the operation unit 12, the user can input various instructions to the printer PR. 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 standard (hereinafter referred to as "Wi-Fi communication"). The Wi-Fi standard is a wireless communication standard based on, for example, the IEEE (The Institute of Electrical and Electronics Engineers, Inc.) 802.11 standard and equivalent standards (e.g., 802.11a, 11b, 11g, 11n, etc.). More specifically, the Wi-Fi I / F 20 supports the WFD (short for Wi-Fi Direct (registered trademark)) standard established by the Wi-Fi Alliance. The WFD standard is a wireless communication standard described in the "Wi-Fi Peer-to-Peer (P2P) Technical Specification Version 1.1" standard created by the Wi-Fi Alliance.

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

[0018] The differences between Classic BT and BLE are as follows: The number of channels in BLE (i.e., 40) is fewer than the number of channels in Classic BT (i.e., 79). The current consumption during data communication in BLE (e.g., 15 mA) is lower 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 now be described. The communication speed of Wi-Fi communication (for example, a maximum communication speed of 600 Mbps) is faster than the communication speed of BT communication (for example, a maximum communication speed of 24 Mbps). The carrier wave frequency in Wi-Fi communication is the 2.4 GHz band or the 5.0 GHz band. The carrier wave frequency in BT communication is the 2.4 GHz band. In other words, when the 5.0 GHz band is adopted as the carrier wave frequency in Wi-Fi communication, the carrier wave frequency in Wi-Fi communication differs from the carrier wave frequency in BT communication. In addition, the maximum distance over which Wi-Fi communication can be performed (for example, approximately 100 m) is longer than the maximum distance over which BT communication can be performed (for example, approximately several tens of meters).

[0020] The control unit 30 includes a CPU 32 and a memory 34. The CPU 32 executes various processes in accordance with a program 36 stored in the memory 34. The memory 34 is configured with volatile memory, non-volatile memory, etc. 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 as including an area 40, and this 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. The configuration of the portable terminal PT1 will be described below, 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 numerals omitted). Note that 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 has a plurality of keys. A 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., it 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 the same as 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 configured with volatile memory, nonvolatile memory, etc. 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 perform a printing function. When the user desires the printer PR to perform a printing function, the printer application 78 is launched by the user. The printer application 78 may be installed on the portable terminal PT1 from a server on the Internet provided by the vendor of the printer PR, for example, or may be installed on the portable terminal PT1 from media shipped together with the printer PR.

[0025] The memory 74 further stores a 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 with which a wireless connection via the Wi-Fi I / F 60, i.e., a wireless connection according to the Wi-Fi standard, has been established (hereinafter referred to as an "established printer").

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

[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 means that no power is 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 means that 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 Bluetooth device name "NP" of the printer PR stored in the memory 34. The Advertise signal is a signal for notifying 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 Link Layer layer) is performed to transmit 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 transmit 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 that includes the BT device name "NP" of the printer PR as information indicating the destination and the BT device name of the portable terminal (e.g., 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. In other words, communication at a layer lower than the highest layer is executed, and the Scan_Req signal is transmitted without executing communication at the highest layer required to establish a logical link. If 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 sent 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 BT device name of the sender 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 at the highest layer for establishing a logical link is not performed, and communication at a layer lower than the highest layer is performed, and the Scan_Res signal is communicated.

[0032] The Scan_Res signal includes the SSID stored in memory 34 and a predetermined password. As described above, the SSID is stored in memory 34 in S2. However, if S32 (described later) is executed after S2 is executed, a new SSID is stored in memory 34, replacing the old SSID. Therefore, if S32 has not been executed even once after S2 is executed, the SSID in the Scan_Res signal is the SSID generated in S2. Furthermore, if S32 has been executed after S2 is executed, the SSID in the Scan_Res signal is the SSID generated in the most recent S32. Hereinafter, the SSID currently stored in memory 34 is referred to as the “current SSID.” The predetermined password is a fixed character string preset in the printer PR. In other words, in this embodiment, when the printer PR is turned on or S32 (described later) is executed, the SSID changes, but the password does not.

[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. Furthermore, 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 also voluntarily transitions the operating state of the printer PR from the WFD device state to the G / O state without executing the WFD G / O (short for Group Owner) negotiation. A printer PR in the G / O state transmits a beacon signal to notify surrounding devices of its presence via the Wi-Fi I / F 20. On the other hand, a printer PR in a state other than the G / O state (for example, the above-mentioned device state or client state) does not transmit a beacon signal. For this reason, the power consumption of a printer PR in the G / O state is higher than the power consumption of a printer PR in a state other than the G / O state. Because the operating 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 communicates various signals with the mobile terminal (e.g., transmitting an Association Response signal, communicating a 4-Way Handshake, etc.) via the Wi-Fi I / F 20. During the communication of the various signals, the CPU 32 receives network information including an SSID and a password from the mobile terminal and authenticates the network information. If 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 has been 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 thus 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 device. "Legacy" refers to a device that participates in a Wi-Fi network without performing operations in accordance with WFD. Because 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 the parent station (in other words, the master device) of the Wi-Fi network. Furthermore, because 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 the sequential execution of the monitoring processes of S20 and S30. In S20, the CPU 32 determines whether print data representing an image to be printed has been received from the mobile terminal via the Wi-Fi I / F 20 using the Wi-Fi network. If the CPU 32 has received 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 in accordance with the print data. When S22 ends, the process returns to S20.

[0039] In S30, the CPU 32 determines whether a disconnection signal has been received from the mobile terminal using the Wi-Fi network via the Wi-Fi I / F 20. The disconnection signal is a signal for requesting that the Wi-Fi connection be disconnected. 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 transitions the operating state of the printer PR from the G / O state to the device state. This reduces the power consumption of the printer PR. Also in S32, the CPU 32 changes the Wi-Fi I / F 20 from the ON state to the OFF state. This reduces the power consumption of the printer PR. In a modified example, instead of changing the OFF state to a state in which power is not supplied, the printer PR may be changed to a standby state in which power is supplied. Here, the power consumption in the standby state is lower than the power consumption in the ON state. In S32, the CPU 32 also generates a new SSID and stores the new SSID in the memory 34, replacing the old SSID in the memory 34. That is, the CPU 32 changes the SSID. In this way, the SSID is changed each time the printer PR stops the G / O state, thereby improving the security of the Wi-Fi network. When S32 ends, the process returns to S10.

[0041] (Processing on mobile terminal PT1; Figure 3) Next, the processing executed by the CPU 72 of the portable terminal PT1 will be described with reference to Fig. 3. Note that the portable terminal PT2 can also execute similar processing. When an operation to start the printer application 78 is executed on the portable terminal PT1, the CPU 72 starts the processing of Fig. 3 in accordance with the printer application 78. Note that the operation on the portable terminal PT1 may be executed on the operation unit 52 or on the display unit 54 (i.e., the 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 determines 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 names of established printers. Therefore, the determination in S52 means determining whether or not the printer PR that sent the Advertise signal is an established printer. If the CPU 72 determines 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 determines 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 determines whether the distance between the printer PR that sent the Advertise signal and the portable terminal PT1 is less than a threshold value. Here, the threshold value is a distance (e.g., 1 meter) that is shorter than the maximum distance (e.g., 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"). The CPU 72 then obtains 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 also describes the relationship between the attenuation rate and the distance. The CPU 72 uses the calculated attenuation rate and the above relationship to determine the distance between the printer PR and the portable terminal PT1 and determines whether the determined distance is less than the 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 printer PR to receive the Scan_Req signal (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 various signal communications (e.g., receiving an Association Response signal, communicating a 4-Way Handshake, etc.) with the printer PR via the Wi-Fi I / F 60. During the communication of the various signals described above, the CPU 72 transmits network information, including the SSID and password, contained in the Scan_Res signal received in S62 to the printer PR. If authentication of the network information is successful at the printer PR, a Wi-Fi connection with the printer PR is established. This forms a Wi-Fi network 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 determines whether 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 determines YES in S70 and proceeds to S72. On the other hand, if a print instruction operation has not been performed within a predetermined time after the end of S66, or if an operation of selecting a button indicating cancel has been performed on the portable terminal PT1 by the user, the CPU 72 determines 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 if S74 is executed after determining YES 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 transmission of the print data to the printer PR is complete, 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 Figures 2 and 3 will be described with reference to Figures 4 and 5. In Figures 4 and 5, the thick arrows and thin arrows between the printer PR and the portable terminals PT1 and PT2 indicate Wi-Fi communication and BT communication, respectively. This also applies to the second and subsequent examples described below.

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

[0054] At A0, the printer PR is powered 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, the user executes an operation on the portable terminal PT1 to start the printer application 78. At this point, 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 the threshold value (NO in S54). In this case, the portable terminal PT1 does not send 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, 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, when the portable terminal PT1 receives an Advertise signal from the printer PR (YES in S50 of FIG. 3), at T12, it determines 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 the BT device name "N1" as information indicating the sender.

[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 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), it transmits a Wi-Fi connection request signal including the SSID "X1" in the Scan_Res signal to the printer PR (S64) in T30. When the Wi-Fi connection request signal is transmitted from the portable terminal PT1 to the printer PR, a Wi-Fi connection is established between the printer PR and the portable terminal PT1 in T32 (S18 in FIG. 2, S66 in FIG. 3). Note that during the process of T32, the printer PR receives network information including the SSID "X1" and password "PS" from the portable terminal PT1 and authenticates the network information. In this case, the authentication is successful, so the printer PR establishes a Wi-Fi connection with the portable terminal PT1. This forms a Wi-Fi network 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, it executes print processing according to the print data in T44 (S22 in FIG. 2). It is possible for the printer PR to receive print data from the portable terminal PT1 using BT communication. However, the print data may be large in size, and the communication speed of BT communication is slower than the communication speed of Wi-Fi communication. Therefore, if BT communication is used to communicate print data, 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), thereby disconnecting 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 the Wi-Fi I / F 20 off, and generates an SSID "X2" that is different from the SSID "X1" (S32). Execution of T52 reduces the power consumption of the printer PR.

[0063] (Case B1; Figure 5) Case B1 in Fig. 5 is a continuation of case A in Fig. 4, in which 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, the user executes an operation on the portable terminal PT1 to start the printer application 78. 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 the 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 sends 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" is generated, which is different from SSIDs "X1" and "X2".

[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, the user executes an operation on the portable terminal PT2 to start a printer application (not shown). At this point, 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 the Advertise signal T206 from the printer PR (YES in S50 of FIG. 3), it 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 send 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) while 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 to establish a Wi-Fi connection between the printer PR and the portable terminal PT1, the portable terminal PT1 sends 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 send 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 has not been established with the portable terminal PT1. When the distance between the unconnected printer and the portable terminal PT1 is equal to or greater than a threshold, that is, when 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 send 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 to re-establish a Wi-Fi connection 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 sends 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 using the network information in the Scan_Res signal and send 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 on 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 "first device identification information" and "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 / F 60 and the BT I / F 62 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 processing of FIG. 6 instead of the processing of FIG. 2. S2 to S6 are the same as those of FIG. 2. In S100, the CPU 32 monitors whether a BT connection request is received from the portable terminal via the BTI / F 22. The BT connection request is a signal transmitted from the portable terminal that has received an Advertise signal, and is a signal for requesting the establishment of a BT logical link (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 sender. 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 establishes a BT connection with the mobile terminal by performing pairing with the mobile terminal using the BT setting information. The BT setting information is information stored in advance in the memory 34, and includes various information for establishing a BT connection (authentication method, encryption method, passkey, etc.).

[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 with which the BT connection is established, 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 an even higher layer (e.g., Attribute Protocol, Generic Attribute Profile, etc.). The distance information is a unicast signal that 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 receives distance information, it determines YES in S110 and proceeds to S112.

[0077] In S112, the CPU 32 determines whether the BT device name of the sender 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 names of established terminals. Therefore, the determination in S112 means determining whether the mobile terminal that sent the distance information is an established terminal. If the CPU 32 determines that the BT device name of the sender 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 determines that the BT device name of the sender 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 determines whether the distance information indicates "Near." If the CPU 32 determines that the distance information indicates "Near" (YES in S114), the process proceeds to S116, and if the CPU 32 determines that the distance information indicates "Far" (NO in S114), the process returns to S110.

[0079] In S116, the CPU 32 uses the BT connection to send network information including the current SSID and a predetermined password to the mobile terminal via the BTI / F 22. The network information is sent by unicast communication and includes the BT device name of the mobile terminal as information indicating the destination, and the BT device name "NP" of the printer PR as information indicating the source. Subsequent steps S16 to S32 are the same as those in FIG. 2. In S120 after S22, the CPU 32 stores the BT device name of the mobile terminal included 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 included 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 processing in FIG. 7 instead of the processing in 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 in FIG. 6). The method for determining 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 predetermined 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 Figures 6 and 7 will be described with reference to Figures 8 and 9. The initial state of Case C in Figure 8 is the same as the initial state of Case A in Figure 4. The contents of Case C will be described, focusing on the differences from Case A in Figure 4. A0, A1, and T2 to T6 are the same as in Figure 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 the printer PR 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 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 send 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 print, 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. 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, it 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, excluding 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, in which 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 and T106 to T116 are the same as A1 and T6 to T16 in Fig. 8. When the printer PR receives the 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 already 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 in 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 T216 from the portable terminal PT2, it 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 send 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) When the distance between the printer PR and the portable terminal PT1 is less than the threshold, that is, when it is highly likely that the user wants to establish a Wi-Fi connection between the printer PR and the portable terminal PT1, the printer PR transmits network information to 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 of FIG. 9). When the distance between the printer PR and the unconnected terminal (i.e., the portable terminal PT2) is equal to or greater than the threshold, that is, when it is unlikely that the user wants a Wi-Fi connection to be established with the unconnected terminal, the printer PR does not send network information to the unconnected terminal even if it receives distance information from the unconnected terminal (NO in S112 and NO in S114 of 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 already been stored (T116A). In this case, because the portable terminal PT1 is an established terminal, it is highly likely that the user wants to re-establish a Wi-Fi connection between the printer PR and the portable terminal PT1. Therefore, the printer PR sends network information to the printer PR (T119), even though the distance between the printer PR and the portable terminal PT1 is equal to or greater than the threshold. This allows 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, after performing BT communication, the printer PR can establish a Wi-Fi connection with the portable terminal PT1, which is an established terminal, under appropriate circumstances.

[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 "second device identification information" and "third device identification information." The Wi-Fi I / F 20 and BTI / F 22 of the printer PR are examples of a "first interface" and a "second interface," respectively. The threshold value (e.g., 3 m) 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 "first distance information," and the distance information of T116 in FIG. 9 is an example of "specific information" and "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 standard (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 system is a wireless communication system for so-called short-range wireless communication, and is a wireless communication system based on the international standard ISO / IEC 21481 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 of NFC communication (for example, the 13.56 MHz band) is different from the carrier frequency of Wi-Fi communication (for example, the 2.4 GHz band or 5.0 GHz band) and the carrier frequency of BT communication (for example, the 2.4 GHz band). Furthermore, the maximum distance over which NFC communication can be performed (for example, approximately 10 cm) is shorter than the maximum distance over which BT communication can be performed (for example, approximately several tens of meters).

[0100] (Printer PR processing; Figure 10) The CPU 32 of the printer PR executes the processing of FIG. 10 instead of the processing 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 repeatedly executes the monitoring processing of S210 and S212 in sequence.

[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 from the NFC I / F 24 indicating that an NFC link has been established, 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 uses the Wi-Fi connection to send the BT device name "NP" of the printer PR to the mobile terminal via the Wi-Fi I / F 20.

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

[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 processing of FIG. 11 instead of the processing of FIG. 3. The CPU 72 repeats sequentially executing each monitoring processing 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 processing of S54 in FIG. 3 is not executed, and if YES in S50, the processing 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 via Wi-Fi communication in the BT device name storage area 80.

[0106] (Case E: Figure 12) Next, specific cases realized by the processes in FIGS. 10 and 11 will be described with reference to FIGS. 12 and 13. In FIGS. 12 and 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 below. 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 printer PR is turned on by the user (A0), in T302 it generates SSID "X1" (S2 in FIG. 10), in T304 it changes the BTI / F22 and NFC I / F24 to ON state (S200), and in T305 it supplies the SSID "X1" and password "PS" to the NFC I / F24. A1 and T306 are the same as A1 and T6 in FIG. 4.

[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 send 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 print, the user brings the portable terminal PT1 closer to the printer PR at A2. This brings the distance between the printer PR and the portable terminal PT1 less than the maximum distance (e.g., 10 cm) at which NFC communication is possible. 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 the same as 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 via 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 / F24 (S240 in Fig. 10).

[0112] (Case F1; Figure 13) Case F1 in Fig. 13 is a continuation of case E in Fig. 12, in which 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 Figure 5, and T406 to T452 are the same as T106 to T152 in Figure 5 (YES at S212, S12 to S18, S30 to S32 in Figure 10, YES at S50, YES at S52, S60 to S80 in Figure 11). In T454, the printer PR supplies the SSID "X3" and password "PS" to the NFC I / F24 (S240 in Figure 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 the 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, as in the first embodiment, the portable terminal PT1 can establish a Wi-Fi connection with the printer PR, which is an already-established printer, under appropriate circumstances after executing BT communication. Furthermore, since the portable terminal PT1 does not need to establish a BT logical link, 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 examples of "second network-related information."

[0118] (Fourth Example) The following mainly describes 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 processing in Fig. 14 instead of the processing in Fig. 10. S2, S200, S202, S6, S210, and S212 are the same as in Fig. 10. Also, S14 to S18 after YES in S210 are the same as in 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 a Wi-Fi connection.

[0120] In S213 after YES in S212, the CPU 32 determines whether or not the BT device name of the sender 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 differs from the third embodiment. In S260, the CPU 72 of the portable terminal PT1 uses a 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 in FIG. 14). Furthermore, in this embodiment, S52 and S74 are not executed.

[0122] (Case E: Figure 12) Next, with reference to FIGS. 12 and 15, specific cases realized by the processes in FIGS. 11 and 14 will be described. In case E in FIG. 12, T334 is not executed, and instead T336 is executed. In T336, the portable terminal PT1 uses a Wi-Fi connection to send the BT device name "N1" of the portable terminal PT1 to the printer PR (S260 in FIG. 11). Also, T342 is not executed, and instead T345 is executed. 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. At T421, the printer PR determines that the BT device name "N1" in the Scan_Req signal has already been stored (YES in S213 in Fig. 14). In this case, at T422, the printer PR transmits a Scan_Res signal including the SSID "X2" and the 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 in T506 from the printer PR after the operation in A15 is executed (YES in S50 in 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.

[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 send 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, after the printer PR has performed BT communication, it can establish a Wi-Fi connection with the printer PR that is an already-established printer under appropriate circumstances. In addition, because the printer PR does not need to establish a BT logical link, the processing load on 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." 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 variations 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 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 the SSID and password from the printer PR using the BT connection. In this variation, the BT connection request is an example of a "first predetermined request" and a "second predetermined request." Generally speaking, the "first (or second) predetermined request" and the "first (or second) network-related information" may be communicated without executing communication at the highest layer to establish 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] (Variation 2) If 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. If the printer PR determines that the BT device name "N1" has been stored, the printer PR may execute the processes from S116 onwards. If the printer PR determines that the BT device name "N1" has not been stored, the printer PR may determine the distance between the printer PR and the portable terminal PT1 based on the radio wave strength of the received Advertise signal and determine whether or not the determined distance is less than a threshold. If the printer PR determines that the determined distance is less than the threshold, the printer PR executes the processes from S116 onwards, and if it determines that the determined distance is equal to or greater than the threshold, the printer PR may not execute the processes from S116 onwards. In S116, 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 modification, the Advertise signal is an example of "specific information", and the "predetermined signal transmitter" and the "distance information receiver" can be omitted.

[0133] (Variation 3) If 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, it may determine whether or not the BT device name "N1" of the portable terminal PT1 in the Advertise signal has been stored. If the printer PR determines that the BT device name "N1" has been stored, it may execute the processing from S12 onwards, and if it determines that the BT device name "N1" has not been stored, it may not execute the processing from S12 onwards. In S12, the network information may be transmitted without establishing a BT connection, or the network information may be transmitted after the BT connection has been established. In this variation, the Advertise signal is an example of "specific information" and "predetermined request".

[0134] (Variation 4) The portable terminal PT1 may receive the BT device name "NP" from the printer PR through 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 through 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 fourth embodiment above, 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 sends the SSID and password to the portable terminal PT1 (for example, S12 in FIG. 2). Alternatively, the printer PR may send the SSID to the portable terminal PT1, but not the password. 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 / F 22 of the printer PR may include a CPU and a memory. The memory of the BTI / F 22 may store a program. The CPU of the BTI / F 22 may be able to execute the operations of the above-described embodiments in accordance with the program in the memory of the BTI / F 22, without receiving instructions 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 / F 22) and two or more memories (e.g., the memory 34 in the control unit 30 and the memory in the BTI / F 22), and each processor may execute processing in accordance with a program stored in each memory.

[0138] (Variation 8) In the third and fourth embodiments, in S202 and S240 of FIGS. 10 and 14, the CPU 32 of the printer PR supplies the current SSID and password to the NFC I / F 24 and stores this 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 this 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] (Variation 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 maintained in the ON state at all times while the power of the printer PR is ON.

[0140] (Variation 10) The printer PR does not have to support WFD, and instead may support what is 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, but may be other identification information (for example, MAC address, IP address, etc.).

[0142] (Variation 12) The "first interface" does not have to be an I / F for executing Wi-Fi communication, but may be an I / F for executing wireless communication according to another communication method capable of establishing a wireless LAN. Also, the "second interface" does not have to be an I / F for executing BT communication, but may be, for example, an I / F for executing wireless communication according to another communication method capable of executing 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, but 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. Furthermore, the "first communication device" may be a device other than a printer and a scanner (for example, a copier, facsimile, telephone, PC, server, portable terminal, etc.). Furthermore, the "second communication device" does not have to be a portable terminal, but may be another device (for example, a printer, scanner, copier, facsimile, telephone, desktop PC, server, etc.).

[0144] (Variation 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 the processes 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] Furthermore, the technical elements described in this specification or drawings may exhibit technical utility either alone or in various combinations, and are not limited to the combinations described in the claims at the time of filing. Furthermore, the technologies illustrated in this specification or drawings simultaneously achieve multiple objectives, 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: NFC I / 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: NFC I / 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 the 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; 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; 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 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 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, identification information including third device identification information for identifying the third communication device after the second device identification information is stored in the memory; 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 related information transmission unit that, when it is determined that the third device identification information matches the second device identification information, transmits second network related information related to a second wireless network to the second communication device that matches the third communication device via the second interface, and does not transmit 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, wherein the second wireless network is a network for performing wireless communication via the first interface, and the second network related information is different from the first network related 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 relationship 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 repeatedly transmits a predetermined signal via the second interface; 2. 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 transmitting the first network related information to the second communication device via the second interface when the first distance information indicates that the distance between the first communication device and the second communication device is less than the predetermined distance; not transmitting the first network related information to the second communication device when the first distance information indicates that the distance between the first communication device and the second communication device is greater than the predetermined distance; 3. The first communication device according to claim 1, 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 interface for performing wireless communication according to a first type of communication method among the second communication methods; a second type of interface for executing 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, the second type of interface being shorter than the distance at which wireless communication via the first type of interface can be executed; the first network related information transmission unit transmits the first network related information to the second communication device via the second type interface when the 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 when the 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, 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 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, 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 in the highest layer for establishing a logical link of the first type of communication method, but performs communication in 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 does not perform communication at the highest layer, but performs communication at the lower 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, the computer program 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 the first communication device via the second interface when the 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 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 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 of receiving, 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 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 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 relationship information, thereby forming the second wireless network to which both the first communication device and the second communication device belong; A computer program that executes

11. 11. The computer program product according to claim 10, wherein in the first predetermined signal reception process, communication at a lower layer lower than the highest layer is performed without performing communication at a highest layer for establishing a logical link of the second communication method, and the first predetermined 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, communication in a lower layer that is lower than the highest layer is performed without performing communication in a highest layer for establishing a logical link of the second communication method, and transmitting the first predetermined request to the first communication device that matches the third communication device via the second interface; 12. The computer program according to claim 10, wherein in the second network related information receiving process, communication at the lower layer is performed without performing 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 to request 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 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 the first network related information receiving process receives the first network related information from the first communication device via the second interface in response to sending the second specified request to the first communication device.

14. 14. The computer program product according to claim 10, wherein the device identification information receiving process receives the first device identification information from the first communication device via the second interface.

15. The second interface includes: a first type interface for performing wireless communication according to a first type of communication method among the second communication methods; a second type of interface for executing 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, the second type of interface being shorter than the distance at which wireless communication via the first type of interface can be executed; In the first network related information receiving process, the first network related information is received from the first communication device via the second type interface in a state where the distance between the first communication device and the second communication device is less than the predetermined distance; 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 the 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, transmitting the predetermined request 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 the second network related information reception process receives the second network related information from the first communication device via the first type of interface.

16. 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 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 the 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 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 device identification information 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 transmitting unit configured to transmit 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 relationship 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

  • Application execution method and terminal therefor

    JP2014053007A