Method of controlling information processing apparatus and communication apparatus

A control method includes transmitting, based on reception of a predetermined operation a first command to cause a communication apparatus to search for a predetermined access point using at least one communication channel including a communication channel used by the predetermined access point among a plurality of communication channels available for use by the communication apparatus and without using at least one other communication channel other than the at least one communication channel among the plurality of communication channels available for use by the communication apparatus, the predetermined access point being connected to an information processing apparatus at least when the predetermined operation is received.

BACKGROUND OF THE INVENTION

Field of the Invention

The present invention relates to methods of controlling an information processing apparatus and communication apparatuses.

Description of the Related Art

A technique for executing network setting processing to establish a connection between a communication apparatus and an access point is known (refer to Japanese Patent Application Laid-Open No. 2013-162382).

Meanwhile, there have been an increasing number of apparatuses configured to execute processing to establish a connection between a communication apparatus and an access point, and this gives rise to demands for more appropriate execution of processing to establish a connection between a communication apparatus and an access point.

The present invention is directed to a technique for more appropriate execution of processing to establish a connection between a communication apparatus and an access point.

SUMMARY OF THE INVENTION

According to an aspect of the present invention, a method of controlling an information processing apparatus configured to communicate with a communication apparatus includes receiving a predetermined operation from a user, transmitting, based on the reception of the predetermined operation a first command to cause the communication apparatus to search for a predetermined access point using at least one communication channel including a communication channel used by the predetermined access point among a plurality of communication channels available for use by the communication apparatus and without using at least one other communication channel other than the at least one communication channel among the plurality of communication channels available for use by the communication apparatus, the predetermined access point being connected to the information processing apparatus at least when the predetermined operation is received, transmitting a second command to cause the communication apparatus to search for one or more access points near the communication apparatus using at least the at least one other communication channel in a case where the predetermined access point is not detected by a search executed by the communication apparatus based on the first command, and performing control so that in a case where the predetermined access point is detected by the search executed by the communication apparatus based on the first command, the predetermined access point and the communication apparatus are connected, whereas in the case where the predetermined access point is not detected by the search executed by the communication apparatus based on the first command, one of at least one access point detected by a search executed by the communication apparatus based on the second command and the communication apparatus are connected.

According to another aspect of the present invention, a communication apparatus configured to communicate with an information processing apparatus includes a reception unit configured to receive information about a predetermined access point from the information processing apparatus, the predetermined access point being connected to the information processing apparatus at least when the information processing apparatus receives a predetermined operation from a user, a first search unit configured to execute first search processing to search for the predetermined access point using at least one communication channel including a communication channel used by the predetermined access point among a plurality of communication channels available for use by the communication apparatus and without using at least one other communication channel other than the at least one communication channel among the plurality of communication channels available for use by the communication apparatus in a case where information about the predetermined access point is received, a second search unit configured to execute second search processing to search for at least one access point near the communication apparatus using at least the at least one other communication channel in a case where the predetermined access point is not detected by the first search processing, and an establishment unit configured to establish a connection between the predetermined access point and the communication apparatus in a case where the predetermined access point is detected by the first search processing, or establish a connection between one of at least one access point detected by the second search processing and the communication apparatus in the case where the predetermined access point is not detected by the first search processing.

DESCRIPTION OF THE EMBODIMENTS

Various exemplary embodiments of the present invention will be described in detail below with reference to the drawings. It should be noted that the exemplary embodiments disclosed herein are not intended to limit the scope of the claimed invention and that not every combination of features described in the present exemplary embodiments is always essential to the technical solution of the invention.

An information processing apparatus and a communication apparatus of a communication system according to a first exemplary embodiment will be described below. While a personal computer (PC) is described as an example of the information processing apparatus according to the present exemplary embodiment, the information processing apparatus is not limited to the PC. Various information processing apparatuses such as a mobile terminal, smartphone, tablet terminal, personal digital assistant (PDA), and digital camera are applicable. Further, while a printer is described as an example of the communication apparatus according to the present exemplary embodiment, the communication apparatus is not limited to the printer, and various apparatuses capable of wirelessly communicating with the information processing apparatus are applicable. Examples of applicable printers include an inkjet printer, full-color laser beam printer, and monochrome printer. The present invention is also applicable to not only printers but also copy machines, facsimile apparatuses, mobile terminals, smartphones, PCs, tablet terminals, PDAs, digital cameras, music reproduction devices, and televisions. The present invention is also applicable to multi-functional peripherals that include a plurality of functions such as a copy function, a fax function, and a print function.

First, a configuration of the information processing apparatus according to the present exemplary embodiment and a configuration of the communication apparatus configured to communicate with the information processing apparatus according to the present exemplary embodiment will be described below. While the configuration below is described as an example in the present exemplary embodiment, the present exemplary embodiment is applicable to any apparatuses capable of communicating with a communication apparatus, and is not limited to the illustrated features.

FIG. 1is a system configuration diagram according to the present exemplary embodiment. An information processing apparatus102is the information processing apparatus according to the present exemplary embodiment. A communication apparatus101is the communication apparatus according to the present exemplary embodiment. An access point (AP)103is an external apparatus located outside the information processing apparatus102and the communication apparatus101. Alternatively, the external apparatus can be an apparatus that can relay communication other than an AP. Specifically, the AP103is, for example, a wireless local area network router (wireless LAN router).

The information processing apparatus102and the communication apparatus101are connectable to the AP103. The information processing apparatus102can communicate with the communication apparatus101via the AP103. A method of connecting a terminal apparatus and a communication apparatus via an AP as described above is generally referred to as “infrastructure connection”. In the infrastructure connection, a network environment where a plurality of devices can communicate with one another is established. On the contrary, a method of directly connecting a terminal apparatus and a communication apparatus together (i.e., without an AP therebetween) is referred to as “direct connection”.

In the present exemplary embodiment, the infrastructure connection and the direct connection between the information processing apparatus102and the communication apparatus101are a connection established by a communication method based on the Institute of Electrical and Electronics Engineers (IEEE) 802.11 series standards. The communication method based on the IEEE 802.11 series standards is specifically Wi-Fi®. A communication method for use in the connections is not limited to those described above and, for example, Bluetooth® or Wi-Fi Aware can be used.

Hardware configurations of the information processing apparatus102and the communication apparatus101will be described below with reference to a block diagram inFIG. 2. While the configuration below is described as an example in the present exemplary embodiment, the illustrated functions are not intended to limit the present exemplary embodiment.

The information processing apparatus102includes an input interface (input I/F)202, a central processing unit (CPU)203, a read-only memory (ROM)204, a random access memory (RAM)205, an external storage apparatus206, an output interface (output I/F)207, a display unit208, a keyboard209, and a mouse210. The CPU203, the ROM204, and the RAM205form a computer of the information processing apparatus102. The information processing apparatus102further includes a network interface (first communication unit)211and a universal serial bus (USB) interface (second communication unit)212.

The input I/F202is an interface configured to receive data input and an operation instruction from a user when the mouse210or the keyboard209is operated.

The CPU203is a system control unit and is a processor configured to control the entire information processing apparatus102.

The ROM204stores fixed data such as a control program, data table, and embedded operating system (hereinafter, referred to as “OS”) program to be executed by the CPU203. In the present exemplary embodiment, each control program stored in the ROM204controls software execution such as scheduling, task switching, and interruption processing under management by the embedded OS stored in the ROM204.

The RAM205is a static RAM (SRAM) that requires a backup power source. The RAM205stores data using a primary battery (not illustrated) for data backup so that important data such as a program control variable number is retained without being lost. Further, the RAM205includes a memory area configured to store setting information about the information processing apparatus102and management data of the information processing apparatus102. Further, the RAM205is also used as a main memory and a work memory of the CPU203.

The external storage apparatus206stores an application configured to provide a print execution function and a print job generation program configured to generate a print job that is interpretable by the communication apparatus101. Further, the external storage apparatus206stores various programs such as a program for controlling transmission and reception of information to and from the communication apparatus101connected via the network interface211or the USB interface212and various types of information for use in the programs. A program for setup described below is also stored on the external storage apparatus206.

The output I/F207is an interface configured to control the display unit208to display data and a notification of the state of the information processing apparatus102.

The display unit208includes a light emitting diode (LED) and a liquid crystal display (LCD) and displays data and a notification of the state of the information processing apparatus102. An operation unit such as number input keys, a mode setting key, an enter key, a cancel key, and a power key can be provided on the display unit208to receive user input via the display unit208.

The network interface211controls wireless communication and wired communication via a LAN cable. Specifically, the network interface211connects to the communication apparatus101and/or an external apparatus located outside the information processing apparatus102and the communication apparatus101wirelessly or via a wired LAN and executes data communication. For example, the network interface211is connectable to an AP (not illustrated) in the communication apparatus101. The network interface211and the AP in the communication apparatus101are connected so that the information processing apparatus102and the communication apparatus101can communicate with each other. The network interface211can communicate with the communication apparatus101either directly via wireless communication or via an external apparatus located outside the information processing apparatus102and the communication apparatus101. The external apparatus includes an external AP or an apparatus capable of relaying communication other than an AP. While the IEEE 802.11 series standards (Wi-Fi®) are used in the present exemplary embodiment, Bluetooth®, for example, can be used. Examples of wireless communication methods include Wi-Fi® and Bluetooth®. Further, examples of an external AP include a router apparatus, and the like. In the present exemplary embodiment, a method of connecting the information processing apparatus102and the communication apparatus101directly without an external AP is referred to as a “direct connection method”. Further, a method of connecting the information processing apparatus102and the communication apparatus101via an external AP is referred to as an “infrastructure connection method”. The information processing apparatus102can include a plurality of network interfaces211to perform communication using a plurality of communication methods. Specifically, the information processing apparatus102can include interfaces that perform communication using short-range wireless communication methods such as Bluetooth Low Energy®, near-field communication (NFC), and Wi-Fi Aware. Further, the information processing apparatus102does not have to include the network interface211for wireless communication. Specifically, the information processing apparatus102can include only the network interface211for wired communication and the USB interface212described below as interfaces for communicating with another apparatus.

The USB interface212controls USB connections via a USB cable. Specifically, the USB interface212connects to the communication apparatus101and an apparatus such as an external AP via a USB connection and executes data communication.

The communication apparatus101includes a network interface (communication unit)252, a RAM253, a print engine256, a ROM254, a CPU255, and a USB interface257. The CPU255, the RAM253, and the ROM254form a computer of the communication apparatus101.

The network interface252controls wireless communication and wired communication processing via a LAN cable. Specifically, the network interface252includes an AP for connecting to an apparatus such as the information processing apparatus102as an internal AP of the communication apparatus101. The AP is connectable to the network interface211of the information processing apparatus102. The network interface252can communicate with the information processing apparatus102either directly via wireless communication or via an external AP. Specifically, the network interface252can operate not only as an AP but also as a child device configured to connect to an external AP. While the IEEE 802.11 series standards (Wi-Fi®) are used in the present exemplary embodiment, Bluetooth®, for example, can be used. Further, the network interface252can include hardware configured to function as an AP or can operate as an AP using software that causes the network interface252to function as an AP. The communication apparatus101can include a plurality of network interfaces252to perform communication using a plurality of communication methods. Specifically, the communication apparatus101can include interfaces that perform communication using short-range wireless communication methods such as Bluetooth Low Energy, NFC, and Wi-Fi Aware.

The RAM253is an SRAM that requires a backup power source. The RAM253stores data using a primary battery (not illustrated) for data backup so that important data such as a program control variable number is retained without being lost. Further, the RAM253includes a memory area configured to store setting information about the communication apparatus101and management data of the communication apparatus101. Further, the RAM253is also used as a main memory and a work memory of the CPU255and stores a reception buffer and various types of information. The reception buffer temporarily stores print information received from the information processing apparatus102.

The ROM254stores fixed data such as a control program, data table, and OS program to be executed by the CPU255. In the present exemplary embodiment, each control program stored in the ROM254controls software execution such as scheduling, task switching, and interruption processing under management by the embedded OS stored in the ROM254.

The CPU255is a system control unit and is a processor configured to control the entire communication apparatus101.

The print engine256executes image forming processing to form an image on a recording medium, such as a sheet, by applying a recording agent, such as ink, onto the recording medium based on information stored in the RAM253or a print job received from the information processing apparatus102and outputs a print result. The term “print job” refers to a job that causes the communication apparatus101to execute image forming processing.

In the present exemplary embodiment, the communication apparatus101uses at least one of 2.4 GHz and 5 GHz frequency bands in wireless connection based on the IEEE 802.11 series standards. The communication apparatus101includes communication channels corresponding to the frequency bands available for use. For example, in a case where the 2.4 GHz frequency band is available for use, the communication apparatus101includes 14 communication channels assigned to a predetermined frequency band of the 2.4 GHz frequency band. Further, in a case where, for example, the 5 GHz frequency band is available for use, the communication apparatus101includes 19 communication channels assigned to a predetermined frequency band of the 5 GHz frequency band.

While the case where the information processing apparatus102and the communication apparatus101share the processing as described above is described as an example, the sharing form is not limited to that described above, and any other forms can be employed.

In order to establish a connection using the infrastructure method (hereinafter, “infrastructure connection”) in Wi-Fi® communication, the communication apparatus101according to the present exemplary embodiment operates in an infrastructure mode. In the present exemplary embodiment, the term “infrastructure connection” refers to a form of connection of the communication apparatus101and the information processing apparatus102via an external apparatus that overall controls a network and operates as a parent device, such as the AP103. When operating in the infrastructure mode, the communication apparatus101operates as a child device in the network to which the communication apparatus101belongs.

In the infrastructure mode, the communication apparatus101and the information processing apparatus102are connected via the AP103and can communicate via the AP103. The channels for use in communication in the infrastructure mode can correspond to a frequency band (5.0 Ghz band) other than 2.4 Ghz.

In the present exemplary embodiment, the information processing apparatus102executes network setting (connection setting) to cause the communication apparatus101to operate in the infrastructure mode using wireless communication with the communication apparatus101. The information processing apparatus102executes network setting processing using an application program (program for setup) for executing the network setting installed in the information processing apparatus102. The network setting processing can be executed not wirelessly but via wires or cables.

In a case where the AP103and the communication apparatus101are to be connected and the communication apparatus101is to operate in the infrastructure mode, the information processing apparatus102transmits an infrastructure setting command to cause the communication apparatus101to operate in the infrastructure mode to the communication apparatus101. The infrastructure setting command is, for example, information about the AP103. The information about the AP103is, for example, a service set identifier (SSID) of the AP103and a password for connecting to the AP103.

In the present exemplary embodiment, the infrastructure setting command is transmitted in network setting processing using a peer-to-peer (P2P) connection for network setting processing between the information processing apparatus102and the communication apparatus101. Further, there are two P2P connections for network setting processing in the present exemplary embodiment, a Wi-Fi® connection and a Bluetooth Low Energy connection. A communication method other than Wi-Fi® and Bluetooth Low Energy, such as Classic Bluetooth®, can be used as a P2P connection for network setting processing.

After a Wi-Fi® infrastructure connection or a Wi-Fi® P2P connection is established between the information processing apparatus102and the communication apparatus101by network setting processing, the information processing apparatus102and the communication apparatus101can communicate via the established connection. Specifically, for example, the information processing apparatus102can transmit a print job of causing the communication apparatus101to execute printing or a scan job of causing the communication apparatus101to execute scanning to the communication apparatus101via the established connection.

Meanwhile, an example of a method for identifying an AP that is a connection destination of the communication apparatus101in network setting processing is as follows. Specifically, the communication apparatus101searches for one or more APs near the communication apparatus101using the communication channels available for use by the communication apparatus101, and a connection destination of the communication apparatus101is identified from the AP(s) detected by the search. In this method, the communication apparatus101performs searching a plurality of times using each one of the plurality of communication channels available for use by the communication apparatus101. This search is time-consuming, so that the method has an issue that it takes time to complete network setting processing.

Thus, in the present exemplary embodiment, a form that can reduce the time taken to complete network setting processing will be described below.

FIG. 3is a flowchart illustrating network setting processing executed by the information processing apparatus102. For example, the CPU203reads a program stored in the ROM204or the external storage apparatus206onto the RAM205and executes the read program to thereby realize the flowchart illustrated inFIG. 3. Specifically, the process illustrated in the flowchart inFIG. 3is realized by the program for setup. Further, the process illustrated in the flowchart inFIG. 3is started in a case where a user operation (an instruction to execute network setting processing) that triggers network setting processing is performed on a screen displayed by the program for setup. Further, for example, the process illustrated in the flowchart inFIG. 3is started when the program for setup is activated.

First, in step S301, the CPU203identifies a network setting processing target apparatus. Specifically, the CPU203searches for candidate network setting processing target apparatuses by acquiring information about apparatuses near the information processing apparatus102using an application program interface (API) of the OS of the information processing apparatus102. More specifically, the CPU203acquires information about each apparatus detected by the network interface211and each apparatus connected by the USB interface212. The search executed by the network interface211is referred to as “AP search” and is the processing of searching for APs near the information processing apparatus102. The information acquired at this time is information about a frequency band, encryption method, and communication channel used by the apparatus. Then, the CPU203displays a candidate network setting processing target apparatus list on the display unit208using the acquired information. The network interface211searches for, for example, an apparatus operating as an AP having specific identification information. In the present exemplary embodiment, a user operates the communication apparatus101so that the communication apparatus101operates in a predetermined mode referred to as a “setup mode” in a case where network setting processing is to be executed on the communication apparatus101. The setup mode is a mode in which the communication apparatus101can receive network setting processing and the communication apparatus101operates as a predetermined AP having a predetermined SSID. In a case where the communication apparatus101operates in the setup mode, the network interface211detects the communication apparatus101, so that the communication apparatus101is displayed on the list. If a user selects the communication apparatus101from the displayed list, the CPU203identifies the communication apparatus101as a network setting processing target apparatus. The search for candidate network setting processing target apparatuses can be executed using Wi-Fi® or Bluetooth Low Energy. Further, only the apparatuses having a predetermined SSID among the detected candidates can be displayed on the list. Further, in a case where only one of the detected candidate apparatuses has a predetermined SSID, a network setting processing target apparatus can be identified without displaying the candidates.

Next, in step S302, the CPU203transmits a request to the AP103that is wirelessly connected to the information processing apparatus102, and the CPU203acquires setting information about the AP103. The setting information about the AP103is, for example, setting information (SSID, password) for connecting to the AP103and information about a frequency band, encryption method, and communication channel used by the AP103. The AP103that is wirelessly connected to the information processing apparatus102at this time is an AP connected to the information processing apparatus102at least at the time of the issuance of an instruction to execute network setting processing. Further, in the present exemplary embodiment, the AP103includes a communication channel corresponding to at least one of the 2.4 GHz and 5 GHz frequency bands and uses the communication channel in wireless connection.

In step S303, the CPU203wirelessly connects the communication apparatus101identified in step S301to the information processing apparatus102. At this time, the wireless connection can be established using either one of Wi-Fi® and Bluetooth Low Energy. In a case where the CPU203is to establish a Wi-Fi® wireless connection at this time, the Wi-Fi® wireless connection with the AP103is to be disconnected. Thus, the CPU203stores the setting information about the AP103and then changes the Wi-Fi® wireless connection destination from the AP103to the communication apparatus101. On the other hand, in a case where the CPU203is to establish a Bluetooth Low Energy wireless connection, the Wi-Fi® wireless connection with the AP103is not to be disconnected. Further, in a case where the communication apparatus101is wire-connected to the information processing apparatus102, the processing is skipped.

In step S304, the CPU203identifies the AP103that is a connection destination of the communication apparatus101. Details of this processing will be described below with reference toFIG. 4.

FIG. 4is a flowchart illustrating a process of identifying the AP103that is a connection destination of the communication apparatus101. The process is executed by the information processing apparatus102. The process illustrated in the flowchart inFIG. 4is executed as the processing of step S304in the process illustrated in the flowchart inFIG. 3.

First, in step S401, the CPU203acquires specification information about the communication apparatus101from the communication apparatus101. The specification information about the communication apparatus101contains information about frequency bands and communication channels available for use by the communication apparatus101, destination information about the communication apparatus101, and current setting information about the communication apparatus101. The specification information about the communication apparatus101can be acquired from the communication apparatus101or from a server outside the communication apparatus101.

In step S402, the CPU203determines whether the communication apparatus101can use the communication channel specified by the information acquired in step S302. Specifically, the CPU203determines whether the communication channel specified by the information acquired in step S302is included in the communication channel specified by the information acquired in step S401. The communication channel specified by the information acquired in step S302refers to a communication channel available for use by the AP103to which the information processing apparatus102has been (or is) connected. The communication channel specified by the information acquired in step S401is a communication channel available for use by the communication apparatus101. For example, in a case where the communication channel specified by the information acquired in step S302is a communication channel corresponding to the 5 GHz frequency band and the communication channel specified by the information acquired in step S401is a communication channel corresponding to the 2.4 GHz frequency band, the determination result is “NO”. On the other hand, in a case where the communication channel specified by the information acquired in step S302and the communication channel specified by the information acquired in step S401are both a communication channel corresponding to the 5 GHz frequency band, the determination result is “YES”. The determination herein may be about a frequency band available for use by the apparatus instead of a communication channel available for use by the apparatus. In a case where the determination of “YES” is performed (YES in step S402), the processing proceeds to step S403. On the other hand, in a case where the determination of “NO” is performed (NO in step S402), the processing proceeds to step S406without executing steps S403to S405.

In step S403, the CPU203transmits an AP search execution command to search for the AP103near the communication apparatus101to the communication apparatus101.

Condition information about AP search execution processing can be added to the AP search execution command. Specifically, for example, the CPU203can designate a communication channel or frequency band for use in a search so that the communication apparatus101executes an AP search using only the designated communication channel or the designated frequency band. In a case where the CPU203does not designate a communication channel or frequency band for use in the search, the communication apparatus101executes an AP search using every communication channel of the communication apparatus101. In general, the greater the number of communication channels used in a search is, the longer the time taken to complete the search becomes. Thus, the execution time of an AP search is shorter in a case where a communication channel or frequency band for use in the search is designated than in a case where a communication channel or frequency band for use in the search is not designated.

Further, for example, the CPU203can designate an SSID of a search target AP so that an AP search for an AP having the designated SSID is executed. In a case where an SSID of a search target AP is designated, active scanning is executed as an AP search. Active scanning is a method in which information for acquiring a response from an AP having a designated SSID is broadcast and the AP from which a response is received is detected. On the other hand, in a case where an SSID of a search target AP is not designated, passive scanning is executed as an AP search. Passive scanning is a method of detecting a single or plurality of APs near an apparatus executing an AP search by receiving a beacon transmitted from the single or plurality of APs.

In the present exemplary embodiment, in step S403, the CPU203designates a communication channel that is specified by the information acquired in step S302and also by the information acquired in step S401(i.e., a communication channel available for use by both the AP103and the communication apparatus101). Further, in step S403, the CPU203designates the SSID specified by the information acquired in step S302. Specifically, the CPU203causes the communication apparatus101to search for the AP103to which the information processing apparatus102has been (or is) connected.

In a case where the communication apparatus101receives the command transmitted in step S403, the communication apparatus101executes an AP search based on the designated condition. Specifically, for example, the communication apparatus101executes an AP search using the designated communication channel among the communication channels available for use by the communication apparatus101and without using the communication channels other than the designated communication channel. Since the communication channel to be used is designated, the communication apparatus101can complete execution of an AP search in a shorter length of time than an AP search executed using every communication channel. Specifically, the communication apparatus101broadcasts information for acquiring a response from an AP having the designated SSID using the designated communication channel and determines whether a response is acquired (whether the AP is detected).

The AP search condition designated by the command transmitted in step S403is not limited to the form described above. In the present exemplary embodiment, at least one communication channel including a communication channel used by an AP connected to the information processing apparatus102at the time of at least the issuance of an instruction to execute network setting processing is to be designated. Thus, for example, a plurality of communication channels corresponding to a frequency band used by an AP connected to the information processing apparatus102at the time of at least the issuance of an instruction to execute network setting processing can be designated.

In step S404, the CPU203acquires a result of the AP search executed by the communication apparatus101based on the command transmitted in step S403from the communication apparatus101.

In step S405, the CPU203determines whether an AP having the SSID designated to the communication apparatus101is detected by the AP search executed by the communication apparatus101based on the command transmitted in step S403, based on the result acquired in step S404. In a case where the CPU203determines that an AP having the designated SSID is detected (YES in step S405), the processing proceeds to step S410. On the other hand, in a case where the CPU203determines that an AP having the designated SSID is not detected (NO in step S405), the processing proceeds to step S406.

In step S406, the CPU203transmits an AP search execution command to cause the communication apparatus101to execute an AP search using every communication channel available for use by the communication apparatus101. Thus, the CPU203transmits the AP search execution command in step S406without designating a frequency band or communication channel to be used. Further, the CPU203transmits the AP search execution command in step S406without designating an SSID of a search target AP. Specifically, the CPU203transmits an AP search execution command to cause the communication apparatus101to execute passive scanning.

In a case where the communication apparatus101receives the transmitted AP search execution command, the communication apparatus101executes passive scanning using every communication channel available for use by the communication apparatus101. This detects an AP near the communication apparatus101.

The AP search condition designated by the command transmitted in step S406is not limited to the form described above. In the present exemplary embodiment, the condition is to be designated so that the AP search is executed using at least one communication channel other than the communication channel designated by the command transmitted in step S403. Thus, for example, the condition can be designated so that the AP search is executed using the at least one other communication channel without using the communication channel designated by the command transmitted in step S403. In step S407, the CPU203acquires a result of the AP search executed by the communication apparatus101based on the command transmitted in step S406from the communication apparatus101. The search result contains setting information about the AP detected by the AP search.

In step S408, the CPU203displays a list of APs detected by the AP search executed by the communication apparatus101based on the command transmitted in step S406, based on the result acquired in step S407. Then, the CPU203receives a user-selected AP from the list.FIG. 5illustrates an example of a selection screen displayed here. On an AP selection screen510, a list region511displays a list of APs detected by the AP search executed by the communication apparatus101based on the command transmitted in step S406. A broken line512is a mark indicating a selected AP. An input region513is a region configured to receive input of a password for connecting to the selected AP. A selection region514is a region configured to receive selection of an encryption method for use in connecting to the selected AP. An ADD button515is a button for adding an AP other than the listed APs to the list region511. In a case where the ADD button515is pressed, an addition screen for inputting an SSID of a selection target AP is displayed, and an SSID input to the addition screen is added to the list region511. In a case where a NEXT button516is pressed, the processing proceeds to step S409.

In step S409, the CPU203identifies the AP selected on the AP selection screen510in step S408as an AP that is a connection destination of the communication apparatus101. Then, the processing proceeds to step S305.

In step S410, the CPU203identifies the AP detected by the AP search executed by the communication apparatus101based on the command transmitted in step S403as an AP that is a connection destination of the communication apparatus101. In a case where a plurality of APs is detected by the AP search executed by the communication apparatus101based on the command transmitted in step S403, the CPU203identifies one of the plurality of detected APs. In the present exemplary embodiment, the first-detected AP among the plurality of detected APs is identified, but the present exemplary embodiment is not limited to this form. Alternatively, a list of a plurality of detected APs is displayed, and selection of one of the APs is received from a user, and the selected AP is identified. Then, the processing proceeds to step S305.

In step S305, the CPU203generates setting information about the AP identified in step S304. Specific examples of setting information generated in step S305include information about an SSID of the AP identified in step S304and a password for connecting to the AP identified in step S304. Other examples include information about a frequency band or communication channel used by the AP identified in step S304and an encryption method for use in connecting to the AP identified in step S304. The CPU203generates setting information based on the information acquired from the OS in step S302, the information acquired from the communication apparatus101in step S407, and the information input to the AP selection screen510. In a case where an AP connected at the time of the reception of an instruction to execute network setting processing from a user is identified in step S304, the CPU203can acquire a password for connecting to the AP from the OS. Alternatively, the CPU203can display a screen configured to receive input of a password from a user using the program for setup.

In step S306, the CPU203transmits the setting information generated in step S305to the communication apparatus101. The communication apparatus101having received the setting information establishes a Wi-Fi® connection with the AP identified in step S304using the setting information. Specifically, the communication apparatus101performs active scanning to search for an AP having the SSID designated by the setting information using the frequency band or communication channel designated by the setting information. In a case where an AP is detected by the search, a Wi-Fi® connection is established with the AP using the password and encryption method designated by the setting information.

In step S307, the CPU203disconnects the connection with the communication apparatus101and returns to the previous connection state before the establishment of the connection with the communication apparatus101. Specifically, the CPU203re-establishes a connection with the AP connected at the time of the reception of an instruction to execute network setting processing from a user based on the information acquired in step S302. This processing is skipped in a case where the connection with the AP is maintained by connecting to the communication apparatus101via Bluetooth Low Energy or USB. Thereafter, the CPU203completes network setting processing, and the process illustrated in the flowchart ends.

As described above, in the present exemplary embodiment, an AP detected by the AP search by the communication apparatus101is identified as a connection destination of the communication apparatus101that is set by network setting processing. Thus, with the network setting processing, the communication apparatus101is prevented from not being able to connect to an AP when the processing of connecting the communication apparatus101to the AP is executed.

Further, in the present exemplary embodiment, the CPU203causes the communication apparatus101to execute an AP search using only the communication channel used by an AP connected to the information processing apparatus102at the time of the reception of an instruction to execute network setting processing from a user. Then, in a case where the AP is detected by the AP search, the CPU203controls the communication apparatus101to not execute an AP search using the plurality of communication channels. This reduces (shortens) the time taken to execute network setting processing in the present exemplary embodiment. Further, in a case where the AP is not detected by the AP search, the CPU203causes the communication apparatus101to execute an AP search using the plurality of communication channels. Thus, in a case where the AP connected to the information processing apparatus102cannot be set as a connection destination of the communication apparatus101, more APs that are candidate connection destinations of the communication apparatus101are detected.

There is a case where a wireless router operating as an AP connected to the information processing apparatus102at the time of the reception of an instruction to execute network setting processing from a user can use a plurality of frequency bands. Further, there is a case where, for example, the wireless router includes a second AP (AP2) that has the same SSID and password as an AP (AP1) connected to the information processing apparatus102but uses a different frequency band. Further, there is a case where the wireless router includes a function of relaying communication between an apparatus connected to the AP1and an apparatus connected to the AP2. Specifically, in a case where, for example, the AP1uses a communication channel corresponding to the 5 GHz frequency band and the communication apparatus101supports only the 2.4 GHz frequency band, if the communication apparatus101connects to the AP2, the information processing apparatus102and the communication apparatus101can communicate with each other.

Thus, in the present exemplary embodiment, a form will be described below that improves convenience of network setting processing in a case where the communication apparatus101cannot use the communication channel used by the AP connected to the information processing apparatus102.

A communication system similar to that in the first exemplary embodiment is used in the second exemplary embodiment, and those that are not described are similar to those in the first exemplary embodiment.

FIG. 6is a flowchart illustrating a process of identifying the AP103that is a connection destination of the communication apparatus101. The process is executed by the information processing apparatus102. The process illustrated in the flowchart inFIG. 6is executed as the processing of step S304in the process illustrated in the flowchart inFIG. 3.

Steps S601to S610are similar to steps S401to S410, so that descriptions thereof are omitted.

In step S611, the CPU203executes an AP search by passive scanning using a frequency band that is available for use by the communication apparatus101and is different from the frequency band used by the AP connected to the information processing apparatus102. The frequency band available for use by the communication apparatus101is identified based on the specification information about the communication apparatus101that is acquired in step S601. Further, the frequency band used by the AP connected to the information processing apparatus102is identified based on the information acquired in step S302. The timing to execute the AP search is not particularly limited. For example, an AP search using a frequency band that is available for use by the communication apparatus101and is different from the frequency band used by the AP connected to the information processing apparatus102can be executed in the AP search executed in step S301.

In step S612, the CPU203determines whether a specific AP is contained in a list of APs detected by the AP search executed in step S611. The specific AP is an AP that uses a communication channel different from the communication channel used by the AP connected to the information processing apparatus102and has the same SSID as the AP connected to the information processing apparatus102. The SSID of the AP connected to the information processing apparatus102is identified based on the information acquired in step S302. In a case where the CPU203determines that the specific AP is contained (YES in step S612), the processing proceeds to step S613. On the other hand, in a case where the CPU203determines that the specific AP is not contained (NO in step S612), the processing proceeds to step S606.

In step S613, the CPU203transmits an AP search execution command to the communication apparatus101. At this time, a communication channel used by an AP having the same SSID as the AP connected to the information processing apparatus102is designated as a communication channel to be used in the AP search. Further, the same SSID as the AP connected to the information processing apparatus102is designated as an SSID to be detected by the AP search.

In step S614, the CPU203acquires a result of the AP search executed by the communication apparatus101based on the command transmitted in step S613from the communication apparatus101.

In step S615, the CPU203determines whether an AP having the SSID designated to the communication apparatus101is detected by the AP search executed by the communication apparatus101based on the command transmitted in step S613, based on the result acquired in step S614. In a case where the AP is located far from the communication apparatus101or there is an obstacle between the AP and the communication apparatus101, the AP may not be detected by the communication apparatus101. In a case where the CPU203determines that an AP having the designated SSID is detected (YES in step S615), the processing proceeds to step S616. On the other hand, in a case where the CPU203determines that an AP having the designated SSID is not detected (NO in step S615), the processing proceeds to step S606.

In a case where, for example, the wireless router connected to the information processing apparatus102is a tri-band router and includes three or more APs, a plurality of specific APs may be detected by the AP search executed by the information processing apparatus102in step S611. In this case, in step S613, the CPU203designates a communication channel used by one of the plurality of specific APs and an SSID of the one of the plurality of specific APs and transmits an AP search execution command. Then, in step S615, in a case where the CPU203determines that an AP having the designated SSID is not detected (NO in step S615), the processing returns to step S613, and the CPU203designates a undesignated communication channel used by an specific AP and a undesignated SSID of the AP and transmits an AP search execution command.

In step S616, the CPU203identifies the AP having the same SSID as the AP connected to the information processing apparatus102as an AP that is a connection destination of the communication apparatus101. Then, the processing proceeds to step S305.

For example, a single wireless router enables both an AP (AP1) that uses a communication channel corresponding to the 2.4 GHz frequency band and an AP (AP2) that uses a communication channel corresponding to the 5 GHz frequency band. Assume that the communication apparatus101can use the 2.4 GHz frequency band but cannot use the 5 GHz frequency band. Further, assume that the information processing apparatus102is connected to the AP2. In this situation, the communication apparatus101is connected to the AP1without executing a time-consuming AP search using a plurality of communication channels in the present exemplary embodiment.

OTHER EXEMPLARY EMBODIMENTS

The present invention is also realized by a process in which a program for realizing one or more functions of the above-described exemplary embodiments is supplied to a system or apparatus via a network or storage medium and a computer of the system or apparatus reads the program and executes the read program. The computer includes a single or plurality of processors or circuits, and in order to read a computer-executable instruction and execute the read instruction, a network of a plurality of separate computers or a plurality of separate processors or circuits may be included.

This application claims the benefit of Japanese Patent Application No. 2019-197981, filed Oct. 30, 2019, which is hereby incorporated by reference herein in its entirety.