Radio communication apparatus, radio communication method, computer-readable medium, slave device, and master device

When executing a predetermined application in which radio communication with a slave device is necessary, a master device scans an advertisement from the slave device by using previously-set one channel among three channels for advertising. When transmitting the advertisement to the master device executing the predetermined application, the slave device transmits the advertisement by using previously-set one channel among three channels for advertising.

BACKGROUND

1. Technical Field

An embodiment of the present invention relates to a radio communication apparatus, a radio communication system, a radio communication method, a computer-readable medium, a slave device, and a master device.

2. Related Art

A master device, which is a radio communication device to perform radio communication based on Bluetooth (registered trademark) lowenergy which is a near field communication standard, receives identification information transmitted periodically from a slave device which is a different radio communication device to be a communication partner, the identification information being called an advertisement. Then, after transmitting a connection request to the slave device, the master device performs transmission/reception of data with the slave device (see, for example, JP 2012-142877 A).

As described above, in the radio communication device to perform radio communication based on the Bluetooth (registered trademark) lowenergy, the slave device uses three channels, which is previously assigned for advertising, for advertising among 40 channels in total in a frequency band. However, performing advertising by constantly using the three channels causes wasteful power consumption in a case where communication between a specific slave device and a master device is performed.

An embodiment of the present invention has been provided in view of the forgoing and is to provide a slave device to control wasteful power consumption.

SUMMARY

A radio communication apparatus configured to perform radio communication with a first radio communication apparatus includes: a control unit configured to determine, as a frequency band used for establishing connection with the first radio communication apparatus, M (M is natural number smaller than N) frequency band from predetermined N (N is natural number equal to or larger than two and smaller than communicable frequency band number) frequency bands when at least one predetermined condition related to radio communication between the radio communication apparatus and the first radio communication apparatus is satisfied and to determine the N frequency bands when the at least one predetermined condition is not satisfied; and a communication unit configured to transmit identification information to the first radio communication apparatus by using the frequency band determined by the control unit.

According to an embodiment of the present invention, wasteful power consumption can be controlled.

DETAILED DESCRIPTION

FIG. 1is a view illustrating a configuration example of a radio communication system1according to the first embodiment of the present invention.

In the configuration example illustrated inFIG. 1, the radio communication system1includes a master device100as a radio communication apparatus, and a plurality of slave devices200(200ato200c) as radio communication apparatuses different from the master device100. The master device100and the slave devices200perform radio communication with each other based on Bluetooth (registered trademark) lowenergy (hereinafter, referred to as BLE). The BLE is a standard (mode) designed for low power consumption in a near field radio communication standard called the Bluetooth (registered trademark). The master device100is a device to use a service (such as measurement data) provided by the slave device200. Also, the slave device200is a device to provide a service (such as measurement data) to the master device100.

The master device100is a device such as a mobile phone, a smartphone, a tablet-type personal computer, or a notebook-type personal computer and is a terminal including a radio communication function which is based on the BLE. In the present embodiment, for example, the master device100includes a smartphone. The master device100receives various kinds of data from the slave device200. Based on the received data, the master device100displays various kinds of information on a display unit128described later or makes sound such as an alarm from a speaker124described later (seeFIG. 3).

The slave device200notifies an outline of a service held therein to the master device100and performs transmission of an advertisement to wait for a connection request from the master device100.

In the radio communication performed based on the BLE, before transmission/reception of data between the master device100and the slave device200is performed, the slave device200transmits an advertisement and the master device100receives the advertisement. The advertisement is identification information to make a different radio communication apparatus know an existence of the self in order to search for the different radio communication apparatus or to connect with the different radio communication apparatus.

In the first embodiment, the slave device200transmits an advertisement to the master device100. Here, a frequency band (channel) of the advertisement transmitted from the slave device200will be described.

InFIG. 2, a table indicating assignment of a frequency band and a channel in the BLE is illustrated. As illustrated inFIG. 2, in the BLE, a frequency band of 2400 MHz to 2483.5 MHz is divided into 40 channels having a width of 2 MHz when used. Among the 40 channels, three channels for advertising in which center frequencies (RF Center Frequency) are 2402, 2426, and 2480 MHz (channel having 37, 38, and 39 as advertising channel indexes) are used for advertising. The remaining 37 channels for data communication (channels having 0 to 36 as data channel indexes) are used for data communication after connection between the master device100and the slave device200is established.

Here, in radio communication which is in a related art and which is based on the BLE, the slave device performs advertising by constantly using the above three channels. On the other hand, in the slave device200according to the first embodiment, advertising is performed by using one predetermined channel for advertising in a case of performing radio communication with the master device100executing a predetermined application. In other cases, advertising is performed by using three channels for advertising. Here, the predetermined application is an application in which radio communication with the slave device200is necessary and is, for example, an application for acquiring data to acquire, from the slave device200, data measured by a sensor (not illustrated) included in the slave device200. Also, the one predetermined channel for advertising is previously determined by a user or the like and is set in the master device100and the slave device200.

Next, a hardware configuration of the radio communication system1according to the first embodiment will be described.

FIG. 3is a block diagram schematically illustrating a configuration example of the master device100according to the first embodiment. As illustrated inFIG. 3, the master device100includes a control unit102, read only memory (ROM)104, random access memory (RAM)106, a radio communication processing unit110, an antenna112, a speaker124, a driver126, a display unit128, and a touch panel130.

The control unit102includes, for example, a central processing unit (CPU). By executing software processing according to a program (such as program to realize operation of master device100which operation is illustrated inFIG. 6described later) stored in the ROM104, the control unit102controls various functions included in the master device100.

The ROM104includes non-volatile memory such as flash memory and stores a program or data with which the control unit102controls various functions, as described above. In the present embodiment, for example, one channel for advertising used in scanning of an advertisement, which is transmitted from the slave device200, during execution of a predetermined application is recorded in the ROM104.

The RAM106includes volatile memory and is used as a work area where the control unit102temporarily stores data to perform various kinds of processing.

The radio communication processing unit110includes, for example, a radio frequency (RF) circuit or a baseband (BB) circuit. The radio communication processing unit110performs transmission and reception of a radio signal based on the BLE through the antenna112.

The speaker124outputs sound such as an alarm based on sound data from the control unit102. The driver126outputs, to the display unit128, an image signal which is based on image data output from the control unit102. The display unit128includes, for example, a liquid crystal display (LCD) or an electroluminescence (EL) display. The display unit128displays an image according to the image signal output from the driver126.

The touch panel130is an interface which is arranged on an upper surface of the display unit128and is used to input operation contents performed by a user. The touch panel130includes, for example, a transparent electrode (not illustrated). When a finger or the like of a user is in touch, a position where voltage varies is detected as a contact position and information of the contact position is output to the control unit102as an input instruction.

Next, a functional configuration of the control unit102of the master device100will be described. As illustrated inFIG. 3, the control unit102functions as an instruction for connection acquiring unit151, a frequency band determination unit152, a connection establishing unit153, and a data communication unit154.

The instruction for connection acquiring unit151acquires an instruction for connection with the slave device200from the application executed by the master device100. For example, after an application for acquiring data is activated, the instruction for connection acquiring unit151acquires predetermined operation on the touch panel130performed by a user as the instruction for connection with the slave device200. Note that the instruction for connection is not limited to what is generated by operation performed by a user. The instruction for connection may be, for example, what is generated based on passage of predetermined timer time after the application is activated.

The frequency band determination unit152determines whether an application which outputs the instruction for connection acquired by the instruction for connection acquiring unit151is a predetermined application. Then, when determining that the application which outputs the instruction for connection is the predetermined application, the frequency band determination unit152determines one channel for advertising, which is previously stored in the ROM104or the like, as a channel used for scanning. Also, when determining that the application which outputs the instruction for connection is not the predetermined application, the frequency band determination unit152determines three channels for advertising as channels used for scanning.

The connection establishing unit153performs scanning by using the channel determined by the frequency band determination unit152. Then, the connection establishing unit153transmits a connection request to the slave device200which transmits the advertisement received by the channel and establishes connection with the slave device200.

After the connection with the slave device200is established by the connection establishing unit153, the data communication unit154performs data communication with the slave device200by using 37 channels for data communication illustrated inFIG. 2.

FIG. 4is a block diagram schematically illustrating a configuration example of the slave device200according to the first embodiment. As illustrated inFIG. 5, the slave device200includes a control unit202, ROM204, RAM206, a radio communication processing unit210, an antenna212, an operation unit220, a driver226, and a display unit228.

The control unit202includes, for example, a CPU. By executing software processing according to a program (such as program to realize operation of slave device200illustrated inFIG. 7described later) stored in the ROM204, the control unit202controls various functions included in the slave device200.

The ROM204includes non-volatile memory such as flash memory and stores a program or data with which the control unit202controls various functions, as described above. In the present embodiment, for example, one channel for advertising used in a case of transmitting an advertisement to the master device100executing a predetermined application is recorded in the ROM204.

The RAM206includes volatile memory and is used as a work area where the control unit202temporarily stores data to perform various kinds of processing.

The radio communication processing unit210includes, for example, a radio frequency (RF) circuit or a baseband (BB) circuit. The radio communication processing unit210performs transmission and reception of a radio signal based on the BLE through the antenna212.

The operation unit220includes, for example, a switch and is used to input operation contents such as turning on/off of a power source performed by a user.

The driver226outputs, to the display unit228, an image signal which is based on image data output from the control unit202. The display unit228includes, for example, an LCD or an EL display. The display unit228displays an image according to an image signal output from the driver226.

Next, a functional configuration of the control unit202of the slave device200will be described. As illustrated inFIG. 4, the control unit202functions as an instruction for connection acquiring unit251, a frequency band determination unit252, an advertisement transmission unit253, a connection establishing unit254, and a data communication unit255.

The instruction for connection acquiring unit251acquires an instruction for connection indicating that transmission of an advertisement is started. For example, when a current date and time becomes a predetermined date and time or when it is necessary to give notice to the master device100, the instruction for connection acquiring unit251acquires an instruction indicating that transmission of an advertisement is started.

The frequency band determination unit252determines whether the instruction for connection acquired by the instruction for connection acquiring unit251is an instruction for connection with the master device100executing a predetermined application. When determining that the acquired instruction for connection is the instruction for connection with the master device100executing the predetermined application, the frequency band determination unit252determines one channel for advertising previously recorded in the ROM204or the like as a channel used for advertising. Also, when determining that the acquired instruction for connection is not the instruction for connection with the master device executing the predetermined application, the frequency band determination unit252determines three channels for advertising as channels used for advertising.

The advertisement transmission unit253corresponds to an identification information transmission unit and transmits an advertisement to the master device100by using the channel for advertising determined by the frequency band determination unit252.

The connection establishing unit254receives a connection request transmitted from the master device100, which receives the advertisement transmitted from the advertisement transmission unit253, and establishes connection with the master device100.

After the connection with the master device100is established by the connection establishing unit254, the data communication unit255performs data communication with the master device100by using 37 channels for data communication illustrated inFIG. 2.

Next, an example of an operation of the radio communication system1according to the present embodiment will be described with reference to a flowchart inFIG. 5.

The slave device200acquires information, which indicates that the current time has become the predetermined time, as an instruction for connection with the master device100executing the application for acquiring data (step S10). Then, by using one channel for advertising recorded in the ROM204, the slave device200periodically transmits an advertisement to the master device100at time intervals T (step S11).

For example, the master device100receives, as an instruction for connection with the slave device200, operation on the touch panel130performed by a user during an operation of the application for acquiring data (step S12) and executes scanning processing to receive an advertisement from the slave device200(step S13). In the scanning processing, the master device100scans the advertisement by using the one channel for advertising recorded in the ROM104.

When receiving the advertisement from the slave device200, the master device100transmits a connection request to the slave device200which transmits the advertisement (step S14). As a result, connection processing is performed in the master device100and the slave device200and the connection is established (step S15).

After the connection between the master device100and the slave device200is established, the master device100and the slave device200perform transmission/reception of data (step S16). A data request is transmitted from the master device100to the slave device200and the slave device200transmits a data response back to the master device100, whereby the transmission/reception of data is performed.

When the transmission/reception of data between the master device100and the slave device200is over, the master device100and the slave device200execute disconnecting operation processing (step S17) and the connection is ended (step S18).

Next, an operation of the master device100according to the first embodiment will be described with reference toFIG. 6.FIG. 6is a flowchart illustrating an example of master device-side scanning processing executed by the control unit102of the master device100according to the present embodiment. Note that the master device-side scanning processing is performed by the control unit102to read and execute a program previously stored in the ROM104. Also, it is assumed that one channel for advertising, an index of which channel is “37”, is previously recorded in the ROM104as a channel used for connection with the slave device200when the application for acquiring data is executed.

The control unit102of the master device100starts the master device-side scanning processing illustrated inFIG. 6, for example, when the instruction for connection acquiring unit151acquires, from the application executed in the master device100, an instruction for connection with the slave device200.

First, the frequency band determination unit152determines whether the acquired instruction for connection is an instruction for connection transmitted from the application for acquiring data (step S101).

When determining that the acquired instruction for connection is the instruction for connection transmitted from the application for acquiring data (step S101; Yes), the frequency band determination unit152determines, as a channel used for scanning of this time, the one channel for advertising which is recorded in the ROM104and an index of which is “37” (step S102).

When determining that the acquired instruction for connection is not the instruction for connection transmitted from the application for acquiring data (step S101; No), the frequency band determination unit152determines all of the three channels for advertising as channels used for scanning of this time (step S103).

Next, the connection establishing unit153starts scanning of the slave device200by using the channel determined in step S102or S103(step S104) and ends the present processing.

After the master device-side scanning processing, the connection establishing unit153keeps performing the scanning until an advertisement transmitted from the slave device200is received. When receiving the advertisement transmitted from the slave device200, the connection establishing unit153establishes connection with the slave device200. Then, transmission/reception of data between the master device100and the slave device200communication with which is established is performed by the data communication unit154.

Next, an operation of the slave device200according to the first embodiment will be described with reference toFIG. 7.FIG. 7is a flowchart illustrating an example of slave device-side advertising processing executed by the control unit202of the slave device200according to the present embodiment. Note that the slave device-side advertising processing is performed by the control unit202to read and execute a program previously stored in the ROM204. Also, it is assumed that one channel for advertising, an index of which channel is “37”, is previously recorded in the ROM204as a channel used for transmission of an advertisement to the master device100to execute the application for acquiring data. Also, the master device100to execute the application for acquiring data is not limited to a specific master device100and may be all master devices100which use the application for acquiring data.

For example, when the instruction for connection acquiring unit251acquires, as an instruction for connection, information indicating that the current time has become the predetermined time, the control unit202of the slave device200starts the slave device-side scanning processing which is illustrated inFIG. 7.

First, the frequency band determination unit252determines whether the acquired instruction for connection is an instruction for connection with the master device100to execute the application for acquiring data (step S201).

When determining that the acquired instruction for connection is the instruction for connection with the master device100to execute the application for acquiring data (step S201; Yes), the frequency band determination unit252determines, as a channel used for advertising of this time, the one channel for advertising which is recorded in the ROM204and an index of which is “37” (step S202).

When determining that the acquired instruction for connection is not the instruction for connection with the master device100to execute the application for acquiring data (step S201; No), the frequency band determination unit252determines all of the three channels for advertising as channels used for scanning of this time (step S203).

Next, the advertisement transmission unit253starts transmission of an advertisement to the master device100by using the channel determined in step S202or S203(step S204) and ends the present processing.

After the slave device-side advertising processing, the connection establishing unit254keeps performing the advertising until a connection request transmitted from the master device100is received. When the connection request transmitted from the master device100is received, the connection establishing unit254establishes connection with the master device100. Then, transmission/reception of data between the slave device200and the master device100connection with which is established is performed by the data communication unit255.

As described above, in the master device100according to the first embodiment, one channel for advertising is previously set as a channel used for connection with the slave device200in a case where a predetermined application is executed. Thus, in a case of establishing connection with the slave device200during execution of the predetermined application, by transmitting an advertisement by using the set one channel for advertising, it is possible to control power consumption in scanning of an advertisement of the slave device200compared to a case of performing scanning by constantly using all of the three channels for advertising.

Also, in the slave device200according to the first embodiment, one channel for advertising is previously set as a channel used for establishing connection with the master device100to execute a predetermined application. Thus, in a case of establishing connection with the master device100to execute the predetermined application, by transmitting an advertisement by using the set one channel for advertising, it is possible to control power consumption compared to a case where an advertisement is transmitted by constantly using the three channels for advertising.

In the above first embodiment, the slave device200determines a channel used for advertising based on determination whether an acquired instruction for connection is an instruction for connection with the master device100executing a predetermined application. However, a method of determining a channel used for advertising is not limited to the above. In the present modification, as a different example of a method of determining a channel used for advertising, an example of determining a channel used for advertising based on a period of time at which communication between a master device100and a slave device200is performed will be described. Note that in the following description, a similar reference sign is used with respect to a configuration similar to that of the above embodiment and a detailed description thereof is omitted.

A method of determining a channel performed by a frequency band determination unit252of the slave device200according to the second embodiment will be described. In the second embodiment, the frequency band determination unit252determines whether the time at which an instruction for connection acquiring unit251acquires an instruction for connection is in a predetermined period of time for communication. The predetermined period of time for communication is a period of time in which the slave device200performs advertising by using one channel. For example, night time from ten in the evening to five in the morning is set since it is considered that communication is not congested in such night time and it is unlikely that reception becomes difficult in the master device100even when an advertisement is transmitted by using one channel. In a case where the time at which the instruction for connection acquiring unit251acquires an instruction for connection is in the predetermined period of time for communication, the frequency band determination unit252determines, as a channel used for advertising, one channel for advertising recorded in ROM204. Also, in a case where the time at which the instruction for connection acquiring unit251acquires an instruction for connection is not in the predetermined period of time for communication, the frequency band determination unit252determines three channels for advertising as channels used for advertising.

Also, a frequency band determination unit152of the master device100according to the second embodiment determines all three channels for advertising as channels used for scanning. This configuration is similar to an operation of a master device in a related art.

Next, an operation of the slave device200according to the second embodiment will be described with reference toFIG. 8.FIG. 8is a flowchart illustrating an example of slave device-side advertising processing executed by a control unit202of the slave device200according to the second embodiment. Note that the slave device-side advertising processing is performed by the control unit202to read and execute a program previously stored in the ROM204. Also, it is assumed that one channel for advertising, an index of which channel is “37”, is previously recorded in the ROM204as a channel used for transmission of an advertisement to the master device100in the night time (ten in the evening to five in the morning).

For example, when the instruction for connection acquiring unit251receives, as an instruction for connection, information indicating that the current time has become the predetermined time, the control unit202of the slave device200starts the slave device-side scanning processing which is illustrated inFIG. 8.

First, the frequency band determination unit252determines that the time at which the instruction for connection is acquired is in the night time (step S301).

When determining that the time at which the instruction for connection is acquired is in the night time (step S301; Yes), the frequency band determination unit252determines, as a channel used for advertising of this time, the one channel for advertising which is recorded in the ROM204and an index of which is “37” (step S302).

When determining that the time at which the instruction for connection is acquired is not in the night time (step S301; No), the frequency band determination unit252determines all of the three channels for advertising as channels used for scanning of this time (step S303).

Next, the advertisement transmission unit253starts transmission of an advertisement to the master device100by using the channel determined in step S302or S303(step S304) and ends the present processing.

In the configuration of the second embodiment described above, in the slave device200, one channel for advertising is previously set as a channel used for establishing connection with the master device100in the predetermined period of time for communication. Thus, in the predetermined period of time for communication, by transmitting an advertisement by using the set one channel for advertising, it is possible to control power consumption compared to a case of transmitting an advertisement by constantly using the three channels for advertising.

Also, by selecting a period of time, in which communication is not congested, as a predetermined period of time for communication, the master device100can receive an advertisement accurately even when the advertisement is transmitted by using one channel for advertising.

As an example different from the method of determining a channel used for advertising which method has been described in each of the first and second embodiments, an example of determining a channel used for advertising based on a radio communication environment between a master device100and a slave device200will be described in the third embodiment. Note that in the following description, a similar reference sign is used with respect to a configuration similar to that of the above embodiments and a detailed description thereof is omitted.

FIG. 9is a block diagram schematically illustrating a configuration example of the slave device200according to the third embodiment. As illustrated inFIG. 9, compared to the first embodiment illustrated inFIG. 4, a control unit202further functions as a unit of determining the number of devices256.

Based on advertisement received from a different slave device200, the unit of determining the number of devices256determines the number of different slave devices200placed therearound. For example, by operating as a master device, the unit of determining the number of devices256receives an advertisement from the slave device200therearound. Note that in a specification of the Bluetooth (registered trademark)4.1, the slave device200can function as the master device100. That is, the slave device200can operate as the master device with respect to the different slave device200and can scan an advertisement from the different slave device200.

Next, a method of determining a channel by a frequency band determination unit252of the slave device200according to the third embodiment will be described. Based on the number of slave devices200determined by the unit of determining the number of devices256, the frequency band determination unit252according to the third embodiment determines a channel used for advertising. When the determined number of slave devices200is equal to or smaller than a predetermined threshold, the frequency band determination unit252determines one channel for advertising, which is recorded in ROM204, as a channel used for advertising. Also, when the determined number of slave devices200is not equal to or smaller than the predetermined threshold, the frequency band determination unit252determines three channels for advertising as channels used for advertising.

Also, a frequency band determination unit152of the master device100of the third embodiment determines all channels for advertising as channels used for scanning. The configuration is similar to an operation of a master device in a related art.

Next, an operation of the slave device200according to the third embodiment will be described with reference toFIG. 10.FIG. 10is a flowchart illustrating an example of slave device-side advertising processing executed by a control unit202of the slave device200according to the present embodiment. Note that the slave device-side advertising processing is performed by the control unit202to read and execute a program previously stored in the ROM204. Also, it is assumed that one channel for advertising, an index of which channel is “37”, is recorded in the ROM204as a channel used for transmission of an advertisement to the master device100in a case where the number of circumference slave devices200is equal to or smaller than the predetermined threshold.

For example, when an instruction for connection acquiring unit251acquires, as an instruction for connection, information indicating that the current time has become the predetermined time, the control unit202of the slave device200starts the slave device-side scanning processing which is illustrated inFIG. 10.

First, by operating as the master device, the unit of determining the number of devices256receives an advertisement from the circumference slave device200and determines the number of slave devices200placed therearound (step S401).

Next, the frequency band determination unit252determines whether the number of circumference slave devices determined in step S401is equal to or smaller than the predetermined threshold (step S402).

When determining that the number of circumference slave devices is equal to or smaller than the predetermined threshold (step S402; Yes), the frequency band determination unit252determines, as a channel used for advertising of this time, the one channel for advertising which is recorded in the ROM204and an index of which is “37” (step S403).

When determining that the number of circumference slave devices is not equal to or smaller than the predetermined threshold (step S402; No), the frequency band determination unit252determines all of the three channels for advertising as channels used for scanning of this time (step S404).

Next, the advertisement transmission unit253starts transmission of an advertisement to the master device100by using the channel determined in step S403or S404(step S405) and ends the present processing.

In the configuration of the third embodiment described in the above, in the slave device200, one channel for advertising is previously set as a channel used for establishing connection with the master device100in a case where the number of circumference slave devices200is equal to or smaller than the predetermined threshold. Thus, by transmitting an advertisement by using the set one channel for advertising in a case where the number of circumference slave devices200is equal to or smaller than the predetermined threshold, it is possible to control power consumption compared to a case of transmitting an advertisement by constantly using the three channels for advertising.

Also, the slave device200transmits an advertisement by using the one channel for advertising when the number of circumference slave devices200is equal to or smaller than the predetermined threshold, that is, when a radio communication environment between the master device100and the slave device200is not congested. Thus, the master device100can receive an advertisement accurately even when the advertisement is transmitted by using the one channel for advertising.

Note that by combining the methods of determining a channel for advertising which methods have been described in the above embodiments, a channel for advertising may be determined. For example, a combination of a method of determining a channel for advertising according to a period of time which method has been described in the second embodiment and a method of determining a channel for advertising according to the number of circumference slave devices200which method has been described in the third embodiment may be conducted. In the present modification, an example of determining a channel for advertising based on a period of time and the number of circumference slave devices will be described.

InFIG. 11, an example of a flowchart of slave device-side advertising processing executed by a control unit202of a slave device200according to the present modification is illustrated. Note that the slave device-side advertising processing is performed by the control unit202to read and execute a program previously stored in the ROM204. Also, it is assumed that one channel for advertising, an index of which channel is “37”, is recorded in the ROM204as a channel used for transmission of an advertisement to a master device100in a case where the time at which an instruction for connection is acquired is in night time and the number of circumference slave devices200is equal to or smaller than a predetermined threshold.

For example, when an instruction for connection acquiring unit251acquires, as an instruction for connection, information indicating that the current time has become the predetermined time, the control unit202of the slave device200starts slave device-side scanning processing which is illustrated inFIG. 11.

First, in steps S501to S502, the slave device200executes processing similar to those in steps S401to S402of the slave device-side advertising processing illustrated inFIG. 10.

When determining that the number of circumference slave devices is equal to or smaller than the predetermined threshold (step S502; Yes), the frequency band determination unit252sets “1” in deviceFlag (step S503).

When determining that the number of circumference slave devices is not equal to or smaller than the predetermined threshold, that is, when determining that the number of circumference slave devices is larger than a threshold of the number of slave devices (step S502; No), the frequency band determination unit252sets “0” in the deviceFlag (step S504).

Next, the frequency band determination unit252determines whether the time at which an instruction for connection is acquired is in the night time (step S505).

When determining that the time at which the instruction for connection is acquired is in the night time (step S505; Yes), the frequency band determination unit252sets “1” in timeFlag (step S506).

When determining that the time at which the instruction for connection is acquired is not in the night time (step S505; No), the frequency band determination unit252sets “0” in the timeFlag (step S507).

Next, the frequency band determination unit252calculates channelFlag which is a logical product of the timeFlag and the deviceFlag (timeFlag&&deviceFlag) (step S508). Note that in the present flow, the channelFlag is calculated as a logical product of the timeFlag and the deviceFlag but may be calculated as a logical sum of the timeFlag and the deviceFlag (timeFlag∥deviceFlag).

Next, the frequency band determination unit252determines whether the channelFlag is “1” (step S509).

When determining that the channelFlag is “1” (step S509; Yes), the frequency band determination unit252determines, as a channel used for advertising of this time, one channel for advertising which is recorded in the ROM204and an index of which is “37” (step S510).

When determining that the channelFlag is not “1”, that is, when determining that the channelFlag is “0” (step S509; No), the frequency band determination unit252determines all three channels for advertising as channels used for advertising of this time (step S511).

Next, the advertisement transmission unit253starts transmission of an advertisement to the master device100by using the channel determined in step S510or step S511(step S512) and ends the present processing.

In the configuration of the modification described above, when the time at which an instruction for connection is acquired is in a predetermined period of time and in a case where the number of circumference slave devices is equal to or smaller than a predetermined threshold, the slave device200transmits an advertisement by using one prescribed channel. Thus, it is possible to save power compared to a case of performing advertising by constantly using three channels.

In the above, embodiments and modifications of the present invention have been described. However, the present invention is not limited to the above embodiments and modifications.

For example, a method of determining a channel for advertising is not limited to the methods which have been described in the above first to third embodiments and the above modification. For example, the master device100and the slave device200may be configured to scan or transmit an advertisement by using one prescribed channel in a case where at least one of conditions, which have been described in the above first to third embodiments and the above modification, and a different condition related to radio communication.

Also, in a case where the slave device200performs radio communication with a plurality of master devices100, in the slave device200, a channel for advertising, which is used in a case where a predetermined condition related to the radio communication is satisfied, may be set for each master device100with which the radio communication is performed. For example, in the first embodiment, when the slave device200performs radio communication with a master device100A to execute an application A and a master device100B to execute an application B, a channel for advertising used for each of the applications A and B may be recorded in the ROM204of the slave device200. Thus, according to a master device with which radio communication is to be performed, the slave device200can change a channel for advertising used in a case where a predetermined condition related to radio communication is satisfied.

Also, in the above first to third embodiments and the above modification, a smartphone is used as the master device100. However, a radio communication apparatus to be the master device100is not limited to a smartphone. For example, a watch capable of performing radio communication based on the BLE may be used as the master device100and a smartphone or a mobile phone including a function to receive an email may be used as the slave device200.

As illustrated inFIG. 1, in the above first to third embodiments and the above modification, the radio communication system1includes one master device100and three slave devices200. However, the radio communication system1may include one or a plurality of master devices100and one or a plurality of slave devices200.

Also, in the master device100according to the above first to third embodiments and the above modification, the frequency band determination unit152determines one channel among three channels for advertising illustrated inFIG. 2. However, the number of channels determined by the frequency band determination unit152is not limited to one and, for example, two channels may be determined. That is, the frequency band determination unit152determines less than three channels among the three channels for advertising illustrated inFIG. 2. Accordingly, it is possible to control power consumption compared to a case of executing scanning by constantly using three channels.

Also, in the slave device200according to the above first to third embodiments and the above modification, the number of channels determined by the frequency band determination unit252is not limited to one and, for example, two channels may be determined. Accordingly, it is possible to control power consumption compared to a case of transmitting an advertisement by constantly using three channels.

Also, the master device100and the slave device200according to an embodiment of the present invention can be realized not only by a special apparatus but also by a normal computer system. For example, by execution of a program performed by a computer, a function of the master device100and a function of the slave device200may be realized. A program to realize the function of the master device100and the function of the slave device200may be stored in a computer-readable recording medium such as a universal serial bus (USB) memory, a secure digital (SD) memory card, a compact disc read only memory (CD-ROM), a digital versatile disc (DVD), a Blu-ray (registered trademark) Disc (BD), or a hard disk drive (HDD) or may be downloaded into a computer through a network. Note that the control unit or the communication unit may be one configuration or a plurality of configurations.

In the above, preferred embodiments of the present invention have been described. However, the present invention is not limited to the specific embodiment. The present invention includes an invention described in the claims and an equivalent thereof.