Communication device, control method, and program

JP2025013485A5Active Publication Date: 2025-02-21CANON KK
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
JP2024193513
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2024-11-05
Publication Date
2025-02-21
Estimated Expiration
2037-08-10

AI Technical Summary

Technical Problem

Communication devices that can use multiple frequency bands often fail to receive information regarding the frequency band used for connection with external devices during network configuration, leading to inefficient and time-consuming selection processes.

Method used

The communication device is configured to select an appropriate frequency band for connection by receiving setting information that includes frequency band information, and if not available, defaults to a specific frequency band, such as 2.4 GHz, to establish a connection with external devices.

Benefits of technology

This approach allows for efficient and timely connection to external devices by prioritizing a default frequency band when necessary, ensuring reliable communication without prolonged processing times or errors.

✦ 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 communication device capable of using a plurality of frequency bands, in which, when the communication device does not receive information on a frequency band used for connection with an external device, the communication device is allowed to use an appropriate frequency band among the plurality of frequency bands thereby to be connected with the external device.SOLUTION: There is provided a communication device which, when frequency band information on a frequency band used for wireless connection with an external device is included in setting information, is wirelessly connected to the external device by a frequency band on the basis of the frequency band information included in the setting information, and, which, when frequency band information on a frequency band used for wireless connection with the external device is not included in the setting information, is wirelessly connected to the external device by a first frequency band.SELECTED DRAWING: Figure 1
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates to a communication device, a control method, and a program. [Background technology]

[0002] 2. Description of the Related Art There is known a technique for performing a network setting process for wirelessly connecting a communication device such as a printing device and an external device such as an access point.

[0003] Patent Document 1 describes that a communication device and an external device are connected by a communication partner device transmitting AP information (SSID, etc.) that identifies the external device to the communication device. [Prior art documents] [Patent documents]

[0004] [Patent Document 1] JP 2015-023440 A Summary of the Invention [Problem to be solved by the invention]

[0005] In recent years, communication devices that can use multiple frequency bands (for example, 2.4 GHz and 5 GHz) have become widespread. However, in the past, when a communication device that can use multiple frequency bands does not receive information on the frequency band to be used for connecting to an external device in a network setting process, no consideration was given to control for connecting to an external device using an appropriate frequency band among the multiple frequency bands.

[0006] Therefore, the present invention aims to have a communication device capable of using multiple frequency bands, when the communication device does not receive information regarding the frequency band to be used for connecting to an external device, use an appropriate frequency band among the multiple frequency bands to connect to the external device. [Means for solving the problem]

[0007] In order to solve the above problems, a communication device of the present invention comprises: A communication device capable of performing wireless communication in a first frequency band and a second frequency band, A receiving means for receiving setting information used in a process for wirelessly connecting to an external device; a connection means for wirelessly connecting to the external device using a frequency band based on the frequency band information included in the setting information when the setting information includes frequency band information related to a frequency band used for wireless connection with the external device, and for wirelessly connecting to the external device using the first frequency band when the setting information does not include the frequency band information; having When the external device identifies that a specific device is communicating via a first channel among a plurality of communication channels corresponding to the second frequency band, the channel used in the wireless connection between the external device and the communication device via the second frequency band is changed from the first channel to a second channel among the plurality of communication channels corresponding to the second frequency band.

[0008] A communication device of the present invention is a communication device capable of performing wireless communication in a 2.4 GHz frequency band and a 5 GHz frequency band, A receiving means for receiving setting information used in a process for wirelessly connecting to an external device; a connection means for wirelessly connecting to the external device using a frequency band based on the frequency band information included in the setting information when the setting information includes frequency band information related to a frequency band used for wireless connection with the external device, and for wirelessly connecting to the external device using a 2.4 GHz frequency band when the setting information does not include the frequency band information; The present invention is characterized by having the following. Effect of the Invention

[0009] According to the present invention, when a communication device capable of using multiple frequency bands does not receive information regarding the frequency band to be used for connecting to an external device, it is possible to have the communication device use an appropriate frequency band among the multiple frequency bands to connect to the external device. [Brief description of the drawings]

[0010] [Figure 1] FIG. 1 is a schematic diagram of a communication system. [Diagram 2] FIG. 2 is a schematic diagram illustrating the configuration of a mobile terminal. [Diagram 3] FIG. 1 is a schematic diagram illustrating a configuration of a printing device. [Figure 4] 2 is an example of a wireless connection profile. [Diagram 5] 6 is a flowchart showing an automatic network setting process executed by a printing device. [Figure 6] 6 is a flowchart showing an automatic network setting process executed by a printing device. [Figure 7] 6 is a flowchart illustrating a network setting process using a terminal device executed by a printing device. [Figure 8] 6 is a flowchart illustrating a network setting process using a terminal device executed by a printing device. [Figure 9] 6 is a flowchart illustrating a network setting process using a terminal device executed by a printing device. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0011] Hereinafter, an embodiment 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.

[0012] (First embodiment) An information processing device and a communication device included in the communication system of the present embodiment will be described. In the present embodiment, a personal computer (PC) is exemplified as the information processing device, but is not limited thereto. Various devices such as a mobile terminal, a smartphone, a tablet terminal, a PDA (Personal Digital Assistant), and a digital camera can be applied as the information processing device. In the present embodiment, a printer is exemplified as the communication device, but is not limited thereto, and various devices that can perform wireless communication with the information processing device can be applied. For example, the printer can be applied to an inkjet printer, a full-color laser beam printer, a monochrome printer, and the like. In addition to printers, the present invention can also be applied to copiers, facsimile machines, mobile terminals, smartphones, PCs, tablet terminals, PDAs, digital cameras, music playback devices, televisions, and the like. In addition, the present invention can also be applied to multifunction machines having multiple functions such as a copying function, a FAX function, and a printing function.

[0013] First, the configuration of the information processing device of this embodiment and the configuration of the communication device capable of communicating with the information processing device of this embodiment will be described. In addition, the following configuration will be described as an example in this embodiment, but this embodiment is applicable to devices capable of communicating with the communication device, and the functions are not particularly limited to those shown in this figure.

[0014] FIG. 2 is a block diagram showing a schematic configuration of a terminal device 200 which is an information processing device according to this embodiment.

[0015] The terminal device 200 has a main board 201 that performs the main control of the device.

[0016] In the main board 201, the CPU 202 is a system control unit, and controls the entire terminal device 200. The ROM 203 stores various programs, such as a control program executed by the CPU 202 and an embedded operating system (hereinafter, OS) program. In this embodiment, the control program stored in the ROM 203 performs software control such as scheduling and task switching under the management of the embedded OS stored in the ROM 203. The RAM 204 is composed of a memory such as an SRAM (static RAM), stores program control variables, setting values ​​registered by the user, management data of the terminal device 200, and has various work buffer areas. Note that these setting information data may be stored in other storage areas such as the ROM 203 and the non-volatile memory 205 instead of the RAM 204.

[0017] The non-volatile memory 205 is composed of a memory such as a flash memory, and stores data that is to be retained even when the power is turned off. Specifically, the non-volatile memory 205 stores network information such as a password for connecting to a network and authentication information, and setting information of the terminal device 200 such as a list of previously connected communication devices such as MAC addresses and SSIDs. In this embodiment, connection information for a simple connection mode, which will be described later, is also stored. Note that these data may be stored in other storage areas such as the ROM 203 and the RAM 204, instead of the non-volatile memory 205. Also, the CPU 202 may expand the setting information stored in the ROM 303 or the non-volatile memory 205 into the RAM 204, thereby performing processing using the stored data.

[0018] The image memory 206 is configured with a memory such as a DRAM (dynamic RAM), and stores various data such as image data received via a wireless LAN unit 211 or the like, and image data processed by the encoding / decoding processing unit 210 .

[0019] The memory configuration of the terminal device 200 is not limited to this form, and the number, characteristics, storage capacity, etc. can be changed as appropriate according to the application and purpose. For example, the image memory 206 and the RAM 204 may be shared. Also, the image memory 206 is configured with a DRAM or the like, but is not limited to this, and may be configured with a hard disk (hereinafter, HDD), non-volatile memory, etc.

[0020] A data conversion unit 207 performs data conversion such as generating data in a page description language (PDL) or performing color conversion and image conversion on image data.

[0021] The operation unit 208 and the display unit 209 accept various inputs to the terminal device 200 and display various information related to the terminal device 200 .

[0022] The encoding / decoding processor 210 performs various processes such as encoding / decoding and enlargement / reduction on the image data.

[0023] The wireless LAN unit 211 is a unit for realizing wireless LAN communication conforming to standards such as Wi-Fi (Wireless Fidelity) (registered trademark). The wireless LAN unit 211 performs functions such as beacon detection processing and authentication processing for establishing a wireless LAN connection, and transmission of a print job to a communication device with which the wireless LAN connection has been established. The wireless LAN unit 211 is also connected to a system bus 213 via a bus cable 212. The CPU 202 can control the wireless LAN unit 211 and operate an access point (AP) in the terminal device 200.

[0024] In this embodiment, the terminal device 200 transmits a print job to the printing device 300 via the wireless LAN unit 211 to cause the printing device 300 to perform printing. The job to be transmitted is not limited to a print job. For example, it may be a scan job to cause the printing device 300 to perform scanning, a copy job to cause the printing device 300 to perform copying, or a setting command to change the settings of the printing device 300. If the communication device of this embodiment is a storage device or the like, data (image data, video data, etc.) to be stored in the communication device may be transmitted in addition to the job. When a scan job is transmitted to the printing device 300, image data generated by scanning a document based on the scan job is transmitted to the terminal device 200.

[0025] The wireless LAN unit 211 may directly communicate with the printing device 300 by wireless communication, or may communicate via an external device that exists outside the terminal device 200 or the printing device 300. The external device includes an access point, which is a device such as a router device, and a device that can relay communication other than an access point. In this embodiment, the wireless LAN unit 211 uses the IEEE 802.11 series standard (Wi-Fi), but for example, Bluetooth (registered trademark) may also be used. In this embodiment, a method in which the terminal device 200 and the printing device 300 are directly connected without an external device is called a direct connection method. Also, a method in which the terminal device 200 and the printing device 300 are connected via an external device is called an infrastructure (hereinafter, infra) connection method. Also, in this embodiment, the connection via an access point is performed by the wireless LAN unit 211.

[0026] The various components 202 to 212 are connected to each other via a system bus 213 managed by a CPU 202 .

[0027] The terminal device 200 may include a communication unit other than the wireless LAN unit 211. The terminal device 200 may include a plurality of communication units and may be capable of communication by a plurality of types of communication methods. The communication may be performed directly by wireless communication, or via an external access point installed on a network. Examples of communication methods include Bluetooth Low Energy (registered trademark), NFC (Near Field Communication; ISO / IEC IS18092), Wi-Fi Aware, etc. Also, communication may be performed by wire rather than wirelessly.

[0028] FIG. 3 is a block diagram showing a schematic configuration of a printing device 300 which is a communication device of this embodiment.

[0029] The printing device 300 has a main board 301 that performs the main control of the device.

[0030] In the main board 301, the CPU 302 is a system control unit and controls the entire printing device 300. The ROM 303 stores various programs such as a control program executed by the CPU 302 and an embedded OS program. In this embodiment, the control program stored in the ROM 303 performs software control such as scheduling and task switching under the management of the embedded OS stored in the ROM 303. The RAM 304 is composed of a memory such as an SRAM, and stores program control variables, setting values ​​registered by the user, management data of the printing device 300, setting information of mode change conditions described later, and has various work buffer areas. Note that these data may be stored in other storage areas such as the ROM 303 and the non-volatile memory 305 instead of the RAM 304.

[0031] The non-volatile memory 305 is composed of a memory such as a flash memory, and stores data that is to be retained even when the power is turned off. Specifically, network information such as a password for connecting to a network and authentication information, a list of previously connected external devices such as MAC addresses and SSIDs, menu items such as print modes, and setting information of the printing device 300 such as correction information for the recording head are stored. Note that these setting information data may be stored in other storage areas such as ROM 303 and RAM 304 instead of the non-volatile memory 305. Also, the CPU 302 may load the setting information stored in the ROM 303 or non-volatile memory 305 into the RAM 304, thereby performing processing using the setting information.

[0032] The image memory 306 is configured with a memory such as a DRAM, and stores various data such as image data received via a wireless LAN unit 316 or the like, and image data processed by the encoding / decoding processing unit 312 .

[0033] The memory configuration of the printing device 300 is not limited to this form, and the number, characteristics, storage capacity, etc. can be changed as appropriate depending on the application and purpose. For example, the image memory 306 and the RAM 304 may be shared. Also, the image memory 306 is configured with a DRAM or the like, but is not limited to this, and may be configured with a hard disk (hereinafter, HDD), non-volatile memory, etc.

[0034] The data conversion unit 307 performs various image processing such as smoothing, recording density correction, color correction, etc., on the image data included in the received job via an image processing control unit (not shown). By executing these processes, the data conversion unit 307 converts the image data to be printed into high-definition print data, and outputs the converted print data to the recording unit 314.

[0035] The reading unit 310 optically reads an original document using a CIS image sensor (contact image sensor) etc. The reading control unit 308 performs various image processing such as binarization and halftoning on the image signal read by the reading unit 310, thereby outputting high-definition image data.

[0036] The operation unit 309 and the display unit 311 accept various inputs to the printing device 300 and display various information related to the printing device 300 .

[0037] The encoding / decoding processor 312 performs various processes such as encoding / decoding and enlargement / reduction on the image data.

[0038] The paper feed unit 313 holds a recording medium for printing, and supplies the recording medium to the recording unit 314 under the control of the recording control unit 315. It should be noted that the paper feed unit 313 has a plurality of paper feed cassettes.

[0039] The recording control unit 315 controls which of a plurality of paper feed cassettes paper is to be fed from. The recording control unit 315 also plays a role in updating the information in the RAM 304 by periodically reading various information such as the status of the recording unit 314. Specifically, the recording control unit 315 updates information such as the device status (in use, in sleep mode, error occurrence, etc.) and the remaining amount of ink in the ink tank.

[0040] The recording unit 314 executes an image forming process (printing process) for forming (printing) an image on a recording medium with a recording agent such as ink, based on the print data output from the data conversion unit 307 and the print setting information included in the print job. The wireless LAN unit 316 is a unit for realizing wireless LAN communication conforming to standards such as Wi-Fi. The wireless LAN unit 316 performs functions such as transmission processing and authentication processing of connection information for establishing a wireless LAN connection, and reception of a job from a terminal device with which the wireless LAN connection has been established. The wireless LAN unit 316 is also connected to a system bus 318 via a bus cable 317. The CPU 302 can control the wireless LAN unit 211 and operate an access point in the printing device 300. That is, the printing device 300 can operate as a GroupOwner or a soft AP. In this embodiment, the connection via the access point is executed by the wireless LAN unit 316. The above various components 302 to 317 are connected to each other via a system bus 318 managed by the CPU 302.

[0041] The printing device 300 may include a communication unit other than the wireless LAN unit 316. The communication may be performed directly by wireless communication, or may be performed via an access point outside the printing device 300 installed on a network. In this embodiment, when performing direct communication, the printing device 300 operates as a GroupOwner or a soft AP. Examples of communication methods include Bluetooth, NFC, and Wi-Fi Aware. In addition, the communication is not limited to wireless communication, and wired communication may be performed using a wired LAN or the like. The printing device 300 accepts jobs from other external devices such as the terminal device 200 via a network using these communication methods. In this embodiment, the printing device 300 does not use a channel corresponding to the 5 GHz frequency band in direct communication, but uses a channel corresponding to the 2.4 GHz frequency band. However, this is not limited to this form. For example, the printing device 300 may perform direct communication using a channel that is not switched by DFS (a channel that is not used by a specific device such as a weather radar) among channels corresponding to the 5 GHz frequency band, which will be described later.

[0042] In this embodiment, the printing device 300 uses at least one of the 2.4 GHz and 5 GHz frequency bands for wireless connection based on the IEEE 802.11 series standards. The printing device 300 has communication channels corresponding to the available frequency bands. For example, if the 2.4 GHz frequency band is available, the printing device 300 has 13 communication channels assigned to a specific frequency band of the 2.4 GHz frequency band. Also, for example, if the 5 GHz frequency band is available, the printing device 300 has 24 communication channels assigned to a specific frequency band of the 5 GHz frequency band.

[0043] FIG. 1 shows a communication system of this embodiment. The communication system of this embodiment includes a terminal device 200, a printing device 300, and an access point 400. The printing device 300 and the terminal device 200 can be connected to a wireless LAN via an access point 400 outside the respective devices and communicate with each other. In addition, the printing device 300 and the terminal device 200 can each operate as an access point by enabling an access point in each device. Therefore, for example, one of the devices can become an access point and the other device can connect to the access point, so that the terminal device 200 and the printing device 300 can directly connect to the wireless LAN without going through the access point 400. In addition, since both the terminal device 200 and the printing device 300 have a wireless LAN function, peer-to-peer (hereinafter, P2P) communication is possible by mutual authentication.

[0044] The access point 400 is a router device. A router device is a device that relays data communication between devices (for example, between an information processing device and a communication device). In this embodiment, the router device serves as an access point and relays data communication between devices connected to the access point of the router device. The communication method used by the router device may be a wireless communication method, a wired communication method, or both, but in this embodiment, the router device is assumed to have at least a wireless LAN router function that allows communication by a wireless communication method.

[0045] In this embodiment, the printing device 300 is connected to the access point 400 via a wireless LAN. That is, the terminal device 200 is in a state in which it can communicate with the printing device 300 via the access point 400. That is, the terminal device 200 is connected to the printing device 300 via an infrastructure connection. By establishing an infrastructure connection, the printing device 300 and the terminal device 200 can communicate with devices belonging to a network formed by the access point 400. In addition, when the access point 400 is connected to the Internet, the printing device 300 and the terminal device 200 can also use the Internet via the access point 400.

[0046] In this embodiment, a configuration will be described in which a setting process (network setting process) for connecting a printing device 300 and an access point 400 is executed in order to establish the above-mentioned infrastructure connection.

[0047] Specifically, for example, the network setting process method is a method in which the terminal device 200 transmits network setting information to the printing device 300, thereby connecting the printing device 300 to the access point 400. Here, the network setting information is, for example, connection information (Service Set Identifier (hereinafter, SSID), password, etc.) used to connect to the access point 400 to which the printing device 300 is to be connected. Note that the connection information is transmitted from the printing device 300 to the access point 400 when the printing device 300 requests a connection to the access point 400. For example, other network setting process methods include methods called AOSS (AirStation One-Touch Secure System), Raku-Raku Wireless Start, and WPS (Wi-Fi Protected Setup). These methods are methods in which the printing device 300 receives network setting information directly from the access point 400 without going through the terminal device 200, thereby connecting the printing device 300 to the access point 400, and hereinafter, these methods are referred to as automatic setting methods.

[0048] Incidentally, a wireless connection is a connection made using a specific frequency band. In recent years, devices capable of using multiple frequency bands (for example, 2.4 GHz and 5 GHz) have appeared as printing devices 300. The printing device 300 in this embodiment is also capable of wireless connection using multiple frequency bands. When connecting to an access point, the printing device 300 first searches for an access point (AP search) using a communication channel corresponding to an available frequency band. After that, the printing device 300 wirelessly connects to the access point by transmitting a connection request to the access point corresponding to the connection information received as described above, using a communication channel corresponding to the available frequency band.

[0049] If such a printing device 300 does not know which frequency band to use for wirelessly connecting to an access point, it cannot connect to the access point. For example, the printing device 300 may be configured to perform an AP search using a frequency band that it can use and attempt to connect to an access point even if it does not know which frequency band to use. However, since the printing device 300 generally cannot use multiple frequency bands simultaneously, in the above configuration, the printing device 300 uses the frequency bands that it can use one by one in sequence. In that case, the printing device 300 may attempt to connect using a frequency band other than the frequency band for connecting to the access point. That is, even in the above configuration, the printing device 300 may take a long time to connect to an access point or may execute unnecessary processing.

[0050] For this reason, in the network setting process, it is preferable that information (frequency band information) regarding a frequency band that can be used by the access point to be connected is notified to the printing device 300. Note that the frequency band information is also information regarding a frequency band used for connection with the access point to be connected.

[0051] However, depending on the method of the network setting process, the model of the access point to be connected and the type of installed software, and the model of the terminal device 200 executing the network setting process and the type of installed software, information about the frequency band that the access point to be connected can use may not be notified. Specifically, for example, in WPS, whether frequency band information is notified to the printing device 300 depends on the model of the access point, so the information may not be notified to the printing device 300. Also, for example, depending on the type of OS installed in the terminal device 200, the terminal device 200 may not be able to obtain frequency band information, so the information may not be notified to the printing device 300. This causes a problem that the printing device 300 may not be able to identify which frequency band to use in the network setting process.

[0052] Furthermore, for example, if the access point to be connected supports multiple frequencies, multiple pieces of frequency band information (frequency band information) may be notified. Specifically, for example, both information corresponding to 2.4 GHz and information corresponding to 5 GHz may be notified as frequency band information (frequency band information). In this case, too, a problem occurs in that the printing device 300 may not be able to identify which of the multiple frequency bands to use in the network setting process.

[0053] Therefore, in this embodiment, a form will be described in which even if frequency band information is not notified to the printing device 300 in the network setting process, an attempt is made to connect to an access point using an appropriate frequency band.

[0054] In addition, in this embodiment, even when the printing device 300 is notified of multiple pieces of information regarding frequency bands that can be used by the access point to be connected to during the network setting process, a form is described in which an attempt is made to connect to the access point using an appropriate frequency band.

[0055] Specifically, in the above case, the printing device 300 attempts to connect to an access point using 2.4 GHz with priority over 5 GHz. The reason why the printing device 300 attempts to connect to an access point using 2.4 GHz with priority over 5 GHz in this embodiment will be described below.

[0056] In this embodiment, the printing device 300 is capable of simultaneously (in parallel) operating in a mode for communicating via an infrastructure connection (infrastructure communication mode) and a mode for communicating via a direct connection (direct communication mode (P2P mode)). Therefore, the printing device 300 can simultaneously (in parallel) establish and maintain an infrastructure connection and a direct connection.

[0057] A direct connection is a connection in a wireless network established in which the printing device 300 or the terminal device 200 serves as an AP (i.e., a parent station) and the device that is not the AP serves as a client (i.e., a child station). In this embodiment, it is assumed that a wireless network is established in a direct connection with the printing device 300 serving as an AP. Direct communication modes include a WFD (Wi-Fi Direct) mode in which the printing device 300 operates as a GroupOwner, and a soft AP mode in which the printing device 300 operates as a soft AP. In each mode, the SSID and password of the AP enabled by the printing device 300 are different.

[0058] The infrastructure connection is a connection in a wireless network established by the access point 400. The infrastructure connection is a connection in a wireless network established by the access point 400 serving as an AP (i.e., a parent station) and the printing device 300 serving as a client (i.e., a child station).

[0059] In addition, hereinafter, establishing an infrastructure connection and a direct connection simultaneously (in parallel) and operating so as to be able to communicate via the infrastructure connection and the direct connection simultaneously (in parallel) is referred to as simultaneous operation. Note that in simultaneous operation, the terminal device 200 to which the printing device 300 is connected via a direct connection is different from the terminal device 200 to which the printing device 300 is connected via an infrastructure connection. In other words, the printing device 300 can be connected to multiple devices through simultaneous operation.

[0060] Communication by infrastructure connection and communication by direct connection are performed using a specific frequency band (specific channel). Therefore, in both communication by infrastructure connection and communication by direct connection, before communication is started, it is necessary to determine the channel to be used for communication and connection between each device. In addition, in a form in which multiple channels are assigned to one wireless IC chip at the same time for communication, the configuration of each device performing communication and the processing executed by each device become complicated. Therefore, for example, when the printing device 300 operates simultaneously, it is desirable to use a common channel in communication in each mode. That is, it is desirable for the printing device 300 to use only one channel even when operating simultaneously. Therefore, in this embodiment, the wireless LAN unit 316 has only one wireless IC chip that realizes communication by a predetermined channel, and the printing device 300 does not communicate using multiple channels at the same time.

[0061] If the printing device 300 is operating as a GroupOwner or a soft AP, the channel to be used for the direct connection can be freely determined by the printing device 300, which is the parent station. However, the channel to be used for the infrastructure connection is determined by the access point 400, which is the parent station in the infrastructure connection. Therefore, when operating simultaneously, it is preferable for the printing device 300 to determine the channel to be used for the infrastructure connection, determined by the access point 400, as the channel to be used for the direct connection.

[0062] However, in a direct connection using a channel corresponding to 5 GHz, a function called DFS, which will be described below, is applied. Due to the existence of this function, depending on the device configuration, the printing device 300 may not be able to execute a direct connection using a channel corresponding to 5 GHz, or it may not be desirable to execute a direct connection using a channel corresponding to 5 GHz. Specifically, for example, the wireless IC chip of the wireless LAN unit 316 may not be able to operate as a GroupOwner or soft AP (i.e., a parent station) using a channel corresponding to 5 GHz, or it may not be desirable. DFS will be described below.

[0063] A device operating as a GroupOwner or soft AP, or a parent station such as an access point, must execute a technique called DFS (Dynamic Frequency Selection) in communication using a specific frequency band such as 5 GHz. DFS is a technique for controlling communication between devices so that it does not affect weather radars, etc. If a specific device such as a weather radar uses a specific frequency, interference waves will be generated by the specific frequency. In some cases, DFS is also a technique for switching the frequency (channel) used by the parent device within a specific frequency band that includes the specific frequency. Specifically, when the parent device detects interference waves in the frequency used by the parent device, it first stops communication in the specific frequency band for a predetermined time (for example, one minute). During the suspension of communication, the printing device 300 checks whether a new channel to be used after the suspension of communication is released is available (whether a specific device such as a weather radar is not using the frequency corresponding to the channel). If the parent device confirms that the channel is available, it releases the suspension of communication and resumes communication in the new channel. In addition, when a certain base station detects interference waves at a frequency that the base station uses for communication, this corresponds to the base station identifying that a specific device such as a weather radar is using the frequency that the base station uses for communication. In addition, a technology called TPC (Transmit Power Control) is a technology similar to DFS.

[0064] When it is detected that a specific device such as a weather radar is using the communication channel in use, it is the master unit in the communication system that must execute the control to switch the communication channel in use. When the communication channel in use is switched by the master unit, the slave unit follows this process.

[0065] Note that DFS and TPC are applied to communication in a specific frequency band such as 5 GHz, and are not applied to communication in a frequency band such as 2.4 GHz. That is, the printing device 300 does not switch the channel used for communication in the 2.4 GHz frequency band depending on the communication status of a specific device such as a weather radar. This is because a specific device such as a weather radar communicates using the 5.0 GHz frequency band, but does not communicate using the 2.4 GHz frequency band. That is, when communication between devices is performed using the 5 GHz frequency band, channel switching is performed by DFS or TPC. Note that, as described above, when the channel is switched by DFS, the channel is switched between channels corresponding to the 5 GHz frequency band.

[0066] If the printing device 300 uses a wireless chip that does not support DFS, when it is the parent device, it cannot switch the communication channel in use by DFS and cannot perform a direct connection at 5 GHz. Also, as described above, in simultaneous operation, the channel used for the infrastructure connection and the direct connection is shared. A printing device 300 that cannot perform a direct connection using 5 GHz has the problem that it cannot perform simultaneous operation if it uses 5 GHz in the infrastructure connection.

[0067] Even if the printing device 300 uses a wireless chip compatible with DFS and can execute a direct connection at 5 GHz, there are problems as follows. As described above, the channel used for the direct connection may be changed by DFS. However, as described above, in simultaneous operation, the channel used for the infrastructure connection and the direct connection is shared, and the channel used for the infrastructure connection cannot be determined by the printing device 300. That is, even if the channel used for the direct connection is changed by DFS during simultaneous operation, the channel used for the infrastructure connection cannot be changed by the printing device 300, so the channel used for the infrastructure connection and the direct connection cannot be shared. Therefore, there is a problem that the infrastructure connection and the direct connection cannot be maintained in parallel.

[0068] For this reason, even if the printing device 300 is capable of using both the 2.4 GHz and 5 GHz frequency bands, it is preferable to give priority to using the 2.4 GHz band, taking into consideration the fact that simultaneous operations will be performed.

[0069] In addition, even in the case of a printing device 300 that does not perform simultaneous operations, the following problem may occur when an infrastructure connection is established using 5 GHz. As described above, when a channel is switched by DFS, communication between devices is stopped for a certain period of time. Therefore, for example, delays and packet loss may occur in communication between devices using 5 GHz.

[0070] Therefore, in the network setting process, if the printing device 300 is not notified of frequency band information, the printing device 300 of this embodiment attempts to connect to an access point by prioritizing 2.4 GHz over 5 GHz. Also, if the printing device 300 is notified of multiple pieces of information regarding frequency bands that can be used by the access point to be connected to, the printing device 300 attempts to connect to the access point by prioritizing 2.4 GHz over 5 GHz.

[0071] On the other hand, there are also advantages to using 5 GHz. For example, in general, communication at 5 GHz is faster than communication at 2.4 GHz. In addition, in general, communication at 5 GHz is more stable than communication at 2.4 GHz. Also, there are cases where an access point supports 5 GHz but not 2.4 GHz. Therefore, in this embodiment, when only 5 GHz information is notified as frequency band information or when the printing device 300 is instructed by a user or the like to use 5 GHz, the printing device 300 attempts to connect to an access point using 5 GHz.

[0072] First, the network setting process according to the automatic setting method will be described.

[0073] Fig. 5 is a flowchart showing the network setting process by the automatic setting method executed by the printing device 300 in this embodiment. The flowchart shown in Fig. 5 is realized, for example, by the CPU 302 reading a program stored in the ROM 303, the non-volatile memory 305, etc. into the RAM 304 and executing it. The process shown in the flowchart in Fig. 5 is started when a user operation (a command to execute the network setting process) that triggers the network setting process by the automatic setting method is performed. Specifically, the user operation that triggers the network setting process by the automatic setting method is the operation of pressing a predetermined button on the printing device 300.

[0074] In S501, the CPU 302 operates the printing device 300 in an automatic setting mode. The automatic setting mode is a mode in which network setting processing is performed by an automatic setting method. If S501 is executed when the printing device 300 is operating in the direct connection mode, the printing device 300 temporarily stops operating as an AP. In this embodiment, it is assumed that information regarding the operation mode of the printing device 300 is stored in an operation mode storage area in a predetermined memory. Even if S501 is executed when the printing device 300 is operating in the direct connection mode, information indicating that the direct connection mode is valid is continuously stored in the operation mode storage area.

[0075] The network configuration process using the automatic configuration method is executed while not only the printing device 300 but also the access point to which the printing device 300 is to be connected is operating in the automatic configuration mode. As with the printing device 300, the access point starts operating in the automatic configuration mode when a specific button is pressed by the user.

[0076] When the printing device 300 and the access point start operating in the automatic configuration mode, they emit signals indicating that they are operating in the automatic configuration mode. By receiving these signals between the devices, each device discovers the device that is the target of the network configuration process using the automatic configuration method. The devices then connect to each other to exchange information (wireless connection profiles) for executing the network configuration process using the automatic configuration method.

[0077] In S502, the CPU 302 determines whether or not a connection has been made to an access point in the automatic setting mode. If the determination is YES, the CPU 302 proceeds to S503, and if the determination is NO, the CPU 302 proceeds to S504.

[0078] In S505, the CPU 302 determines whether a predetermined time has elapsed (timeout has occurred) since the printing device 300 started operating in the automatic setting mode. If the determination is YES, the CPU 302 assumes that an error has occurred and ends the process. On the other hand, if the determination is NO, the CPU 302 performs the process of S502 again.

[0079] An access point connected to the printing device 300 operating in the automatic configuration mode transmits a wireless connection profile to the printing device 300. The wireless connection profile is information including connection information used for connecting to the access point. If the access point has multiple SSIDs, the wireless connection profile includes multiple profiles corresponding to each SSID. FIG. 4(a) is an example of a wireless connection profile acquired by AOSS. The wireless connection profile acquired by AOSS includes up to eight profiles. FIG. 4(b) is an example of a wireless connection profile acquired by Easy Wireless Start. The wireless connection profile acquired by Easy Wireless Start includes up to two profiles. FIGS. 4(c) and 4(d) are examples of a wireless connection profile acquired by WPS. The wireless connection profile acquired by WPS includes up to six profiles.

[0080] As shown in FIG. 4, one profile is composed of "SSID", "frequency", "authentication method", "encryption method", and "passphrase". By using each piece of information included in one profile, the printing device 300 can connect to an access point. Specifically, for example, the printing device 300 uses a frequency band of 2.4 GHz to connect to an access point having a wireless connection profile shown in FIG. 4(a) using an SSID of "AOSS-1". Note that the information included in "frequency" does not have to be information indicating a frequency corresponding to each SSID, and may be, for example, information indicating a channel corresponding to each SSID. Note that, as described above, the wireless connection profile acquired by WPS may not include information regarding "frequency" (FIG. 4(d)), and therefore information regarding a frequency band that the access point can use may not be notified to the printing device 300.

[0081] In S503, the CPU 302 judges whether or not a wireless connection profile has been received from the connected access point. If the judgment result is YES, the CPU 302 proceeds to S504. Note that the wireless connection profile received from the access point includes multiple profiles. Therefore, when the CPU 302 receives a wireless connection profile, it specifies the number n of profiles included in the wireless connection profile. If the judgment result is NO, the CPU 302 proceeds to S506.

[0082] In S506, the CPU 302 determines whether a predetermined time has elapsed (timeout has occurred) since the printing device 300 started operating in the automatic setting mode. If the determination is YES, the CPU 302 assumes that an error has occurred and ends the process. On the other hand, if the determination is NO, the CPU 302 performs the process of S503 again.

[0083] In S504, the CPU 302 initializes the wireless connection profile counter variable m. Specifically, the CPU 302 assigns 1 to the wireless connection profile counter variable m. Note that the wireless connection profile counter variable m is information stored in the non-volatile memory 305 or the like.

[0084] In S505, CPU 302 judges whether the m-th profile among n profiles is a profile indicating that the access point to be connected supports 2.4 GHz. Specifically, CPU 302 judges whether the "frequency" field in the m-th profile among n profiles includes information indicating "2.4 GHz" or information indicating "a channel supporting 2.4 GHz." If the judgment is YES, CPU 302 proceeds to S508, and if the judgment is NO, CPU 302 proceeds to S511.

[0085] In S511, CPU 302 judges whether the m-th profile among n profiles is a profile indicating that the access point to be connected supports 5 GHz. Specifically, CPU 302 judges whether the "frequency" field in the m-th profile among n profiles includes information indicating "5 GHz" or information indicating "a channel supporting 5 GHz." If the judgment is YES, CPU 302 proceeds to S512, and if the judgment is NO, CPU 302 proceeds to S513.

[0086] If S507 is NO and S511 is NO, the m-th profile out of the n profiles does not include information about the frequency band. That is, the m-th profile out of the n profiles does not notify the frequency band information. As described above, in this embodiment, in such a case, 2.4 GHz is used preferentially.

[0087] Therefore, in S513, the CPU 302 searches for an access point having an SSID corresponding to the m-th profile among the n profiles, using a channel corresponding to 2.4 GHz.

[0088] In S514, the CPU 302 determines whether or not an access point having an SSID corresponding to the m-th profile among the n profiles has been found in the search in S513. If the determination is YES, the CPU 302 proceeds to S508, and if the determination is NO, the CPU 302 proceeds to S515.

[0089] In S515, the CPU 302 searches for an access point having an SSID corresponding to the m-th profile among the n profiles, using a channel corresponding to 5 GHz.

[0090] In S516, the CPU 302 determines whether or not an access point having an SSID corresponding to the m-th profile among the n profiles has been found in the search in S515. If the determination is YES, the CPU 302 proceeds to S512, and if the determination is NO, the CPU 302 terminates the process assuming that an error has occurred.

[0091] In this manner, in this embodiment, the search in S513 (search using 2.4 GHz) is executed before the search in S515 (search using 5 GHz), thereby realizing preferential use of 2.4 GHz.

[0092] In S508, the CPU 302 saves the m-th profile in a storage area (storage area for 2.4 GHz) in a predetermined memory such as the non-volatile memory 305, which is a storage area for storing connection information of access points connectable by 2.4 GHz.

[0093] In S512, the CPU 302 saves the m-th profile in a storage area (storage area for 5 GHz) which is a storage area in a predetermined memory such as the non-volatile memory 305 and which stores connection information of an access point connectable at 5 GHz.

[0094] In S509, the CPU 302 increments the wireless connection profile counter variable m.

[0095] In S510, the CPU 302 determines whether the incremented wireless connection profile counter variable m has exceeded the number n of profiles included in the wireless connection profile. If the determination is YES, the CPU 302 proceeds to S517, and if the determination is NO, the CPU 302 proceeds to S507 again. By repeating the process in this manner, each profile included in the wireless connection profile is stored in the 2.4 GHz storage area or the 5 GHz storage area.

[0096] The process from S517 onwards will be described with reference to Fig. 6. The flowchart shown in Fig. 6 is implemented, for example, by the CPU 302 reading a program stored in the ROM 303, the non-volatile memory 305 or the like into the RAM 304 and executing it.

[0097] In S517, the CPU 302 judges whether or not information is stored in the storage area for 2.4 GHz. That is, the CPU 302 judges whether or not the access point to be connected is an access point that can be connected by 2.4 GHz. If the judgment is YES, the CPU 302 proceeds to S518, and if the judgment is NO, the CPU 302 proceeds to S523.

[0098] In S518, the CPU 302 attempts to connect to the access point to be connected using the information stored in the storage area for 2.4 GHz and the channel corresponding to 2.4 GHz. At this time, if multiple profiles are stored in the storage area for 2.4 GHz, the CPU 302 attempts to connect using them in order. The order of the profiles to be used is not particularly limited, but for example, a profile with an authentication method or encryption method with a high security level may be used preferentially. Specifically, for example, a profile with an authentication method of "WPA2-PSK" may be used preferentially over a profile with an authentication method of "OPEN". Also, specifically, for example, the priority of the encryption method may be "AES" > "TKIP" > "WEP128" > "WEP64". The CPU 302 attempts to connect to the access point to be connected using multiple channels corresponding to 2.4 GHz one by one in order until the connection is successful, but the order of the channels to be used is not particularly limited.

[0099] In S519, the CPU 302 determines whether or not the connection to the connection target access point has been successful in S518. If the determination is YES, the CPU 302 proceeds to S520, and if the determination is NO, the CPU 302 proceeds to S523.

[0100] In S520, CPU 302 saves the profile used for the successful connection in a predetermined memory such as non-volatile memory 305. Also, since the connection between printing device 300 and the access point at 2.4 GHz has been completed at this time and an infrastructure connection at 2.4 GHz can be established, CPU 302 operates printing device 300 in an infrastructure connection mode at 2.4 GHz.

[0101] In S521, the CPU 302 determines whether or not the operation mode storage area contains information indicating that the direct connection mode is valid. If the determination is YES, the CPU 302 proceeds to S522, and if the determination is NO, the CPU 302 ends the process.

[0102] In S522, the CPU 302 operates the printing device 300 in the direct connection mode. If the printing device 300 is operating in the infrastructure connection mode at this time, the simultaneous operations will be executed. As described above, the channel used in the simultaneous operations will be the channel used in the infrastructure connection mode. Even if the channel used in the direct connection mode before the network setting process is executed is different from the channel used in the infrastructure connection mode, the latter will be used in the direct connection mode after the network setting process is executed.

[0103] If the result of S517 is NO, the storage area for 5 GHz contains a profile. Therefore, in S523, the CPU 302 attempts to connect to the access point to be connected using the information stored in the storage area for 5 GHz and the channel corresponding to 5 GHz. At this time, if multiple profiles are stored in the storage area for 5 GHz, the profiles are used in order to attempt connection. The order of the profiles to be used at this time is not particularly limited, but for example, a profile with a high security level of authentication method or encryption method may be used preferentially. The CPU 302 also attempts to connect to the access point to be connected using multiple channels corresponding to 2.4 GHz one by one in order until the connection is successful, but the order of the channels to be used is not particularly limited.

[0104] In S524, the CPU 302 determines whether or not the connection to the connection target access point has been successful in S523. If the determination is YES, the CPU 302 proceeds to S525, and if the determination is NO, the CPU 302 proceeds to S521.

[0105] In S525, CPU 302 saves the profile used for the successful connection in a predetermined memory such as non-volatile memory 305. Also, since the 5 GHz connection between printing device 300 and the access point has been completed at this time and an infrastructure connection can be established at 5 GHz, CPU 302 operates printing device 300 in the 5 GHz infrastructure connection mode.

[0106] In S526, the CPU 302 determines whether or not the operation mode storage area contains information indicating that the direct connection mode is valid. If the determination is YES, the CPU 302 proceeds to S527, and if the determination is NO, the CPU 302 ends the process.

[0107] In S522, the CPU 302 disables the direct connection mode. That is, the information included in the operation mode storage area is rewritten to information indicating that the direct connection mode is disabled. This is because, as described above, simultaneous operation using 5 GHz causes some problems. At this time, the CPU 302 may display a screen on the display unit 311 to notify the user that the direct connection mode is disabled.

[0108] The printing device 300 can operate in the direct connection mode by accepting a specific operation directly from the user via the operation unit 309. However, in this embodiment, when the printing device 300 operates in the infrastructure connection mode at 5 GHz, the printing device 300 does not operate in the direct connection mode (i.e., does not perform a simultaneous operation). Therefore, when the specific operation is accepted while the printing device 300 is operating in the infrastructure connection mode at 5 GHz, the CPU 302 may display a screen on the display unit 311 for confirming whether or not the infrastructure connection mode may be cancelled. Then, when it is confirmed by the user's operation that the infrastructure connection mode may be cancelled, the CPU 302 cancels the infrastructure connection mode at 5 GHz and operates the printing device 300 in the direct connection mode. Canceling the infrastructure connection mode at 5 GHz corresponds to disconnecting the connection with the access point at 5 GHz. Also, instead of this form, for example, when operating in the infrastructure connection mode at 5 GHz, the printing device 300 may be configured not to accept a specific operation for operating in the direct connection mode.

[0109] Next, a network setting process using the terminal device 200 will be described.

[0110] Fig. 7 is a flowchart showing the network setting process using the terminal device 200 executed by the printing device 300 in this embodiment. The flowchart shown in Fig. 7 is realized, for example, by the CPU 302 reading a program stored in the ROM 303, non-volatile memory 305, etc. into the RAM 304 and executing it. The process shown in the flowchart in Fig. 7 is started when a user operation (an instruction to execute the network setting process) that triggers the network setting process using the terminal device 200 is performed on the printing device 300.

[0111] In S701, the CPU 302 operates the printing device 300 in a predetermined mode called a setup mode based on a user operation that triggers the network setting process. The setup mode is a mode in which the printing device 300 accepts the network setting process. If S701 is executed when the printing device 300 is operating in the direct connection mode, the printing device 300 temporarily stops operating as an AP. Even if S701 is executed when the printing device 300 is operating in the direct connection mode, information indicating that the direct connection mode is valid continues to be stored in the operation mode storage area. In addition, the user operation that triggers the network setting process is, for example, an operation on a predetermined screen for operating the printing device 300 in the setup mode, or an operation for transitioning the printing device 300 in the initial setting state from a power-off state to a power-on state. The initial setting state is a state in which the printing device 300 has never performed the network setting process.

[0112] In S702, the CPU 302 executes an AP search, which is a process for searching for access points present around the printing device 300, using a channel corresponding to 2.4 GHz. This searches for access points that can be connected at 2.4 GHz.

[0113] In S703, the CPU 302 executes an AP search using a channel corresponding to 5 GHz, thereby searching for an access point connectable by 5 GHz.

[0114] In S704, CPU 302 stores the results of the AP search in S702 and S703 in a memory such as RAM 304. The results of the AP search include, for example, a list of access points found by the AP search, connection information for connecting to the access points, and information on the frequency and channel used to search for the access points. This allows CPU 302 to identify which access point was found and at what frequency or channel. In other words, CPU 302 can identify the frequency and channel that can be used by the access point found by the AP search.

[0115] In S705, the CPU 302 enables a specific access point in the printing apparatus 300 that is valid only in the setup mode. The specific access point has an SSID that includes a predetermined character string.

[0116] The network setting process using the terminal device 200 is executed by using a setup program, which is a program for executing the network setting process, by the terminal device 200. The terminal device 200 searches for the above-mentioned predetermined access point when a user operation (an instruction to execute the network setting process) that triggers the network setting process is performed on a screen displayed by the setup program. Then, when the terminal device 200 finds the above-mentioned predetermined access point, it directly connects to the printing device 300 via the above-mentioned predetermined access point by Wi-Fi using connection information previously stored in the setup program.

[0117] In S705, the CPU 302 determines whether or not the printing device 300 has made a direct connection with the terminal device 200 via the predetermined access point. If the determination is YES, the CPU 302 proceeds to S707, and if the determination is NO, the CPU 302 proceeds to S708.

[0118] In S708, the CPU 302 determines whether a predetermined time has elapsed (timed out) since the printing device 300 started operating in the setup mode. If the determination is YES, the CPU 302 assumes that an error has occurred and ends the process. On the other hand, if the determination is NO, the CPU 302 performs the process of S706 again.

[0119] In S707 , the CPU 302 transmits the AP search result to the terminal device 200 .

[0120] In S709, the CPU 302 judges whether or not the network setting information is received from the terminal device 200. The network setting information transmitted from the terminal device 200 may be information for connecting to an access point included in the AP search result transmitted by the printing device 300. Also, it may be information for connecting to an access point included in the AP search result executed by the terminal device 200. Also, it may be information for connecting to an access point specified by the user via the terminal device 200. In this embodiment, the network setting information transmitted from the terminal device 200 includes, as frequency band information, information indicating a channel used by the access point to be connected. The CPU 302 can specify whether the channel corresponds to a 2.4 GHz frequency band or a 5 GHz frequency band by referring to information about the channel. Also, the printing device 300 may receive the network setting information in multiple parts rather than all at once. If the CPU 302 judges YES, the process proceeds to S711, and if the CPU 302 judges NO, the process proceeds to S710.

[0121] In S710, the CPU 302 determines whether a predetermined time has elapsed (timed out) since the printing device 300 started operating in the setup mode. If the determination is YES, the CPU 302 assumes that an error has occurred and ends the process. On the other hand, if the determination is NO, the CPU 302 performs the process of S709 again.

[0122] In S711, the CPU 302 disables a predetermined access point in the printing device 300 that is valid only in the setup mode. In other words, the CPU 302 temporarily disconnects the connection with the terminal device 200.

[0123] In S712, the CPU 302 determines whether or not information indicating that the frequency used by the access point to be connected is 2.4 GHz is included in the network setting information received from the terminal device 200. If the determination is YES, the CPU 302 proceeds to S713, and if the determination is NO, the CPU 302 proceeds to S714.

[0124] In S713, the CPU 302 stores the network setting information received from the terminal device 200 in the 2.4 GHz storage area.

[0125] In S714, the CPU 302 determines whether or not information indicating that the frequency used by the access point to be connected is 5 GHz is included in the network setting information received from the terminal device 200. If the determination is YES, the CPU 302 proceeds to S715, and if the determination is NO, the CPU 302 proceeds to S716.

[0126] In S715, the CPU 302 stores the network setting information received from the terminal device 200 in the 5 GHz storage area.

[0127] If the determination in S712 is NO and the determination in S714 is NO, information regarding the frequency used by the access point to be connected is not included in the network setting information received from the terminal device 200. As described above, in this embodiment, 2.4 GHz is used preferentially in such a case, so in S716, the CPU 302 specifies that the frequency used by the access point to be connected is 2.4 GHz.

[0128] The process from S717 onwards will be described with reference to Fig. 8. The flowchart shown in Fig. 8 is implemented, for example, by the CPU 302 reading a program stored in the ROM 303, the non-volatile memory 305 or the like into the RAM 304 and executing it.

[0129] In S717, the CPU 302 judges whether or not network setting information is stored in the 2.4 GHz storage area. That is, the CPU 302 judges whether or not the access point to be connected is an access point that can be connected by 2.4 GHz. If the judgment is YES, the CPU 302 proceeds to S718, and if the judgment is NO, the CPU 302 proceeds to S724.

[0130] In S718, the CPU 302 stores the network setting information stored in the storage area for 2.4 GHz in a predetermined memory such as the non-volatile memory 305.

[0131] In S719, the CPU 302 attempts to connect to the access point to be connected using the network setting information stored in the storage area for 2.4 GHz and a channel corresponding to 2.4 GHz. As described above, in this embodiment, since the frequency band information is information indicating a channel, the CPU 302 attempts to connect to the access point to be connected using the channel indicated by the information among the channels corresponding to 2.4 GHz.

[0132] In S720, the CPU 302 determines whether the connection to the access point to be connected has been successful in S719. If the determination is YES, the CPU 302 proceeds to S721, and if the determination is NO, the CPU 302 proceeds to S722. If the connection to the access point to be connected is successful, the 2.4 GHz connection between the printing device 300 and the access point is completed, and it becomes possible to establish an infrastructure connection at 2.4 GHz. Therefore, the CPU 302 operates the printing device 300 in the infrastructure connection mode at 2.4 GHz.

[0133] In S722, the CPU 302 displays a screen on the display unit 311 indicating that the connection to the access point to be connected has failed. At this time, the CPU 302 may transmit information to the terminal device 200 for displaying a screen on the display unit 209 indicating that the connection to the access point to be connected has failed. The CPU 302 may proceed to S725 and attempt to connect to the access point to be connected using a channel corresponding to 5 GHz. The CPU 302 may also attempt to connect to the access point to be connected using a channel other than the channel used in S719 among channels corresponding to 2.4 GHz.

[0134] In S721, the CPU 302 determines whether or not the operation mode storage area contains information indicating that the direct connection mode is valid. If the determination is YES, the CPU 302 proceeds to S723, and if the determination is NO, the CPU 302 ends the process.

[0135] In S723, the CPU 302 operates the printing device 300 in the direct connection mode. This process is similar to S522.

[0136] If the determination in S717 is NO, it means that the storage area for 5 GHz contains network setting information. Therefore, in S724, the CPU 302 saves the network setting information saved in the storage area for 5 GHz in a predetermined memory such as the non-volatile memory 305.

[0137] In S725, the CPU 302 attempts to connect to the access point to be connected using the network setting information stored in the storage area for 5 GHz and a channel corresponding to 5 GHz. As described above, in this embodiment, since the frequency band information is information indicating a channel, the CPU 302 attempts to connect to the access point to be connected using the channel indicated by the information among the channels corresponding to 5 GHz.

[0138] In S726, the CPU 302 determines whether the connection to the access point to be connected to has been successful in S725. If the determination is YES, the CPU 302 proceeds to S727, and if the determination is NO, the CPU 302 proceeds to S728. Note that if the connection to the access point to be connected to has been successful, the 5 GHz connection between the printing device 300 and the access point is completed, and it becomes possible to establish an infrastructure connection at 5 GHz. Therefore, the CPU 302 operates the printing device 300 in a 5 GHz infrastructure connection mode.

[0139] In S728, the CPU 302 displays a screen on the display unit 311 indicating that the connection to the access point to be connected has failed. At this time, information for displaying a screen on the display unit 209 indicating that the connection to the access point to be connected has failed may be transmitted to the terminal device 200. The CPU 302 may proceed to S719 and attempt to connect to the access point to be connected using a channel corresponding to 2.4 GHz. The CPU 302 may also attempt to connect to the access point to be connected using a channel other than the channel used in S728 among channels corresponding to 5 GHz.

[0140] In S727, the CPU 302 determines whether or not the operation mode storage area contains information indicating that the direct connection mode is valid. If the determination is YES, the CPU 302 proceeds to S729, and if the determination is NO, the CPU 302 ends the process.

[0141] In S729, the CPU 302 disables the direct connection mode. This process is similar to that in S522.

[0142] Next, a method for appropriately executing the network setting process via the terminal device 200, which is different from the above-mentioned method, will be described.

[0143] Fig. 9 is a flowchart showing the network setting process executed by the printing device 300 in this embodiment. The flowchart shown in Fig. 9 is realized, for example, by the CPU 302 reading a program stored in the ROM 303, non-volatile memory 305, etc., into the RAM 304 and executing it. The process shown in the flowchart in Fig. 9 is started when a user operation (an instruction to execute the network setting process) that triggers the network setting process is performed on the printing device 300.

[0144] S901 to S916 are similar to S701 to S716, and therefore the description will be omitted.

[0145] If the determination in S914 is NO, the network setting information received from the terminal device 200 does not include frequency band information. Therefore, the CPU 302 determines whether or not the AP search result saved in S904 includes information included in the network setting information received from the terminal device 200. The information included in the network setting information received from the terminal device 200 is, for example, an SSID, an authentication method, an encryption method, a MAC address, etc. If the determination is YES, the CPU 302 proceeds to S918, and if the determination is NO, the CPU 302 proceeds to S916. Note that if the determination is YES, the CPU 302 identifies frequency information corresponding to the information included in the network setting information received from the terminal device 200 from the AP search result.

[0146] In S918, the CPU 302 determines whether or not the frequency information corresponding to the information included in the network setting information received from the terminal device 200, which is identified from the AP search result, is 2.4 GHz. If the determination is YES, the CPU 302 proceeds to S913, and if the determination is NO, the CPU 302 proceeds to S915.

[0147] The processes after S913 and S915 are similar to those shown in FIG. 8, and therefore will not be described.

[0148] In the above, the embodiment has been described in which network setting information for setting the infrastructure connection mode is received from the terminal device 200, but network setting information for setting the direct connection mode may also be received. In this case, the printing device 300 notifies the terminal device 200 of connection information for connecting to an access point in the printing device 300 that is enabled in the direct connection mode, and then enables the access point and directly connects to the terminal device 200.

[0149] Furthermore, it is preferable that the terminal device 200 transmits information for connecting to the access point to which the terminal device 200 was connected before the network setting process as network setting information for setting the infrastructure connection mode. This causes the printing device 300 to connect to that access point, and when the terminal device 200 reconnects to that access point, an infrastructure connection is established between the terminal device 200 and the printing device 300.

[0150] By adopting the above-mentioned configuration, if frequency band information is not notified to the printing device 300 in the network setting process, the printing device 300 can try to connect to the access point by using 2.4 GHz in preference to 5 GHz. Also, if multiple pieces of information related to frequency bands available for the access point to be connected to are notified to the printing device 300 in the network setting process, the printing device 300 can try to connect to the access point by using 2.4 GHz in preference to 5 GHz.

[0151] (Other embodiments) In the above description, the printing device 300 is compatible with at least one of the 2.4 GHz and 5 GHz frequency bands, but is not limited to this. In other words, the printing device 300 may be compatible with a frequency band other than 2.4 GHz and 5 GHz. The printing device 300 may also be compatible with three or more frequency bands.

[0152] In the above description, when no frequency band information or multiple frequency band information is received in the network setting process, the printing device 300 preferentially uses a channel corresponding to the 2.4 GHz frequency band to connect to the AP. However, this is not limited to the above. For example, in the above description, the printing device 300 may preferentially use a channel that is not switched by DFS (a channel that is not used by a specific device such as a weather radar) among channels corresponding to the 5 GHz frequency band to connect to the AP.

[0153] In the above, a form has been described in which, in the network setting process using the terminal device 200, the printing device 300 operates in the setup mode, and the printing device 300 and the terminal device 200 are connected via Wi-Fi, and the network setting information is received. However, the present invention is not limited to this form, and may be, for example, a form in which the printing device 300 and the terminal device 200 are connected via a communication method other than Wi-Fi and the setting information is received via a communication method other than Wi-Fi. That is, for example, in response to an operation that triggers the operation in the setup mode, the printing device 300 may start operating in a state in which communication with the host terminal 102 is possible via a communication method other than WLAN. The communication method other than WLAN is, for example, Bluetooth Classic (registered trademark), Bluetooth Low Energy (registered trademark), or NFC.

[0154] The above-mentioned embodiment can also be realized by executing the following process. That is, software (programs) that realize the functions of the above-mentioned embodiment are supplied to a system or device via a network or various storage media, and a computer (CPU, MPU, etc.) of the system or device reads and executes the program. The program may be executed by one computer, or may be executed by multiple computers in cooperation with each other. It is not necessary to realize all of the above-mentioned processes by software, and some or all of the processes may be realized by hardware such as ASIC. The CPU is also not limited to one that performs all processes by one CPU, and multiple CPUs may perform processes in cooperation with each other as appropriate. [Explanation of symbols]

[0155] 200 Terminal Equipment 300 Printing equipment

Claims

1. A scanning device that performs wireless communication using the IEEE 802.11 series standard in a first frequency band corresponding to the 2.4 frequency band and a second frequency band corresponding to the 5.0 frequency band, a first receiving means for receiving a first operation from a user for operating the scanning device in a first mode for performing peer-to-peer communication; an operation control means for operating the scanning device in the first mode based on receipt of the first operation; a first establishing means for establishing a first connection between the scanning device operating in the first mode and an information processing device without an external device; a second receiving unit for receiving from the user a second operation for operating the scanning device in a second mode in which communication is performed via the external device; a second establishing means for establishing a second connection between the scanning device operating in the second mode and the external device based on receipt of the second operation; a control means for executing control for causing the scanning device to operate in the second mode rather than in the first mode based on receipt of the second operation while the scanning device is operating in the first mode; a scanning means configured to scan an original document; a transmission means for transmitting image data generated by scanning the document to the information processing device; having after the control is executed, a second connection using the second frequency band is established; after the second connection using the second frequency band is established, the scanning device does not resume operation in the first mode; when the first operation is accepted in a state in which the second connection is established by the second frequency band, disconnecting the second connection and then operating the scanning device in the first mode; 1. A scanning device comprising:

2. The scanning device as described in claim 1, characterized in that a channel corresponding to the second frequency band is not used in peer-to-peer communication.

3. In peer-to-peer communication, a channel corresponding to the second frequency band and not corresponding to Dynamic Frequency Selection is not used, and in peer-to-peer communication, a channel corresponding to the second frequency band and not corresponding to Dynamic Frequency Selection is used.

3. The scanning device according to claim 1 or 2.

4. A scanning device as described in any one of claims 1 to 3, characterized in that in communication via the second connection, a channel corresponding to the first frequency band and a channel corresponding to the second frequency band can be used.

5. Furthermore, a receiving means for receiving setting information after accepting the second operation; having the second connection is established based on the configuration information; 5. A scanning device according to claim 1, wherein the scanning device is a scanning unit.

6. The second connection is established using the first frequency band in preference to the second frequency band when the received configuration information does not include frequency band information corresponding to the first frequency band and does not include frequency band information corresponding to the second frequency band.

6. The scanning device according to claim 5.

7. The second connection is established using the second frequency band in preference to the first frequency band when the received configuration information does not include frequency band information corresponding to the first frequency band and does not include frequency band information corresponding to the second frequency band.

6. The scanning device according to claim 5.

8. When the setting information includes both frequency band information corresponding to the first frequency band and frequency band information corresponding to the second frequency band, the second connection is established using the first frequency band in preference to the second frequency band.

8. A scanning device according to claim 5, wherein the scanning device is a scanning unit.

9. When the setting information includes both frequency band information corresponding to the first frequency band and frequency band information corresponding to the second frequency band, the second connection is established using the second frequency band in preference to the first frequency band.

9. A scanning device according to claim 5, wherein the scanning device is a scanning unit.

10. The setting information is received from the external device or a device different from the external device.

10. A scanning device according to claim 5, wherein the scanning device is a scanning unit.

11. The second connection and a connection for peer-to-peer communication between the scanning device operating in the first mode and the information processing device are established using an IEEE 802.11 series of standards.

11. Scanning device according to any one of the preceding claims.

12. WPS (Wi-Fi Protected Setup) or AOSS (AirStation One-Touch Secure System) is executed based on receipt of the second operation. Scanning device according to any one of the preceding claims.

13. The method of claim 12, wherein after the second connection using the first frequency band is established, the method operates in parallel in both the first mode and the second mode. Scanning device according to any one of the preceding claims.

14. After the second connection using the second frequency band is established based on receiving the second operation, the scanning device resumes operation in the first mode. Scanning device according to any one of the preceding claims.

15. Furthermore, A printing means for printing on a recording medium using a recording agent.

15. Scanning device according to any one of the preceding claims.

16. The recording agent is an ink.

16. A scanning device according to claim 15.

17. A method for controlling a scanning device that performs wireless communication using the IEEE 802.11 series standard in a first frequency band corresponding to the 2.4 frequency band and a second frequency band corresponding to the 5.0 frequency band, comprising: a first receiving step of receiving, from a user, a first operation for operating the scanning device in a first mode for performing peer-to-peer communication; an operation control step of operating the scanning device in the first mode based on the acceptance of the first operation; a first establishing step of establishing a first connection between the scanning device operating in the first mode and an information processing device without an external device; a second receiving step of receiving, from the user, a second operation for operating the scanning device in a second mode in which communication is performed via the external device; a second establishing step of establishing a second connection between the scanning device operating in the second mode and the external device based on the acceptance of the second operation; a control step of executing control for causing the scanning device to operate in the second mode instead of the first mode based on the second operation being accepted while the scanning device is operating in the first mode; a scanning step configured to scan an original document; a transmitting step of transmitting image data generated by scanning the document to the information processing device; having after the control is executed, a second connection using the second frequency band is established; after the second connection using the second frequency band is established, the scanning device does not resume operation in the first mode; when the first operation is accepted in a state in which the second connection is established by the second frequency band, disconnecting the second connection and then operating the scanning device in the first mode; A control method comprising:

18. A program for causing a computer to operate as each of the means of a scanning device described in any one of claims 1 to 16.