JP2011188339A - Communication apparatus, communication control method, and communication control program - Google Patents

Communication apparatus, communication control method, and communication control program Download PDF

Info

Publication number
JP2011188339A
JP2011188339A JP2010052854A JP2010052854A JP2011188339A JP 2011188339 A JP2011188339 A JP 2011188339A JP 2010052854 A JP2010052854 A JP 2010052854A JP 2010052854 A JP2010052854 A JP 2010052854A JP 2011188339 A JP2011188339 A JP 2011188339A
Authority
JP
Japan
Prior art keywords
channel
communication
frequency
scan
order
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2010052854A
Other languages
Japanese (ja)
Inventor
Akira Kitagawa
朗 北川
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Brother Industries Ltd
Original Assignee
Brother Industries Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Brother Industries Ltd filed Critical Brother Industries Ltd
Priority to JP2010052854A priority Critical patent/JP2011188339A/en
Publication of JP2011188339A publication Critical patent/JP2011188339A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide a communication apparatus, a communication control method, and a communication control program, which can efficiently determine channels for communication. <P>SOLUTION: When a communication start instruction is inputted (at S102: YES), a use frequency data table where the past use frequency of each channel is registered for each predetermined time is referred to, and a channel which can be acted is presumed (at S104). When there is a channel presumed to be a channel which can be acted (at S105: YES), the use frequency registered in the use frequency data table is referred to and grouping is performed (at S106). Groups of low use frequencies are selected as groups subjected to scanning (at S107). Further, the order of scanning is determined among the groups so that the channels are scanned. <P>COPYRIGHT: (C)2011,JPO&INPIT

Description

本発明は、データの送受信を行うための電波を発射する前にチャネルのスキャンを実行して、通信を行うチャネルを決定する通信装置、通信制御方法、および通信制御プログラムに関する。   The present invention relates to a communication device, a communication control method, and a communication control program that execute channel scanning before emitting radio waves for transmitting and receiving data and determine a channel for communication.

従来、他の通信の妨害を防ぐため、データの送受信開始前に空きチャネルを確認するため、チャネルのスキャンを実行して、通信を行うチャネルを決定する通信装置が知られている。例えば、特許文献1に記載のチャネル選択回路では、予め設定された優先チャネル情報と、過去の使用実績回数とを記憶している。優先チャネル情報は、近くで使用されている他のワイヤレスシステムでよく使用されるチャネルと重複しないチャネルが優先されるように、予め設定されている。そして、チャネル選択回路は、優先チャネル情報と過去の使用実績回数とを参照して、空きチャネルを検出している。   2. Description of the Related Art Conventionally, in order to prevent interference with other communications, a communication apparatus that performs channel scanning and determines a channel for communication is known in order to check an empty channel before starting data transmission / reception. For example, the channel selection circuit described in Patent Document 1 stores preset priority channel information and the past use count. The priority channel information is set in advance so that a channel that does not overlap with a channel frequently used in other wireless systems used in the vicinity is given priority. Then, the channel selection circuit detects a free channel by referring to the priority channel information and the past use count.

特開2009−260792号公報JP 2009-260792 A

しかしながら、通信帯域の混雑具合は時間毎に変動しており、通信帯域が混雑している時間帯や、逆に、通信帯域が混雑していない時間帯が存在する。上記のチャネル選択回路では、過去に使用したことのあるチャネルを考慮しているが、時間帯によっては、過去に使用したことのあるチャネルが使用されている場合がある。このため、通信帯域が混雑している時間にチャネルのスキャンを実行した場合、空きチャネルを選択するのに時間がかかる。つまり、通信を行うチャネルを効率よく決定することができない。その結果、CPUへの負荷が増大して動作が不安定になったり、電力消費が大きくなったりするという問題点があった。   However, the degree of congestion of the communication band varies from time to time, and there are times when the communication band is congested, and conversely, there are times when the communication band is not congested. In the above channel selection circuit, a channel that has been used in the past is taken into account, but a channel that has been used in the past may be used depending on the time zone. For this reason, if a channel scan is executed when the communication band is congested, it takes time to select an empty channel. That is, it is not possible to efficiently determine a channel for communication. As a result, there is a problem that the load on the CPU increases and the operation becomes unstable or the power consumption increases.

本発明は、通信を行うチャネルを効率よく決定することが可能な通信装置、通信制御方法、および通信制御プログラムを提供することを目的とする。   An object of the present invention is to provide a communication device, a communication control method, and a communication control program that can efficiently determine a channel for communication.

本発明の第1の態様に係る通信装置は、無線通信を行うための複数のチャネルが他の通信を行う装置によって使用されているか否かを検出するスキャンを実行し、通信を行う前記チャネルを決定する通信装置であって、前記スキャンを実行した過去の時間帯と、前記過去の時間帯において他の通信を行う装置によって前記各チャネルが使用されていた頻度である使用頻度とが前記チャネル毎に複数対応付けられたデータを記憶装置に記憶させる記憶制御手段と、前記記憶制御手段によって前記記憶装置に記憶された前記データにおける、現在の時間帯と同じ前記過去の時間帯での前記各チャネルの前記使用頻度を参照し、前記スキャンを実行する前記チャネルの順序を決定する順序決定手段と、前記順序決定手段によって決定された前記チャネルの順序で前記スキャンを実行し、通信可能な前記チャネルを決定するチャネル決定手段とを備えている。   The communication device according to the first aspect of the present invention performs a scan for detecting whether or not a plurality of channels for performing wireless communication are used by a device that performs other communication, and sets the channel for performing communication. The communication device to be determined is a past time zone in which the scan is executed and a use frequency that is a frequency at which each channel is used by a device that performs another communication in the past time zone. Storage control means for storing in the storage device a plurality of data associated with each of the channels, and each channel in the past time zone that is the same as the current time zone in the data stored in the storage device by the storage control means Order determining means for determining the order of the channels on which the scan is executed, and the channel determined by the order determining means. Executing the scan Le order, and a channel determining means for determining the communicable said channel.

この場合、データにおける、現在の時間帯と同じ過去の時間帯での各チャネルの使用頻度を参照して、スキャンする順序を決定することができる。このため、現在の時間において使用できる可能性の高いチャネルをスキャンすることができる。よって、通信を行うチャネルを効率よく決定することができる。   In this case, the scanning order can be determined by referring to the frequency of use of each channel in the past time zone that is the same as the current time zone in the data. Therefore, it is possible to scan a channel that is likely to be used at the current time. Therefore, the channel for communication can be determined efficiently.

前記通信装置において、前記順序決定手段は、前記記憶装置に記憶された前記データにおける、前記現在の時間帯と同じ前記過去の時間帯での前記各チャネルの前記使用頻度を参照し、前記現在の時間と同じ前記過去の時間帯における使用頻度が少ない前記チャネルの順に前記スキャンを実行する順序を決定してもよい。   In the communication device, the order determination unit refers to the frequency of use of each channel in the past time zone that is the same as the current time zone in the data stored in the storage device, and You may determine the order which performs the said scan in order of the said channel with little use frequency in the said past time slot | zone same as time.

この場合、過去の使用頻度の少ない順にスキャンを実行することができる。このため、通信を行うチャネルを効率よく決定することができる。   In this case, the scan can be executed in the order of the low frequency of use in the past. For this reason, the channel which communicates can be determined efficiently.

前記通信装置において、前記順序決定手段は、前記記憶装置に記憶された前記データにおける、前記現在の時間帯と同じ前記過去の時間帯での前記各チャネルの前記使用頻度を参照し、隣接する前記チャネルのそれぞれの前記使用頻度が、両方とも所定の使用頻度である第一頻度以下のチャネルであるという条件である第一条件と、隣接するチャネルのうち、周波数の高い前記チャネルにおける前記使用頻度と周波数の低いチャネルにおける前記使用頻度とのどちらか一方が前記第一頻度以下のチャネルであるという条件である第二条件と、所定の時間以上継続して、前記使用頻度が前記第一頻度以下のチャネルであるという条件である第三条件と、通信可能な周波数帯域における最も大きい周波数と、最も小さい周波数とからそれぞれ所定の周波数幅以上離れたチャネルであるという条件である第四条件と、前記現在の時間帯と同じ前記過去の時間帯における前記使用頻度が前記第一頻度以下のチャネルであるという条件である第五条件とのうちの少なくとも一の条件を参照し、前記スキャンを実行する前記チャネルの順序を決定してもよい。   In the communication device, the order determining means refers to the use frequency of each channel in the past time zone that is the same as the current time zone in the data stored in the storage device, and is adjacent to the data A first condition that is a condition that both of the use frequencies of the channels are channels of a first use frequency that is a predetermined use frequency, and the use frequency in the channel having a higher frequency among the adjacent channels; The second condition, which is a condition that either one of the use frequencies in the low frequency channel is the channel having the first frequency or less, and the use frequency is the first frequency or less continuously for a predetermined time or more. Predetermined from the third condition, which is a channel condition, the highest frequency in the communicable frequency band, and the lowest frequency A fourth condition that is a condition that the channel is separated by a frequency width or more, and a fifth condition that is a condition that the frequency of use in the past time period that is the same as the current time period is a channel that is less than or equal to the first frequency. The order of the channels for executing the scan may be determined with reference to at least one of the conditions.

この場合、第一頻度以下の場合は、そのチャネルは使用されていない可能性が高い。また、隣接するチャネルが使用されていなければ、通信品質が良好になる可能性が高い。つまり、通信品質の高いチャネルや、使用されていない可能性の高いチャネルを優先して、スキャンを実行することができる。   In this case, if the frequency is equal to or lower than the first frequency, there is a high possibility that the channel is not used. Further, if adjacent channels are not used, there is a high possibility that the communication quality will be good. In other words, scanning can be performed with priority given to channels with high communication quality and channels that are not likely to be used.

前記通信装置おいて、前記順序決定手段は、前記第一条件を満たすチャネル、前記第二条件を満たすチャネル、前記第三条件を満たすチャネル、前記第四条件を満たすチャネル、前記第五条件を満たすチャネルの順番で、前記スキャンを実行する順序を決定してもよい。   In the communication apparatus, the order determination means includes a channel satisfying the first condition, a channel satisfying the second condition, a channel satisfying the third condition, a channel satisfying the fourth condition, and a condition satisfying the fifth condition. The order in which the scans are executed may be determined in the order of channels.

この場合、通信品質の高いチャネルや、使用されていない可能性の高いチャネルを優先して、スキャンを実行する順番を決定することができる。   In this case, it is possible to determine the order in which scans are performed by giving priority to channels with high communication quality and channels that are not likely to be used.

前記通信装置において、前記チャネル決定手段は、前記順序決定手段によって決定された前記チャネルの順序で前記スキャンを実行する場合に、前記チャネルにおける無線信号の受信信号強度を測定し、測定された前記受信信号強度が所定の閾値以上であった場合に、次の順序の前記チャネルの前記スキャンを実行し、測定された受信信号強度が前記閾値より小さい場合に、通信可能なチャネルとして決定してもよい。   In the communication apparatus, when the channel determination unit performs the scan in the order of the channels determined by the order determination unit, the channel determination unit measures a reception signal strength of a radio signal in the channel, and the measured reception When the signal strength is equal to or higher than a predetermined threshold, the scan of the channels in the next order is performed, and when the measured received signal strength is smaller than the threshold, it may be determined as a communicable channel .

この場合、受信信号強度が閾値以上であれば、他の装置によって使用されているチャネルであるので、スキャンを続行し、受信信号強度が閾値より小さければ、他の装置によって使用されていないチャネルであるので、通信可能なチャネルとして決定することができる。つまり、受信信号強度によって、現在使用されているチャネルか否かを判断することができる。   In this case, if the received signal strength is greater than or equal to the threshold, the channel is being used by another device. Therefore, scanning is continued. If the received signal strength is less than the threshold, the channel is not being used by another device. Therefore, it can be determined as a communicable channel. That is, it is possible to determine whether or not the channel is currently used based on the received signal strength.

前記通信装置において、前記記憶装置に記憶された前記データにおける、前記現在の時間帯と同じ前記過去の時間帯での前記チャネルの前記使用頻度を参照し、前記現在の時間帯と同じ前記過去の時間帯における前記使用頻度が、所定の頻度である第二頻度以下である前記チャネルが存在するか否かを判断する頻度判断手段を備え、前記頻度判断手段によって前記現在の時間帯と同じ前記過去の時間帯における前記使用頻度が、前記第二頻度以下である前記チャネルが存在しないと判断された場合に、前記順序決定手段は、前記順序を決定せず、前記チャネル決定手段は、通信可能な前記チャネルを決定せず、前記頻度判断手段によって前記現在の時間帯と同じ前記過去の時間帯における前記使用頻度が、前記第二頻度以下である前記チャネルが存在すると判断された場合に、前記順序決定手段は、前記順序を決定し、前記チャネル決定手段は、通信可能な前記チャネルを決定してもよい。   The communication device refers to the frequency of use of the channel in the past time zone that is the same as the current time zone in the data stored in the storage device, and the past data that is the same as the current time zone. A frequency determining means for determining whether or not the channel having a usage frequency in a time zone equal to or less than a second frequency, which is a predetermined frequency, is provided, and the past that is the same as the current time zone by the frequency determining means When it is determined that the channel whose usage frequency is less than or equal to the second frequency does not exist, the order determination unit does not determine the order, and the channel determination unit can communicate The channel in which the channel is not determined and the frequency of use is less than or equal to the second frequency in the past time zone that is the same as the current time zone. If but it is determined to exist, the order determining unit determines the order, the channel determining means may determine a communicable said channel.

この場合、現在の時間帯と同じ過去の時間帯における使用頻度が第二頻度以下であるチャネルが存在しなければ、使用可能なチャネルがない可能性が高いので、スキャンを実行しない。このため、CPUの負荷を軽減できるとともに、消費電力を削減することができる。   In this case, if there is no channel whose usage frequency is equal to or lower than the second frequency in the same past time zone as the current time zone, there is a high possibility that there is no usable channel, and therefore no scan is executed. For this reason, the load on the CPU can be reduced and the power consumption can be reduced.

前記通信装置において、前記頻度判断手段によって前記現在の時間帯と同じ前記過去の時間帯における前記使用頻度が、前記第二頻度以下である前記チャネルが存在しないと判断された場合に、使用可能なチャネルがない可能性が高いことを表示画面に表示させる表示制御手段をさらに備えてもよい。   In the communication apparatus, when the frequency determining means determines that the channel whose usage frequency in the past time zone is the second frequency or less is the same as the current time zone, it can be used. You may further provide the display control means to display on a display screen that possibility that there is no channel is high.

この場合、現在の時間帯と同じ過去の時間帯における使用頻度が第二頻度以下であるチャネルが存在しなければ、使用可能なチャネルがない可能性が高いので、使用可能なチャネルがない可能性が高いことを表示画面に表示する。これによって、利用者に使用可能なチャネルがない可能性が高いことを報知することができる。   In this case, if there is no channel whose usage frequency is less than or equal to the second frequency in the same past time zone as the current time zone, there is a high possibility that there is no usable channel, so there is a possibility that there is no usable channel. Is displayed on the display screen. As a result, it is possible to notify the user that there is a high possibility that there is no usable channel.

前記通信装置において、利用者からの前記スキャンを実行するか否かの指示が入力される入力手段をさらに備え、前記頻度判断手段によって前記現在の時間帯と同じ前記過去の時間帯における前記使用頻度が、前記第二頻度以下である前記チャネルが存在しないと判断された場合において、前記入力手段を介して利用者によって前記スキャンを実行しない指示が入力された場合に、前記順序決定手段は、前記順序を決定せず、
前記チャネル決定手段は、通信可能な前記チャネルを決定せず、前記入力手段を介して利用者によって前記スキャンを実行する指示が入力された場合に、前記順序決定手段は、前記順序を決定し、前記チャネル決定手段は、通信可能な前記チャネルを決定してもよい。
In the communication apparatus, the communication device further includes an input unit for inputting an instruction as to whether or not to execute the scan from a user, and the frequency determination unit uses the frequency of use in the past time zone that is the same as the current time zone. However, when it is determined that the channel having the second frequency or less does not exist, when the user inputs an instruction not to perform the scan through the input unit, the order determining unit Without determining the order
The channel determining means does not determine the communicable channel, and when an instruction to perform the scan is input by a user via the input means, the order determining means determines the order, The channel determination means may determine the channel through which communication is possible.

この場合、現在の時間帯と同じ時間帯における使用頻度が第二頻度以下であるチャネルが存在しなければ、使用可能なチャネルがない可能性が高い。しかし、利用者からの指示があれば、スキャンを実行することができる。   In this case, if there is no channel whose usage frequency is equal to or lower than the second frequency in the same time zone as the current time zone, there is a high possibility that there is no usable channel. However, if there is an instruction from the user, the scan can be executed.

前記通信装置において、前記通信装置と同じ種類の通信装置であり、前記データを記憶する前記記憶装置を備えた他の通信装置が同一環境下に存在する場合に、前記他の通信装置から送信される前記データを受信し、前記通信装置の前記記憶装置に記憶させるデータ記憶制御手段をさらに備えてもよい。   In the communication device, the communication device is the same type of communication device as the communication device, and is transmitted from the other communication device when another communication device including the storage device that stores the data exists in the same environment. Data storage control means for receiving the data and storing the data in the storage device of the communication device.

この場合、他の通信装置によって作成されたデータを、通信装置の記憶装置に記憶することができる。このため、通信装置は、他の通信装置が作成したデータを使用することによって、通信を行うチャネルを効率よく決定することができる。   In this case, data created by another communication device can be stored in the storage device of the communication device. For this reason, the communication apparatus can determine the channel which communicates efficiently by using the data which the other communication apparatus produced.

前記通信装置において、前記通信装置と同じ種類の通信装置であり、前記データを記憶する前記記憶装置を備えた他の通信装置が同一環境下に存在する場合に、前記他の通信装置が前記スキャンを実行しているか否かを判断するスキャン判断手段をさらに備え、前記スキャン判断手段によって前記他の通信装置が前記スキャンを実行していると判断された場合に、前記チャネル決定手段は、前記スキャンを実行せず、前記スキャン判断手段によって前記他の通信装置が前記スキャンを実行していないと判断された場合に、前記チャネル決定手段は、前記スキャンを実行し、通信可能な前記チャネルを決定してもよい。   In the communication apparatus, when another communication apparatus that is the same type of communication apparatus as the communication apparatus and includes the storage device that stores the data exists in the same environment, the other communication apparatus performs the scan. Scan determining means for determining whether or not the other communication apparatus is executing the scan when the scan determining means determines that the scan determining means is executing the scan. And the channel determining means executes the scan and determines the communicable channel when the scan determining means determines that the other communication device is not executing the scan. May be.

この場合、通信装置と他の通信装置とがスキャンを実行するタイミングが同じになることを防止できる。このため、通信装置と他の通信装置とが同時に同じチャネルを選択することを防止できる。   In this case, it is possible to prevent the communication device and another communication device from performing the same scanning timing. For this reason, it can prevent that a communication apparatus and another communication apparatus select the same channel simultaneously.

本発明の第二の態様に係る通信制御方法は、無線通信を行うための複数のチャネルが他の通信を行う装置によって使用されているか否かを検出するスキャンを実行し、通信を行う前記チャネルを決定する通信装置において実行される通信制御方法であって、前記スキャンを実行した過去の時間帯と、前記過去の時間帯において他の通信を行う装置によって前記各チャネルが使用されていた頻度である使用頻度とが前記チャネル毎に複数対応付けられたデータを記憶装置に記憶させる記憶制御ステップと、前記記憶制御手段によって前記記憶装置に記憶された前記データにおける、現在の時間帯と同じ前記過去の時間帯での前記各チャネルの前記使用頻度を参照し、前記スキャンを実行する前記チャネルの順序を決定する順序決定ステップと、前記順序決定ステップによって決定された前記チャネルの順序で前記スキャンを実行し、通信可能な前記チャネルを決定するチャネル決定ステップとを備えている。   In the communication control method according to the second aspect of the present invention, the channel for performing communication by performing a scan to detect whether or not a plurality of channels for performing wireless communication is used by a device that performs other communication A communication control method executed in a communication device for determining the past time zone in which the scan was executed, and a frequency at which each channel was used by a device performing other communication in the past time zone. A storage control step for storing data associated with a plurality of usage frequencies for each channel in the storage device, and the past in the data stored in the storage device by the storage control means that is the same as the current time zone An order determination step for determining the order of the channels on which the scan is performed with reference to the frequency of use of the channels in the time period of Serial executing the scan order of the channels is determined by the order determination step, and a channel determining step of determining a communicable said channel.

この場合、データにおける、現在の時間帯と同じ過去の時間帯での各チャネルの使用頻度を参照して、スキャンする順序を決定することができる。このため、現在の時間において使用できる可能性の高いチャネルをスキャンすることができる。よって、通信を行うチャネルを効率よく決定することができる。   In this case, the scanning order can be determined by referring to the frequency of use of each channel in the past time zone that is the same as the current time zone in the data. Therefore, it is possible to scan a channel that is likely to be used at the current time. Therefore, the channel for communication can be determined efficiently.

本発明の第三の態様に係る通信制御プログラムは、無線通信を行うための複数のチャネルが他の通信を行う装置によって使用されているか否かを検出するスキャンを実行し、通信を行う前記チャネルを決定する通信装置において実行される通信制御プログラムであって、前記通信装置のCPUに、前記スキャンを実行した過去の時間帯と前記過去の時間帯において他の通信を行う装置によって前記各チャネルが使用されていた頻度である使用頻度とが前記チャネル毎に複数対応付けられたデータを記憶装置に記憶させる記憶制御ステップと、前記記憶制御手段によって前記記憶装置に記憶された前記データにおける、現在の時間帯と同じ前記過去の時間帯での前記前記各チャネルの前記使用頻度を参照し、前記スキャンを実行する前記チャネルの順序を決定する順序決定ステップと、前記順序決定ステップによって決定された前記チャネルの順序で前記スキャンを実行し、通信可能な前記チャネルを決定するチャネル決定ステップとを実行させる。   The communication control program according to the third aspect of the present invention performs the scan for detecting whether or not a plurality of channels for performing wireless communication are used by a device that performs other communication, and performs the communication A communication control program executed in a communication device for determining the channel of each channel by a device that performs other communication in the past time zone in which the scan was performed and in the past time zone. A storage control step for storing in the storage device a plurality of data, each of which is a frequency of use, that is associated with each channel, and the current data in the data stored in the storage device by the storage control means The channel that executes the scan with reference to the frequency of use of the channels in the past time zone that is the same as the time zone. And order determining step of determining the order of, executing the scan order of the channel determined by the order determination step, to perform a channel determining step of determining a communicable said channel.

この場合、データにおける、現在の時間帯と同じ過去の時間帯での各チャネルの使用頻度を参照して、スキャンする順序を決定することができる。このため、現在の時間において使用できる可能性の高いチャネルをスキャンすることができる。よって、通信を行うチャネルを効率よく決定することができる。   In this case, the scanning order can be determined by referring to the frequency of use of each channel in the past time zone that is the same as the current time zone in the data. Therefore, it is possible to scan a channel that is likely to be used at the current time. Therefore, the channel for communication can be determined efficiently.

通信装置1の物理的構成を示す模式図である。1 is a schematic diagram showing a physical configuration of a communication device 1. FIG. 通信装置1の電気的構成を示す模式図である。2 is a schematic diagram showing an electrical configuration of the communication device 1. FIG. フラッシュメモリ24の記憶領域を示す模式図である。3 is a schematic diagram showing a storage area of a flash memory 24. FIG. 使用回数データテーブル51を示す模式図である。It is a schematic diagram which shows the use frequency data table. グループ数データテーブル52を示す模式図である。6 is a schematic diagram showing a group number data table 52. FIG. 重み付けデータテーブル53を示す模式図である。6 is a schematic diagram showing a weighting data table 53. FIG. メイン処理を示すフローチャートである。It is a flowchart which shows a main process. メイン処理を示すフローチャートである。It is a flowchart which shows a main process. グループデータテーブル54を示す模式図である。It is a schematic diagram which shows the group data table. ディスプレイ11に表示される画像の一例を示す図である。4 is a diagram illustrating an example of an image displayed on a display 11. FIG. グラフ60を示すグラフである。3 is a graph showing a graph 60. 待機時間データテーブル55を示す模式図である。It is a schematic diagram showing a standby time data table 55. アクセスポイント処理を示すフローチャートである。It is a flowchart which shows an access point process. マスター/スレーブ設定処理を示すフローチャートである。It is a flowchart which shows a master / slave setting process. 図8に示すメイン処理の変形例を示すフローチャートである。It is a flowchart which shows the modification of the main process shown in FIG.

以下、本発明に係る通信装置の一実施の形態について、図面を参照して説明する。なおこれらの図面は、本発明が採用しうる技術的特徴を説明するために用いられるものであり、記載されている装置の構成、各種処理のフローチャートなどは、それのみに限定する趣旨ではなく、単なる説明例である。   Hereinafter, an embodiment of a communication apparatus according to the present invention will be described with reference to the drawings. These drawings are used for explaining the technical features that can be adopted by the present invention, and the configuration of the apparatus described, the flowcharts of various processes, and the like are not intended to be limited thereto. It is just an illustrative example.

図1を参照し、通信装置1の概要について説明する。通信装置1は、ディスプレイに様々なアプリケーションを表示することができる。通信装置1は、例えば、家具等の上に設置されたり、壁等に掛けられたりする。通信装置1は、無線通信によって公衆回線網やインターネット網に接続され、他の装置との間で通信を行うことができる。本実施形態では、通信装置1は無線LANによって通信を行うとする。   An overview of the communication device 1 will be described with reference to FIG. The communication device 1 can display various applications on the display. The communication device 1 is installed on furniture or the like, or is hung on a wall or the like, for example. The communication device 1 is connected to a public line network or the Internet network by wireless communication, and can communicate with other devices. In the present embodiment, it is assumed that the communication device 1 performs communication via a wireless LAN.

図1に示すように、通信装置1は、左右方向を長手方向とする正面視略長方形を有しており、略中央にディスプレイ11を備えている。ディスプレイ11の前面には、タッチパネル12(図2参照)が備えられている。利用者は、ディスプレイ11に表示される様々な情報を視認しながら、タッチパネル12に触れることによって、通信装置1に指示を入力することができる。通信装置1は、ディスプレイ11の左上側、且つ通信装置1の内部に、無線LANによって通信を行うためのアンテナ13を備えている。通信装置1は、内蔵された電池34(図2参照)から供給される電力や、ACアダプタ(図示外)を介してAC電源によって供給される電力によって駆動する。   As shown in FIG. 1, the communication device 1 has a substantially rectangular shape in front view with the left-right direction as a longitudinal direction, and includes a display 11 at a substantially center. A touch panel 12 (see FIG. 2) is provided on the front surface of the display 11. The user can input an instruction to the communication device 1 by touching the touch panel 12 while visually recognizing various information displayed on the display 11. The communication device 1 includes an antenna 13 for performing communication via a wireless LAN on the upper left side of the display 11 and inside the communication device 1. The communication device 1 is driven by power supplied from a built-in battery 34 (see FIG. 2) or power supplied by an AC power supply via an AC adapter (not shown).

図2および図3を参照し、通信装置1の電気的構成について説明する。図2に示すように、通信装置1は、CPU21とROM22とRAM23とフラッシュメモリ24とを備えている。CPU21は、通信装置1の、各種の制御処理を司る。CPU21はROM22、RAM23、およびフラッシュメモリ24と電気的に接続されている。CPU21はROM22、RAM23、およびフラッシュメモリ24の記憶領域にアクセスできる。   The electrical configuration of the communication device 1 will be described with reference to FIGS. As illustrated in FIG. 2, the communication device 1 includes a CPU 21, a ROM 22, a RAM 23, and a flash memory 24. The CPU 21 manages various control processes of the communication device 1. The CPU 21 is electrically connected to the ROM 22, RAM 23, and flash memory 24. The CPU 21 can access storage areas of the ROM 22, RAM 23, and flash memory 24.

ROM22は、プログラム記憶領域221を少なくとも備えている。プログラム記憶領域221には、CPU21が各種の処理等を実行するために必要なプログラムデータが記憶される。   The ROM 22 includes at least a program storage area 221. The program storage area 221 stores program data necessary for the CPU 21 to execute various processes.

RAM23は、グループ記憶領域231を少なくとも備えている。グループ記憶領域231には、後述するグループデータテーブル54(以下、グループDT54という)、または、後述するS126の処理で設定されるグループが記憶される。   The RAM 23 includes at least a group storage area 231. The group storage area 231 stores a group data table 54 (to be described later) (hereinafter referred to as a group DT54) or a group set in the process of S126 to be described later.

図3に示すように、フラッシュメモリ24は、使用回数データテーブル記憶領域241、グループ数データテーブル記憶領域242、重み付けデータテーブル記憶領域243、再通信開始時間記憶領域244、マスタースレーブ設定記憶領域245を少なくとも備えている。   As shown in FIG. 3, the flash memory 24 includes a use count data table storage area 241, a group number data table storage area 242, a weighted data table storage area 243, a recommunication start time storage area 244, and a master slave setting storage area 245. At least.

使用回数データテーブル記憶領域241には、後述する使用回数データテーブル51(以下、使用回数DT51という。)が記憶される。グループ数データテーブル記憶領域242には、後述するグループ数データテーブル52(以下、グループ数DT52という。)が記憶される。重み付けデータテーブル記憶領域243には、後述する重み付けデータテーブル53(以下、重み付けDT53という。)が記憶される。再通信開始時間記憶領域244には、後述する図7のS129の処理によって設定される再通信の開始の時間が記憶される。マスタースレーブ設定記憶領域245には、後述する変形例におけるS303の処理およびS304の処理(図14参照)によって設定されるマスター装置であることを示すデータ、またはスレーブ装置であることを示すデータが記憶される。   The use count data table storage area 241 stores a use count data table 51 (hereinafter referred to as a use count DT51), which will be described later. The group number data table storage area 242 stores a group number data table 52 (hereinafter referred to as a group number DT52) which will be described later. The weighting data table storage area 243 stores a weighting data table 53 (hereinafter referred to as weighting DT53) which will be described later. The re-communication start time storage area 244 stores the re-communication start time set by the process of S129 in FIG. The master-slave setting storage area 245 stores data indicating a master device or data indicating a slave device set by the processing of S303 and the processing of S304 (see FIG. 14) in a later-described modification. Is done.

図2に示すように、通信装置1は、無線通信によって公衆回線網やインターネット網に接続して通信を行うアンテナ13を備えている。また、通信装置1は、無線通信を行う駆動制御を司る通信制御部32を備えている。通信制御部32は、通信データを送信する送信モードと、受信信号強度(RSSI)の検出や通信データの受信等を行う受信モードとを切り替えることができる。CPU21は、アンテナ13と通信制御部32とを介して、無線通信によって公衆回線網やインターネット網を介して通信データの送受信を行うことができる。また、CPU21は、アンテナ13と通信制御部32とを介して、受信信号強度の検出を行うことができる。   As shown in FIG. 2, the communication device 1 includes an antenna 13 that performs communication by connecting to a public line network or the Internet network by wireless communication. The communication device 1 also includes a communication control unit 32 that controls drive control for performing wireless communication. The communication control unit 32 can switch between a transmission mode for transmitting communication data and a reception mode for detecting received signal strength (RSSI), receiving communication data, and the like. The CPU 21 can transmit and receive communication data via the public line network or the Internet network by wireless communication via the antenna 13 and the communication control unit 32. Further, the CPU 21 can detect the received signal strength via the antenna 13 and the communication control unit 32.

通信装置1は、ディスプレイ11を備えている。CPU21は、ディスプレイ11に所望の画像を表示させることができる。通信装置1は、利用者からの指示が入力されるタッチパネル12を備えている。CPU21は、タッチパネル12を介して入力された利用者の指示を認識することができる。   The communication device 1 includes a display 11. The CPU 21 can display a desired image on the display 11. The communication device 1 includes a touch panel 12 into which an instruction from a user is input. The CPU 21 can recognize a user instruction input via the touch panel 12.

通信装置1、タイマ33を備えている。CPU21は、タイマ33を利用して、時間を測定することができる。通信装置1は、電池34と、電池34から供給された電力を他の回路に供給する電源制御部35とを備えている。上述のCPU21やその他の各種デバイスは、電源制御部35を介して電池34によって供給される電力によって駆動する。なお、通信装置1は、ACアダプタ(図示外)と接続され、AC電源からの電力を通信装置1に供給するためのジャックを備えているが図示を省略している。通信装置1は、AC電源から供給される電力によっても駆動することができる。   A communication device 1 and a timer 33 are provided. The CPU 21 can measure time using the timer 33. The communication device 1 includes a battery 34 and a power control unit 35 that supplies power supplied from the battery 34 to other circuits. The above-described CPU 21 and other various devices are driven by power supplied from the battery 34 via the power supply control unit 35. The communication device 1 is connected to an AC adapter (not shown) and includes a jack for supplying power from the AC power source to the communication device 1, but is not shown. The communication device 1 can also be driven by power supplied from an AC power source.

次に、本実施形態の通信装置1の通信方式について説明する。なお、この通信方式は一例である。通信装置1は、無線LANによって通信を行うことができる。無線LANの周波数帯域は2400MHz〜2500MHzである。そして、この2400MHz〜2500MHzの周波数帯域に、14個のチャネルが存在する。この14個のチャネルをそれぞれ、周波数の小さいチャネルから順にch1〜ch14という。各チャネルには、所定の周波数の幅の帯域が割り当てられており、その周波数の幅の中心を中心周波数という。無線LANによって通信を行う際には、通信を行う装置は、各チャネルに割り当てられた周波数の幅において、疑似ランダム符号を用いて通信を行う。つまり、通信を行う装置は、いわゆる直接スペクトラム拡散方式で通信を行う。   Next, a communication method of the communication device 1 according to the present embodiment will be described. This communication method is an example. The communication device 1 can perform communication via a wireless LAN. The frequency band of the wireless LAN is 2400 MHz to 2500 MHz. There are 14 channels in the frequency band of 2400 MHz to 2500 MHz. These 14 channels are called ch1 to ch14 in order from the channel with the lowest frequency. Each channel is assigned a band of a predetermined frequency width, and the center of the frequency width is referred to as a center frequency. When performing communication using a wireless LAN, a communication apparatus performs communication using a pseudo-random code in the frequency range assigned to each channel. That is, a device that performs communication performs communication by a so-called direct spread spectrum method.

ch1の中心周波数は2412MHzであり、ch2の中心周波数は2417MHzである。また同様に、ch3は2422MHz、ch4は2427MHz、ch5は2432MHz、ch6は2437MHz、ch7は2442MHz、ch8は2447MHz、ch9は2452MHz、ch10は2457MHz、ch11は2462MHz、ch12は2467MHz、ch13は2472MHz、ch14は2484MHzである。   The center frequency of ch1 is 2412 MHz, and the center frequency of ch2 is 2417 MHz. Similarly, ch3 is 2422 MHz, ch4 is 2427 MHz, ch5 is 2432 MHz, ch6 is 2437 MHz, ch7 is 2442 MHz, ch8 is 2447 MHz, ch9 is 2452 MHz, ch10 is 2457 MHz, ch11 is 2462 MHz, ch12 is 2467 MHz, ch13 is 2472 MHz, ch14 is 2484 MHz.

次に、図4〜図6を参照して、各種のデータテーブル51〜53について説明する。各種のデータテーブルに登録されている情報は、利用者が任意に設定することが可能である。なお、各種のデータテーブル51〜53の説明において使用している数値は全て例示である。   Next, various data tables 51 to 53 will be described with reference to FIGS. Information registered in various data tables can be arbitrarily set by the user. In addition, all the numerical values used in description of the various data tables 51-53 are illustrations.

まず、図4を参照して、使用回数DT51の一例について説明する。使用回数DT51は、使用回数データテーブル記憶領域241(図3参照)に記憶されている。通信装置1が設置されている環境では、複数の通信を行う装置が存在している。そして、複数の通信を行う装置が、チャネルを使用して通信を行っている。使用回数DT51は、時間毎の各チャネルが、通信装置1以外の複数の通信を行う装置(以下、他の装置という。)によって使用された回数(以下、使用回数という。)を表している。   First, an example of the usage count DT51 will be described with reference to FIG. The use count DT51 is stored in the use count data table storage area 241 (see FIG. 3). In an environment where the communication device 1 is installed, there are devices that perform a plurality of communications. And the apparatus which performs several communication is communicating using a channel. The number of times of use DT51 represents the number of times (hereinafter referred to as the number of times of use) that each channel for each time is used by a device that performs a plurality of communications other than the communication device 1 (hereinafter referred to as other devices).

以後の説明の時間の記載では、例えば、8時30分を「8:30」のように表わす。また、使用回数の測定が行われた時間を「T」で表す。各チャネルの使用回数は、一日に複数回測定されているが、図4には、そのうちの、8:30≦T<10:30の間の時間に測定された使用回数のみを記載している。   In the description of the time in the following description, for example, 8:30 is represented as “8:30”. Further, the time when the number of uses is measured is represented by “T”. The number of times of use of each channel is measured a plurality of times a day, but FIG. 4 shows only the number of times of use measured during the time between 8: 30 ≦ T <10:30. Yes.

通信装置1は、時間毎に各チャネルが他の装置によって使用されているか否かの測定を行う。そして、測定された結果を、測定した時間毎に分けて使用回数DT51に記憶する。使用回数DT51には、過去10回分の測定結果が登録されている。この過去10回分の測定結果は、数日間(例えば、10日間)に亘って測定された結果である。例えば、図4において、9:00≦T<9:10におけるch1では、使用回数が「1」となっている。これは、過去10回の測定の結果、ch1が他の装置によって1回使用されていたことを表している。また、9:50≦T<10:00におけるch4では、使用回数が「10」となっている。これは、過去10回の測定の結果、ch4が他の装置によって10回使用されていたことを表している。   The communication device 1 measures whether or not each channel is used by another device every time. And the measured result is divided | segmented for every measured time, and it memorize | stores in use frequency DT51. In the use count DT51, measurement results for the past 10 times are registered. The measurement results for the past 10 times are the results measured over several days (for example, 10 days). For example, in FIG. 4, the number of uses is “1” for ch1 at 9: 00 ≦ T <9:10. This indicates that ch1 has been used once by another device as a result of the past 10 measurements. In ch4 at 9: 50 ≦ T <10:00, the number of uses is “10”. This indicates that ch4 has been used 10 times by another device as a result of the past 10 measurements.

この使用回数DT51を作成するために、通信装置1は、1日に複数回、ch1〜ch14のスキャンを実行し、使用回数DT51を更新して記憶する。例えば、メイン処理(図7及び図8参照)が実行された場合では、後述するS115の処理およびS120の処理(図8参照)において、メイン処理において測定された、各チャネルの使用状況の結果を使用回数DT51に登録し、更新記憶する。また、メイン処理が実行されない場合でも、1日に複数回、ch1〜ch14のそれぞれについて、後述するメイン処理におけるS112、S113、S114、S115、およびS120と同様の処理が行われることによって、各チャネルの使用状況の結果を使用回数DT51に登録し、更新記憶する。   In order to create the use count DT51, the communication device 1 scans ch1 to ch14 a plurality of times a day, and updates and stores the use count DT51. For example, in the case where the main process (see FIGS. 7 and 8) is executed, the result of the usage status of each channel measured in the main process in the process of S115 and the process of S120 (see FIG. 8) described later is used. It is registered in the use count DT51 and updated and stored. Even when the main processing is not executed, each channel is performed by performing the same processing as S112, S113, S114, S115, and S120 in the main processing described later for each of ch1 to ch14 a plurality of times a day. The result of the usage status is registered in the usage count DT51 and updated and stored.

図4に示すように、使用回数DT51において、時間は、8:30≦T<9:00、9:00≦T<9:10、9:10≦T<9:20、9:20≦T<9:30、9:30≦T<9:40、9:40≦T<9:50、9:50≦T<10:00、および10:00≦T<10:30に区切られている。   As shown in FIG. 4, in the usage count DT51, the time is 8: 30 ≦ T <9:00, 9: 00 ≦ T <9:10, 9: 10 ≦ T <9:20, 9: 20 ≦ T. <9:30, 9: 30 ≦ T <9:40, 9: 40 ≦ T <9:50, 9: 50 ≦ T <10:00, and 10: 00 ≦ T <10:30 .

8:30≦T<9:00のように30分間隔で区切られている時間と、9:00≦T<9:10のように10分間隔で区切られている時間とがある。各チャネルの使用状況が平常時であるとき、具体的には、全てのチャネルの過去10回の使用回数の合計が30分間に80回以下であるときは、30分間隔で区切られている。また、各チャネルの使用状況が混雑しているとき、具体的には、全てのチャネルの過去10回の使用回数の合計が30分間に80回以上であるときは、30分間隔ではなく、10分間隔に区切られている。つまり、通信状況が平常時の場合は、30分間隔で時間を区切り、通信状況が混雑している場合は、10分間隔で時間を区切っている。30分間の通信状況が混雑しているときには、例えば、30分間のうち10分間だけに通信が集中している場合、他の20分間では、通信可能であるにもかかわらず、使用可能なチャネルを決定できないおそれがある。このため、30分間より短い10分間で時間を区切って、使用可能なチャネルを決定しやすくしている。使用回数DT51では、通信状況である「平常時」および「混雑時」を示すデータが、30分間隔毎に対応付けられている。   There are a time that is divided at intervals of 30 minutes such as 8: 30 ≦ T <9:00 and a time that is divided at intervals of 10 minutes such as 9: 00 ≦ T <9:10. When the usage status of each channel is normal, specifically, when the total of the past 10 usage counts of all channels is 80 times or less in 30 minutes, they are divided at intervals of 30 minutes. Further, when the usage status of each channel is congested, specifically, when the total of the past 10 usage counts of all channels is 80 times or more in 30 minutes, it is not an interval of 30 minutes, but 10 Divided into minute intervals. That is, when the communication status is normal, the time is divided at intervals of 30 minutes, and when the communication status is congested, the time is divided at intervals of 10 minutes. When the communication status for 30 minutes is congested, for example, when communication is concentrated only in 10 minutes out of 30 minutes, it is possible to communicate in the other 20 minutes even though communication is possible. There is a risk that it cannot be determined. For this reason, it is easy to determine a usable channel by dividing time into 10 minutes shorter than 30 minutes. In the usage count DT51, data indicating “normal” and “congested” which are communication states are associated with each other every 30 minutes.

図4に示すように、8:30≦T<9:00では、各チャネルの使用回数は、ch1〜ch14の順に、2,4,4,5,4,4,0,5,1,2,5,4,6,6である。9:00≦T<9:10では、各チャネルの使用回数は、ch1〜ch14の順に、1,4,9,1,10,9,1,5,1,1,1,8,2,9である。他の各時間についても図4に示す様に、記憶されている。また、8:30≦T<9:00および10:00≦T<10:30の時間では、通信状況「平常時」を示すデータが対応付けられている。また、9:00≦T<9:30および9:30≦T<10:00では、通信状況「混雑時」を示すデータが対応付けられている。   As shown in FIG. 4, when 8: 30 ≦ T <9:00, the number of times each channel is used is 2, 4, 4, 5, 4, 4, 0, 5, 1, 2 in the order of ch1 to ch14. , 5, 4, 6, 6. When 9: 00 ≦ T <9:10, the number of times each channel is used is 1, 4, 9, 1, 10, 9, 1, 5, 1, 1, 1, 8, 2, 2 in the order of ch1 to ch14. Nine. The other times are also stored as shown in FIG. In the time of 8: 30 ≦ T <9:00 and 10: 00 ≦ T <10:30, data indicating the communication status “normal” is associated. In addition, in the case of 9: 00 ≦ T <9:30 and 9: 30 ≦ T <10:00, data indicating the communication status “when busy” is associated.

次に、図5を参照して、グループ数DT52の一例について説明する。グループ数DT52は、グループ数データテーブル記憶領域242(図3参照)に記憶されている。グループ数データテーブル記憶領域242は、後述するメイン処理のS106の処理(図7参照)において参照され、後述するグループDT54(図9参照)が作成される。   Next, an example of the group number DT52 will be described with reference to FIG. The group number DT52 is stored in the group number data table storage area 242 (see FIG. 3). The group number data table storage area 242 is referred to in S106 (see FIG. 7) of the main process which will be described later, and a group DT54 (see FIG. 9) which will be described later is created.

図5に示すように、グループ数DT52には、通信状況とグループ数とが対応付けられて登録されている。通信状況は、混雑時と平常時とに分割されている。混雑時の欄は、使用回数DT51(図4参照)における使用状況「混雑時」を示すデータが対応付けられている時間において、グループ数DT52が使用される場合に参照される。また、平常時の欄は、使用回数DT51における使用状況「平常時」を示すデータが対応付けられている時間において、グループ数DT52が使用される場合に参照される。   As shown in FIG. 5, the communication status and the number of groups are registered in association with the number of groups DT52. The communication status is divided into a busy time and a normal time. The column for the time of congestion is referred to when the number of groups DT52 is used in the time associated with the data indicating the use status “when congested” in the use count DT51 (see FIG. 4). The normal column is referred to when the number of groups DT52 is used in the time associated with the data indicating the usage status “normal” in the usage count DT51.

図5において、通信状況「混雑時」は、グループ数「4」に対応付けられている。また、通信状況「平常時」は、グループ数「2」に対応付けられている。グループ数は、S106の処理(図7参照)において、グループ分けを行う際に作成するグループの数を表している。S106の処理におけるグループ分けについての詳細は後述する。   In FIG. 5, the communication status “congested” is associated with the number of groups “4”. The communication status “normal” is associated with the number of groups “2”. The number of groups represents the number of groups created when performing grouping in the process of S106 (see FIG. 7). Details of the grouping in the process of S106 will be described later.

次に、図6を参照して重み付けDT53の一例について説明する。重み付けDT53は、重み付けデータテーブル記憶領域243(図3参照)に記憶されている。図6に示すように、重み付けDT53には、第一〜第五条件と、重みとが対応付けられている。重みとは、一種の優先度を表している。数値が大きいほど、優先度が高い。重み付けDT53は、後述するメイン処理のS109の処理(図7参照)において使用され、S110の処理(図8参照)において決定されるスキャンの順番に反映される。S109およびS110の処理の詳細については、後述する。   Next, an example of the weighting DT53 will be described with reference to FIG. The weighting DT53 is stored in the weighting data table storage area 243 (see FIG. 3). As shown in FIG. 6, the first to fifth conditions and the weights are associated with the weighting DT53. The weight represents a kind of priority. The higher the number, the higher the priority. The weighting DT53 is used in the processing of S109 (see FIG. 7) of the main processing described later, and is reflected in the scan order determined in the processing of S110 (see FIG. 8). Details of the processing of S109 and S110 will be described later.

重み付けDT53において、第一条件には、重み「5」が対応付けられている。第二条件には、重み「4」が対応付けられている。第三条件には、重み「3」が対応付けられている。第四条件には、重み「2」が対応付けられている。第五条件には、重み「1」が対応付けられている。   In the weighting DT53, the weight “5” is associated with the first condition. A weight “4” is associated with the second condition. A weight “3” is associated with the third condition. The fourth condition is associated with the weight “2”. The fifth condition is associated with the weight “1”.

以下、第一〜第五条件の内容について説明する。第一〜第五条件の内容は、予め設定され、重み付けDT53に登録されている。なお、第一〜第五条件の内容については、図6での図示を省略している。第一条件の内容は、「両隣のチャネルの使用回数が3回以下のチャネル」である。つまり、両隣のチャネルが使用されていない可能性が高いチャネルである。両隣のチャネルが使用されていなければ、両隣のチャネルにおいて、他の装置が通信を行う際の電波が存在しない。このため、他の装置が通信を行う際の電波の影響を受けにくく、通信品質が良好になり、かつ他の通信機器にも電波干渉を与えにくくなる。このため、第一条件に重みを与えることによって、通信品質の高いチャネルを優先することができる。   Hereinafter, the contents of the first to fifth conditions will be described. The contents of the first to fifth conditions are set in advance and registered in the weighting DT53. In addition, about the content of 1st-5th conditions, illustration in FIG. 6 is abbreviate | omitted. The content of the first condition is “a channel in which the number of times of use of both adjacent channels is three or less”. In other words, it is a channel that has a high possibility that the adjacent channels are not used. If the adjacent channels are not used, there is no radio wave when other devices communicate with each other on the adjacent channels. For this reason, it is hard to receive the influence of the electromagnetic wave at the time of another apparatus communicating, communication quality becomes favorable, and it becomes difficult to give radio wave interference also to another communication apparatus. For this reason, it is possible to give priority to a channel with high communication quality by giving a weight to the first condition.

第二条件の内容は、「両隣のチャネルのうち、どちらか一方の使用回数が3回以下のチャネル」である。この場合、両隣のチャネルのうち、どちらか一方のチャネルが使用されていない可能性が高い。このため、両隣のチャネルのうち、どちらか一方のチャネルにおいて、他の装置が通信を行う際の電波が存在しない可能性が高く、通信品質が良好になり、かつ他の通信機器にも電波干渉を与えにくくなる。このため、第二条件に重みを与えることによって、通信品質の高いチャネルを優先することができる。   The content of the second condition is “a channel in which one of the adjacent channels is used three times or less”. In this case, it is highly likely that one of the adjacent channels is not used. For this reason, there is a high possibility that there is no radio wave when another device performs communication in either one of the adjacent channels, the communication quality is good, and radio interference occurs in other communication devices. It becomes difficult to give. For this reason, it is possible to give priority to a channel with high communication quality by giving a weight to the second condition.

第三条件の内容は「前後30分間以上継続して3回以下のチャネル」である。つまり、前後30分間使用されていない可能性が高いチャネルである。このようなチャネルは、現在の時間においても使用されていない可能性が高い。このため、第三条件に重みを与えることによって、使用されていない可能性が高いチャネルを優先することができる。   The contents of the third condition are “channels that are continued for 30 minutes before and after for 3 or less times”. That is, it is a channel that is not likely to be used for 30 minutes before and after. Such a channel is likely not being used at the current time. For this reason, by giving a weight to the third condition, it is possible to give priority to a channel that is not likely to be used.

第四条件の内容は、「中心周波数が通信可能な周波数帯域における最大の周波数と最小の周波数とからそれぞれ20MHz以上離れたチャネル」である。本実施形態では、無線LANの規格である2400MHz〜2500MHzの範囲に、複数のチャネルが存在する。2400MHz〜2500MHzの範囲は、規格で決定されている。しかし、2400MHzより小さい周波数および2500MHzより大きい周波数は、無線LANの規格ではない。このため、他の様々な機器の不要電波が飛び交っているおそれがあり、この電波の影響を受けて通信品質が劣化するおそれがある。このため、最大の周波数と最小の周波数とからそれぞれ20MHz以上離れたチャネルを選択することによって、他の様々な機器の電波の影響を受けないようにすることができ、通信品質を良好に保つことができる。このため、第四条件に重みを与えることによって、通信品質を良好に保つことができるチャネルを優先することができる。   The content of the fourth condition is “a channel that is 20 MHz or more away from the maximum frequency and the minimum frequency in the frequency band in which the center frequency can be communicated”. In the present embodiment, there are a plurality of channels in the range of 2400 MHz to 2500 MHz, which is a wireless LAN standard. The range of 2400 MHz to 2500 MHz is determined by the standard. However, frequencies lower than 2400 MHz and frequencies higher than 2500 MHz are not wireless LAN standards. For this reason, there is a possibility that unnecessary radio waves from various other devices are flying around, and the communication quality may be deteriorated by the influence of the radio waves. For this reason, by selecting a channel that is 20 MHz or more away from the maximum frequency and the minimum frequency, it is possible to avoid the influence of radio waves from various other devices, and to maintain good communication quality. Can do. For this reason, by giving a weight to the fourth condition, priority can be given to a channel that can maintain good communication quality.

第五条件の内容は、「現在の時間帯と同じ時間帯の使用回数が3回以下のチャネル」である。つまり、現在の時間において使用されていない可能性が高いチャネルである。第五条件に重みを与えることによって、使用されていない可能性が高いチャネルを優先することができる。なお、第一〜第五条件における使用回数「3回」が本発明の第一頻度に相当し、任意に変更可能である。また、第一〜第五条件において第一頻度の値を同一にする必要はない。   The content of the fifth condition is “a channel in which the number of times of use in the same time zone as the current time zone is 3 or less”. That is, it is a channel that is not likely to be used at the current time. By giving a weight to the fifth condition, it is possible to give priority to a channel that is not likely to be used. The number of times of use “3 times” in the first to fifth conditions corresponds to the first frequency of the present invention and can be arbitrarily changed. Moreover, it is not necessary to make the value of the first frequency the same in the first to fifth conditions.

次に、図7および図8に示すフローチャートを参照して、本実施形態の通信装置1が行うメイン処理について説明する。メイン処理は、ROM22のプログラム記憶領域221に記憶されているプログラムに従ってCPU21が実行する。   Next, main processing performed by the communication device 1 according to the present embodiment will be described with reference to flowcharts shown in FIGS. The main process is executed by the CPU 21 in accordance with a program stored in the program storage area 221 of the ROM 22.

図7に示すように、CPU21は、各種のデータの初期化を行い、各種のパラメータ等をリセットする(S101)。次いで、CPU21は、タッチパネル12(図2参照)を介して利用者からの通信開始の指示が入力されたか否かを判断する(S102)。CPU21は、通信開始の指示が入力されていないと判断した場合には(S102:NO)、S129の処理(後述)においてCPU21が設定する再通信の開始の時間(以下、「再通信開始時間」という。)になったか否かを判断する(S103)。再通信開始時間は、チャネルが混雑しており、通信データを送信しなかった場合に、S129の処理(後述)においてCPU21が設定して再通信開始時間記憶領域244に記憶する時間である。CPU21は、再通信開始時間記憶領域244に記憶されている再通信開始時間になっていないと判断した場合には(S103:NO)、S102の処理に戻り、処理を繰り返す。   As shown in FIG. 7, the CPU 21 initializes various data and resets various parameters and the like (S101). Next, the CPU 21 determines whether or not an instruction to start communication is input from the user via the touch panel 12 (see FIG. 2) (S102). When the CPU 21 determines that the communication start instruction has not been input (S102: NO), the re-communication start time set by the CPU 21 in the process of S129 (described later) (hereinafter, “re-communication start time”). It is determined whether or not (S103). The re-communication start time is a time that is set by the CPU 21 and stored in the re-communication start time storage area 244 in the process of S129 (described later) when the channel is congested and communication data is not transmitted. If the CPU 21 determines that the recommunication start time stored in the recommunication start time storage area 244 is not reached (S103: NO), the CPU 21 returns to the process of S102 and repeats the process.

CPU21は、再通信開始時間になったと判断した場合には(S103:YES)、使用回数DT51(図4参照)を参照し、現在の時間と同じ時間帯において、使用回数が所定の使用回数(以下、所定使用回数という。)以下のチャネルを特定することで、使用可能なチャネルを推定する(S104)。所定使用回数は、例えば、使用回数DT51を作成する際の測定回数の80%、すなわち、測定回数が10回の場合には、8回である。なお、CPU21は、S102の処理において、利用者によって通信開始の指示が入力されたと判断した場合にも(S102:YES)、S104の処理を行う。   If the CPU 21 determines that the re-communication start time has come (S103: YES), the CPU 21 refers to the use count DT51 (see FIG. 4), and the use count is a predetermined use count (in the same time zone as the current time). Hereinafter, it is referred to as a predetermined number of times of use.) By identifying the following channels, usable channels are estimated (S104). The predetermined number of times of use is, for example, 80% of the number of times of measurement when creating the number of times of use DT51, that is, 8 times when the number of times of measurement is 10. Note that the CPU 21 also performs the process of S104 when it is determined in the process of S102 that an instruction to start communication is input by the user (S102: YES).

CPU21は、S104の処理において使用可能なチャネルであると推定したチャネルがあるか否かを判断する(S105)。CPU21は、使用可能なチャネルであると推定したチャネルがあると判断した場合には(S105:YES)、グループ分けを行う(S106)。CPU21は、グループ数データテーブル記憶領域242に記憶されているグループ数DT52(図5参照)を参照し、グループ数を決定する(S106)。そして、CPU21は、決定したグループ数に対応した数のグループに、S104の処理において推定した使用可能なチャネルを割り当て、グループDT54(図9参照、後述)を作成し、グループ記憶領域231に記憶する(S106)。グループの分け方は、具体例を示しながら後述する。   The CPU 21 determines whether there is a channel estimated to be a usable channel in the process of S104 (S105). When the CPU 21 determines that there is a channel estimated to be a usable channel (S105: YES), the CPU 21 performs grouping (S106). The CPU 21 refers to the group number DT52 (see FIG. 5) stored in the group number data table storage area 242, and determines the number of groups (S106). Then, the CPU 21 assigns the usable channels estimated in the process of S104 to the number of groups corresponding to the determined number of groups, creates a group DT54 (see FIG. 9, described later), and stores it in the group storage area 231. (S106). The grouping method will be described later with a specific example.

例えば、現在の時間が9:00であり、所定使用回数は、測定回数の80%の回数であるとする。つまり、使用回数DT51(図4参照)において、測定回数は10回であるので、その所定使用回数は、8回であるとする。この場合において、CPU21が利用者によって通信開始の指示が入力されたと判断すると(S102:YES)、CPU21は、使用可能なチャネルの推定を行う(S104)。CPU21は、使用回数DT51(図4参照)を参照し、現在の時間9:00と同じ時間帯の各チャネルの使用回数を参照する(S104)。図4に示すように、9:00≦T<9:10における使用回数が、所定回数である8回以下であるチャネルは、ch1、ch2、ch4、ch7、ch8、ch9、ch10、ch11、ch12、およびch13であるので、CPU21は、これらを使用可能なチャネルであると推定する(S104)。   For example, it is assumed that the current time is 9:00 and the predetermined number of times of use is 80% of the number of times of measurement. That is, in the use count DT51 (see FIG. 4), the measurement count is 10 times, and therefore the predetermined use count is 8 times. In this case, if the CPU 21 determines that an instruction to start communication is input by the user (S102: YES), the CPU 21 estimates an available channel (S104). The CPU 21 refers to the use count DT51 (see FIG. 4) and refers to the use count of each channel in the same time zone as the current time 9:00 (S104). As shown in FIG. 4, the channels in which the number of uses in 9: 00 ≦ T <9:10 is a predetermined number of 8 or less are ch1, ch2, ch4, ch7, ch8, ch9, ch10, ch11, ch12. , And ch13, the CPU 21 estimates that these are usable channels (S104).

CPU21は、S104の処理において使用可能なチャネルであると推定したチャネルがあると判断し(S105:YES)、グループ分けを行う(S106)。前述したように、グループ数DT52(図5参照)は、混雑時と平常時とに分けられ、それぞれにグループ数が対応付けられている。使用回数DT51(図4参照)において、現在の時間9:00と同じ時間を含む9:00≦T<9:10は、混雑時である。グループ数DT52(図5参照)において、混雑時に対応するグループ数は「4」であるため、CPU21は、グループ数を「4」に決定する(S106)。そして、4つのグループは、それぞれ、使用回数で分割される。使用回数をXとする。ここでは、例えば、CPU21は、「0≦X≦3」を満たす使用回数のチャネルを第一グループに対応付け、「3<X≦4」を満たす使用回数のチャネルを第二グループに対応付けるとする。CPU21は、「4<X≦6」を満たす使用回数のチャネルを第三グループに対応付け、「6<X≦8」を満たす使用回数のチャネルを第四グループに対応付けるとする。   The CPU 21 determines that there is a channel estimated to be a usable channel in the process of S104 (S105: YES), and performs grouping (S106). As described above, the number of groups DT52 (see FIG. 5) is divided into a crowded time and a normal time, and the number of groups is associated with each. In the use count DT51 (see FIG. 4), 9: 00 ≦ T <9:10 including the same time as the current time 9:00 is a busy time. In the group number DT52 (see FIG. 5), since the number of groups corresponding to the congestion is “4”, the CPU 21 determines the number of groups as “4” (S106). Each of the four groups is divided by the number of uses. Let X be the number of uses. Here, for example, the CPU 21 associates a channel having the number of uses satisfying “0 ≦ X ≦ 3” with the first group, and associates a channel with the number of uses satisfying “3 <X ≦ 4” with the second group. . It is assumed that the CPU 21 associates a channel having the number of uses satisfying “4 <X ≦ 6” with the third group and associates a channel with the number of uses satisfying “6 <X ≦ 8” with the fourth group.

この場合、CPU21は、グループDT54(図9参照)を作成し、グループ記憶領域231に記憶する(S106)。図9のグループDT54に示すように、CPU21は、第一グループに、「0≦X≦3」を満たすch1、ch4、ch7、ch9、ch10、ch11、およびch13を対応付け、第二グループに、「3<X≦4」を満たすch2を対応付ける。CPU21は、第三グループに、「4<X≦6」を満たすch8を対応付け、第四グループに、「6<X≦8」を満たすch12を対応付ける(S106)。   In this case, the CPU 21 creates a group DT54 (see FIG. 9) and stores it in the group storage area 231 (S106). As shown in the group DT54 of FIG. 9, the CPU 21 associates ch1, ch4, ch7, ch9, ch10, ch11, and ch13 satisfying “0 ≦ X ≦ 3” with the first group, and with the second group, Associate ch2 that satisfies “3 <X ≦ 4”. The CPU 21 associates ch8 satisfying “4 <X ≦ 6” with the third group, and associates ch12 satisfying “6 <X ≦ 8” with the fourth group (S106).

CPU21は、グループ分けを行ったら(S106)、次いで、スキャンを行うグループを決定する(S107)。CPU21は、S107の処理において、S106の処理において作成したグループの中から、使用回数の少ないグループを優先して選択する。使用回数の少ないグループをスキャンすれば、通信可能なチャネルを早期に発見できる可能性が高いからである。なお、CPU21が後述するS126の処理においてグループを作成した場合には、CPU21は、S126の処理において作成したグループを選択する。CPU21は、後述するS117の処理において、選択していないグループがあると判断するたびに、S107の処理を実行するが、一度決定したグループを重複して決定しない。   After performing grouping (S106), the CPU 21 determines a group to be scanned (S107). In the process of S107, the CPU 21 preferentially selects a group with a small number of uses from the groups created in the process of S106. This is because it is highly possible that a communicable channel can be found at an early stage by scanning a group with a small number of uses. When the CPU 21 creates a group in the process of S126 described later, the CPU 21 selects the group created in the process of S126. The CPU 21 executes the process of S107 every time it determines that there is an unselected group in the process of S117, which will be described later, but does not determine the group once determined.

次いで、CPU21は、S107の処理において決定したグループの中で、使用回数が同一のチャネルがあるか否かを判断する(S108)。CPU21が、使用回数が同一のチャネルがあると判断した場合には(S108:YES)、CPU21は、優先順位決定処理を行う(S109)。CPU21は、使用回数が同一のチャネル同士の種々の条件を比較して、通信品質のより高いチャネルや、使用されていない可能性がより高いチャネルを優先してスキャンを実行するように、順位を決定する(S109)。CPU21は、優先順位決定処理を、重み付けDT53(図6参照)を参照して行うが、詳細については、具体例を示しながら後述する。   Next, the CPU 21 determines whether there is a channel having the same number of uses in the group determined in the process of S107 (S108). When the CPU 21 determines that there are channels having the same number of uses (S108: YES), the CPU 21 performs a priority order determination process (S109). The CPU 21 compares various conditions of channels with the same number of times of use, and ranks the channels so that priority is given to a channel with a higher communication quality or a channel with a higher possibility of not being used. Determine (S109). The CPU 21 performs the priority order determination process with reference to the weighting DT 53 (see FIG. 6), and details will be described later with a specific example.

次いで、図8に示すように、CPU21は、スキャンの順番を決定する(S110)。なお、CPU21は、S108の処理において、使用回数が同一のチャネルがないと判断した場合にも(S108:NO)、S110の処理を行う。CPU21は、S107の処理で決定したグループの中で、使用回数の少ないチャネルから順番に、スキャンの順番を決定する(S110)。また、CPU21は、使用回数が同一のチャネルについては、S109の処理で決定した優先順位で、スキャンの順番を決定する。   Next, as shown in FIG. 8, the CPU 21 determines the order of scanning (S110). Note that the CPU 21 also performs the process of S110 when it is determined in the process of S108 that there is no channel having the same number of uses (S108: NO). The CPU 21 determines the scan order in order from the channel with the smallest number of uses in the group determined in the process of S107 (S110). Further, the CPU 21 determines the scan order for the channels having the same number of times of use in the priority order determined in the process of S109.

例えば、現在の時間を9:00とした場合の一例について述べる。前述した図9に示すグループDT54のように、CPU21がグループ分けを行った場合、CPU21は、使用回数の少ないグループである第一グループを選択する(S107)。次いで、第一グループのうち、ch1、ch4、ch7、ch9、ch10、およびch11における使用回数は、全て「1」であり、同一であるので(図4参照)、CPU21は、使用回数が同一のチャネルがあると判断し(S108:YES)、優先順位決定処理を行う(S109)。CPU21は、重み付けDT53(図6参照)を参照し、チャネル毎に、チャネルの状況に対応する重みの和である合計の重みを算出し、合計の重みが大きいチャネルの順に優先順位を決定する(S109)。   For example, an example where the current time is 9:00 will be described. When the CPU 21 performs grouping as in the above-described group DT54 shown in FIG. 9, the CPU 21 selects the first group that is a group that is used less frequently (S107). Next, in the first group, the number of uses in ch1, ch4, ch7, ch9, ch10, and ch11 is all “1” and is the same (see FIG. 4), so the CPU 21 has the same number of uses. It is determined that there is a channel (S108: YES), and priority order determination processing is performed (S109). The CPU 21 refers to the weighting DT 53 (see FIG. 6), calculates the total weight, which is the sum of the weights corresponding to the channel status, for each channel, and determines the priority in order of the channels with the largest total weight ( S109).

ch1、ch4、ch7、ch9、ch10、およびch11のうち、第一条件である「両隣のチャネルの使用回数が3回以下のチャネル」を満たすチャネルは、ch10である。ch10の両隣のチャネルであるch9、ch11は、両方とも、使用回数が3回以下であるからである(図4参照)。このため、CPU21は、ch10について、重み「5」を加算する。第二条件である「両隣のチャネルのうち、どちらか一方の使用回数が3回以下のチャネル」の条件を満たすチャネルは、ch9およびch11である。ch9の隣のch10の使用回数が3回以下であり、ch8の使用回数が3回より大きいからである(図4参照)。また、ch11の隣のch10の使用回数が3回以下であり、ch11の使用回数が3回より大きいからである(図4参照)。このため、CPU21は、ch9およびch11について、重み「4」を加算する。   Among the ch1, ch4, ch7, ch9, ch10, and ch11, the channel that satisfies the first condition “channel where the number of times of use of both adjacent channels is three or less” is ch10. This is because both the channels ch9 and ch11 that are adjacent to ch10 are used three times or less (see FIG. 4). For this reason, the CPU 21 adds the weight “5” for ch10. Channels that satisfy the condition of the second condition “a channel in which one of the adjacent channels is used three times or less” are ch9 and ch11. This is because the number of uses of ch10 adjacent to ch9 is three or less and the number of uses of ch8 is greater than three (see FIG. 4). In addition, the number of uses of ch10 adjacent to ch11 is three or less, and the number of uses of ch11 is greater than three (see FIG. 4). Therefore, the CPU 21 adds the weight “4” for ch9 and ch11.

第三条件である「前後30分間以上継続して3回以下のチャネル」の条件を満たすチャネルは、ch1、ch7、ch9、ch10である(図4参照)。このため、CPU21は、ch1、ch7、ch9、およびch10について、重み「3」を加算する。第四条件である「中心周波数が通信可能な周波数帯域における最大の周波数と最小の周波数とからそれぞれ20MHz以上離れたチャネル」という条件を満たすチャネルは、ch4、ch7、ch9、ch10、およびch11である。前述したように本実施形態における無線LANの周波数帯域は2400MHz〜2500MHzである。つまり、最大の周波数は2500MHzであり、最小の周波数は2400MHzである。そして、中心周波数が最大の周波数と最小の周波数とからそれぞれ20MHz以上離れたチャネルとは、中心周波数が2420MHz〜2480Mzの間にあるチャネルである。ch4、ch7、ch9、ch10、およびch11の中心周波数は、それぞれ、2437MHz、2442MHz、2452MHz、2457MHz、および2462MHzである。このため、第四条件を満たす。CPU21は、ch4、ch7、ch9、ch10、およびch11について、それぞれ重み「2」を加算する。   The channels satisfying the condition of the third condition, “channels that continue for 30 minutes before and after for three minutes or less” are ch1, ch7, ch9, and ch10 (see FIG. 4). Therefore, the CPU 21 adds the weight “3” for ch1, ch7, ch9, and ch10. Channels that satisfy the fourth condition, “channels whose center frequencies are 20 MHz or more away from the maximum frequency and the minimum frequency in the communicable frequency band” are ch4, ch7, ch9, ch10, and ch11. . As described above, the frequency band of the wireless LAN in this embodiment is 2400 MHz to 2500 MHz. That is, the maximum frequency is 2500 MHz and the minimum frequency is 2400 MHz. A channel whose center frequency is 20 MHz or more away from the maximum frequency and the minimum frequency is a channel whose center frequency is between 2420 MHz and 2480 Mz. The center frequencies of ch4, ch7, ch9, ch10, and ch11 are 2437 MHz, 2442 MHz, 2452 MHz, 2457 MHz, and 2462 MHz, respectively. For this reason, the fourth condition is satisfied. The CPU 21 adds the weight “2” to each of ch4, ch7, ch9, ch10, and ch11.

また、第五条件である「現在の時間帯と同じ時間帯の使用回数が3回以下のチャネル」の条件を満たすチャネルは、ch1、ch4、ch7、ch9、ch10、およびch11である(図4参照)。CPU21は、ch1、ch4、ch7、ch9、ch10、およびch11について、それぞれ重み「1」を加算する。   Further, channels satisfying the condition of the fifth condition “a channel in which the number of times of use in the same time zone as the current time zone is 3 or less” are ch1, ch4, ch7, ch9, ch10, and ch11 (FIG. 4). reference). The CPU 21 adds a weight “1” to each of ch1, ch4, ch7, ch9, ch10, and ch11.

以上のようにして、CPU21は、それぞれのチャネルに重みを加算する。ch1には、重み「1」、「3」が加算されるので、合計の重みは、「4」となる。ch4には、重み「1」、「2」が加算されるので、合計の重みは「3」となる。ch7には、重み「1」、「2」、「3」が加算されるので、合計の重みは「6」となる。ch9には、重み「1」、「2」、「3」、「4」が加算されるので、合計の重みは「10」となる。ch10には、重み「1」、「2」「3」、「5」が加算されるので、合計の重みは、「11」となる。ch11には、重み「1」、「2」、「4」が加算されるので、合計の重みは、「7」となる。以上の結果、合計の重みが大きいチャネルの順に、ch10、ch9、ch11、ch7、ch1、ch4となる。そして、CPU21は、この順番で優先順位を決定する(S109)。   As described above, the CPU 21 adds weights to the respective channels. Since the weights “1” and “3” are added to ch1, the total weight is “4”. Since the weights “1” and “2” are added to ch4, the total weight is “3”. Since the weights “1”, “2”, and “3” are added to ch7, the total weight is “6”. Since the weights “1”, “2”, “3”, and “4” are added to ch9, the total weight is “10”. Since the weights “1”, “2”, “3”, and “5” are added to ch10, the total weight is “11”. Since the weights “1”, “2”, and “4” are added to ch11, the total weight is “7”. As a result, ch10, ch9, ch11, ch7, ch1, and ch4 are assigned in the order of the channels with the largest total weight. Then, the CPU 21 determines the priority order in this order (S109).

次いで、CPU21は、スキャンの順番を決定する(S110)。CPU21は、S107の処理において決定したグループの中で、使用回数の少ないチャネルの順番で、スキャンの順番を決定する。CPU21がS107の処理において決定したグループの中で、使用回数の少ないチャネルは、使用回数が「1」であるch1、ch4、ch7、ch9、ch10、およびch11である。CPU21は、これらのチャネルについて、S109の処理において決定した順番であるch10、ch9、ch11、ch7、ch1、ch4の順番でスキャンの順番を決定する(S110)。   Next, the CPU 21 determines the order of scanning (S110). The CPU 21 determines the scan order in the order of the channels with the smallest number of uses in the group determined in the process of S107. Among the groups determined by the CPU 21 in the process of S107, the channels with the least number of uses are ch1, ch4, ch7, ch9, ch10, and ch11 that have a use count of “1”. The CPU 21 determines the scan order for these channels in the order of ch10, ch9, ch11, ch7, ch1, ch4, which is the order determined in the process of S109 (S110).

また、次に使用回数の少ないチャネルは、使用回数が2回であるch13である(図4参照)。このため、CPU21は、スキャンの順番を、ch10、ch9、ch11、ch7、ch1、ch4、ch13の順番であると決定する(S110)。   The channel with the next smallest number of uses is ch13, which is used twice (see FIG. 4). Therefore, the CPU 21 determines that the scan order is ch10, ch9, ch11, ch7, ch1, ch4, ch13 (S110).

CPU21は、スキャンの順番を決定したら(S110)、次いで、通信制御部32を制御し、通信制御部32を受信モードに設定する(S111)。受信モードとは、CPU21が電波を検知できる状態のことである。次いで、CPU21は、通信制御部32を制御し、チャネルの設定を行い、受信信号強度の測定を開始する(S112)。チャネルの設定とは、CPU21が所望のチャネルの使用状況を検知するために、所望のチャネルの周波数の受信信号強度を測定可能な状態にすることである。CPU21は、S116の処理(後述)においてグループ内でスキャンされていないチャネルがあると判断するたびに、S112の処理を実行し、S110の処理で決定したスキャンの順番で、チャネルの設定を行い、受信信号強度の測定を開始する。   After determining the scan order (S110), the CPU 21 then controls the communication control unit 32 and sets the communication control unit 32 to the reception mode (S111). The reception mode is a state in which the CPU 21 can detect radio waves. Next, the CPU 21 controls the communication control unit 32 to set a channel and start measurement of received signal strength (S112). The channel setting is to make the received signal intensity of the frequency of the desired channel measurable so that the CPU 21 detects the usage status of the desired channel. Whenever the CPU 21 determines that there is a channel that has not been scanned in the group in the process of S116 (described later), the CPU 21 executes the process of S112, sets the channels in the scan order determined in the process of S110, Start measurement of received signal strength.

次いで、CPU21は、所定の時間の間、受信信号強度を測定する(S113)。所定の時間は、例えば、0.1秒である。次いで、CPU21は、受信信号強度が所定の閾値より小さい状態が、S113の処理で受信信号強度を測定した所定時間の間継続したか否かを判断する(S114)。所定の閾値は、チャネルが他の装置によって使用されているか否かを判断するために設けられており、例えば、アンテナ13で受信され、通信制御部32を介して、CPU21に入力される信号の電圧値である。例えば、CPU21が3.0Vで駆動している場合、所定の閾値は、3.0Vの20%である0.6Vである。所定の閾値が設けられていることで、CPU21がホワイトノイズ等の雑音を誤検出して、チャネルが他の装置に使用されていると誤った判断をすることが防止される。他の装置がチャネルを使用していない場合には、受信信号強度が所定の閾値より小さい状態が所定の時間の間継続する。一方、他の装置がチャネルを使用している場合には、所定の時間の間に、受信信号強度が所定の閾値以上になるタイミングがある。つまり、CPU21は、S112の処理で設定したチャネルが、使用可能なチャネルであるか否かを判断している(S114)。   Next, the CPU 21 measures the received signal strength for a predetermined time (S113). The predetermined time is, for example, 0.1 seconds. Next, the CPU 21 determines whether or not the state in which the received signal strength is smaller than the predetermined threshold has continued for the predetermined time when the received signal strength is measured in the process of S113 (S114). The predetermined threshold is provided to determine whether or not the channel is being used by another device. For example, the predetermined threshold is a signal received by the antenna 13 and input to the CPU 21 via the communication control unit 32. It is a voltage value. For example, when the CPU 21 is driven at 3.0V, the predetermined threshold is 0.6V, which is 20% of 3.0V. The provision of the predetermined threshold value prevents the CPU 21 from erroneously detecting noise such as white noise and erroneously determining that the channel is being used by another device. When another device is not using the channel, the state where the received signal strength is smaller than a predetermined threshold value continues for a predetermined time. On the other hand, when another device uses the channel, there is a timing at which the received signal strength becomes equal to or higher than a predetermined threshold during a predetermined time. That is, the CPU 21 determines whether or not the channel set in the process of S112 is a usable channel (S114).

なお、他の装置が直接スペクトラム拡散で通信をしている場合、同一チャネル内で、疑似ランダム符号を用いて通信を行っている。このため、仮に、CPU21が、S113の処理において、短い時間(例えば、0.005秒)の受信信号強度の測定を行った場合、疑似ランダム符号発生によって通信を行っている他の装置の電波を検出できないおそれがある。このため、CPU21は、所定時間の間計測を行い(S113)、その間に、一度でも所定の閾値を超えれば、他の装置によってチャネルが使用されていると判断することになる(S114:NO)。   When other devices are directly communicating by spread spectrum, communication is performed using a pseudo-random code within the same channel. For this reason, if the CPU 21 measures the received signal strength for a short time (for example, 0.005 seconds) in the process of S113, the radio waves of other devices that are communicating by the generation of a pseudo-random code are transmitted. May not be detected. Therefore, the CPU 21 performs measurement for a predetermined time (S113), and if the predetermined threshold value is exceeded even once during that time, it is determined that the channel is being used by another device (S114: NO). .

受信信号強度が所定の閾値より小さい状態が、CPU21がS113の処理で受信信号強度を測定した所定時間の間継続しなかった場合には、チャネルは、他の装置によって使用されているため、CPU21は、使用可能なチャネルではないと判断する(S114:NO)。続いて、CPU21は、このチャネルを他の装置によって使用されているチャネルとして、使用回数DT51(図4参照)に登録し、使用回数DT51(図4参照)を更新記憶する(S115)。つまり、CPU21は、使用回数DT51における過去10回の使用回数を更新する(S115)。   When the state where the received signal strength is smaller than the predetermined threshold does not continue for the predetermined time when the CPU 21 measured the received signal strength in the process of S113, the channel is being used by another device, so the CPU 21 Is not a usable channel (S114: NO). Subsequently, the CPU 21 registers this channel in the use count DT51 (see FIG. 4) as a channel used by another device, and updates and stores the use count DT51 (see FIG. 4) (S115). That is, the CPU 21 updates the past 10 use times in the use number DT51 (S115).

次に、CPU21は、S107の処理で決定したグループ内で、スキャンを実行していないチャネルがあるか否かを判断する(S116)。CPU21は、S107の処理で決定したグループ内でスキャンを実行していないチャネルがあると判断した場合には(S116:YES)、S112の処理に戻り、チャネルを変更してスキャンを継続する。CPU21は、S107の処理で決定したグループ内でスキャンを実行していないチャネルがないと判断した場合には(S116:NO)、スキャンを実行していないグループがあるか否かを判断する(S117)。CPU21は、スキャンを実行していないグループがあると判断した場合には(S117:YES)、次いでS107に戻り、処理を繰り返す(S107)。つまり、S107の処理で決定されたグループ内のチャネルが全て他の装置によって使用されていたので(S116:NO)、スキャンが実行されていないグループがあれば(S117:YES)、グループが新たに決定され(S107)、チャネルのスキャンが継続される。   Next, the CPU 21 determines whether there is a channel that has not been scanned in the group determined in the process of S107 (S116). When the CPU 21 determines that there is a channel that has not been scanned in the group determined in the process of S107 (S116: YES), the CPU 21 returns to the process of S112, changes the channel, and continues the scan. If the CPU 21 determines that there is no channel that has not been scanned in the group determined in S107 (S116: NO), the CPU 21 determines whether there is a group that has not been scanned (S117). ). If the CPU 21 determines that there is a group that has not been scanned (S117: YES), then it returns to S107 and repeats the process (S107). That is, since all the channels in the group determined in the process of S107 are used by other devices (S116: NO), if there is a group for which scanning has not been performed (S117: YES), the group is newly added. A determination is made (S107) and channel scanning continues.

CPU21が、スキャンを実行していないチャネルがないと判断した場合には(S117:NO)、全てのグループのチャネルが他の装置によって使用されている。このため、CPU21は、使用可能なチャネルがないためデータを送信できなかった旨をディスプレイ11に表示し、スキャンを終了する(S118)。CPU21は、例えば、「データを送信できませんでした」等の表示をディスプレイ11に表示する。次いで、CPU21は、S102の処理に戻り、処理を繰り返す。   If the CPU 21 determines that there is no channel that has not been scanned (S117: NO), the channels of all groups are used by other devices. For this reason, the CPU 21 displays on the display 11 that data could not be transmitted because there is no usable channel, and ends the scan (S118). For example, the CPU 21 displays a display such as “data could not be transmitted” on the display 11. Next, the CPU 21 returns to the process of S102 and repeats the process.

S114の処理において、受信信号強度が所定の閾値より小さい状態が、所定時間の間継続した場合には、CPU21は、使用可能なチャネルであると判断し(S114:YES)、使用可能なチャネルを、通信を行うチャネルとして決定する(S119)。次いで、CPU21は、S114の処理で使用可能なチャネルであると判断したチャネルを、他の装置によって使用されていなかったチャネルであるとして使用回数DT51に登録し、使用回数DT51(図4参照)を更新記憶する(S120)。つまり、CPU21は、使用回数DT51における過去10回の使用回数を更新する。   In the process of S114, when the state where the received signal strength is smaller than the predetermined threshold value continues for a predetermined time, the CPU 21 determines that the channel is usable (S114: YES), and determines the usable channel. Then, it is determined as a channel for communication (S119). Next, the CPU 21 registers the channel determined to be usable in the process of S114 in the usage count DT51 as a channel that has not been used by another device, and stores the usage count DT51 (see FIG. 4). The update is stored (S120). That is, the CPU 21 updates the past 10 use counts in the use count DT51.

次いで、CPU21は、通信を開始し、データを送信する(S121)。S121の処理では、CPU21が通信制御部32を制御し、通信制御部32を送信モードに設定する。送信モードとは、CPU21がデータを送信できる状態のことである。そして、CPU21は、データの送信を行う。CPU21は、データの送信を行ったら、送信モードの設定を解除し、通信を終了する(S122)。次いで、CPU21は、S102の処理に戻り、処理を繰り返す。   Next, the CPU 21 starts communication and transmits data (S121). In the process of S121, the CPU 21 controls the communication control unit 32 and sets the communication control unit 32 to the transmission mode. The transmission mode is a state in which the CPU 21 can transmit data. Then, the CPU 21 transmits data. After transmitting the data, the CPU 21 cancels the transmission mode setting and ends the communication (S122). Next, the CPU 21 returns to the process of S102 and repeats the process.

例えば、S113の処理において測定を行う所定の時間が0.1秒であるとし、S114の処理における受信信号強度の閾値が0.6Vであるとする。前述の例示のように、CPU21が、スキャンの順番を、ch10、ch9、ch11、ch7、ch1、ch4、ch13の順番であると決定すると(S110)、次いで、CPU21は、通信制御部32を受信モードに設定する(S111)。次いで、CPU21は、最初にスキャンを実行するch10について受信信号強度の測定を開始する(S112)。CPU21は、受信信号強度の測定を所定の時間である0.1秒間継続し(S113)、受信信号強度が所定の閾値である0.6Vより小さい状態が、S113の処理で受信信号強度を測定した所定時間の間継続したか否かを判断する(S114)。   For example, it is assumed that the predetermined time for measurement in the process of S113 is 0.1 second, and the threshold value of the received signal strength in the process of S114 is 0.6V. As described above, when the CPU 21 determines that the scanning order is ch10, ch9, ch11, ch7, ch1, ch4, ch13 (S110), the CPU 21 then receives the communication control unit 32. The mode is set (S111). Next, the CPU 21 starts measurement of received signal strength for ch10 that first executes a scan (S112). The CPU 21 continues the measurement of the received signal strength for a predetermined time of 0.1 seconds (S113), and the received signal strength is measured in the process of S113 when the received signal strength is smaller than the predetermined threshold value of 0.6V. It is determined whether or not it has continued for the predetermined time (S114).

ここで、ch10は使用中であり、CPU21が、0.1秒の間に、0.6V以上の受信信号強度を検出したとする。この場合、受信信号強度が0.6Vより小さい状態が、S113の処理で受信信号強度が測定された0.1秒間継続しなかったので、CPU21は、使用可能なチャネルではないと判断する(S114:NO)。続いて、CPU21は、ch10は他の装置によって使用されているチャネルであるとして、使用回数DT51(図4参照)に登録し、使用回数DT51に更新記憶する(S115)。つまり、CPU21は、使用回数DT51におけるch10の過去10回の使用回数を更新する。次に、CPU21は、S107の処理で決定した第一グループ内でスキャンを実行していないチャネルがあると判断し(S116:YES)、ch9を選択し(S112)、スキャンを継続する。   Here, it is assumed that ch10 is in use and the CPU 21 detects a received signal strength of 0.6 V or more in 0.1 seconds. In this case, since the state where the received signal strength is smaller than 0.6 V does not continue for 0.1 seconds when the received signal strength is measured in the process of S113, the CPU 21 determines that the channel is not usable (S114). : NO). Subsequently, the CPU 21 registers the use count DT51 (see FIG. 4) and updates and stores the use count DT51, assuming that ch10 is a channel used by another device (S115). That is, the CPU 21 updates the past 10 use counts of ch10 in the use count DT51. Next, the CPU 21 determines that there is a channel that has not been scanned in the first group determined in the process of S107 (S116: YES), selects ch9 (S112), and continues the scan.

ch9、ch11、ch7、ch1、ch4、ch13が全て他の装置によって使用されている場合、CPU21は、S112〜S116の処理をch9、ch11、ch7、ch1、ch4、ch13について繰り返した後、第一グループ内で、スキャンを実行していないチャネルがないと判断する(S116:NO)。そして、CPU21は、第二〜第四グループ(図9参照)のチャネルについて、スキャンを実行していないので、スキャンを実行していないチャネルがあると判断し(S117:YES)、第二グループをスキャンを実行するグループとして新たに決定し(S107:NO)、処理を繰り返す。   When ch9, ch11, ch7, ch1, ch4, and ch13 are all used by other devices, the CPU 21 repeats the processing of S112 to S116 for ch9, ch11, ch7, ch1, ch4, and ch13, and then first It is determined that there is no channel that has not been scanned in the group (S116: NO). And since CPU21 is not performing the scan about the channel of the 2nd-the 4th group (refer to Drawing 9), it judges that there is a channel which is not performing a scan (S117: YES), and sets the 2nd group. A new group to be scanned is determined (S107: NO), and the process is repeated.

第二〜第四グループ(図9参照)のチャネルが全て使用されている場合には、CPU21は、第二〜第四グループのチャネルのスキャンを実行した後、スキャンを実行していないチャネルはないと判断する(S117:NO)。次いで、CPU21は、例えば、「データを送信できませんでした」等の表示をディスプレイ11に表示する(S118)。次いで、CPU21は、S102の処理に戻り、処理を繰り返す。   If all the channels of the second to fourth groups (see FIG. 9) are used, the CPU 21 does not have any channels that have not been scanned after scanning the channels of the second to fourth groups. (S117: NO). Next, the CPU 21 displays a display such as “data could not be transmitted” on the display 11 (S118). Next, the CPU 21 returns to the process of S102 and repeats the process.

一方、例えば、第一グループのch9が他の装置によって使用されていなかった場合、受信信号強度が0.6Vより小さい状態が0.1秒間継続するので、CPU21は、ch9が使用可能なチャネルであると判断し(S114:YES)、使用可能なチャネルであるch9を、通信を行うチャネルとして決定する(S119)。次いで、CPU21は、ch9を、他の装置によって使用されていなかったチャネルであるとして使用回数DT51に登録し、使用回数DT51(図4参照)を更新記憶する(S120)。つまり、CPU21は、使用回数DT51におけるch9の過去10回の使用回数を更新する。   On the other hand, for example, when the first group of ch9 is not used by another device, the state where the received signal strength is less than 0.6 V continues for 0.1 second, so the CPU 21 is a channel that can use ch9. It is determined that there is a channel (S114: YES), and ch9 that is a usable channel is determined as a channel for communication (S119). Next, the CPU 21 registers ch9 in the use count DT51 as a channel that has not been used by another device, and updates and stores the use count DT51 (see FIG. 4) (S120). That is, the CPU 21 updates the past 10 use counts of ch9 in the use count DT51.

次いで、CPU21は、通信制御部32を送信モードに設定し、ch9を使用してデータの送信を行う(S121)。次いで、CPU21は、送信モードの設定を解除し、通信を終了する(S122)。次いで、CPU21は、S102の処理に戻り、処理を繰り返す。   Next, the CPU 21 sets the communication control unit 32 to the transmission mode, and transmits data using ch9 (S121). Next, the CPU 21 cancels the transmission mode setting and ends the communication (S122). Next, the CPU 21 returns to the process of S102 and repeats the process.

次に、S104の処理において、CPU21が使用可能なチャネルの推定を行った際に、使用可能と推定されるチャネルがなかった場合(S105:NO)について述べる。この場合、CPU21は、データを送信できる可能性が低い旨のコメントと、利用者に指示を入力してもらうための入力ボタンとをディスプレイ11に表示する(S123)。ディスプレイ11に表示されるコメントと入力ボタンの一例を図10に示す。図10に示すように、ディスプレイ11の中央には、コメントとして、「通信混雑のためデータを送信できない可能性があります。指示を入力してください。」と表示されている。このコメントによって、利用者に使用可能なチャネルがない可能性が高いことを報知することができる。コメントの下方には、スキャンの実行を開始してデータ送信の作業を継続するための送信作業継続ボタン111と、送信するデータを保存して後で自動的に送信するための自動送信ボタン112と、データの送信を中止するための中止ボタン113とが表示されている。   Next, in the process of S104, a case where there is no channel that is estimated to be usable when the CPU 21 estimates a usable channel (S105: NO) will be described. In this case, the CPU 21 displays on the display 11 a comment that it is unlikely that data can be transmitted and an input button for allowing the user to input an instruction (S123). An example of comments and input buttons displayed on the display 11 is shown in FIG. As shown in FIG. 10, in the center of the display 11, as a comment, “There is a possibility that data cannot be transmitted due to communication congestion. Please enter an instruction.” Is displayed. This comment can inform the user that there is a high possibility that there is no usable channel. Below the comment, a transmission work continuation button 111 for starting execution of scanning and continuing the data transmission work, and an automatic transmission button 112 for saving data to be transmitted and automatically transmitting it later A cancel button 113 for canceling data transmission is displayed.

次いで、CPU21は、ディスプレイ11に表示した入力ボタンに対応した位置のタッチパネル12が利用者によって押下されたことを検出することで、利用者からの指示が入力されたか否かを判断する(S124)。CPU21は、利用者からの指示が入力されていないと判断した場合には(S124:NO)、S124の処理に戻り、処理を繰り返す。CPU21は、利用者からの指示が入力されたと判断した場合には(S124:YES)、S124の処理において利用者によって押下されたボタンが送信作業継続ボタン111であるか否かを判断する(S125)。   Next, the CPU 21 determines whether or not an instruction from the user has been input by detecting that the touch panel 12 at a position corresponding to the input button displayed on the display 11 has been pressed by the user (S124). . When the CPU 21 determines that no instruction from the user has been input (S124: NO), the CPU 21 returns to the process of S124 and repeats the process. If the CPU 21 determines that an instruction from the user has been input (S124: YES), the CPU 21 determines whether the button pressed by the user in the process of S124 is the transmission work continuation button 111 (S125). ).

使用可能なチャネルがない可能性が高いが、チャネルのスキャンを実行することを利用者が望む場合は、利用者が送信作業継続ボタン111を押下する。CPU21は、利用者によって押下されたボタンが送信作業継続ボタン111であると判断した場合には(S125:YES)、全てのチャネルを一つのグループとして設定し、グループ記憶領域231に記憶する(S126)。以下の説明では、S126の処理によって設定されるグループを第五グループという。次に、CPU21は、S107の処理に進み処理を行う。つまり、CPU21は、第五グループをスキャンを実行するグループとして決定し(S107)、S107〜S122の処理を行う。これによって、使用可能なチャネルがない可能性が高い場合でも、利用者からの指示があればスキャンを実行することができる。   When there is a high possibility that there is no usable channel, but the user desires to perform channel scanning, the user presses the transmission work continuation button 111. If the CPU 21 determines that the button pressed by the user is the transmission work continuation button 111 (S125: YES), the CPU 21 sets all the channels as one group and stores them in the group storage area 231 (S126). ). In the following description, the group set by the process of S126 is referred to as a fifth group. Next, the CPU 21 proceeds to the process of S107 and performs the process. That is, the CPU 21 determines the fifth group as a group for executing scanning (S107), and performs the processes of S107 to S122. As a result, even when there is a high possibility that there is no usable channel, a scan can be executed if there is an instruction from the user.

CPU21は、利用者によって押下されたボタンが送信作業継続ボタン111ではないと判断した場合には(S125:NO)、利用者に押下されたボタンが自動送信ボタン112であるか否かを判断する(S127)。CPU21は、利用者によって押下されたボタンが自動送信ボタン112であると判断した場合には(S127:YES)、次いで、使用回数DT51(図4参照)を参照し、使用可能なチャネルがあると推定される時間を特定する(S128)。CPU21は、使用回数DT51を参照し、現在の時間に対応する時間より後の時間において、チャネルの使用回数が所定の使用回数(例えば、8回)以下のチャネルが存在する時間を特定することで、使用可能なチャネルがあると推定される時間を特定する(S128)。   When the CPU 21 determines that the button pressed by the user is not the transmission work continuation button 111 (S125: NO), the CPU 21 determines whether or not the button pressed by the user is the automatic transmission button 112. (S127). If the CPU 21 determines that the button pressed by the user is the automatic transmission button 112 (S127: YES), then, referring to the use count DT51 (see FIG. 4), there is an available channel. The estimated time is specified (S128). The CPU 21 refers to the number of use times DT51, and specifies a time during which a channel whose number of times of channel use is equal to or less than a predetermined number of times of use (for example, 8 times) after the time corresponding to the current time exists. The time estimated to have a usable channel is specified (S128).

次いで、CPU21は、S128の処理において特定した時間を、再通信開始時間として設定し、再通信開始時間記憶領域244に記憶する(S129)。次いで、CPU21は、S102の処理に戻り、処理を繰り返す。そして、CPU21は、再通信開始時間になったと判断した場合には(S103:YES)、S104の処理に進み、通信を行うための処理を行う。このようにして、自動でデータが送信される。   Next, the CPU 21 sets the time specified in the process of S128 as a recommunication start time, and stores it in the recommunication start time storage area 244 (S129). Next, the CPU 21 returns to the process of S102 and repeats the process. When the CPU 21 determines that the re-communication start time has come (S103: YES), the CPU 21 proceeds to the process of S104 and performs a process for performing communication. In this way, data is automatically transmitted.

CPU21は、S127の処理において、利用者によって押下されたボタンが自動送信ボタン112でないと判断した場合には(S127:NO)、中止ボタン113が利用者によって押下されているので、S102の処理に戻り、処理を繰り返す。   If the CPU 21 determines in the process of S127 that the button pressed by the user is not the automatic transmission button 112 (S127: NO), the cancel button 113 is pressed by the user, so the process of S102 is performed. Return and repeat the process.

例えば、所定使用回数が8回であるとし、現在の時間が9:40であるとする。使用回数DT51(図4参照)における現在の時間に対応する9:40≦T<9:50では、全てのチャネルの使用回数が8回より多い。このため、CPU21は、使用可能なチャネルがないと推定する(S104)。そして、CPU21は、使用可能なチャネルであると推定されるチャネルがないと判断し(S105:NO)、図10に示すように、データを送信できる可能性が低い旨のコメントと、入力ボタンである送信作業継続ボタン111と自動送信ボタン112と中止ボタン113とをディスプレイ11に表示する(S123)。次いで、利用者が入力ボタンを押下すると、CPU21は、利用者からの指示が入力されたと判断し(S124:YES)、利用者によって押下されたボタンが送信作業継続ボタン111であるか否かを判断する(S125)。   For example, it is assumed that the predetermined number of times of use is 8 and the current time is 9:40. In 9: 40 ≦ T <9:50 corresponding to the current time in the use count DT51 (see FIG. 4), the use count of all channels is more than 8. For this reason, the CPU 21 estimates that there is no usable channel (S104). Then, the CPU 21 determines that there is no channel estimated to be a usable channel (S105: NO) and, as shown in FIG. 10, a comment indicating that there is a low possibility of data transmission and an input button. A transmission work continuation button 111, an automatic transmission button 112, and a cancel button 113 are displayed on the display 11 (S123). Next, when the user presses the input button, the CPU 21 determines that an instruction from the user has been input (S124: YES), and determines whether the button pressed by the user is the transmission work continuation button 111 or not. Judgment is made (S125).

CPU21は、利用者によって押下されたボタンが送信作業継続ボタン111であると判断した場合には(S125:YES)、全てのチャネルであるch1〜ch14を、一つの第五グループとして設定し、グループ記憶領域231に記憶する(S126)。次いで、CPU21は、S107の処理に進み、チャネルのスキャンを実行する。   When the CPU 21 determines that the button pressed by the user is the transmission work continuation button 111 (S125: YES), it sets all channels ch1 to ch14 as one fifth group, Store in the storage area 231 (S126). Next, the CPU 21 proceeds to the process of S107 and executes a channel scan.

利用者によって押下されたボタンが自動送信ボタン112である場合には、CPU21は、送信作業継続ボタン111が押下されていないと判断し(S125:NO)、自動送信ボタン112が押下されたと判断する(S127:YES)。次いで、CPU21は、使用回数DT51を参照し、9:40より後の時間において、使用回数が8回以下のチャネルが存在する10:00≦T<10:30を使用可能なチャネルがあると推定される時間として特定する。そして、CPU21は、S128の処理において特定した時間10:00≦T<10:30を、再通信開始時間として設定し、再通信開始時間記憶領域244に記憶する(S129)。次いで、CPU21は、S102の処理に戻り、処理を繰り返す。   When the button pressed by the user is the automatic transmission button 112, the CPU 21 determines that the transmission work continuation button 111 is not pressed (S125: NO), and determines that the automatic transmission button 112 is pressed. (S127: YES). Next, the CPU 21 refers to the use count DT51 and estimates that there is a channel that can use 10: 00 ≦ T <10:30 in which there is a channel with the use count of 8 or less in the time after 9:40. Specified as time to be. Then, the CPU 21 sets the time 10: 00 ≦ T <10:30 specified in the process of S128 as the recommunication start time, and stores it in the recommunication start time storage area 244 (S129). Next, the CPU 21 returns to the process of S102 and repeats the process.

そして、時間が経過し、再通信開始時間として設定された10:00≦T<10:30の範囲の時間、詳細には、10:00になったとCPU21が判断した場合には(S103:YES)、CPU21は、S104の処理に進み、処理を繰り返す。   When the CPU 21 determines that the time has elapsed and the time within the range of 10: 00 ≦ T <10:30 set as the re-communication start time, specifically 10:00, is determined (S103: YES) ), The CPU 21 proceeds to the process of S104 and repeats the process.

以上説明したように、本実施形態のメイン処理が行われる。本実施形態によれば、CPU21は、使用回数DT51における現在の時間と同じ時間での各チャネルの使用回数を参照して使用可能なチャネルを推定し(S104)、スキャンをする順番を決定している。使用回数DT51に登録されている使用回数は、通信装置1が設置された環境における過去に使用されたチャネルの実績を示している。一般的に、他の装置は、ある周波数帯域(チャネル)に固定されているもしくは、何らかのパターンに従ってスキャンを実行して、使用するチャネルを決定する場合が多い。このため、使用回数DT51には、各時間における、他の装置が使用するチャネルの傾向が現れる。使用回数DT51に他の装置が使用するチャネルの傾向が現れるので、CPU21は、使用回数DT51を使用することによって、現在の時間において使用できる可能性の高いチャネルをスキャンすることができる。よって、通信を行うチャネルを効率よく決定することができる。また、チャネルをスキャンする場合のCPUの負荷を軽減できるとともに、消費電力を削減することができる。   As described above, the main processing of this embodiment is performed. According to the present embodiment, the CPU 21 estimates a usable channel by referring to the number of times each channel is used at the same time as the current time in the number of times used DT51 (S104), and determines the order of scanning. Yes. The number of uses registered in the number of uses DT51 indicates the results of channels used in the past in the environment where the communication device 1 is installed. In general, other devices are often fixed to a certain frequency band (channel) or scan according to a certain pattern to determine a channel to be used. For this reason, the number of uses DT51 shows a tendency of channels used by other devices at each time. Since the tendency of channels used by other devices appears in the usage count DT51, the CPU 21 can scan channels that are likely to be used at the current time by using the usage count DT51. Therefore, the channel for communication can be determined efficiently. In addition, it is possible to reduce the load on the CPU when scanning channels, and to reduce power consumption.

また、CPU21は、S110の処理において、過去の使用回数の少ない順に、スキャンを実行する順番を決定している。このため、CPU21は、現在の時間において使用できる可能性が高いチャネルから順にスキャンを実行することができ、通信を行うチャネルを効率よく決定することができる。   Further, in the process of S110, the CPU 21 determines the order in which scans are executed in the order of the least number of past uses. For this reason, CPU21 can perform a scan in an order from the channel with high possibility of being usable in the present time, and can determine the channel which communicates efficiently.

CPU21は、S109の処理において、第一〜第五条件にそれぞれ重みを付けて優先順位を決定している。第一〜第五条件にそれぞれ重みを付けることによって、通信品質の高いチャネルや、使用されていない可能性の高いチャネルを優先してスキャンを実行することができる。なお、重みの値は一例であり、重みの値を変更してもよい。また、第一〜第五条件のすべてについて、重みを設定する必要はなく、例えば、第一条件と第三条件との2つのみに重みをつけてもよい。また、重みを付けることは一例であり、重みを付けなくてもよい。この場合、例えば、第一条件を満たすチャネル、第二条件を満たすチャネル、第三条件を満たすチャネル、第四条件を満たすチャネル、第五条件を満たすチャネルの順番で、スキャンを実行する順序を決定してもよい。このようにしても、通信品質の高いチャネルや使用されていないチャネルを優先してスキャンを実行することができる。以上のように、第一〜第五条件のうちの少なくとも一の条件を設定して、優先順位を決定すればよい。   In the process of S109, the CPU 21 determines priorities by assigning weights to the first to fifth conditions. By assigning weights to the first to fifth conditions, scanning can be performed with priority on channels with high communication quality and channels that are not likely to be used. The weight value is an example, and the weight value may be changed. Further, it is not necessary to set weights for all of the first to fifth conditions. For example, only two of the first condition and the third condition may be weighted. In addition, weighting is an example, and weighting may not be performed. In this case, for example, the scan execution order is determined in the order of channels satisfying the first condition, channels satisfying the second condition, channels satisfying the third condition, channels satisfying the fourth condition, and channels satisfying the fifth condition. May be. Even in this case, scanning can be performed with priority given to channels with high communication quality or unused channels. As described above, at least one of the first to fifth conditions may be set to determine the priority order.

また、CPU21は、S113およびS114の処理において、受信信号強度を測定し、受信信号強度が所定の閾値以上であれば、現在使用されているチャネルであると判断している。つまり、本実施形態によれば、受信信号強度を参照して、使用可能なチャネルであるか否かを判断することができる。   In addition, the CPU 21 measures the received signal strength in the processes of S113 and S114, and determines that the channel is currently used if the received signal strength is equal to or greater than a predetermined threshold. That is, according to the present embodiment, it is possible to determine whether the channel is usable by referring to the received signal strength.

また、CPU21は、S104の処理において、所定使用回数以下のチャネルを使用可能なチャネルであるとして推定する。使用可能なチャネルであると推定されるチャネルがなく(S105:NO)、利用者が中止ボタン113を押下した場合には(S127:NO)、CPU21は、スキャンを実行しない。このため、CPUの負荷を軽減できるとともに、消費電力を削減することができる。   Further, the CPU 21 estimates in the process of S104 that a channel having a predetermined number of times of use or less is a usable channel. If there is no channel estimated to be usable (S105: NO) and the user presses the cancel button 113 (S127: NO), the CPU 21 does not execute the scan. For this reason, the load on the CPU can be reduced and the power consumption can be reduced.

なお、本発明は上記の実施形態に限定されるものではなく、種々の変更が可能である。例えば、無線LANを例にして説明していたが、これに限定されない。他の通信方式でもよい。   In addition, this invention is not limited to said embodiment, A various change is possible. For example, although a wireless LAN has been described as an example, the present invention is not limited to this. Other communication methods may be used.

また、使用回数DT51は、1種類のみを参照していたが、これに限定されない。例えば、使用回数DT51を祝祭日、曜日毎、月毎、および季節毎に作成し、参照してもよい。   Moreover, although the use frequency DT51 referred to only one type, it is not limited to this. For example, the usage count DT51 may be created and referred to on holidays, every day of the week, every month, and every season.

また、グループ数DT52は、混雑時および平常時でグループ数を分けていたが、これに限定されない。例えば、祝祭日、曜日毎、月毎、および季節毎で、グループ数を分けてもよい。   Moreover, although the group number DT52 divided the group number at the time of congestion and a normal time, it is not limited to this. For example, the number of groups may be divided according to holidays, every day of the week, every month, and every season.

また、使用回数が本発明の「使用頻度」に相当するが、本発明の「使用頻度」は使用回数に限定されない。例えば、スキャンを実行した回数に対する、他の装置によって使用されていた回数の割合でもよい。また、例えば、30分間の各チャネルの使用回数の合計を、30分で除算した結果である、1分間当たりの使用回数の平均値であってもよい。同様に、本発明の「第一頻度」および「第二頻度」も、回数には、限定されない。   The number of uses corresponds to the “use frequency” of the present invention, but the “use frequency” of the present invention is not limited to the number of uses. For example, it may be a ratio of the number of times used by another device to the number of times the scan is executed. Further, for example, it may be an average value of the number of times of use per minute, which is a result of dividing the total number of times of use of each channel for 30 minutes by 30 minutes. Similarly, the “first frequency” and “second frequency” of the present invention are not limited to the number of times.

また、S113〜S114の処理において、受信信号強度が測定され、チャネルが使用可能であるか否かが判断されていたが、これに限定されない。例えば、ベースバンド信号を測定することによって、チャネルが使用可能であるか否かを判断してもよい。   Further, in the processes of S113 to S114, the received signal strength is measured and it is determined whether or not the channel is usable. However, the present invention is not limited to this. For example, it may be determined whether the channel is usable by measuring a baseband signal.

また、S123の処理において、データを送信できる可能性が低い旨のコメントと、入力ボタンとがディスプレイ11に表示されていたが、これに限定されない。例えば、入力ボタンを表示しなくてもよい。この場合に、利用者の指示を受け付けることなく、送信を中止したり、後から自動で再送信したりしてもよい。   Further, in the process of S123, the comment indicating that the possibility of data transmission is low and the input button are displayed on the display 11. However, the present invention is not limited to this. For example, the input button may not be displayed. In this case, the transmission may be canceled without being accepted by the user, or may be automatically retransmitted later.

また、S123の処理において、データを送信できる可能性が低い旨のコメントを表示するのに換えて、図11に示すグラフ60をディスプレイ11に表示してもよい。グラフ60について説明する。グラフ60は、時間毎のチャネルの使用状況をヒストグラムで表している。横軸は時間であり、縦軸はch1〜ch14の使用回数の合計である。なお、グラフ60は、30分ごとの使用回数をヒストグラムで表しているが、これに限定されず、例えば、混雑時には、10分間隔、平常時には、30分間隔で表してもよい。   Further, in the process of S123, instead of displaying a comment indicating that there is a low possibility that data can be transmitted, the graph 60 shown in FIG. The graph 60 will be described. The graph 60 represents the usage status of the channel for each time as a histogram. The horizontal axis is time, and the vertical axis is the total number of times ch1 to ch14 are used. The graph 60 represents the number of times of use every 30 minutes as a histogram, but is not limited to this. For example, the graph 60 may be represented at intervals of 10 minutes during congestion and at intervals of 30 minutes during normal times.

グラフ60は、使用回数DT51における24時間分のデータから作成される。例えば、使用回数DT51(図4参照)において、8:30≦T<9:00のch1〜ch14の合計の使用回数は、52回である。また、9:00≦T<9:30のch1〜ch14の合計の使用回数は、189回である。また、9:30≦T<10:00のch1〜ch14の合計の使用回数は、340回である。また、10:00≦T<10:30のch1〜ch14の合計の使用回数は、64回である。グラフ60には、これらの使用回数がヒストグラムとして表示されている。グラフ60は、過去の使用回数を表しているので、現在および近未来の通信の混雑具合の予想グラフとして使用できる。利用者は、グラフ60を参照して通信の混雑具合を知ることができる。また、グラフ60をディスプレイ11に表示する場合に、現在の時間に対応するグラフの部分の色を変えたり、点滅させたりしてもよい。これによって、利用者は、現在の時間における通信の混雑具合の予想を一目で確認することができる。また、チャネルの使用状況に応じて、グラフの色を変更してもよい。   The graph 60 is created from data for 24 hours in the use count DT51. For example, in the use count DT51 (see FIG. 4), the total use count of ch1 to ch14 of 8: 30 ≦ T <9:00 is 52 times. The total number of uses of ch1 to ch14 with 9: 00 ≦ T <9:30 is 189 times. In addition, the total number of uses of ch1 to ch14 with 9: 30 ≦ T <10:00 is 340 times. The total number of times of use of ch1 to ch14 with 10: 00 ≦ T <10:30 is 64 times. In the graph 60, the number of times of use is displayed as a histogram. Since the graph 60 represents the past number of times of use, it can be used as a prediction graph of the degree of congestion of current and near future communications. The user can know the degree of communication congestion with reference to the graph 60. Further, when displaying the graph 60 on the display 11, the color of the portion of the graph corresponding to the current time may be changed or blinked. Thereby, the user can confirm at a glance the prediction of the degree of communication congestion at the current time. Also, the color of the graph may be changed according to the channel usage status.

また、通信装置1が設置された環境に、同種の通信装置が複数存在する場合、通信プロトコルのモデルの一種であるマスター/スレーブの処理を行ってもよい。以下、マスター/スレーブの処理を行う場合について説明する。同じ使用環境下に同種の通信装置が複数存在する場合、複数の通信装置において、使用回数DT51(図4参照)が同様になるため、同じ時間でチャネルのスキャンを実行すると、同じ動作になる。このため、複数の通信装置が同時に同じチャネルを選択するおそれがある。この状態を回避するために、同時に通信を開始しようとした通信装置は、一旦待機し、再び通信を開始する。この際、マスター装置がスレーブ装置よりも先に通信を開始する。以下の説明では、マスター/スレーブの処理において、まず、待機時間データテーブル55について説明し、次いで、アクセスポイント(図示外)において行われる処理を説明し、次いで、通信装置1において行われる処理について説明する。   Further, when there are a plurality of communication devices of the same type in the environment where the communication device 1 is installed, a master / slave process, which is a type of communication protocol model, may be performed. Hereinafter, a case where master / slave processing is performed will be described. When there are a plurality of communication devices of the same type under the same usage environment, the number of uses DT51 (see FIG. 4) is the same in the plurality of communication devices. For this reason, there is a possibility that a plurality of communication devices simultaneously select the same channel. In order to avoid this state, a communication device that attempts to start communication at the same time temporarily waits and starts communication again. At this time, the master device starts communication before the slave device. In the following description, in the master / slave process, the standby time data table 55 will be described first, then the process performed at the access point (not shown) will be described, and then the process performed at the communication device 1 will be described. To do.

待機時間データテーブル55(以下、待機時間DT55という。)について説明する。待機時間DT55は、フラッシュメモリ24(図2参照)に記憶されている。なお、待機時間の範囲を時間T2で表し、時間の単位のマイクロ秒を「μS」と表わす。図15に示すように、待機時間DT55は、マスター装置とスレーブ装置との欄に区切られている。マスター装置の欄は、待機時間10μS≦T2≦50μSに対応付けられている。スレーブ装置の欄は、待機時間50μS<T2≦200μSに対応付けられている。待機時間DT55は、通信装置1のS405およびS406の処理(図15参照、後述)において参照されるが、詳細については後述する。   The standby time data table 55 (hereinafter referred to as standby time DT55) will be described. The standby time DT55 is stored in the flash memory 24 (see FIG. 2). The range of the standby time is represented by time T2, and the microsecond of time unit is represented by “μS”. As shown in FIG. 15, the standby time DT55 is divided into columns of a master device and a slave device. The column of the master device is associated with a waiting time of 10 μS ≦ T2 ≦ 50 μS. The slave device column is associated with a waiting time of 50 μS <T2 ≦ 200 μS. The standby time DT55 is referred to in the processing of S405 and S406 of the communication device 1 (see FIG. 15, described later), and details will be described later.

次に、アクセスポイントについて説明する。無線LANで通信を行う場合、通信装置は、アクセスポイント(図示外)を介して、通信を行う。アクセスポイントは、通信装置1と、インターネット網もしくは公衆回線網との間に設けられている。同じ使用環境下に同種の通信装置が複数存在する場合、同じアクセスポイントを使用することになる。アクセスポイントは、通信装置が通信を行う場合に、通信を許可する旨を示す信号である確認応答信号(ACK)を通信装置に送信する。以下、アクセスポイントのCPUによって行われる処理であるアクセスポイント処理について説明する。   Next, an access point will be described. When communicating via a wireless LAN, the communication device communicates via an access point (not shown). The access point is provided between the communication device 1 and the Internet network or public line network. When there are a plurality of communication devices of the same type under the same use environment, the same access point is used. When the communication device performs communication, the access point transmits an acknowledgment signal (ACK), which is a signal indicating that communication is permitted, to the communication device. Hereinafter, access point processing that is processing performed by the CPU of the access point will be described.

図13に示すように、アクセスポイント処理では、まず、通信質問信号を受信する。通信装置1のCPU21は、通信を開始する場合、S401の処理(図15参照、後述)において、通信を開始するためにアクセスポイントに対して問い合わせをするための信号である通信質問信号を、アクセスポイントに送信する。S201の処理において、アクセスポイントのCPUは、通信装置1および他の通信装置から送信される通信質問信号を受信したか否かを判断する(S201)。アクセスポイントのCPUは、通信質問信号を受信していない場合には(S201:NO)、次いで、S201の処理を繰り返す。   As shown in FIG. 13, in the access point process, first, a communication inquiry signal is received. When starting communication, the CPU 21 of the communication device 1 accesses a communication inquiry signal, which is a signal for making an inquiry to the access point, in order to start communication in the process of S401 (see FIG. 15, described later). Send to point. In the process of S201, the CPU of the access point determines whether or not a communication inquiry signal transmitted from the communication device 1 and another communication device has been received (S201). When the communication question signal is not received (S201: NO), the CPU of the access point then repeats the process of S201.

アクセスポイントのCPUは、通信質問信号を受信した場合には(S201:YES)、受信した通信質問信号が解析可能か否かを判断する(S202)。複数の通信装置が、同じタイミングで通信を開始しようとした場合、各通信装置が通信質問信号を同時に送信するため、通信質問信号同士が衝突し、通信質問信号は、アクセスポイントのCPUが解析できない状態になる。複数の通信装置が同じタイミングで通信を開始しようとしていない場合には、通信質問信号同士が衝突することがないので、通信質問信号は、アクセスポイントのCPUが解析できる状態である。   When the communication question signal is received (S201: YES), the CPU of the access point determines whether or not the received communication question signal can be analyzed (S202). When a plurality of communication devices try to start communication at the same timing, each communication device transmits a communication question signal at the same time. Therefore, the communication question signals collide with each other, and the communication question signal cannot be analyzed by the CPU of the access point. It becomes a state. When a plurality of communication devices are not trying to start communication at the same timing, the communication question signals do not collide with each other, so that the communication question signals can be analyzed by the CPU of the access point.

アクセスポイントのCPUは、S201の処理で受信した通信質問信号が解析可能であると判断した場合には(S202:YES)、通信質問信号を送信した通信装置に対して、通信を許可する旨を示す信号である確認応答信号(ACK)を送信する(S203)。通信質問信号が解析可能であれば、アクセスポイントのCPUは、通信質問信号を送信した通信装置を特定することができる。アクセスポイントのCPUは、特定した通信装置に対して確認応答信号を送信する。確認応答信号が通信装置1に対して送信された場合には、確認応答信号は、通信装置1のCPU21のS402の処理(図15参照)において受信される。次いで、アクセスポイントのCPUは、S201に戻り、処理を繰り返す。   When the CPU of the access point determines that the communication question signal received in the process of S201 can be analyzed (S202: YES), it indicates that communication is permitted to the communication device that has transmitted the communication question signal. An acknowledgment signal (ACK), which is a signal indicating this, is transmitted (S203). If the communication inquiry signal can be analyzed, the CPU of the access point can identify the communication device that has transmitted the communication inquiry signal. The CPU of the access point transmits an acknowledgment signal to the identified communication device. When the confirmation response signal is transmitted to the communication device 1, the confirmation response signal is received in the process of S402 of the CPU 21 of the communication device 1 (see FIG. 15). Next, the CPU of the access point returns to S201 and repeats the process.

アクセスポイントのCPUは、S201の処理で受信した通信質問信号が解析可能でないと判断した場合には(S202:NO)、通信装置に対して応答せず、確認応答信号は送信しない(S204)。通信質問信号が解析できないため、アクセスポイントのCPUは、通信質問信号を送信した通信装置を特定することができないからである。次いで、S201に戻り処理を繰り返す。   When the CPU of the access point determines that the communication inquiry signal received in the process of S201 cannot be analyzed (S202: NO), it does not respond to the communication device and does not transmit the confirmation response signal (S204). This is because the communication question signal cannot be analyzed, and thus the CPU of the access point cannot identify the communication device that has transmitted the communication question signal. Next, the process returns to S201 and is repeated.

次に、図14を参照して、通信装置1のCPU21が実行するマスター/スレーブ設定処理について説明する。マスター/スレーブ設定処理は、同種の通信装置が複数存在する場合に、それぞれの通信装置をマスター装置とスレーブ装置とに設定する処理である。さらに、スレーブ装置として設定された場合には、マスター装置が記憶している使用回数DT51のデータを受信して、記憶することができる。マスター/スレーブ設定処理は、例えば、通信装置1が新しい環境下に設置され、通信装置1の電源がオンされた場合に行われたり、数日毎に行われたりする。   Next, a master / slave setting process executed by the CPU 21 of the communication device 1 will be described with reference to FIG. The master / slave setting process is a process of setting each communication device as a master device and a slave device when there are a plurality of communication devices of the same type. Furthermore, when set as a slave device, data of the number of use times DT51 stored in the master device can be received and stored. The master / slave setting process is performed, for example, when the communication apparatus 1 is installed in a new environment and the communication apparatus 1 is powered on, or is performed every few days.

図14に示すマスター/スレーブ設定処理では、CPU21は、通信装置1の設置環境において、他の同種の通信装置が存在するか否かを検出する(S301)。S301の処理における検出は、例えば、直接スペクトラム拡散を行う際の通信装置特有の疑似ランダム符号パターンや、通信時の信号内に組み込まれている通信装置の種類を特定するための信号等を検知することによって行われる。なお、他の同種の通信装置がある場合に、利用者が他の通信装置があることを通信装置1に設定してもよい。   In the master / slave setting process shown in FIG. 14, the CPU 21 detects whether or not there is another communication device of the same type in the installation environment of the communication device 1 (S301). The detection in the process of S301 detects, for example, a pseudo-random code pattern unique to a communication device when performing direct spectrum spreading, a signal for specifying the type of communication device incorporated in a signal at the time of communication, and the like. Is done by. Note that when there is another communication device of the same type, the user may set the communication device 1 that there is another communication device.

次いで、CPU21は、S301の処理における検出の結果、他の同種の通信装置が存在するか否かを判断する(S302)。他の同種の通信装置が存在しない場合には(S302:NO)、CPU21は、マスタースレーブ設定記憶領域245に、マスター装置であることを示すデータを記憶することによって通信装置1をマスター装置として設定する(S303)。   Next, the CPU 21 determines whether there is another communication device of the same type as a result of the detection in the process of S301 (S302). If there is no other communication device of the same type (S302: NO), the CPU 21 sets the communication device 1 as a master device by storing data indicating that it is a master device in the master slave setting storage area 245. (S303).

CPU21は、S302の処理において、他の同種の通信装置が存在すると判断した場合には(S302:YES)、マスタースレーブ設定記憶領域245に、スレーブ装置であることを示すデータを記憶することによって通信装置1をスレーブ装置として設定する(S304)。次いで、CPU21は、他の同種の通信装置のうち、マスター装置として動作している通信装置と通信を行い、マスター装置から送信される、マスター装置が記憶している使用回数DT51(図4参照)を受信し、使用回数データテーブル記憶領域241に記憶する(S305)。つまり、通信装置1が新たに設置された環境において、マスター装置によって測定された使用回数DT51が、通信装置1にも記憶される。これによって、通信装置1は、自装置において使用回数DT51を作成するための測定を行うことなく、新たな設置環境における通信の状況の情報を入手することができる。よって、新たな環境下においても、マスター装置によって測定された使用回数DT51を使用することによって、使用可能なチャネルを効率的に検出することができる。CPU21は、S305の処理が行うと、マスター/スレーブ設定処理を終了する。   If the CPU 21 determines in the process of S302 that another communication device of the same type exists (S302: YES), the CPU 21 communicates by storing data indicating that it is a slave device in the master-slave setting storage area 245. The device 1 is set as a slave device (S304). Next, the CPU 21 communicates with a communication device operating as a master device among other communication devices of the same type, and is transmitted from the master device. The use count DT51 stored in the master device (see FIG. 4). Is stored in the use count data table storage area 241 (S305). That is, the use count DT51 measured by the master device in the environment where the communication device 1 is newly installed is also stored in the communication device 1. As a result, the communication device 1 can obtain information on the status of communication in a new installation environment without performing measurement for creating the use count DT51 in the device itself. Therefore, even in a new environment, by using the use count DT51 measured by the master device, it is possible to efficiently detect a usable channel. When the process of S305 is performed, the CPU 21 ends the master / slave setting process.

次に、図15を参照して、マスター/スレーブの処理の場合における、図7および図8に示すメイン処理の変形例について説明する。図15は、図7および図8に示すメイン処理におけるS110の処理とS111の処理との間に、マスター/スレーブの処理の場合における特有の処理であるS401〜S406の処理を追加したものである。以後の説明では、図7および図8と同様の処理は、同じ番号で示し、詳細の説明は省略する。また、図7および図8のメイン処理のうち、図7に記載の処理は、マスター/スレーブの処理の場合においても同様なので、図示および説明は省略し、図8に記載の処理の変形例である図15についてのみ説明する。   Next, a modification of the main process shown in FIGS. 7 and 8 in the case of the master / slave process will be described with reference to FIG. FIG. 15 is obtained by adding the processes of S401 to S406, which are unique processes in the case of the master / slave process, between the processes of S110 and S111 in the main process shown in FIGS. . In the following description, processes similar to those in FIGS. 7 and 8 are denoted by the same reference numerals, and detailed description thereof is omitted. 7 and 8 is the same in the case of the master / slave process, and therefore illustration and description thereof are omitted, and a modification of the process shown in FIG. Only certain FIG. 15 will be described.

図15に示すように、CPU21は、S110の処理において、スキャンの順番を決定すると、次いで、通信質問信号を、アクセスポイントに送信する(S401)。通信質問信号は、アクセスポイントのCPUのS201の処理(図13参照)において受信される。次いで、CPU21は、アクセスポイントのCPUが実行するS203の処理によって送信される確認応答信号を受信するために待機する(S402)。待機する時間は、例えば1mSである。   As shown in FIG. 15, when the CPU 21 determines the scan order in the process of S110, it then transmits a communication inquiry signal to the access point (S401). The communication inquiry signal is received in the process of S201 of the access point CPU (see FIG. 13). Next, the CPU 21 waits to receive an acknowledgment signal transmitted by the processing of S203 executed by the CPU of the access point (S402). The waiting time is, for example, 1 mS.

次いで、CPU21は、S402の処理において確認応答信号を受信したか否かを判断する(S403)。アクセスポイントのCPU21によって確認応答信号が送信される場合は(図13のS203)、同時に通信を開始しようとする他の通信装置がない場合である。一方、アクセスポイントのCPU21によって確認応答信号が送信されなかった場合は(図13のS204の処理)、同時に通信を行おうとする他の通信装置がある場合(もしくは別の装置の信号の影響による通信エラーが発生した場合)である。つまり、CPU21は、S403の処理を実行することで、他の通信装置がスキャンを実行しているか否かを予想、判断することができる。CPU21は、確認応答信号を受信したと判断した場合には(S403:YES)、S111に進み、チャネルのスキャンを実行する。アクセスポイントによって通信が許可されているからである。以降の処理は、図7および図8において説明済みなので省略する。   Next, the CPU 21 determines whether or not an acknowledgment signal has been received in the process of S402 (S403). When the confirmation response signal is transmitted by the CPU 21 of the access point (S203 in FIG. 13), there is no other communication device that intends to start communication at the same time. On the other hand, when the confirmation response signal is not transmitted by the CPU 21 of the access point (the process of S204 in FIG. 13), there is another communication device that is trying to communicate at the same time (or communication due to the influence of the signal of another device). If an error occurs). That is, the CPU 21 can predict and determine whether or not another communication device is executing a scan by executing the process of S403. If the CPU 21 determines that the confirmation response signal has been received (S403: YES), the CPU 21 proceeds to S111 and executes a channel scan. This is because communication is permitted by the access point. Since the subsequent processing has already been described with reference to FIGS.

CPU21は、確認応答信号を受信していないと判断した場合には(S403:NO)、次いで、CPU21は、自装置である通信装置1がマスター装置であるか否かを判断する(S404)。CPU21は、S303またはS304の処理(図14参照)においてマスタースレーブ設定記憶領域245に記憶したデータを参照することによって、通信装置1がマスター装置であるか否かを判断する(S404)。   If the CPU 21 determines that the confirmation response signal has not been received (S403: NO), then the CPU 21 determines whether or not the communication device 1 as its own device is a master device (S404). The CPU 21 determines whether or not the communication device 1 is the master device by referring to the data stored in the master / slave setting storage area 245 in the processing of S303 or S304 (see FIG. 14) (S404).

CPU21は、通信装置1がマスター装置であると判断した場合には(S404:YES)、待機を行う(S405)。S405の処理において、CPU21は、待機時間DT55(図12参照)に記憶されているマスター装置の待機時間を参照する。そして、マスター装置の欄に対応つけられている待機時間の範囲で待機時間を決定し、決定した待機時間の間待機する(S405)。なお、CPU21は、待機時間DT55における待機時間の範囲でランダムに待機時間を決定する(S405)。CPU21は、待機時間の間待機したら、S401に戻り、処理を繰り返す。   When the CPU 21 determines that the communication device 1 is the master device (S404: YES), the CPU 21 stands by (S405). In the process of S405, the CPU 21 refers to the standby time of the master device stored in the standby time DT55 (see FIG. 12). Then, the standby time is determined within the range of the standby time associated with the master device column, and the system waits for the determined standby time (S405). The CPU 21 randomly determines the standby time within the standby time range in the standby time DT55 (S405). When the CPU 21 waits for the waiting time, it returns to S401 and repeats the process.

例えば、待機時間DT55(図12参照)において、マスター装置の待機時間は、10μS≦T2≦50μSである。CPU21は、10μS≦T2≦50μSの間で、ランダムに待機時間を決定し、決定した待機時間の間待機する(S405)。例えば、CPU21が待機時間を25μSに決定したら、CPU21は、25μSの間待機し、S401の処理に戻り、処理を繰り返す。そして、CPU21は、確認応答信号を受信した場合には(403:YES)、S111に進み、チャネルのスキャンを実行する。   For example, in the standby time DT55 (see FIG. 12), the standby time of the master device is 10 μS ≦ T2 ≦ 50 μS. The CPU 21 randomly determines a standby time between 10 μS ≦ T2 ≦ 50 μS and waits for the determined standby time (S405). For example, when the CPU 21 determines that the standby time is 25 μS, the CPU 21 waits for 25 μS, returns to the process of S401, and repeats the process. When the CPU 21 receives the confirmation response signal (403: YES), the CPU 21 proceeds to S111 and executes a channel scan.

通信装置1がスレーブ装置である場合には、S404の処理において、CPU21は、通信装置1がマスター装置ではないと判断し(S404:NO)、待機を行う(S406)。S406の処理において、CPU21は、待機時間DT55に記憶されているスレーブ装置の待機時間を参照する。そして、スレーブ装置の待機時間の範囲で待機時間を決定し、決定した待機時間の間待機する(S406)。なお、CPU21は、待機時間を決定する際には、待機時間の範囲でランダムに決定する(S406)。CPU21は、待機時間の間待機したら、S401の処理に戻り、処理を繰り返す。   When the communication device 1 is a slave device, in the process of S404, the CPU 21 determines that the communication device 1 is not a master device (S404: NO), and performs standby (S406). In the process of S406, the CPU 21 refers to the standby time of the slave device stored in the standby time DT55. Then, the standby time is determined within the range of the standby time of the slave device, and waits for the determined standby time (S406). In addition, when determining the standby time, the CPU 21 determines at random within the range of the standby time (S406). When the CPU 21 waits for the standby time, the CPU 21 returns to the process of S401 and repeats the process.

例えば、待機時間DT55において、スレーブ装置の待機時間は、50μS<T2≦200μSである。CPU21は、50μS<T2≦200μSの間で、ランダムに待機時間を決定し、決定した待機時間の間待機する(S406)。例えば、CPU21が待機時間を100μSに決定した場合、CPU21は、100μSの間待機し、S401の処理に戻り、処理を繰り返す。そして、CPU21は、確認応答信号を受信した場合には(S403:YES)、S111に進み、チャネルのスキャンを実行する。   For example, in the standby time DT55, the standby time of the slave device is 50 μS <T2 ≦ 200 μS. The CPU 21 randomly determines the standby time between 50 μS <T2 ≦ 200 μS and waits for the determined standby time (S406). For example, when the CPU 21 determines the standby time to be 100 μS, the CPU 21 waits for 100 μS, returns to the process of S401, and repeats the process. When the CPU 21 receives the confirmation response signal (S403: YES), the CPU 21 proceeds to S111 and executes a channel scan.

以上説明したように、同種の通信装置が複数存在する場合、通信プロトコルのモデルの一種であるマスター/スレーブの処理を行ってもよい。CPU21が、確認応答信号を受信したと判断した場合には(S403:YES)、チャネルのスキャンが実行される。つまり、他の通信装置が通信を開始しようとしていない場合に、スキャンを実行するので、通信装置1と他の通信装置とのスキャンを実行するタイミングが同じになることを防止できる。このため、通信装置1と他の通信装置とが同時に同じチャネルを選択することを防止できる。   As described above, when there are a plurality of communication devices of the same type, a master / slave process, which is a type of communication protocol model, may be performed. When the CPU 21 determines that the confirmation response signal has been received (S403: YES), a channel scan is executed. In other words, since the scan is executed when the other communication device is not about to start communication, it is possible to prevent the scan timings of the communication device 1 and the other communication device from being the same. For this reason, it can prevent that the communication apparatus 1 and another communication apparatus select the same channel simultaneously.

また、待機時間DT55(図12参照)において、マスター装置の待機時間は、スレーブ装置の待機時間より短く設定されている。通信装置1が他の通信装置と通信を開始しようとするタイミングが同じだった場合、アクセスポイントのCPUは確認応答信号を送信しない(S204、図13参照)。このとき、通信装置1がマスター装置だった場合には、待機時間DT55におけるマスター装置の待機時間の範囲で、待機時間を決定し、待機する(S405)。つまり、CPU21は、スレーブ装置の待機時間より短い時間の間待機し(S405)、再び通信質問信号をアクセスポイントに送信する(S401)。そして、確認応答信号を受信すると(S403:YES)、S111に進み、スキャンを実行する。通信装置1がマスター装置である場合には、他の通信装置はスレーブ装置である。スレーブ装置よりも短い時間待機した後に、チャネルのスキャンを行うため、スレーブ装置よりも早く通信質問信号を送信開始することができる。つまり、マスター装置である通信装置1が優先される。さらに、スキャンを実行するタイミングが他の通信装置と同じになることを防止でき、通信装置1と他の通信装置とが同時に同じチャネルを選択することを防止できる。   In the standby time DT55 (see FIG. 12), the standby time of the master device is set shorter than the standby time of the slave device. When the timing at which the communication device 1 tries to start communication with another communication device is the same, the CPU of the access point does not transmit an acknowledgment signal (S204, see FIG. 13). At this time, if the communication device 1 is a master device, the standby time is determined within the range of the standby time of the master device in the standby time DT55 and waits (S405). That is, the CPU 21 waits for a time shorter than the standby time of the slave device (S405), and transmits a communication inquiry signal to the access point again (S401). When the confirmation response signal is received (S403: YES), the process proceeds to S111 and the scan is executed. When the communication device 1 is a master device, the other communication devices are slave devices. Since the channel is scanned after waiting for a shorter time than the slave device, the transmission of the communication inquiry signal can be started earlier than the slave device. That is, priority is given to the communication apparatus 1 which is a master apparatus. Furthermore, it is possible to prevent the scan execution timing from being the same as that of other communication devices, and it is possible to prevent the communication device 1 and other communication devices from selecting the same channel at the same time.

一方、通信装置1がスレーブ装置である場合には、マスター装置より長い時間待機する(S406)。通信装置1がスレーブ装置であれば、他の通信装置がマスター装置である場合がある。つまり、マスター装置である他の通信装置による通信の開始が優先される。CPU21は、S406の処理における待機が終了すると、再び通信質問信号をアクセスポイントに送信し(S401)、確認応答信号を受信すると(S403:YES)、S111の処理に進み、スキャンを実行する。このように処理を実行することで、マスター装置である他の通信装置による通信が優先されるとともに、スキャンを実行するタイミングが他の通信装置と同じになることを防止できる。このため、複数の通信装置が同時に同じチャネルを選択することを防止できる。   On the other hand, when the communication device 1 is a slave device, it waits for a longer time than the master device (S406). If the communication device 1 is a slave device, another communication device may be a master device. That is, priority is given to the start of communication by another communication device which is a master device. When the standby in the process of S406 ends, the CPU 21 transmits a communication inquiry signal to the access point again (S401), and receives the confirmation response signal (S403: YES), proceeds to the process of S111 and executes a scan. By executing the processing in this manner, priority is given to communication by the other communication device that is the master device, and it is possible to prevent the scan execution timing from being the same as that of the other communication device. For this reason, it can prevent that a some communication apparatus selects the same channel simultaneously.

なお、図7、図8、図14、および図15の各処理を必ずしもソフトウェアで実現する必要はなく、各処理をハードウェアで実現してもよい。   Note that the processes in FIGS. 7, 8, 14, and 15 are not necessarily realized by software, and may be realized by hardware.

上記実施形態において、使用回数DT51が本発明の「データ」に相当し、使用回数データテーブル記憶領域241が本発明の「記憶装置」に相当する。図8のS120の処理およびS115の処理を行うCPU21が本発明の「記憶制御手段」に相当し、図7および図8のS108〜S110の処理を行うCPU21が本発明の「順序決定手段」に相当する。図8のS111〜S119の処理を行うCPU21が本発明の「チャネル決定手段」に相当し、所定使用回数が本発明の「第二頻度」に相当する。図7のS105の処理を行うCPU21が本発明の「頻度判断手段」に相当し、図7のS123の処理を行うCPU21が本発明の「表示制御手段」に相当する。ディスプレイ11が本発明の「表示画面」に相当し、タッチパネル12が本発明の「入力手段」に相当する。図14のS305の処理を行うCPU21が本発明の「データ記憶制御手段」に相当し、図15のS403の処理を行うCPU21が本発明の「スキャン判断手段」に相当する。   In the above embodiment, the use count DT51 corresponds to “data” of the present invention, and the use count data table storage area 241 corresponds to “storage device” of the present invention. The CPU 21 that performs the processing of S120 and S115 of FIG. 8 corresponds to the “storage control means” of the present invention, and the CPU 21 that performs the processing of S108 to S110 of FIGS. 7 and 8 is the “order determination means” of the present invention. Equivalent to. The CPU 21 that performs the processing of S111 to S119 in FIG. 8 corresponds to the “channel determination unit” of the present invention, and the predetermined number of times of use corresponds to the “second frequency” of the present invention. The CPU 21 that performs the process of S105 in FIG. 7 corresponds to the “frequency determination unit” of the present invention, and the CPU 21 that performs the process of S123 of FIG. 7 corresponds to the “display control unit” of the present invention. The display 11 corresponds to the “display screen” of the present invention, and the touch panel 12 corresponds to the “input means” of the present invention. The CPU 21 that performs the process of S305 in FIG. 14 corresponds to the “data storage control unit” of the present invention, and the CPU 21 that performs the process of S403 of FIG. 15 corresponds to the “scan determination unit” of the present invention.

上記実施形態において、図8のS120の処理およびS115の処理が本発明の「記憶制御ステップ」に相当し、図7および図8のS108〜S110の処理が本発明の「順序決定ステップ」に相当する。図8のS111〜S119が本発明の「チャネル決定ステップ」に相当する。   In the above embodiment, the processing of S120 and S115 of FIG. 8 corresponds to the “storage control step” of the present invention, and the processing of S108 to S110 of FIGS. 7 and 8 corresponds to the “order determination step” of the present invention. To do. S111 to S119 in FIG. 8 correspond to the “channel determination step” of the present invention.

1 通信装置
11 ディスプレイ
12 タッチパネル
21 CPU
32 通信制御部
33 タイマ
51 使用回数データテーブル
241 使用回数データテーブル記憶領域
244 再通信開始時間記憶領域
1 Communication Device 11 Display 12 Touch Panel 21 CPU
32 communication control unit 33 timer 51 use count data table 241 use count data table storage area 244 recommunication start time storage area

Claims (12)

無線通信を行うための複数のチャネルが他の通信を行う装置によって使用されているか否かを検出するスキャンを実行し、通信を行う前記チャネルを決定する通信装置であって、
前記スキャンを実行した過去の時間帯と、前記過去の時間帯において他の通信を行う装置によって前記各チャネルが使用されていた頻度である使用頻度とが前記チャネル毎に複数対応付けられたデータを記憶装置に記憶させる記憶制御手段と、
前記記憶制御手段によって前記記憶装置に記憶された前記データにおける、現在の時間帯と同じ前記過去の時間帯での前記各チャネルの前記使用頻度を参照し、前記スキャンを実行する前記チャネルの順序を決定する順序決定手段と、
前記順序決定手段によって決定された前記チャネルの順序で前記スキャンを実行し、通信可能な前記チャネルを決定するチャネル決定手段と
を備えたことを特徴とする通信装置。
A communication device that performs a scan to detect whether or not a plurality of channels for performing wireless communication is used by a device that performs other communication, and determines the channel to perform communication,
The past time zone in which the scan was executed and the data in which a plurality of usage frequencies, which are frequencies at which the channels were used by devices that perform other communications in the past time zone, are associated with each channel. Storage control means for storing in a storage device;
In the data stored in the storage device by the storage control means, refer to the frequency of use of each channel in the past time zone that is the same as the current time zone, and determine the order of the channels for performing the scan Order determining means for determining;
A communication apparatus comprising: channel determining means for executing the scan in the order of the channels determined by the order determining means and determining the communicable channels.
前記順序決定手段は、
前記記憶装置に記憶された前記データにおける、前記現在の時間帯と同じ前記過去の時間帯での前記各チャネルの前記使用頻度を参照し、前記現在の時間と同じ前記過去の時間帯における使用頻度が少ない前記チャネルの順に前記スキャンを実行する順序を決定することを特徴とする請求項1に記載の通信装置。
The order determining means includes
In the data stored in the storage device, refer to the usage frequency of each channel in the past time zone that is the same as the current time zone, and use frequency in the past time zone that is the same as the current time. The communication apparatus according to claim 1, wherein an order in which the scan is performed is determined in the order of the channels with a small number of channels.
前記順序決定手段は、
前記記憶装置に記憶された前記データにおける、前記現在の時間帯と同じ前記過去の時間帯での前記各チャネルの前記使用頻度を参照し、
隣接する前記チャネルのそれぞれの前記使用頻度が、両方とも所定の使用頻度である第一頻度以下のチャネルであるという条件である第一条件と、
隣接するチャネルのうち、周波数の高い前記チャネルにおける前記使用頻度と周波数の低いチャネルにおける前記使用頻度とのどちらか一方が前記第一頻度以下のチャネルであるという条件である第二条件と、
所定の時間以上継続して、前記使用頻度が前記第一頻度以下のチャネルであるという条件である第三条件と、
通信可能な周波数帯域における最も大きい周波数と、最も小さい周波数とからそれぞれ所定の周波数幅以上離れたチャネルであるという条件である第四条件と、
前記現在の時間帯と同じ前記過去の時間帯における前記使用頻度が前記第一頻度以下のチャネルであるという条件である第五条件と
のうちの少なくとも一の条件を参照し、前記スキャンを実行する前記チャネルの順序を決定することを特徴とする請求項1または2に記載の通信装置。
The order determining means includes
Referring to the frequency of use of each channel in the past time zone that is the same as the current time zone in the data stored in the storage device;
A first condition that is a condition that the use frequency of each of the adjacent channels is a channel having a frequency equal to or lower than a first frequency, both of which are predetermined use frequencies;
Among adjacent channels, a second condition that is a condition that one of the use frequency in the channel having a high frequency and the use frequency in a channel having a low frequency is a channel that is equal to or less than the first frequency;
A third condition that is a condition that the frequency of use is a channel that is equal to or lower than the first frequency continuously for a predetermined time; and
A fourth condition that is a condition that each channel is a predetermined frequency width or more away from the largest frequency and the smallest frequency in the communicable frequency band;
The scan is executed with reference to at least one condition of a fifth condition, which is a condition that the use frequency in the past time period that is the same as the current time period is a channel that is equal to or less than the first frequency. The communication apparatus according to claim 1, wherein an order of the channels is determined.
前記順序決定手段は、
前記第一条件を満たすチャネル、前記第二条件を満たすチャネル、前記第三条件を満たすチャネル、前記第四条件を満たすチャネル、前記第五条件を満たすチャネルの順番で、前記スキャンを実行する順序を決定することを特徴とする請求項3に記載の通信装置。
The order determining means includes
The order in which the scan is executed in the order of the channel satisfying the first condition, the channel satisfying the second condition, the channel satisfying the third condition, the channel satisfying the fourth condition, and the channel satisfying the fifth condition. The communication device according to claim 3, wherein the communication device is determined.
前記チャネル決定手段は、
前記順序決定手段によって決定された前記チャネルの順序で前記スキャンを実行する場合に、前記チャネルにおける無線信号の受信信号強度を測定し、測定された前記受信信号強度が所定の閾値以上であった場合に、次の順序の前記チャネルの前記スキャンを実行し、測定された受信信号強度が前記閾値より小さい場合に、通信可能なチャネルとして決定することを特徴とする請求項1から4のいずれかに記載の通信装置。
The channel determining means includes
When the scan is executed in the order of the channels determined by the order determination means, the received signal strength of the radio signal in the channel is measured, and the measured received signal strength is equal to or greater than a predetermined threshold In addition, the scan of the channels in the following order is performed, and when the measured received signal strength is smaller than the threshold, it is determined as a communicable channel. The communication device described.
前記記憶装置に記憶された前記データにおける、前記現在の時間帯と同じ前記過去の時間帯での前記チャネルの前記使用頻度を参照し、前記現在の時間帯と同じ前記過去の時間帯における前記使用頻度が、所定の頻度である第二頻度以下である前記チャネルが存在するか否かを判断する頻度判断手段を備え、
前記頻度判断手段によって前記現在の時間帯と同じ前記過去の時間帯における前記使用頻度が、前記第二頻度以下である前記チャネルが存在しないと判断された場合に、
前記順序決定手段は、前記順序を決定せず、
前記チャネル決定手段は、通信可能な前記チャネルを決定せず、
前記頻度判断手段によって前記現在の時間帯と同じ前記過去の時間帯における前記使用頻度が、前記第二頻度以下である前記チャネルが存在すると判断された場合に、
前記順序決定手段は、前記順序を決定し、
前記チャネル決定手段は、通信可能な前記チャネルを決定することを特徴とする請求項1から5のいずれかに記載の通信装置。
With reference to the frequency of use of the channel in the past time zone that is the same as the current time zone in the data stored in the storage device, the use in the past time zone that is the same as the current time zone A frequency determining means for determining whether or not the channel having a frequency equal to or lower than a second frequency that is a predetermined frequency exists;
When it is determined by the frequency determination means that the channel whose usage frequency in the same past time zone as the current time zone is less than or equal to the second frequency does not exist,
The order determining means does not determine the order;
The channel determining means does not determine the communicable channel,
When it is determined by the frequency determination means that the channel whose usage frequency in the same past time zone as the current time zone is less than or equal to the second frequency is present,
The order determining means determines the order;
The communication apparatus according to claim 1, wherein the channel determination unit determines the channel through which communication is possible.
前記頻度判断手段によって前記現在の時間帯と同じ前記過去の時間帯における前記使用頻度が、前記第二頻度以下である前記チャネルが存在しないと判断された場合に、使用可能なチャネルがない可能性が高いことを表示画面に表示させる表示制御手段をさらに備えたことを特徴とする請求項6に記載の通信装置。   There is a possibility that there is no usable channel when the frequency determining means determines that the channel whose usage frequency in the same past time zone as the current time zone is less than or equal to the second frequency does not exist. The communication apparatus according to claim 6, further comprising display control means for displaying that the value is high on the display screen. 利用者からの前記スキャンを実行するか否かの指示が入力される入力手段をさらに備え、
前記頻度判断手段によって前記現在の時間帯と同じ前記過去の時間帯における前記使用頻度が、前記第二頻度以下である前記チャネルが存在しないと判断された場合において、
前記入力手段を介して利用者によって前記スキャンを実行しない指示が入力された場合に、
前記順序決定手段は、前記順序を決定せず、
前記チャネル決定手段は、通信可能な前記チャネルを決定せず、
前記入力手段を介して利用者によって前記スキャンを実行する指示が入力された場合に、
前記順序決定手段は、前記順序を決定し、
前記チャネル決定手段は、通信可能な前記チャネルを決定することを特徴とする請求項6および7に記載の通信装置。
An input unit for inputting an instruction as to whether or not to execute the scan from a user;
In the case where it is determined by the frequency determining means that the channel whose usage frequency in the same past time zone as the current time zone is less than or equal to the second frequency does not exist,
When an instruction not to execute the scan is input by the user via the input unit,
The order determining means does not determine the order;
The channel determining means does not determine the communicable channel,
When an instruction to execute the scan is input by the user via the input means,
The order determining means determines the order;
The communication apparatus according to claim 6 or 7, wherein the channel determination means determines the communicable channel.
前記通信装置と同じ種類の通信装置であり、前記データを記憶する前記記憶装置を備えた他の通信装置が同一環境下に存在する場合に、
前記他の通信装置から送信される前記データを受信し、前記通信装置の前記記憶装置に記憶させるデータ記憶制御手段をさらに備えたことを特徴とする請求項1から8のいずれかに記載の通信装置。
When the communication device of the same type as the communication device and another communication device including the storage device that stores the data exists in the same environment,
9. The communication according to claim 1, further comprising data storage control means for receiving the data transmitted from the other communication device and storing the data in the storage device of the communication device. apparatus.
前記通信装置と同じ種類の通信装置であり、前記データを記憶する前記記憶装置を備えた他の通信装置が同一環境下に存在する場合に、
前記他の通信装置が前記スキャンを実行しているか否かを判断するスキャン判断手段をさらに備え、
前記スキャン判断手段によって前記他の通信装置が前記スキャンを実行していると判断された場合に、前記チャネル決定手段は、前記スキャンを実行せず、
前記スキャン判断手段によって前記他の通信装置が前記スキャンを実行していないと判断された場合に、前記チャネル決定手段は、前記スキャンを実行し、通信可能な前記チャネルを決定することを特徴とする請求項1から9のいずれかに記載の通信装置。
When the communication device of the same type as the communication device and another communication device including the storage device that stores the data exists in the same environment,
Further comprising a scan determining means for determining whether or not the other communication device is executing the scan,
When it is determined by the scan determination means that the other communication device is executing the scan, the channel determination means does not execute the scan,
The channel determination unit executes the scan and determines the communicable channel when the scan determination unit determines that the other communication device is not executing the scan. The communication apparatus according to claim 1.
無線通信を行うための複数のチャネルが他の通信を行う装置によって使用されているか否かを検出するスキャンを実行し、通信を行う前記チャネルを決定する通信装置において実行される通信制御方法であって、
前記スキャンを実行した過去の時間帯と、前記過去の時間帯において他の通信を行う装置によって前記各チャネルが使用されていた頻度である使用頻度とが前記チャネル毎に複数対応付けられたデータを記憶装置に記憶させる記憶制御ステップと、
前記記憶制御手段によって前記記憶装置に記憶された前記データにおける、現在の時間帯と同じ前記過去の時間帯での前記各チャネルの前記使用頻度を参照し、前記スキャンを実行する前記チャネルの順序を決定する順序決定ステップと、
前記順序決定ステップによって決定された前記チャネルの順序で前記スキャンを実行し、通信可能な前記チャネルを決定するチャネル決定ステップと
を備えたことを特徴とする通信制御方法。
A communication control method that is executed in a communication device that performs a scan to detect whether or not a plurality of channels for performing wireless communication is used by another device that performs communication and determines the channel to perform communication. And
The past time zone in which the scan was executed and the data in which a plurality of usage frequencies, which are frequencies at which the channels were used by devices that perform other communications in the past time zone, are associated with each channel. A storage control step to be stored in the storage device;
In the data stored in the storage device by the storage control means, refer to the frequency of use of each channel in the past time zone that is the same as the current time zone, and determine the order of the channels for performing the scan An order determination step to determine;
A communication control method, comprising: a channel determination step of executing the scan in the order of the channels determined by the order determination step and determining the channels that can communicate.
無線通信を行うための複数のチャネルが他の通信を行う装置によって使用されているか否かを検出するスキャンを実行し、通信を行う前記チャネルを決定する通信装置において実行される通信制御プログラムであって、
前記通信装置のCPUに、
前記スキャンを実行した過去の時間帯と前記過去の時間帯において他の通信を行う装置によって前記各チャネルが使用されていた頻度である使用頻度とが前記チャネル毎に複数対応付けられたデータを記憶装置に記憶させる記憶制御ステップと、
前記記憶制御手段によって前記記憶装置に記憶された前記データにおける、現在の時間帯と同じ前記過去の時間帯での前記前記各チャネルの前記使用頻度を参照し、前記スキャンを実行する前記チャネルの順序を決定する順序決定ステップと、
前記順序決定ステップによって決定された前記チャネルの順序で前記スキャンを実行し、通信可能な前記チャネルを決定するチャネル決定ステップと
を実行させることを特徴とする通信制御プログラム。
A communication control program that is executed in a communication device that performs a scan to detect whether or not a plurality of channels for performing wireless communication are used by a device that performs other communication, and determines the channel to perform communication. And
In the CPU of the communication device,
Stores data in which a plurality of the past time zones in which the scan is executed and the usage frequency, which is the frequency at which each channel is used by a device that performs other communication in the past time zone, are associated with each channel. A storage control step to be stored in the device;
The order of the channels for performing the scan with reference to the frequency of use of the channels in the past time zone that is the same as the current time zone in the data stored in the storage device by the storage control means An order determination step to determine,
A communication control program that executes the scan in the order of the channels determined by the order determination step, and executes a channel determination step for determining the communicable channel.
JP2010052854A 2010-03-10 2010-03-10 Communication apparatus, communication control method, and communication control program Pending JP2011188339A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010052854A JP2011188339A (en) 2010-03-10 2010-03-10 Communication apparatus, communication control method, and communication control program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010052854A JP2011188339A (en) 2010-03-10 2010-03-10 Communication apparatus, communication control method, and communication control program

Publications (1)

Publication Number Publication Date
JP2011188339A true JP2011188339A (en) 2011-09-22

Family

ID=44794061

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010052854A Pending JP2011188339A (en) 2010-03-10 2010-03-10 Communication apparatus, communication control method, and communication control program

Country Status (1)

Country Link
JP (1) JP2011188339A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015204551A (en) * 2014-04-15 2015-11-16 日本電信電話株式会社 Radio communication device and radio communication method
JP2016111640A (en) * 2014-12-10 2016-06-20 Necエンジニアリング株式会社 Radio communication device, access point search control method, and program for access point search control
JP2016127296A (en) * 2014-12-26 2016-07-11 日本電気株式会社 Wireless communication device and control method therefor
JP2016184796A (en) * 2015-03-25 2016-10-20 Necプラットフォームズ株式会社 Radio lan communication system, radio channel determination method and program

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015204551A (en) * 2014-04-15 2015-11-16 日本電信電話株式会社 Radio communication device and radio communication method
JP2016111640A (en) * 2014-12-10 2016-06-20 Necエンジニアリング株式会社 Radio communication device, access point search control method, and program for access point search control
JP2016127296A (en) * 2014-12-26 2016-07-11 日本電気株式会社 Wireless communication device and control method therefor
JP2016184796A (en) * 2015-03-25 2016-10-20 Necプラットフォームズ株式会社 Radio lan communication system, radio channel determination method and program

Similar Documents

Publication Publication Date Title
JP6918435B2 (en) Lighting control system
JP5539069B2 (en) Power supply device
US6208629B1 (en) Method and apparatus for assigning spectrum of a local area network
KR20010039704A (en) Radio-network control apparatus and radio-network control method
EP3001734A1 (en) System, program and method for radio terminal to find access point
JP2011188339A (en) Communication apparatus, communication control method, and communication control program
WO2012086472A1 (en) Wireless communication device and method of wireless communication
JP2009010988A (en) Network system
CN106686044B (en) Remote control terminal device, remote control system, and remote control method
CN105337715B (en) It is a kind of based on the carrier wave measurement method of unauthorized frequency range and base station
JP4300214B2 (en) access point
JP4619918B2 (en) Wireless communication device
JP5261512B2 (en) Communication device, wireless LAN access point, channel selection method, and channel selection program
JP2012248939A (en) Radio communication device, radio communication system, radio communication control method and program
JP4389549B2 (en) Lighting communication system
US20150162973A1 (en) Relay apparatus and computer-readable recording medium
US9042837B2 (en) Device and method for detecting channel state
KR101166383B1 (en) Communication system using Zigbee and channel selection method thereof
JPWO2007102283A1 (en) Wireless LAN system, wireless LAN terminal, and base station search method therefor
JP5652236B2 (en) Communication device
JP4803287B2 (en) Lighting communication system
CN101356834A (en) Method for channel agility in wireless access points
JP2005135640A (en) Communication system for lighting
JP6063409B2 (en) Channel selection apparatus, channel selection system, and channel selection method
JP2011205455A (en) Wireless terminal and communication device