Communication apparatus, control method of the same, electronic apparatus, and system

A communication apparatus comprises a communication unit that wirelessly communicates with an electronic apparatus present within a predetermined range, a detection unit that detects a wireless signal transmitted from the electronic apparatus at a predetermined frequency, and a control unit that performs a function to control the electronic apparatus via the communication unit. The control unit changes the predetermined frequency according to the state of the function.

BACKGROUND OF THE INVENTION

Field of the Invention

The present invention relates to a technique of performing wireless communication.

Description of the Related Art

In recent years, there is a digital camera equipped with Bluetooth® and a Wi-Fi function so that a still image or a moving image recorded by the digital camera can also be used in a mobile phone which is a so-called smartphone. Constant connection to a smartphone by Bluetooth® communication is assumed in such a digital camera, and the digital camera transmits an advertisement packet indicating its presence to its surroundings so that it can be discovered by a connection target smartphone. When the smartphone discovers the digital camera, it performs Bluetooth® communication with the digital camera. When the Bluetooth® communication between the digital camera and the smartphone is completed, the digital camera and the smartphone can perform low power consumption communication. In the Bluetooth®, rapid data transfer can be performed by switching to a wireless LAN connection as needed by an application of the smartphone in a constantly connected state. In addition, encrypted data communication is possible by performing pairing between the digital camera and the smartphone.

In order to perform communication using the Bluetooth®, it is necessary for the smartphone to detect the advertisement packet transmitted by a connection partner device. However, when a frequency of signal detection processing (scanning) on the smartphone is high and a scan period is long, the smartphone consumes excessive electric power. In order to reduce power consumption of the device that performs the scanning, as described in Japanese Patent Laid-Open No. 2015-220470, a method of controlling a scan frequency in response to input of signal that is different from the advertisement packet transmitted by the connection partner device has been proposed.

As described above, in order to reduce power consumption by the scanning, it is necessary to appropriately control the frequency and duration of the scanning.

SUMMARY OF THE INVENTION

The present invention has been made in consideration of the aforementioned problems, and realizes a technique that can control scan frequency appropriately and reduce power consumption.

In order to solve the aforementioned problems, the present invention provides a communication apparatus comprising: a communication unit configured to wirelessly communicate with an electronic apparatus present within a predetermined range; a detection unit configured to detect a wireless signal transmitted from the electronic apparatus at a predetermined frequency; and a control unit configured to perform a function to control the electronic apparatus via the communication unit; wherein the control unit changes the predetermined frequency according to the state of the function.

In order to solve the aforementioned problems, the present invention provides an electronic apparatus comprising: a communication unit configured to wirelessly communicate with a communication apparatus present within a predetermined range; and a control unit configured to control the communication unit to transmit a wireless signal that notifies the communication apparatus of the presence of the electronic apparatus; wherein the wireless signal contains information that indicates whether it is possible to connect to the communication apparatus.

In order to solve the aforementioned problems, the present invention provides a system in which a communication apparatus wirelessly communicates with an electronic apparatus present within a predetermined range; wherein the electronic apparatus comprises: a communication unit configured to wirelessly communicate with the communication apparatus present within the predetermined range; and a control unit configured to control the communication unit to transmit a wireless signal that notifies the communication apparatus of the presence of the electronic apparatus; wherein the communication apparatus comprises: a communication unit configured to wirelessly communicate with the electronic apparatus present within the predetermined range; a detection unit configured to detect a wireless signal transmitted from the electronic apparatus at a predetermined frequency; and a control unit configured to perform a function to control the electronic apparatus via the communication unit; wherein the control unit of the communication apparatus changes the predetermined frequency according to the state of the function.

In order to solve the aforementioned problems, the present invention provides a method of controlling a communication apparatus having a communication unit configured to wirelessly communicate with an electronic apparatus present within a predetermined range, the method comprising: detecting a wireless signal transmitted from the electronic apparatus at a predetermined frequency; and performing a function to control the electronic apparatus via the communication unit; wherein the performing changes the predetermined frequency according to the state of the function.

In order to solve the aforementioned problems, the present invention provides a non-transitory computer-readable storage medium storing a program for causing a computer to function as a communication apparatus comprising: a communication unit configured to wirelessly communicate with an electronic apparatus present within a predetermined range; a detection unit configured to detect a wireless signal transmitted from the electronic apparatus at a predetermined frequency; and a control unit configured to perform a function to control the electronic apparatus via the communication unit; wherein the control unit changes the predetermined frequency according to the state of the function.

In order to solve the aforementioned problems, the present invention provides a non-transitory computer-readable storage medium storing a program for causing a computer to function as an electronic apparatus comprising: a communication unit configured to wirelessly communicate with a communication apparatus present within a predetermined range; and a control unit configured to control the communication unit to transmit a wireless signal that notifies the communication apparatus of the presence of the electronic apparatus; wherein the wireless signal contains information that indicates whether it is possible to connect to the communication apparatus.

According to the present invention, it is possible to control the scan frequency appropriately and reduce power consumption.

DESCRIPTION OF THE EMBODIMENTS

Embodiments of the present invention will be described in detail below. The following embodiments are merely examples for practicing the present invention. The embodiments should be properly modified or changed depending on various conditions and the structure of an apparatus to which the present invention is applied. The present invention should not be limited to the following embodiments. Also, parts of the embodiments to be described later may be properly combined.

First Embodiment

In the present embodiment, the following describes a system in which an electronic apparatus, such as a digital camera100, present within a predetermined range and an external apparatus, such as a smart phone200, perform short-range wireless communication according to Bluetooth® standard. Note that the electronic apparatus of the present embodiment is not limited to the digital camera100. For example, the electronic apparatus may be a tablet device, a media player, a surveillance camera, medical equipment, or the like. Also, the external apparatus of the present embodiment is not limited to a smart phone, which is one type of a cellular phone. For example, the external apparatus may be a portable apparatus, such as a wristwatch-type terminal, a spectacle-type terminal, a digital camera with wireless communication capability, a tablet device, a personal computer (PC), or the like.

Configuration of Digital Camera

The configuration and functions of a digital camera of the present embodiment will be generally described with reference toFIGS. 1A to 1C.

FIG. 1Ais a functional block diagram of a digital camera100.FIGS. 1B and 1Care front view and back view of the digital camera100.

A control unit101is an arithmetic processing unit (CPU) which comprehensively controls the overall digital camera100, and implements control sequence (to be described later) by executing programs stored in a nonvolatile memory103(to be described later). Note that a plurality of pieces of hardware may control the overall apparatus by sharing processes instead of making the control unit101control the overall apparatus.

An image capturing unit102includes a lens group including a zoom lens and a focus lens and a shutter having a stop function. The image capturing unit102also includes an image sensor formed from a CCD, CMOS device, or the like which converts an object image into electrical signal, and an A/D converter which converts the analog image signal output from the image sensor into digital signal.

The image capturing unit102has an image processing circuit, and performs image quality adjustment processing of adjusting white balance, color, brightness, and the like with respect to captured image data, and also performs, for example, resize processing to a display size. The image capturing unit102also generates an image file by compressing and coding the image data having undergone image quality adjustment processing by JPEG or the like, and records the file in a recording medium110. In the present embodiment, the image data is recorded in the recording medium110so as to conform to DCF (Design Rule for Camera File System) standard. The image capturing unit102also performs predetermined arithmetic processing by using captured image data. The control unit101then controls the focus lens, stop, and shutter of the image capturing unit102based on the obtained arithmetic result, thereby performing AF (Automatic Focus) processing and AE (Automatic Exposure) processing.

The nonvolatile memory103is an electrically erasable/recordable memory, and, for example, an EEPROM is used. Constants, programs, and the like for the operation of the control unit101are recorded in the nonvolatile memory103. In this case, the programs are those for executing each processing of sequence and flowchart, which will be described later in the present embodiment.

A work memory104is used as a work area where constants and variables for the operation of the control unit101, programs read out from the nonvolatile memory103, and the like are loaded. The work memory104is also used as a buffer memory for temporarily holding the image data captured by the image capturing unit102or an image display memory for a display unit106.

An operation unit105is constituted by operation members such as various types of switches and buttons and a touch panel which accept various types of operations from the user. The operation unit105includes, for example, a shutter button105afor performing image shooting, a reproduction button105bfor performing a reproduction of shot images, and four-directional keys105chaving up, down, left and right buttons for performing various settings of the camera, as shown inFIGS. 1B and 1C. The operation unit105also includes a touch panel105dintegrally formed on the display unit106described later.

The shutter button105ais turned on to generate a first shutter switch signal SW1when the shutter button105ais operated halfway, that is, half-pressed (shooting preparation instruction). Upon receiving the first shutter switch signal SW1, the control unit101controls the image capturing unit102to start an operation such as AF (Automatic Focus) processing, AE (Automatic Exposure) processing, AWB (Automatic White Balance) processing, or EF (Electronic Flash) processing. In addition, the shutter button105ais turned on to generate a second shutter switch signal SW2when the shutter button105ais operated completely, that is, full-pressed (shooting instruction). Upon receiving the second shutter switch signal SW2, the control unit101starts a series of shooting operations from reading out a signal from the image capturing unit102to writing image data in the recording medium110.

The display unit106displays a viewfinder image at the time of shooting, a captured image, and characters for a dialogical operation. The display unit106is, for example, a display device such as a liquid crystal display or organic EL display. The display unit106may be integrally formed with the digital camera100or an external apparatus connected to the digital camera100.

A timer unit107counts time in accordance with time set via the operation unit105by the user, time information acquired from the outside via the communication units111and112, or time information acquired by a radio-controlled clock.

The image capturing unit102records a coded image file in the recording medium110. The control unit101reads out an already recorded image file from the recording medium110. The recording medium110may be a memory card, hard disk drive, or the like mounted in the digital camera100, or a flash memory or hard disk drive built in the digital camera100.

A communication unit111is an interface for connection to an external apparatus. The digital camera100according to the present embodiment can exchange data with an external apparatus via the communication unit111. For example, image data generated in the image capturing unit102can be transmitted to an external apparatus via the communication unit111. Note that in the present embodiment, the communication unit111includes an interface for performing communication with an external apparatus via a so-called wireless LAN complying with the IEEE802.11 standard. The control unit101implements wireless communication with an external apparatus by controlling the communication unit111. Note that the communication method is not limited to a wireless LAN and may include, for example, an infrared communication method.

A communication unit112is an interface for connection to an external apparatus. The digital camera100according to the present embodiment can exchange data with an external apparatus via the communication unit112. For example, image data generated in the image capturing unit102can be transmitted to an external apparatus via the communication unit112. Note that in the present embodiment, the communication unit112includes an interface for performing a short-range wireless communication according to the IEEE802.15.1 standard (so-called Bluetooth®) with an external apparatus. In the present embodiment, the Bluetooth® is in accordance with version 4.0 of Bluetooth® Low Energy (BLE) which is low power consumption, for example. The BLE has a narrower communicable range than the wireless LAN communication (that is, the communicable distance is short). The communication speed or rate of the BLE is slower than wireless LAN communication. On the other hand, the BLE consumes less power than wireless LAN communication. The control unit101implements the short-range wireless communication with an external apparatus by controlling the communication unit112. Note that the communication method is not limited to BLE and may include, for example, a wireless LAN known from the IEEE802.11 standard or an infrared communication method.

Note that the communication unit112of the digital camera100of the present embodiment has either a peripheral mode or a central mode. The digital camera100according to the present embodiment can operate as a BLE peripheral device by causing the communication unit112to operate in the peripheral mode. If the digital camera100is to operate as the peripheral device, communication is possible by connecting the digital camera100to an external apparatus which is set to operate in the central mode. Note that for the authentication of a device serving as a connection partner, the unique information of the device serving as the connection partner is held in the nonvolatile memory103by performing pairing in advance. Also, if power is supplied to a BLE interface module even when the power supply switch is off, the digital camera100can transmit an advertisement packet (to be referred to as an advertisement signal or beacon signal hereinafter).

A close proximity communication unit114is formed from, for example, an antenna for wireless communication, a modulation/demodulation circuit for processing a wireless signal, and a communication controller. The close proximity wireless communication unit114outputs a modulated wireless signal from the antenna and demodulates a wireless signal received from the antenna to implement non-contact near field communication complying with the ISO/IEC18092 standard (so-called NFC: Near Field Communication). The close proximity wireless communication unit114of the present embodiment is arranged on the side surface of the main body unit of the digital camera100.

The digital camera100and smartphone200of the present embodiment start communication and are connected by bringing the close proximity wireless communication unit114and a close proximity wireless communication unit214close to each other. Note that when the close proximity wireless communication unit114is used to connect the digital camera100to the smartphone200, it is not always necessary to bring the close proximity wireless communication unit114and the close proximity wireless communication unit214into contact with each other. Since the close proximity wireless communication unit114and the close proximity wireless communication unit214can communicate with each other if they are only a predetermined distance apart, the units need only be brought close to a range in which close proximity wireless communication is possible in order to connect their respective devices.

The digital camera100of the present embodiment also includes a power supply antenna unit115on the side surface of the camera main body as shown inFIG. 1C. Power supply can be performed by bringing this antenna unit115within a predetermined distance of a power supply device. As a result, non-contact power supply is possible without using a cable or the like, and the start and the end of the power supply can be controlled.

Configuration of Smartphone

Next, the configuration and functions of the smartphone will be generally described with reference toFIG. 2.

The smartphone200according to the present embodiment includes a control unit201, an image capturing unit202, a nonvolatile memory203, a work memory204, an operation unit205, a display unit206, a timer unit207, a recording medium210, communication units211,212and the close proximity wireless communication unit214. The basic functions of the respective elements are the same as those of the digital camera100, and hence a detailed description of them will be omitted.

The nonvolatile memory203stores an OS (operating system) which is the basic software executed by the control unit201and an application which implements an applicable function in cooperation with this OS. Communication processing of the smartphone200according to the present embodiment is implemented by reading software provided by the application. Note that the application has software for using the basic functions of the OS installed in the smartphone200. Note that the OS of the smartphone200can have software to implement processes according to the present embodiment. The application of the present embodiment is assumed to be a camera control application (hereinafter referred to as a camera application) that controls the digital camera100via BLE and performs processing such as shooting of an image and browsing/saving of captured images.

The display unit206displays an image and a GUI (Graphical User Interface) such as characters, figures and symbols for an interactive operation. Further, the display unit206displays an application screen to be described later with reference toFIG. 7displayed by the camera application in the foreground state, and the user can perform a pairing operation and a remote control with the digital camera100by operating this application screen.

The timer unit207counts time based on time information set by the user, time information acquired via the communication unit211, the communication unit212, or a public network connection unit216, or time information acquired by a radio-controlled clock. The timer unit207may also be capable of acquiring, via a detection mechanism, time information from a mechanism such as an analog clock (in this case, the detection mechanism from the analog clock is included in the timer unit207).

The public network connection unit216is an interface used for wireless communication via Wide Area Network (WAN) such as 3G or LTE. The smartphone200can perform telephone call and data communication with another device via the public network connection unit216. When performing telephone call, the control unit201inputs and outputs voice signals via a microphone217and a loudspeaker218. Assume that in this embodiment, the public network connection unit216is not limited to 3G or LTE and it is possible to use another communication scheme such as WiMAX, ADSL or FTTH. In addition, the communication units211,212and the public network connection unit216need not be implemented by independent pieces of hardware. For example, one antenna can have both the functions.

Pairing Via BLE

The following describes pairing of the digital camera100and the smartphone200to perform BLE communication with reference toFIGS. 3A-3C.

Once BLE pairing is started by operation by a user301, the digital camera100transmits an advertisement signal302to the surroundings.

Once BLE pairing is started by operation by the user301, the smartphone200searches for the advertisement signal302transmitted by the communication unit112of the digital camera100. In addition, once the communication unit212receives the advertisement signal302, the smartphone200displays the name of the camera on the display unit206based on the pairing information contained in the advertisement signal302to notify the user that the digital camera100has been detected. Once the user301sees the notification on the display unit206and instructs the smartphone200to connect to the detected digital camera100, the smartphone200transmits a connection request to the digital camera100.

The smartphone200transmits a pairing request to the digital camera100and exchanges encryption key information to encrypt transmission data, thus allowing the smartphone200and the digital camera100to perform encrypted communication with each other. Subsequently, the smartphone200transmits identification information about the camera application activated on the smartphone200to the digital camera100, and the digital camera100stores the identification information received from the smartphone200to complete the pairing. Note that if data communication is to be performed without exchanging key information, that is, without data encryption, the camera application operating on the smartphone200may store the identification information of the digital camera100being paired while only the identification information of the camera application may be stored in the digital camera.

Once the pairing between the digital camera100and the smartphone200is completed by following the above-described procedure, the smartphone200can determine that the digital camera100has been paired when detecting the paired digital camera100.

Processing to Change Scan Frequency

The following describes the processing to change the frequency with which the camera application of the smartphone200detects (scans) the advertisement signal302transmitted by the digital camera100in the system of the present embodiment with reference toFIGS. 3A-3C.

As shown inFIG. 3A, the user301activates the camera application of the smartphone200to start a pairing operation to connect the smartphone200to the digital camera100. Additionally, the user301turns on the power supply to the digital camera100and activates the BLE function of the digital camera100to start a pairing operation to connect to the smartphone200.

Once starting pairing, the digital camera100transmits a BLE advertisement signal302as shown inFIG. 4to the surroundings, and the display unit206of the smartphone200shows a list of the camera name of the digital camera100detected by the camera application of the smartphone200. The display unit206shows a camera application screen of the smartphone200to be described below in connection withFIG. 7. To allow the smartphone200to immediately find and be paired with a digital camera100, the camera application screen is updated each time a digital camera100has been detected or disappeared. When the application screen is in the foreground state, in which the application screen is displayed by the camera application, the smartphone200increases the predetermined scan frequency (the first frequency or cycle) by narrowing the intervals between scans. Note thatFIGS. 3A-3Cschematically show the frequencies303with which the close proximity wireless communication unit214of the smartphone200scans for the beacon signal.

FIGS. 3B-3Cshow the state in which the camera application has transited to the background state due to an operation of the user301. When the camera application of the smartphone200is in the background state, in which the camera application does not display the application screen, the user301no longer needs to check the application screen of the smartphone200. In this case, as shown inFIG. 3C, the smartphone200can reduce the power consumption due to scanning and thus the battery consumption of the smartphone200by increasing the intervals between scans to lower the predetermined scan frequency (to the second frequency or cycle).

Data Structure Diagram of Advertisement Signal

The data configuration of the BLE advertisement signal of the present embodiment will be described hereinafter with reference toFIG. 4.

The advertisement signal transmitted by the digital camera100includes a manufacture data region401into which specific information, such as a device name, a unique device ID, and a service ID, can be freely added. A camera ID402, which is an individual identifier of the digital camera100, and pairing information403that indicates the state of pairing between the digital camera100and the smartphone200are written in the manufacture data region401as the specific information.

The smartphone200is capable of determining whether or not the smartphone200is compatible with the digital camera based on the camera ID402and also capable of detecting a pairing request from the digital camera100by determining from the pairing information402whether or not pairing has been made.

Sequence to Control Scan Frequency

The following describes the sequence to control the frequency with which the smartphone200scans for the advertisement signal of a digital camera100with reference toFIG. 5.

The following describes a case in which the smartphone200detects a plurality of digital cameras100(cameras100A and100B).

In T501, the user activates the camera application220of the smartphone200. Upon activation, the camera application220transits to the foreground state to display the application screen, where a user operation can be received.

In T502a, the camera application220performs scan control to set the scan frequency to a high level in order to immediately detect digital cameras100and present the list of digital cameras100to the user. Specifically, the API to cause an OS230to perform various operations is called.

In T503, the camera application220transmits a scan start command to the OS230to perform scanning at a high scan frequency.

Upon receiving the scan start command, in T521a, the OS230transmits the scan start command to the communication unit211, which in turn starts scanning at the scan cycle held by the OS230. As a result, the smartphone200is now capable of detecting the advertisement signal transmitted by a digital camera100.

After a predetermined scan cycle has elapsed, in T502b, the application220resumes control to set the scan frequency to a high level. This predetermined scan cycle is a cycle held by the application220, and is shorter than the aforementioned scan frequency held by the OS230. As a result, in T504a, the application220periodically transmits a scan restart command to the OS230to suspend and immediately start scanning. This command may be a single command to both suspend and start scanning, or a scan stop command may be transmitted first, to be followed by a scan start command identical with the command in T503that is subsequently transmitted.

In this way, by repeating a scan restart at a high frequency, high frequency scanning can be implemented in effect. This control is performed for the reasons below. That is, according to the present embodiment, a case is assumed that it is the OS230that can control the scan frequency, and the application220cannot instruct the OS230to change the control scan frequency. Therefore, by repeating a scan restart at a higher frequency than the scan frequency of the OS230, high frequency scanning can be implemented through the control by the application220. In particular, since many known operating systems for smartphones limit control by applications, the present embodiment assumes control for such operating systems. Of course, it is possible to use an embodiment in which the application220directly instructs the OS230to change the control scan frequency.

In T541a, when the user turns on the power supply to the camera100A, the camera100A transmits an advertisement signal to the surroundings in T542b.

Upon periodically receiving a scan restart command from the application220(T504a-T504b), the OS230performs scanning (T521b).

In T505, the camera100A is detected by the scanning performed by the OS230, and the application220receives a device detection notification from the OS230in T522a. Furthermore, the camera application220saves information about the detected camera100A in a detection list.

In T506, which is the next scan cycle, the camera application220clears all the information about the cameras, including the detected camera100A, to detect the latest detection situation and the disappearance situation. In T504c, the camera application220transmits to the OS230a scan restart command whose scan frequency is set higher than that of the OS230. Upon receiving a scan restart command from the camera application220(T504c), the OS230performs scanning (T521c).

As described above, the periodic scan control by the camera application220is performed at a shorter cycle than the scan cycle performed by the OS230. For example, if the scan cycle performed by the camera application220is to be referred to as a first cycle (for example, one minute), the scan cycle performed by the OS230may be referred to as a second cycle that is longer than the first cycle. In this way, as the camera application220of the present embodiment is incapable of directly instructing the OS230to scan at the first cycle, which is a shorter interval than the second cycle, the scan control through a scan restart command issued by the application220is required.

In T507, the camera application220automatically transits to the background state if an application other than the camera application220is activated by a user operation or after a predetermined time has elapsed to reduce the battery power consumption. In this case, the camera application220causes the OS230to execute the background processing of the camera application220(T508) and stops transmitting scan restart commands to the OS230. This causes the OS230to perform scanning at its scan cycle, which is longer than the scan cycle of the camera application220(T521d).

In T541b, when the user turns on the power supply to the camera100B, the camera100B transmits an advertisement signal to the surroundings in T542b. In this case, as the camera application220does not immediately detect the camera100B as scanning is being performed at a scan cycle of the OS230that is longer than the scan cycle of the camera application220(T521d).

Subsequently, when detecting the camera100B upon completion of the scan cycle of the OS230(T521d), the OS230transmits a device detection notification to the camera application220(T522b).

In T509, the camera application220saves, in the detection list, information about the camera100B detected in the scan cycle of the OS230. The OS230continues to perform scanning at its own scan cycle (T521e).

In T510, when the user causes the camera application220to transit back to the foreground state, the camera application220changes the scan frequency to the higher level and outputs a scan restart command to the OS230(T504d).

As described above, in the smartphone200, the camera application220controls the frequency with which the OS230performs scanning according to whether the camera application220has transited to the background state or the foreground state. Additionally, when the camera application220is in the foreground state, it is possible to immediately find the digital camera100to be connected to. Moreover, in the background state, in which the user is not using the camera application220, the smartphone200can reduce its power consumption.

Note that, in the present embodiment, while transition of the camera application220to the background state or the foreground state is discussed as an example of the change in the state of the camera application220, the present invention is not limited to this. For example, the scan frequency may be alternatively controlled depending on whether or not the camera application220is set to display the detection situation of the advertisement signal on the display unit206of the smartphone200(whether or not display settings exists).

Furthermore, when the camera application220presents display to the user to confirm whether or not to acquire information about the location of the digital camera100via BLE, the scan frequency may be changed if the user is unable to view the display because a different function is being used or because a dialog is being displayed.

Moreover, if it is assumed to apply the foregoing to anything other than applications for smartphones, for example, to the OS of the Windows system, the scan frequency may be changed when the scan result screen is minimized or cannot be seen by the user as it is hidden behind another window.

Control of Scan Frequency

The following describes the processing to control the scan frequency with which the smartphone200detects the advertisement signal of the digital camera100with reference toFIGS. 6A and 6B.

FIG. 6Ashows one example of the scan control performed by the camera application220of the smartphone200. This scan control is started when the user activates the camera application220of the smartphone200.

In S601, the camera application220determines whether or not scanning can be started by the OS230, and if it is possible to start scanning, the processing proceeds to S602and, if not, proceeds to S608. The camera application220determines whether or not the OS230can start scanning by determining in the settings of the OS230, for example, whether or not BLE is activated to be able to detect an advertisement signal. Alternatively, it is also possible to determine whether or not the OS230can start scanning by determining whether or not the use authority of BLE of the camera application220is valid.

In S602, scan control to detect a digital camera100is started and the processing proceeds to S603. Details of S602will be described below in connection withFIG. 6B. In S603, the camera application220determines whether or not the user has changed the state of the camera application (transition to the foreground/background). If the state has been changed, the processing proceeds to S604, and, if not, the processing proceeds to S607.

In S604, the camera application220determines whether or not the camera application220has transited to the foreground state. If the camera application220has transited to the foreground state, the processing proceeds to S605, and, if not, the processing proceeds to S606.

In S605, the camera application220sets the scan frequency to that in the scan restart command to be transmitted to the OS230and starts counting time on the timer. In S606, the timer count to transmit the scan restart command is stopped (transmission of the scan restart command is stopped) and the processing proceeds to S607.

In S607, the camera application220determines whether or not the scan control has transited to a condition in which the control is to be stopped or terminated. If the scan control has transited to a condition in which the control is to be stopped or terminated, the processing proceeds to S608, and, if the scan control has transited to a condition in which the control is to be continued, the processing returns to S603. Here, the camera application220determines that the scanning is to be discontinued, for example, if the user has disabled the BLE function of the OS230of the smartphone200or the camera application220is connected to a different digital camera via a wireless LAN.

In S608, the camera application220stops scanning and the processing proceeds to S609.

In S609, the camera application220determines whether or not the user has issued an instruction to terminate the application220. If a termination instruction has been issued, the processing is terminated and, if not, the processing returns to S601.

Next, the processing to start the scan control in S602ofFIG. 6Awill be described with reference toFIG. 6B.

In S651, the camera application220starts scanning for an advertisement signal transmitted by the digital camera100and, in S652, transmits a scan start signal to the OS230. Then, the processing proceeds to S653.

In S653, as in S607, the camera application220determines whether or not the scan control has transited to a condition in which the control is to be stopped or terminated. If the scan control has transited to a condition in which the control is to be stopped or terminated, the processing proceeds to S608ofFIG. 6A, and, if the scan control has transited to a condition in which the control is to be continued, the processing proceeds to S654.

In S654, the camera application220determines whether or not the OS230has detected a digital camera100to connect to. If such a camera is detected, the processing proceeds to S655and, if not, proceeds to S657.

In S655, the OS230outputs a device detection notification (a notification indicating that a digital camera100has been detected) to the camera application220, and the processing proceeds to S656.

In S656, upon receiving the device detection notification from the OS230, the camera application220adds the detected digital camera100to the list held by the application220. Furthermore, the camera application220displays, as an application screen, the list of the camera name of the detected camera100and the like on the display unit206, and presents the list to the user.

In S657, the camera application220determines whether or not the timer is currently counting time in S605or S606inFIG. 6A. If the timer is counting time, the processing proceeds to S658and, if not, returns to S653.

In S658, the camera application220determines whether or not the timer, which is currently counting time in S657, has reached the set time (whether or not the scan cycle has completed). If it has, the processing proceeds to S659and, if not, returns to S653.

In S659, the camera application220clears the information on the current list and the processing proceeds to S660.

In S660, the camera application220transmits a scan restart command to the OS230and the processing returns to S653. Note that, while the camera application220transmits a scan restart command to the OS230in S659and S660, the application220also updates the list if a digital camera100that transmits an advertisement signal has disappeared so as to update the list displayed on the application screen of the display unit206. This allows for presenting the latest detection situation and the disappearance situation to the user.

Application Screen

Next, the application screen displayed on the display unit206by the camera application220of the smartphone200will be described with reference toFIG. 7.

Once the OS230detects an advertisement signal and the camera application220receives a device detection notification from the OS230, the camera application220controls the display unit206to display a pairing dialogue702on the top screen701of the camera application220.

According to the present embodiment, the smartphone200is capable of connecting to the digital camera100via BLE while reducing the power consumption of the smartphone200by controlling the scan frequency according to the state of the camera application220of the smartphone200.

Note that, in the present embodiment, the scan frequency is controlled by adjusting the scan interval. Alternatively, if the camera application220is capable of changing the scan frequency of the OS230, that capability may be used to control the scan frequency.

The present embodiment is directed to the method of connecting the smartphone200and the digital camera100. However, if the camera application220in a device on which a battery is mounted, such as a laptop PC, is used to control scanning, the scan frequency may additionally be controlled according to the state of display, such as minimization or maximization of a window, that shows the scan result, in addition to the foreground state or the background state of the camera application220.

Second Embodiment

The following describes a second embodiment.

Described in connection with the first embodiment is a processing to control the scan frequency according to whether the camera application220of the smartphone200is in the background state or in the foreground state.

The digital camera100is capable of changing the content of the advertisement signal according to the state of the camera or the like. Meanwhile, the following describes the processing according to the second embodiment in which the camera application220performs more detailed control of the scan frequency according to the type of the advertisement signal and the state of the camera application220.

Data Structure of Advertisement Signal

First, the data configuration of the BLE advertisement signal of the present embodiment will be described hereinafter with reference toFIGS. 8A-8B.

The manufacture data region801of the advertisement signal according to the second embodiment contains, in addition to a camera ID802and pairing information803, connection enabled/disabled information804that indicates whether it is possible to automatically connect to the digital camera100without involving user operation.

The digital camera100transmits an advertisement signal after switching the type of the advertisement signal according to whether the power supply is on or off. In particular, the digital camera100, when in the power on state, transmits an advertisement signal1in which information that indicates connection is possible is written in the connection enabled/disabled information804, as shown inFIG. 8A. In addition, the digital camera100, when in the power off state, transmits an advertisement signal2in which information that indicates connection is not possible is written in the connection enabled/disabled information804, as shown inFIG. 8B.

The camera application220of the smartphone200is capable of determining whether or not the smartphone200can automatically connect to the digital camera100based on the connection enabled/disabled information804of the advertisement signal received from the digital camera100. The camera application220of the smartphone200then controls the scan frequency according to the state of the application220and the type of the advertisement signal.

Control of Scan Frequency

Next, the control of the scan frequency by the camera application220according to the second embodiment will be described with reference toFIG. 9.

FIG. 9illustrates the correspondence relationship among the scan frequencies controlled by the camera application220according to the second embodiment, the states of the camera application220, and the types of the advertisement signal of the digital camera100.

When the camera application220is in the foreground state903, the camera application220sets the scan frequency to a high level upon detecting an advertisement signal1(901) that indicates that automatic connection to the digital camera100is allowed. In this way, when a digital camera100is requesting a connection while the user is using the camera application220and the digital camera100, the scan frequency is set high as it is necessary to immediately connect to the digital camera100.

When the camera application220is in the foreground state903, the camera application220sets the scan frequency to a low level upon detecting an advertisement signal2(902) that indicates that automatic connection to the digital camera100is not possible. In this way, when the user selects whether or not to connect to a digital camera100via the camera application220, the scan frequency is set low as it is not necessary to immediately detect the digital camera100.

When the camera application220is in the background state904, the camera application220sets the scan frequency to an intermediate level between the high and low levels (a “middle” scan frequency) upon detecting an advertisement signal1(901) that indicates that automatic connection to the digital camera100is allowed. In this way, when a digital camera100is requesting a connection while the user is not using the camera application220, the scan frequency is set to the middle level as it is possible to receive a request for data from the digital camera100due to the user operating the digital camera100. One possible case in which the digital camera100requests data from the camera application220due to the user operating the digital camera100is, for example, a case where location information of the smartphone200is requested as the user issues a shooting instruction.

When the camera application220is in the background state904, the camera application220sets the scan frequency to a low level upon detecting an advertisement signal2(902) that indicates that automatic connection to the digital camera100is not possible. In this way, when the user selects whether or not to connect to a digital camera100via the camera application220while the user is not using the camera application220, the scan frequency is set low as it is not necessary to immediately detect the digital camera100.

As shown above, according to the present embodiment, more detailed control of the scan frequency can be performed according to the state of the application220and the type of the advertisement signal of the digital camera100. In this way, it is possible to reduce the battery consumption of the smartphone200and to properly control the scan cycle in response to the connection request from the digital camera100.

In the present embodiment, examples in which the scan frequency can be controlled according to the state of the camera application220have been described. However, the state of the transmission of the advertisement signal is also subject to change according to the operation of the digital camera100. Therefore, the scan frequency may be changed after a lapse of predetermined time if a considerable change has occurred in the states of the camera application220and the digital camera100.

Other Embodiments

This application claims the benefit of Japanese Patent Application No. 2017-242231, filed Dec. 18, 2017 which is hereby incorporated by reference herein in its entirety.