COMMUNICATION DEVICE AND COMPUTER PROGRAM FOR THE COMMUNICATION DEVICE
By setting appropriate interfaces and units in the communication device, disconnecting the first wireless connection and establishing a second wireless connection using the received connection information, the problem of failure to clarify how to establish a second wireless connection in the prior art is solved, and appropriate wireless connection switching is achieved.
Patent Information
- Application Number
- JP2023183930
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2023-10-26
- Publication Date
- 2025-04-15
- Estimated Expiration
- 2038-03-30
AI Technical Summary
In the prior art, it is not clear how to properly establish a second wireless connection and a different second external device in the case of an established first wireless connection.
By setting a first wireless interface in the communication device, an output unit for outputting the specific information obtained by the public key, and a disconnection unit for disconnecting the first wireless connection, an authentication request receiving unit and an authentication response transmission unit, receiving and responding to an authentication request, and after disconnecting the first wireless connection, a second wireless connection is established using the received connection information.
After the first wireless connection is disconnected, a second wireless connection is properly established, thereby avoiding the occurrence of a new wireless connection due to the establishment of the first wireless connection.
Smart Images

Figure 0007662010000001 
Figure 0007662010000002 
Figure 0007662010000003
Abstract
Description
[Technical field]
[0001] This specification discloses a technique related to a communication device capable of establishing a wireless connection with an external 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 Wi-Fi connection. [Prior art documents] [Patent documents]
[0003] [Patent Document 1] JP 2018-37979 A [Non-patent literature]
[0004] [Non-Patent Document 1] “DRAFT Device Provisioning Protocol Technical Specification Version 0.2.11” Wi-Fi Alliance, 2017 Summary of the Invention [Problem to be solved by the invention]
[0005] The above non-patent document 1 does not specifically disclose that, in a situation where a wireless connection is established between a communication device and a first external device, a process is executed to establish a wireless connection according to the DPP method between the communication device and a second external device different from the first external device.
[0006] This specification discloses a technology that can appropriately establish a second wireless connection between a communication device and a second external device when a first wireless connection is established between the communication device and a first external device. [Means for solving the problem]
[0007] A communication device disclosed in this specification includes a first wireless interface, an output unit for outputting specific information obtained by using a public key of the communication device to an outside, a disconnection unit for disconnecting the first wireless connection after an output instruction for outputting the specific information is accepted from the output unit in a state in which a first wireless connection is established between the communication device and a first external device via the first wireless interface, an authentication request receiving unit for receiving an authentication request using the public key from the terminal device via the first wireless interface after the public key is acquired by a terminal device due to the specific information being output from the output unit, and an authentication request receiving unit for receiving the authentication request using the public key from the terminal device when the authentication request is received from the terminal device. The communication device includes an authentication response transmitting unit that transmits an authentication response, which is a response to the authentication request, to the terminal device via a wireless interface; a connection information receiving unit that receives connection information from the terminal device via the first wireless interface after the authentication response is transmitted to the terminal device, the connection information being information for establishing a second wireless connection via the first wireless interface between the communication device and a second external device different from the first external device; and a first establishment unit that establishes the second wireless connection between the communication device and the second external device using the connection information after the first wireless connection is disconnected and the connection information is received from the terminal device.
[0008] According to the above configuration, the communication device disconnects the first wireless connection after receiving an output instruction to output specific information obtained using the public key in a state where the first wireless connection is established between the communication device and the first external device. Therefore, it is possible to suppress the occurrence of an event in which a new wireless connection cannot be established due to the establishment of the first wireless connection. In addition, the communication device receives an authentication request using the public key from the terminal device, transmits an authentication response to the terminal device, and receives connection information from the terminal device. Then, after the first wireless connection is disconnected and the connection information is received from the terminal device, the communication device can appropriately establish a second wireless connection between the communication device and the second external device using the connection information.
[0009] A computer program for implementing the above communication device, and a computer-readable recording medium storing the computer program are also novel and useful. A method executed by the above communication device is also novel and useful. A communication system including the above communication device and other devices (e.g., a terminal device, a first external device, a second external device, etc.) is also novel and useful. [Brief description of the drawings]
[0010] [Figure 1] 1 shows the configuration of a communication system. [Diagram 2] FIG. 1 shows an explanatory diagram for explaining an outline of a first embodiment. [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] 1 shows a flowchart of a normal connection process in the first and second embodiments. [Figure 8] 1 shows a flowchart of a DPP connection process in first and second embodiments. [Figure 9] 1 shows a sequence diagram of a specific case in the first embodiment. [Figure 10] 13 shows a sequence diagram of a specific case in the second embodiment. [Figure 11] A sequence diagram of Bootstrapping process is shown below. [Figure 12] The sequence diagram continues from FIG. [Figure 13] 11 shows each screen displayed on the printer of the third embodiment. [Figure 14] 13 shows a flowchart of a normal connection process according to the third embodiment. [Figure 15] 13 shows a flowchart of a DPP connection process according to a third embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0011] (First embodiment) (Configuration of communication system 2; Figure 1) 1, the communication system 2 includes a plurality of APs (abbreviation of Access Point) 6A, 6B, a plurality of terminals 10A, 10B, and a printer 100. In this embodiment, a user establishes a wireless connection between the printer 100 and the AP 6A according to the Wi-Fi method (hereinafter, referred to as "Wi-Fi connection"), and then, instead of the Wi-Fi connection, establishes a Wi-Fi connection between the printer 100 and the AP 6B.
[0012] (Configuration of terminals 10A and 10B) Since the terminals 10A and 10B have almost the same configuration, the configuration of the terminal 10A will be mainly described below. The terminal 10A 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 10A may be a stationary PC, a notebook PC, or the like.
[0013] The terminal 10A includes an operation unit 12, a display unit 14, a camera 15, a Wi-Fi interface 16, an NFC (abbreviation of Near Field Communication) interface 17, and a control unit 30. Each unit 12 to 30 is connected to a bus line (reference numerals omitted). In the following, the interface will be referred to as "I / F".
[0014] The operation unit 12 has a plurality of keys. A user can input various instructions to the terminal 10A 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) for receiving instructions from the user. The camera 15 is a device for photographing an object, and in this embodiment, is used particularly for photographing QR codes (registered trademark) for each of the APs 6A, 6B and the printer 100.
[0015] The Wi-Fi I / F 16 is a wireless interface for performing wireless communication according to the Wi-Fi method (hereinafter referred to as "Wi-Fi communication"). The Wi-Fi method is a wireless communication method 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, 11ac, etc.). In particular, the Wi-Fi I / F 16 supports the DPP (abbreviation of Device Provisioning Protocol) method that is to be formulated by the Wi-Fi Alliance. The DPP method is described in "DRAFT Device Provisioning Protocol Technical Specification Version 0.2.11," a draft of a specification created by the Wi-Fi Alliance, and is a wireless communication method for easily establishing a Wi-Fi connection between a pair of devices (for example, the printer 100 and the AP6A) using a terminal (for example, the 10A).
[0016] The NFC I / F 17 is an I / F for performing wireless communication according to the NFC method (hereinafter referred to as "NFC communication"). The NFC method is a wireless communication method based on international standards such as ISO / IEC 14443, 15693, and 18092. Known types of I / F for performing NFC communication include an I / F called an NFC Forum Device and an I / F called an NFC Forum Tag. In this embodiment, the NFC I / F 17 is an NFC Forum Device.
[0017] Here, differences between Wi-Fi communication and NFC communication will be explained. The communication speed of Wi-Fi communication (for example, a maximum communication speed of 11 to 600 Mbps) is faster than the communication speed of NFC communication (for example, a maximum communication speed of 100 to 424 Kbps). Furthermore, the carrier frequency in Wi-Fi communication (for example, 2.4 GHz band or 5.0 GHz band) is different from the carrier frequency in NFC communication (for example, 13.56 MHz band). Furthermore, the maximum distance at which Wi-Fi communication can be performed (for example, a maximum of about 100 m) is longer than the maximum distance at which NFC communication can be performed (for example, a maximum of about 10 cm).
[0018] 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 a connection application 38 (hereinafter simply referred to as "app 38").
[0019] The OS program 36 is a program for controlling the basic operation of the terminal 10A. The application 38 is a program for establishing a Wi-Fi connection between a pair of devices according to the DPP method. The application 38 is installed in the terminal 10A from a server on the Internet provided by the vendor of the printer 100, for example.
[0020] (Configuration of Printer 100) The printer 100 is a peripheral device (for example, a peripheral device of the terminal 10A, etc.) capable of executing a printing function. The printer 100 includes an operation unit 112, a display unit 114, a Wi-Fi I / F 116, an NFC I / F 117, a print execution unit 118, and a control unit 130. Each unit 112 to 130 is connected to a bus line (reference numerals omitted).
[0021] The operation unit 112 includes 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 display unit 114 also functions as a touch panel (i.e., an operation unit) for receiving instructions from a user. The NFC I / F 117 is similar to the NFC I / F 17 of the terminal 10A, and is an I / F for performing NFC communication. In this embodiment, the NFC I / F 117 may be an NFC Forum device or an NFC Forum tag. The print execution unit 118 includes a printing mechanism such as an inkjet type or a laser type.
[0022] The Wi-Fi I / F 116 is the same as the Wi-Fi I / F 16 of the terminal 10A. That is, the Wi-Fi I / F 116 supports the DPP method. Also, the Wi-Fi I / F 116 has only one MAC address "Mlan" and can establish only one Wi-Fi connection with an AP using the MAC address. That is, the Wi-Fi I / F 116 cannot simultaneously establish multiple Wi-Fi connections with multiple APs.
[0023] The control unit 130 includes a CPU 132 and a memory 134. The CPU 132 executes various processes in accordance with a program 136 stored in the memory 134. The memory 134 is configured by a volatile memory, a non-volatile memory, or the like.
[0024] (Outline of this embodiment; FIG. 2) Next, an overview of this embodiment will be described with reference to FIG. 2. For example, assume that the APs 6A, 6B and the printer 100 are installed in the same company. Then, the state of the network in the company may be changed from a state in which the printer 100 participates in a first wireless network formed by the AP 6A to a state in which the printer 100 participates in a second wireless network formed by the AP 6B. For example, if the printer 100 is used less frequently in the first wireless network, the administrator of the communication system 2 may allow the printer 100 to participate in the second wireless network instead of the first wireless network. In this embodiment, the user (for example, the administrator) first establishes a Wi-Fi connection between the printer 100 and the AP 6A, and then establishes a Wi-Fi connection between the printer 100 and the AP 6B instead of the Wi-Fi connection. In the following, the Wi-Fi connection between the printer 100 and the AP (for example, 6A) is referred to as an "AP connection". A process for establishing an AP connection between the printer 100 and the AP 6A will be described with reference to FIG. 2. For ease of understanding, the operations executed by the CPU of each device (eg, CPU 32, 132) will be described below with the device (eg, terminal 10A, printer 100) as the subject, rather than with the CPU as the subject.
[0025] When the printer 100 is powered on, at T10, it displays a home screen on the display unit 114. The home screen includes the character string "Print Settings" and the character string "Wireless LAN (abbreviation for Local Area Network) Settings."
[0026] When the printer 100 accepts the selection of "Wireless LAN Settings" in the home screen from the user in T12, the printer 100 displays a selection screen on the display unit 114 in T14. The selection screen includes a character string "Manual Connection", a character string "WPS (abbreviation of Wi-Fi Protected Setup) Connection", and a character string "DPP Connection". "Manual Connection" is a method for establishing an AP connection in response to the user inputting wireless setting information (e.g., SSID (abbreviation of Service Set Identifier), password, etc.) currently used in the wireless network of an AP (e.g., 6A) to the printer 100. "WPS Connection" is a method for establishing an AP connection according to WPS in response to the user operating a predetermined button of the AP (i.e., executing a PBC (abbreviation of Push Button Configuration) operation) without inputting the wireless setting information to the printer 100. "DPP Connection" is a method for establishing an AP connection according to DPP in response to the user using a terminal (e.g., 10A) without inputting the wireless setting information to the printer 100.
[0027] (Case A1) In case A1, the printer 100 accepts the selection of "Manual Connection" from the user in the selection screen in T20. In this case, the printer 100 accepts the input of wireless setting information from the user in T22, and establishes an AP connection with the AP6A by communicating various signals with the AP6A using the wireless setting information in T24. The various signals include, for example, Probe, Authentication, Association, 4-way handshake, etc. This allows the printer 100 to participate in the wireless network of the AP6A as a slave station, and to communicate with other slave stations participating in the wireless network via the AP6.
[0028] (Case A2) In case A2, the printer 100 accepts the selection of "WPS connection" from the user in the selection screen in T30. After that, when the user executes a PBC operation on the AP 6A in T32, the printer 100 executes communication with the AP 6A according to WPS (i.e., WPS negotiation) in T34 to receive wireless setting information from the AP 6A, and establishes an AP connection with the AP 6A by communicating various signals with the AP 6A using the wireless setting information. Note that, although the PBC method of WPS is adopted in this embodiment, a PIN code method of WPS may be adopted in a modified example.
[0029] (Case A3) As described above, the terminals 10A, 10B and the printer 100 support the DPP method, and the APs 6A, 6B also support the DPP method. In case A3, the devices 6A, 10A, 100 execute communication according to the DPP method, thereby establishing an AP connection between the printer 100 and the AP 6A.
[0030] After receiving an instruction from the user to start the application 38, the terminal 10A executes DPP-based Bootstrapping (hereinafter simply referred to as "BS") with the AP 6A in T40. The BS is a process in which the AP 6A provides the terminal 10A with information used in Authentication (hereinafter simply referred to as "Auth") in T42, which will be described later, in response to the terminal 10A photographing a QR code attached to the AP 6A.
[0031] In T42, the terminal 10A uses the information already acquired at the BS in T40 to execute DPP-based Auth with the AP 6A. This Auth is processing by which each of the terminal 10A and the AP 6A authenticates the other party of communication.
[0032] In T44, the terminal 10A executes a DPP-based Configuration (hereinafter simply referred to as "Config") with the AP 6A. The Config is a process of transmitting information for establishing an AP connection to the AP 6A. Specifically, the terminal 10A generates an AP Configuration Object (hereinafter simply referred to as "CO") for establishing an AP connection, and transmits the AP CO to the AP 6A. As a result, the AP CO is stored in the AP 6A.
[0033] Next, in T50, the terminal 10A executes a DPP-based BS with the printer 100. The BS is a process in which the printer 100 provides the terminal 10A with information used in Auth in T52, which will be described later. As the BS, the following two cases A3-1 and A3-2 are considered.
[0034] (Case A3-1) 3, in case A3-1, printer 100 accepts the selection of "DPP connection" from the user in the selection screen in T70. In this case, printer 100 displays a QR code on display unit 114 in T72. The QR code is a code image obtained by encoding information such as the public key of printer 100 that is pre-stored in memory 134. The QR code may be generated by printer 100 when the process of T72 is executed, or may be pre-stored in memory 134 from the time of shipment of printer 100.
[0035] In response to the user performing an action to photograph a QR code in T74, the terminal 10A photographs the QR code with the camera 15. In this case, in T76, the terminal 10A decodes the photographed QR code and acquires information such as a public key.
[0036] (Case A3-2) In case A3-2, in T80, an operation is executed on the terminal 10A to bring the terminal 10A closer to the printer 100. In this case, the distance between the NFC I / F 17 of the terminal 10A and the NFC I / F 117 of the printer 100 becomes equal to or less than the distance at which NFC communication can be performed (e.g., 10 cm), and an NFC connection is established between these NFC I / Fs 17 and 117.
[0037] The NFC I / F 117 pre-stores NFC information including information such as a public key, etc. When the NFC I / F 117 receives a Read command from the terminal 10A using the NFC connection in T81, it transmits the NFC information to the terminal 10A in T82.
[0038] In T82, the terminal 10A receives the NFC information from the printer 100 via the NFC I / F 17, and thereby can obtain information such as the public key included in the NFC information.
[0039] (Continuation of Case A3) 2, the terminal 10A uses the information already acquired at the BS in T50 to execute DPP-based Auth with the printer 100. This Auth is processing in which the terminal 10A and the printer 100 each authenticate the other party in communication.
[0040] At T54, the terminal 10A executes a DPP-based Config with the printer 100. The Config is a process for transmitting information for establishing an AP connection to the printer 100. Specifically, the terminal 10A generates a printer CO for establishing an AP connection and transmits the printer CO to the printer 100. As a result, the printer CO is stored in the printer 100.
[0041] In T60, the printer 100 and the AP 6A execute DPP-based Network Access (hereinafter simply referred to as "NA") using the printer CO and the AP CO. The NA is a process for sharing a connection key for establishing an AP connection between the printer 100 and the AP 6A.
[0042] In T62, the printer 100 and the AP 6A execute 4-way handshake communication, and as a result, an AP connection is established between the printer 100 and the AP 6A. During at least a part of the 4-way handshake communication, the printer 100 and the AP 6A communicate cryptographic information encrypted by a connection key shared in the NA of T60. If the cryptographic information is successfully decrypted, the AP connection is established. In a modified example, the printer 100 and the AP 6A may execute SAE (short for Simultaneous Authentication of Equals, commonly known as "Dragonfly") communication instead of the 4-way handshake communication.
[0043] In any of the above cases A1 to A3, when the printer 100 establishes an AP connection with the AP 6A, the printer 100 stores wireless information in the memory 34. The wireless information is information used to establish the AP connection, specifically, wireless setting information (SSID, password, etc.) in cases A1 and A2, and a printer CO and connection key in case A3.
[0044] (Explanation of each process: Figures 4 to 6) Next, the details of each process executed in T52 to T56 in Fig. 2 will be described with reference to Fig. 4 to Fig. 6. Note that the processes in T42 and T44 are similar to the processes in T52 and T54 except that AP6A is used instead of printer 100, and therefore detailed description thereof will be omitted.
[0045] (Authentication (Auth); Figure 4) The Auth process at T52 in FIG. 2 will be described with reference to FIG. 4. As described in BS at T50 in FIG. 2, the terminal 10A acquires information such as a public key from the printer 100 (T76 or T82 in FIG. 3). First, the contents of the information will be described. The memory 134 of the printer 100 stores in advance the public key PPK1 and private key psk1 of the printer 100. The memory 134 also stores a channel list CL and the MAC address "Mlan" of the Wi-Fi I / F 116. The channel list CL is a list of multiple communication channels to be used in Auth (i.e., multiple communication channels available to the printer 100).
[0046] The QR code displayed at T72 in Fig. 3 is an encoded version of the public key PPK1, the channel list CL, and the MAC address "Mlan". Therefore, the terminal 10A can obtain this information by decoding the QR code at T76. Furthermore, the NFC I / F 117 of the printer 100 prestores NFC information including the public key PPK1, the channel list CL, and the MAC address "Mlan", and transmits the NFC information to the terminal 10A at T82 in Fig. 3. Therefore, the terminal 10A can obtain this information by receiving the NFC information at T82.
[0047] When the terminal 10A executes T76 or T82 of Fig. 3, it generates a public key TPK1 and a secret key tsk1 of the terminal 10A in T100 of Fig. 4. Next, in T101, the terminal 10A generates a shared key SK1 according to ECDH (short for Elliptic curve Diffie-Hellman key exchange) using the generated secret key tsk1 and the public key PPK1 of the printer 100 acquired in T76 or T82 of Fig. 3. Then, in T102, the terminal 10A encrypts a random value RV1 using the generated shared key SK1 to generate encrypted data ED1.
[0048] In T110, the terminal 10A transmits a DPP Authentication Request (hereinafter referred to as "AReq") to the printer 100 via the Wi-Fi I / F 16, with the MAC address "Mlan" acquired in T76 or T82 of FIG. 3 as the destination. The AReq is a signal requesting the printer 100 to execute authentication. Here, the terminal 10A repeatedly transmits the AReq to the printer 100 by sequentially using a plurality of communication channels in the channel list acquired in T76 or T82 of FIG. 3. The AReq includes the public key TPK1 of the terminal 10A generated in T100, the encrypted data ED1 generated in T102, and the capability of the terminal 10A.
[0049] 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 the NA (T60 in FIG. 2) to an Enrollee in a Config (T54 in FIG. 2). An Enrollee refers to a device that receives a CO to be used in the NA from a Configurator to an Enrollee in a Config. As described above, in this embodiment, the terminal 10A generates a CO for the AP and a CO for the printer and transmits them to the AP 6A and the printer 100. Therefore, the capability of the terminal 10A includes a value indicating that the terminal 10A can operate only as a Configurator.
[0050] At T110, the printer 100 receives the AReq from the terminal 10A via the Wi-Fi I / F 116. As described above, the AReq is transmitted to the MAC address "Mlan" of the printer 100 as the transmission destination. Therefore, the printer 100 can properly receive the AReq from the terminal 10A.
[0051] In addition, the printer 100 monitors whether one of the communication channels in the channel list CL is used to receive the AReq. As described above, the AReq is transmitted by sequentially using the communication channels in the channel list CL. Therefore, the printer 100 can properly receive the AReq from the terminal 10A.
[0052] Next, the printer 100 executes the following process to authenticate the sender of the AReq (i.e., the terminal 10A). Specifically, in T112, the printer 100 generates a shared key SK1 using the public key TPK1 of the terminal 10A in the AReq and the secret key psk1 of the printer 100 in the memory 134 according to ECDH. Here, the shared key SK1 generated by the terminal 10A in T101 is the same as the shared key SK1 generated by the printer 100 in T112. Therefore, in T114, the printer 100 can appropriately decrypt the encrypted data ED1 in the AReq using the 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 a device that has acquired the public key PPK1 of the printer 100, that is, determines that the authentication has been successful, and executes the process from T116 onwards. On the other hand, if the printer 100 is not successful in decrypting the encrypted data ED1, it determines that the sender of the AReq is not the device that obtained the printer 100's public key PPK1, i.e., it determines that authentication has failed, and does not execute the processing from T116 onwards.
[0053] In T116, the printer 100 generates a new public key PPK2 and a new private key psk2 of the printer 100. In a modified example, the public key PPK2 and the private key psk2 may be stored in advance in the memory 134. Next, in T118, the printer 100 generates a shared key SK2 using the public key TPK1 of the terminal 10A in the AReq of T110 and the private key psk2 of the printer 100 that has already been generated, according to ECDH. Then, in T120, the printer 100 encrypts the acquired random value RV1 and the new random value RV2 using the shared key SK2 to generate encrypted data ED2.
[0054] In T130, the printer 100 transmits a DPP Authentication Response (hereinafter referred to as "ARes") to the terminal 10A via the Wi-Fi I / F 116. The ARes includes the public key PPK2 of the printer 100 generated in T116, the encrypted data ED2 generated in T120, and the capability of the printer 100. The capability includes a value indicating that the printer 100 can operate only as an Enrollee.
[0055] In response to receiving the ARes from the printer 100 via the Wi-Fi I / F 16 in T130, the terminal 10A executes the following process for authenticating the sender of the ARes (i.e., the printer 100). Specifically, in T132, the terminal 10A generates a shared key SK2 according to ECDH using the private key tsk1 of the terminal 10A generated in T101 and the public key PPK2 of the printer 100 in the ARes. Here, the shared key SK2 generated by the printer 100 in T118 is the same as the shared key SK2 generated by the terminal 10 in T132. Therefore, in T134, the terminal 10A can appropriately decrypt the encrypted data ED2 in the ARes using the 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 10A determines that the sender of the ARes is the device that provided the acquired public key PPK1, that is, determines that the authentication is successful, and executes the processes from T140 onward. On the other hand, if the decryption of the encrypted data ED2 is not successful, the terminal 10A determines that the sender of the ARes is not the device that provided the acquired public key PPK1, that is, determines that the authentication is unsuccessful, and does not execute the processes from T140 onward.
[0056] In T140, the terminal 10A transmits a Confirm to the printer 100 via the Wi-Fi I / F 16. The Confirm includes information indicating that the terminal 10A operates as a Configurator and the printer 100 operates as an Enrollee. As a result, in T142, the terminal 10A decides to operate as a Configurator, and in T144, the printer 100 decides to operate as an Enrollee. This ends the processing in FIG. 4.
[0057] (Configuration(Config); Figure 5) Next, the process of Config in T54 in Fig. 2 will be described with reference to Fig. 5. In T200, the printer 100 transmits a DPP Configuration Request (hereinafter referred to as "CReq") to the terminal 10A via the Wi-Fi I / F 116. The CReq is a signal requesting transmission of a CO for the printer.
[0058] In T200, the terminal 10A receives CReq from the printer 100 via the Wi-Fi I / F 16. In this case, in T201, the terminal 10A acquires the group ID "gr1", the public key TPK2, and the private key tsk2 from the memory 34. As described above, the terminal 10A has already executed Config in T44 of FIG. 2 with the AP 6A, and at this time, the terminal 10A generates the public key TPK2 and the private key tsk2 of the terminal 10A and stores them in the memory 34. In T201, the terminal 10A acquires each piece of information stored in T44 of FIG. 2. The group ID "gr1" is information for identifying a wireless network formed by establishing an AP connection between the printer 100 and the AP 6A.
[0059] Next, the terminal 10A generates a printer CO in T202. Specifically, the terminal 10A hashes the public key TPK2 of the terminal 10A acquired in T201 to generate a hash value HV. The terminal 10A also hashes a combination of the hash value HV, the group ID "gr1", and the public key PPK2 of the printer 100 in the ARes of T130 in FIG. 4 to generate a specific value. The terminal 10A then generates an electronic signature DSpr1 by encrypting the generated specific value using the private key tsk2 of the terminal 10A acquired in T201 according to ECDSA (short for Elliptic Curve Digital Signature Algorithm). As a result, the terminal 10A can generate a printer Signed-Connector (hereinafter, the Signed-Connector is referred to as "SC") including the hash value HV, the group ID "gr1", the public key PPK2 of the printer 100, and the electronic signature DSpr1. Then, the terminal 10A generates a printer CO that includes the printer SC and the public key TPK2 of the terminal 10A.
[0060] In T210, the terminal 10A transmits a DPP Configuration Response (hereinafter referred to as “CRes”) including a CO for the printer to the printer 100 via the Wi-Fi I / F 16.
[0061] In T210, the printer 100 receives CRes from the terminal 10A via the Wi-Fi I / F 116. In this case, in T212, the printer 100 stores the printer CO in the CRes in the memory 134. This ends the processing in FIG.
[0062] (Network Access (NA); Figure 6) Next, the NA process of T60 in FIG. 2 executed between the printer 100 and the AP 6A will be described with reference to FIG. 6. The AP 6A stores the public key APK1 and the secret key ask1 of the AP 6A in advance. A QR code obtained by encoding the public key APK1 of the AP 6A, the channel list of the AP 6A, and the MAC address "Mapa" of the AP 6A is attached to the housing of the AP 6A. When the terminal 10A photographs the QR code at T40 in FIG. 2, each process similar to each process after T101 in FIG. 4 is executed between the terminal 10A and the AP 6A. As a result, the AP 6A stores the public key APK2 and the secret key ask2 of the AP 6A (see T116 in FIG. 4), and further stores the CO for AP received from the terminal 10A (see T212 in FIG. 5). The CO for AP includes the SC for AP and the public key TPK2 of the terminal 10A. 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 "gr1", a public key APK2 of the AP6A, and an electronic signature DSap. The hash value HV and the group ID "gr1" are the same as the hash value HV and the group ID "gr1" 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 "gr1", and the public key APK2, and encrypting the specific value with the private key tsk2 of the terminal 10A, and is different from the electronic signature DSpr1 included in the CO for the printer.
[0063] In T310, the printer 100 transmits a DPP Peer Discovery Request (hereinafter, referred to as "DReq") including an SC for the printer to the AP 6A via the Wi-Fi I / F 116. The DReq is a signal requesting the execution of authentication and the transmission of an SC for the AP.
[0064] In response to receiving the DReq from the printer 100, the AP 6A 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, "gr1", and the public key PPK2) in T310. Specifically, the AP 6A first executes a first AP determination process regarding whether or not the hash values HV and "gr1" in the SC for the printer match the hash values HV and "gr1" in the SC for the AP included in the CO for the AP. In the case of FIG. 6, the AP 6A 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 fact that the hash value HV in the SC for the printer matches the hash value HV in the SC for the AP means that the SC for the printer and the SC for the AP were generated by the same device (i.e., the terminal 10A). Therefore, the AP 6A also determines that the authentication of the sender of the SC for the printer (i.e., the terminal 10A) has been successful. Furthermore, in T312, the AP6A decrypts the electronic signature DSpr1 in the SC for the printer using the public key TPK2 of the terminal 10A included in the CO for the AP. In the case of FIG. 6, the decryption of the electronic signature DSpr1 is successful, so the AP6A executes a second AP determination process regarding whether or not a specific value obtained by decrypting the electronic signature DSpr1 matches a value obtained by hashing each piece of information in the SC for the printer (i.e., the hash value HV, "gr1", and the public key PPK2). In the case of FIG. 6, the AP6A determines that the second AP determination process "matches", so determines that the authentication of each piece of information in the DReq has been successful, and executes the process from T314 onwards. The determination that the second AP determination process "matches" means that each piece of information in the SC for the printer (i.e., the hash value HV, "gr1", and the public key PPK2) has not been tampered with by a third party after the CO for the printer is stored in the printer 100. On the other hand, if the first AP judgment process determines that there is no match, if the decryption of the electronic signature DSpr1 fails, or if the second AP judgment process determines that there is no match, AP6A determines that the authentication has failed and does not execute processing after T314.
[0065] Next, in T314, the AP6A generates a connection key (ie, a shared key) CK using the public key PPK2 of the printer 100 in the printer SC and the secret key ask2 of the AP6 according to ECDH.
[0066] In T320, the AP 6A transmits a DPP Peer Discovery Response (hereinafter, abbreviated as “DRes”) including an SC for the AP to the printer 100.
[0067] In response to receiving the DRes from the AP 6A via the Wi-Fi I / F 116, the printer 100 executes a process for authenticating the sender of the DRes (i.e., the AP 6A) and each piece of information in the DRes (i.e., the hash value HV, “gr1”, and the public key APK2). Specifically, the printer 100 first executes a first PR determination process regarding whether the hash values HV and “gr1” in the SC for the AP match the hash values HV and “gr1” in the SC for the printer included in the CO for the printer, respectively. 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 AP 6A) has been successful, and also determines that the authentication of the generator of the SC for the AP (i.e., the terminal 10A) has been successful. Furthermore, in T322, the printer 100 decrypts the electronic signature DSap in the SC for the AP using the public key TPK2 of the terminal 10A included in the CO for the 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 to determine 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 SC for AP (i.e., the hash value HV, "gr1", and the public key APK2). In the case of FIG. 6, the printer 100 determines that there is a "match" in the second PR determination process, so determines that authentication of each piece of information in the DRes has been successful, and executes the processes from T324 onward. The determination that there is a "match" in the second PR determination process means that the information in the SC for AP (i.e., the hash value HV, "gr1", and the public key APK2) has not been tampered with by a third party after the CO for AP was stored in the AP6A. 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 processing after T324.
[0068] In T324, the printer 100 generates a connection key CK using the private key psk2 of the printer 100 and the public key APK2 of the AP 6A in the SC for AP according to ECDH. Here, the connection key CK generated by the AP 6A in T314 and the connection key CK generated by the printer 100 in T324 are the same. As a result, the connection key CK for establishing an AP connection is shared between the printer 100 and the AP 6A. When T324 ends, the processing in FIG. 6 ends.
[0069] As described above, after the connection key CK is shared between the printer 100 and the AP 6A, at T62 in Fig. 2, the printer 100 and the AP 6A use the connection key CK to execute 4-way handshake communication. As a result, an AP connection is established between the printer 100 and the AP 6A. That is, the printer 100 can participate as a child station in a wireless network in which the AP 6A is the parent station, and can communicate with other child stations participating in the wireless network via the AP 6A.
[0070] (Normal connection process; Figure 7) Next, the contents of the normal connection process executed by the CPU 132 of the printer 100 in accordance with the program 136 will be described with reference to Fig. 7. The normal connection process starts when the printer 100 is turned on. This process is repeatedly executed while the printer 100 is turned on. In the following, the AP to which a new AP connection should be established with the printer 100 is referred to as the "target AP".
[0071] In S5, the CPU 132 monitors whether "Manual Connection" or "WPS Connection" is selected in the selection screen of T14 in Fig. 2. If "Manual Connection" or "WPS Connection" is selected (see T20 or T30 in Fig. 2), the CPU 132 determines YES in S5 and proceeds to S10. If the CPU 132 determines NO in S5, the CPU 132 ends the processing in Fig. 7.
[0072] In S10, the CPU 132 judges whether an AP connection is currently established. Specifically, if the CPU 132 has previously established an AP connection with a certain AP by any of the methods of cases A1 to A3 in FIG. 2 (i.e., wireless information has already been stored in the memory 134) and has not detected disconnection of the AP connection, the CPU 132 judges YES in S10 and proceeds to S20. Hereinafter, the certain AP is referred to as the "current AP." On the other hand, if the CPU 132 has never established an AP connection in the past (i.e., wireless information has not been stored in the memory 134), or if the CPU 132 has previously established an AP connection but has detected disconnection of the AP connection, the CPU 132 judges NO in S10 and proceeds to S30.
[0073] In S20, the CPU 132 displays an instruction screen for the user to instruct the printer 100 to disconnect the AP connection on the display unit 114. The instruction screen includes a message indicating that the connection is being established, an OK button, and a Cancel button.
[0074] In S22, the CPU 132 judges whether or not the OK button in the instruction screen has been selected by the user. If the OK button has been selected, the CPU 132 judges YES in S22 and proceeds to S24. On the other hand, if the Cancel button has been selected, the CPU 132 judges NO in S22 and ends the processing in FIG.
[0075] In S24, the CPU 132 disconnects the AP connection with the current AP. Specifically, the CPU 132 transmits a disconnection request to the current AP via the Wi-Fi I / F 116 and receives a response from the current AP via the Wi-Fi I / F 116. This disconnects the AP connection with the current AP. As described above, the Wi-Fi I / F 116 of the printer 100 cannot simultaneously establish multiple AP connections with multiple APs. For this reason, if the CPU 132 disconnects the AP connection with the current AP (e.g., 6A) in S24, it can properly establish an AP connection with the target AP (e.g., 6B) in S30 described later.
[0076] In S30, the CPU 132 executes an establishment process for establishing an AP connection with the target AP. In case A1 in Fig. 2 where "Manual Connection" is selected in the selection screen, the CPU 132 establishes the AP connection using wireless setting information (SSID, password, etc.) input by the user. In case A2 in Fig. 2 where "WPS Connection" is selected in the selection screen, the CPU 132 establishes the AP connection using wireless setting information received from the target AP.
[0077] In S32, the CPU 132 judges whether the establishment of the AP connection has been successful. In case A1 in Fig. 2, for example, if the user inputs incorrect wireless setting information, the establishment of the AP connection fails. Also, in case A2 in Fig. 2, for example, if the user does not perform a PBC operation on the target AP, the establishment of the AP connection fails. If the establishment of the AP connection is successful, the CPU 132 judges YES in S32 and proceeds to S34, and if the establishment of the AP connection fails, the CPU 132 judges NO in S32 and proceeds to S36.
[0078] In S34, CPU 132 stores new wireless information in memory 134. In case A1, the new wireless information is wireless setting information input by the user, and in case A2, the new wireless information is wireless setting information received from the AP. Furthermore, if old wireless information is stored in memory 134, CPU 132 deletes the old wireless information from memory 134. When S34 ends, the processing in FIG. 7 ends.
[0079] In S36, if the CPU 132 disconnected the AP connection with the current AP in S24, it re-establishes the AP connection with the current AP by using the wireless information in the memory 134 that was used to establish the AP connection. This allows the printer 100 to return to the state before the AP connection with the current AP was disconnected in S24. Note that if the CPU 132 did not disconnect the AP connection in S24, it ends the processing in FIG. 7 without executing S36.
[0080] (DPP connection process; Figure 8) Next, the contents of the DPP connection processing executed by the CPU 132 of the printer 100 in accordance with the program 136 will be described with reference to Fig. 8. The DPP connection processing starts when the power of the printer 100 is turned on. This processing is executed repeatedly while the power of the printer 100 is turned on. The processing of Fig. 8 is executed in parallel with the processing of Fig. 7.
[0081] In S105, CPU 132 monitors whether "DPP Connection" is selected in the selection screen of T14 in Fig. 2. If "DPP Connection" is selected (see T70 in Fig. 3), CPU 132 determines YES in S105 and proceeds to S110. S110 to S124 are the same as S10 to S24 in Fig. 7.
[0082] In S130, the CPU 132 transitions the operation state of the printer 100 from the impossible state to the possible state. The impossible state is a state in which the Wi-Fi I / F 116 does not transmit an ARes (see T130) even when it receives an AReq (see T110 in FIG. 4) from the outside. The possible state is a state in which the Wi-Fi I / F 116 transmits an ARes in response to receiving an AReq from the outside. That is, the printer 100 transitions from the impossible state to the possible state, thereby becoming a state in which Auth (see FIG. 4) can be executed. Specifically, in this embodiment, the impossible state is a state in which the Wi-Fi I / F 116 does not supply a signal to the CPU 132 even when it receives a signal from the outside. Also, the possible state is a state in which the Wi-Fi I / F 116 supplies the signal to the CPU 132 in response to receiving a signal from the outside and transmits a response to the signal. The possible state is a state in which the CPU 132 processes a signal received from the outside, and therefore has a higher processing load than the impossible state.
[0083] In a modified example, the impossible state may be a state in which power is not applied to the Wi-Fi I / F 116, and the possible state may be a state in which power is applied to the Wi-Fi I / F 116. In another modified example, the impossible state may be a state in which the Wi-Fi I / F 116 does not supply a notification indicating that the AReq has been received to the CPU 132 even when the Wi-Fi I / F 116 receives an AReq from an external device, and the possible state may be a state in which the Wi-Fi I / F 116 supplies a notification indicating that the AReq has been received to the CPU 132 in response to receiving an AReq from an external device.
[0084] In S132, the CPU 132 displays a screen including a QR code on the display unit 114 (see T72 in FIG. 3). When S132 ends, the process proceeds to S140.
[0085] Furthermore, in S205, CPU 132 monitors whether an NFC connection with terminal 10A is established. CPU 132 repeatedly executes the determinations of S105 and S205. When CPU 132 acquires a notification indicating establishment of an NFC connection from NFC I / F 117 (see case A3-1 in FIG. 3), CPU 132 determines YES in S205 and proceeds to S210. S210 to S230 are the same as S110 to S130. When S230 ends, CPU 132 proceeds to S140.
[0086] In S140, the CPU 132 monitors whether an AReq is received from the terminal 10A. When the CPU 132 receives an AReq from the terminal 10A via the Wi-Fi I / F 116 (see T110 in FIG. 4), the CPU 132 determines YES in S140 and proceeds to S150. On the other hand, when the CPU 132 does not receive an AReq from the terminal 10A even after a predetermined time has elapsed since the end of S132 or S230, the CPU 132 determines NO in S140 and proceeds to S156. S156 is the same as S36 in FIG. 7.
[0087] In S150, the CPU 132 executes an establishment process for establishing an AP connection with the target AP. Specifically, the CPU 132 executes processes similar to T112 to T130, T140, and T144 in Fig. 4, T200, T210, and T212 in Fig. 5, T310, T320 to T324 in Fig. 6, and T62 in Fig. 2.
[0088] Here, the printer of the comparative example is assumed below. When the printer of the comparative example judges YES in S122 or YES in S222, it does not disconnect the AP connection with the current AP (i.e., does not execute S124 or S224) and transitions to the available state (i.e., executes S130 or S230). Since the printer transitions to the available state, when it receives AReq from the terminal 10A, it transmits ARes to the terminal 10A. Then, in the processes of Auth, Config, and NA, the printer executes communication according to the DPP method (hereinafter referred to as "DPP communication") with the terminal 10A or the target AP, and then terminates the AP connection with the current AP and establishes an AP connection with the target AP. In this case, the printer must execute DPP communication in a state where the AP connection with the current AP is established. In a state where the AP connection with the current AP is established, the printer has a large processing load and a communication load compared to a state where the AP connection with the AP is not established. For this reason, the printer may not be able to execute DPP communication appropriately. That is, the printer of the comparative example may not be able to establish an AP connection with the target AP.
[0089] In contrast, the printer 100 of this embodiment transitions to the possible state (S130, S230) after disconnecting the AP connection with the current AP (i.e., after executing S124 or S224). As a result, the printer 100 does not need to perform DPP communication while the AP connection with the current AP is established, and can properly perform DPP communication. As a result, the printer 100 can properly establish an AP connection with the target AP.
[0090] In S152, the CPU 132 judges whether the establishment of the AP connection has been successful. For example, if the power supply of the target AP is turned off before the establishment process of S150 is completed, the establishment of the AP connection fails. If the establishment of the AP connection is successful, the CPU 132 judges YES in S152 and proceeds to S154, and if the establishment of the AP connection fails, the CPU 132 judges NO in S152 and proceeds to S156.
[0091] In S154, CPU 132 stores new wireless information including the printer CO received from terminal 10A in Config in S150 (see T212 in FIG. 5) and the connection key generated in NA in S150 (see T324 in FIG. 6) in memory 134. Furthermore, if old wireless information is stored in memory 134, CPU 132 deletes the old wireless information from memory 134. When S154 ends, the processing in FIG. 8 ends.
[0092] (Specific case; Figure 9) Next, a specific case B realized in this embodiment will be described with reference to Fig. 9. In the initial state of case B, any one of cases A1 to A3 in Fig. 2 has been executed, and an AP connection has been established between the printer 100 and AP 6A. Then, the administrator (i.e., the user) of the communication system 2 establishes an AP connection between the printer 100 and AP 6B, instead of the AP connection between the printer 100 and AP 6A.
[0093] T400 to T404 are the same as T40 to T44 in FIG. 2, except that AP6B is used. However, in T400, the terminal 10A photographs a QR code obtained by encoding the public key of AP6B, the channel list of AP6B, and the MAC address "Mapb" of AP6B. Also, for example, in a situation where an AP connection is established between the printer 100 and AP6A as a result of execution of case A3 in FIG. 2, the AP SC in the AP CO for AP6A includes the group ID "gr1" (see the initial state of AP6A in FIG. 6). In contrast, the AP SC in the AP CO for AP6B generated by the terminal 10A in T404 includes the group ID "gr2" different from the group ID "gr1". The AP SC for AP6B further includes a hash value HV, a public key of AP6B different from the public key APK2 of AP6A, and an electronic signature different from the electronic signature DSap. Also, the AP CO for AP 6B includes the public key TPK3 of the terminal 10A, which is different from the public keys TPK1 and TPK2. After that, either Case B1 or Case B2 is executed.
[0094] (Case B1) In case B1, the printer 100 accepts the selection of "DPP connection" in the selection screen from the user in T410 (YES in S105 of FIG. 8). In this case, the printer 100 displays the instruction screen in T420 (YES in S110, S120), and accepts the selection of the OK button in the instruction screen from the user in T422 (YES in S122). As a result, the printer 100 sends a disconnection request to the AP 6A in T430, and disconnects the AP connection with the AP 6A in T432 (S124).
[0095] After that, the printer 100 transitions to the enabled state in T434 (S130), and displays the QR code in T440 (S132). Then, T444 and T446 are executed in the same manner as T74 and T76 in FIG. 3, and the public key PPK1 and the like are acquired by the terminal 10A.
[0096] (Case B2) In case B2, the printer 100 receives a Read command from the terminal 10A using the NFC connection in T451, as a result of the terminal 10A being brought closer to the printer 100 in T450. In this case, the printer 100 transmits NFC information including the public key PPK1 etc. to the terminal 10A in T452. As a result, the public key PPK1 etc. are acquired by the terminal 10A. T460 to T474 are the same as T420 to T434.
[0097] (Continuation of Cases B1 and B2) T480 to T484 executed following cases B1 and B2 are similar to T52 to T60 in FIG. 2, except that AP6B is used. As described above, the printer SC in the printer CO generated by the terminal 10A in T202 in FIG. 5 includes the group ID "gr1". In contrast, the printer SC in the printer CO generated by the terminal 10A in T482 includes the group ID "gr2" different from the group ID "gr1". For this reason, the printer SC in T482 includes an electronic signature DSpr2 different from the electronic signature DSpr1 generated by the terminal 10A in T202 in FIG. 5. In addition, the printer CO generated by the terminal 10A in T482 includes the public key TPK3 of the terminal 10A.
[0098] Next, the printer 100 establishes an AP connection with the AP 6B in T486. As a result, the printer 100 can establish an AP connection with the AP 6B instead of the AP connection with the AP 6A, and participate as a child station in the wireless network formed by the AP 6B. Note that the printer 100 receives an AReq from the terminal 10A in T480 using one of the communication channels included in the channel list CL of the printer 100 (see T110 in FIG. 4). That is, the printer 100 receives an AReq from the terminal 10A using a communication channel available to both the printer 100 and the terminal 10A. On the other hand, in T486 in FIG. 9, the printer 100 establishes an AP connection with the AP 6B using a communication channel available to both the printer 100 and the AP 6B. Here, the communication channel available to the terminal 10A may differ from the communication channel available to the AP 6B. In this embodiment, the communication channel through which the printer 100 receives the AReq from the terminal 10A at T480 is different from the communication channel through which the printer 100 establishes an AP connection with the AP 6B at T486. However, in a modified example, the former communication channel and the latter communication channel may be the same.
[0099] (Effects of this embodiment) According to this embodiment, after the printer 100 receives an instruction (T410, T451 in FIG. 9) to output the QR code or NFC information obtained by using the public key PPK1 in a state where the AP connection is established between the printer 100 and the AP 6A, the printer 100 disconnects the AP connection (T432, T472). Therefore, it is possible to prevent an event that a new AP connection cannot be established due to the establishment of the AP connection. The printer 100 also receives an AReq using the public key PPK1 from the terminal 10A (T480), transmits an ARes response to the terminal 10A (T480), and receives a printer CO from the terminal 10A (T482). Then, the printer 100 can appropriately establish an AP connection between the printer 100 and the AP 6B by using the printer CO (T484, T486).
[0100] (Correspondence) The printer 100, the terminal 10A, the AP 6A, and the AP 6B are examples of a "communication device," a "terminal device," a "first external device," and a "second external device (and parent station device)," respectively. The Wi-Fi I / F 116 and the NFC I / F 117 are examples of a "first wireless interface" and a "second wireless interface," respectively. The display unit 114 and the NFC I / F 117 are examples of an "output unit." The instruction of T70 and the Read command of T81 in FIG. 3 are examples of an "output instruction." In FIG. 9, the AP connection between the printer 100 and the AP 6A and the AP connection between the printer 100 and the AP 6B are examples of a "first wireless connection" and a "second wireless connection," respectively. The public key PPK1 of the printer 100 is an example of a "public key," and the QR code and NFC information of the printer 100 are examples of "specific information." AReq, ARes, and the CO for the printer received from terminal 10A at T482 in Fig. 9 are examples of "authentication request," "authentication response," and "connection information," respectively. The channel list CL, the communication channel used at T480 in Fig. 9, and the communication channel used at T486 are examples of "communication channel information," "first communication channel," and "second communication channel," respectively. The SC for the AP received from AP6B at T484 (i.e., the SC for the AP generated by terminal 10A at T404), and the hash value HV in the SC for the printer generated by terminal 10A at T482 are examples of "received information" and "authentication information," respectively.
[0101] T480 in Fig. 9 is an example of a process executed by the "authentication request receiving unit" and the "authentication response transmitting unit". T434 (and T474), T482, and T486 are examples of a process executed by the "state transition unit", "connection information receiving unit", and "first establishing unit", respectively. Also, S120 (and S220), S124 (and S224), S154, and S156 in Fig. 8 are examples of a process executed by the "second display control unit", "disconnection unit", "deletion unit", and "second establishing unit", respectively.
[0102] (Second Example) In the second embodiment, the Wi-Fi I / F 116 of the printer 100 supports the WFD (short for Wi-Fi Direct (registered trademark)) method established by the Wi-Fi Alliance. The Wi-Fi I / F 16 of each of the terminals 10A and 10B also supports the WFD method. The WFD method is a wireless communication method described in the specification "Wi-Fi Peer-to-Peer (P2P) Technical Specification Version 1.1" created by the Wi-Fi Alliance. The WFD standard defines three states for a WFD device that supports the WFD method: Group Owner state (hereinafter referred to as "G / O state"), client state, and device state. A WFD device can selectively operate in one of the above three states.
[0103] The Wi-Fi I / F 116 has a MAC address "Mwfd" that is different from the MAC address "Mlan". In this embodiment, it is not assumed that the Wi-Fi I / F 116 will establish an AP connection, and a Wi-Fi connection according to the WFD method (hereinafter referred to as a "WFD connection") is established with a terminal (e.g., 10A). The Wi-Fi I / F 116 has only one MAC address "Mwfd", and can only establish a WFD connection with one terminal (e.g., 10A) using that MAC address. In other words, the Wi-Fi I / F 116 cannot simultaneously establish multiple WFD connections with multiple terminals.
[0104] (WFD connection between printer 100 and terminal 10B; FIG. 10) In this embodiment, it is assumed that users of a plurality of terminals 10A and 10B share the printer 100. The process for establishing a WFD connection between the printer 100 and the terminal 10B will be described with reference to Fig. 10.
[0105] When the printer 100 is turned on, in T510, the home screen is displayed on the display unit 114. The home screen includes the character string "Print Settings" and the character string "WFD Settings".
[0106] When printer 100 accepts a selection of "WFD Settings" on the home screen from the user in T512, printer 100 displays a selection screen on display unit 114 in T514. The selection screen includes the character strings "WPS Connection" and "DPP Connection." "WPS Connection" is a method for establishing a WFD connection in accordance with WPS in response to operating a specific button on a terminal (e.g., 10B) (i.e., executing a PBC operation). "DPP Connection" is a method for establishing a WFD connection in accordance with DPP in response to using a terminal.
[0107] (Case C1) In case C1, the printer 100 accepts the selection of "WPS connection" in the selection screen from the user in T520. Then, when the PBC operation is executed on the terminal 10B in T522, the printer 100 executes communication of various signals with the terminal 10B in T524 to establish a WFD connection with the terminal 10B. The various signals include, for example, Probe, G / O negotiation (hereinafter referred to as "G / O negotiation"), Discovery, WPS negotiation, Authentication, Association, 4way-handshake, and the like. As a result, a wireless network is formed in which one of the printer 100 and the terminal 10B operates in a G / O state and the other operates in a client state, and the printer 100 can execute communication with the terminal 10B using the wireless network.
[0108] (Case C2) In case C2, after receiving an instruction from the user to start the application 38, the terminal 10B executes a DPP-based BS with the printer 100 at T530. As the BS, two cases C2-1 and C2-2 are considered. T550 to T556 in case C2-1 in FIG. 11 are similar to T70 to T76 in FIG. 3, except that a QR code in which the MAC address "Mwfd" is encoded is used instead of the MAC address "Mlan". T560 to T562 in case C2-2 are similar to T80 to T82 in FIG. 3, except that the MAC address "Mwfd" is transmitted. In both cases, the terminal 10B acquires the public key PPK1, the channel list CL, and the MAC address "Mwfd" of the printer 100.
[0109] Next, the printer 100 receives a Probe Request from the terminal 10B via the Wi-Fi I / F 116 at T532 in FIG. 10, and transmits a Probe Response including the MAC address "Mwfd" to the terminal 10B via the Wi-Fi I / F 116 at T534.
[0110] Since terminal 10B has already acquired MAC address "Mwfd" at BS of T530, when terminal 10B receives a signal including MAC address "Mwfd" at T534, terminal 10B knows that the sender of the signal is the device to be connected. Then, in the subsequent processing, terminal 10B sends various signals to printer 100 with MAC address "Mwfd" as the destination.
[0111] In T536, the printer 100 executes G / O negotiation with the terminal 10B to determine whether it should operate in a G / O state or a client state. The Auth of T540 and the Config of T542 executed thereafter are the same as T52 and T54 in FIG. 2. As a result, the printer CO is stored in the printer 100. The printer CO includes the printer SC and the public key of the terminal 10B. The printer SC includes a hash value HV' obtained by hashing the public key of the terminal 10B, the group ID "gr3", the public key "PPK2" of the printer 100, and the electronic signature DSpr2.
[0112] 2, except that the NA of T544 is executed by the terminal 10B instead of the AP6A. However, in the NA of T544, the terminal 10B generates a terminal CO, which is a CO for the terminal 10B, and executes the NA, authentication of the printer 100, and generation of a connection key using the terminal CO. The terminal CO includes a terminal SC and the public key of the terminal 10B. The terminal SC includes a hash value HV', a group ID "gr3", the public key of the terminal 10B, and a digital signature DStb.
[0113] In T546, the printer 100 uses the connection key shared in T544 to establish a WFD connection between the printer 100 and the terminal 10B. In either of the above cases C1 to C2, when the printer 100 establishes a WFD connection, it stores wireless information in the memory 34. The wireless information is wireless setting information (SSID, password, etc.) in case C1, and is a printer CO and a connection key in case C2.
[0114] Here, the processing of Fig. 7 and Fig. 8 of this embodiment will be described. Each processing of Fig. 7 and Fig. 8 is similar to that of the first embodiment, except that a WFD connection is used instead of an AP connection, and a MAC address "Mwfd" is used instead of a MAC address "Mlan". As described above, the Wi-Fi I / F 116 of the printer 100 cannot simultaneously establish multiple WFD connections with multiple terminals. For this reason, if the CPU 132 disconnects the WFD connection with the first terminal (e.g., 10B) in S24 of Fig. 7, S124 of Fig. 8, or S224, it can appropriately establish a WFD connection with the second terminal (e.g., 10A) in S30 of Fig. 7 or S150 of Fig. 8.
[0115] (WFD connection between printer 100 and terminal 10A; FIG. 12) Next, a specific case D realized in the present embodiment in Fig. 7 and Fig. 8 will be described with reference to Fig. 12. Case D is a continuation of Fig. 10, and a WFD connection is established between the printer 100 and the terminal 10B (T524, T546 in Fig. 10). Then, either case D1 or case D2 is executed.
[0116] T610 to T646 in case D1 are similar to T410 to T446 in Fig. 9 (YES in S105, S110 to S132 in Fig. 8) except that the WFD connection with the terminal 10B is disconnected. Also, T650 to T674 in case D2 are similar to T450 to T474 in Fig. 9 (YES in S205, S210 to S230 in Fig. 8) except that the WFD connection with the terminal 10B is disconnected.
[0117] Continuations of cases D1 and D2, T682 to T696, are similar to T532 to T546 in Fig. 10, except that the terminal 10A is the execution subject. The printer CO generated by the terminal 10A in T692 is the same as the printer CO generated in T202 in Fig. 5. The terminal CO generated by the terminal 10A in T694 includes a terminal SC and the public key TPK2 of the terminal 10A. The terminal SC includes a hash value HV, a group ID "gr1", a public key "TPK2" of the terminal 10A, and a digital signature DStata.
[0118] (Effects of this embodiment) According to this embodiment, after the printer 100 receives an instruction (T610, T651 in FIG. 12) to output a QR code obtained by using the public key PPK1 in a state where a WFD connection is established between the printer 100 and the terminal 10B, the printer 100 disconnects the WFD connection (T632, T672). This can prevent an event from occurring in which a new WFD connection cannot be established due to the WFD connection being established. The printer 100 also receives an AReq using the public key PPK1 from the terminal 10A (T690), transmits an ARes response to the terminal 10A (T690), and receives a printer CO from the terminal 10A (T692). The printer 100 can then use the printer CO to appropriately establish a WFD connection between the printer 100 and the terminal 10A (T694, T696).
[0119] (Correspondence) The terminal 10B is an example of a “first external device”, and the terminal 10A is an example of a “terminal device” and a “second external device”. In Fig. 12, the WFD connection between the printer 100 and the terminal 10B and the WFD connection between the printer 100 and the terminal 10A are examples of a “first wireless connection” and a “second wireless connection”, respectively.
[0120] (Third Example) In the third embodiment, the printer 100 does not include the NFC I / F 117. The Wi-Fi I / F 116 has both the MAC address "Mlan" used to establish an AP connection and the MAC address "Mwfd" used to establish a WFD connection. Therefore, the Wi-Fi I / F 116 can simultaneously establish both an AP connection using the MAC address "Mlan" and a WFD connection using the MAC address "Mwfd". However, similar to the first and second embodiments, the Wi-Fi I / F 116 cannot simultaneously establish multiple AP connections and cannot simultaneously establish multiple WFD connections.
[0121] (Screen images displayed on the printer 100; Fig. 13) 13, the home screen of this embodiment includes the character strings "Print Settings", "Wireless LAN Settings", and "WFD Settings". When "Wireless LAN Settings" is selected on the home screen, printer 100 displays a wireless LAN selection screen, and when "WFD Settings" is selected on the home screen, printer 100 displays a WFD selection screen. The wireless LAN selection screen and the WFD selection screen are similar to the selection screens T14 in FIG. 2 and T514 in FIG. 10, respectively.
[0122] (Normal connection process; Figure 14) In this embodiment, the normal connection process of Fig. 14 is executed instead of the normal connection process of Fig. 7. This process is executed repeatedly while the power of the printer 100 is ON.
[0123] In S5A, the CPU 132 monitors whether "Manual Connection" or "WPS Connection" is selected in the wireless LAN selection screen. If the CPU 132 determines YES in S5A, the CPU 132 determines whether or not an AP connection is currently established in S10A. If the CPU 132 determines YES in S10A, the CPU 132 executes the same processes as S20 and S22 in FIG. 7, and disconnects the AP connection in S24A. Thereafter, the CPU 132 executes the same processes as S30 to S36 in FIG. 7. On the other hand, if the CPU 132 determines NO in S10A, the CPU 132 skips S20 to S24A and executes the same processes as S30 to S36. Here, in S30, the CPU 132 establishes an AP connection using the MAC address "Mlan".
[0124] In S5B, the CPU 132 monitors whether or not "WPS connection" is selected in the WFD selection screen. The CPU 132 repeatedly executes the determinations of S5A and S5B. When the CPU 132 determines YES in S5B, the CPU 132 determines whether or not a WFD connection is currently established in S10B. When the CPU 132 determines YES in S10B, the CPU 132 executes the same processes as S20 and S22 in FIG. 7, and disconnects the WFD connection in S24B. The CPU 132 then executes the same processes as S30 to S36 in FIG. 7. On the other hand, when the CPU 132 determines NO in S10B, the CPU 132 skips S20 to S24 and executes the same processes as S30 to S36. Here, in S30, the CPU 132 establishes a WFD connection using the MAC address "Mwfd".
[0125] (DPP connection process; Figure 15) In this embodiment, the DPP connection process of Fig. 15 is executed instead of the DPP connection process of Fig. 8. This process is executed repeatedly while the power of the printer 100 is ON. Also, the process of Fig. 15 is executed in parallel with the process of Fig. 14.
[0126] In S105A, the CPU 132 monitors whether or not "DPP connection" is selected in the wireless LAN selection screen. If the CPU 132 judges YES in S105A, the CPU 132 judges whether or not an AP connection is currently established in S110A. If the CPU 132 judges YES in S110A, the CPU 132 executes the same processes as S120 and S122 in FIG. 8, and disconnects the AP connection in S124A. Thereafter, in S130A, the CPU 132 transitions from the impossible state to the possible state. On the other hand, if the CPU 132 judges NO in S110A, the CPU 132 skips S120 to S124A and proceeds to S130A. Thereafter, in S132A, the CPU 132 displays a QR code obtained by encoding the public key PPK1, the channel list CL, and the MAC address "Mlan". Then, the CPU 132 executes the same processes as S140 to S156.
[0127] In S105B, the CPU 132 monitors whether or not "DPP connection" is selected in the WFD selection screen. The CPU 132 repeatedly executes the determinations of S105A and S105B. When the CPU 132 determines YES in S105B, the CPU 132 determines whether or not a WFD connection is currently established in S110B. When the CPU 132 determines YES in S110B, the CPU 132 executes the same processes as S120 and S122 in FIG. 8, and disconnects the WFD connection in S124B. Thereafter, in S130B, the CPU 132 transitions from an impossible state to an possible state. On the other hand, when the CPU 132 determines NO in S110B, the CPU 132 skips S120 to S124B and proceeds to S130B. Thereafter, in S132B, the CPU 132 displays a QR code obtained by encoding the public key PPK1, the channel list CL, and the MAC address "Mwfd". That is, the QR code displayed in S132B is different from the QR code displayed in S132A. Then, the CPU 132 executes the same processes as those in S140 to S156.
[0128] (Effects of this embodiment) When the printer 100 receives an instruction to establish a second AP connection while the first AP connection is currently established (YES in S5A, YES in S10A in FIG. 14, YES in S105A, YES in S110A in FIG. 15), the printer 100 disconnects the first AP connection (S24A, S124A), and can appropriately establish the second AP connection. Also, when the printer 100 receives an instruction to establish a second WFD connection while the first WFD connection is currently established (YES in S5B, YES in S10B, YES in S105B, YES in S110B), the printer 100 disconnects the first WFD connection (S24B, S124B), and can appropriately establish the second WFD connection. However, when an AP connection is currently established and an instruction to establish a WFD connection is received (YES in S5B, NO in S10B, YES in S105B, NO in S110B), the printer 100 does not disconnect the AP connection. Also, when an instruction to establish an AP connection is received (YES in S5A, NO in S10A, YES in S105A, NO in S110A) and an AP connection is currently established, the printer 100 does not disconnect the WFD connection. Because the printer 100 does not disconnect the AP connection or WFD connection in such a situation, it can properly execute communication using that connection.
[0129] (Correspondence) The MAC addresses "Mlan" and "Mwfd" are examples of a "first MAC address" and a "second MAC address", respectively. AP connection and WFD connection are examples of a "first type of wireless connection" and a "second type of wireless connection", respectively. "Wireless LAN settings" and "WFD settings" in the home screen are examples of a "first type of selection area" and a "second type of selection area", respectively. The three screens in FIG. 13 (i.e., the home screen, the wireless LAN selection screen, and the WFD selection screen) are examples of "one or more selection screens".
[0130] Although specific examples of the present invention have been described above in detail, these are merely examples and do not limit the scope of the claims. The technology described in the claims includes various modifications and alterations of the specific examples exemplified above. Modifications of the above-mentioned embodiments are listed below.
[0131] (Variation 1) The QR code displayed on the printer 100 does not have to be an encoded version of the channel list CL and the MAC address. In other words, the QR code only needs to be a code image obtained by encoding at least the public key PPK1. Furthermore, the NFC information of T452 does not have to include the channel list CL and the MAC address. In other words, the "specific information" only needs to be information that can be obtained using the public key.
[0132] (Variation 2) The process (e.g., T101 in FIG. 4, etc.) for generating a shared key (e.g., SK1) is not limited to the process according to ECDH in the above embodiment, but may be other processes according to ECDH. Also, the process for generating a shared key is not limited to the process according to ECDH, but may be other processes according to other methods (e.g., DH (abbreviation of Diffie-Hellman key exchange) etc.). Also, in the above embodiment, the electronic signature is generated according to ECDSA, but may be generated according to other methods (e.g., DSA (abbreviation of Digital Signature Algorithm), RAS (abbreviation of Rivest-Shamir-Adleman cryptosystem), etc.).
[0133] (Variation 3) For example, in T132, the printer 100 may cause the print execution unit 118 to print the QR code on a print medium instead of displaying the QR code on the display unit 114. In this variation, the print execution unit 118 is an example of an "output unit." In another variation, the printer 100 may include a BTI / F for performing communication according to the Bluetooth (registered trademark) method instead of the NFC I / F 117, and in this case, the public key PPK1, the channel list CL, and the MAC address "Mlan" may be transmitted via the BTI / F. In this variation, the BTI / F is an example of an "output unit" and a "second wireless interface." In this variation, the "specific information" does not have to be a "code image." The BTI / F may be Bluetooth Low Energy, which is Bluetooth 4.0 or higher.
[0134] (Variation 4) "DRAFT Device Provisioning Protocol Technical Specification Version 0.2.11," a draft specification created by the Wi-Fi Alliance, states that a shared code, key, phrase, and word are called a "code." Therefore, instead of a QR code, printer 100 may display on display unit 114 an image including a shared code, key, phrase, and word obtained by encoding public key PPK1, etc.
[0135] (Modification 5) S154 and S156 in FIG. 8 may be omitted. In this modification, the "deletion unit" and the "second establishment unit" may be omitted. Also, S120, S122, S220, and S222 may be omitted. In this modification, the "second display control unit" may be omitted.
[0136] (Variation 6) The printer 100 may transition from the unavailable state to the available state before disconnecting the Wi-Fi connection in S124 or S224 in FIG. 8 (for example, at the timing of YES in S105 or S205). In another variation, the printer 100 may always operate in the available state. In this variation, the "state transition unit" can be omitted.
[0137] (Variation 7) The printer 100 does not need to disconnect the Wi-Fi connection in S124 or S224 of Fig. 8. The timing of disconnecting the Wi-Fi connection may be, for example, after Auth and before Config, after Config and before NA, or after NA and before establishing an AP connection or a WFD connection.
[0138] (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.
[0139] (Modification 9) In the above embodiments, the processes in FIGS. 2 to 15 are implemented by software (that is, programs 36, 38, 136), but at least one of these processes may be implemented by hardware such as a logic circuit.
[0140] In addition, the technical elements described in this specification or drawings exert technical utility alone or in various combinations, and are not limited to the combinations described in the claims at the time of filing. In addition, the technologies exemplified in this specification or drawings achieve multiple objectives simultaneously, and achieving one of those objectives is itself technically useful. The features of the technology disclosed in this specification are listed below. (Item 1) A communication device, comprising: a first wireless interface; an output unit for outputting specific information obtained by using the public key of the communication device to an outside; a disconnection unit that disconnects the first wireless connection after an output instruction for outputting the specific information is accepted from the output unit in a state in which a first wireless connection is established between the communication device and a first external device via the first wireless interface; an authentication request receiving unit that receives, after the terminal device acquires the public key due to the output of the specific information from the output unit, an authentication request using the public key from the terminal device via the first wireless interface; an authentication response transmission unit that, when the authentication request is received from the terminal device, transmits an authentication response, which is a response to the authentication request, to the terminal device via the first wireless interface; a connection information receiving unit that receives connection information from the terminal device via the first wireless interface after the authentication response is transmitted to the terminal device, the connection information being information for establishing a second wireless connection between the communication device and a second external device different from the first external device via the first wireless interface; a first establishment unit that establishes the second wireless connection between the communication device and the second external device by using the connection information after the first wireless connection is disconnected and the connection information is received from the terminal device; A communication device comprising: (Item 2) The communication device further comprises: a state transition unit that transitions an operation state of the communication device from an impossible state to a possible state after the first wireless connection is disconnected, the impossible state being a state in which the communication device does not transmit the authentication response even if the communication device receives the authentication request from the terminal device, and the possible state being a state in which the communication device transmits the authentication response to the terminal device in response to receiving the authentication request from the terminal device; The communication device according to item 1, wherein the authentication response sending unit sends the authentication response to the first external device when the authentication request is received from the terminal device after the operating state of the communication device is transitioned to the possible state. (Item 3) the specific information is information obtained by using the public key and communication channel information indicating a first communication channel that is predetermined in the communication device, The communication device described in item 2, wherein the possible state is a state in which the communication device monitors reception of the authentication request using the first communication channel from the terminal device, and transmits the authentication response to the terminal device in response to receiving the authentication request using the first communication channel from the terminal device. (Item 4) 4. The communication device according to item 3, wherein the first establishment unit establishes the second wireless connection between the communication device and the second external device using a second communication channel different from the first communication channel. (Item 5) The communication device further comprises: 5. The communication device according to any one of claims 1 to 4, further comprising a second establishment unit that re-establishes the first wireless connection between the communication device and the first external device when the second wireless connection cannot be established between the communication device and the second external device. (Item 6) The communication device further comprises: a memory that stores wireless information for establishing the first wireless connection between the communication device and the first external device; a deletion unit that deletes the wireless information from the memory when the second wireless connection is established between the communication device and the second external device, The communication device described in item 5, wherein the second establishment unit re-establishes the first wireless connection between the communication device and the first external device by using the wireless information in the memory when it is impossible to establish the second wireless connection between the communication device and the second external device. (Item 7) the output unit is a display unit for displaying the specific information, which is a code image obtained by encoding the public key; 7. The communication device according to any one of items 1 to 6, wherein the output instruction is an instruction for displaying the specific information, which is the code image, on the output unit, which is the display unit. (Item 8) the first wireless interface is capable of simultaneously establishing a first type of wireless connection using a first MAC address and a second type of wireless connection using a second MAC address different from the first MAC address; The communication device further comprises: a first display control unit that causes a display unit to display one or more selection screens including a first selection area for establishing the first type of wireless connection and a second selection area for establishing the second type of wireless connection; The cutting portion is disconnecting the first wireless connection after the output instruction including selection of the first selection area is accepted in a state in which the first wireless connection, which is the first type of wireless connection, is established between the communication device and the first external device; disconnecting the first wireless connection after the output instruction including selection of the second selection area is accepted in a state in which the first wireless connection, which is the second type of wireless connection, is established between the communication device and the first external device; even if the output instruction including the selection of the first selection area is accepted in a state in which the first wireless connection, which is the second type of wireless connection, is established between the communication device and the first external device, the first wireless connection is not disconnected; 8. The communication device according to any one of claims 1 to 7, wherein even if the output instruction including the selection of the second selection area is accepted while the first wireless connection, which is the first type of wireless connection, is established between the communication device and the first external device, the first wireless connection is not disconnected. (Item 9) the output unit is a second wireless interface that transmits the specific information to the terminal device in response to receiving the output instruction, which is a request signal, from the terminal device; 7. The communication device of claim 1, wherein the second wireless interface is different from the first wireless interface. (Item 10) The communication device further comprises: a second display control unit that causes a display unit to display an instruction screen for instructing a user to disconnect the first wireless connection after the output instruction is received in a state in which the first wireless connection is established between the communication device and the first external device; 10. The communication device according to any one of claims 1 to 9, wherein the disconnection unit disconnects the first wireless connection when an instruction to disconnect the first wireless connection is given on the instruction screen. (Item 11) the second external device is a master station device different from the first external device; The communication device according to any one of items 1 to 10, wherein the first establishment unit establishes the second wireless connection between the communication device and the second external device in order to participate as a child station in a wireless network formed by the second external device, which is the parent station device. (Item 12) 12. The communication device according to any one of claims 1 to 11, wherein the connection information includes authentication information for authenticating received information received from the second external device. (Item 13) The communication device further comprises: A communication device described in any one of items 1 to 12, comprising an operation control unit that causes the communication device to operate as an Enrollee according to the Wi-Fi standard after the authentication response is sent to the terminal device, and the terminal device operates as a Configurator according to the Wi-Fi standard. (Item 14) A computer program for a communication device, comprising: The communication device includes: a first wireless interface; an output unit for outputting specific information obtained by using the public key of the communication device to an outside; A computer, The computer program causes the computer to: a disconnection unit that disconnects the first wireless connection after an output instruction for outputting the specific information is accepted from the output unit in a state in which a first wireless connection is established between the communication device and a first external device via the first wireless interface; an authentication request receiving unit that receives, after the terminal device acquires the public key due to the output of the specific information from the output unit, an authentication request using the public key from the terminal device via the first wireless interface; an authentication response transmission unit that, when the authentication request is received from the terminal device, transmits an authentication response, which is a response to the authentication request, to the terminal device via the first wireless interface; a connection information receiving unit that receives connection information from the terminal device via the first wireless interface after the authentication response is transmitted to the terminal device, the connection information being information for establishing a second wireless connection between the communication device and a second external device different from the first external device via the first wireless interface; a first establishment unit that establishes the second wireless connection between the communication device and the second external device by using the connection information after the first wireless connection is disconnected and the connection information is received from the terminal device; A computer program that functions as a [Explanation of symbols]
[0141] 2: communication system, 6A, 6B: AP, 10A, 10B: terminal, 12: operation unit, 14: display unit, 15: camera, 16: Wi-Fi I / F, 17: NFC I / F, 30: control unit, 32: CPU, 34: memory, 36: OS program, 38: connection application, 100: printer, 112: operation unit, 114: display unit, 116: Wi-Fi I / F, 117: NFC I / F, 118: print execution unit, 130: control unit, 132: CPU, 134: memory, 136: program
Claims
1. 1. A communication device, comprising: a first wireless interface; an output unit for outputting specific information to an outside when an output instruction for outputting specific information including information on a public key of the communication device is received via an operation unit of the communication device, the output unit being a display unit; a disconnection unit that disconnects the first wireless connection when the output instruction is received in a state in which a first wireless connection is established between the communication device and a first external device via the first wireless interface; an authentication request receiving unit that receives an authentication request using the public key via the first wireless interface from a terminal device that has acquired the specific information output from the output unit; an authentication response transmission unit that, when the authentication request is received from the terminal device, transmits an authentication response that is a response to the authentication request to the terminal device via the first wireless interface; a connection information receiving unit that receives connection information from the terminal device via the first wireless interface after the authentication response is transmitted to the terminal device, the connection information being information for establishing a second wireless connection between the communication device and a second external device different from the first external device via the first wireless interface; a first establishment unit that establishes the second wireless connection between the communication device and the second external device by using the connection information after the first wireless connection is disconnected and the connection information is received from the terminal device; a memory that stores wireless information for establishing the first wireless connection between the communication device and the first external device; a second establishment unit that re-establishes the first wireless connection between the communication device and the first external device by using the wireless information in the memory when the first wireless connection is disconnected and the second wireless connection cannot be established between the communication device and the second external device; A communication device comprising:
2. the specific information is a code image obtained by encoding the public key, The communication device according to claim 1 , wherein the output instruction is an instruction for displaying the specific information, which is the code image, on the output unit, which is the display unit.
3. 1. A communication device, comprising: a first wireless interface for performing wireless communication according to the Wi-Fi standard; an output unit for outputting specific information to an outside when an output instruction for outputting specific information including information on a public key of the communication device is received via a second wireless interface different from the first wireless interface, the output unit being the second wireless interface; a disconnection unit that disconnects the first wireless connection when the output instruction is received in a state in which a first wireless connection is established between the communication device and a first external device via the first wireless interface; an authentication request receiving unit that receives an authentication request using the public key via the first wireless interface from a terminal device that has acquired the specific information output from the output unit; an authentication response transmission unit that, when the authentication request is received from the terminal device, transmits an authentication response that is a response to the authentication request to the terminal device via the first wireless interface; a connection information receiving unit that receives connection information from the terminal device via the first wireless interface after the authentication response is transmitted to the terminal device, the connection information being information for establishing a second wireless connection between the communication device and a second external device different from the first external device via the first wireless interface; a first establishment unit that establishes the second wireless connection between the communication device and the second external device by using the connection information after the first wireless connection is disconnected and the connection information is received from the terminal device; a memory that stores wireless information for establishing the first wireless connection between the communication device and the first external device; a second establishment unit that re-establishes the first wireless connection between the communication device and the first external device by using the wireless information in the memory when the first wireless connection is disconnected and the second wireless connection cannot be established between the communication device and the second external device; A communication device comprising:
4. The communication device according to claim 3 , wherein the second wireless interface serving as the output unit transmits the specific information to the terminal device in response to receiving the output instruction, which is a request signal, from the terminal device.
5. The communication device further comprises: a state transition unit that transitions an operation state of the communication device from an impossible state to a possible state after the first wireless connection is disconnected, the impossible state being a state in which the communication device does not transmit the authentication response even if the communication device receives the authentication request from the terminal device, and the possible state being a state in which the communication device transmits the authentication response to the terminal device in response to receiving the authentication request from the terminal device, 5. The communication device according to claim 1, wherein the authentication response sending unit sends the authentication response to the first external device when the authentication request is received from the terminal device after the operation state of the communication device is transitioned to the possible state.
6. the specific information includes the public key and communication channel information indicating a first communication channel that is predetermined in the communication device, 6. The communication device according to claim 5, wherein the possible state is a state in which the communication device monitors reception of the authentication request using the first communication channel from the terminal device, and transmits the authentication response to the terminal device in response to reception of the authentication request using the first communication channel from the terminal device.
7. The communication device according to claim 6 , wherein the first establishment unit establishes the second wireless connection between the communication device and the second external device by using a second communication channel different from the first communication channel.
8. The communication device further comprises: The communication device according to claim 1 , further comprising: a deletion unit that deletes the wireless information from the memory when the second wireless connection is established between the communication device and the second external device.
9. the first wireless interface is capable of simultaneously establishing a first type of wireless connection using a first MAC address and a second type of wireless connection using a second MAC address different from the first MAC address; The communication device further comprises: a first display control unit that causes a display unit to display one or more selection screens including a first selection area for establishing the first type of wireless connection and a second selection area for establishing the second type of wireless connection; The cutting portion is disconnecting the first wireless connection after the output instruction including selection of the first selection area is accepted in a state in which the first wireless connection, which is the first type of wireless connection, is established between the communication device and the first external device; disconnecting the first wireless connection after the output instruction including selection of the second selection area is accepted in a state in which the first wireless connection, which is the second type of wireless connection, is established between the communication device and the first external device; even if the output instruction including the selection of the first selection area is accepted in a state in which the first wireless connection, which is the second type of wireless connection, is established between the communication device and the first external device, the first wireless connection is not disconnected; 9. The communication device according to claim 1, wherein even if the output instruction including the selection of the second selection area is accepted when the first wireless connection, which is the first type of wireless connection, is established between the communication device and the first external device, the first wireless connection is not disconnected.
10. The communication device further comprises: a second display control unit that, when the output instruction is received while the first wireless connection is established between the communication device and the first external device, causes a display unit to display an instruction screen for instructing a user to disconnect the first wireless connection; The communication device according to claim 1 , wherein the disconnection unit disconnects the first wireless connection when an instruction to disconnect the first wireless connection is given on the instruction screen.
11. the second external device is a master station device different from the first external device, 11. The communication device according to claim 1, wherein the first establishment unit establishes the second wireless connection between the communication device and the second external device in order to participate as a child station in a wireless network formed by the second external device, which is the parent station device.
12. The communication device according to claim 1 , wherein the connection information includes authentication information for authenticating received information received from the second external device.
13. The communication device further comprises: A communication device according to any one of claims 1 to 12, comprising an operation control unit that causes the communication device to operate as an Enrollee in accordance with the Wi-Fi standard after the authentication response is sent to the terminal device, and the terminal device is provided with the operation control unit that operates as a Configurator in accordance with the Wi-Fi standard.
14. A computer program for a communication device, comprising: The communication device includes: a first wireless interface; an output unit for outputting specific information to an outside when an output instruction for outputting specific information including information on a public key of the communication device is received via an operation unit of the communication device, the output unit being a display unit; A computer, The computer program causes the computer to: a disconnection unit that disconnects the first wireless connection when the output instruction is received in a state in which a first wireless connection is established between the communication device and a first external device via the first wireless interface; an authentication request receiving unit that receives an authentication request using the public key via the first wireless interface from a terminal device that has acquired the specific information output from the output unit; an authentication response transmission unit that, when the authentication request is received from the terminal device, transmits an authentication response that is a response to the authentication request to the terminal device via the first wireless interface; a connection information receiving unit that receives connection information from the terminal device via the first wireless interface after the authentication response is transmitted to the terminal device, the connection information being information for establishing a second wireless connection between the communication device and a second external device different from the first external device via the first wireless interface; a first establishment unit that establishes the second wireless connection between the communication device and the second external device by using the connection information after the first wireless connection is disconnected and the connection information is received from the terminal device; a memory that stores wireless information for establishing the first wireless connection between the communication device and the first external device; a second establishment unit that re-establishes the first wireless connection between the communication device and the first external device by using the wireless information in the memory when the first wireless connection is disconnected and the second wireless connection cannot be established between the communication device and the second external device; A computer program that functions as a
15. A computer program for a communication device, comprising: The communication device includes: a first wireless interface for performing wireless communication according to the Wi-Fi standard; an output unit for outputting specific information to an outside when an output instruction for outputting specific information including information on a public key of the communication device is received via a second wireless interface different from the first wireless interface, the output unit being the second wireless interface; A computer, The computer program causes the computer to: a disconnection unit that disconnects the first wireless connection when the output instruction is received in a state in which a first wireless connection is established between the communication device and a first external device via the first wireless interface; an authentication request receiving unit that receives an authentication request using the public key via the first wireless interface from a terminal device that has acquired the specific information output from the output unit; an authentication response transmission unit that, when the authentication request is received from the terminal device, transmits an authentication response that is a response to the authentication request to the terminal device via the first wireless interface; a connection information receiving unit that receives connection information from the terminal device via the first wireless interface after the authentication response is transmitted to the terminal device, the connection information being information for establishing a second wireless connection between the communication device and a second external device different from the first external device via the first wireless interface; a first establishment unit that establishes the second wireless connection between the communication device and the second external device by using the connection information after the first wireless connection is disconnected and the connection information is received from the terminal device; a memory that stores wireless information for establishing the first wireless connection between the communication device and the first external device; a second establishment unit that re-establishes the first wireless connection between the communication device and the first external device by using the wireless information in the memory when the first wireless connection is disconnected and the second wireless connection cannot be established between the communication device and the second external device; A computer program that functions as a
Citation Information
Patent Citations
Wireless communication equipment
JP2016178687A
Communication device, control method therefor and program
JP2017028461A
Communication device, communication method and program
JP2017135517A
Communication device, communication method, and program
JP2018037978A
Communication device, communication method, and program
JP2018037979A