JP5781272B2 - Communication device, master-slave determination method, and computer program - Google Patents
Communication device, master-slave determination method, and computer program Download PDFInfo
- Publication number
- JP5781272B2 JP5781272B2 JP2010019756A JP2010019756A JP5781272B2 JP 5781272 B2 JP5781272 B2 JP 5781272B2 JP 2010019756 A JP2010019756 A JP 2010019756A JP 2010019756 A JP2010019756 A JP 2010019756A JP 5781272 B2 JP5781272 B2 JP 5781272B2
- Authority
- JP
- Japan
- Prior art keywords
- mode
- master
- slave
- modem
- communication
- 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.)
- Active
Links
Images
Description
本発明は、SHDSL方式のモデムなどの通信機器および当該通信機器における役割の確定方法などに関する。 The present invention relates to a communication device such as an SHDSL modem and a method for determining a role in the communication device.
従来、様々な通信方式によって2台のモデムなどの通信機器同士で通信が行われている。例えば、Symmetric Digital Subscriber Line(SDSL)方式によると、2台のモデムが、1対の電話線を介して、一方のモデムから他方のモデムへの通信および反対方向の通信を、同じ速度で行う。さらに、Symmetric High-speed Digital Subscriber Line(SHDSL)方式によると、SDSL方式よりも高速に通信を行うことができるほか、電話線の長さをSDSL方式よりも長くすることができる。 Conventionally, communication devices such as two modems communicate with each other by various communication methods. For example, according to the Symmetric Digital Subscriber Line (SDSL) system, two modems perform communication from one modem to the other modem and communication in the opposite direction via the pair of telephone lines at the same speed. Further, according to the Symmetric High-speed Digital Subscriber Line (SHDSL) system, communication can be performed at a higher speed than the SDSL system, and the length of the telephone line can be made longer than that of the SDSL system.
電話線などを介して2台のモデムなどの通信機器によって通信を行う際は、通常、一方の通信機器をマスタに設定し、もう一方の通信機器をスレーブに設定する(非特許文献1)。 When communication is performed by two communication devices such as two modems via a telephone line or the like, usually one communication device is set as a master and the other communication device is set as a slave (Non-Patent Document 1).
工場などの広い敷地において、モデムなどの通信機器を2台、離れたところに固定的に設置し構内伝送のための通信を行う場合は、運用保守者が予め、通信環境の構築を計画する。この際に、運用保守者は、一方の通信機器をマスタに設定し、もう一方の通信機器をスレーブに設定する。 In a large site such as a factory, when two communication devices such as modems are fixedly installed at a remote location and communication for in-house transmission is performed, an operation and maintenance person plans to build a communication environment in advance. At this time, the operation and maintenance person sets one communication device as a master and the other communication device as a slave.
しかし、例えば災害が発生した場合など、一時的に2つの拠点同士を結ぶ通信環境を構築する必要がある場合は、2台の通信機器のうちの一方をマスタに設定しもう一方をスレーブに設定する作業を速やかに行わなければならない。 However, when it is necessary to build a communication environment that temporarily connects two locations, for example, when a disaster occurs, one of the two communication devices is set as the master and the other is set as the slave. Work must be done promptly.
ところが、従来の方法では、運用保守者による計画および設定の手間が掛かり、通信を行う環境が整うまでに時間が掛かってしまう。 However, in the conventional method, it takes time and effort for planning and setting by an operation and maintenance person, and it takes time until an environment for communication is established.
本発明は、このような問題点に鑑み、2台のモデムなどの通信機器の役割の確定を従来よりも簡単に行うことができるようにすることを、目的とする。 The present invention has been made in view of such problems, and an object of the present invention is to make it possible to determine the roles of two communication devices such as modems more easily than in the past.
本発明の一形態に係る通信機器は、他の通信機器と通信を行う通信機器であって、第1のレジスタに第1の値が設定されたときに当該通信機器にハンドシェーキングメッセージのやり取りを行なわせ、ハンドシェーキングが確立したときに第2のレジスタに第2の値を設定するドライバおよび物理レイヤ制御用ファームウェアによる通信制御手段と、当該通信機器をマスタとして前記他の通信機器と通信させるマスタモードを前記通信制御手段に対して設定するマスタモード処理部のマスタモード設定指令手段と、前記マスタモード設定指令手段が前記マスタモードを前記通信制御手段に対して設定するときに、前記第1のレジスタに前記第1の値を設定する前記マスタモード処理部のモード確定処理開始指令部によるハンドシェーキング開始指示手段と、当該通信機器をスレーブとして前記他の通信機器と通信させるスレーブモードを前記通信制御手段に対して設定するスレーブモード処理部のスレーブモード設定指令手段と、前記第2のレジスタに前記第2の値が設定されていない期間に、前記マスタモード設定指令手段および前記スレーブモード設定指令手段に、前記ハンドシェーキングメッセージをすべてやり取りする所要時間以上の時間間隔であって乱数に基づいて決定される、それぞれランダムな時間間隔で交互に前記通信制御手段に対するモード設定を行なわせる切換手段と、を有する。 A communication device according to an aspect of the present invention is a communication device that communicates with another communication device, and when a first value is set in the first register, a handshaking message is exchanged with the communication device. Communication control means using a driver and physical layer control firmware that sets the second value in the second register when handshaking is established, and communication with the other communication device using the communication device as a master A master mode setting command means of a master mode processing unit for setting a master mode to be set for the communication control means, and when the master mode setting command means sets the master mode for the communication control means, handshaking open by the mode determination processing start command unit of the master mode processing unit for setting the first value to 1 in the register An instruction unit, wherein the communication device and a slave mode setting command means in the slave mode processing unit for setting to the communication control means slave mode to communicate with the other communication devices as a slave, the first and second registers In a period when the value of 2 is not set, it is determined on the basis of a random number that is a time interval longer than the time required for exchanging all the handshaking messages to the master mode setting command means and the slave mode setting command means. Switching means for alternately setting a mode for the communication control means at random time intervals .
本発明によると、2台のモデムなどの通信機器の役割の確定を従来よりも簡単に行うことができる。 According to the present invention, the role of communication devices such as two modems can be determined more easily than before.
図1は広域ネットワーク30の全体的な構成の例を示す図、図2はモデム10のハードウェア構成の例を示す図、図3はモデム10の機能的構成の例を示す図、図4はハンドシェーキングメッセージのやり取りの例を示す図である。
1 is a diagram illustrating an example of the overall configuration of the
広域ネットワーク30は、図1に示すように、複数のローカルエリアネットワーク40を有する。以下、各ローカルエリアネットワーク40をそれぞれ「ローカルエリアネットワーク40A」、「ローカルエリアネットワーク40B」、「ローカルエリアネットワーク40C」、…と区別して記載することがある。
As shown in FIG. 1, the
ローカルエリアネットワーク40は、モデム10、ハブ11、および1台または複数台の端末装置12などを有する。
The
ハブ11は、そのハブ11が属するローカルエリアネットワーク40内のモデム10と各端末装置12との間の通信を中継する。
The
モデム10は、Symmetric Digital Subscriber Line(SDSL)またはSymmetric High-speed Digital Subscriber Line(SHDSL)などの通信方式によって他のモデム10と通信を行う。また、モデム10は、Local Area Network(LAN)または無線LANなどの通信方式によって端末装置12と通信を行う。
The
さらに具体的には、モデム10は、他のモデム10とメタル回線などの電話線によって繋がれている。さらに、モデム10は、LANケーブルなどによってハブ11と繋がれている。なお、モデム10にハブ11の機能が備えられている場合もある。
More specifically, the
そして、モデム10は、そのモデム10が属するローカルエリアネットワーク40内の端末装置12と、他のローカルエリアネットワーク40内の端末装置12との間でやり取りされるデータを、当該他のローカルエリアネットワーク40に属する他のモデム10などを介して中継する。
Then, the
端末装置12は、ワープロ、電子メール、Webブラウザ、またはIP電話などのアプリケーションを備えた装置である。端末装置12として、パーソナルコンピュータまたはワークステーションなどが用いられる。
The
モデム10は、図2に示すように、Micro Processing Unit(MPU)10p、Random Access Memory(RAM)10q、Read Only Memory(ROM)10r、液晶パネル10s、操作ボタン10t、および通信部10uなどを有する。
As shown in FIG. 2, the
通信部10uは、LANケーブルを介して端末装置12から送られてきたデジタル信号をアナログ信号に変調し、電話線を介して他のモデム10へ送信する。また、電話線を介して他のモデム10から送られてきたアナログ信号をデジタル信号に復調し、LANケーブルを介して端末装置12へ送信する。
The
操作ボタン10tは、ユーザがモデム10に対して指令およびデータを入力するためのボタンである。
The
液晶パネル10sは、モデム10の状態のほか、ユーザが入力した指令またはデータなどを表示する。
The
また、操作ボタン10tと液晶パネル10sは、同等の機能を有する端末装置をモデム10の外部に接続する形態であっても構わない。
Further, the
ROM10rには、図3に示すようなマスタスレーブ決定部101、乱数発生部102、マスタモード切換処理部103、スレーブ側切換処理部104、マスタ側メッセージ交換処理部105、スレーブ側メッセージ交換処理部106、およびリンク確立処理部107などを実現するためのプログラムおよびデータが記憶されている。これらのプログラムおよびデータはMPU10pによって実行される。
The
図3の各部によると、モデム10を他のモデム10に新たに接続する際の処理を従来よりも容易に行うことができる。
According to each part of FIG. 3, the process at the time of newly connecting the
ところで、一般的に、2台のモデム10を接続する際は、いずれか一方がマスタの役割を果たし、もう一方がスレーブの役割を果たすことを運用保守者が計画、設定しなければならない。
By the way, in general, when two
接続つまりリンクの確立に際して、マスタとスレーブとの間でやり取りされるメッセージは、図4に示すように、最初は、マスタ側から発信される。すなわち、最初に、マスタは、特定の内容のメッセージMG1を、電話線を介してスレーブへ発信(送信)する。 At the time of establishing a connection, that is, a link, a message exchanged between the master and the slave is first transmitted from the master side as shown in FIG. That is, first, the master transmits (sends) a message MG1 having a specific content to the slave via the telephone line.
スレーブは、メッセージMG1を受信すると、それに対する応答のメッセージとして特定の内容を示すメッセージMG2をマスタへ発信する。以下、同様に、マスタおよびスレーブは、通信方式に応じてメッセージのやり取りを行う。そして、メッセージのやり取りがすべて完了したら、その時の役割に応じて従来通りの回線などに関する設定を行うことで、マスタおよびスレーブの間でリンクが確立される。 When receiving the message MG1, the slave transmits a message MG2 indicating a specific content to the master as a response message to the slave. Hereinafter, similarly, the master and the slave exchange messages according to the communication method. When all message exchanges are completed, a link is established between the master and the slave by setting the conventional line according to the role at that time.
次に、図3に示すモデム10の各部の処理内容について、詳細に説明する。
Next, the processing content of each part of the
マスタスレーブ決定部101は、モデム10自身がマスタとして動作するのかスレーブとして動作するのかを決定する。以下、マスタとして動作するモードを「マスタモード」と記載し、スレーブとして動作するモードを「スレーブモード」と記載する。
The master /
マスタスレーブ決定部101は、乱数発生部102と連携し、モデム10自身のモードをマスタモードおよびスレーブモードのいずれにするのかを、次のように決定する。
The master /
モデム10の電源がオンになると、マスタスレーブ決定部101は、マスタモードおよびスレーブモードのうちの予め決められた方を、モデム10自身のモードに決定する。または、乱数を発生させることによって、どちらのモードにするのかを決めてもよい。
When the power supply of the
乱数発生部102は、マスタスレーブ決定部101によってモードが決定されるごとに、所定の範囲の乱数を発生させる。この乱数は、後述するようにモードを継続する秒数を表すのに用いられる。
The random
所定の範囲の下限値は、マスタとスレーブとがモードを確定する際にハンドシェーキングメッセージ(Handshaking Massage)のやり取りをすべて完了するのに必要な時間以上であることが、望ましい。例えば、ハンドシェーキングメッセージのやり取りを行うのに必要な時間が2〜3秒であれば、下限値を「3」ないし「5」程度に設定しておく。 The lower limit value of the predetermined range is preferably equal to or longer than the time necessary for completing the exchange of handshaking messages when the master and the slave determine the mode. For example, if the time required for exchanging handshaking messages is 2 to 3 seconds, the lower limit is set to about “3” to “5”.
一方、所定の範囲の上限値は、任意の値で構わないが、大きすぎないほうがよい。例えば、「20」ないし「60」程度に設定しておく。 On the other hand, the upper limit value of the predetermined range may be any value, but it is better not to be too large. For example, it is set to about “20” to “60”.
さらに、マスタスレーブ決定部101は、モードを決定した後、乱数発生部102が発生させた乱数分の時間(秒)が経過したら、モードを、現在とは別のモードに決定し直す。
Furthermore, after determining the mode, when the time (seconds) for the random number generated by the random
さらに、マスタスレーブ決定部101がモードを決定し直した後も、乱数発生部102は乱数を発生させる。そして、マスタスレーブ決定部101は、その乱数分の時間(秒)が経過したら、モードを、現在とは別のモードに決定し直す。
Further, even after the master /
したがって、マスタスレーブ決定部101および乱数発生部102によると、モデム10のモードが、ランダムな時間間隔でマスタモード、スレーブモード、マスタモード、スレーブモード、…、と決定される。または、ランダムな時間間隔でスレーブモード、マスタモード、スレーブモード、マスタモード、…、と決定される。なお、決定の処理は、他のモデム10とのハンドシェーキングメッセージのやり取りが正常に完了したと判断できたら中止する。
Therefore, according to master
マスタモード切換処理部103は、マスタスレーブ決定部101によってモードがマスタモードに決定されまたは決定し直されたタイミングで、モデム10自身のモードをマスタモードに切り換える。
The master mode
スレーブ側切換処理部104は、マスタスレーブ決定部101によってモードがスレーブモードに決定されまたは決定し直されたタイミングで、モデム10自身のモードをスレーブモードに切り換える。
The slave side
マスタ側メッセージ交換処理部105は、モデム10のモードがマスタモード切換処理部103によってマスタモードに切り換えられたタイミングで、メッセージMG1をスレーブへ発信する。さらに、通信方式に従って、スレーブからメッセージを受信し特定のメッセージをスレーブへ発信するなど、スレーブとの間でメッセージ(ハンドシェーキングメッセージ)のやり取りを行う。なお、メッセージのやり取りについては、図4で説明した通りである。
Master-side message
スレーブ側メッセージ交換処理部106は、モデム10のモードがスレーブ側切換処理部104によってスレーブモードに切り換えられたタイミングで、マスタからメッセージMG1が送信されてくるのを待つ。そして、メッセージMG1を受信すると、通信方式に従って、図4で説明したように、マスタとの間でメッセージ(ハンドシェーキングメッセージ)のやり取りを行う。
The slave-side message
リンク確立処理部107は、接続相手である他のモデム10との間でのハンドシェーキングメッセージのやり取りが正常に完了したことで、モードが確定できたと判断し、当該他のモデム10とのリンクの確立を完了するための回線の設定などの処理を行う。
The link
図5および図6はリンクの確立の際のモデム10の全体的な処理の流れの例を説明するフローチャート、図7ないし図10はハンドシェーキングメッセージのやり取りの例を示す図である。
FIGS. 5 and 6 are flowcharts for explaining an example of the overall processing flow of the
次に、図1に示すローカルエリアネットワーク40Aのモデム10がローカルエリアネットワーク40Bのモデム10と未だ接続されておらず、これから新たに接続する場合を例に、図3の各部の処理の手順を、図5および図6に示すフローチャートを参照しながら説明する。以下、ローカルエリアネットワーク40Aおよびローカルエリアネットワーク40Bそれぞれのモデム10を「モデム10A」および「モデム10B」と区別して記載する。
Next, with reference to an example in which the
ローカルエリアネットワーク40Aにいるユーザは、ローカルエリアネットワーク40Aとローカルエリアネットワーク40Bとの間に敷設されている電話線をモデム10Aに繋げる。さらに、モデム10Aの電源をオンにする。
A user in the
すると、モデム10Aにおいて、マスタスレーブ決定部101は、モデム10Aのモードをマスタモードおよびスレーブモードのうちのいずれかに決定する(図5の#71)。マスタモードに決定された場合は(#72でYes)、乱数発生部102は、所定の範囲の乱数を発生させる(#73)。乱数の発生の処理と前後してまたは並行して、マスタスレーブ決定部101は、ハードウェアの設定値などをリセットし(#74)、マスタモード切換処理部103は、モデム10Aのモードをマスタモードに設定する(#75)。
Then, in the
マスタ側メッセージ交換処理部105は、マスタとして、モデム10Bを相手にハンドシェーキングメッセージのやり取りを行う(#77)。したがって、マスタ側メッセージ交換処理部105は、最初のメッセージであるメッセージMG1をモデム10Bへ発信する。
The master-side message
モデム10Bがスレーブとして動作している場合は、メッセージMG1がモデム10Bによって受信されるので、マスタ側メッセージ交換処理部105は、ハンドシェーキングメッセージのやり取りを開始することができる。しかし、そうでない場合は、開始することができない。
When the
そこで、マスタ側メッセージ交換処理部105は、ステップ#73で発生した乱数に対応する時間だけ、ハンドシェーキングメッセージのやり取りを試行する。つまり、マスタ側メッセージ交換処理部105は、メッセージMG1を定期的に(例えば、0.1〜0.5秒ごとに)発信する。
Therefore, the master-side message
そして、時間内にハンドシェーキングメッセージのやり取りが完了できた場合は(#78でYes)、リンク確立処理部107はモデム10Bがスレーブとして動作していると判断し、これによりモデム10Aのモードをマスタに確定する(#79)。そして、モデム10Aは、従来通り、回線などに関する種々の設定を行う(#80)。
When the handshaking message exchange is completed within the time (Yes in # 78), the link
一方、時間内にハンドシェーキングメッセージのやり取りを完了できなかった場合は(#78でNo、#76でYes)、マスタスレーブ決定部101は、モデム10Aのモードをスレーブモードに決定し直し、各部は図6に示す処理を適宜実行する。また、電源がオンになって最初にモデム10Aのモードをスレーブモードに決定した場合も(#72でNo)、各部は図6に示す処理を実行する。
On the other hand, when the exchange of the handshaking message cannot be completed within the time (No in # 78, Yes in # 76), the master /
乱数発生部102は、所定の範囲の乱数を発生させる(#81)。乱数の発生の処理と前後してまたは並行して、マスタスレーブ決定部101は、ハードウェアの設定値などをリセットし(#82)、スレーブ側切換処理部104は、モデム10Aのモードをスレーブモードに設定する(#83)。
The
スレーブ側メッセージ交換処理部106は、スレーブとして、モデム10Bを相手にハンドシェーキングメッセージのやり取りを行う(#85)。したがって、スレーブ側メッセージ交換処理部106は、最初のメッセージであるメッセージMG1がモデム10Bから送信されてくるのを待つ。
The slave-side message
モデム10Bがマスタとして動作している場合は、メッセージMG1が送信されてくるので、スレーブ側メッセージ交換処理部106は、メッセージMG1を受信したらハンドシェーキングメッセージのやり取りを開始することができる。しかし、そうでない場合は、開始することができない。
When the
そこで、スレーブ側メッセージ交換処理部106は、ステップ#81で発生した乱数に対応する時間だけ、ハンドシェーキングメッセージのやり取りを試行する。つまり、メッセージMG1をその時間だけ待ち続ける。
Therefore, the slave-side message
そして、時間内にハンドシェーキングメッセージのやり取りが完了できた場合は(#86でYes)、リンク確立処理部107はモデム10Bがマスタとして動作していると判断し、これによりモデム10Aのモードをスレーブに確定する(#87)。そして、モデム10Aは、従来通り、回線などに関する種々の設定を行う(#88)。
If the handshaking message exchange is completed within the time (Yes in # 86), the link
一方、時間内にハンドシェーキングメッセージのやり取りを完了できなかった場合(#86でNo、#84でYes)は、マスタスレーブ決定部101は、モデム10Aのモードをマスタモードに決定し直し、各部は図5に示すステップ#74〜#80の処理を適宜実行する。
On the other hand, if the handshaking message exchange cannot be completed in time (No in # 86, Yes in # 84), the master /
ローカルエリアネットワーク40Bにいるユーザも同様に、ローカルエリアネットワーク40Aとローカルエリアネットワーク40Bとの間に敷設されている電話線をモデム10Bに繋げる。さらに、モデム10Bの電源をオンにする。
Similarly, the user in the
すると、モデム10Bも、モデム10Aを相手に、図5および図6に示す各処理を適宜実行する。
Then, the
これにより、モデム10Aおよびモデム10Bそれぞれのモードがランダムに変わる。したがって、図7または図8に示すように、一方のモデム10がマスタモードでありもう一方のモデム10がスレーブモードである時間帯が生じる。そして、この時間帯に、モデム10Aおよびモデム10Bはハンドシェーキングメッセージのやり取りを行い、モードを確定させることができる。
As a result, the modes of the
なお、図9または図10に示すように、ハンドシェーキングメッセージのやり取りを行っている途中で一方のモデム10のモードの切換が行われると、ハンドシェーキングメッセージのやり取りを完了することができずモードを確定できない。しかし、このような場合も、モデム10Aおよびモデム10Bそれぞれのモードがランダムな時間間隔で変わる。よって、モデム10Aおよびモデム10Bは、ハンドシェーキングメッセージのやり取りの機会を再度得ることができ、モードの確定を図ることができる。
As shown in FIG. 9 or FIG. 10, if the mode of one
本実施例によると、ユーザは、2台のモデム10のマスタおよびスレーブの役割分担を、事前の計画を行うことなく従来よりも容易に行うことができる。
According to the present embodiment, the user can perform the role assignment of the master and slave of the two
〔SHDSL対応のモデムの例〕
図11はモデム50のプラットフォームの例を示す図、図12は接続用ソフトウェア563によって実現される機能的構成の例を示す図、図13はマスタモード処理部504の例を示す図、図14はスレーブモード処理部505の例を示す図である。
[Example of modem compatible with SHDSL]
11 is a diagram showing an example of the platform of the
次に、モデム10としてSHDSL対応のモデム50を用いかつ既存のドライバなどを用いる場合の実施例を説明する。
Next, a description will be given of an embodiment in which an SHDSL
広域ネットワーク30の全体的な構成は、前に図1に示した通りである。モデム50のハードウェアの構成も、前に図2に示したモデム10のハードウェアの構成と基本的に同じである。つまり、図11に示すように、モデム50は、MPU50p、RAM50q、ROM50r、液晶パネル50s、操作ボタン50t、および通信部50uなどを有する。
The overall configuration of the
ただし、モデム50のROM50rには、図11に示すように、物理レイヤ制御用ファームウェア561、ドライバ562、および接続用ソフトウェア563が記憶されている。
However, the
物理レイヤ制御用ファームウェア561は、SHDSLおよびイーサネット(登録商標)に従って通信が行われるように各ハードウェアを制御するためのプログラムである。さらに、物理レイヤ制御用ファームウェアには、Application Program Interface(API)が用意されている。
The physical
ドライバ562は、物理レイヤ制御用ファームウェア561に用意されているAPIの関数(機能)を適宜呼び出すなどしてモデム50のハードウェアを制御するプログラムである。
The
物理レイヤ制御用ファームウェア561およびドライバ562は、モデム50のベンダが予め用意したものである。機種によっては、物理レイヤ制御用ファームウェア561とドライバ562とが1組のソフトウェア(ファームウェア)として一体的に構成される場合もある。
The physical
ところで、SHDSLで使用する電話線(2BASE−TL)の規格は、Institute of Electrical and Electronics Engineers(IEEE)802.3によって規定されている。したがって、物理レイヤ制御用ファームウェア561およびドライバ562は、IEEE802.3に準拠している。そして、ドライバ562には、IEEE802.3で規定されるレジスタが備わっている。
Incidentally, the standard of the telephone line (2BASE-TL) used in SHDSL is defined by Institute of Electrical and Electronics Engineers (IEEE) 802.3. Therefore, the physical
接続用ソフトウェア563は、モデム50自身を他のモデム50に新たに接続する際の処理を従来よりも容易に行うためのソフトウェアである。つまり、図3に示した各部と基本的に同じ役割を果たす。
The
しかし、図11の例は、図3に示した各部の機能を、接続用ソフトウェア563だけでなく、物理レイヤ制御用ファームウェア561およびドライバ562によって実現する。
However, in the example of FIG. 11, the functions of the units illustrated in FIG. 3 are realized not only by the
接続用ソフトウェア563には、図12に示すようなマスタスレーブ決定部501、リセット指令部502、マスタスレーブ切換部503、マスタモード処理部504、およびスレーブモード処理部505などを実現するためのプログラムおよびデータが含まれている。これらのプログラムは、MPU50pによって実行される。
The
次に、図12に示すモデム50の各部の処理内容などについて、説明する。なお、図3で説明した事項と共通する事項については、説明を省略する。
Next, processing contents of each unit of the
マスタスレーブ決定部501は、図3のマスタスレーブ決定部101と同様に、モデム50自身のモードをマスタモードとするのかスレーブモードとするのかを決定する。
The master
リセット指令部502は、マスタスレーブ決定部501によってモードの決定がなされるごとに、ハードウェアの設定値などをリセットする。リセットは、例えば、リセット用のコマンドまたはAPI関数をドライバ562または物理レイヤ制御用ファームウェア561に対して指定することによって、行えばよい。
The
マスタスレーブ切換部503は、マスタスレーブ決定部501がモードをマスタモードに決定した場合は、マスタモード処理部504を有効にして、スレーブモード処理部505を無効にする。一方、マスタスレーブ決定部501がモードをスレーブモードに決定した場合は、マスタスレーブ切換部503は、スレーブモード処理部505を有効にして、マスタモード処理部504を無効にする。
When the master
マスタモード処理部504は、図13に示すように、マスタモード設定指令部571、モード確定処理開始指令部572、乱数発生部573、モード確定チェック部574、および回線設定指令部575などを有する。このような構成により、マスタモード処理部504は、マスタとして他のモデム50と接続するための処理を行う。この処理は、マスタスレーブ切換部503によってマスタモード処理部504が有効に切り換えられたタイミングで開始される。
As shown in FIG. 13, the master
マスタモード設定指令部571は、モデム50自身のモードをマスタモードに設定する処理を、ドライバ562または物理レイヤ制御用ファームウェア561に行わせる。この際に、マスタモード設定指令部571は、マスタモードへの切換用のコマンドまたはAPI関数をドライバ562または物理レイヤ制御用ファームウェア561に対して指定すればよい。すると、ドライバ562または物理レイヤ制御用ファームウェア561は、モードをマスタモードに設定する。後述するスレーブモード設定指令部581(図14参照)によるスレーブモードの設定の場合も、同様である。
The master mode setting
モード確定処理開始指令部572は、マスタモードへの設定の完了後、マスタとしてハンドシェーキングメッセージのやり取りを開始するようにドライバ562に対して指令する。指令は、IEEE802.3のReg6.16つまり「45.2.6.6 10P/2B aggregation discovery control register (Register 6.16)」というレジスタの「Discovery Operation (Bit [1:0])」に「Get(BitVal=10)」を設定することによって、行えばよい。すると、ドライバ562および物理レイヤ制御用ファームウェア561によって通信部50uなどが制御され、最初のメッセージつまりメッセージMG1が相手方へ発信される。
The mode confirmation processing
乱数発生部573は、マスタモードに設定されるごとに、所定の範囲の乱数を発生させる。
The
モード確定チェック部574は、マスタモードに設定されてから乱数発生部573が発生させた乱数分の時間(秒)が経過するまでの間、他のモデム50とのリンクが確立されたか否かを、次のようにチェックする。
The mode
モード確定チェック部574は、IEEE802.3のReg3.60つまり「45.2.3.17 10P/2B capability register (register 3.60)」というレジスタの「Remote PAF supported Bit[11]」の値をドライバ562から読み出す。そして、モード確定チェック部574は、読み出した値が「link partner supports PAF(BitVal=1)」に変化したことでハンドシェーキングメッセージのやり取りが正常に完了したと判断し、モードが確定されたと判定する。そうでなければ、モードが確定されていないと判定する。
The mode
ここで、自身と他のモデム50は、前記IEEE802.3のReg3.60の「PAF available Bit[12]」の値が「PAF supported(BitVal=1)」であることが前提である。(PAF:PME Aggregation Functionの略称であり、SHDSLチップでは一般的に実装されている機能である。)
回線設定指令部575は、モードが確定されたとモード確定チェック部574によって判定(検知)されたら、モデム50自身のモードをマスタモードとして回線設定を行う。その設定は、例えば、回線設定用のコマンドまたはAPI関数をドライバ562または物理レイヤ制御用ファームウェア561に対して指定することによって、モデム50自身がマスタとして動作するための、回線などに関する種々の設定を行えばよい。
Here, it is premised that the value of “PAF available Bit [12]” in Reg 3.60 of IEEE 802.3 is “PAF supported (BitVal = 1)” between itself and the
When the mode
図12に戻って、スレーブモード処理部505は、図14に示すように、スレーブモード設定指令部581、乱数発生部582、モード確定チェック部583、および回線設定指令部584などを有する。このような構成により、スレーブモード処理部505は、スレーブとして他のモデム50と接続するための処理を行う。この処理は、マスタスレーブ切換部503によってスレーブモード処理部505が有効に切り換えられたタイミングで開始される。
Returning to FIG. 12, the slave
スレーブモード設定指令部581は、モデム50自身のモードをスレーブモードに設定する処理をドライバ562または物理レイヤ制御用ファームウェア561に行わせる。
The slave mode
乱数発生部582は、スレーブモードに設定されるごとに、所定の範囲の乱数を発生させる。
The
モード確定チェック部583は、スレーブモードに設定されてから乱数発生部573が発生させた乱数分の時間(秒)が経過するまでの間、他のモデム50とのリンクが確立されたか否かをチェックする。チェックの方法は、前に説明したモード確定チェック部574によるチェックの方法と、同様である。つまり、モード確定チェック部583は、IEEE802.3のReg3.60の「Remote PAF supported Bit[11]」の値が「link partner supports PAF(BitVal=1)」に変化したことでハンドシェーキングメッセージのやり取りが正常に完了したと判断し、モードが確定されたと判定する。そうでなければ、モードが確定されていないと判定する。
The mode
回線設定指令部584は、モードが確定されたとモード確定チェック部583によって判定(検知)されたら、モデム50自身のモードをスレーブモードとして回線設定を行う。その設定は、例えば、回線設定指令部575と同様、回線設定用のコマンドまたはAPI関数をドライバ562または物理レイヤ制御用ファームウェア561に対して指定することによって、モデム50自身がスレーブとして動作するための、回線などに関する種々の設定を行えばよい。
When the mode
図12に戻って、マスタスレーブ決定部501は、乱数発生部573または乱数発生部582が発生させた乱数に対応する時間が経過してもモード確定チェック部574またはモード確定チェック部583がモード確定を検知しなかった場合に、モデム50自身のモードを、現在のモードとは反対のモードに決定し直す。
Returning to FIG. 12, the master /
このような構成により、モデム50のモードは、所定の範囲のランダムな時間間隔でマスタモード、スレーブモード、マスタモード、スレーブモード、…、と決定される。または、同様の時間間隔でスレーブモード、マスタモード、スレーブモード、マスタモード、…、と決定される。そして、他のモデム50とのハンドシェーキングメッセージのやり取りが正常に完了したら、モードが確定したこととなり決定の処理が中止される。
With such a configuration, the mode of the
モデム50の全体的な処理の流れは、基本的に、前に図5および図6に示すフローチャートで説明した通りである。以下、モデム50において既存のドライバなどを用いた場合の各ステップの処理について、説明する。
The overall processing flow of the
ローカルエリアネットワーク40Aにはモデム50としてモデム50Aが備えられている。一方、ローカルエリアネットワーク40Bにはモデム50としてモデム50Bが備えられている。モデム50Aとモデム50Bとは未だ繋がれておらず、これから接続が試みられる。
The
ローカルエリアネットワーク40Aにいるユーザは、ローカルエリアネットワーク40Aとローカルエリアネットワーク40Bとの間に敷設されている電話線をモデム50Aに繋げる。さらに、モデム50Aの電源をオンにする。
A user in the
すると、モデム50Aは、モデム10Aと同様の処理を実行する。つまり、モデム50Aにおいて、マスタスレーブ決定部501、リセット指令部502、およびマスタスレーブ切換部503は、ランダムな時間間隔でモデム50Aのモードをマスタモードおよびスレーブモードのいずれかに繰り返し切り換える(図5の#71〜#75、図6の#81〜#83)。
Then, the modem 50A executes the same process as the
マスタモード処理部504は、マスタモードである間、マスタとしてモデム50Bとのモードの確定を試みる(#77)。この際に、マスタモード処理部504は、Reg6.16の「Discovery Operation (Bit [1:0])」に「Get(BitVal=10)」を設定する。これにより、物理レイヤ制御用ファームウェア561およびドライバ562によって通信部50uが制御され、メッセージMG1がモデム50Bへ送信される。メッセージMG1がモデム50Bによって受信されない場合は、スレーブモードに切り換えられるまで定期的にメッセージMG1がモデム50Aからモデム50Bへ送信される。
While in the master mode, the master
そして、スレーブモードに切り換わるまでに、メッセージMG1がモデム50Bによって受信され、ハンドシェーキングメッセージのやり取りが正常に完了したら(#78でYes)、モデム50Aの役割がマスタに確定し、回線設定を行うことでリンクが確立する(#79、#80)。以後、モデム50Aはマスタとしてモデム50Bと通信を行う。なお、モードの確定の検知は、Reg3.60の「Remote PAF supported Bit[11]」の値をチェックすることによって行うことができる。 Then, before switching to the slave mode, the message MG1 is received by the modem 50B, and when the exchange of the handshaking message is normally completed (Yes in # 78), the role of the modem 50A is determined as the master, and the line setting is performed. By doing so, a link is established (# 79, # 80). Thereafter, the modem 50A communicates with the modem 50B as a master. The confirmation of the mode can be detected by checking the value of “Remote PAF supported Bit [11]” in Reg 3.60.
一方、スレーブモードである間、スレーブモード処理部505は、スレーブとしてモデム50Bとのモードの確定を試みる(#85)。この際に、モデム50BからメッセージMG1が送信されてくるのを待つ。
On the other hand, while in the slave mode, the slave
そして、マスタモードに切り換わるまでに、メッセージMG1がモデム50Bから届き、ハンドシェーキングメッセージのやり取りが正常に完了したら(#86でYes)、モデム50Aの役割がスレーブに確定する(#87、#88)、以後、モデム50Aはスレーブとしてモデム50Bと通信を行う。スレーブモードにおけるモードの確定の検知も、Reg3.60の「Remote PAF supported Bit[11]」の値をチェックすることによって行うことができる。 When the message MG1 arrives from the modem 50B and the exchange of the handshaking message is normally completed (Yes in # 86) before switching to the master mode, the role of the modem 50A is determined to be a slave (# 87, # 88) Thereafter, the modem 50A communicates with the modem 50B as a slave. The mode confirmation in the slave mode can also be detected by checking the value of “Remote PAF supported Bit [11]” in Reg 3.60.
モデム50Bも同様に、モデム50Aを相手に、図5および図6に示した手順で、上に説明した各処理を適宜実行する。 Similarly, the modem 50B appropriately executes the above-described processes according to the procedure shown in FIGS. 5 and 6 with the modem 50A as a counterpart.
本実施例によると、予め用意されている、IEEE802.3に規定されるレジスタを用いることによって簡単に、2台のモデム10のマスタおよびスレーブの役割分担を行うことができる。
According to the present embodiment, it is possible to easily share the roles of the master and slave of the two
上述の各実施例では、マスタモードを継続する時間およびスレーブモードを継続する時間を、モードの決定または再決定の際に決定したが、それ以外の決定方法を用いてもよい。例えば、モデム10、50は、モードの決定または再決定の後、ハンドシェーキングメッセージのやり取りをすべて完了するのに要する時間が経過したら、所定の時間(例えば、1秒)を経過するごとに乱数を発生させる。そして、発生させた乱数が所定の値であれば、モードを決定し直す。そうでなければ、モードを継続する。
In each of the embodiments described above, the time for continuing the master mode and the time for continuing the slave mode are determined at the time of mode determination or redetermination, but other determination methods may be used. For example, after the mode determination or re-determination, the
その他、広域ネットワーク30、ローカルエリアネットワーク40、モデム10、50の全体または各部の構成、処理内容、処理順序などは、本発明の趣旨に沿って適宜変更することができる。
In addition, the configuration of the entire
10、50 モデム(通信機器)
105 マスタ側メッセージ交換処理部(マスタ処理手段)
106 スレーブ側メッセージ交換処理部(スレーブ処理手段)
101、501 マスタスレーブ決定部(切換手段)
102 乱数発生部(切換手段)
103 マスタモード切換処理部(切換手段)
104 スレーブ側切換処理部(切換手段)
107 リンク確立処理部(確定手段)
503 マスタスレーブ切換部(切換手段)
504 マスタモード処理部(マスタ処理手段)
505 スレーブモード処理部(スレーブ処理手段)
10, 50 Modem (communication equipment)
105 Master side message exchange processing unit (master processing means)
106 Slave side message exchange processing unit (slave processing means)
101, 501 Master slave determination unit (switching means)
102 Random number generator (switching means)
103 Master mode switching processing section (switching means)
104 Slave side switching processing section (switching means)
107 link establishment processing unit (confirming means)
503 Master-slave switching unit (switching means)
504 Master mode processing unit (master processing means)
505 Slave mode processing unit (slave processing means)
Claims (3)
第1のレジスタに第1の値が設定されたときに当該通信機器にハンドシェーキングメッセージのやり取りを行なわせ、ハンドシェーキングが確立したときに第2のレジスタに第2の値を設定するドライバおよび物理レイヤ制御用ファームウェアによる通信制御手段と、
当該通信機器をマスタとして前記他の通信機器と通信させるマスタモードを前記通信制御手段に対して設定するマスタモード処理部のマスタモード設定指令手段と、
前記マスタモード設定指令手段が前記マスタモードを前記通信制御手段に対して設定するときに、前記第1のレジスタに前記第1の値を設定する前記マスタモード処理部のモード確定処理開始指令部によるハンドシェーキング開始指示手段と、
当該通信機器をスレーブとして前記他の通信機器と通信させるスレーブモードを前記通信制御手段に対して設定するスレーブモード処理部のスレーブモード設定指令手段と、
前記第2のレジスタに前記第2の値が設定されていない期間に、前記マスタモード設定指令手段および前記スレーブモード設定指令手段に、前記ハンドシェーキングメッセージをすべてやり取りする所要時間以上の時間間隔であって乱数に基づいて決定される、それぞれランダムな時間間隔で交互に前記通信制御手段に対するモード設定を行なわせる切換手段と、
を有する通信機器。 A communication device that communicates with other communication devices,
A driver that causes the communication device to exchange handshaking messages when a first value is set in the first register, and sets a second value in the second register when handshaking is established And communication control means by physical layer control firmware ;
A master mode setting command unit of a master mode processing unit that sets a master mode for causing the communication device to communicate with the other communication device as a master for the communication control unit;
When the master mode setting command means sets the master mode to the communication control means, the master mode processing section sets the first value by the mode confirmation process start command section. Handshaking start instruction means;
A slave mode setting command means of a slave mode processing section for setting a slave mode for communicating with the other communication equipment as the slave to the communication control means;
In the second period in which the second value is not set in the register, to the master mode setting command means and said slave mode setting command means, a required time or time interval for exchanging all the handshaking message Switching means for performing mode setting for the communication control means alternately at random time intervals, determined based on random numbers ;
Communication equipment having.
前記2台の通信機器のそれぞれに、前記マスタとして他方の通信機器と通信するマスタ
モードを設定しかつ前記第1のレジスタに前記第1の値を設定する処理と、前記スレーブとして他方の通信機器と通信するスレーブモードを設定する処理とを、前記第2のレジスタに前記第2の値が設定されていない期間に、前記ハンドシェーキングメッセージをすべてやり取りする所要時間以上の時間間隔であって乱数に基づいて決定される、それぞれランダムな時間間隔で交互に実行させ、前記マスタモードにおいて前記第2のレジスタに前記第2の値が設定された場合は前記マスタに確定し、前記スレーブモードにおいて前記第2の値が設定された場合は前記スレーブに確定する、
マスタスレーブ確定方法。 Two communication devices that start exchanging handshaking messages when the first value is set in the first register and set the second value in the second register when handshaking is established A master-slave determination method for determining the two communication devices as a master and a slave when establishing a link of
A process of setting a master mode for communicating with the other communication apparatus as the master and setting the first value in the first register in each of the two communication apparatuses; and the other communication apparatus as the slave A process for setting a slave mode to communicate with a random number at a time interval equal to or longer than a required time for exchanging all the handshaking messages during a period when the second value is not set in the second register. Are determined alternately based on each other, and are alternately executed at random time intervals , and when the second value is set in the second register in the master mode, the master is determined, and in the slave mode, the second value is determined. If the second value is set, confirm to the slave,
Master slave determination method.
前記通信機器が有するコンピュータに、
前記通信機器をマスタとして他の通信機器と通信させるマスタモードを前記通信制御手段に対して設定するマスタモード設定指令処理と、
前記マスタモードを前記通信制御手段に対して設定するときに、前記第1のレジスタに前記第1の値を設定するハンドシェーキング開始指示処理と、
前記通信機器をスレーブとして前記他の通信機器と通信させるスレーブモードを前記通信制御手段に対して設定するスレーブモード設定指令処理と、
前記第2のレジスタに前記第2の値が設定されていない期間に、前記マスタモード設定指令処理および前記スレーブモード設定指令処理を前記ハンドシェーキングメッセージをすべてやり取りする所要時間以上の時間間隔であって乱数に基づいて決定される、それぞれランダムな時間間隔で交互に行なわせる切換処理と、を実行させる
コンピュータプログラム。 Communication control means for starting handshaking message exchange when the first value is set in the first register and setting the second value in the second register when handshaking is established. A computer program executed in the communication device,
In the computer that the communication device has,
Master mode setting command processing for setting the communication control means as a master mode for communicating with other communication devices using the communication device as a master;
Handshaking start instruction processing for setting the first value in the first register when the master mode is set for the communication control means;
Slave mode setting command processing for setting the communication control means slave mode for communicating with the other communication device as the communication device as a slave,
Said second register to said second value is not set period, met duration or time interval for exchanging all the master mode setting command process and the slave mode setting command processes the handshaking message And a switching process that is alternately performed at random time intervals determined based on random numbers .
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2010019756A JP5781272B2 (en) | 2010-01-29 | 2010-01-29 | Communication device, master-slave determination method, and computer program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2010019756A JP5781272B2 (en) | 2010-01-29 | 2010-01-29 | Communication device, master-slave determination method, and computer program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2011160164A JP2011160164A (en) | 2011-08-18 |
JP5781272B2 true JP5781272B2 (en) | 2015-09-16 |
Family
ID=44591753
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2010019756A Active JP5781272B2 (en) | 2010-01-29 | 2010-01-29 | Communication device, master-slave determination method, and computer program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5781272B2 (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP6109771B2 (en) | 2014-03-13 | 2017-04-05 | 株式会社東芝 | File transmission / reception device and file transmission / reception method |
DE102022108781A1 (en) | 2022-04-11 | 2023-10-12 | Harting Electric Stiftung & Co. Kg | Method for establishing a communication connection, communication device and system with at least two communication devices |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP3654166B2 (en) * | 2000-09-21 | 2005-06-02 | 株式会社デンソー | Mobile phone, hands-free device and communication system |
JP2004282492A (en) * | 2003-03-17 | 2004-10-07 | Sony Corp | Communication method and system thereof |
US8248978B2 (en) * | 2006-04-12 | 2012-08-21 | Qualcomm Incorporated | Detection of stations for wireless communication |
JP4405569B1 (en) * | 2008-07-23 | 2010-01-27 | 株式会社東芝 | Electronic device and communication control method |
-
2010
- 2010-01-29 JP JP2010019756A patent/JP5781272B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
JP2011160164A (en) | 2011-08-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN101997575B (en) | Short-range communication is used to carry out system, the method and apparatus of wireless network connection | |
CN106130770B (en) | Established using the simple connection of mixing networking of agent equipment | |
EP1290829B1 (en) | Call handling device for connecting a wireless communications device to a communications network | |
AU2003302045B2 (en) | Extended handset functionality and mobility | |
CN112566113B (en) | Key generation and terminal network distribution method, device and equipment | |
WO2003062999A2 (en) | Apparatus and method for controlling devices | |
CN103139271A (en) | System and method of controlling communication between terminals | |
JP5781272B2 (en) | Communication device, master-slave determination method, and computer program | |
CN101594384B (en) | Method for controlling remote device by using real-time message and control device | |
WO2020196811A1 (en) | Method and system including constructing communication network | |
JP2007502565A (en) | Wireless communication system | |
CN102843388A (en) | Method, system and device for achieving synchronism of wireless data transmission and short message receiving and sending | |
JP2014207608A (en) | Radio relay system between ieee802.11 standard communication and ieee802.15.4 standard communication | |
JP4932272B2 (en) | Chat system | |
CN105120525A (en) | Method for establishing communication connection and electronic device | |
KR100640826B1 (en) | Method of controlling home network devices | |
JP6289548B2 (en) | Device, control method thereof, and program | |
JP2004096234A (en) | Local server apparatus, control method, remote control system, control program, and recording medium | |
JP6541815B2 (en) | Communication system, communication apparatus, control method therefor, and program | |
JP2014068286A (en) | Communication network system, communication medium switchover method, and network implementation support method | |
JP5251570B2 (en) | Call test system, computer and telephone in call test system | |
JP2018011106A (en) | Communication relay apparatus, communication relay method, communication system, and communication relay program | |
JP5974630B2 (en) | Information management apparatus, information management method, and information management program | |
KR100474279B1 (en) | Bridge setting method for multiple access point based universal plug and play | |
JP2013172274A (en) | Information changing method and network system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20121005 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20130930 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20131029 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20140106 |
|
A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20140225 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20140526 |
|
A911 | Transfer to examiner for re-examination before appeal (zenchi) |
Free format text: JAPANESE INTERMEDIATE CODE: A911 Effective date: 20140603 |
|
A912 | Re-examination (zenchi) completed and case transferred to appeal board |
Free format text: JAPANESE INTERMEDIATE CODE: A912 Effective date: 20140620 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20150612 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20150715 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 5781272 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |