Terminal device and computer program for the terminal device

The terminal device with dual Wi-Fi communication capabilities ensures stable connections by switching methods if the initial attempt fails, addressing inefficiencies in existing protocols and enhancing user convenience.

JP7552815B2Active Publication Date: 2024-09-18BROTHER KOGYO KK
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
JP2023135853
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Filing Date
2023-08-23
Publication Date
2024-09-18
Estimated Expiration
2039-08-30

AI Technical Summary

Technical Problem

Existing wireless communication methods, such as the Device Provisioning Protocol (DPP) developed by the Wi-Fi Alliance, struggle to establish connections between devices without relying on an access point, particularly when the first communication method fails, leading to inefficiencies and user inconvenience.

Method used

A terminal device equipped with a wireless interface capable of performing both Wi-Fi standard communication methods—via an access point and directly with devices—utilizes a first and second request signal to establish connections. If the first method fails, it switches to the second method, ensuring a stable connection is established through either DPP or Wi-Fi Direct, enhancing user convenience.

Benefits of technology

The solution allows for seamless wireless connections by automatically switching communication methods, ensuring successful establishment without user intervention, thereby improving connectivity and reducing unnecessary processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007552815000007
    Figure 0007552815000007
  • Figure 0007552815000002
    Figure 0007552815000002
  • Figure 0007552815000009
    Figure 0007552815000009
Patent Text Reader

Abstract

To enable a terminal device provided with a radio interface that is capable of radio communication according to communication schemes based on different Wi-Fi standards to establish an appropriate radio connection of a communication device.SOLUTION: A terminal device transmits a first request signal in which a public key is used to a communication device when the public key of the communication device is acquired, and attempts to perform communication of a first type according to a first communication scheme with the communication device. The communication of the first type includes transmitting, to the communication device, first connection information for establishing a first radio connection between the communication device and an access point. If the communication of the first type fails, the terminal device transmits a second request signal different from the first request signal to the communication device, and performs communication of a second type according to a second communication scheme with the communication device. The communication of the second type includes communicating, to the communication device, second connection information for establishing a second radio connection between the terminal device and the communication device.SELECTED DRAWING: Figure 7
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] This specification discloses techniques for establishing a wireless connection between a communication device and another device using a terminal device. [Background technology]

[0002] Non-Patent Document 1 describes the DPP (abbreviation of Device Provisioning Protocol), a wireless communication method established by the Wi-Fi Alliance. The DPP is a wireless communication method for easily establishing a wireless connection between a pair of devices. [Prior art documents] [Non-patent literature]

[0003] [Non-Patent Document 1] "Device Provisioning Protocol Technical Specification Version 1.1" Wi-Fi Alliance, 2018 Summary of the Invention [Problem to be solved by the invention]

[0004] This specification discloses a technique that enables a terminal device having a wireless interface capable of performing wireless communication according to different communication methods of the Wi-Fi standard to properly establish a wireless connection with a communication device. [Means for solving the problem]

[0005] A terminal device disclosed in this specification is a wireless interface capable of performing wireless communication according to a first communication method of the Wi-Fi standard and a second communication method of the Wi-Fi standard, wherein the first communication method is a communication method for performing wireless communication with a communication device via an access point, and the second communication method is a communication method for performing wireless communication with the communication device without via the access point, the terminal device comprising: the wireless interface; an acquisition unit for acquiring a public key of the communication device; a first transmission unit for transmitting a first request signal using the public key to the communication device via the wireless interface when the public key is acquired; and a first attempt unit for attempting to perform a first type of communication with the communication device according to the first communication method via the wireless interface in response to the first request signal being transmitted to the communication device, the first type of communication including transmitting first connection information to the communication device, the first connection information being The communication device may include a first attempt unit, which is information for establishing a first wireless connection between the communication device and the access point; a second transmission unit, which transmits a second request signal different from the first request signal to the communication device via the wireless interface when the first request signal is transmitted to the communication device and the first type of communication fails; a communication execution unit, which executes a second type of communication with the communication device according to the second communication method via the wireless interface in response to the second request signal being transmitted to the communication device, wherein the second type of communication includes communicating second connection information with the communication device, the second connection information being information for establishing a second wireless connection between the terminal device and the communication device; and an establishment unit, which establishes the second wireless connection between the terminal device and the communication device via the wireless interface using the second connection information after the second type of communication is executed with the communication device.

[0006] According to the above configuration, the terminal device transmits a first request signal to the communication device and attempts to execute a first type of communication according to a first communication method with the communication device. If the first type of communication is successful, the first connection information is transmitted to the communication device, so that a first wireless connection can be established between the communication device and the access point. On the other hand, if the first type of communication fails, the terminal device transmits a second request signal to the communication device and executes a second type of communication according to a second communication method with the communication device. Then, the terminal device uses the second connection information to establish a second wireless connection between the terminal device and the communication device. For this reason, a terminal device having a wireless interface capable of executing wireless communication according to a different communication method of the Wi-Fi standard can appropriately establish a wireless connection of the communication device.

[0007] Another terminal device disclosed in this specification includes, in addition to the wireless interface and the acquisition unit, a second transmission unit that transmits a second request signal to the communication device via the wireless interface when the public key is acquired, and a second attempt unit that attempts to execute a second type of communication with the communication device in accordance with the second communication method via the wireless interface in response to the second request signal being transmitted to the communication device, the second type of communication including communicating second connection information with the communication device, the second connection information being information for establishing a second wireless connection between the terminal device and the communication device, and a second attempt unit that transmits the second request signal to the communication device and the second type of communication is successful, the second attempt unit using the second connection information to establish a second wireless connection between the terminal device and the communication device. an establishment unit that establishes the second wireless connection between the terminal device and the communication device via the access point; a first transmission unit that, when the second request signal is transmitted to the communication device and the second type of communication fails, transmits to the communication device via the wireless interface a first request signal that is different from the second request signal, the first request signal using the public key; and a communication execution unit that executes a first type of communication with the communication device in accordance with the first communication method via the wireless interface in response to the first request signal being transmitted to the communication device, the first type of communication including transmitting first connection information to the communication device, the first connection information being information for establishing a first wireless connection between the communication device and the access point.

[0008] According to the above configuration, the terminal device transmits a second request signal to the communication device and attempts to execute a second type of communication according to a second communication method with the communication device. If the second type of communication is successful, the terminal device uses the second connection information to establish a second wireless connection between the terminal device and the communication device. On the other hand, if the second type of communication fails, the terminal device transmits a first request signal to the communication device and executes a first type of communication according to a first communication method with the communication device. As a result, the first connection information is transmitted to the communication device, so that a first wireless connection can be established between the communication device and the access point. For this reason, a terminal device having a wireless interface capable of executing wireless communication according to a different communication method of the Wi-Fi standard can appropriately establish a wireless connection of the communication device.

[0009] A control method for implementing the above-mentioned terminal device, a computer program, and a computer-readable recording medium storing the computer program are also novel and useful. Also, a communication system including the above-mentioned terminal device and other devices (e.g., communication devices) is novel and useful. [Brief description of the drawings]

[0010] [Figure 1] 1 shows the configuration of a communication system. [Diagram 2] 1 shows a schematic sequence diagram of a process for establishing a wireless connection between a printer and an access point. [Diagram 3] A sequence diagram of Bootstrapping process is shown below. [Figure 4] A sequence diagram of authentication process is shown below. [Diagram 5] A sequence diagram of Configuration processing is shown below. [Figure 6] A sequence diagram of the Network Access process is shown below. [Figure 7] 4 shows a flowchart of the processing of the terminal in the first to fourth embodiments. [Figure 8]13 shows a sequence diagram of case A in which an AP connection is being established between a terminal and an access point. [Figure 9] 13 shows a sequence diagram of case B in which an AP connection is not established between a terminal and an access point. [Figure 10] FIG. 1 shows a sequence diagram of second to fourth embodiments. [Figure 11] The sequence diagram continues from FIG. [Figure 12] 13 shows a flowchart of a process of a terminal according to the fifth embodiment. [Figure 13] 13 shows a sequence diagram of case C in which an AP connection is not established between the terminal and the access point. [Figure 14] 13 shows a sequence diagram of case D in which an AP connection is being established between a terminal and an access point. [Figure 15] 13 shows a sequence diagram of case E in which an AP connection is not established between a terminal and an access point. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0011] (First embodiment) (Configuration of communication system 2; Figure 1) 1, the communication system 2 includes an access point (hereinafter, simply referred to as "AP") 6, a terminal 10, and a printer 100. In this embodiment, a situation is assumed in which a user uses the terminal 10 to establish a Wi-Fi connection, which is a wireless connection conforming to the Wi-Fi standard, between the printer 100 and another device (e.g., the AP 6 or the terminal 10).

[0012] (Terminal 10 Configuration) The terminal 10 is a portable terminal device such as a mobile phone (e.g., a smartphone), a PDA, or a tablet PC. In a modified example, the terminal 10 may be a stationary PC, a notebook PC, or the like. The terminal 10 includes an operation unit 12, a display unit 14, a Wi-Fi interface 16, a camera 18, and a control unit 30. The units 12 to 30 are connected to a bus line (reference numerals omitted). In the following, the interface will be simply referred to as "I / F".

[0013] The operation unit 12 includes a plurality of keys. A user can input various instructions to the terminal 10 by operating the operation unit 12. The display unit 14 is a display for displaying various information. The display unit 14 also functions as a touch panel (i.e., an operation unit) that accepts instructions from the user.

[0014] The Wi-Fi I / F 16 is a wireless interface for performing Wi-Fi communication according to the Wi-Fi standard. The Wi-Fi standard is a wireless communication standard for performing wireless communication according to, for example, the IEEE (The Institute of Electrical and Electronics Engineers, Inc.) 802.11 standard and standards equivalent thereto (for example, 802.11a, 11b, 11g, 11n, etc.).

[0015] The Wi-Fi I / F 16 supports the DPP (abbreviation of Device Provisioning Protocol) method established by the Wi-Fi Alliance. The DPP method is described in the standard "Device Provisioning Protocol Technical Specification Version 1.1" created by the Wi-Fi Alliance, and is a connection method for easily establishing a Wi-Fi connection between a pair of devices using the terminal 10. Hereinafter, a Wi-Fi connection established according to the DPP method may be referred to as a "DPP connection."

[0016] The Wi-Fi I / F 16 also supports the WFD (short for Wi-Fi Direct (registered trademark)) method established by the Wi-Fi Alliance. The WFD method is a connection method described in the standard "Wi-Fi Peer-to-Peer (P2P) Technical Specification Version 1.1" created by the Wi-Fi Alliance. In the WFD, a Group Owner state (hereinafter referred to as "G / O state") and a client state (hereinafter referred to as "CL state") are defined. In this specification, a state different from either the G / O state or the CL state is referred to as a "device state." A device that supports the WFD method can selectively operate in one of the above three states. In the following, a Wi-Fi connection established according to the WFD method may be referred to as a "WFD connection."

[0017] Furthermore, the terminal 10 can establish a Wi-Fi connection with the AP 6 according to a normal Wi-Fi method that is different from the DPP method and the WFD method. Specifically, in the normal Wi-Fi method, the terminal 10 can establish a Wi-Fi connection with the AP 6 by using the SSID (short for Service Set Identifier) ​​and password of the wireless network formed by the AP 6. In the following, a Wi-Fi connection established according to the normal Wi-Fi method may be referred to as a "normal Wi-Fi connection." In the following, a DPP connection with the AP 6 and a normal Wi-Fi connection with the AP 6 may be collectively referred to as an "AP connection."

[0018] The camera 18 is a device for photographing an object, and in this embodiment, is used to photograph a QR code (registered trademark) for the AP 6 and the printer 100.

[0019] The control unit 30 includes a CPU 32 and a memory 34. The CPU 32 executes various processes in accordance with programs 36, 38 stored in the memory 34. The memory 34 is configured with a volatile memory, a non-volatile memory, etc., and stores an OS program 36 and an application 38 (hereinafter simply referred to as "app 38").

[0020] The OS program 36 is a program for controlling basic operations of the terminal 10. The application 38 is a program for establishing a Wi-Fi connection between the printer 100 and another device (e.g., the AP 6 or the terminal 10) using the terminal 10. The application 38 is installed in the terminal 10 from a server on the Internet provided by the vendor of the printer 100, for example.

[0021] (Configuration of Printer 100) The printer 100 is a peripheral device (for example, a peripheral device of the terminal 10) capable of executing a printing function. The printer 100 includes an operation unit 112, a display unit 114, a Wi-Fi I / F 116, a print execution unit 118, and a control unit 130. Each unit 112 to 130 is connected to a bus line (reference numerals omitted).

[0022] The operation unit 112 has a plurality of keys. A user can input various instructions to the printer 100 by operating the operation unit 112. The display unit 114 is a display for displaying various information. The print execution unit 118 has a printing mechanism such as an inkjet type or a laser type.

[0023] The Wi-Fi I / F 116 is physically one I / F. The Wi-Fi I / F 116 supports the DPP method and the WFD method. For this reason, the printer 100 can establish a DPP connection with the AP 6, and can also establish a WFD connection with the terminal 10. The printer 100 can also establish a normal Wi-Fi connection with the AP 6. The Wi-Fi I / F 116 is assigned a MAC address "macA" for establishing an AP connection, and a MAC address "macB" for establishing a WFD connection. The MAC address "macA" and the MAC address "macB" are different from each other.

[0024] The control unit 130 includes a CPU 132 and a memory 134. The CPU 132 executes various processes according to a program 136 stored in the memory 134. The memory 134 is composed of a volatile memory, a non-volatile memory, and the like. The memory 134 also stores in advance a public key PPK1A and a public key PPK1B different from the public key PPK1A at the time of shipping the printer 100. The memory 134 also stores in advance a private key psk1A corresponding to the public key PPK1A and a private key psk1B corresponding to the public key PPK1B. The public key PPK1A and the private key psk1A are used in a situation where the printer 100 should establish an AP connection. The public key PPK1B and the private key psk1B are used in a situation where the printer 100 should establish a WFD connection with the terminal 10.

[0025] (Outline of DPP; Figure 2) Next, an overview of DPP will be described with reference to Fig. 2. The AP 6 also supports the DPP method. In this embodiment, the devices 6, 10, and 100 execute communication according to the DPP method, thereby establishing a DPP connection between the printer 100 and the AP 6. In the following, for ease of understanding, the operations executed by the CPU of each device (e.g., CPU 32, 132) will be described with each device (e.g., terminal 10, printer 100) as the subject, rather than the CPU as the subject.

[0026] At T5, the terminal 10 executes DPP-based Bootstrapping (hereinafter simply referred to as "BS") with the AP 6. The BS is a process in which the AP 6 provides the terminal 10 with information used in Authentication (hereinafter simply referred to as "Auth") at T10, which will be described later, in response to the terminal 10 photographing a QR code attached to the AP 6.

[0027] At T10, the terminal 10 uses the information already acquired at the BS at T5 to execute DPP-based Auth with the AP 6. This Auth is processing by which the terminal 10 and the AP 6 each authenticate the other party of communication.

[0028] At T15, the terminal 10 executes DPP-based Configuration (hereinafter, simply referred to as "Config") with the AP 6. The Config is a process of transmitting information for the AP 6 to establish a DPP connection to the AP 6. Specifically, the terminal 10 generates an AP Configuration Object (hereinafter, the Configuration Object is simply referred to as "CO") and transmits the AP CO to the AP 6. As a result, the AP 6 stores the AP CO.

[0029] At T20, the terminal 10 executes DPP-based Network Access (hereinafter, simply referred to as "NA") with the AP 6. The terminal 10 generates a terminal CO in the NA and stores it in the memory 34. Then, the terminal 10 and the AP 6 share a connection key for establishing a DPP connection between the terminal 10 and the AP 6 using the terminal CO and the AP CO. Thereafter, the terminal 10 and the AP 6 execute 4way-handshake communication. In at least a part of the process of the 4way-handshake communication, the terminal 10 and the AP 6 communicate encrypted information encrypted by the shared connection key. Then, if the encrypted information is successfully decrypted, a DPP connection is established between the terminal 10 and the AP 6. This allows the terminal 10 to participate as a slave station in the wireless network formed by the AP 6. In a modified example, the terminal 10 and the AP 6 may execute SAE (short for Simultaneous Authentication of Equals, commonly known as "Dragonfly") communication instead of the 4way-handshake communication.

[0030] Next, in T25, the terminal 10 executes BS of the DPP method with the printer 100. The BS is a process in which, in response to the terminal 10 capturing an image of a QR code displayed on the printer 100, the printer 100 provides the terminal 10 with information used in Auth in T30, which will be described later.

[0031] At T30, the terminal 10 uses the information already acquired at the BS at T25 to execute DPP-based Auth with the printer 100. This Auth is a process in which the terminal 10 and the printer 100 each authenticate the other party in communication.

[0032] At T35, the terminal 10 executes a DPP-based Config with the printer 100. This Config is a process for transmitting information for establishing a DPP connection between the printer 100 and the AP 6 to the printer 100. In this Config, the terminal 10 generates a printer CO for establishing a DPP connection between the printer 100 and the AP 6, and transmits the printer CO to the printer 100. As a result, the printer CO is stored in the printer 100.

[0033] In T40, the printer 100 and the AP 6 execute NA of the DPP method using the stored AP CO and printer CO, and share a connection key. After that, the printer 100 and the AP 6 execute 4-way-handshake communication, and communicate cryptographic information encrypted by the shared connection key. As a result, a DPP connection is established between the printer 100 and the AP 6. This allows the printer 100 to participate as a slave station in the wireless network formed by the AP 6. That is, the terminal 10 and the printer 100 belong to the same wireless network formed by the AP 6. Therefore, the terminal 10 and the printer 100 can execute communication of data representing, for example, an image to be printed, via the AP 6.

[0034] In the DPP method, in order to establish a Wi-Fi connection (i.e., a DPP connection) between the terminal 10 or the printer 100 and the AP 6, the user does not need to input information (e.g., SSID, password, etc.) of the wireless network in which the AP 6 operates as a master station into the terminal 10 or the printer 100. Therefore, the user can easily establish a Wi-Fi connection between the terminal 10 or the printer 100 and the AP 6.

[0035] (Details of each process: Figures 3 to 6) Next, the details of each process executed in T25 to T40 in Fig. 2 will be described with reference to Fig. 3 to Fig. 6. Note that the processes of T5 to T15 are similar to the processes of T25 to T35 except that AP6 is used instead of printer 100, and therefore detailed description thereof will be omitted. Also, the process of T20 is similar to T40 except that it is a process between terminal 10 and AP6, and therefore detailed description thereof will be omitted.

[0036] (Bootstrapping (BS); Figure 3) First, the BS process executed between the terminal 10 and the printer 100 at T25 in FIG. 2 will be described with reference to FIG.

[0037] In T100, printer 100 displays a QR code on display unit 114 in response to receiving an operation from a user. In this case, the QR code is obtained by encoding public key PPK1A of printer 100 and MAC address "macA" of Wi-Fi I / F 116 of printer 100. That is, the QR code is a QR code for printer 100 to establish an AP connection. In a modified example, the QR code may be attached to the housing of printer 100 or may be attached to an instruction manual of printer 100.

[0038] In T110, the user starts the application 38 installed in the terminal 10. In response to the start of the application 38, the terminal 10 starts the camera 18, and in T120, uses the camera 18 to photograph the QR code displayed on the printer 100. Then, in T122, the terminal 10 decodes the photographed QR code and acquires the public key PPK1A and the MAC address "macA". When the process of T122 ends, the process of FIG. 3 ends.

[0039] (Authentication (Auth); Figure 4) Next, the Auth process executed between the terminal 10 and the printer 100 at T30 in FIG. 2 will be described with reference to FIG.

[0040] In T200, the terminal 10 generates a public key TPK1 and a secret key tsk1 of the terminal 10. Next, in T202, the terminal 10 generates a shared key SK1 according to ECDH (Elliptic curve Diffie-Hellman key exchange) using the generated secret key tsk1 and the public key PPK1A of the printer 100 acquired in T122 of Fig. 3. Then, in T204, the terminal 10 encrypts a random value RV1 using the generated shared key SK1 to generate encrypted data ED1.

[0041] In T210, the terminal 10 transmits a DPP Authentication Request (hereinafter simply referred to as "AReq") to the printer 100 via the Wi-Fi I / F 16, with the MAC address "macA" acquired in T122 of FIG. 3 as the transmission destination. The AReq is a signal requesting the printer 100 to execute authentication. The AReq includes the public key TPK1 of the terminal 10 generated in T200, the encrypted data ED1 generated in T204, and the capability of the terminal 10.

[0042] Capability is information that is specified in advance in a device that supports the DPP method, and includes one of the following values: a value indicating that the device can operate only as a Configurator in the DPP method; a value indicating that the device can operate only as an Enrollee in the DPP method; and a value indicating that the device can operate both as a Configurator and an Enrollee. A Configurator refers to a device that transmits a CO to be used in an NA (e.g., T40 in FIG. 2) to an Enrollee in a Config (e.g., T35 in FIG. 2). On the other hand, an Enrollee refers to a device that receives a CO to be used in an NA from a Configurator in a Config. As described above, in this embodiment, the terminal 10 generates a CO for an AP and a CO for a printer, and transmits them to the AP 6 and the printer 100. Therefore, the capability of the terminal 10 includes a value indicating that the terminal 10 can operate only as a Configurator.

[0043] At T210, the printer 100 receives the AReq from the terminal 10 via the Wi-Fi I / F 116. As described above, the AReq is transmitted to the MAC address “macA” of the printer 100 as the transmission destination. Therefore, the printer 100 can appropriately receive the AReq from the terminal 10.

[0044] Next, the printer 100 executes the following process to authenticate the sender of the AReq (i.e., the terminal 10). Specifically, in T212, the printer 100 generates a shared key SK1 using the public key TPK1 of the terminal 10 in the AReq and the private key psk1A of the printer 100 according to ECDH. Here, the shared key SK1 generated by the terminal 10 in T202 is the same as the shared key SK1 generated by the printer 100 in T212. Therefore, in T214, the printer 100 can appropriately decrypt the encrypted data ED1 in the AReq using the generated shared key SK1, and as a result, can obtain the random value RV1. If the decryption of the encrypted data ED1 is successful, the printer 100 determines that the sender of the AReq is the device that captured the QR code displayed on the printer 100, that is, determines that the authentication has been successful, and executes the process from T216 onwards. On the other hand, if the printer 100 is not successful in decrypting the encrypted data ED1, it determines that the sender of AReq is not the device that photographed the QR code displayed on the printer 100, i.e., it determines that authentication has failed, and does not execute the processing from T216 onwards.

[0045] In T216, the printer 100 generates a new public key PPK2 and a new secret key psk2 of the printer 100. In a modified example, the printer 100 may store the public key PPK2 and the secret key psk2 in advance. Next, in T217, the printer 100 generates a shared key SK2 using the public key TPK1 of the terminal 10 in the AReq of T210 and the secret key psk2 of the printer 100 that has already been generated, according to ECDH. Then, in T218, the printer 100 encrypts the acquired random value RV1 and the new random value RV2 using the generated shared key SK2 to generate encrypted data ED2.

[0046] In T220, the printer 100 transmits a DPP Authentication Response (hereinafter simply referred to as "ARes") to the terminal 10 via the Wi-Fi I / F 116. The ARes includes the public key PPK2 of the printer 100 generated in T216, the encrypted data ED2 generated in T218, and the capability of the printer 100. The capability includes a value indicating that the printer 100 can operate only as an Enrollee.

[0047] In response to receiving the ARes from the printer 100 via the Wi-Fi I / F 16 in T220, the terminal 10 executes the following process for authenticating the sender of the ARes (i.e., the printer 100). Specifically, in T222, the terminal 10 generates a shared key SK2 according to ECDH using the private key tsk1 of the terminal 10 generated in T200 and the public key PPK2 of the printer 100 in the ARes. Here, the shared key SK2 generated by the printer 100 in T217 is the same as the shared key SK2 generated by the terminal 10 in T222. Therefore, in T224, the terminal 10 can appropriately decrypt the encrypted data ED2 in the ARes using the generated shared key SK2, and as a result, can obtain the random values ​​RV1 and RV2. If the decryption of the encrypted data ED2 is successful, the terminal 10 determines that the sender of the ARes is a device having a photographed QR code, that is, determines that the authentication has been successful, and executes the process from T230 onward. On the other hand, if the terminal 10 is not successful in decrypting the encrypted data ED2, it determines that the sender of the ARes is not a device having a photographed QR code, i.e., it determines that authentication has failed, and does not execute the processing after T230.

[0048] In T230, the terminal 10 transmits a Confirm to the printer 100 via the Wi-Fi I / F 16. The Confirm includes information indicating that the terminal 10 operates as a Configurator and the printer 100 operates as an Enrollee. As a result, in T232, the terminal 10 decides to operate as a Configurator, and in T234, the printer 100 decides to operate as an Enrollee. When the process of T234 ends, the process of FIG. 4 ends.

[0049] (Configuration(Config); Figure 5) Next, the Config process executed between the terminal 10 and the printer 100 at T35 in FIG. 2 will be described with reference to FIG.

[0050] In T300, the printer 100 transmits a DPP Configuration Request (hereinafter, simply referred to as "CReq") to the terminal 10 via the Wi-Fi I / F 116. The CReq is a signal requesting transmission of a CO for the printer.

[0051] In T300, the terminal 10 receives CReq from the printer 100 via the Wi-Fi I / F 16. In this case, in T302, the terminal 10 generates a new public key TPK2 and a new private key tsk2 of the terminal 10. Next, in T304, the terminal 10 generates a CO for the printer by using the generated private key tsk2. Specifically, the terminal 10 executes the following processes.

[0052] First, the terminal 10 generates a hash value HV by hashing the public key TPK2 of the terminal 10. The terminal 10 also generates a specific value by hashing a combination of the hash value HV, the group ID "Group", and the public key PPK2 of the printer 100 in the ARes of T220 in FIG. 4. The terminal 10 then generates an electronic signature DSpr by encrypting the generated specific value using the private key tsk2 of the terminal 10 according to ECDSA (short for Elliptic Curve Digital Signature Algorithm). As a result, the terminal 10 can generate a Signed-Connector for the printer (hereinafter, the Signed-Connector will be simply referred to as "SC") including the hash value HV, the group ID "Group", the public key PPK2 of the printer 100, and the electronic signature DSpr. The terminal 10 then generates a CO for the printer including the SC for the printer and the public key TPK2 of the terminal 10.

[0053] In T310, the terminal 10 transmits a DPP Configuration Response (hereinafter simply referred to as “CRes”) including a CO for the printer to the printer 100 via the Wi-Fi I / F 16.

[0054] In T310, the printer 100 receives a CRes from the terminal 10 via the Wi-Fi I / F 116. In this case, the printer 100 stores a printer CO in the CRes in T312. The printer CO is information used in a DPP connection with the AP 6, and can be said to be connection information for establishing a DPP connection with the AP 6. When the process of T312 ends, the process of FIG. 5 ends.

[0055] (Network Access (NA); Figure 6) Next, referring to FIG. 6, the process of NA at T40 in FIG. 2 executed between the printer 100 and the AP 6 will be described. As described above, the processes at T5 to T15 in FIG. 2 have been executed between the terminal 10 and the AP 6, similar to those at T25 to T35 in FIG. 2. The AP 6 stores the public key APK1 and the secret key ask1 of the AP 6 in advance. A QR code obtained by encoding the public key APK1 and the MAC address of the AP 6 is attached to the housing of the AP 6. When the terminal 10 photographs the QR code, each process similar to each process after T200 in FIG. 4 is executed between the terminal 10 and the AP 6. As a result, the AP 6 stores the public key APK2 and the secret key ask2 of the AP 6 (see T216 in FIG. 4), and further stores the CO for AP received from the terminal 10 (see T312 in FIG. 5). The CO for AP includes the SC for AP and the public key TPK2 of the terminal 10. The public key TPK2 is the same as the public key TPK2 included in the CO for the printer. The SC for the AP also includes a hash value HV, a group ID "Group", a public key APK2 of the AP6, and an electronic signature DSap. The hash value HV and the group ID "Group" are the same as the hash value HV and the group ID "Group" included in the CO for the printer, respectively. The electronic signature DSap is information obtained by hashing a combination of the hash value HV, the group ID "Group", and the public key APK2, and encrypting the specific value with the private key tsk2 of the terminal 10, and is a value different from the electronic signature DSpr included in the CO for the printer.

[0056] In T400, the printer 100 transmits a DPP Peer Discovery Request (hereinafter, simply referred to as "DReq") including an SC for the printer to the AP 6 via the Wi-Fi I / F 116. The DReq is a signal requesting the AP 6 to perform authentication and transmit an SC for the AP.

[0057] In response to receiving the DReq from the printer 100, the AP 6 executes a process for authenticating the sender of the DReq (i.e., the printer 100) and each piece of information in the DReq (i.e., the hash value HV, “Group”, and the public key PPK2) in T400. Specifically, in T402, the AP 6 first executes a first AP determination process as to whether the hash value HV and the group ID “Group” in the received printer SC match the hash value HV and the group ID “Group” in the AP SC included in the stored AP CO, respectively. In the case of FIG. 6, the AP 6 determines that they “match” in the first AP determination process, and therefore determines that the authentication of the sender of the DReq (i.e., the printer 100) has been successful. Note that the match between the hash value HV in the received printer SC and the hash value HV in the AP SC included in the stored AP CO means that the printer SC and the AP SC were generated by the same device (i.e., the terminal 10). Therefore, the AP6 also judges that the authentication of the generator (i.e., the terminal 10) of the received SC for the printer has been successful. Furthermore, the AP6 decrypts the electronic signature DSpr in the received SC for the printer using the public key TPK2 of the terminal 10 included in the stored CO for AP. In the case of FIG. 6, the decryption of the electronic signature DSpr is successful, so the AP6 executes a second AP judgment process regarding whether or not the specific value obtained by decrypting the electronic signature DSpr matches the value obtained by hashing each piece of information in the received SC for the printer (i.e., the hash value HV, the "Group", and the public key PPK2). In the case of FIG. 6, the AP6 judges that the second AP judgment process "matches", so it judges that the authentication of each piece of information in the DReq has been successful, and executes the processes from T404 onward. A determination of "match" in the second AP judgment process means that the information in the received printer SC (i.e., the hash value HV, "Group", and public key PPK2) has not been tampered with by a third party after the printer CO was stored in printer 100.On the other hand, if the first AP judgment process determines that there is no match, if decryption of the electronic signature DSpr fails, or if the second AP judgment process determines that there is no match, AP6 determines that authentication has failed and does not execute processing after T404.

[0058] Next, in T404, the AP6 generates a connection key (ie, a shared key) CK using the acquired public key PPK2 of the printer 100 and the stored private key ask2 of the AP6 according to ECDH.

[0059] In T410, the AP 6 sends a DPP Peer Discovery Response (hereinafter simply referred to as “DRes”) including an SC for the AP to the printer 100.

[0060] In response to receiving the DRes from the AP6 via the Wi-Fi I / F 116 in T410, the printer 100 executes a process for authenticating the sender of the DRes (i.e., the AP6) and each piece of information in the DRes (i.e., the hash value HV, “Group”, and the public key APK2). Specifically, in T412, the printer 100 first executes a first PR determination process regarding whether or not the hash value HV and the group ID “Group” in the received SC for the AP match the hash value HV and the group ID “Group” in the SC for the printer included in the stored CO for the printer. In the case of FIG. 6, the printer 100 determines that they “match” in the first PR determination process, and therefore determines that the authentication of the sender of the DRes (i.e., the AP6) has been successful. Note that the fact that the hash value HV in the received SC for the AP matches the hash value HV in the SC for the printer included in the stored CO for the printer means that the SC for the printer and the SC for the AP were generated by the same device (i.e., the terminal 10). Therefore, the printer 100 also determines that the authentication of the generator of the received SC for AP (i.e., the terminal 10) has been successful. Furthermore, the printer 100 decrypts the electronic signature DSap in the received SC for AP using the public key TPK2 of the terminal 10 included in the stored CO for printer. In the case of FIG. 6, the decryption of the electronic signature DSap is successful, so the printer 100 executes a second PR determination process regarding whether or not a specific value obtained by decrypting the electronic signature DSap matches a value obtained by hashing each piece of information in the received SC for AP (i.e., the hash value HV, "Group", and the public key APK2). In the case of FIG. 6, the printer 100 determines that the second PR determination process "matches", so it determines that the authentication of each piece of information in the DRes has been successful, and executes the processes from T414 onward. A determination that there is a "match" in the second PR judgment process means that the information in the SC for AP (i.e., the hash value HV, "Group", and public key APK2) has not been tampered with by a third party after the CO for AP was stored in AP6.On the other hand, if the first PR judgment process determines that there is no match, if the decryption of the electronic signature DSap fails, or if the second PR judgment process determines that there is no match, the printer 100 determines that the authentication has failed and does not execute the processing after T414.

[0061] In T414, the printer 100 generates a connection key CK according to ECDH using the stored private key psk2 of the printer 100 and the public key APK2 of the AP6 in the received SC for AP. Here, the connection key CK generated by the AP6 in T404 and the connection key CK generated by the printer 100 in T414 are the same. As a result, the connection key CK for establishing a DPP connection is shared between the printer 100 and the AP6.

[0062] As described above, after the connection key CK is shared between the printer 100 and the AP 6, in T420, the printer 100 and the AP 6 execute 4-way handshake communication using the connection key CK. As a result, a DPP connection is established between the printer 100 and the AP 6. When the process of T420 ends, the process of FIG. 6 ends.

[0063] (Terminal processing; Figure 7) The process executed by the CPU 32 of the terminal 10 will be described with reference to Fig. 7. The CPU 32 starts the process of Fig. 7 when the application 38 is started by the user.

[0064] In S10, the CPU 32 executes BS with the printer 100. When the user operates the printer 100, a QR code is displayed (see T100 in FIG. 3). Here, in this embodiment, a different QR code is displayed according to the user's operation. Specifically, one of a QR code obtained by encoding the public key PPK1A and the MAC address "macA" and a QR code obtained by encoding the public key PPK1B and the MAC address "macB" is displayed. When the QR code displayed on the printer 100 is photographed by the camera 18, the CPU 32 decodes the QR code and acquires information corresponding to the QR code (i.e., a combination of the public key PPK1A and the MAC address "macA" or a combination of the public key PPK1B and the MAC address "macB") (see T120 and T130 in FIG. 3).

[0065] In S12, the CPU 32 determines whether or not the terminal 10 is establishing an AP connection. Specifically, when an AP connection flag (not shown) in the memory 34 indicates ON, the CPU 32 determines that an AP connection is being established (YES in S12) and proceeds to S20. On the other hand, when the AP connection flag indicates OFF, the CPU 32 determines that an AP connection is not being established (NO in S12) and proceeds to S30.

[0066] In S20, the CPU 32 transmits the AReq to the printer 100 via the Wi-Fi I / F 16 (see T210 in FIG. 4). As described above, the AReq includes a capability that allows the terminal 10 to operate only as a configurator.

[0067] In S22, the CPU 32 receives an ARes from the printer 100 via the Wi-Fi I / F 16 (see T220 in FIG. 4).

[0068] In S24, the CPU 32 determines whether or not an error has occurred based on the information included in the ARes. Specifically, if the ARes includes the code "STATUS_AUTH_FAILURE", the CPU 32 determines that an error has occurred (YES in S24) and proceeds to S30. Here, this code indicates that Auth has failed. On the other hand, if the ARes includes the code "STATUS_OK", the CPU 32 determines that no error has occurred (NO in S24) and proceeds to S26. Here, this code indicates that no error has occurred, that is, that the process has been executed normally.

[0069] In S26, the CPU 32 judges whether or not the AP connection established between the terminal 10 and the AP 6 is a DPP connection. Specifically, when a terminal CO including a terminal SC is stored in the memory 34, the CPU 32 judges that the AP connection is a DPP connection (YES in S26) and proceeds to S28. On the other hand, when the SSID and password of the wireless network formed by the AP 6 are stored in the memory 34, the CPU 32 judges that the AP connection is not a DPP connection (i.e., a normal Wi-Fi connection) (NO in S26) and proceeds to S30.

[0070] In S28, the CPU 32 executes Config with the printer 100. Specifically, the CPU 32 receives a CReq from the printer 100 via the Wi-Fi I / F 16 (see T300 in FIG. 5). Thereafter, the CPU 32 generates a printer CO including a printer SC (see T302 to T304), and transmits the printer CO and a CRes including the code "netRole = sta" to the printer 100 via the Wi-Fi I / F 16 (see T310). The code "netRole = sta" indicates that the printer 100 should participate in the wireless network formed by the AP 6 as a station (i.e., a child station).

[0071] The process of S30 is the same as the process of S28, except that the printer CO included in the CRes sent to the printer 100 includes the SSID and password of the wireless network formed by the AP 6, instead of including the printer SC. In this case, the printer 100 does not execute NA with the AP 6 (T40 in FIG. 2, FIG. 6), but establishes an AP connection according to the normal Wi-Fi method (i.e., using the SSID and password).

[0072] In S32, the CPU 32 determines whether an error has occurred based on information communicated with the printer 100 via Config. Specifically, if the CPU 32 receives a Configuration Result including the code "STATUS_CONFIG_REJECTED" from the printer 100 after sending the CRes to the printer 100, the CPU 32 determines that an error has occurred (YES in S32) and proceeds to S40. Here, this code indicates that the Config has been rejected. On the other hand, if the CPU 32 receives a Configuration Result including the code "STATUS_OK" from the printer 100 after sending the CRes to the printer 100, the CPU 32 determines that no error has occurred (NO in S32) and ends the processing of FIG. 7.

[0073] In S40, the CPU 32 transmits a G / O Negotiation Request (hereinafter simply referred to as "GNReq") to the printer 100 via the Wi-Fi I / F 16. GNReq is a signal for requesting the printer 100 to execute G / O negotiation in the WFD method. G / O negotiation is communication for determining which of the terminal 10 and the printer 100 will become the G / O. GNReq includes an Intent value of the terminal 10 that is predetermined in the terminal 10. The Intent value is one of values ​​1 to 15, and indicates the likelihood of becoming a G / O. The larger the Intent value, the easier it is to become a G / O.

[0074] In S42, the CPU 32 determines whether or not a G / O Negotiation Response (hereinafter simply referred to as "GNRes") has been received from the printer 100. If the CPU 32 determines that a GNRes has been received from the printer 100 (YES in S42), the process proceeds to S44. Here, the GNRes includes an Intent value of the printer 100 that is predetermined in the printer 100. The CPU 32 compares the Intent value of the terminal 10 with the Intent value of the printer 100 to determine which of the terminal 10 and the printer 100 will be the G / O.

[0075] On the other hand, if the CPU 32 does not receive a GNRes from the printer 100 even though a predetermined time has elapsed since transmitting the GNReq to the printer 100, the CPU 32 determines that a GNRes has not been received from the printer 100 (NO in S42), and proceeds to S50.

[0076] In S44, the CPU 32 executes Auth and Config with the printer 100. In this Auth, it is determined that the device determined to be the G / O in the G / O negotiation operates as a Configurator, and the device determined to be the CL operates as an Enrollee. In this Config, the CO communicated between the terminal 10 and the printer 100 includes the SSID and password of the wireless network formed by the device that will be the G / O. For example, when it is determined that the terminal 10 will be the G / O, the terminal 10 operates as a Configurator and transmits to the printer 100 a CO for the printer that includes the SSID and password of the wireless network formed by the terminal 10. In addition, when it is determined that the printer 100 will be the G / O, the terminal 10 operates as an Enroller and receives from the printer 100 a CO for the terminal that includes the SSID and password of the wireless network formed by the printer 100.

[0077] In S46, the CPU 32 executes various communications with the printer 100 via the Wi-Fi I / F 16 according to the WFD method, such as authentication, association, and 4-way-handshake. In the course of the various communications, the CPU 32 executes authentication using the SSID and password of the network formed by the device (i.e., the terminal 10 or the printer 100) operating as the G / O, and establishes a WFD connection with the printer 100 if the authentication is successful. This forms a wireless network to which both the terminal 10 and the printer 100 belong. That is, the terminal 10 can directly execute wireless communication (e.g., communication of print data) with the printer 100 without going through the AP 6. When the processing of S46 ends, the processing of FIG. 7 ends.

[0078] In S50, the CPU 32 displays a notification screen on the display unit 14. The notification screen includes both a message prompting the establishment of an AP connection between the terminal 10 and the AP 6, and a message prompting the setting of the printer 100 to a state waiting for establishment of a WFD connection. When the process of S50 ends, the process of FIG. 7 ends.

[0079] (Case A; Figure 8) Next, a specific case realized by the process of Fig. 7 will be described. First, with reference to Fig. 8, a case A in which an AP connection is being established between the terminal 10 and the AP6 will be described. As shown in T500, a DPP connection is being established between the terminal 10 and the AP6. In a modified example, a normal Wi-Fi connection may be established between the terminal 10 and the AP6.

[0080] In T502, the printer 100 accepts a connection operation from the user. The connection operation is an operation that triggers the start of settings for establishing a Wi-Fi connection between the printer 100 and another device (i.e., the AP 6 or the terminal 10).

[0081] In T504, the printer 100 displays a selection screen on the display unit 114. The selection screen includes a message prompting the user to select a device (i.e., a connection destination) to which the printer 100 should establish a Wi-Fi connection, an AP button (i.e., a character string "Connect to AP") for selecting the AP 6 as the connection destination, and a terminal button (i.e., a character string "Connect to Terminal") for selecting the terminal 10 as the connection destination.

[0082] When the user selects the terminal button in T506, the printer 100 transitions to a WFD-scheme device state in T508. That is, the printer 100 transitions from a state in which various communications according to the WFD scheme (e.g., transmission of GNRes) cannot be performed to a state in which the various communications can be performed (i.e., device state). Then, in T509, the printer 100 displays on the display unit 114 a QR code obtained by encoding the public key PPK1B and the MAC address "macB" for establishing a WFD connection. Here, the QR code may be generated by the printer 100 in T509, or may be stored in advance in the memory 134 of the printer 100. The same applies to the QR codes in other cases (e.g., case B in FIG. 9) that follow.

[0083] In response to receiving an operation from the user in T510, the terminal 10 launches the application 38. Next, in T512, the terminal 10 uses the camera 18 to capture an image of the QR code displayed on the printer 100. Then, the terminal 10 decodes the QR code and acquires the public key PPK1B and the MAC address "macB" of the printer 100 (S10 in FIG. 7).

[0084] Thereafter, the terminal 10 determines in T514 that an AP connection is being established (YES in S12), and in T520 transmits the AReq using the public key PPK1B to the printer 100 (S20). In the subsequent processing of the DPP method, the public key PPK1B, private key psk1b, and MAC address "macB" of the printer 100 are used. Except for this point, the processing of the DPP method is the same as that in Figs. 2 to 6.

[0085] In this case, the printer 100 is waiting for establishment of a WFD connection while operating in a WFD-based device state (see T508). That is, the printer 100 is neither in a G / O state nor a CL state. If the printer 100 is in a G / O state, the printer 100 can determine that it should operate as a Configurator. Also, if the printer 100 is in a CL state, the printer 100 can determine that it should operate as an Enroller. That is, in these cases, the printer 100 can determine the value of the capability included in the ARes. However, if the printer 100 is in a device state, the printer 100 cannot determine the value of the capability included in the ARes. Therefore, when the printer 100 receives an AReq from the terminal 10 in T520, the printer 100 transmits an ARes including the code "STATUS_AUTH_FAILURE" to the terminal 10 in T530.

[0086] The terminal 10 receives an ARes including the code "STATUS_AUTH_FAILURE" from the printer 100 in T530 (S22), and determines in T532 that an error has occurred (YES in S24).

[0087] In response to the occurrence of the error, the terminal 10 transmits a GNReq to the printer 100 at T540 (S40), and receives a GNRes from the printer 100 at T542 (YES at S42). As a result, G / O negotiation is executed between the terminal 10 and the printer 100, and in this case, it is determined that the terminal 10 will become the G / O at T544, and it is determined that the printer 100 will become the CL at T546. The terminal 10 then determines the SSID and password of the wireless network in which the terminal 10 operates as the G / O. Note that in a modified example, it may be determined that the printer 100 will become the G / O, and that the terminal 10 will become the CL.

[0088] Thereafter, the terminal 10 executes Auth in T550 (S44). In this Auth, it is determined that the terminal 10 determined to be the G / O will operate as a Configurator, and the printer 100 determined to be the CL will operate as an Enrollee. That is, in the Auth of T550, the terminal 10 transmits to the printer 100 an AReq including a capability indicating that it can operate only as a Configurator. The terminal 10 also receives from the printer 100 an ARes including a capability indicating that it can operate only as an Enroller.

[0089] Next, the terminal 10 executes Config in T552 (S44). In the Config, the terminal 10 operating as a Configurator generates a printer CO and transmits a CRes including the printer CO to the printer 100. The printer CO includes the SSID and password determined by the terminal 10 operating as a G / O.

[0090] When the printer 100 receives a CRes including a printer CO from the terminal 10, the printer 100 stores the printer CO in T560. Then, the printer 100 uses the printer CO (more specifically, the SSID and password included in the printer CO) in T570 to establish a WFD connection with the terminal 10 (S46).

[0091] (Case B; Figure 9) Next, with reference to Fig. 9, a case B in which an AP connection is not established between the terminal 10 and the AP 6 will be described. The processes of T602 to T604 are similar to the processes of T502 to T504 in Fig. 8. When the AP button is selected by the user in T606, the printer 100 displays, in T609, on the display unit 114, a QR code obtained by encoding the public key PPK1A and the MAC address "macA" for establishing an AP connection.

[0092] The processes of T610 to T612 are the same as those of T510 to T512 in Fig. 8, except that the public key and MAC address are different. In T614, the terminal 10 determines that an AP connection with the AP 6 is not being established (NO in S12 in Fig. 7). In this case, in T620, the terminal 10 transmits a GNReq to the printer 100 (S40).

[0093] In this case, the printer 100 is not operating in a WFD device state. That is, the printer 100 cannot execute various communications (e.g., sending GNRes) according to the WFD method. For this reason, even if the printer 100 receives a GNReq from the terminal 10, it does not send a GNRes to the terminal 10.

[0094] Because the terminal 10 does not receive a GNRes from the printer 100, it determines in T622 that an error has occurred (NO in S42). In this case, the terminal 10 displays a notification screen in T630 (S50). The notification screen includes a message urging the terminal 10 to establish an AP connection between the terminal 10 and AP 6, a message urging the printer 100 to set its state to a state waiting for establishment of a WFD connection (i.e., a message urging the user to select the terminal button on the selection screen in T604), and an "OK" button.

[0095] (Effects of this embodiment) According to this embodiment, the terminal 10 transmits an AReq to the printer 100 (S20 in FIG. 7, T520 in FIG. 8) and attempts to execute communication with the printer 100 to establish an AP connection between the printer 100 and the AP 6 (i.e., receiving an ARes, receiving a CReq, transmitting a CRes, and receiving a Configuration Result, etc.) (S22 to S30). If the communication is successful, a printer-use CO is transmitted to the printer 100, so that an AP connection can be established between the printer 100 and the AP 6. On the other hand, if the communication fails, the terminal 10 transmits a GNReq to the printer 100 (S40, T540) and executes communication with the printer 100 to establish a WFD connection between the terminal 10 and the printer 100 (S42, S44, T542, T550, T552). Then, the terminal 10 establishes a WFD connection between the terminal 10 and the printer 100 using the printer CO or the terminal CO (S46, T570). For this reason, the terminal 10 having the Wi-Fi I / F 16 capable of performing wireless communication according to a different communication method of the Wi-Fi standard can appropriately establish a Wi-Fi connection of the printer 100.

[0096] In particular, the terminal 10 cannot know whether the user selected the AP button or the terminal button on the selection screen of the printer 100 (see T504 in FIG. 8). For this reason, in this embodiment, the terminal 10 first executes communication to establish an AP connection between the printer 100 and the AP 6. Then, if the communication fails due to the terminal button being selected on the selection screen (T532 in FIG. 8), the terminal 10 automatically executes communication to establish a WFD connection between the terminal 10 and the printer 100 (T540) without receiving an instruction from the user. This improves user convenience.

[0097] The terminal 10 judges whether the terminal 10 is establishing an AP connection (S12 in FIG. 7), and when it judges that the terminal 10 is establishing an AP connection (YES in S12), it transmits to the printer 100 an AReq that serves as a trigger for establishing an AP connection between the printer 100 and the AP 6 (S20, T520 in FIG. 8). On the other hand, when it judges that the terminal 10 is not establishing an AP connection (NO in S12), it does not transmit the AReq to the printer 100 (i.e., does not execute S20). Even if an AP connection is established between the printer 100 and the AP 6, the terminal 10 is not establishing an AP connection, and therefore the terminal 10 cannot communicate with the printer 100 via the AP 6. With this configuration, it is possible to suppress the execution of unnecessary processing.

[0098] When the terminal 10 determines that the AP connection is not being established (NO in S12 in FIG. 7), the terminal 10 transmits a GNReq to the printer 100 (S40, T620 in FIG. 9). Then, the terminal 10 attempts to execute communication with the printer 100 to establish a WFD connection between the terminal 10 and the printer 100 (i.e., receiving GNRes, transmitting AReq, receiving ARes, transmitting or receiving CReq, transmitting or transmitting CRes, etc.) (S42 to S44). If the communication is successful, the terminal 10 can establish a WFD connection between the terminal 10 and the printer 100 (S46). For this reason, the terminal 10 having a Wi-Fi I / F 16 capable of executing wireless communication according to a different communication method of the Wi-Fi standard can properly establish a Wi-Fi connection of the printer 100.

[0099] When communication for establishing a WFD connection between the terminal 10 and the printer 100 fails (NO in S42 in FIG. 7), the terminal 10 displays a notification screen (S50, T630 in FIG. 9). The notification screen includes a message that prompts the user to establish an AP connection between the terminal 10 and the AP 6. The user can establish an AP connection between the terminal 10 and the AP 6 according to this message, and then select the AP button included in the selection screen of the printer 100 again (see T504 in FIG. 8). In this case, an AP connection is established between the printer 100 and the AP 6, and the terminal 10 can communicate with the printer 100 via the AP 6. The notification screen also includes a message that prompts the user to set the state of the printer 100 to a state waiting for establishment of a WFD connection. The user can select the WFD button included in the selection screen of the printer 100 according to this message. In this case, a WFD connection is established between the terminal 10 and the printer 100, and the terminal 10 can communicate with the printer 100 without going through the AP 6.

[0100] When the terminal 10 determines that the AP connection is being established, the terminal 10 further determines whether the AP connection is a DPP connection or a normal Wi-Fi connection (S26 in FIG. 7). When the AP connection is a DPP connection (YES in S26), the terminal 10 generates a printer CO including a printer SC in Config, and transmits a CRes including the printer CO to the printer 100 (S28). This allows the printer 100 to appropriately establish a DPP connection with the AP 6. On the other hand, when the AP connection is a normal Wi-Fi connection (NO in S26), the terminal 10 generates a printer CO including an SSID and a password of the wireless network formed by the AP 6 in Config, and transmits a CRes including the printer CO to the printer 100 (S30). This allows the printer 100 to appropriately establish a normal Wi-Fi connection with the AP 6. In this way, the terminal 10 can transmit an appropriate printer CO to the printer 100 depending on whether a DPP connection with the AP 6 or a normal Wi-Fi connection with the AP 6 is being established.

[0101] (Correspondence) The terminal 10 and the printer 100 are examples of a "terminal device" and a "communication device", respectively. The Wi-Fi I / F 16 is an example of a "wireless interface". A communication method for performing communication via the AP 6 (i.e., a communication method for establishing an AP connection between the printer 100 and the AP 6) is an example of a "first communication method". The WFD method is an example of a "second communication method". The AReq transmitted at T520 in FIG. 8, the GNReq transmitted at T540 in FIG. 8, and the GNReq transmitted at T620 in FIG. 9 are examples of a "first request signal", a "second request signal", and a "third request signal", respectively. The communication performed at T520 to T530 in FIG. 8, the communication performed at T540 to T542, and the communication performed at T550 to T552 are examples of a "first type of communication" and a "second type of communication", respectively. Receiving an ARes including the code "STATUS_AUTH_FAILURE" (i.e., YES in S24 in FIG. 7) is an example of "when the first type of communication fails". Also, not receiving GNRes (i.e., NO in S32) is an example of "when the second type of communication fails". The printer CO transmitted in S28 or S30 in FIG. 7 is an example of "first connection information". The printer CO or terminal CO communicated in S44 is an example of "second connection information". The wireless connection between the printer 100 and the AP 6 and the WFD connection between the terminal 10 and the printer 100 are examples of "first wireless connection" and "second wireless connection", respectively. The DPP connection between the terminal 10 and the AP 6 and the normal Wi-Fi connection between the terminal 10 and the AP 6 are examples of "first type of wireless connection" and "second type of wireless connection", respectively. In the notification screen displayed in S50 in FIG. 7, a message urging the terminal 10 to establish an AP connection between the AP 6 and a message urging the printer 100 to set the state to a state waiting for establishment of a WFD connection are examples of "first notification information" and "second notification information", respectively. The state in which the printer 100 waits for establishment of a connection with the AP 6, and the state in which the printer 100 waits for establishment of a WFD connection with the terminal 10 are examples of a "first state" and a "second state", respectively.

[0102] The process of S10, the process of S20, and the process of S30 in FIG. 7 are examples of processes executed by the "acquisition unit", the "first transmission unit", and the "second transmission unit", respectively. The processes of S22 to S30, the processes of S42 to S44, and the process of S46 are examples of processes executed by the "first attempt unit", the "communication execution unit", and the "establishment unit", respectively. The process of S12, the process of S26, the process of S40, and the processes of S42 to S44 are examples of processes executed by the "first determination unit", the "second determination unit", the "third transmission unit", and the "second attempt unit", respectively. The process of S50 in FIG. 7 is an example of processes executed by the "first display control unit" and the "second display control unit".

[0103] (Second Example) Next, a second embodiment will be described. In this embodiment, when a terminal button included in the selection screen is selected, the printer 100 transitions to the G / O state instead of the device state. That is, the printer 100 transitions to the G / O state spontaneously without performing G / O negotiation. In addition, in this embodiment, the terminal 10 executes the following in the determination of S24 in FIG. 7. That is, when the capability included in the ARes received in S22 indicates that the terminal 10 can operate only as a Configurator, the terminal 10 determines that an error has occurred (YES in S24). This is because the terminal 10 is also attempting to operate as a Configurator (that is, the AReq in S20 includes a capability indicating a value indicating that the terminal 10 can operate only as a Configurator), and role sharing fails.

[0104] (Specific cases: Figures 10 and 11) As shown in T700 of FIG. 10, a DPP connection is being established between the terminal 10 and the AP 6. In a modified example, a normal Wi-Fi connection may be being established between the terminal 10 and the AP 6. The processes of T702 to T706 are similar to the processes of T502 to T506 of FIG. 8. In T708, the printer 100 transitions to a G / O state of the WFD method. Then, the printer 100 determines the SSID and password of the wireless network in which the printer 100 operates as a G / O. The process of T709 is similar to the process of T509.

[0105] The processing from T710 to T720 is the same as the processing from T510 to T520. In T720, the terminal 10 transmits, to the printer 100, an AReq including a capability indicating that the terminal 10 can operate only as a configurator (S20).

[0106] In response to receiving the AReq from the terminal 10 in T720, the printer 100 transmits an ARes to the terminal 10 in T730. Here, since the printer 100 is operating as a G / O, the ARes includes a capability indicating that the printer 100 can operate only as a Configurator.

[0107] When the terminal 10 receives an ARes from the printer 100 in T730, it determines that an error has occurred in T732 (YES in S24) because both the terminal 10 and the printer 100 are attempting to operate as Configurators. Thereafter, the terminal 10 transmits a GNReq to the printer 100 in T770 of FIG. 11 (S40).

[0108] When the printer 100 receives a GNReq from the terminal 10 in T770, the printer 100 transmits a GNRes including the code "Fail; unable to accommodate request" indicating that it is unable to accommodate the request to execute G / O negotiation to the terminal 10 in T772. This is because the printer 100 is already operating as a G / O and does not need to execute G / O negotiation.

[0109] When the terminal 10 receives a GNRes from the printer 100 in T772 (S42), the GNRes contains the code "Fail; unable to accommodate request", so that the terminal 10 can know that the printer 100 is already operating as a G / O. In this case, the terminal 10 decides to operate as a CL, and executes Auth in T780 (S44). In this Auth, it is determined that the printer 100 operating as a G / O will operate as a Configurator, and the terminal 10 will operate as an Enrollee. That is, since the terminal 10 has decided to operate as a CL, in the Auth of T780, it transmits an AReq to the printer 100, which includes a capability indicating that it can operate only as an Enroller. The terminal 10 also receives an ARes from the printer 100, which includes a capability indicating that it can operate only as a Configurator.

[0110] Next, the terminal 10 executes Config in T782 (S44). In this Config, the terminal 10 operating as an Enroller receives from the printer 100 a CRes including a terminal CO generated by the printer 100. The terminal CO includes an SSID and a password determined by the printer 100 operating as a G / O.

[0111] When the terminal 10 receives a CRes including a terminal CO from the printer 100 in T782, the terminal 10 stores the terminal CO in T784. Then, in T790, the terminal 10 uses the terminal CO (more specifically, the SSID and password included in the terminal CO) to establish a WFD connection with the printer 100 (S46).

[0112] Even in this embodiment, when communication for establishing an AP connection between the printer 100 and the AP 6 fails (T732 in FIG. 10), the terminal 10 can establish a WFD connection between the terminal 10 and the printer 100 (T790 in FIG. 11). In this embodiment, receiving an ARes including a capability indicating that the printer 100 can operate only as a Configurator is an example of "when the first type communication fails."

[0113] (Third Example) Next, a third embodiment will be described. As in the second embodiment, the printer 100 transitions to the G / O state when a terminal button included in the selection screen is selected. Furthermore, the terminal 10 executes the following in the judgment of S24 in FIG. 7. That is, the terminal 10 judges that an error has occurred when the ARes received in S22 includes the code "STATUS_NOT_COMPATIBLE" (YES in S24). "STATUS_NOT_COMPATIBLE" is a code indicating that role sharing has failed.

[0114] (Specific cases: Figures 10 and 11) The processes of T700 to T720 in Fig. 10 are the same as those in the second embodiment. In response to receiving the AReq from the terminal 10 in T740, the printer 100 transmits an ARes to the terminal 10 in T740. The ARes includes the code "STATUS_NOT_COMPATIBLE". This is because both the terminal 10 and the printer 100 are attempting to operate as Configurators.

[0115] When the terminal 10 receives an ARes including the code "STATUS_NOT_COMPATIBLE" from the printer 100 in T740, the terminal 10 determines in T742 that an error has occurred (YES in S24). The subsequent processes of T770 to T790 in FIG. 11 are the same as those in the second embodiment.

[0116] Even in this embodiment, when communication for establishing an AP connection between the printer 100 and the AP 6 fails (T742 in FIG. 10), the terminal 10 can establish a WFD connection between the terminal 10 and the printer 100 (T790 in FIG. 11). In this embodiment, receiving an ARes including the code "STATUS_NOT_COMPATIBLE" from the printer 100 is an example of "when the first type communication fails."

[0117] (Fourth Example) Next, a fourth embodiment will be described. As in the second embodiment, the printer 100 transitions to the G / O state when a terminal button included in the selection screen is selected. In addition, this embodiment does not assume a case in which it is determined that an error has occurred in S24 of FIG. 7, but assumes a case in which it is determined that an error has occurred in the determination of S32 of FIG. 7.

[0118] (Specific cases: Figures 10 and 11) The processing of T700 to T720 in FIG. 10 is the same as in the second embodiment. In response to receiving an AReq from the terminal 10 in T750 in FIG. 11, the printer 100 transmits an ARes to the terminal 10 in T740. Here, the printer 100 can know that the terminal 10 operates as a Configurator based on the capability in the AReq. For this reason, the printer 100 determines to operate as an Enrollee, although it is operating as a G / O. Therefore, the printer 100 transmits an ARes to the terminal 10, which includes a capability indicating that the printer 100 can operate only as an Enrollee.

[0119] When the terminal 10 receives the ARes from the printer 100 at T750, it knows that the printer 100 operates as an Enrollee based on the capability in the ARes. Therefore, the terminal 10 determines that no error has occurred because the role allocation was successful.

[0120] In response to receiving CReq from the printer 100 acting as an Enrollee in T760, the terminal 10 transmits CRes to the printer 100 in T762. The CRes includes the code "netRole = sta."

[0121] When the printer 100 receives the CRes from the terminal 10 in T762, it knows that the printer 100 is being requested to operate as a slave station based on the code "netRole = sta" in the CRes. Since the printer 100 is already operating as a G / O (i.e., a master station), it cannot comply with the request. For this reason, the printer 100 transmits a Configuration Result including the code "STATUS_CONFIG_REJECTED" to the terminal 10 in T764.

[0122] When the terminal 10 receives a Configuration Result including the code "STATUS_CONFIG_REJECTED" from the printer 100 in T764, the terminal 10 determines in T766 that an error has occurred (YES in S32). The processes of T770 to T790 executed thereafter are the same as those in the second embodiment.

[0123] Even in this embodiment, when communication for establishing an AP connection between the printer 100 and the AP 6 fails (T766 in FIG. 11), the terminal 10 can establish a WFD connection between the terminal 10 and the printer 100 (T790 in FIG. 11). In this embodiment, receiving a Configuration Result including the code "STATUS_CONFIG_REJECTED" from the printer 100 is an example of "when the first type communication fails."

[0124] (Fifth Example) Next, a fifth embodiment will be described. In this embodiment, the terminal 10 first executes communication to establish a WFD connection between the terminal 10 and the printer 100, and if this communication fails, executes communication to establish an AP connection between the printer 100 and the AP 6.

[0125] (Terminal processing; Figure 12) In this embodiment, the process of Fig. 12 is executed instead of the process of Fig. 7. The processes of S110 to S114 are the same as the processes of S10, S40, and S42 of Fig. 7. That is, when the terminal 10 executes BS with the printer 100, it first executes communication to establish a WFD connection between the terminal 10 and the printer 100. If YES in S114, the process proceeds to S120, and if NO in S114, the process proceeds to S130. The processes of S120 to S122 are similar to the processes of S44 to S46. The processes of S130 to S140 are similar to the processes of S12, S20 to S22, and S26 to S30. The process of S150 is similar to the process of S50.

[0126] (Case C; Figure 13) Next, a specific case realized by the process of FIG. 12 will be described. First, with reference to FIG. 13, a case C in which an AP connection is not being established between the terminal 10 and the AP 6 will be described. The process of T802 to T812 (S110 in FIG. 12) is the same as the process of T502 to T512 in FIG. 8. Also, the process of T820 to T850 (YES in S112 and S114, S120, S122) is the same as the process of T540 to T570. Note that, in a modified example, the terminal 10 may transition to a G / O state instead of a device state in T808. In this case, the terminal 10 receives a GNRes including the code "Fail; unable to accommodate request" from the printer 100 in T822 (see T772 in FIG. 11). Also, in T832, the terminal 10 receives a CRes including a terminal-use CO generated by the printer 100 from the printer 100 (see T782 to T784).

[0127] (Case D; Figure 14) Next, with reference to Fig. 14, a case D in which an AP connection is being established between the terminal 10 and the AP 6 will be described. As shown in T900 in Fig. 14, a DPP connection is being established between the terminal 10 and the AP 6. Note that in a modified example, a normal Wi-Fi connection may be being established between the terminal 10 and the AP 6. The processing from T902 to T912 (S110 in Fig. 12) is similar to the processing from T602 to T612 in Fig. 9. Moreover, the processing from T920 to T922 (NO in S112 and S114) is similar to the processing from T620 to T622.

[0128] Thereafter, the terminal 10 determines in T924 that an AP connection is being established (YES in S130 in FIG. 12). In this case, the terminal 10 transmits an AReq to the printer 100 in T930 (S132), and receives an ARes from the printer 100 in T932 (S134). In this case, it is determined in Auth that the terminal 10 operates as a Configurator, and that the printer 100 operates as an Enrollee.

[0129] When Auth between the terminal 10 and the printer 100 is completed, Config is executed between the terminal 10 and the printer 100 (S138). In this case, since a DPP connection is being established between the terminal 10 and the AP 6 (YES in S136), in the Config, the terminal 10 generates a printer CO including a printer SC, and transmits a CRes including the printer CO to the printer 100. Note that in a modified example, when a normal Wi-Fi connection is being established between the terminal 10 and the AP 6 (NO (normal Wi-Fi connection) in S136), the terminal 10 may generate a printer CO including the SSID and password of the wireless network formed by the AP 6, and transmit a CRes including the printer CO to the printer 100.

[0130] When the printer 100 receives a CRes including a printer CO from the terminal 10, the printer 100 stores the printer CO in T940. Then, in T950, the printer 100 uses the printer CO (more specifically, uses the printer SC included in the printer CO) to establish a DPP connection with the AP 6 (see FIG. 6).

[0131] (Case E; Figure 15) 15, a case E in which an AP connection is not established between the terminal 10 and the AP 6 will be described. The processes of T1002 to T1022 (NO in S110, S112, and S114 in FIG. 12) are the same as the processes of T902 to T922 in FIG.

[0132] In T1024, the terminal 10 determines that an AP connection is not being established with the AP 6 (NO in S130). In this case, the terminal 10 displays a notification screen in T1030 (S150, see T630 in FIG. 9).

[0133] (Effects of this embodiment) According to this embodiment, the terminal 10 transmits a GNReq to the printer 100 (S110 in FIG. 12, T820 in FIG. 13), and attempts to execute communication with the printer 100 to establish a WFD connection between the terminal 10 and the printer 100 (i.e., receiving GNRes, transmitting AReq, receiving AReq, receiving (or transmitting) CReq, transmitting (or receiving) CRes, and receiving (or transmitting) a Configuration Result, etc.) (S114 to S120, T822, T830, T832). If the communication is successful, the terminal 10 uses the printer CO or the terminal CO to establish a WFD connection between the terminal 10 and the printer 100 (S122, T850). On the other hand, if the communication fails, the terminal 10 transmits the AReq to the printer 100 (S132, T930 in FIG. 14) and executes communication with the printer 100 to establish an AP connection between the printer 100 and the AP 6 (S134 to S140, T932 to T934, T940). As a result, the printer CO is transmitted to the printer 100, so that an AP connection can be established between the printer 100 and the AP 6. For this reason, the terminal 10 having the Wi-Fi I / F 16 capable of performing wireless communication according to a different communication method of the Wi-Fi standard can appropriately establish a Wi-Fi connection of the printer 100.

[0134] The terminal 10 first executes communication to establish a WFD connection between the terminal 10 and the printer 100, and if the communication fails, automatically executes communication to establish an AP connection between the printer 100 and the AP 6 without receiving an instruction from the user. This improves user convenience. Furthermore, if the terminal 10 determines that an AP connection is being established (YES in S130), the terminal 10 transmits an AReq to the printer 100 (S132, T930 in FIG. 14), but if the terminal 10 determines that an AP connection is not being established (NO in S130), the terminal 10 does not transmit the AReq to the printer 100 (i.e., does not execute S132). This makes it possible to suppress the execution of unnecessary processes.

[0135] (Correspondence) The GNReq transmitted at T820 in Fig. 13 and the AReq transmitted at T930 in Fig. 14 are examples of a "second request signal" and a "first request signal", respectively. The communications performed at T822 and T830 to T832 in Fig. 13 and the communications performed at T930 to T934 in Fig. 14 are examples of a "second type of communication" and a "first type of communication", respectively. Not receiving GNRes (i.e., NO in S114) is an example of a "case where the second type of communication fails".

[0136] The processes of S110, S112, and S132 in Fig. 12 are examples of processes executed by an "acquisition unit," a "second transmission unit," and a "first transmission unit," respectively. The processes of S114 to S120, S122, and S132 to S140 are examples of processes executed by a "second attempt unit," an "establishment unit," and a "communication execution unit," respectively. The processes of S130 and S136 are examples of processes executed by a "first determination unit," and a "second determination unit," respectively.

[0137] Although specific examples of the technology disclosed in this specification have been described in detail above, 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 are listed below.

[0138] (Modification 1) Each of the terminal 10 and the printer 100 may further include a wireless interface (e.g., BTI / F, NFC / F, etc.) conforming to a wireless method (e.g., BT (abbreviation of Blue Tooth (registered trademark)) method, NFC (abbreviation of Near Field Communication) method, etc.) different from the Wi-Fi method. In this case, the printer 100 may transmit information including a public key and a MAC address via the BTI / F of the printer 100, for example, instead of displaying a QR code at T100 in FIG. 3. In this case, the terminal 10 can receive the information via the BTI / F of the terminal 10. In another modification, the printer 100 may transmit the information via the NFC / F of the printer 100. In this case, the terminal 10 can receive the information via the NFC / F of the terminal 10. Generally speaking, the method in which the "acquisition unit" acquires the public key of the communication device is not limited to a specific one.

[0139] (Variation 2) The "second communication method" does not have to be the WFD method, and may be a so-called SoftAP method or an ad-hoc method. Generally speaking, the "second communication method" may be any communication method for performing wireless communication with a communication device without going through an access point.

[0140] (Modification 3) The determinations of S12 in Fig. 7 and S130 in Fig. 12 may be executed, for example, before the BS with the printer 100. In other words, the timing at which the "first determination unit" executes the determination is not particularly limited.

[0141] (Variation 4) After completing S10 in FIG. 7, the terminal 10 may execute S20 without executing the judgment in S12. In this variation, the "first judgment unit," the "third transmission unit," and the "second attempt unit" can be omitted. Furthermore, when the terminal 10 judges NO in S114 in FIG. 12, it may execute S132 without executing the judgment in S130. In this variation, the "first judgment unit" can be omitted.

[0142] (Modification 5) In the above embodiment, the notification screen of S50 in FIG. 7 or S150 in FIG. 12 includes both a message prompting the terminal 10 to establish an AP connection between the AP 6 and a message prompting the printer 100 to set the state to a state waiting for establishment of a WFD connection. Alternatively, the notification screen may include only one of the above two messages. In this modification, either the "first display control unit" or the "second display control unit" may be omitted. In another modification, in the case of NO in S42 in FIG. 7 or NO in S130 in FIG. 12, the process may be terminated without executing S50 or S150. In this modification, both the "first display control unit" and the "second display control unit" may be omitted.

[0143] (Variation 6) In a system where it is assumed that terminal 10 cannot establish a normal Wi-Fi connection with AP6 but can establish a DPP connection with AP6, S26 and S30 in Fig. 7 (or S136 and S140 in Fig. 12) can be omitted. Also, in a system where it is assumed that terminal 10 cannot establish a DPP connection with AP6 but can establish a normal Wi-Fi connection with AP6, S26 and S28 in Fig. 7 (or S136 and S138 in Fig. 12) can be omitted. In this variation, the "second determination unit" can be omitted.

[0144] (Variation 7) The terminal 10 does not have to support the DPP method, and may obtain the public key of the printer 100 and execute various communications such as authentication requests, authentication responses, and connection information according to a method other than the DPP method.

[0145] (Variation 8) The "communication device" does not have to be the printer 100, but may be other devices such as a scanner, a multi-function device, a mobile terminal, a PC, or a server.

[0146] (Modification 9) In the above embodiment, each process in FIGS. 2 to 15 is executed by software (for example, application 38), but at least one of these processes may be realized by hardware such as a logic circuit.

[0147] The technical elements described in this specification or drawings have technical utility either alone or in various combinations, and are not limited to the combinations described in the claims at the time of filing. In addition, the technologies illustrated in this specification or drawings can achieve multiple objectives simultaneously, and achieving one of these objectives is itself technically useful. The following items are elements of the claims as filed: (Item 1) A terminal device, A wireless interface capable of performing wireless communication according to a first communication method of the Wi-Fi standard and a second communication method of the Wi-Fi standard, the first communication method being a communication method for performing wireless communication with a communication device via an access point, and the second communication method being a communication method for performing wireless communication with the communication device without going through the access point; An acquisition unit for acquiring a public key of the communication device; a first transmission unit that transmits a first request signal using the public key to the communication device via the wireless interface when the public key is acquired; a first attempt unit that attempts to perform a first type of communication with the communication device in accordance with the first communication method via the wireless interface in response to the first request signal being transmitted to the communication device, the first type of communication including transmitting first connection information to the communication device, the first connection information being information for establishing a first wireless connection between the communication device and the access point; a second transmission unit that transmits a second request signal, different from the first request signal, to the communication device via the wireless interface when the first request signal is transmitted to the communication device and the first type of communication fails; a communication execution unit that executes a second type of communication with the communication device via the wireless interface in accordance with the second communication method in response to the second request signal being transmitted to the communication device, the second type of communication including communicating second connection information with the communication device, the second connection information being information for establishing a second wireless connection between the terminal device and the communication device; an establishment unit that establishes the second wireless connection between the terminal device and the communication device via the wireless interface by using the second connection information after the second type of communication is performed with the communication device; A terminal device comprising: (Item 2) The terminal device further comprises: a first determination unit that determines whether a third wireless connection is being established between the terminal device and the access point; the first transmission unit transmits the first request signal to the communication device when it is determined that the public key is acquired and the third wireless connection is being established between the terminal device and the access point; A terminal device as described in item 1, wherein when the public key is acquired and it is determined that the third wireless connection is not being established between the terminal device and the access point, the first request signal is not transmitted to the communication device. (Item 3) The terminal device further comprises: a third transmission unit that transmits a third request signal, different from the first request signal, to the communication device via the wireless interface when the public key is acquired and it is determined that the third wireless connection between the terminal device and the access point is not being established; A terminal device as described in item 2, further comprising: a second attempt unit that attempts to perform the second type of communication with the communication device in accordance with the second communication method via the wireless interface in response to the third request signal being transmitted to the communication device. (Item 4) The terminal device further comprises: A display unit; The terminal device described in item 3 further comprises: a first display control unit that, when the third request signal is transmitted to the communication device and the second type of communication fails, causes the display unit to display first notification information prompting the establishment of the wireless connection between the terminal device and the access point. (Item 5) the communication device operates in either a first state corresponding to the first communication method or a second state corresponding to the second communication method when receiving an operation for establishing a wireless connection between the communication device and another device; The terminal device further comprises: A display unit; The terminal device according to item 3 or 4, further comprising: a second display control unit that, when the third request signal is transmitted to the communication device and the second type of communication fails, causes the display unit to display second notification information prompting the communication device to operate in the second state. (Item 6) A terminal device, A wireless interface capable of performing wireless communication according to a first communication method of the Wi-Fi standard and a second communication method of the Wi-Fi standard, the first communication method being a communication method for performing wireless communication with a communication device via an access point, and the second communication method being a communication method for performing wireless communication with the communication device without going through the access point; An acquisition unit for acquiring a public key of the communication device; a second transmission unit configured to transmit a second request signal to the communication device via the wireless interface when the public key is acquired; a second attempt unit that attempts to execute a second type of communication with the communication device in accordance with the second communication method via the wireless interface in response to the second request signal being transmitted to the communication device, the second type of communication including communicating second connection information with the communication device, the second connection information being information for establishing a second wireless connection between the terminal device and the communication device; an establishment unit that establishes the second wireless connection between the terminal device and the communication device via the wireless interface by using the second connection information when the second request signal is transmitted to the communication device and the second type of communication is successful; a first transmission unit that, when the second request signal is transmitted to the communication device and the second type of communication fails, transmits to the communication device via the wireless interface a first request signal that is different from the second request signal, the first request signal using the public key; a communication execution unit that executes a first type of communication with the communication device in accordance with the first communication method via the wireless interface in response to the first request signal being transmitted to the communication device, the first type of communication including transmitting first connection information to the communication device, the first connection information being information for establishing a first wireless connection between the communication device and the access point; A terminal device comprising: (Item 7) The terminal device further comprises: a first determination unit that determines whether a third wireless connection is being established between the terminal device and the access point; the first transmission unit transmits the first request signal to the communication device when it is determined that the second request signal is transmitted to the communication device, the second type of communication has failed, and the third wireless connection is being established between the terminal device and the access point; 7. A terminal device as described in item 6, wherein when the second request signal is transmitted to the communication device, the second type of communication fails, and it is determined that the third wireless connection is not being established between the terminal device and the access point, the first request signal is not transmitted to the communication device. (Item 8) The terminal device further comprises: A display unit; 8. The terminal device according to item 7, further comprising: a first display control unit that, when the second request signal is transmitted to the communication device, the second type of communication fails, and it is determined that the wireless connection between the terminal device and the access point is not established, causes the display unit to display first notification information prompting the establishment of the wireless connection between the terminal device and the access point. (Item 9) the communication device operates in either a first state corresponding to the first communication method or a second state corresponding to the second communication method when receiving an operation for establishing a wireless connection between the communication device and another device; The terminal device according to item 7 or 8, further comprising: a second display control unit that, when the second request signal is transmitted to the communication device, the second type of communication fails, and it is determined that the wireless connection between the terminal device and the access point is not established, causes the display unit to display second notification information prompting the communication device to operate in the second state. (Item 10) The terminal device further comprises: a second determination unit that, when a third wireless connection is being established between the terminal device and the access point, determines whether the third wireless connection is a first type wireless connection conforming to a DPP (abbreviation of Device Provisioning Protocol) method of the Wi-Fi standard or a second type wireless connection that uses an SSID (abbreviation of Service Set Identifier) ​​and a password of a wireless network in which the access point operates as a master station; When the third wireless connection is determined to be the first type of wireless connection, the first connection information includes a Signed-Connector according to the DPP method; The terminal device according to any one of items 1 to 9, wherein when the third wireless connection is determined to be the second type of wireless connection, the first connection information includes the SSID and the password. (Item 11) 11. The terminal device according to any one of items 1 to 10, wherein the first request signal is a DPP Authentication Request in accordance with a DPP (abbreviation of Device Provisioning Protocol) method of the Wi-Fi standard. (Item 12) the second communication method is a Wi-Fi Direct (registered trademark) method of the Wi-Fi standard, 12. The terminal device according to any one of items 1 to 11, wherein the second request signal is a G / O Negotiation Request in accordance with the Wi-Fi Direct method. (Item 13) 13. The terminal device according to any one of items 1 to 12, wherein the acquisition unit acquires the public key by photographing a QR code (registered trademark) in which the public key is encoded. (Item 14) A computer program for a terminal device, comprising: The terminal device A wireless interface capable of performing wireless communication according to a first communication method of the Wi-Fi standard and a second communication method of the Wi-Fi standard, the first communication method being a communication method for performing wireless communication with a communication device via an access point, and the second communication method being a communication method for performing wireless communication with the communication device without going through the access point; A computer, The computer program causes the computer to operate in the following manner: An acquisition unit for acquiring a public key of the communication device; a first transmission unit that transmits a first request signal using the public key to the communication device via the wireless interface when the public key is acquired; a first attempt unit that attempts to perform a first type of communication with the communication device in accordance with the first communication method via the wireless interface in response to the first request signal being transmitted to the communication device, the first type of communication including transmitting first connection information to the communication device, the first connection information being information for establishing a first wireless connection between the communication device and the access point; a second transmission unit that transmits a second request signal, different from the first request signal, to the communication device via the wireless interface when the first request signal is transmitted to the communication device and the first type of communication fails; a communication execution unit that executes a second type of communication with the communication device via the wireless interface in accordance with the second communication method in response to the second request signal being transmitted to the communication device, the second type of communication including communicating second connection information with the communication device, the second connection information being information for establishing a second wireless connection between the terminal device and the communication device; an establishment unit that establishes the second wireless connection between the terminal device and the communication device via the wireless interface by using the second connection information after the second type of communication is performed with the communication device; A computer program that functions as a (Item 15) A computer program for a terminal device, comprising: The terminal device A wireless interface capable of performing wireless communication according to a first communication method of the Wi-Fi standard and a second communication method of the Wi-Fi standard, the first communication method being a communication method for performing wireless communication with a communication device via an access point, and the second communication method being a communication method for performing wireless communication with the communication device without going through the access point; A computer, The computer program causes the computer to operate in the following manner: An acquisition unit for acquiring a public key of the communication device; a second transmission unit configured to transmit a second request signal to the communication device via the wireless interface when the public key is acquired; a second attempt unit that attempts to execute a second type of communication with the communication device in accordance with the second communication method via the wireless interface in response to the second request signal being transmitted to the communication device, the second type of communication including communicating second connection information with the communication device, the second connection information being information for establishing a second wireless connection between the terminal device and the communication device; an establishment unit that establishes the second wireless connection between the terminal device and the communication device via the wireless interface by using the second connection information when the second request signal is transmitted to the communication device and the second type of communication is successful; a first transmission unit that, when the second request signal is transmitted to the communication device and the second type of communication fails, transmits to the communication device via the wireless interface a first request signal that is different from the second request signal, the first request signal using the public key; a communication execution unit that executes a first type of communication with the communication device in accordance with the first communication method via the wireless interface in response to the first request signal being transmitted to the communication device, the first type of communication including transmitting first connection information to the communication device, the first connection information being information for establishing a first wireless connection between the communication device and the access point; A computer program that functions as a [Explanation of symbols]

[0148] 2: communication system, 6: AP, 10: terminal, 12, 112: operation unit, 14, 114: display unit, 16, 116: Wi-Fi I / F, 18: camera, 30, 130: control unit, 32, 132: CPU, 34, 134: memory, 36: OS program, 38: application, 100: printer, 118: print execution unit, 136: program

Claims

1. A terminal device, a wireless interface capable of performing wireless communication according to a first communication method, which is a DPP (abbreviation of Device Provisioning Protocol) method of the Wi-Fi standard, and a second communication method of the Wi-Fi standard, which is a communication method for performing wireless communication with a communication device without going through an access point; An acquisition unit for acquiring a public key of the communication device; a first transmission unit that transmits a first request signal using the public key to the communication device via the wireless interface when the public key is acquired; a first attempt unit that attempts to execute a first type of communication with the communication device in accordance with the first communication method via the wireless interface in response to the first request signal being transmitted to the communication device, the first type of communication including transmitting first connection information to the communication device, the first connection information being information for establishing a first wireless connection between the communication device and the access point; a second transmission unit that transmits a second request signal, different from the first request signal, to the communication device via the wireless interface when the first request signal is transmitted to the communication device and an Authentication Response including first specified information or a Configuration Result including second specified information is received; a communication execution unit that executes a second type of communication with the communication device via the wireless interface in accordance with the second communication method in response to the second request signal being transmitted to the communication device, the second type of communication including communicating second connection information with the communication device, the second connection information being information for establishing a second wireless connection between the terminal device and the communication device; an establishment unit that establishes the second wireless connection between the terminal device and the communication device via the wireless interface by using the second connection information after the second type of communication is executed with the communication device; A terminal device comprising:

2. The terminal device further comprises: a first determination unit that determines whether a third wireless connection is being established between the terminal device and the access point; the first transmission unit transmits the first request signal to the communication device when it is determined that the public key is acquired and the third wireless connection is being established between the terminal device and the access point; The terminal device of claim 1 , wherein when the public key is acquired and it is determined that the third wireless connection is not being established between the terminal device and the access point, the first request signal is not transmitted to the communication device.

3. The terminal device further comprises: a third transmission unit that transmits a third request signal, different from the first request signal, to the communication device via the wireless interface when the public key is acquired and it is determined that the third wireless connection is not being established between the terminal device and the access point; and The terminal device according to claim 2, further comprising: a second attempt unit that attempts to perform the second type of communication with the communication device in accordance with the second communication method via the wireless interface in response to the third request signal being transmitted to the communication device.

4. The terminal device further comprises: A display unit; 4. The terminal device according to claim 3, further comprising: a first display control unit that, when the third request signal is transmitted to the communication device and the second type of communication fails, causes the display unit to display first notification information prompting the establishment of a wireless connection between the terminal device and the access point.

5. the communication device operates in either a first state corresponding to the first communication method or a second state corresponding to the second communication method when receiving an operation for establishing a wireless connection between the communication device and another device; The terminal device further comprises: A display unit; 5. The terminal device according to claim 3 or 4, further comprising: a second display control unit that, when the third request signal is transmitted to the communication device and the second type of communication fails, causes the display unit to display second notification information prompting the communication device to operate in the second state.

6. The terminal device further comprises: a second determination unit that, when a third wireless connection is being established between the terminal device and the access point, determines whether the third wireless connection is a first type wireless connection conforming to the DPP method or a second type wireless connection that uses an SSID (abbreviation of Service Set Identifier) ​​and a password of a wireless network in which the access point operates as a master station; When the third wireless connection is determined to be the first type wireless connection, the first connection information includes a Signed-Connector according to the DPP method, The terminal device according to any one of claims 1 to 5, wherein when the third wireless connection is determined to be the second type of wireless connection, the first connection information includes the SSID and the password.

7. The terminal device according to any one of claims 1 to 6, wherein the first request signal is a DPP Authentication Request in accordance with the DPP method.

8. the second communication method is a Wi-Fi Direct (registered trademark) method of the Wi-Fi standard, The terminal device according to any one of claims 1 to 7, wherein the second request signal is a G / O Negotiation Request in accordance with the Wi-Fi Direct method.

9. The terminal device according to any one of claims 1 to 8, wherein the acquisition unit acquires the public key by photographing a QR code (registered trademark) in which the public key is encoded.

10. A computer program for a terminal device, comprising: The terminal device a wireless interface capable of performing wireless communication according to a first communication method, which is a DPP (abbreviation of Device Provisioning Protocol) method of the Wi-Fi standard, and a second communication method of the Wi-Fi standard, which is a communication method for performing wireless communication with a communication device without going through an access point; A computer, The computer program causes the computer to operate in the following manner: An acquisition unit for acquiring a public key of the communication device; a first transmission unit that transmits a first request signal using the public key to the communication device via the wireless interface when the public key is acquired; a first attempt unit that attempts to execute a first type of communication with the communication device in accordance with the first communication method via the wireless interface in response to the first request signal being transmitted to the communication device, the first type of communication including transmitting first connection information to the communication device, the first connection information being information for establishing a first wireless connection between the communication device and the access point; a second transmission unit that transmits a second request signal, different from the first request signal, to the communication device via the wireless interface when the first request signal is transmitted to the communication device and an Authentication Response including first specified information or a Configuration Result including second specified information is received; a communication execution unit that executes a second type of communication with the communication device via the wireless interface in accordance with the second communication method in response to the second request signal being transmitted to the communication device, the second type of communication including communicating second connection information with the communication device, the second connection information being information for establishing a second wireless connection between the terminal device and the communication device; an establishment unit that establishes the second wireless connection between the terminal device and the communication device via the wireless interface by using the second connection information after the second type of communication is executed with the communication device; A computer program that functions as a

Citation Information

Patent Citations

  • Communication device, communication method and program

    JP2017028460A

  • Communication device, control method therefor and program

    JP2017175468A