The present invention relates to a communication apparatus that performs wireless communication, a method of controlling the same, and a storage medium.
In recent years, there have been more devices equipped with a function conforming to a very low power consumption communication standard referred to as Bluetooth (registered trademark) Low Enemy (hereinafter referred to as BLE). In BLE communication, an apparatus operating as a peripheral (a peripheral device) transmits a packet referred to as an advertising packet every certain period to thereby inform its presence to an apparatus operating as a central (a central device). The central device, having received the advertising packet transmitted by the peripheral device, transmits to the peripheral device a connection request packet in response to the advertising packet to thereby establish a connection the peripheral device and execute various services.
Japanese Patent Laid-Open No. 2016-170608 (hereinafter, D1) discloses in regard to an information processing apparatus that transmits an advertising packet having content that differs in accordance with an operation mode. According to D1, an information processing apparatus, if operating in a normal operation mode, transmits an advertising packet for permitting transmission of a connection request by an external apparatus, and, if operating in a power saving mode, transmits an advertising packet for not permitting transmission of a connection request by an external apparatus.
However, D1 is something for permitting or prohibiting the generation of a connection request from an external apparatus, and does not give any consideration whatsoever to changing connections between a peripheral device and a plurality of central devices. In BLE communication, a peripheral device cannot connect to a plurality of central devices at the same time. Accordingly, in a case of changing the connection partner of a peripheral from a central device A to a central device B, operation is cumbersome as there is a need to first perform an operation for disconnecting an existing connection on the central device A side, and subsequently perform an operation on the central device B side for causing a connection to be established.
In one embodiment of the present invention, a communication apparatus for reducing the complexity of an operation when changing a connection state in wireless communication, and a method of controlling the same are described.
According to one aspect of the present invention, there is provided a communication apparatus, comprising: a communication unit configured to repeatedly transmit an advertising signal; and a control unit, wherein, in a case of being not connected with a central device via the communication unit, the control unit controls the communication unit to transmit an advertising signal that includes information based on not being connected with the central device, and, in a case of being connected to the central device via the communication unit, the control unit controls the communication unit to transmit an advertising signal that includes information based on being connected with the central device, and wherein, in a case of receiving from another central device a connection request with respect to an advertising signal that includes information based on being connected with the central device, the control unit disconnects a BLE connection with the connected central device, and establishes a BLE connection with the another central device.
According to another aspect of the present invention, there is provided a method of controlling a communication apparatus, the method comprising: using a communication unit to repeatedly transmit an advertising signal; and in a case of being not connected with a central device via the communication unit, controlling the communication unit to transmit an advertising signal that includes information based on not being connected with the central device, and, in a case of being connected to the central device via the communication unit, controlling the communication unit to transmit an advertising signal that includes information based on being connected with the central device, and wherein, in a case of receiving from another central device a connection request with respect to an advertising signal that includes information based on being connected with the central device, a BLE connection with the connected central device is disconnected, and a BLE connection with the another central device is established.
According to another aspect of the present invention, there is provided a non-transitory computer-readable storage medium storing a computer program for causing a computer to execute a control method, the control method comprising: using a communication unit to repeatedly transmit an advertising signal; and in a case of being not connected with a central device via the communication unit, controlling the communication unit to transmit an advertising signal that includes information based on not being connected with the central device, and, in a case of being connected to the central device via the communication unit, controlling the communication unit to transmit an advertising signal that includes information based on being connected with the central device, and wherein, in a case of receiving from another central device a connection request with respect to an advertising signal that includes information based on being connected with the central device, a BLE connection with the connected central device is disconnected, and a BLE connection with the another central device is established.
Further features of the present invention will become apparent from the following description of exemplary embodiments (with reference to the attached drawings).
With reference to the drawings, description is given in detail below regarding embodiments of the present invention.
<Internal Configuration of Peripheral Device and Central Device>
In
An operation unit 105 accepts an operation by a user, and transfers information corresponding to the accepted operation to the control unit 101. The operation unit 105 is configured by a touch panel, button switches, directional keys, or the like. A display unit 106 performs, under control by the control unit 101, a visible display for notifying information to a user. The display unit 106 is configured by a liquid crystal panel, an LED, or the like, for example. An audio output unit 107 controls output of audio for notifying information to a user. The audio output unit 107 is configured by a speaker or the like, for example. The BT communication unit 108 controls wireless communication that complies with a BLE standard. In the case where the communication apparatus 100 is a peripheral device, the BT communication unit 108 operates as a BLE peripheral, and when the communication apparatus 100 is a central device, the BT communication unit 108 operates as a BLE central.
<Network System Configuration>
In
Note that the connection configuration in the BLE communication standard is a star, and it is not possible for the central A device 201 and the central B device 203 to simultaneously establish a connection with the peripheral device 202. What can establish a connection is invariably one of the central A device 201 and the central B device 203. For example, if the central A device 201 establishes a connection with the peripheral device 202 first, the central B device 203 cannot establish a connection with the peripheral device 202 while the central A device 201 maintains its connection. The central A device 201, which has established a connection with the peripheral device 202, can execute services provided by the peripheral device 202.
<Connection Change Processing Sequence>
In the network system configuration illustrated in
In the sequence illustrated in
In step S303, the wireless earphone (202), while receiving the audio data transmitted from the smart phone, periodically transmits an advertising packet that includes communication related information concerning the BLE communication the smart phone (201). The communication related information concerning the BLE communication is specifically information for identifying the smart phone (201) and information concerning a service executed with the smart phone (201).
AdvA is a device address of a device of the side transmitting the advertising packet, and in this step stores the device address of the wireless earphone which is the peripheral device 202. Note that a device address is identification information of a BLE apparatus. AdvData is an arbitrary data region of a maximum of 31 octets. In the present embodiment, the aforementioned communication related information concerning the BLE communication with the smart phone (201) is stored in AdvData. Here, in a case where the amount of information stored is large and cannot fit in the AdvData region, remaining information is stored in ScanRspData of a scan response packet.
The scan response packet is a packet transmitted as a response thereto by the wireless earphone (202) to the digital camera (203) when a scan request packet is transmitted from the digital camera (203) as a response to reception of the advertising packet.
Returning to referring to
In step S306, the digital camera (203) accepts an operation by a user that requests a connection with the wireless earphone (202). This corresponds to the case where “YES” in the selection screen of
In step S308, in response to receiving the connection request packet from the digital camera (203), the wireless earphone (202) transmits a disconnection packet to the smart phone (201), and disconnects the connection with the smart phone (201).
Upon disconnecting communication with the smart phone (201), the wireless earphone (202), in step S309, establishes a connection with the digital camera (203) as a response to the connection request from the digital camera (203) that was received in step S307. In step S310, the digital camera (203) starts a streaming transfer of audio data of the video file, for which playback started in step S304, to the wireless earphone (202). The wireless earphone (202) outputs the received audio data. Upon receiving a connection request in this way from the digital camera (203) (step S307), the wireless earphone (202) disconnects a wireless communication connection with the smart phone (201) (step S308), and establishes a wireless communication connection with the digital camera (203) (step S309). In this way, the wireless earphone (202) changes a wireless communication connection state.
In step S311, the wireless earphone (202), while receiving the audio data transmitted from the digital camera (203), periodically transmits an advertising packet that includes communication related information concerning the BLE communication with the digital camera (203). The communication related information concerning the BLE communication is specifically information for identifying the digital camera (203) and information concerning a service executed with the digital camera (203). Because a method for storing the communication related information is similar to that of step S303, description thereof is omitted.
In step S312, the digital camera (203) accepts a request to stop output of audio data in accordance with an operation by a user. An operation that a user makes to stop playback of a video file is an example of such a user operation. Upon accepting the request to stop output of audio data, in step S313, the digital camera (203) transmits a disconnection packet to the wireless earphone (202), and disconnects the connection. The format of the disconnection packet transmitted here is similar to that of
In step S314, the wireless earphone (202) transmits an advertising message that does not include communication related information. This advertising message, for example, is one that excludes the communication related information concerning BLE communication with the digital camera (203) described above from the advertising message for which transmission started in step S311. In other words, when a wireless communication connection is not established with another communication apparatus, the wireless earphone (202) transmits an advertising message that does not include communication related information. In step S315, the smart phone (201) detects, in accordance with the advertising message received in step S314, that the wireless earphone (202) does not have a connection by BLE with the digital camera (203). The smart phone (201) then transmits a connection request packet to the wireless earphone (202) in response to this detection. In step S316, the wireless earphone (202) establishes a connection with the smart phone (201) in response to step S315. In step S317, the smart phone (201) resumes streaming audio data to the wireless earphone (202).
With reference to
Note that, the processing sequence illustrated in
For example, configuration may be taken to share in advance among central devices a management table that defines, in accordance with the type of a service, a priority order for connections with the wireless earphone (202), to thereby automatically determine whether to change the connection partner of the wireless earphone (202).
As described above, in the embodiment described above, the peripheral device 202, in a state of being connected to the central A device 201, transmits an advertising packet that includes communication related information concerning communication with the central A device 201. The central B device 203 determines whether or not to change the connection to the peripheral device 202 based on the communication related information included in the advertising packet. Consequently, in a case of changing the connection partner of the peripheral device 202 from the central A device 201 to the central B device 203, a user can realize a change of the connection state by operating the central B device 203. Accordingly, it is possible to provide a connecting change that is highly convenient for the user.
Note that, configuration may be taken to input, into the connection request transmitted in step S307, specific information representing that a change of the connection state according to the present embodiment will be performed. The peripheral device 202 changes the connection state upon receiving a connection request that includes such specific information from the central B device 203 which has not established a connection, and ignores the connection request when the connection request does not include such specific information. In this way, it is possible to prevent a change of the connection state from being executed unintentionally in a case where there is a central device that immediately performs a connection request in response to advertising.
In the embodiments described above, description was given regarding an example in which a user of the digital camera (203) decides whether to transmit a connection request in accordance with the content of advertising by the wireless earphone (202). In other words, in the embodiments described above, whether to change a BLE wireless communication connection destination of the wireless earphone (202) to the digital camera (203) is decided in accordance with an operation with respect to the digital camera (203) However, the embodiments of the present invention are not limited to this. For example, as described below, configuration may be taken such that whether to change the BLE wireless communication connection destination of the wireless earphone (202) is decided in accordance with an operation on the smart phone (201).
Upon receiving a connection request transmitted from the digital camera (203) in response to an advertising signal transmitted by the wireless earphone (202), the wireless earphone (202) notifies the smart phone (201), which is the central device to which it is connected, that it has accepted a connection request from the digital camera (203). In response to this, the smart phone (201) notifies something to that effect to a user of the smart phone (201). For example, a message such as “A request to use the wireless earphone has been received from another device. Permit?” is displayed on a screen. When a user inputs an instruction to permit, something to that effect is transmitted from the smart phone (201) to the wireless earphone (202). When a user inputs an instruction indicating no permission, something to that effect is transmitted from the smart phone (201) to the wireless earphone (202). The wireless earphone (202), having received the instruction for permitting use, disconnects communication with the smart phone (201), and establishes BLE communication with the digital camera (203). In contrast, upon receiving an instruction for not permitting use, the wireless earphone (202) rejects or ignores the connection request from the digital camera (203), and maintains BLE communication with the smart phone (201).
Furthermore, when the smart phone (201) is executing a specific service such as a telephone service, even if the message of “A request to use the wireless earphone has been received from another device. Permit?” is displayed on the screen, it is seems unlikely that the user would respond thereto so as to change the connection partner, and it is thought that doing so would to be an impediment to a call. Accordingly, when the smart phone (201) is executing a specific service such as a telephone service, even if a connection request transmitted from the digital camera (203) is received in response to an advertising signal transmitted from the wireless earphone (202), the connection request from the digital camera (203) is rejected or ignored without requesting the smart phone (201) for permission, and the BLE communication with the smart phone (201) is maintained.
Embodiment(s) of the present invention can also be realized by a computer of a system or apparatus that reads out and executes computer executable instructions (e.g., one or more programs) recorded on a storage medium (which may also be referred to more fully as anon-transitory computer-readable storage medium') to perform the functions of one or more of the above-described embodiment(s) and/or that includes one or more circuits (e.g., application specific integrated circuit (ASIC)) for performing the functions of one or more of the above-described embodiment(s), and by a method performed by the computer of the system or apparatus by, for example, reading out and executing the computer executable instructions from the storage medium to perform the functions of one or more of the above-described embodiment(s) and/or controlling the one or more circuits to perform the functions of one or more of the above-described embodiment(s). The computer may comprise one or more processors (e.g., central processing unit (CPU), micro processing unit (MPU)) and may include a network of separate computers or separate processors to read out and execute the computer executable instructions. The computer executable instructions may be provided to the computer, for example, from a network or the storage medium. The storage medium may include, for example, one or more of a hard disk, a random-access memory (RAM), a read only memory (ROM), a storage of distributed computing systems, an optical disk (such as a compact disc (CD), digital versatile disc (DVD), or Blu-ray Disc (BD)™), a flash memory device, a memory card, and the like.
While the present invention has been described with reference to exemplary embodiments, it is to be understood that the invention is not limited to the disclosed exemplary embodiments. The scope of the following claims is to be accorded the broadest interpretation so as to encompass all such modifications and equivalent structures and functions.
This application claims the benefit of Japanese Patent Application No. 2017-192832, filed Oct. 2, 2017 which is hereby incorporated by reference herein in its entirety.
Number | Date | Country | Kind |
---|---|---|---|
2017-192832 | Oct 2017 | JP | national |
Number | Name | Date | Kind |
---|---|---|---|
20060183090 | Nollan | Aug 2006 | A1 |
20080182518 | Lo | Jul 2008 | A1 |
20120039213 | Cheng | Feb 2012 | A1 |
20120084446 | Iinuma | Apr 2012 | A1 |
20120275224 | Park | Nov 2012 | A1 |
20120302170 | Frazier | Nov 2012 | A1 |
20130084911 | Chang | Apr 2013 | A1 |
20150201455 | Redding | Jul 2015 | A1 |
20150264138 | Watts, Jr. | Sep 2015 | A1 |
20150289081 | Chen | Oct 2015 | A1 |
20160036953 | Lee | Feb 2016 | A1 |
20160227351 | Gu | Aug 2016 | A1 |
20160262193 | Hariharan | Sep 2016 | A1 |
20170048911 | Ge | Feb 2017 | A1 |
20170154522 | Lim | Jun 2017 | A1 |
20170208424 | Longjie | Jul 2017 | A1 |
20180017946 | Kyou | Jan 2018 | A1 |
20180063145 | Cayton | Mar 2018 | A1 |
20180159930 | Watts | Jun 2018 | A1 |
Number | Date | Country |
---|---|---|
2016-170608 | Sep 2016 | JP |
Entry |
---|
Okomato et al. Targeted Advertising Using BLE Beacon, 2017 IEEE 6th Global Conference on Consumer Electronics (GCCE 2017) (Year: 2017). |
Mattila et al., “Advertising semantically described physical items with Bluetooth Low Energy beacons”, Budva, Montenegro, MECD-2013 (Year: 2013). |
Elke Mackensen and Matthias Lai et al. “Bluetooth Low Energy (BLE) based wireless sensors” (Year: 2012). |
Number | Date | Country | |
---|---|---|---|
20190104557 A1 | Apr 2019 | US |