JP2021087173A - Terminal device - Google Patents

Terminal device Download PDF

Info

Publication number
JP2021087173A
JP2021087173A JP2019216657A JP2019216657A JP2021087173A JP 2021087173 A JP2021087173 A JP 2021087173A JP 2019216657 A JP2019216657 A JP 2019216657A JP 2019216657 A JP2019216657 A JP 2019216657A JP 2021087173 A JP2021087173 A JP 2021087173A
Authority
JP
Japan
Prior art keywords
packet
control unit
terminal device
identification information
value
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
JP2019216657A
Other languages
Japanese (ja)
Inventor
久志 河之口
Hisashi Kawanoguchi
久志 河之口
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.)
Denso Wave Inc
Original Assignee
Denso Wave Inc
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 Denso Wave Inc filed Critical Denso Wave Inc
Priority to JP2019216657A priority Critical patent/JP2021087173A/en
Publication of JP2021087173A publication Critical patent/JP2021087173A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Mobile Radio Communication Systems (AREA)

Abstract

To provide a terminal device that can establish a radio connection with a proper device while preventing an effect of fluctuations in the surrounding radio environment, etc.SOLUTION: A control unit (a) performs device searching for scanning each of a plurality of channels; (b) receives a plurality of packets from at least one external device among one or more surrounding external devices during the device searching; (c) stores, in a memory, reception record information including a used channel, a reception signal strength value, and device identification information for identifying a source external device of the packets at every packet reception during the device searching; (d) calculates a strength relationship value per device identification information from the corresponding reception signal strength value after the device searching; and (e) establishes a radio connection with a particular external device indicated by particular device identification information corresponding to the highest strength relationship value using a particular channel used by the particular external device.SELECTED DRAWING: Figure 4

Description

本明細書で開示する技術は、利用可能な周波数帯域に含まれる複数のチャネルのうちのいずれか1つのチャネルを用いて無線通信を実行可能な端末装置に関する。 The technique disclosed herein relates to a terminal device capable of performing wireless communication using any one of a plurality of channels included in an available frequency band.

特許文献1には、利用可能な周波数帯域に含まれる複数のチャネルのうちのいずれか1つのチャネルを用いて無線通信を実行可能な端末装置が開示されている。この端末装置は、端末装置が利用可能な周波数帯域に含まれる複数のチャネルのそれぞれにおいて、当該チャネルを使用するとともに周囲に存在するアクセスポイントから1個のBeaconパケットを受信する。端末装置は、各アクセスポイントからBeaconパケットを受信した際の電波強度値及びチャネルをモニタし、受信の際の電波強度値が最も高いアクセスポイントを、端末装置が無線接続を確立すべき1個の対象アクセスポイントとして決定する。そして、端末装置は、決定された対象アクセスポイントとの間で無線接続を確立する。 Patent Document 1 discloses a terminal device capable of performing wireless communication using any one of a plurality of channels included in an available frequency band. This terminal device uses the channel and receives one Beacon packet from the access points existing in the surroundings in each of the plurality of channels included in the frequency band in which the terminal device can be used. The terminal device monitors the radio field intensity value and channel when receiving a Beacon packet from each access point, and the terminal device should establish a wireless connection to the access point having the highest radio field strength value at the time of reception. Determine as the target access point. Then, the terminal device establishes a wireless connection with the determined target access point.

特開2005−142893号公報Japanese Unexamined Patent Publication No. 2005-142893

一般的に、端末装置の周囲に複数個のアクセスポイントが存在する場合、Beaconパケット受信の際の電波強度値が最も高いアクセスポイントが、接続先として最適のアクセスポイントであると考えられる。しかしながら、特許文献1の技術では、端末装置の周辺の無線環境の変動等の要因により、各アクセスポイントからBeaconパケットを受信した際の電波強度の値が、本来の実効値と異なってしまう場合がある。その結果、特許文献1の技術では、端末装置が各Beaconパケットを受信した際の周囲の無線環境の変動等の影響を受けることで、本来接続先として最適であるべきアクセスポイントが接続先の対象アクセスポイントとして決定されないという事態が発生し得る。 Generally, when there are a plurality of access points around the terminal device, the access point having the highest radio field intensity value at the time of receiving the Beacon packet is considered to be the optimum access point as the connection destination. However, in the technique of Patent Document 1, the value of the radio field intensity when the Beacon packet is received from each access point may differ from the original effective value due to factors such as fluctuations in the wireless environment around the terminal device. is there. As a result, in the technology of Patent Document 1, the access point that should be the most suitable as the connection destination is the target of the connection destination because it is affected by the fluctuation of the surrounding wireless environment when the terminal device receives each Beacon packet. It is possible that the access point will not be determined.

本明細書では、周囲の無線環境の変動等の影響を抑制し、適切な機器との間で無線接続を確立し得る端末装置を提供する。 The present specification provides a terminal device capable of suppressing the influence of fluctuations in the surrounding wireless environment and establishing a wireless connection with an appropriate device.

本明細書は、利用可能な周波数帯域に含まれる複数のチャネルのうちのいずれか1つのチャネルを用いて無線通信を実行可能な端末装置を開示する。前記端末装置は、制御部と、メモリと、を備えている。前記制御部は、(a)前記複数のチャネルのそれぞれに対して、当該チャネルを使用する機器を探すためのスキャン処理を実行する機器探索処理を実行し、(b)前記機器探索処理において、周囲に存在する1個以上の外部機器のうちの少なくとも1個の外部機器から複数個のパケットを受信し、(c)前記機器探索処理において前記パケットを受信する毎に、前記パケットの受信時における使用チャネルと、前記パケットの受信時における受信電波強度値と、前記パケットの送信元である前記外部機器を識別するための機器識別情報と、を含む受信実績情報を前記メモリに記憶させ、(d)前記機器探索処理の実行後、前記メモリに記憶された複数個の前記受信実績情報を参照し、前記機器識別情報ごとに、対応する前記受信電波強度値に基づいて強度関係値を算出し、(e)最も高い前記強度関係値に対応する特定の機器識別情報によって示される特定の外部機器との間で、前記特定の外部機器が使用する特定の使用チャネルを用いて無線接続を確立する。 The present specification discloses a terminal device capable of performing wireless communication using any one of a plurality of channels included in the available frequency band. The terminal device includes a control unit and a memory. The control unit executes (a) a device search process for executing a scan process for searching for a device using the channel for each of the plurality of channels, and (b) in the device search process, the surroundings. A plurality of packets are received from at least one external device among one or more external devices existing in the device, and (c) each time the packet is received in the device search process, the packet is used at the time of reception. Reception record information including the channel, the received radio wave intensity value at the time of receiving the packet, and the device identification information for identifying the external device that is the source of the packet is stored in the memory, and (d) After executing the device search process, the plurality of reception record information stored in the memory is referred to, and for each device identification information, an intensity-related value is calculated based on the corresponding received radio wave intensity value. e) Establish a wireless connection with a particular external device indicated by the particular device identification information corresponding to the highest intensity relationship value using the particular channel used by the particular external device.

上記の構成によると、制御部は、機器探索処理によって、周囲に存在する1個以上の外部機器のうちの少なくとも1個の外部機器から複数個のパケットを受信し、それに基づいて強度関係値を算出し、最も高い値に対応する特定の外部機器との間で無線接続を確立する。そのため、上記の構成によると、各外部機器から1個のパケット(例えばBeaconパケット)を受信した際の電波強度値に基づいて接続先の外部機器を特定する従来の構成と比べて、複数個のパケットを受信した際の電波強度値を用いて算出される強度関係値は、無線環境の変動等の影響が比較的小さい。従って、上記の構成によると、端末装置は、周囲の無線環境の変動等の影響を抑制し、適切な外部機器との間で無線接続を確立し得る。 According to the above configuration, the control unit receives a plurality of packets from at least one external device among one or more external devices existing in the vicinity by the device search process, and determines the strength relation value based on the plurality of packets. Calculate and establish a wireless connection with the specific external device corresponding to the highest value. Therefore, according to the above configuration, there are a plurality of configurations as compared with the conventional configuration in which the external device to be connected is specified based on the radio field strength value when one packet (for example, Beacon packet) is received from each external device. The strength-related value calculated using the radio field strength value when a packet is received is relatively small in the influence of fluctuations in the wireless environment and the like. Therefore, according to the above configuration, the terminal device can suppress the influence of fluctuations in the surrounding wireless environment and establish a wireless connection with an appropriate external device.

前記強度関係値は、前記機器識別情報ごとに、対応する複数個の前記受信電波強度値を平均した平均電波強度値を含んでもよい。 The intensity-related value may include an average radio wave intensity value obtained by averaging a plurality of corresponding received radio wave intensity values for each device identification information.

この構成によると、制御部は、機器探索処理によって、周囲に存在する1個以上の外部機器のうちの少なくとも1個の外部機器から複数個のパケットを受信し、機器毎に、パケットを受信した際の電波強度値の平均である平均電波強度値を算出することができる。そして、制御部は、最も高い平均電波強度値に対応する特定の外部機器を特定し、その特定の外部機器との間で無線接続を確立することができる。従って、この構成によると、各パケット受信時の無線環境の変動等の影響を平均化することができる。即ち、この構成によると、各パケット受信時の無線環境の変動等の影響を小さくすることができる。従って、この構成によると、端末装置は、適切な外部機器との間で無線接続を確立することができる。 According to this configuration, the control unit receives a plurality of packets from at least one external device among one or more external devices existing in the vicinity by the device search process, and receives the packets for each device. The average radio field strength value, which is the average of the radio wave strength values at the time, can be calculated. Then, the control unit can identify a specific external device corresponding to the highest average radio field intensity value and establish a wireless connection with the specific external device. Therefore, according to this configuration, it is possible to average the influence of fluctuations in the wireless environment at the time of receiving each packet. That is, according to this configuration, the influence of fluctuations in the wireless environment at the time of receiving each packet can be reduced. Therefore, according to this configuration, the terminal device can establish a wireless connection with a suitable external device.

前記受信実績情報は、前記使用チャネルと、前記受信電波強度値と、前記機器識別情報と、に加えて、前記パケットの内容を示すパケット内容情報をさらに含んでいてもよい。前記制御部は、さらに、前記機器探索処理の実行後、前記メモリに記憶された複数個の前記受信実績情報を参照し、前記機器識別情報ごとに、少なくとも1個の対応する前記パケット内容情報が、アクセスポイントによって出力されるパケットであることを示すか否かを判断し、少なくとも1個の前記パケット内容情報が、アクセスポイントに関係する内容を示す場合に、対応する前記機器識別情報について前記強度関係値を算出し、いずれの前記パケット内容情報も、アクセスポイントに関係する内容を示さない場合に、対応する前記機器識別情報について前記強度関係値を算出しないようにしてもよい。 The reception record information may further include packet content information indicating the content of the packet, in addition to the channel used, the received radio wave intensity value, and the device identification information. After executing the device search process, the control unit further refers to the plurality of received record information stored in the memory, and for each device identification information, at least one corresponding packet content information is obtained. , It is determined whether or not the packet is output by the access point, and when at least one packet content information indicates the content related to the access point, the strength of the corresponding device identification information is obtained. When the relational value is calculated and none of the packet content information indicates the content related to the access point, the strength relational value may not be calculated for the corresponding device identification information.

この構成によると、制御部は、機器探索処理の実行後、複数個の受信実績情報を参照し、機器識別情報ごとに、少なくとも1個の対応するパケット内容情報が、アクセスポイントによって出力されるパケットであることを示すか否かを判断する。言い換えると、制御部は、機器識別情報が示す外部機器が、アクセスポイントとしての特性を有する機器であるか否かを判断する。そして、制御部は、少なくとも1個のパケット内容情報が、アクセスポイントに関係する内容を示す場合(即ち、対応する外部機器がアクセスポイントとしての特性を有する場合)に、その機器識別情報について強度関係値を算出するが、いずれのパケット内容情報もアクセスポイントに関係する内容を示さない場合(即ち、対応する外部機器がアクセスポイントとしての特性を有さない場合)には、その機器識別情報について強度関係値を算出しない。そのため、上記の構成によると、制御部は、アクセスポイントとしての特性を有さない外部機器(例えば、無線ネットワークの子局(ステーション)としてのみ動作する機器)を、接続先の候補から除外した上で、アクセスポイントとしての特性を有する外部機器の中から適切に特定の外部機器を特定することができる。上記の構成によると、端末装置は、アクセスポイントとしての特性を有する特定の外部機器との間で適切に無線接続を確立することができる。 According to this configuration, the control unit refers to a plurality of reception record information after executing the device search process, and at least one corresponding packet content information is output by the access point for each device identification information. Judge whether or not to show that. In other words, the control unit determines whether or not the external device indicated by the device identification information is a device having characteristics as an access point. Then, when at least one packet content information indicates the content related to the access point (that is, when the corresponding external device has the characteristics as an access point), the control unit has a strength relationship with respect to the device identification information. When the value is calculated, but none of the packet content information indicates the content related to the access point (that is, when the corresponding external device does not have the characteristics as an access point), the strength of the device identification information is obtained. Do not calculate the relational value. Therefore, according to the above configuration, the control unit excludes external devices that do not have characteristics as access points (for example, devices that operate only as slave stations (stations) of wireless networks) from the candidates for connection destinations. Therefore, a specific external device can be appropriately specified from the external devices having characteristics as an access point. According to the above configuration, the terminal device can appropriately establish a wireless connection with a specific external device having characteristics as an access point.

前記制御部は、前記機器探索処理において、1個以上の外部機器のうちの少なくとも1個の外部機器から複数個のパケットを受信する場合、1個の外部機器から予め定められた最大N個(Nは2以上の整数)のパケットを受信してもよい。 When the control unit receives a plurality of packets from at least one external device among one or more external devices in the device search process, the control unit has a maximum of N predetermined packets from one external device. N may be an integer of 2 or more).

この構成によると、制御部は、機器探索処理を実行する場合、同じ外部機器から最大N個までのパケットを受信する。即ち、この構成によると、同じ外部機器から受信し、受信時の電波強度値が強度関係値の算出に使用されるパケットの最大数(上限値)がN個に設定される。強度関係値の算出のために、制御部に過大な数のパケットを受信するまでスキャン処理を継続させずに済むため、各チャネルにおけるスキャン処理の実行期間を短くし得る。その結果、機器探索処理に要する期間も短くし得る。従って、この構成によると、端末装置は、機器探索処理の開始から比較的短い期間で特定の外部機器を特定することができる。 According to this configuration, the control unit receives up to N packets from the same external device when executing the device search process. That is, according to this configuration, the maximum number (upper limit value) of packets received from the same external device and used to calculate the intensity-related value of the radio wave intensity value at the time of reception is set to N. Since it is not necessary to continue the scan process until the control unit receives an excessive number of packets in order to calculate the intensity-related value, the execution period of the scan process in each channel can be shortened. As a result, the period required for the device search process can be shortened. Therefore, according to this configuration, the terminal device can identify a specific external device in a relatively short period of time from the start of the device search process.

前記制御部は、前記機器探索処理において前記スキャン処理を実行する際、前記スキャン処理の開始から所定期間が経過した場合に、パケットの受信状況に関わらず、当該チャネルに対する前記スキャン処理を終了するようにしてもよい。 When the control unit executes the scan process in the device search process, the control unit terminates the scan process for the channel regardless of the packet reception status when a predetermined period elapses from the start of the scan process. It may be.

この構成によると、各チャネルにおけるスキャン処理の実行期間に制限が設けられる。即ち、この構成によると、各チャネルにおけるスキャン処理の実行期間が過度に長期化することを抑制することができる。従って、この構成による場合も、端末装置は、機器探索処理の開始から比較的短い期間で特定の外部機器を特定することができる。 According to this configuration, the execution period of the scan process in each channel is limited. That is, according to this configuration, it is possible to prevent the execution period of the scan process in each channel from becoming excessively long. Therefore, even with this configuration, the terminal device can identify a specific external device in a relatively short period of time from the start of the device search process.

第1実施例の無線通信システムの概要を示す。The outline of the wireless communication system of the first embodiment is shown. 端末装置の構成を表すブロック図を示す。A block diagram showing the configuration of the terminal device is shown. 無線接続処理のフローチャートを示す。The flowchart of wireless connection processing is shown. 第1実施例の機器探索処理のフローチャートを示す。The flowchart of the device search process of 1st Example is shown. 機器テーブルの一例を示す。An example of the equipment table is shown. 接続先特定処理のフローチャートを示す。The flowchart of the connection destination identification process is shown. 第2実施例の機器探索処理のフローチャートを示す。The flowchart of the device search process of the 2nd Example is shown.

(第1実施例)
(システムの構成;図1)
図1に示される無線通信システム2は、端末装置10が、所定のエリア内(例えば所定の建物内)に存在する複数個のAP(Access Pointの略)50,60,70等のうちのいずれか1つと無線接続を確立することによって、他の装置(例えば建物外に存在するサーバ等)との間で無線通信を実行するためのシステムである。図1に示されるように、無線通信システム2は、端末装置10と、AP50,60,70等と、端末装置80等と、を備える。図1の例では、AP50,60,70のみを図示しているが、実際には無線通信システム2はこれら以外のAPを備えていてもよい。また、図1の例では、端末装置10の他には端末装置80のみを図示しているが、実際には無線通信システム2はこれ以外の端末装置を備えていてもよい。
(First Example)
(System configuration; Fig. 1)
In the wireless communication system 2 shown in FIG. 1, the terminal device 10 is any one of a plurality of APs (abbreviation of Access Point) 50, 60, 70, etc. existing in a predetermined area (for example, in a predetermined building). It is a system for executing wireless communication with another device (for example, a server existing outside a building) by establishing a wireless connection with one of them. As shown in FIG. 1, the wireless communication system 2 includes a terminal device 10, AP50, 60, 70 and the like, and a terminal device 80 and the like. In the example of FIG. 1, only APs 50, 60, and 70 are shown, but in reality, the wireless communication system 2 may include APs other than these. Further, in the example of FIG. 1, only the terminal device 80 is shown in addition to the terminal device 10, but in reality, the wireless communication system 2 may include other terminal devices.

(端末装置10の構成;図1、図2)
端末装置10は、携帯型の端末装置であり、例えば、バーコード、2次元コード等の各種情報コードに記録されたデータを読み取るための情報コード読取装置(いわゆるバーコードハンディターミナル)である。例えば、端末装置10は、所定のエリア内に存在する荷物や商品等に付された情報コードに記録されたデータを読み取り、読み取られたデータを、Wi−Fi通信によって外部装置に送信するための装置である。端末装置10は、所定のエリア内での作業に従事するユーザによって携帯されている。なお、他の例では、端末装置10は、情報コード読取装置に限られず、携帯電話(例えばスマートフォン)、PDA、ノートPC、タブレット端末、RFID(Radio Frequency Identificationの略)リーダライタ等、Wi−Fi通信を実行可能な任意の携帯型の端末装置であってもよい。さらに他の例では、端末装置10は、据置型PC等、Wi−Fi通信を実行可能な任意の据置型の端末装置であってもよい。
(Structure of terminal device 10; FIGS. 1 and 2)
The terminal device 10 is a portable terminal device, and is, for example, an information code reading device (so-called bar code handy terminal) for reading data recorded in various information codes such as a bar code and a two-dimensional code. For example, the terminal device 10 reads the data recorded in the information code attached to the luggage, the product, etc. existing in the predetermined area, and transmits the read data to the external device by Wi-Fi communication. It is a device. The terminal device 10 is carried by a user engaged in work in a predetermined area. In another example, the terminal device 10 is not limited to the information code reading device, but is not limited to a mobile phone (for example, a smartphone), a PDA, a notebook PC, a tablet terminal, an RFID (abbreviation of Radio Frequency Identification) reader / writer, or Wi-Fi. It may be any portable terminal device capable of performing communication. In yet another example, the terminal device 10 may be any stationary terminal device capable of executing Wi-Fi communication, such as a stationary PC.

図2に示されるように、端末装置10は、操作部12と、表示部14と、撮影部16と、Wi−Fiインターフェース18と、制御部20と、メモリ22と、を備える。以下では、インターフェースのことを「I/F」と記載する。操作部12は、複数個のキーを備える。ユーザは、操作部12を操作して様々な指示を端末装置10に入力することができる。表示部14は、様々な情報を表示するためのディスプレイである。変形例では、操作部12と表示部14は、両者の機能を含むタッチパネルとして構成されていてもよい。撮影部16は、バーコードや2次元コード等の各種情報コードの画像を撮影することができる撮影手段である。制御部20は、撮影部16によって撮影された情報コードの画像に基づいて、情報コードに記録されたデータを読み取る(即ちデコードする)ことができる。 As shown in FIG. 2, the terminal device 10 includes an operation unit 12, a display unit 14, a photographing unit 16, a Wi-Fi interface 18, a control unit 20, and a memory 22. In the following, the interface will be referred to as "I / F". The operation unit 12 includes a plurality of keys. The user can operate the operation unit 12 to input various instructions to the terminal device 10. The display unit 14 is a display for displaying various information. In the modified example, the operation unit 12 and the display unit 14 may be configured as a touch panel including both functions. The photographing unit 16 is a photographing means capable of photographing images of various information codes such as a bar code and a two-dimensional code. The control unit 20 can read (that is, decode) the data recorded in the information code based on the image of the information code photographed by the photographing unit 16.

Wi−FiI/F18は、Wi−Fi方式に従った無線通信(以下では「Wi−Fi通信」と呼ぶ)を実行するためのI/Fである。Wi−Fi方式は、Wi-Fi Allianceによって策定された規格に準拠した無線通信方式であり、例えば、IEEE(The Institute of Electrical and Electronics Engineers, Inc.の略)802.11の規格、及び、それに準ずる規格(例えば、802.11a,11b,11g,11n等)に基づく無線通信方式である。本実施例では、端末装置10は、AP50,60,70等のうちのいずれかを介してIEEE802.11n規格に基づくWi−Fi通信を実行する。IEEE802.11n規格に基づくWi−Fi通信では、2.4GHzと5.0GHzの2つの周波数帯が利用可能である。2.4GHz帯には、中心周波数の異なる14個のチャネル(1ch〜14ch)が含まれる。5.0GHz帯には、中心周波数の異なる19個のチャネル(36ch〜140ch)が含まれる。なお、他の例では、端末装置10は、所定のエリア内のAP50,60,70等のうちのいずれかを介して他の規格に基づくWi−Fi通信を実行してもよい。端末装置10は、Wi−Fi方式に従って、所定のエリア内のいずれかのAPと無線接続を確立することによって、そのAPを介して、他の機器との間でWi−Fi通信を実行することができる。 The Wi-Fi I / F18 is an I / F for executing wireless communication according to the Wi-Fi method (hereinafter referred to as "Wi-Fi communication"). The Wi-Fi system is a wireless communication system that conforms to the standards established by the Wi-Fi Alliance. For example, the IEEE (Institute of Electrical and Electronics Engineers, Inc.) 802.11 standard and its equivalent standards. It is a wireless communication system based on (for example, 802.11a, 11b, 11g, 11n, etc.). In this embodiment, the terminal device 10 executes Wi-Fi communication based on the IEEE 802.11n standard via any one of AP50, 60, 70 and the like. In Wi-Fi communication based on the IEEE802.11n standard, two frequency bands of 2.4 GHz and 5.0 GHz can be used. The 2.4 GHz band includes 14 channels (1ch to 14ch) having different center frequencies. The 5.0 GHz band includes 19 channels (36ch to 140ch) having different center frequencies. In another example, the terminal device 10 may execute Wi-Fi communication based on another standard via any one of AP50, 60, 70 and the like in a predetermined area. The terminal device 10 establishes a wireless connection with any AP in a predetermined area according to the Wi-Fi method, and executes Wi-Fi communication with another device via the AP. Can be done.

制御部20は、メモリ22に記憶されているOSプログラム24、無線接続制御アプリケーションプログラム(以下では「無線接続制御アプリ」と呼ぶ)26等に従って、様々な処理を実行する。メモリ22は、ROM(Read Only Memoryの略)、RAM(Random Access Memoryの略)等によって構成される。メモリ22に記憶されているOSプログラム24は、端末装置10の基本的な動作を実現するためのプログラムである。無線接続制御アプリ26は、端末装置10のベンダによって提供され、端末装置10がWi−Fi通信を実行するために接続先として適切なAPを選んで接続するための無線接続処理(図3参照)を実行するためのプログラムである。無線接続処理の内容は後で詳しく説明する。 The control unit 20 executes various processes according to the OS program 24 stored in the memory 22, the wireless connection control application program (hereinafter referred to as “wireless connection control application”) 26, and the like. The memory 22 is composed of a ROM (abbreviation of Read Only Memory), a RAM (abbreviation of Random Access Memory), and the like. The OS program 24 stored in the memory 22 is a program for realizing the basic operation of the terminal device 10. The wireless connection control application 26 is provided by the vendor of the terminal device 10, and is a wireless connection process for the terminal device 10 to select and connect to an appropriate AP as a connection destination in order to execute Wi-Fi communication (see FIG. 3). It is a program to execute. The details of the wireless connection process will be described later.

メモリ22は、さらに、無線接続処理(図3参照)を実行することによって、端末装置10の周辺機器からパケットを受信した実績に関係する受信実績情報が記録される機器テーブル100(図5参照)を記憶するためのテーブル記憶領域28も有している。 The memory 22 further executes a wireless connection process (see FIG. 3) to record reception record information related to the record of receiving packets from peripheral devices of the terminal device 10 (see FIG. 5). It also has a table storage area 28 for storing.

(AP50、60、70の構成;図1)
AP50、AP60、AP70は、いずれも、無線アクセスポイント又は無線LANルータと呼ばれる通常のAPである。ただし、AP50、AP60、AP70は、無線アクセスポイント機器ではないが、APとして機能する端末装置等であってもよい。端末装置がAPとして機能する場合とは、例えば、当該端末装置が、Wi-Fi Allianceによって策定されたWFD(Wi-Fi Direct(登録商標)の略)方式をサポートする通信機器であって、WFD方式に従ったG/O(Group Ownerの略)状態に移行して無線ネットワークの親局として動作する場合や、端末装置がSoftAPとして動作する場合等がある。AP50、AP60、AP70は、それぞれ、特定のチャネルを使用して、自機と無線接続を確立したクライアント機器との間でWi−Fi通信を実行可能である。AP50、AP60、AP70には、それぞれ、固有の識別情報であるMACアドレスが割り当てられている。端末装置10は、AP50、AP60、AP70のうちのいずれかと無線接続を確立することにより、他の機器(例えば、外部のサーバ、他の端末装置等)とWi−Fi通信を実行可能である。
(Structure of AP50, 60, 70; FIG. 1)
AP50, AP60, and AP70 are all ordinary APs called wireless access points or wireless LAN routers. However, although the AP50, AP60, and AP70 are not wireless access point devices, they may be terminal devices or the like that function as APs. When the terminal device functions as an AP, for example, the terminal device is a communication device that supports the WFD (abbreviation of Wi-Fi Direct (registered trademark)) method established by the Wi-Fi Alliance, and is a WFD. There are cases where the system shifts to the G / O (abbreviation of Group Owner) state and operates as the master station of the wireless network, or the terminal device operates as SoftAP. Each of the AP50, AP60, and AP70 can execute Wi-Fi communication between its own device and a client device for which a wireless connection has been established, using a specific channel. A MAC address, which is unique identification information, is assigned to each of AP50, AP60, and AP70. The terminal device 10 can execute Wi-Fi communication with another device (for example, an external server, another terminal device, etc.) by establishing a wireless connection with any one of AP50, AP60, and AP70.

(端末装置80の構成;図1)
図1に示す端末装置80は、携帯型の端末装置である。端末装置80も、端末装置10と同様の情報コード読取装置であってもよいし、他の任意の端末装置であってもよい。本実施例では、端末装置80は、AP50、AP60、AP70のうちのいずれか1つと無線接続を確立してWi−Fi通信を行っているクライアント機器である。
(Configuration of terminal device 80; FIG. 1)
The terminal device 80 shown in FIG. 1 is a portable terminal device. The terminal device 80 may be the same information code reading device as the terminal device 10, or may be any other terminal device. In this embodiment, the terminal device 80 is a client device that establishes a wireless connection with any one of AP50, AP60, and AP70 to perform Wi-Fi communication.

(無線接続処理;図3〜図6)
図3〜図6を参照して、端末装置10の制御部20が無線接続制御アプリ26に従って実行する無線接続処理の内容を説明する。無線接続処理は、端末装置10が、周囲に存在するAP50,60,70等のうちから、接続先のAPである特定のAPを適切に選択し、選択された特定のAPと無線接続を確立するための処理である。端末装置10のユーザが、操作部12において所定の接続開始操作を入力すると、制御部20は、図3の処理を開始する。なお、この時点では、メモリ22のテーブル記憶領域28に含まれる機器テーブル100(図5参照)には、受信実績情報が記録されていない。
(Wireless connection processing; FIGS. 3 to 6)
The contents of the wireless connection process executed by the control unit 20 of the terminal device 10 according to the wireless connection control application 26 will be described with reference to FIGS. 3 to 6. In the wireless connection process, the terminal device 10 appropriately selects a specific AP, which is the connection destination AP, from the surrounding APs 50, 60, 70, etc., and establishes a wireless connection with the selected specific AP. It is a process to do. When the user of the terminal device 10 inputs a predetermined connection start operation in the operation unit 12, the control unit 20 starts the process of FIG. At this time, the reception record information is not recorded in the device table 100 (see FIG. 5) included in the table storage area 28 of the memory 22.

S10では、制御部20は、まず、機器探索処理(図4参照)を実行する。図4を参照して、機器探索処理について説明する。機器探索処理は、端末装置10の周囲に存在しており、いずれかのチャネルを使用して何らかのパケット(例えば、Beaconパケット、Probe Requestの応答であるProbe Responseパケット、通信対象のデータパケット等)を出力している外部機器(AP50〜70、端末装置80等)を探索するための処理である。 In S10, the control unit 20 first executes a device search process (see FIG. 4). The device search process will be described with reference to FIG. The device search process exists around the terminal device 10, and uses one of the channels to send some packet (for example, Beacon packet, Probe Response packet which is a response of Probe Request, data packet to be communicated, etc.). This is a process for searching for an output external device (AP50 to 70, terminal device 80, etc.).

(機器探索処理;図4)
図4のS20では、制御部20は、端末装置10が使用可能なチャネルのうちの1つのチャネルを特定する。例えば、S20において、制御部20は、2.4GHz帯の1chを特定することができる。S20で特定されるチャネルのことを以下では「探索対象チャネル」と呼ぶ場合がある。具体的には、S20では、制御部20は、Wi−FiI/F18が通信のために使用する周波数帯を探索対象チャネル(例えば1ch)に設定する。
(Device search process; Fig. 4)
In S20 of FIG. 4, the control unit 20 identifies one of the channels available to the terminal device 10. For example, in S20, the control unit 20 can specify 1ch in the 2.4 GHz band. The channel specified in S20 may be referred to as a "search target channel" below. Specifically, in S20, the control unit 20 sets the frequency band used by the Wi-Fi I / F 18 for communication in the search target channel (for example, 1ch).

続くS22では、制御部20は、積算タイマのカウントを開始する。積算タイマは、S20で特定された探索対象チャネルにおいて、周囲に存在する外部機器を探索するための一連の処理(S24〜S40参照)を実行するための制限期間である。積算タイマの上限期間T1はあらかじめ定められている。本実施例では、積算タイマの上限期間T1は例えば100msに設定される。 In the following S22, the control unit 20 starts counting the integration timer. The integration timer is a limited period for executing a series of processes (see S24 to S40) for searching for external devices existing in the vicinity in the search target channel specified in S20. The upper limit period T1 of the integration timer is predetermined. In this embodiment, the upper limit period T1 of the integration timer is set to, for example, 100 ms.

続くS24では、制御部20は、S20で特定された探索対象チャネルを使用してProbe Requestパケットをブロードキャストするとともに、所定のスキャンタイマのカウントを開始する。Probe Requestパケットは、端末装置10の周囲に存在するとともに、当該探索対象チャネルを使用するAP(APとして機能する端末装置等も含む)を探索するために出力されるパケットである。Probe Requestパケットを受信したAPは、Probe Requestパケットに対する応答として、Probe Requestパケットの送信元である端末装置10にProbe Responseパケットを送信することができる。Probe Responseパケットには、APが形成するWi−Fiネットワークに関する情報(例えばSSID等)が含まれる。なお、AP(APとして機能する端末装置等も含む)ではない外部機器(例えば、当該探索対象チャネルを使用するクライアント機器等)も、Probe Requestパケットを受信することはできるが、Probe Requestパケットを受信しても、Probe Responseパケットを送信することはできない。スキャンタイマは、探索対象チャネルにおいて、Probe Requestに対する応答(即ちProbe Responseパケット)の受信を監視するための一回の処理を実行するための制限期間である。スキャンタイマは、端末装置10と周囲に存在するAPとの間で、Probe Requestパケット及びProbe Responseパケットの送受信が行われ得る単位期間に定められる。スキャンタイマの上限期間T2もあらかじめ定められている。後述のように、本実施例では、スキャンタイマの上限期間T2は例えば20msに設定される。 In the following S24, the control unit 20 broadcasts the Probe Request packet using the search target channel specified in S20, and starts counting the predetermined scan timer. The Probe Request packet is a packet that exists around the terminal device 10 and is output to search for an AP (including a terminal device that functions as an AP) that uses the search target channel. The AP that has received the Probe Request packet can transmit the Probe Response packet to the terminal device 10 that is the source of the Probe Request packet as a response to the Probe Request packet. The Probe Response packet contains information (eg, SSID, etc.) about the Wi-Fi network formed by the AP. An external device that is not an AP (including a terminal device that functions as an AP) (for example, a client device that uses the search target channel) can also receive the Probe Request packet, but receives the Probe Request packet. However, the Probe Response packet cannot be sent. The scan timer is a time limit period for executing one process for monitoring the reception of the response to the Probe Request (that is, the Probe Response packet) in the search target channel. The scan timer is defined as a unit period during which probe request packets and probe response packets can be transmitted and received between the terminal device 10 and APs existing in the vicinity. The upper limit period T2 of the scan timer is also predetermined. As will be described later, in this embodiment, the upper limit period T2 of the scan timer is set to, for example, 20 ms.

続いて、制御部20は、S26、S34の監視を開始する。S26では、制御部20は、外部からパケットを受信することを監視する。上記の通り、探索対象チャネルを使用するAPは、Probe Requestパケットを受信すると、Probe Responseパケットを送信する。この他にも、APは、定期的に(例えば100msごとに)、自機のSSID等のネットワーク情報を含むBeaconパケットを出力する。Beaconパケットも、AP(APとして機能する端末装置等も含む)が出力可能なパケットである。さらに、APは、探索対象チャネルを使用して既に無線接続を確立しているクライアント機器との間でWi−Fi通信を行うことに伴って、通信対象のデータパケットを送信することもできる。一方、APではないが、探索対象チャネルを使用している機器(例えば端末装置80等)も、既に無線接続を確立しているAPとの間でWi−Fi通信を行うことに伴って、通信対象のデータパケットを送信する。制御部20は、探索対象チャネルを使用するAP、及び、探索対象チャネルを使用する機器から、上記の各種パケットを受信することができる。制御部20は、探索対象チャネルを使用する外部機器(AP及びAP以外の機器を含む)から何らかのパケットを受信する場合、S26でYESと判断し、S28に進む。 Subsequently, the control unit 20 starts monitoring S26 and S34. In S26, the control unit 20 monitors the reception of packets from the outside. As described above, when the AP using the search target channel receives the Probe Request packet, it transmits a Probe Response packet. In addition to this, the AP periodically (for example, every 100 ms) outputs a Beacon packet containing network information such as the SSID of its own machine. Beacon packets are also packets that can be output by APs (including terminal devices that function as APs). Further, the AP can also transmit a data packet to be communicated by performing Wi-Fi communication with a client device having already established a wireless connection using the search target channel. On the other hand, a device (for example, a terminal device 80, etc.) that is not an AP but uses a search target channel also communicates with an AP that has already established a wireless connection as Wi-Fi communication is performed. Send the target data packet. The control unit 20 can receive the above-mentioned various packets from the AP that uses the search target channel and the device that uses the search target channel. When the control unit 20 receives some packet from an external device (including AP and a device other than AP) that uses the search target channel, the control unit 20 determines YES in S26 and proceeds to S28.

S28では、制御部20は、受信されたパケットを参照し、パケットの送信元の機器のMACアドレスを特定する。MACアドレスは機器固有のユニークな識別情報である。 In S28, the control unit 20 refers to the received packet and identifies the MAC address of the device that is the source of the packet. The MAC address is unique identification information unique to the device.

S30では、制御部20は、テーブル記憶領域28内の機器テーブル100を参照し、S28で特定されたMACアドレスに対応するパケットが既に受信された数(既受信数)が所定の上限値Nより少ないか否かを判断する。後述するように、制御部20は、パケットを受信する毎に、この時点の探索対象チャネル、パケットの送信元のMACアドレス、パケット受信時の電波強度(受信電波強度)、パケット内容、を含む受信実績情報を機器テーブル100(図5参照)に記録する(S32)。機器テーブル100には、MACアドレスごとに最大でN個の受信実績情報が記録される。この時点で、機器テーブル100内に、S28で特定されたMACアドレスを含む受信実績情報(即ち、機器テーブル100中の当該MACアドレスに対応する受信電波強度とパケット内容の組合せ)の数がN個未満である場合、制御部20は、S30でYESと判断し、S32に進む。一方、この時点で、機器テーブル100内に、S28で特定されたMACアドレスに対応する受信実績情報の数が既にN個に到達済みである場合、制御部20は、S30でNOと判断し、S32をスキップしてS34に進む。 In S30, the control unit 20 refers to the device table 100 in the table storage area 28, and the number of packets already received (number of received packets) corresponding to the MAC address specified in S28 is from a predetermined upper limit value N. Judge whether it is low or not. As will be described later, each time the control unit 20 receives a packet, the control unit 20 includes the search target channel at this point, the MAC address of the packet source, the radio wave strength at the time of packet reception (received radio wave strength), and the packet content. The actual information is recorded in the device table 100 (see FIG. 5) (S32). A maximum of N reception record information is recorded in the device table 100 for each MAC address. At this point, the number of reception record information including the MAC address specified in S28 (that is, the combination of the received radio field strength and the packet content corresponding to the MAC address in the device table 100) is N in the device table 100. If it is less than, the control unit 20 determines YES in S30 and proceeds to S32. On the other hand, at this point, if the number of received record information corresponding to the MAC address specified in S28 has already reached N in the device table 100, the control unit 20 determines NO in S30. Skip S32 and proceed to S34.

S32では、制御部20は、機器テーブル100に、この時点の探索対象チャネル、S28で特定されたMACアドレス、パケット受信時の受信電波強度、及び、パケット内容を含む受信実績情報を記録する。 In S32, the control unit 20 records in the device table 100 the reception record information including the search target channel at this time, the MAC address specified in S28, the received radio wave intensity at the time of packet reception, and the packet content.

ここで、図5を参照して、機器テーブル100の構成について説明する。図5の例では、機器テーブル100には、端末装置10が機器探索処理の実行に伴ってパケットを受信した実績に関係する受信実績情報が記録される。機器テーブル100に記録される受信実績情報は、帯域、チャネル、MACアドレス、1番目〜N番目のパケット受信時の受信電波強度及びパケット内容と、を含む。図5の例では、機器テーブル100に記録される受信実績情報に、平均電波強度が対応付けられている。 Here, the configuration of the device table 100 will be described with reference to FIG. In the example of FIG. 5, in the device table 100, reception record information related to the record of receiving packets as the terminal device 10 executes the device search process is recorded. The reception record information recorded in the device table 100 includes the band, the channel, the MAC address, the received radio wave intensity at the time of receiving the first to Nth packets, and the packet contents. In the example of FIG. 5, the average radio field intensity is associated with the reception record information recorded in the device table 100.

「帯域」の欄は、送信元の機器がWi−Fi通信に使用している周波数帯域を示す。この例では、「帯域」の欄には2.4GHzと5.0GHzのいずれかが記録されている。 The "Band" column indicates the frequency band used by the source device for Wi-Fi communication. In this example, either 2.4 GHz or 5.0 GHz is recorded in the "Band" column.

「チャネル」の欄は、送信元の機器がWi−Fi通信に使用しているチャネルを示す。対応する帯域が2.4GHzであれば1ch〜14chのいずれかが記録される。対応する帯域が5.0GHzであれば36ch〜140chのいずれかが記録される。 The "Channel" column indicates the channel used by the source device for Wi-Fi communication. If the corresponding band is 2.4 GHz, any of 1ch to 14ch is recorded. If the corresponding band is 5.0 GHz, any of 36ch to 140ch is recorded.

「MACアドレス」の欄は、送信元の機器のMACアドレスを示す。図5の例では、説明の容易のために、MACアドレスを単に「M11」「M12」のように簡略化して記載している。 The "MAC address" column indicates the MAC address of the source device. In the example of FIG. 5, the MAC address is simply described as "M11" and "M12" for the sake of simplicity.

「P1」〜「PN」の欄は、対応するMACアドレスの機器から受信された1番目〜N番目のパケットのそれぞれについて、当該パケット受信時の受信電波強度とパケット内容とを示す。「P1」〜「PN」の欄は、それぞれ、受信電波強度の欄とパケット内容の欄に分かれている。受信電波強度は、単位[dBm]で表される。数値が大きい(0に近い)ほど電波強度が強い。パケット内容は、「Probe_Res」「Beacon」「Data」のいずれかを示す。「Probe_Res」「Beacon」「Data」は、受信されたパケットの内容がそれぞれ「Probe Responseパケット」「Beaconパケット」「データパケット」であったことを示す。「P1」〜「PN」の欄のうち、未受信のパケットに対応する対応する欄には情報が記録されない。例えば、図5の例では、MACアドレス「M13」の機器からのN番目のパケットが未受信であるため、機器テーブル100中のMACアドレス「M13」に対応する「PN」欄には情報が記録されていない。 The columns of "P1" to "PN" indicate the received radio wave intensity and the packet content at the time of receiving the packet for each of the first to Nth packets received from the device having the corresponding MAC address. The columns of "P1" to "PN" are divided into a column of received radio wave strength and a column of packet contents, respectively. The received radio field intensity is expressed in units [dBm]. The larger the value (closer to 0), the stronger the signal strength. The packet content indicates one of "Probe_Res", "Beacon", and "Data". "Probe_Res", "Beacon", and "Data" indicate that the contents of the received packet were "Probe Response packet", "Beacon packet", and "Data packet", respectively. No information is recorded in the corresponding columns corresponding to unreceived packets among the columns of "P1" to "PN". For example, in the example of FIG. 5, since the Nth packet from the device with the MAC address “M13” has not been received, information is recorded in the “PN” column corresponding to the MAC address “M13” in the device table 100. It has not been.

「平均電波強度」の欄は、対応するMACアドレスの機器から受信された1番目〜N番目のパケットの受信電波強度の平均値を示す。「平均電波強度」の欄には、後述の接続先特定処理(図6参照)の実行時に値が記録される(S52)。 The "Average radio field strength" column indicates the average value of the received radio wave strength of the 1st to Nth packets received from the device having the corresponding MAC address. In the "Average radio field strength" column, a value is recorded when the connection destination identification process (see FIG. 6) described later is executed (S52).

ただし、図5に示す機器テーブル100における受信実績情報の記録方式はあくまで一例である。実際の機器テーブル100における受信実績情報の記録方式は、図5の例に限られず、任意の方式が採用されてもよい。 However, the recording method of the reception record information in the device table 100 shown in FIG. 5 is only an example. The recording method of the received record information in the actual device table 100 is not limited to the example of FIG. 5, and any method may be adopted.

S34では、制御部20は、S24でスキャンタイマのカウントを開始してから、所定の上限期間T2が経過したか否かを監視する。S24でスキャンタイマのカウントを開始してから、所定の上限期間T2(例えば20ms)が経過した場合、制御部20は、S34でYESと判断し、S36に進む。 In S34, the control unit 20 monitors whether or not a predetermined upper limit period T2 has elapsed since the scan timer started counting in S24. When a predetermined upper limit period T2 (for example, 20 ms) has elapsed since the count of the scan timer was started in S24, the control unit 20 determines YES in S34 and proceeds to S36.

S36では、制御部20は、この時点で、S22で積算タイマのカウントを開始してから、所定の上限期間T1が経過しているか否かを監視する。S22で積算タイマのカウントを開始してから、所定の上限期間T1(例えば100ms)が経過している場合、制御部20は、S36でYESと判断し、S42に進む。一方、S22で積算タイマのカウントを開始してから、所定の上限期間T1がまだ経過していない場合、制御部20は、S36でNOと判断し、S38に進む。 In S36, at this point, the control unit 20 monitors whether or not a predetermined upper limit period T1 has elapsed since the counting of the integration timer was started in S22. If a predetermined upper limit period T1 (for example, 100 ms) has elapsed since the counting of the integration timer was started in S22, the control unit 20 determines YES in S36 and proceeds to S42. On the other hand, if the predetermined upper limit period T1 has not yet elapsed since the counting of the integration timer was started in S22, the control unit 20 determines NO in S36 and proceeds to S38.

S38では、制御部20は、この時点で、機器テーブル100内に記録されている全ての探索対象チャネルに対応するMACアドレスについて、パケットの既受信数がいずれもN個に到達しているか否かを判断する。この時点で、機器テーブル100内に記録されている全ての探索対象チャネルに対応するMACアドレスについて、パケットの既受信数がいずれもN個に到達している場合、制御部20は、S38でYESと判断し、S42に進む。S38でYESの場合とは、現状探索対象チャネルを使用している各機器から所定の上限値であるN個のパケットが既に取得されている場合であり、それ以上探索対象チャネルにおいて探索を継続する必要性が低い場合である。一方、この時点で、機器テーブル100内に記録されているMACアドレスの中に、パケットの既受信数がN個未満のMACアドレスが存在する場合、制御部20は、S38でNOと判断し、S40に進む。S38でYESの場合とは、現状探索対象チャネルを使用している機器のうちの少なくとも一部からはN個未満のパケットしか取得されていない場合であり、探索対象チャネルにおいて探索を継続すべき場合である。 In S38, at this time, the control unit 20 determines whether or not the number of received packets for all the MAC addresses corresponding to all the search target channels recorded in the device table 100 has reached N. To judge. At this point, if the number of received packets for all the MAC addresses corresponding to all the search target channels recorded in the device table 100 has reached N, the control unit 20 determines YES in S38. And proceed to S42. The case of YES in S38 is the case where N packets, which is a predetermined upper limit value, have already been acquired from each device using the current search target channel, and the search is continued in the search target channel any more. This is the case when the need is low. On the other hand, at this point, if the MAC addresses recorded in the device table 100 include MAC addresses in which the number of received packets is less than N, the control unit 20 determines NO in S38. Proceed to S40. The case of YES in S38 is the case where less than N packets are acquired from at least some of the devices currently using the search target channel, and the search should be continued in the search target channel. Is.

S40では、制御部20は、パケットの既受信数がN個未満のMACアドレスに、Probe Response又はBeaconを示すパケット内容が対応付けられているか否かを判断する。パケットの既受信数がN個未満のMACアドレスに、Probe Response又はBeaconを示すパケット内容が対応付けられている場合、制御部20は、S40でYESと判断し、S24に戻る。S40でYESの場合は、パケットの既受信数がN個未満のMACアドレスに対応する機器がAPである。その場合、制御部20に探索対象チャネルにおける探索を継続させる。即ち、戻った先のS24では、制御部20は、再びProbe Requestパケットをブロードキャストするとともに、スキャンタイマのカウントを新たに開始する。以後、S26以降の処理を再実行する。一方、パケットの既受信数がN個未満のMACアドレスに、Probe Response又はBeaconを示すパケット内容が対応付けられていない場合、制御部20は、S40でNOと判断し、S42に進む。S40でYESの場合は、パケットの既受信数がN個未満のMACアドレスに対応する機器は、APではない機器(例えばクライアント機器)である可能性が高い。その場合、制御部20にそれ以上探索対象チャネルにおいて探索を継続する必要性が低い。 In S40, the control unit 20 determines whether or not the MAC address in which the number of received packets is less than N is associated with the packet content indicating Probe Response or Beacon. When the MAC address in which the number of received packets is less than N is associated with the packet content indicating Probe Response or Beacon, the control unit 20 determines YES in S40 and returns to S24. If YES in S40, the device corresponding to the MAC address in which the number of received packets is less than N is the AP. In that case, the control unit 20 is made to continue the search in the search target channel. That is, in the returned destination S24, the control unit 20 broadcasts the Probe Request packet again and newly starts counting the scan timer. After that, the processing after S26 is re-executed. On the other hand, if the MAC address in which the number of received packets is less than N is not associated with the packet content indicating Probe Response or Beacon, the control unit 20 determines NO in S40 and proceeds to S42. If YES in S40, the device corresponding to the MAC address in which the number of received packets is less than N is likely to be a device other than the AP (for example, a client device). In that case, it is less necessary for the control unit 20 to continue the search in the search target channel.

S42では、制御部20は、端末装置10が使用可能なチャネル(2.4GHz帯の14個のチャネルと5.0GHz帯の19個のチャネルの合計33個のチャネル)を全て特定済みであるか否かを判断する。この時点で未特定のチャネルが存在する場合、制御部20は、S42でNOと判断し、S20に戻る。戻った先のS20では、制御部20は、新たに他の1つのチャネルを探索対象チャネルとして特定する。そして、制御部20は、新たに特定された探索対象チャネルについて、S22以降の各処理を再実行する。一方、制御部20は、端末装置10が使用可能なチャネルを全て特定済みである場合、S42でYESと判断し、図4の機器探索処理を終了する。図4の機器探索処理が終了すると、全チャネルについての機器探索処理を行った結果としてパケットを受信した実績を示す受信実績情報(即ち、チャネル、MACアドレス、受信電波強度及び受信実績情報)が記録された機器テーブル100(図5参照)が完成する。 In S42, has the control unit 20 already specified all the channels that can be used by the terminal device 10 (14 channels in the 2.4 GHz band and 19 channels in the 5.0 GHz band, for a total of 33 channels)? Judge whether or not. If there is an unspecified channel at this point, the control unit 20 determines NO in S42 and returns to S20. In the returned destination S20, the control unit 20 newly specifies another channel as a search target channel. Then, the control unit 20 re-executes each process after S22 for the newly specified search target channel. On the other hand, when the terminal device 10 has already specified all the channels that can be used, the control unit 20 determines YES in S42 and ends the device search process of FIG. When the device search process of FIG. 4 is completed, reception record information (that is, channel, MAC address, received radio field strength, and reception record information) indicating the record of receiving packets as a result of performing the device search process for all channels is recorded. The device table 100 (see FIG. 5) is completed.

図4の機器探索処理(図3のS10参照)を終えると、制御部20は、図3のS12において、接続先特定処理(図6参照)を実行する。図6を参照して接続先特定処理について説明する。接続先特定処理は、図4の機器探索処理の結果を利用して、接続先のAPである特定のAPを選択し、選択された特定のAPと無線接続を確立するための処理である。 After completing the device search process of FIG. 4 (see S10 of FIG. 3), the control unit 20 executes the connection destination identification process (see FIG. 6) in S12 of FIG. The connection destination identification process will be described with reference to FIG. The connection destination identification process is a process for selecting a specific AP which is a connection destination AP by using the result of the device search process of FIG. 4 and establishing a wireless connection with the selected specific AP.

(接続先特定処理;図6)
図6のS50では、制御部20は、機器テーブル100から、Probe Response又はBeaconを示すパケット内容が対応付けられていないMACアドレスに対応する受信実績情報を除外する。Probe Response又はBeaconを示すパケット内容が対応付けられていないMACアドレスに対応する機器は、APでない可能性が高いためである。例えば、図5の例では、MACアドレス「M13」に対応するパケット内容は「Data」(即ちデータパケット)のみであり、Probe Response又はBeaconを含まない。その場合、S50において、制御部20は、機器テーブル100から、MACアドレス「M13」に対応する受信実績情報を除外する。除外の手法は任意であり、例えば、機器テーブル100から完全に削除してもよいし、以降の処理で使用されないようにフラグを対応付けてもよい。
(Connection destination identification process; Fig. 6)
In S50 of FIG. 6, the control unit 20 excludes the reception record information corresponding to the MAC address to which the packet content indicating the Probe Response or Beacon is not associated from the device table 100. This is because there is a high possibility that the device corresponding to the MAC address to which the packet content indicating Probe Response or Beacon is not associated is not an AP. For example, in the example of FIG. 5, the packet content corresponding to the MAC address “M13” is only “Data” (that is, a data packet) and does not include Probe Response or Beacon. In that case, in S50, the control unit 20 excludes the reception record information corresponding to the MAC address “M13” from the device table 100. The exclusion method is arbitrary, for example, it may be completely deleted from the device table 100, or a flag may be associated so that it will not be used in the subsequent processing.

続くS52では、制御部20は、機器テーブル100内に残っている(即ち除外されていない)受信実績情報について、MACアドレス(例えば図5のMACアドレス「M11」など)ごとに、受信電波強度の平均値である平均電波強度を算出する。本実施例では、制御部20は、算出した平均電波強度を機器テーブル100に記録する(図5参照)。ただし他の例では、制御部20は、算出した平均電波強度を機器テーブル100に記録しなくてもよい。 In the following S52, the control unit 20 determines the received radio field strength for each MAC address (for example, the MAC address “M11” in FIG. 5) with respect to the reception record information remaining in the device table 100 (that is, not excluded). Calculate the average radio field strength, which is the average value. In this embodiment, the control unit 20 records the calculated average radio field intensity in the device table 100 (see FIG. 5). However, in another example, the control unit 20 does not have to record the calculated average radio field intensity in the equipment table 100.

続くS54では、制御部20は、S52で算出された平均電波強度のうち、最も高い平均電波強度に対応するMACアドレスを特定する。例えば、この時点で図5の機器テーブル100が完成している場合、MACアドレス「M11」に対応する平均電波強度(−58.5dbm)が最も高いため、制御部20は、S54においてMACアドレス「M11」を特定する。 In the following S54, the control unit 20 identifies the MAC address corresponding to the highest average radio field strength among the average radio wave strength calculated in S52. For example, when the device table 100 of FIG. 5 is completed at this point, the average radio field intensity (-58.5 dbm) corresponding to the MAC address “M11” is the highest, so that the control unit 20 has the MAC address “ Identify "M11".

続くS56では、制御部20は、S54で特定されたMACアドレス(以下では「特定のMACアドレス」と呼ぶ場合がある)に対応する特定のAPとの間で、当該特定のAPが使用するチャネルを使用して、無線接続を確立する。具体的には、制御部20は、Wi−FiI/F18を介して、各種信号(例えばAuthentication信号、Association信号、4-way handshake等)の通信を特定のAPと実行する。上記の各種信号の通信の過程で、制御部20は、特定のAPと無線接続を確立するためのネットワーク情報(具体的には、SSID、パスワード等)を特定のAPに送信して、当該AP情報の認証、即ち、端末装置10の認証を特定のAPに実行させる。これにより、制御部20は、特定のAPとの無線接続を確立し、端末装置10を子局として、特定のAPが形成するWi−Fiネットワークに参加させる。S56を終えると、制御部20は、図6の接続先特定処理を終了するとともに、図3の無線接続処理を終了する。 In the following S56, the control unit 20 communicates with the specific AP corresponding to the MAC address specified in S54 (hereinafter, may be referred to as "specific MAC address") and the channel used by the specific AP. Use to establish a wireless connection. Specifically, the control unit 20 executes communication of various signals (for example, Authentication signal, Association signal, 4-way handshake, etc.) with a specific AP via Wi-Fi I / F18. In the process of communicating the various signals described above, the control unit 20 transmits network information (specifically, SSID, password, etc.) for establishing a wireless connection with the specific AP to the specific AP, and the AP. Information authentication, that is, authentication of the terminal device 10 is performed by a specific AP. As a result, the control unit 20 establishes a wireless connection with the specific AP and causes the terminal device 10 to participate in the Wi-Fi network formed by the specific AP as a slave station. When S56 is completed, the control unit 20 ends the connection destination identification process of FIG. 6 and the wireless connection process of FIG.

以上、本実施例の無線通信システム2の構成及び動作について説明した。上記の通り、本実施例では、制御部20は、図4の機器探索処理で、周囲に存在する1個以上の外部機器のうちの少なくとも1個の外部機器から複数個(最大N個)のパケットを受信し、それに基づいて平均受信強度を算出し(図6のS52)、最も高い値に対応する特定のAPとの間で無線接続を確立する(S54、S56)。そのため、本実施例によると、各外部機器から1個のパケットを受信した際の電波強度値に基づいて、接続先の外部機器を特定する従来の構成と比べて、複数個のパケットを受信した際の電波強度値を用いて算出される強度関係値は、無線環境の変動等の影響が比較的小さい。また、誤って、たまたま1回だけ高い電波強度値が検出されたAPではない外部機器が接続先として特定されてしまう事態の発生も抑制し得る。従って、本実施例の構成によると、端末装置10は、周囲の無線環境の変動等の影響を抑制し、適切なAP(外部機器)との間で無線接続を確立することができる。 The configuration and operation of the wireless communication system 2 of this embodiment have been described above. As described above, in the present embodiment, in the device search process of FIG. 4, the control unit 20 is a plurality (maximum N) from at least one external device among one or more external devices existing in the surroundings. The packet is received, the average reception strength is calculated based on the packet (S52 in FIG. 6), and a wireless connection is established with the specific AP corresponding to the highest value (S54, S56). Therefore, according to this embodiment, a plurality of packets are received as compared with the conventional configuration in which the external device to be connected is specified based on the radio field strength value when one packet is received from each external device. The intensity-related value calculated using the radio wave intensity value at the time is relatively small due to fluctuations in the wireless environment and the like. In addition, it is possible to suppress the occurrence of a situation in which an external device other than the AP in which a high radio field intensity value is accidentally detected only once is accidentally specified as a connection destination. Therefore, according to the configuration of this embodiment, the terminal device 10 can suppress the influence of fluctuations in the surrounding wireless environment and establish a wireless connection with an appropriate AP (external device).

また、本実施例では、制御部20は、図4の機器探索処理で、周囲に存在する1個以上の外部機器のうちの少なくとも1個の外部機器から複数個(最大N個)のパケットを受信し、外部機器毎に(より具体的にはMACアドレス毎に)、パケットを受信した際の電波強度値の平均である平均電波強度値を算出する(図6のS52)。そして、制御部20は、最も高い平均電波強度値に対応する特定のAPを特定し、その特定のAPとの間で無線接続を確立することができる(S54、S56)。即ち、本実施例では、各パケット受信時の無線環境の変動等の影響を平均化することができる。そのため、各パケット受信時の無線環境の変動等の影響を小さくすることができる。従って、本実施例の構成によると、端末装置10は、適切なAP(外部機器)との間で無線接続を確立することができる。 Further, in the present embodiment, the control unit 20 receives a plurality of (maximum N) packets from at least one external device among one or more external devices existing in the vicinity in the device search process of FIG. The average radio field strength value, which is the average of the radio wave strength values when the packet is received, is calculated for each external device (more specifically, for each MAC address) after receiving the packet (S52 in FIG. 6). Then, the control unit 20 can identify a specific AP corresponding to the highest average radio field intensity value and establish a wireless connection with the specific AP (S54, S56). That is, in this embodiment, the influence of fluctuations in the wireless environment at the time of receiving each packet can be averaged. Therefore, the influence of fluctuations in the wireless environment at the time of receiving each packet can be reduced. Therefore, according to the configuration of this embodiment, the terminal device 10 can establish a wireless connection with an appropriate AP (external device).

また、本実施例では、図6のS50において、制御部20は、機器テーブル100から、Probe Response又はBeaconを示すパケット内容が対応付けられていないMACアドレス(即ち、APではない可能性の高い機器のMACアドレス)の受信実績情報を除外する。そして、S52において、制御部20は、機器テーブル100内に残っている(即ち除外されていない)受信実績情報(例えば図5のMACアドレス「M11」を含む情報など)について、対応付けられている受信電波強度の平均値である平均電波強度を算出する。即ち、本実施例では、制御部20は、APとしての特性を有さない外部機器(例えば、無線ネットワークのクライアント(子局、ステーション)としてのみ動作する機器)を、接続先の候補から除外した上で、APとしての特性を有する外部機器の中から適切に特定のAP(外部機器)を特定することができる。本実施例によると、端末装置10は、APとしての特性を有する特定のAPとの間で適切に無線接続を確立することができる。 Further, in this embodiment, in S50 of FIG. 6, the control unit 20 has a MAC address (that is, a device that is highly likely not an AP) to which the packet content indicating the Probe Response or Beacon is not associated with the device table 100. MAC address) reception record information is excluded. Then, in S52, the control unit 20 is associated with the reception record information (for example, information including the MAC address “M11” in FIG. 5) remaining in the device table 100 (that is, not excluded). Calculate the average radio field strength, which is the average value of the received radio field strength. That is, in this embodiment, the control unit 20 excludes external devices having no characteristics as APs (for example, devices that operate only as clients (slave stations, stations) of wireless networks) from the candidates for connection destinations. In the above, a specific AP (external device) can be appropriately specified from the external devices having the characteristics as an AP. According to this embodiment, the terminal device 10 can appropriately establish a wireless connection with a specific AP having characteristics as an AP.

また、本実施例では、制御部20は、図4の機器探索処理において、探索対象チャネルを使用する1つの外部機器から、最大N個のパケットを受信する(S30参照)。平均電波強度の算出のために、制御部20に過大な数のパケットを受信するまでスキャン処理を継続させずに済むため、各チャネルにおけるスキャン処理の実行期間(S24〜S40の実行期間)を短くし得る。その結果、図4の機器探索処理に要する期間も短くし得る。従って、本実施例によると、端末装置は、機器探索処理の開始から比較的短い期間で特定のAPを特定することができる。 Further, in the present embodiment, the control unit 20 receives a maximum of N packets from one external device that uses the search target channel in the device search process of FIG. 4 (see S30). In order to calculate the average radio field strength, it is not necessary to continue the scan process until the control unit 20 receives an excessive number of packets, so that the scan process execution period (execution period of S24 to S40) in each channel is shortened. Can be done. As a result, the period required for the device search process of FIG. 4 can be shortened. Therefore, according to this embodiment, the terminal device can identify a specific AP in a relatively short period of time from the start of the device search process.

また、本実施例では、制御部20は、図4のS22で積算タイマのカウントを開始してから、所定の期間T1(例えば100ms)が経過している場合(S36でYES)、パケットの受信状況に関わらず、当該探索対象チャネルに対するスキャン処理を終了する(S42)。即ち、本実施例では、各探索対象チャネルにおけるスキャン処理の実行期間に制限が設けられる。即ち、本実施例によると、各探索対象チャネルにおけるスキャン処理の実行期間が過度に長期化することを抑制することができる。従って、端末装置10は、機器探索処理の開始から比較的短い期間で特定のAPを特定することができる。 Further, in the present embodiment, the control unit 20 receives the packet when a predetermined period T1 (for example, 100 ms) has elapsed (YES in S36) since the counting of the integration timer was started in S22 of FIG. Regardless of the situation, the scan process for the search target channel is terminated (S42). That is, in this embodiment, the execution period of the scan process in each search target channel is limited. That is, according to this embodiment, it is possible to prevent the execution period of the scan process in each search target channel from becoming excessively long. Therefore, the terminal device 10 can identify a specific AP in a relatively short period of time from the start of the device search process.

本実施例と請求項の記載の対応関係を説明しておく。図4のS24〜S40の処理が「スキャン処理」の一例である。パケットが受信された際のチャネル、MACアドレス、受信電波強度、及び、パケット内容を含む情報が「受信実績情報」の一例である。図6のS52で算出される平均電波強度が「強度関係値」の一例である。機器識別情報が「MACアドレス」の一例である。特定のAPが「特定の外部機器」の一例である。 The correspondence between this embodiment and the description of the claims will be described. The processes S24 to S40 in FIG. 4 are an example of the “scan process”. Information including the channel, MAC address, received radio wave strength, and packet content when the packet is received is an example of "reception record information". The average radio field intensity calculated in S52 of FIG. 6 is an example of the “intensity-related value”. The device identification information is an example of "MAC address". A specific AP is an example of a "specific external device".

(第2実施例)
図7を参照して、第2実施例について、第1実施例と異なる点を中心に説明する。本実施例の無線通信システム2も、その基本的な構成は第1実施例と共通する。本実施例では、図7に示すように、機器探索処理の内容の一部が第1実施例と異なる。第1実施例では、機器探索処理において、制御部20は、積極的にProbe Requestパケットを送信するいわゆるアクティブスキャンを実行するが、本実施例では、制御部20は、外部機器からのBeaconパケットの受信を監視するいわゆるパッシブスキャンを実行する。以下、図7を参照して、本実施例の機器探索処理の内容を説明する。
(Second Example)
The second embodiment will be described with reference to FIG. 7, focusing on the differences from the first embodiment. The basic configuration of the wireless communication system 2 of this embodiment is the same as that of the first embodiment. In this embodiment, as shown in FIG. 7, a part of the content of the device search process is different from that in the first embodiment. In the first embodiment, in the device search process, the control unit 20 actively executes a so-called active scan for transmitting a Probe Request packet, but in this embodiment, the control unit 20 receives a Beacon packet from an external device. Perform a so-called passive scan to monitor reception. Hereinafter, the content of the device search process of this embodiment will be described with reference to FIG. 7.

(機器探索処理;図7)
図7のS120では、図4のS20と同様に、制御部20は、端末装置10が使用可能なチャネルのうちの1つのチャネルを特定する。S122では、制御部20は、積算タイマのカウントを開始する。本実施例では、積算タイマの上限期間T11は例えば200msに設定される。
(Device search process; Fig. 7)
In S120 of FIG. 7, similarly to S20 of FIG. 4, the control unit 20 identifies one of the channels that can be used by the terminal device 10. In S122, the control unit 20 starts counting the integration timer. In this embodiment, the upper limit period T11 of the integration timer is set to, for example, 200 ms.

S124では、制御部20は、スキャンタイマのカウントを開始する。S124では、制御部20は、Probe Requestパケットのブロードキャストは行わない。本実施例では、1回目のスキャンタイマの上限期間T12aは例えば100msに設定される。 In S124, the control unit 20 starts counting the scan timer. In S124, the control unit 20 does not broadcast the Probe Request packet. In this embodiment, the upper limit period T12a of the first scan timer is set to, for example, 100 ms.

続いて、制御部20は、S126、S134の監視を開始する。S126では、制御部20は、外部からパケットを受信することを監視する。本実施例では、制御部20は、探索対象チャネルを使用するAPから、Beaconパケット、データパケットを受信し得る。また、制御部20は、探索対象チャネルを使用しているAP以外の機器からも、データパケットを受信し得る。この時点では、S124において制御部20はProbe Requestパケットをブロードキャストしていないため、Probe Responseが受信されることはない。 Subsequently, the control unit 20 starts monitoring S126 and S134. In S126, the control unit 20 monitors the reception of packets from the outside. In this embodiment, the control unit 20 can receive Beacon packets and data packets from the AP that uses the search target channel. In addition, the control unit 20 can also receive data packets from devices other than the AP using the search target channel. At this point, since the control unit 20 has not broadcast the Probe Request packet in S124, the Probe Response is not received.

続くS128、S130、S132の各処理は、図4のS28、S30、S32と同様である。 Subsequent processing of S128, S130, and S132 is the same as that of S28, S30, and S32 of FIG.

S134では、制御部20は、S124でスキャンタイマのカウントを開始してから、所定の上限期間T12aが経過したか否かを監視する。S124でスキャンタイマのカウントを開始してから、上限期間T12a(例えば100ms)が経過した場合、制御部20は、S134でYESと判断し、S136に進む。 In S134, the control unit 20 monitors whether or not a predetermined upper limit period T12a has elapsed since the scan timer started counting in S124. When the upper limit period T12a (for example, 100 ms) has elapsed since the count of the scan timer was started in S124, the control unit 20 determines YES in S134 and proceeds to S136.

S136では、制御部20は、この時点で、S122で積算タイマのカウントを開始してから、所定の積算タイマの上限期間T11が経過しているか否かを監視する。S122で積算タイマのカウントを開始してから、上限期間T1(例えば200ms)が経過している場合、制御部20は、S136でYESと判断し、S142に進む。一方、S122で積算タイマのカウントを開始してから、上限期間T11がまだ経過していない場合、制御部20は、S136でNOと判断し、S138に進む。 In S136, at this point, the control unit 20 monitors whether or not the upper limit period T11 of the predetermined integration timer has elapsed since the counting of the integration timer was started in S122. If the upper limit period T1 (for example, 200 ms) has elapsed since the counting of the integration timer was started in S122, the control unit 20 determines YES in S136 and proceeds to S142. On the other hand, if the upper limit period T11 has not yet elapsed since the counting of the integration timer was started in S122, the control unit 20 determines NO in S136 and proceeds to S138.

S138の処理は、図4のS38と同様である。制御部20は、S138でYESと判断するとS142に進み、S138でNOと判断するとS140に進む。S142の処理も、図4のS42と同様である。 The processing of S138 is the same as that of S38 in FIG. If the control unit 20 determines YES in S138, the control unit 20 proceeds to S142, and if it determines NO in S138, the control unit 20 proceeds to S140. The processing of S142 is also the same as that of S42 of FIG.

S140の処理も、図4のS40と同様である。ただし、本実施例では、制御部20は、S140でYESと判断すると、S124に戻る前にS141に進む。 The processing of S140 is the same as that of S40 of FIG. However, in this embodiment, if the control unit 20 determines YES in S140, the control unit 20 proceeds to S141 before returning to S124.

S141では、制御部20は、探索対象チャネルを使用してProbe Requestパケットをブロードキャストする。その後、制御部20は、S124に戻り、再度スキャンタイマのカウントを開始する。2度目以降のS124では、スキャンタイマの上限期間T12bが、1度目の上限期間T12aより短く設定される。例えば、2度目以降の上限期間T12bは、20ms(第1実施例の期間T2と同様)に設定される。なお、S141において、制御部20はProbe Requestパケットをブロードキャストしているため、2度目以降のS126では、制御部20は、Probe Responseも受信し得る。 In S141, the control unit 20 broadcasts the Probe Request packet using the search target channel. After that, the control unit 20 returns to S124 and starts counting the scan timer again. In the second and subsequent S124s, the upper limit period T12b of the scan timer is set shorter than the first upper limit period T12a. For example, the upper limit period T12b for the second and subsequent times is set to 20 ms (similar to the period T2 of the first embodiment). Since the control unit 20 broadcasts the Probe Request packet in S141, the control unit 20 can also receive the Probe Response in the second and subsequent S126s.

以上、本実施例の無線通信システム2の構成及び動作について説明した。上記の通り、本実施例では、制御部20は、Beaconパケットの受信を監視するいわゆるパッシブスキャンを実行する。APは定期的にBeaconパケットを出力するため、端末装置10は、第1実施例と同様の作用効果を発揮することができる。 The configuration and operation of the wireless communication system 2 of this embodiment have been described above. As described above, in this embodiment, the control unit 20 executes a so-called passive scan that monitors the reception of Beacon packets. Since the AP periodically outputs the Beacon packet, the terminal device 10 can exert the same effect as that of the first embodiment.

また、本実施例では、1回目のスキャンタイマの上限期間T12a(100ms)が経過した後のS141において、制御部20は、探索対象チャネルを使用してProbe Requestパケットをブロードキャストする。2回目以降のスキャンタイマの上限期間T12bは、第1実施例の期間T2と同様に短く設定される(例えば20ms)。その後は、第1実施例と同様に、制御部20は外部からProbe Responseも受信する。即ち、本実施例では、2回目以降はパッシブスキャンに代えてアクティブスキャンを実行する。一般的に、パッシブスキャンのみを継続して実行していると、パケットの受信は各APのBeaconパケットの出力周期に依存するため、複数回パケットを受信するために長期間を要する可能性がある。そのため、本実施例では、パッシブスキャンの実行回数を1回に限定することで、機器探索処理に要する期間の短縮化を図っている。 Further, in the present embodiment, in S141 after the upper limit period T12a (100 ms) of the first scan timer has elapsed, the control unit 20 broadcasts the Probe Request packet using the search target channel. The upper limit period T12b of the second and subsequent scan timers is set as short as the period T2 of the first embodiment (for example, 20 ms). After that, the control unit 20 also receives the Probe Response from the outside as in the first embodiment. That is, in this embodiment, the active scan is executed instead of the passive scan from the second time onward. In general, if only passive scans are continuously executed, packet reception depends on the output cycle of Beacon packets of each AP, so it may take a long time to receive packets multiple times. .. Therefore, in this embodiment, the period required for the device search process is shortened by limiting the number of times the passive scan is executed to one.

本実施例と請求項の記載の対応関係を説明しておく。図7のS124〜S140、S141の処理が「スキャン処理」の一例である。 The correspondence between this embodiment and the description of the claims will be described. The processes S124 to S140 and S141 in FIG. 7 are an example of the “scan process”.

(変形例1)制御部20が特定のAP(特定の外部機器)を選択する基準となる値は、電波強度に関係する値であれば、平均電波強度以外の値であってもよい。即ち、図6のS52において、制御部20は、平均電波強度の算出に代えて、他の強度関係値を算出してもよい。例えば、制御部20は、N個の受信電波強度のうちの最大値と最小値を除外した残りの値を平均した値を算出してもよい。さらに他の例では、制御部20は、受信電波強度のうちの所定の閾値以下の強度値を除外し(いわゆる足切り)、残った強度値の平均値を算出してもよい。これらの変形例で算出される値も「強度関係値」の一例である。 (Modification 1) The reference value for the control unit 20 to select a specific AP (specific external device) may be a value other than the average radio field strength as long as it is a value related to the radio wave strength. That is, in S52 of FIG. 6, the control unit 20 may calculate other intensity-related values instead of calculating the average radio wave intensity. For example, the control unit 20 may calculate a value obtained by averaging the remaining values excluding the maximum value and the minimum value of the N received radio wave intensities. In still another example, the control unit 20 may exclude the intensity value of the received radio wave intensity equal to or less than a predetermined threshold value (so-called cutoff) and calculate the average value of the remaining intensity values. The values calculated in these modified examples are also examples of "strength-related values".

(変形例2)制御部20は、図6のS50の処理を省略してもよい。即ち、制御部20は、制御部20は、機器テーブル100から、Probe Response又はBeaconを示すパケット内容が対応付けられていないMACアドレスの受信実績情報を除外しなくてもよい。その場合、S52において、制御部20は、機器テーブル100内のすべてのMACアドレスについて、対応付けられている受信電波強度の平均値である平均電波強度を算出するようにしてもよい。 (Modification 2) The control unit 20 may omit the process of S50 in FIG. That is, the control unit 20 does not have to exclude the reception record information of the MAC address to which the packet content indicating the Probe Response or Beacon is not associated with the device table 100. In that case, in S52, the control unit 20 may calculate the average radio field intensity, which is the average value of the associated received radio wave strength, for all the MAC addresses in the device table 100.

(変形例3)機器探索処理(図4、図7)において、制御部20は、1つの外部機器から、無制限にパケットを受信し、受信する毎に機器テーブル100に受信実績情報を記録するようにしてもよい。即ち、図4のS30及び図7のS130の判断を省略してもよい。 (Modification 3) In the device search process (FIGS. 4 and 7), the control unit 20 receives an unlimited number of packets from one external device, and records the reception record information in the device table 100 each time it is received. It may be. That is, the determination of S30 in FIG. 4 and S130 in FIG. 7 may be omitted.

(変形例4)反対に、機器探索処理(図4、図7)において、制御部20は、いずれか所定数の外部機器から受信されたパケットの数が上限値であるN個に達した時点で、積算タイマのカウント値にかかわらず、当該探索対象チャネルにおけるスキャン処理を終了させてもよい。 (Modification 4) On the contrary, in the device search process (FIGS. 4 and 7), the control unit 20 reaches the time when the number of packets received from any predetermined number of external devices reaches N, which is the upper limit value. Then, the scan process in the search target channel may be terminated regardless of the count value of the integration timer.

(変形例5)上記の実施例では、端末装置10は、2.4GHz帯、5.0GHz帯の両方に対応している。これに限られず、端末装置10は、2.4GHz帯、5.0GHz帯の一方のみに対応していてもよい。 (Modification 5) In the above embodiment, the terminal device 10 corresponds to both the 2.4 GHz band and the 5.0 GHz band. Not limited to this, the terminal device 10 may support only one of the 2.4 GHz band and the 5.0 GHz band.

また、本明細書または図面に説明した技術要素は、単独であるいは各種の組合せによって技術的有用性を発揮するものであり、出願時請求項記載の組合せに限定されるものではない。また、本明細書または図面に例示した技術は複数目的を同時に達成するものであり、そのうちの1つの目的を達成すること自体で技術的有用性を持つものである。 In addition, the technical elements described in the present specification or the drawings exhibit technical usefulness alone or in various combinations, and are not limited to the combinations described in the claims at the time of filing. In addition, the techniques illustrated in the present specification or drawings achieve a plurality of objectives at the same time, and achieving one of the objectives itself has technical usefulness.

2:無線通信システム
10:端末装置
12:操作部
14:表示部
16:撮影部
18:Wi−FiI/F
20:制御部
22:メモリ
24:OSプログラム
26:無線接続制御アプリ
28:テーブル記憶領域
80:端末装置
100:機器テーブル
2: Wireless communication system 10: Terminal device 12: Operation unit 14: Display unit 16: Imaging unit 18: Wi-Fi I / F
20: Control unit 22: Memory 24: OS program 26: Wireless connection control application 28: Table storage area 80: Terminal device 100: Device table

Claims (5)

利用可能な周波数帯域に含まれる複数のチャネルのうちのいずれか1つのチャネルを用いて無線通信を実行可能な端末装置であって、
制御部と、
メモリと、を備えており、
前記制御部は、
(a)前記複数のチャネルのそれぞれに対して、当該チャネルを使用する機器を探すためのスキャン処理を実行する機器探索処理を実行し、
(b)前記機器探索処理において、周囲に存在する1個以上の外部機器のうちの少なくとも1個の外部機器から複数個のパケットを受信し、
(c)前記機器探索処理において前記パケットを受信する毎に、前記パケットの受信時における使用チャネルと、前記パケットの受信時における受信電波強度値と、前記パケットの送信元である前記外部機器を識別するための機器識別情報と、を含む受信実績情報を前記メモリに記憶させ、
(d)前記機器探索処理の実行後、前記メモリに記憶された複数個の前記受信実績情報を参照し、前記機器識別情報ごとに、対応する前記受信電波強度値に基づいて強度関係値を算出し、
(e)最も高い前記強度関係値に対応する特定の機器識別情報によって示される特定の外部機器との間で、前記特定の外部機器が使用する特定の使用チャネルを用いて無線接続を確立する、
端末装置。
A terminal device capable of performing wireless communication using any one of a plurality of channels included in an available frequency band.
Control unit and
Equipped with memory,
The control unit
(A) For each of the plurality of channels, a device search process for executing a scan process for searching for a device using the channel is executed.
(B) In the device search process, a plurality of packets are received from at least one external device among one or more external devices existing in the vicinity.
(C) Each time the packet is received in the device search process, the channel used at the time of receiving the packet, the received radio wave intensity value at the time of receiving the packet, and the external device that is the source of the packet are identified. The device identification information and the reception record information including the device identification information are stored in the memory.
(D) After executing the device search process, the plurality of reception record information stored in the memory is referred to, and the intensity-related value is calculated for each device identification information based on the corresponding received radio wave intensity value. And
(E) Establishing a wireless connection with a specific external device indicated by the specific device identification information corresponding to the highest intensity relation value using a specific channel used by the specific external device.
Terminal equipment.
前記強度関係値は、前記機器識別情報ごとに、対応する複数個の前記受信電波強度値を平均した平均電波強度値を含む、請求項1に記載の端末装置。 The terminal device according to claim 1, wherein the intensity-related value includes an average radio wave intensity value obtained by averaging a plurality of corresponding received radio wave intensity values for each device identification information. 前記受信実績情報は、前記使用チャネルと、前記受信電波強度値と、前記機器識別情報と、に加えて、前記パケットの内容を示すパケット内容情報をさらに含んでおり、
前記制御部は、さらに、
前記機器探索処理の実行後、前記メモリに記憶された複数個の前記受信実績情報を参照し、前記機器識別情報ごとに、少なくとも1個の対応する前記パケット内容情報が、アクセスポイントによって出力されるパケットであることを示すか否かを判断し、
少なくとも1個の前記パケット内容情報が、アクセスポイントに関係する内容を示す場合に、対応する前記機器識別情報について前記強度関係値を算出し、
いずれの前記パケット内容情報も、アクセスポイントに関係する内容を示さない場合に、対応する前記機器識別情報について前記強度関係値を算出しない、請求項1又は2に記載の端末装置。
The reception record information further includes the packet content information indicating the content of the packet, in addition to the channel used, the received radio wave intensity value, and the device identification information.
The control unit further
After executing the device search process, the access point outputs at least one corresponding packet content information for each device identification information by referring to the plurality of reception record information stored in the memory. Determine if it indicates that it is a packet,
When at least one packet content information indicates content related to the access point, the strength-related value is calculated for the corresponding device identification information.
The terminal device according to claim 1 or 2, wherein the strength-related value is not calculated for the corresponding device identification information when none of the packet content information indicates the content related to the access point.
前記制御部は、前記機器探索処理において、1個以上の外部機器のうちの少なくとも1個の外部機器から複数個のパケットを受信する場合、1個の外部機器から予め定められた最大N個(Nは2以上の整数)のパケットを受信する、請求項1から3のいずれか一項に記載の端末装置。 When the control unit receives a plurality of packets from at least one external device among one or more external devices in the device search process, the control unit has a maximum of N predetermined packets from one external device. The terminal device according to any one of claims 1 to 3, wherein N receives a packet of 2 or more). 前記制御部は、前記機器探索処理において前記スキャン処理を実行する際、前記スキャン処理の開始から所定期間が経過した場合に、パケットの受信状況に関わらず、当該チャネルに対する前記スキャン処理を終了する、請求項1から4のいずれか一項に記載の端末装置。
When executing the scan process in the device search process, the control unit ends the scan process for the channel regardless of the packet reception status when a predetermined period elapses from the start of the scan process. The terminal device according to any one of claims 1 to 4.
JP2019216657A 2019-11-29 2019-11-29 Terminal device Pending JP2021087173A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2019216657A JP2021087173A (en) 2019-11-29 2019-11-29 Terminal device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2019216657A JP2021087173A (en) 2019-11-29 2019-11-29 Terminal device

Publications (1)

Publication Number Publication Date
JP2021087173A true JP2021087173A (en) 2021-06-03

Family

ID=76088164

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2019216657A Pending JP2021087173A (en) 2019-11-29 2019-11-29 Terminal device

Country Status (1)

Country Link
JP (1) JP2021087173A (en)

Similar Documents

Publication Publication Date Title
US11902869B2 (en) Communication device
US11825562B2 (en) Communication device
US10425889B2 (en) Communication device
US8509181B2 (en) Wireless communication apparatus and communication method therefor
US9198119B2 (en) Method and apparatus for peer-2-peer Wi-Fi ranging using near field communication
US11395121B2 (en) Communication device, non-transitory computer-readable recording medium storing computer-readable instructions for communication device, and method executed by communication device
US8908695B2 (en) Wireless communication device, program, wireless communication method, and wireless communication system
JP5526069B2 (en) Wireless communication terminal
US10326666B2 (en) Communication apparatus, control method, and computer readable storage medium
US20180124691A1 (en) Method and apparatus for accessing wireless network with smart device
US20200084712A1 (en) Method and system for dynamic access point selection in coordinated access point group
US20150334759A1 (en) Communication apparatus, control method, and storage medium
US10009816B2 (en) Communication apparatus, method of controlling the same, and communication system
US20230262524A1 (en) Method, device, apparatus and storage medium for communication in communication network
JP2014060503A5 (en)
JP2021087173A (en) Terminal device
JP4705652B2 (en) Wireless terminal and wireless communication method
EP3017634B1 (en) Method and apparatus for selecting cell of terminal in wireless communication system
WO2024093744A1 (en) Cell selection method and terminal device
US10420159B2 (en) Communication device, non-transitory computer-readable recording medium storing computer-readable instructions for communication device, and method executed by communication device
JP7176205B2 (en) terminal equipment
JP2018125705A (en) Communication connection method, communication connection device, communication system, and communication connection program
JP2017163312A (en) Radio communication device and radio communication method