Communication device, control method, and program

JP2025074259A5Pending Publication Date: 2025-06-24CANON KK
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
JP2025033147
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2014-06-06
Filing Date
2025-03-03
Publication Date
2025-06-24

AI Technical Summary

Technical Problem

Existing communication technologies face challenges when an image output device is in AP mode, as it disconnects from the access point, preventing Internet connectivity and limiting the use of functions that require an Internet connection.

Method used

A communication device that determines whether a response is detected from a target device after broadcasting an instruction, and based on this determination, either establishes a direct wireless connection for information transfer or uses an external device for communication, ensuring the connection form of the communication partner device is considered.

Benefits of technology

This approach enhances user convenience by allowing wireless communication that takes into account the connection form of the communication partner device, thereby maintaining Internet connectivity and enabling the use of various functions without waiting for P2P connections to terminate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 00000000_0000_ABST
    Figure 00000000_0000_ABST
Patent Text Reader

Abstract

To provide a device capable of improving user convenience by performing wireless communication in consideration of a connection form of a communication partner device.SOLUTION: If a result of a determination process indicates that a predetermined response is not detected, predetermined information is transmitted to a printing device by using a direct wireless connection between a communication device and the printing device, not through an external device, established base on communication information obtained by first wireless communication. If the result of the determination process indicates that the predetermined response is detected, a communication device is provided for transmitting the predetermined information to the printing device by using wireless connection between the communication device and the printing device through the external device.SELECTED DRAWING: Figure 6
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates to a communication device, and more particularly to a communication technique capable of short-range wireless communication. [Background technology]

[0002] In recent years, external devices such as digital cameras and mobile phones have come to identify communication partners through short-range wireless communication, such as NFC. A system is known in which an image output device outputs an image file stored in the digital camera or mobile phone through wireless communication other than the short-range wireless communication.

[0003] As part of the network functions, some devices have a remote printing function and a firmware update function via the Internet by connecting to the Internet via an access point. Furthermore, even if there is no access point, the host terminal can use the access point function of the image output device to establish a peer-to-peer (P2P) connection between the two devices and perform printing and scanning. The mode in which the host terminal uses the access point of the image output device to perform P2P wireless communication is called AP mode.

[0004] However, when the image output device goes into AP mode, it will connect to the host terminal through P2P, and the connection to the access point will be cut off, making it impossible to connect to the Internet. As a result, the image output device may not be able to use the various functions that require an Internet connection, as mentioned above.

[0005] Furthermore, if the destination of the P2P connection cannot connect to the Internet, the host terminal operating in AP mode may also be unable to connect to the Internet. In this situation, applications within the host terminal will also be unable to access the Internet, and for example, it will be impossible to view Internet sites using a browser.

[0006] Patent document 1 discloses that when a second wireless communication device is brought close to a first wireless communication device, if the first wireless communication device is engaged in data communication via an access point, the first wireless communication device will not transition to a P2P connection with the second wireless communication device. [Prior art documents] [Patent documents]

[0007] [Patent Document 1] JP 2011-182449 A Summary of the Invention [Problem to be solved by the invention]

[0008] However, in the technology of Patent Document 1, when the first wireless communication device is not performing data communication with the Internet via an access point, the communication setting of the first wireless communication device is changed to a P2P connection. For example, when the first wireless communication device receives a connection request from the second wireless communication device in a state where the first wireless communication device is not performing data communication with the Internet via an access point, the first wireless communication device transitions to a P2P connection. After that, even if the user wants to connect to the Internet using the first wireless communication device during the P2P connection between the first and second wireless communication devices, the user needs to wait until the P2P connection ends in order to perform the operation intended by the user. Therefore, there is a risk that the convenience for the user may be reduced. [Means for solving the problem]

[0009] The present invention has been made in order to solve the above problems, and is a communication device, a first execution means for executing a first wireless communication with a target device; a broadcasting means for broadcasting a predetermined command to a predetermined network in which the communication device participates; a determination means for executing a determination process for determining whether or not a predetermined response has been detected, the predetermined response being a response received based on the broadcast of the predetermined command from a device participating in the predetermined network and corresponding to the identification information of the target device when the predetermined command is broadcast; When a determination result of the determination process indicates that the predetermined response has not been detected, a second wireless communication is executed to transmit predetermined information to the target device using a direct wireless connection between the communication device and the target device that is established based on communication information acquired by the first wireless communication and does not go through an external device that is an external device of the communication device and the target device; and a second execution means for executing a third wireless communication to transmit the predetermined information to the target device using a wireless connection between the communication device and the target device via the external device when a determination result of the determination process indicates that the predetermined response has been detected; The first wireless communication is performed by a short-range wireless communication method different from a communication method used for the second wireless communication and a communication method used for the third wireless communication. Effect of the Invention

[0010] According to the present invention, it is possible to improve user convenience by performing wireless communication taking into consideration the connection form of the communication partner device. [Brief description of the drawings]

[0011] [Figure 1] FIG. 1 is a diagram showing the configuration of a printing system according to an embodiment. [Diagram 2] FIG. 2 is a diagram showing the external appearance of a terminal device 200. [Diagram 3] FIG. 2 is a diagram showing the external appearance of a printing device 300. [Figure 4] FIG. 2 is a block diagram showing the configuration of a terminal device 200. [Diagram 5] FIG. 3 is a block diagram showing the configuration of a printing device 300. [Figure 6] Block diagram showing the configuration of the NFC unit. [Figure 7] 3 is a flowchart showing the contents of processing according to the first embodiment. [Figure 8] 10 is a flowchart showing the content of processing according to the second embodiment. [Figure 9] FIG. 4 is a diagram showing an example of a UI of a terminal device. [Figure 10] 11 is a flowchart showing the content of processing according to the third embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0012] Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the drawings. However, the relative arrangement of components, display screen, and the like described in the present embodiment are not intended to limit the scope of the present invention unless otherwise specified.

[0013] [Embodiment 1] 1 is a diagram showing the configuration of a print processing system. This system is composed of an access point 100 at the center, a portable terminal device 200 connectable to the access point 100, and a printing device 300. The terminal device 200, which also functions as a communication device, has at least two or more wireless communication units with different communication speeds. The terminal device 200 can be of any type, such as a personal information terminal such as a PDA (Personal Digital Assistant), a mobile phone, or a digital camera, as long as it can handle files to be printed.

[0014] The printing device 300, which also functions as a communication device, has a reading function for reading an original by placing it on a platen, and a printing function for printing using a printing engine such as an inkjet, and may also have other functions such as a fax function and a telephone function.

[0015] The printing device 300 can connect to a wireless LAN in infrastructure mode. In other words, the printing device 300 operating in infrastructure mode can wirelessly communicate with the terminal device 200 via an external access point 100. The printing device 300 also has an AP mode, and in the AP mode, both the terminal device 200 and the printing device 300 can also perform P2P communication via wireless LAN. As described above, the AP mode is a mode in which the access point provided in the printing device is enabled, and the terminal device 200 uses the access point of the printing device to perform peer-to-peer wireless communication with the printing device.

[0016] FIG. 2 is a diagram showing the external appearance of the terminal device 200. In this embodiment, a smartphone is taken as an example. A smartphone is a multi-function mobile phone equipped with a camera, a web browser, an e-mail function, and the like in addition to the functions of a mobile phone. The NFC (Near Field Communication) unit 201 is a unit that performs short-distance wireless communication. A user can perform communication by bringing the NFC unit 201 close to a destination NFC unit (in this embodiment, the NFC unit of the printing device 300) within a predetermined distance (about 10 cm). In other words, the terminal device 200 is capable of performing short-distance wireless communication.

[0017] The wireless LAN unit 202 is a unit for performing communication via wireless LAN, and is disposed within the terminal device 200. The display unit 203 is, for example, a display equipped with an LCD-type display mechanism. The operation unit 204 is equipped with a touch panel-type operation mechanism and detects information on user presses. A representative operation method is for the display unit 203 to display button icons or a software keyboard, and for the user to press the operation unit 204 to issue an event that the button has been pressed. The power key 205 is used to turn the power on and off.

[0018] FIG. 3 is a diagram showing the appearance of a printing device. In this embodiment, a multi-function printer (MFP) having a reading function (scanner) is taken as an example. In FIG. 3(a), a manuscript table 301 is a transparent glass table on which a manuscript is placed and used when reading with a scanner. A manuscript cover 302 is a cover for preventing reading light from leaking to the outside when reading with the scanner. A print paper insertion port 303 is an insertion port for setting papers of various sizes. Paper set in the print paper insertion port 303 is transported one sheet at a time to the printing section, where it is printed and discharged from a print paper discharge port 304.

[0019] 3(b), an operation display unit 305 and an NFC unit 306 are disposed on the upper part of the document cover 302. The NFC unit 306 is a unit for performing short-distance wireless communication, and is a place where the user brings the terminal device 200 close to the printing device 300. The effective contact distance is a predetermined distance (approximately 10 cm) from the NFC unit 306. The wireless LAN antenna 307 has an antenna embedded therein for communicating via wireless LAN.

[0020] It should be noted that short-distance wireless communication refers to wireless communication, such as NFC, in which the communication range is a relatively small predetermined range (for example, one meter to a few centimeters).

[0021] 4 is a block diagram showing the configuration of the terminal device 200. The terminal device 200 is made up of a main board 210 that controls the entire device, a wireless LAN unit 202, an NFC unit 201, a line connection unit 206, an operation unit 204, and a display unit 203. The wireless LAN unit 202, the NFC unit 201, and the line connection unit 206 all function as communication units of the terminal device 200.

[0022] A microprocessor-type CPU 211 disposed on a main board 210 operates according to a control program stored in a ROM-type program memory 213 connected via an internal bus 212 and the contents of a RAM-type data memory 214 .

[0023] The CPU 211 controls the wireless LAN unit 202 via the wireless LAN control circuit 215 to communicate with other communication terminal devices via the wireless LAN 102. The CPU 211 controls the NFC unit 201 via the NFC control circuit 216 to detect a connection with another NFC terminal via the NFC 101 and to transmit and receive data to and from the other NFC terminal. The CPU 211 controls the line connection unit 206 via the line control circuit 217 to connect to the mobile phone line network 105 and to make calls and transmit and receive data.

[0024] The CPU 211 controls an operation unit control circuit 218 to display on the operation unit 204 and to accept operations from the user. The CPU 211 controls a camera unit 219 to capture images, and stores the captured images in an image memory 220 in the data memory 214. In addition to captured images, images acquired from the outside via the mobile phone network 105 and wireless LAN 102 can also be stored in the image memory 220, or conversely, transmitted to the outside.

[0025] The non-volatile memory 221 is configured with a memory such as a flash memory, and stores data that is to be kept even after the power is turned off, such as telephone directory data, various communication connection information, information on previously connected devices, image data that is to be kept, or programs such as application software that realize various functions of the terminal device 200.

[0026] 5 is a block diagram showing the configuration of the printing device 300. The printing device 300 is made up of a main board 310 that controls the entire device, a line connection unit 322, a wireless LAN unit 308, an NFC unit 306, and an operation display unit 305. Here, the line connection unit 322, the wireless LAN unit 308, and the NFC unit 306 function as a communication unit of the printing device 300.

[0027] A microprocessor-type CPU 311 disposed on a main board 310 operates according to a control program stored in a ROM-type program memory 313 connected via an internal bus 312 and the contents of a RAM-type data memory 314.

[0028] The CPU 311 controls a scanner unit 315 to read an original document and store the image in an image memory 316 in the data memory 314. The CPU 311 also controls a printing unit 317 to print the image in the image memory 316 in the data memory 314 onto a recording medium.

[0029] The CPU 311 controls the wireless LAN unit 308 via the wireless LAN control circuit 318 to communicate with other communication terminal devices via the wireless LAN 102. The CPU 311 also controls the NFC unit 306 via the NFC control circuit 319 to detect connections with other NFC terminals via the NFC 101 and to transmit and receive data to and from other NFC terminals. The CPU 311 controls the line connection unit 322 via the line control circuit 321 to connect to a telephone line network 323 and transmit and receive FAXes and data.

[0030] The CPU 311 controls the operation / display unit control circuit 320 to display the status of the printing device 300 and a function selection menu on the operation / display unit 305, and is capable of accepting operations from the user.

[0031] FIG. 6 is a block diagram showing details of an NFC unit 600 used in the NFC unit 201 or the NFC unit 306.

[0032] In NFC communication, when short-distance wireless communication is performed by the NFC unit 600, a device that first outputs an RF (Radio Frequency) field to start communication is called an initiator. Also, a device that responds to a command issued by the initiator and communicates with the initiator is called a target.

[0033] The NFC unit 600 has an NFC controller section 601, an antenna section 602, an RF section 603, a transmission / reception control section 604, an NFC memory 605, a power supply 606, and a device connection section 607. The antenna section 602 receives radio waves from other NFC devices and transmits radio waves to other NFC devices. The RF section 603 has a function of modulating and demodulating analog signals into digital signals. The RF section 603 has a synthesizer, identifies the frequencies of bands and channels, and controls the bands and channels according to frequency allocation data.

[0034] The NFC memory 605 is, for example, a non-volatile memory, and even when power is not being supplied from the power source, data stored in the NFC memory 605 can be read and written. Data storage control including reading and writing data from and to the NFC memory 605 is realized by the NFC controller unit 601.

[0035] The transmission / reception control unit 604 controls transmission and reception, such as assembling and disassembling transmission and reception frames, adding and detecting preambles, and identifying frames. The transmission / reception control unit 604 also controls the NFC memory 605, and reads and writes various data and programs. When operating in an active mode that enables two-way communication with the device, power is supplied via a power source 606. Furthermore, the device communicates with other NFC devices via a device connection unit 607, and communicates with other NFC devices within a communication range by radio waves transmitted and received via the antenna unit 602.

[0036] In this embodiment, since the terminal device 200 and the printing device need to perform two-way communication via NFC, the NFC always operates in active mode.

[0037] In the following, the operation of bringing the NFC unit 201 of the terminal device 200 and the NFC unit 306 of the printing device 300 close to each other will be referred to as an "NFC touch operation."

[0038] In this embodiment, a use case will be described in which a user operates the terminal device 200 to select an image to be printed, and then performs an NFC touch operation on the printing device 300 to print the selected image.

[0039] If the printing device 300 is on the same network as the terminal, the connection state is maintained and printing is performed; if not, a P2P connection is established with the printing device 300 and printing is performed.

[0040] This embodiment will be described with reference to the flowchart of Fig. 7. Fig. 7 shows processing performed when an image designated by the terminal device 200 is printed by the printing device 300. Note that each step of the flowchart related to the terminal device 200 in this application is realized by the CPU 211 reading and executing a program related to the flowchart.

[0041] The user operates the terminal device 200, selects image data, and performs an NFC touch operation on the printing device 300. FIG. 9 is an example of the UI of the terminal device. For example, the user launches a print application installed on the terminal device, causing the selection screen (selection UI) of FIG. 9 to be displayed. The UI of FIG. 9 displays thumbnail images of image data in the terminal device 200, and when the user taps the thumbnail of the image they wish to print by a touch operation, a check mark indicating selection is displayed on the thumbnail. When an NFC touch operation is performed on the printing device 300 with the image selected, the printing process begins.

[0042] First, in step S1101, the terminal device 200 acquires tag information from the NFC tag of the printing device 300. The tag information includes at least three types of information related to the network settings of the printing device 300. Specifically, the three types of information are: (1) the MAC address of the printing device 300, (2) the SSID and password when the printing device 300 is in AP mode, and (3) the current wireless mode of the printing device 300. Note that (3) is either the AP mode or the infrastructure mode. Note that the tag information in this application is also sometimes simply referred to as communication information, since it is information related to communication.

[0043] In S1102, the terminal device 200 checks whether or not the WiFi setting is valid. If the WiFi setting is valid, this means that WiFi communication is possible in the terminal device 200. If the WiFi setting is valid, the process proceeds to S1103, and if it is invalid, the process proceeds to S1110.

[0044] In S1103, the terminal device checks the (3) current wireless mode of the printing device 300 acquired in S1101, and proceeds to S1112 if it is the AP mode, and proceeds to S1104 if it is the infrastructure mode. In other words, if the terminal device 200 determines that the printing device 300 is operating in the peer-to-peer communication mode, it advances the process to S1112.

[0045] In S1104, the terminal device 200 detects the printing device 300 whose MAC address matches the MAC address of the (1) printing device 300 acquired in S1101. Specifically, the terminal device broadcasts a device search command to the network in which it participates, and receives responses from each device participating in the network. The terminal device then executes the process of S1104 by detecting a response that includes a MAC address that matches the MAC address acquired in S1101.

[0046] If the printing device 300 is detected in S1104, the terminal device 200 connects to the printing device 300 detected in S1104 via wireless LAN using the wireless LAN unit 202 in S1106. Specifically, the access point 100 to which the terminal device 200 is connected is determined (maintained) as the connection destination. Then, the terminal device 200 transmits a print job to the printing device 300 via wireless LAN via the access point 100 in S1109. Specifically, the terminal device 200 issues a specific command to the printing device 300 to establish a session with the printing device 300. Then, the terminal device 200 generates a print job based on the image data selected on the selection screen of FIG. 9, and transmits the print job in S1109. The timing of generating the print job may be before the flowchart of FIG. 7 is executed, or after the connection is established in S1106.

[0047] The printing device 300 that has received the print job prints an image on paper based on the print job and then ends the process.

[0048] On the other hand, if the printing device 300 is not detected in S1104, the process of the mobile terminal 200 proceeds from S1105 to S1107.

[0049] In S1107, the terminal device 200 writes an instruction to switch to AP mode to the NFC tag of the printing device 300. The information written as the switch instruction may be a command to switch to AP mode, or may be information indicating that a printing device corresponding to the MAC address was not found. Then, when the printing device 300 detects that an instruction to switch to AP mode has been written to the NFC tag, it performs a process to switch to AP mode.

[0050] In S1108, the terminal device 200 establishes a wireless LAN connection with the printing device 300 that has been shifted to the AP mode in S1107, using (2) the SSID and password of the access point of the printing device 300 acquired in S1101. Specifically, the terminal device 200 changes the access point connection destination from the access point 100 to the access point of the printing device 300. That is, in S1108, the access point of the printing device 300 is determined as the access point of the connection destination. By this process, a P2P connection is established between the terminal device 200 and the printing device 300, and the terminal device 200 transmits a print job to the printing device 300 in S1109. The process of the printing device that receives the print job is the same as the above process. If the printing device 300 is already in the AP mode at the time of the NFC touch operation, the process proceeds to S1109 via S1102. The communication mode of the printing device is acquired by the process of S1101.

[0051] Also, if the process proceeds to S1110 from S1102, the terminal device 200 changes the WiFi setting of the terminal device 200 to enabled in S1110. Then, in S1111, the terminal device 200 writes an instruction to transition to the AP mode to the NFC tag of the printing device 300. Then, when the printing device 300 detects that the instruction to transition to the AP mode has been written to the NFC tag, it performs processing to transition to the AP mode.

[0052] The process of S1112 is the same as S1106, so it will be omitted.

[0053] Also, if the process proceeds to S1112 from S1103, the printing device 300 is already in AP mode. Therefore, the terminal device 200 establishes a connection with the printing device 300 using (2) the SSID and password for the printing device 300 in AP mode acquired in S1101, and transmits a print job to the printing device 300 in S1109. The printing device 300 that has received the print job executes the print process and ends the process.

[0054] Each step in the flowchart of FIG. 7 may be executed by a print application providing the screen of FIG.

[0055] If the connection between the printing device 300 and the terminal device is established in infrastructure mode through the series of processes shown in the above flowchart, the connection state is maintained and printing is performed. On the other hand, if the connection between the printing device 300 and the terminal device is not in infrastructure mode, the mobile terminal 200 instructs the printing device 300 to switch to AP mode and performs printing.

[0056] As a result, the connection in infrastructure mode is maintained as much as possible, so that the connection of the printing device 300 and the terminal device 200 to the Internet can also be maintained as much as possible.

[0057] Furthermore, the WiFi setting of the terminal device 200 can be easily enabled or disabled by the user at will in the WiFi setting item in the system setting menu of the terminal device 200. Here, a user who does not own the access point 100 does not need to connect the access point 100 and the terminal device 200 via WiFi. Therefore, it is highly likely that the WiFi setting of the terminal device 200 is disabled in order to reduce battery consumption of the terminal due to unnecessary functions. Even in such a case, in S1102, the terminal device 200 checks the WiFi setting, and if the WiFi setting is disabled, enables the WiFi setting and establishes a wireless connection with the printing device 300 in AP mode, thereby enabling printing in AP mode.

[0058] Furthermore, in S1103, if the mobile terminal 200 checks the wireless mode of the printing device 300 and determines that the printing device 300 is already operating in AP mode, the mobile terminal 200 does not perform detection processing that is not expected to detect the printing device 300. Through the above processing, it is possible to efficiently establish a connection between the printing device 300 and the terminal device 200.

[0059] As described above, the process of checking the validity of the WiFi settings of the terminal device 200 in S1102 and the process of checking the wireless mode of the printing device 300 in S1103 are not essential processes for the present invention, but are processes for improving user convenience, such as speeding up processing. Therefore, even if either or both of steps S1102 and S1103 are not present, it is possible to achieve the object of the present invention, which is to maintain a connection in infrastructure mode as much as possible.

[0060] Here, the flow of processing in this embodiment will be explained using screens displayed on the mobile terminal 200.

[0061] When a print application is started on the terminal device 200, the screen in Fig. 9(a) is displayed. If the user selects photo printing, the print application displays a list of images stored in the terminal device 200, as shown in Fig. 9(b). On the other hand, if the user selects document printing, a list of documents stored in the terminal device 200 is displayed.

[0062] When the user selects an image to be printed in Fig. 9(b) and performs an NFC touch operation with the terminal device 200 against the printing device 300, the print application displays the screen shown in Fig. 9(c). Note that performing the NFC touch operation executes the above-mentioned process of Fig. 7 of the present application.

[0063] Also, when the user presses the print button after selecting an image to be printed in Fig. 9(b), Fig. 9(d) is displayed. When the user performs an NFC touch operation with the terminal device 200 against the printing device 300 while Fig. 9(d) is displayed, printing is performed according to the print setting information displayed in Fig. 9(d).

[0064] A user can register a printing device to a print application. If the user performs an NFC touch operation on a printing device 300 other than the registered printing device while the screen of FIG. 9(d) is displayed, the screen of FIG. 9(e) is displayed. At this time, the terminal device 200 and the printing device 300 are connected wirelessly by the process of FIG. 7. The terminal device 200 acquires function information of the printing device 300 (e.g., paper size and paper type that the printing device 300 can handle) via the wireless connection, and reflects the acquired result on the screen of FIG. 9(e). In other words, the options displayed when the user presses the paper size and paper type are determined based on the function information of the printing device 300 acquired via the wireless connection. After the user sets the print setting information on the screen of FIG. 9(e), the user presses the print button, and a print job is transmitted via a wireless connection to the printing device 300 on which the user performed the NFC touch operation.

[0065] [Embodiment 2] In the first embodiment, when the terminal device 200 and the printing device 300 are not on the same network, the mobile terminal 200 instructs the printing device 300 to switch to the AP mode. However, when the printing device 300 can reconnect to the same access point as the terminal device 200, it may reconnect.

[0066] Unless otherwise specified, the configuration of each device in this embodiment is the same as that in the first embodiment and will not be described below. The following description will be given with reference to FIG.

[0067] In step S1201, the terminal device 200 acquires tag information from the NFC tag of the printing device 300. The tag information includes four types of information related to the network settings of the printing device 300. Specifically, in addition to the above-mentioned (1) to (3), the tag information includes (4) a connection history of an SSID corresponding to an access point of the printing device 300. In addition, for the connection history of (4), the password corresponding to the SSID is also stored separately in the printing device 300, not in the tag.

[0068] S1202 is the same as S1104, and S1203 is the same as S1105, so detailed description will be omitted. If the printing device 300 is not detected in S1203, the process proceeds from S1203 to S1206.

[0069] In S1206, the terminal device 200 compares the SSID of the currently connected access point with the connection history of the SSID of the (4) access point acquired in S1201 to check whether there is a match. If there is no match, the process proceeds to S1207, and if there is a match, the process proceeds to S1209.

[0070] Note that the processes from S1207 to S1208 and S1205 are the same as those from S1107 to S1108 and S1109, and therefore detailed description thereof will be omitted. If the determination in S1206 is Yes, in S1209, the terminal device 200 writes the SSID matched in S1206 and an instruction to connect to the access point to the NFC tag of the printing device 300. Then, when the printing device 300 detects that an instruction to connect to the access point has been written to the NFC tag, it reconnects to the access point using the SSID specified by the terminal device 200 and the corresponding password stored together with the access point history. As a result, the terminal device 200 and the printing device 300 are connected to the same access point and are connected to the same network.

[0071] In S1210, the terminal device 200 broadcasts within the network, detects a printing device 300 whose MAC address matches the MAC address of the (1) printing device 300 acquired in S1201, and establishes a wireless connection with the detected printing device 300. Note that the specific processing of S1210 is the same as that of S1106. Then, in S1205, the terminal device 200 transmits a print job to the printing device 300 via the established wireless connection. Having received the print job, the printing device 300 executes print processing and ends the process.

[0072] As described above, according to the second embodiment, the terminal device 200 can connect to the printing device 300 via an access point by using the access point connection history stored in the printing device 300. As a result, it becomes possible to maintain a state in which both the terminal device 200 and the printing device 300 can connect to the Internet with a higher probability.

[0073] In the description of this embodiment, an example has been shown in which the connection history of the access point of the printing device 300 is stored, but conversely, the terminal device 200 may store a connection history (SSID) to its own access point. In this case, in S1201, the terminal device 200 acquires (4) the SSID of the access point to which the printing device 300 is currently connected, instead of the connection history of the SSID corresponding to the access point of the printing device 300. Then, in S1206, the terminal device 200 compares the SSID in the connection history of the terminal device 200 with the SSID of the access point to which the printing device 300 is currently connected acquired in S1201. Then, if the matching SSID is included in the connection history, the terminal device 200 may reset the connection destination to the access point of that SSID.

[0074] In addition, although the embodiment of the present invention shows an example of application to the printing device 300, the present invention can also be applied to a digital camera having WiFi connection and P2P connection functions, as well as to a printing device. Specifically, when it is desired to use a terminal device as a remote control for a digital camera, it becomes possible to perform operations such as releasing the shutter of a connected digital camera from the terminal device while maintaining the Internet connection of the terminal device and the digital camera as much as possible.

[0075] Also, when the terminal device is made to function as a remote control for devices such as a network audio player or a video recorder, the remote control function can be realized while maintaining the Internet connection of each device as much as possible.

[0076] Therefore, the scope of application of the present invention is not limited to printing devices.

[0077] Furthermore, in the embodiment, an example of AP mode is presented as an example of P2P connection between a terminal device and a device. However, the present invention may also be applied to other P2P connection methods such as Bluetooth (registered trademark) connection and Wi-Fi Direct connection, if the connection method is in a situation where the connection of both or one of the terminal and the device to the Internet is hindered. As a result, it is possible to obtain the effect of maintaining the Internet connection of each device as much as possible.

[0078] Also, although an example of AP mode has been presented as an example of a P2P connection between a terminal device and a device, the printing device 300 does not need to function as an AP during a P2P connection. Specifically, in a P2P connection using Wi-Fi Direct, one side operates as a host and the other as an AP, but according to the standard, which side becomes the AP varies depending on the situation. In this invention, if a P2P connection is possible, the object of the invention can be achieved regardless of whether the terminal or the printing device becomes the AP, so there is no need to limit the printing device to functioning as an AP. Note that when a P2P connection is executed using Wi-Fi Direct via the processing of this application, negotiation is executed between the terminal device and the printing device to determine which side will operate as the AP.

[0079] Furthermore, although NFC has been used as an example of short-distance wireless communication, Bluetooth (registered trademark) may be used instead of NFC.

[0080] In the present application, the process in which the terminal device 200 searches for the printing device 300 using the MAC address acquired from the printing device 300 has been described. However, as an alternative method, the terminal device 200 can acquire an IP address and a MAC address using NFC, and search for the printing device 300 using the IP address. If the terminal device 200 is unable to search for the printing device 300 using the IP address, it may search again using the MAC address. This process enables efficient search processing.

[0081] Furthermore, device information such as the model name and type of the printing device 300 may be notified to the terminal device 200 via NFC. If the device information of the printing device that can be used by the printing application of the terminal device 200 does not match the device information acquired by the NFC touch operation (for example, the model name does not match), the printing application displays an error screen. Then, a message indicating that the printing process cannot be continued is displayed on the error screen. Note that the error screen may display a message indicating the printing device that can be used by the printing application, a message recommending the use of another printing application, or the like.

[0082] Alternatively, the function information of the printing device 300 may be notified to the terminal device 200 by NFC. If the function selected on the screen of Fig. 9(a) provided by the printing application of the terminal device 200 is not included in the function information acquired by the NFC touch operation, the printing application displays an error screen. The error screen may display a message indicating that processing cannot be continued. Specifically, if FAX is selected on Fig. 9(a) and the function information acquired from the printing device 300 by the NFC touch operation does not include a scan function, the printing application stops FAX processing and displays an error screen.

[0083] [Embodiment 3] In the first embodiment, if the WiFi setting of the terminal device 200 is enabled and the printing device 300 is not connected via WiFi, the process proceeds from S1101 to S1107 via S1105. At this time, in S1107, the terminal device 200 writes an instruction to switch to the AP mode to the NFC tag of the printing device 300, thereby switching the printing device 300 to the AP mode. Therefore, the user must not move the terminal away from the printing device until the processes from S1101 to S1107 are completed. Specifically, the distance between the terminal device and the printing device must not be such that NFC communication is not possible.

[0084] However, before the processing of the terminal device 200 completes the processing of S1107, there is a possibility that the user may move the terminal device that is being touched or remove it from the printing device. As a result, NFC communication may not be performed in S1107, the instruction to switch to AP mode may fail, and a connection error may occur in the communication between the terminal device and the printing device. If a connection error occurs in S1107, the user performs a touch operation again, and the flow from S1101 to S1107 is executed again. In this case, if the same processing is simply repeated, there is a concern that the user may again move the terminal device away from the printer or move it away, causing another connection error.

[0085] Therefore, when a connection error occurs in S1107, processing may be executed to reduce the possibility of the connection error occurring.

[0086] Unless otherwise specified, the configuration of each device in this embodiment is the same as that in the first embodiment and will not be described below. The following description will be given with reference to FIG.

[0087] First, before describing the process of FIG. 10, assume that the user performs an NFC touch operation with the terminal device 200 on the printing device 300 to attempt a connection, and then moves the terminal device 200 away from the printing device 300 before the process of S1107 is completed. In this situation, the printing device 300 does not properly receive an instruction to switch to the AP mode, so the printing device 300 does not switch to the AP mode. As a result, the terminal device 200 cannot connect to the printing device 300. In this case, the terminal device 200 holds connection error information in the non-volatile memory 221 in the terminal device 200. This connection error information is updated at the end of the process of S1307, which will be described later, and if a connection error occurs with the printing device 300 in the process of S1307, the MAC address of the printing device 300 to which the connection was attempted is stored together with a setting value indicating that a connection error has occurred. On the other hand, if no connection error occurs in S1307, a setting value indicating that there was no connection error is stored. Furthermore, if the process of S1307 has never been performed, the setting value in the case where no connection error occurs is saved as the initial value.

[0088] Next, the flow of processing using this error information will be described.

[0089] In step S1301, the terminal device 200 acquires tag information from the NFC tag of the printing device 300. The tag information includes three types of information related to the network settings of the printing device 300, similar to the first embodiment.

[0090] S1302 and S1309 are the same as S1103 and S1112, and therefore detailed explanations will be omitted.

[0091] If it is determined in S1302 that the printing device 300 is not in the AP mode, the process proceeds to S1303.

[0092] In S1303, the terminal device 200 acquires connection error information stored in the terminal device 200. Then, it is determined whether the connection error information is a setting value indicating that an error has occurred, and whether the MAC address of the printing device 300 acquired in S1301 matches the MAC address of the printing device 300 included in the error information. If the determination in S1303 is Yes, the terminal device 200 skips S1304-S1305 and proceeds to S1307.

[0093] On the other hand, if the result of the determination in S1303 is No, the process proceeds to S1304. Since S1304-S1306 are the same processes as S1104-S1106, detailed description thereof will be omitted.

[0094] In S1307, the same process as in S1107 is performed, and finally, the connection error information is updated.

[0095] Since S1310 is the same process as S1109, a detailed description thereof will be omitted.

[0096] As a result, in this embodiment, if a connection error caused by an NFC touch occurred last time, it is possible to skip the relatively time-consuming process of identifying the printing device (the process of S1305, also called the determination process). As a result, it is possible to shorten the time required to issue an instruction to transition to AP mode when touching again. This makes it possible to reduce the possibility of a connection error occurring again, even if the user removes the terminal device 200 from the printing device 300 immediately after performing a touch operation.

[0097] Furthermore, since there is a high possibility that the user will immediately perform a re-touch operation when a connection error occurs, the connection error information may include the time of occurrence of the error. Specifically, in the judgment of S1303, the difference between the current time and the error occurrence time included in the connection error information is compared. Then, if the difference between the previous error occurrence time and the current time is within a predetermined time (for example, within 10 seconds) and the MAC addresses match, the process may proceed to S1307.

[0098] Also, the current connection state of the printing device 300 may be used as a judgment criterion. Specifically, information as to whether the printing device 300 is connected in infrastructure mode may be included in the tag information acquired in S1301, and this information may be saved as connection error information when an error occurs. Then, in the judgment in S1303, if a connection error occurred the previous time in S1307 and the infrastructure connection mode state of the printing device 300 acquired in S1301 matches the infrastructure connection mode state included in the connection error information, the process may proceed to S1307.

[0099] In S1303, the criteria for determining whether to skip the process of identifying the printing device and proceed to S1307 may be a single criterion, such as the MAC address, elapsed time, or change in the connection status of the printing device, or a combination of multiple criterions. In addition, the criteria themselves may be anything that indicates that the status of the printing device 300 may have changed, such as a change in the IP address of the printing device 300 or the SSID in AP mode.

[0100] [Other embodiments] The present invention can also be realized by executing the following process. That is, software (programs) that realize the functions of the above-mentioned embodiments are supplied to a system or device via a network or various storage media, and a computer (or a CPU, MPU, etc.) of the system or device reads and executes the program. The computer that executes the program may be one, or multiple computers may work together to execute the program. Furthermore, hardware such as a circuit that executes part of the program may be provided, and the hardware and a computer that executes the software may work together to execute the process described in the present embodiment. [Explanation of symbols]

[0101] 100 Network 200 Terminal Equipment 201 NFC unit 202 Wireless LAN unit

Claims

1. A program comprising: A computer of the communication device performing a first wireless communication with a target device; a transmission step of transmitting predetermined information to a predetermined network in which the communication device participates after the first wireless communication with the target device is executed; After the predetermined information is transmitted, based on the fact that the communication device has not detected a predetermined response that is received from the predetermined network based on the transmission of the predetermined information and corresponds to the address information of the target device obtained by the first wireless communication with the target device, a second wireless communication is performed to transmit the predetermined information to the target device using a direct wireless connection between the communication device and the target device that is established based on communication information obtained by the first wireless communication with the target device and does not go through an external device that is an external device of the communication device and external to the target device; an execution step of executing a third wireless communication to transmit the predetermined information to the target device using a wireless connection between the communication device and the target device via the external device, based on the predetermined response being detected by the communication device after the predetermined information is transmitted; Run the command, The program, wherein the first wireless communication is performed by a short-range wireless communication method different from a communication method used for the second wireless communication and a communication method used for the third wireless communication.

2. The program described in Claim 1, characterized in that the direct wireless connection between the communication device and the target device without going through the external device is a direct wireless connection between the communication device and the target device using an access point of the target device.

3. The program described in claim 1 or 2, characterized in that the short-range wireless communication method used for the first wireless communication is Near Field Communication (NFC).

4. The program described in claim 1 or 2, characterized in that the short-range wireless communication method used for the first wireless communication is Bluetooth.

5. A program described in any one of claims 1 to 4, characterized in that the communication method used for the second wireless communication and the communication method used for the third wireless communication are wireless LANs.

6. The program described in any one of claims 1 to 5, characterized in that the communication method used for the second wireless communication is Wi-Fi Direct.

7. A program described in any one of claims 1 to 6, characterized in that the short-range wireless communication method used for the first wireless communication has a communication speed different from the communication method used for the second wireless communication and the communication method used for the third wireless communication.

8. A program described in any one of claims 1 to 7, characterized in that the address information of the target device includes a MAC address.

9. A program described in any one of claims 1 to 8, characterized in that the communication information includes at least one of the SSID and password of the target device.

10. A confirmation step of confirming whether or not settings of a communication method used in the second wireless communication and the third wireless communication are valid; a processing step of executing a process for validating the setting if it is confirmed that the setting is not valid; 10. The program according to claim 1, further comprising:

11. Based on communication between the communication device and the target device by the short-range wireless communication method, the target device newly starts operation in a predetermined mode for performing a direct wireless connection between the communication device and the target device without going through the external device; 11. The program according to claim 1, wherein the second wireless communication is communication using a connection between the target device operating in the predetermined mode and the communication device.

12. The program according to claim 11, wherein the specified mode is a mode in which the target device operates as an access point.

13. The program described in Claim 12, characterized in that the target device transitions to the specified mode based on the first wireless communication.

14. A program described in any one of claims 1 to 13, characterized in that the specified information is transmitted to the specified network by broadcast.

15. The program described in Claim 14, characterized in that the specified response is detected by detecting a response including information matching address information of the target device obtained by the first wireless communication from responses received based on the execution of the broadcast from a device participating in the specified network.

16. The target device is a printing device that performs printing, 16. The program according to claim 1, wherein the predetermined information is a print job for causing the target device to execute printing.

17. A program as described in any one of claims 1 to 16, characterized in that the target device is a scanner that performs scanning.

18. A display step of displaying a selection screen for selecting image data is further executed, 18. The program according to claim 1, wherein the predetermined information is information based on image data selected by a user on the selection screen.

19. The program described in Claim 18, characterized in that the first wireless communication with the target device is executed while the selection screen is displayed.

20. The program described in Claim 18, characterized in that the first wireless communication with the target device is executed in a state where a specified screen displaying printing setting information is displayed after the selection screen is displayed.

21. The program described in Claim 20, characterized in that a screen different from the specified screen is displayed based on the first wireless communication being executed with the target device other than the device registered in the specified application.

22. A method for controlling a communication device, comprising: performing a first wireless communication with a target device; a transmission step of transmitting predetermined information to a predetermined network in which the communication device participates after the first wireless communication with the target device is executed; After the predetermined information is transmitted, based on the fact that the communication device has not detected a predetermined response that is received from the predetermined network based on the transmission of the predetermined information and corresponds to the address information of the target device obtained by the first wireless communication with the target device, a second wireless communication is performed to transmit the predetermined information to the target device using a direct wireless connection between the communication device and the target device that is established based on communication information obtained by the first wireless communication with the target device and does not go through an external device that is an external device of the communication device and external to the target device; an execution step of executing a third wireless communication to transmit the predetermined information to the target device using a wireless connection between the communication device and the target device via the external device, based on the predetermined response being detected by the communication device after the predetermined information is transmitted; having A control method, characterized in that the first wireless communication is performed by a short-range wireless communication method different from a communication method used for the second wireless communication and a communication method used for the third wireless communication.

23. A communication device, comprising: An execution means for executing a first wireless communication with a target device; a transmitting means for transmitting predetermined information to a predetermined network in which the communication device participates after the first wireless communication with the target device is executed; After the predetermined information is transmitted, based on the fact that the communication device has not detected a predetermined response that is received from the predetermined network based on the transmission of the predetermined information and corresponds to the address information of the target device obtained by the first wireless communication with the target device, a second wireless communication is performed to transmit the predetermined information to the target device using a direct wireless connection between the communication device and the target device that is established based on communication information obtained by the first wireless communication with the target device and does not go through an external device that is an external device of the communication device and external to the target device; an execution means for executing a third wireless communication to transmit the predetermined information to the target device using a wireless connection between the communication device and the target device via the external device, based on the predetermined response being detected by the communication device after the predetermined information is transmitted; having A communication device, characterized in that the first wireless communication is performed by a short-range wireless communication method different from a communication method used for the second wireless communication and a communication method used for the third wireless communication.