JP5781272B2 - Communication device, master-slave determination method, and computer program - Google Patents

Communication device, master-slave determination method, and computer program Download PDF

Info

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
Application number
JP2010019756A
Other languages
Japanese (ja)
Other versions
JP2011160164A (en
Inventor
正人 藤田
正人 藤田
智久 内本
智久 内本
裕亘 小田部
裕亘 小田部
輝美 尾形
輝美 尾形
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.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2010019756A priority Critical patent/JP5781272B2/en
Publication of JP2011160164A publication Critical patent/JP2011160164A/en
Application granted granted Critical
Publication of JP5781272B2 publication Critical patent/JP5781272B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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).

ラド・ジャパン株式会社ウェブサイト、”ASM−31”、URL「http://www.raddata.co.jp/Article/0,6583,39296-2-Wire_Multirate_Short_Range_Modem,00.html」、2010年1月24日検索Rad Japan Co., Ltd. website, “ASM-31”, URL “http://www.raddata.co.jp/Article/0,6583,39296-2-Wire_Multirate_Short_Range_Modem,00.html”, January 24, 2010 Day search

工場などの広い敷地において、モデムなどの通信機器を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.

広域ネットワークの全体的な構成の例を示す図である。It is a figure which shows the example of the whole structure of a wide area network. モデムのハードウェア構成の例を示す図である。It is a figure which shows the example of the hardware constitutions of a modem. モデムの機能的構成の例を示す図である。It is a figure which shows the example of a functional structure of a modem. ハンドシェーキングメッセージのやり取りの例を示す図である。It is a figure which shows the example of exchange of a handshaking message. リンクの確立の際のモデムの全体的な処理の流れの例を説明するフローチャートである。It is a flowchart explaining the example of the flow of the whole process of the modem at the time of link establishment. リンクの確立の際のモデムの全体的な処理の流れの例を説明するフローチャートである。It is a flowchart explaining the example of the flow of the whole process of the modem at the time of link establishment. ハンドシェーキングメッセージのやり取りの例を示す図である。It is a figure which shows the example of exchange of a handshaking message. ハンドシェーキングメッセージのやり取りの例を示す図である。It is a figure which shows the example of exchange of a handshaking message. ハンドシェーキングメッセージのやり取りの例を示す図である。It is a figure which shows the example of exchange of a handshaking message. ハンドシェーキングメッセージのやり取りの例を示す図である。It is a figure which shows the example of exchange of a handshaking message. モデムのプラットフォームの例を示す図である。It is a figure which shows the example of the platform of a modem. 接続用ソフトウェアによって実現される機能的構成の例を示す図である。It is a figure which shows the example of a functional structure implement | achieved by the software for a connection. マスタモード処理部の例を示す図である。It is a figure which shows the example of a master mode process part. スレーブモード処理部の例を示す図である。It is a figure which shows the example of a slave mode process part.

図1は広域ネットワーク30の全体的な構成の例を示す図、図2はモデム10のハードウェア構成の例を示す図、図3はモデム10の機能的構成の例を示す図、図4はハンドシェーキングメッセージのやり取りの例を示す図である。   1 is a diagram illustrating an example of the overall configuration of the wide area network 30, FIG. 2 is a diagram illustrating an example of a hardware configuration of the modem 10, FIG. 3 is a diagram illustrating an example of a functional configuration of the modem 10, and FIG. It is a figure which shows the example of exchange of a handshaking message.

広域ネットワーク30は、図1に示すように、複数のローカルエリアネットワーク40を有する。以下、各ローカルエリアネットワーク40をそれぞれ「ローカルエリアネットワーク40A」、「ローカルエリアネットワーク40B」、「ローカルエリアネットワーク40C」、…と区別して記載することがある。   As shown in FIG. 1, the wide area network 30 includes a plurality of local area networks 40. Hereinafter, each local area network 40 may be described separately as “local area network 40A”, “local area network 40B”, “local area network 40C”,.

ローカルエリアネットワーク40は、モデム10、ハブ11、および1台または複数台の端末装置12などを有する。   The local area network 40 includes a modem 10, a hub 11, and one or a plurality of terminal devices 12.

ハブ11は、そのハブ11が属するローカルエリアネットワーク40内のモデム10と各端末装置12との間の通信を中継する。   The hub 11 relays communication between the modem 10 in the local area network 40 to which the hub 11 belongs and each terminal device 12.

モデム10は、Symmetric Digital Subscriber Line(SDSL)またはSymmetric High-speed Digital Subscriber Line(SHDSL)などの通信方式によって他のモデム10と通信を行う。また、モデム10は、Local Area Network(LAN)または無線LANなどの通信方式によって端末装置12と通信を行う。   The modem 10 communicates with other modems 10 by a communication method such as Symmetric Digital Subscriber Line (SDSL) or Symmetric High-speed Digital Subscriber Line (SHDSL). The modem 10 communicates with the terminal device 12 by a communication method such as Local Area Network (LAN) or wireless LAN.

さらに具体的には、モデム10は、他のモデム10とメタル回線などの電話線によって繋がれている。さらに、モデム10は、LANケーブルなどによってハブ11と繋がれている。なお、モデム10にハブ11の機能が備えられている場合もある。   More specifically, the modem 10 is connected to another modem 10 by a telephone line such as a metal line. Further, the modem 10 is connected to the hub 11 by a LAN cable or the like. In some cases, the modem 10 is provided with the function of the hub 11.

そして、モデム10は、そのモデム10が属するローカルエリアネットワーク40内の端末装置12と、他のローカルエリアネットワーク40内の端末装置12との間でやり取りされるデータを、当該他のローカルエリアネットワーク40に属する他のモデム10などを介して中継する。   Then, the modem 10 transmits data exchanged between the terminal device 12 in the local area network 40 to which the modem 10 belongs and the terminal device 12 in the other local area network 40 to the other local area network 40. Relay via another modem 10 belonging to

端末装置12は、ワープロ、電子メール、Webブラウザ、またはIP電話などのアプリケーションを備えた装置である。端末装置12として、パーソナルコンピュータまたはワークステーションなどが用いられる。   The terminal device 12 is a device provided with an application such as a word processor, e-mail, Web browser, or IP phone. As the terminal device 12, a personal computer or a workstation is used.

モデム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 modem 10 includes a micro processing unit (MPU) 10p, a random access memory (RAM) 10q, a read only memory (ROM) 10r, a liquid crystal panel 10s, operation buttons 10t, a communication unit 10u, and the like. .

通信部10uは、LANケーブルを介して端末装置12から送られてきたデジタル信号をアナログ信号に変調し、電話線を介して他のモデム10へ送信する。また、電話線を介して他のモデム10から送られてきたアナログ信号をデジタル信号に復調し、LANケーブルを介して端末装置12へ送信する。   The communication unit 10u modulates the digital signal sent from the terminal device 12 via the LAN cable into an analog signal and transmits it to the other modem 10 via the telephone line. Further, the analog signal sent from the other modem 10 via the telephone line is demodulated into a digital signal and transmitted to the terminal device 12 via the LAN cable.

操作ボタン10tは、ユーザがモデム10に対して指令およびデータを入力するためのボタンである。   The operation button 10t is a button for the user to input commands and data to the modem 10.

液晶パネル10sは、モデム10の状態のほか、ユーザが入力した指令またはデータなどを表示する。   The liquid crystal panel 10s displays a command or data input by the user in addition to the state of the modem 10.

また、操作ボタン10tと液晶パネル10sは、同等の機能を有する端末装置をモデム10の外部に接続する形態であっても構わない。   Further, the operation button 10t and the liquid crystal panel 10s may be configured to connect a terminal device having an equivalent function to the outside of the modem 10.

ROM10rには、図3に示すようなマスタスレーブ決定部101、乱数発生部102、マスタモード切換処理部103、スレーブ側切換処理部104、マスタ側メッセージ交換処理部105、スレーブ側メッセージ交換処理部106、およびリンク確立処理部107などを実現するためのプログラムおよびデータが記憶されている。これらのプログラムおよびデータはMPU10pによって実行される。   The ROM 10r includes a master / slave determination unit 101, a random number generation unit 102, a master mode switching processing unit 103, a slave side switching processing unit 104, a master side message exchange processing unit 105, and a slave side message exchange processing unit 106 as shown in FIG. And programs and data for realizing the link establishment processing unit 107 and the like are stored. These programs and data are executed by the MPU 10p.

図3の各部によると、モデム10を他のモデム10に新たに接続する際の処理を従来よりも容易に行うことができる。   According to each part of FIG. 3, the process at the time of newly connecting the modem 10 to the other modem 10 can be performed more easily than before.

ところで、一般的に、2台のモデム10を接続する際は、いずれか一方がマスタの役割を果たし、もう一方がスレーブの役割を果たすことを運用保守者が計画、設定しなければならない。   By the way, in general, when two modems 10 are connected, an operation / maintenance person must plan and set that one of them plays the role of a master and the other plays the role of a slave.

接続つまりリンクの確立に際して、マスタとスレーブとの間でやり取りされるメッセージは、図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 modem 10 shown in FIG. 3 will be described in detail.

マスタスレーブ決定部101は、モデム10自身がマスタとして動作するのかスレーブとして動作するのかを決定する。以下、マスタとして動作するモードを「マスタモード」と記載し、スレーブとして動作するモードを「スレーブモード」と記載する。   The master / slave determination unit 101 determines whether the modem 10 itself operates as a master or a slave. Hereinafter, a mode operating as a master is referred to as “master mode”, and a mode operating as a slave is referred to as “slave mode”.

マスタスレーブ決定部101は、乱数発生部102と連携し、モデム10自身のモードをマスタモードおよびスレーブモードのいずれにするのかを、次のように決定する。   The master / slave determination unit 101 determines whether the mode of the modem 10 itself is set to the master mode or the slave mode in cooperation with the random number generation unit 102 as follows.

モデム10の電源がオンになると、マスタスレーブ決定部101は、マスタモードおよびスレーブモードのうちの予め決められた方を、モデム10自身のモードに決定する。または、乱数を発生させることによって、どちらのモードにするのかを決めてもよい。   When the power supply of the modem 10 is turned on, the master / slave determination unit 101 determines a predetermined one of the master mode and the slave mode as the mode of the modem 10 itself. Alternatively, it may be determined which mode is selected by generating a random number.

乱数発生部102は、マスタスレーブ決定部101によってモードが決定されるごとに、所定の範囲の乱数を発生させる。この乱数は、後述するようにモードを継続する秒数を表すのに用いられる。   The random number generation unit 102 generates a random number within a predetermined range every time the master / slave determination unit 101 determines a mode. This random number is used to represent the number of seconds in which the mode is continued as will be described later.

所定の範囲の下限値は、マスタとスレーブとがモードを確定する際にハンドシェーキングメッセージ(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 number generation unit 102 elapses, the master / slave determination unit 101 determines the mode to be different from the current mode.

さらに、マスタスレーブ決定部101がモードを決定し直した後も、乱数発生部102は乱数を発生させる。そして、マスタスレーブ決定部101は、その乱数分の時間(秒)が経過したら、モードを、現在とは別のモードに決定し直す。   Further, even after the master / slave determination unit 101 determines the mode again, the random number generation unit 102 generates a random number. Then, when the time (seconds) corresponding to the random number has elapsed, master / slave determination unit 101 determines the mode to be different from the current mode.

したがって、マスタスレーブ決定部101および乱数発生部102によると、モデム10のモードが、ランダムな時間間隔でマスタモード、スレーブモード、マスタモード、スレーブモード、…、と決定される。または、ランダムな時間間隔でスレーブモード、マスタモード、スレーブモード、マスタモード、…、と決定される。なお、決定の処理は、他のモデム10とのハンドシェーキングメッセージのやり取りが正常に完了したと判断できたら中止する。   Therefore, according to master slave determination unit 101 and random number generation unit 102, the mode of modem 10 is determined as a master mode, a slave mode, a master mode, a slave mode,... At random time intervals. Alternatively, the slave mode, the master mode, the slave mode, the master mode,... Are determined at random time intervals. The determination process is stopped when it is determined that the handshaking message exchange with the other modem 10 has been normally completed.

マスタモード切換処理部103は、マスタスレーブ決定部101によってモードがマスタモードに決定されまたは決定し直されたタイミングで、モデム10自身のモードをマスタモードに切り換える。   The master mode switching processing unit 103 switches the mode of the modem 10 itself to the master mode at the timing when the mode is determined or re-determined as the master mode by the master / slave determination unit 101.

スレーブ側切換処理部104は、マスタスレーブ決定部101によってモードがスレーブモードに決定されまたは決定し直されたタイミングで、モデム10自身のモードをスレーブモードに切り換える。   The slave side switching processing unit 104 switches the mode of the modem 10 itself to the slave mode at the timing when the mode is determined or re-determined as the slave mode by the master / slave determination unit 101.

マスタ側メッセージ交換処理部105は、モデム10のモードがマスタモード切換処理部103によってマスタモードに切り換えられたタイミングで、メッセージMG1をスレーブへ発信する。さらに、通信方式に従って、スレーブからメッセージを受信し特定のメッセージをスレーブへ発信するなど、スレーブとの間でメッセージ(ハンドシェーキングメッセージ)のやり取りを行う。なお、メッセージのやり取りについては、図4で説明した通りである。   Master-side message exchange processing unit 105 transmits message MG1 to the slave at the timing when the mode of modem 10 is switched to master mode by master mode switching processing unit 103. Further, according to the communication method, a message (handshaking message) is exchanged with the slave, such as receiving a message from the slave and transmitting a specific message to the slave. The message exchange is as described with reference to FIG.

スレーブ側メッセージ交換処理部106は、モデム10のモードがスレーブ側切換処理部104によってスレーブモードに切り換えられたタイミングで、マスタからメッセージMG1が送信されてくるのを待つ。そして、メッセージMG1を受信すると、通信方式に従って、図4で説明したように、マスタとの間でメッセージ(ハンドシェーキングメッセージ)のやり取りを行う。   The slave-side message exchange processing unit 106 waits for the message MG1 to be transmitted from the master at the timing when the mode of the modem 10 is switched to the slave mode by the slave-side switching processing unit 104. When message MG1 is received, a message (handshaking message) is exchanged with the master as described in FIG. 4 according to the communication method.

リンク確立処理部107は、接続相手である他のモデム10との間でのハンドシェーキングメッセージのやり取りが正常に完了したことで、モードが確定できたと判断し、当該他のモデム10とのリンクの確立を完了するための回線の設定などの処理を行う。   The link establishment processing unit 107 determines that the mode has been established by successfully completing the handshaking message exchange with the other modem 10 that is the connection partner, and establishes a link with the other modem 10. Perform processing such as setting the line to complete the establishment of the network.

図5および図6はリンクの確立の際のモデム10の全体的な処理の流れの例を説明するフローチャート、図7ないし図10はハンドシェーキングメッセージのやり取りの例を示す図である。   FIGS. 5 and 6 are flowcharts for explaining an example of the overall processing flow of the modem 10 at the time of establishing a link, and FIGS. 7 to 10 are diagrams showing an example of handshaking message exchange.

次に、図1に示すローカルエリアネットワーク40Aのモデム10がローカルエリアネットワーク40Bのモデム10と未だ接続されておらず、これから新たに接続する場合を例に、図3の各部の処理の手順を、図5および図6に示すフローチャートを参照しながら説明する。以下、ローカルエリアネットワーク40Aおよびローカルエリアネットワーク40Bそれぞれのモデム10を「モデム10A」および「モデム10B」と区別して記載する。   Next, with reference to an example in which the modem 10 of the local area network 40A shown in FIG. 1 is not yet connected to the modem 10 of the local area network 40B and will be newly connected, the processing procedure of each unit in FIG. This will be described with reference to the flowcharts shown in FIGS. Hereinafter, the modems 10 of the local area network 40A and the local area network 40B will be described separately from “modem 10A” and “modem 10B”.

ローカルエリアネットワーク40Aにいるユーザは、ローカルエリアネットワーク40Aとローカルエリアネットワーク40Bとの間に敷設されている電話線をモデム10Aに繋げる。さらに、モデム10Aの電源をオンにする。   A user in the local area network 40A connects a telephone line laid between the local area network 40A and the local area network 40B to the modem 10A. Further, the modem 10A is turned on.

すると、モデム10Aにおいて、マスタスレーブ決定部101は、モデム10Aのモードをマスタモードおよびスレーブモードのうちのいずれかに決定する(図5の#71)。マスタモードに決定された場合は(#72でYes)、乱数発生部102は、所定の範囲の乱数を発生させる(#73)。乱数の発生の処理と前後してまたは並行して、マスタスレーブ決定部101は、ハードウェアの設定値などをリセットし(#74)、マスタモード切換処理部103は、モデム10Aのモードをマスタモードに設定する(#75)。   Then, in the modem 10A, the master / slave determination unit 101 determines the mode of the modem 10A to be either the master mode or the slave mode (# 71 in FIG. 5). If the master mode is determined (Yes in # 72), the random number generator 102 generates a random number within a predetermined range (# 73). Before or after or in parallel with the random number generation process, the master / slave determination unit 101 resets the hardware setting values (# 74), and the master mode switching processing unit 103 sets the mode of the modem 10A to the master mode. (# 75).

マスタ側メッセージ交換処理部105は、マスタとして、モデム10Bを相手にハンドシェーキングメッセージのやり取りを行う(#77)。したがって、マスタ側メッセージ交換処理部105は、最初のメッセージであるメッセージMG1をモデム10Bへ発信する。   The master-side message exchange processing unit 105 exchanges a handshaking message with the modem 10B as a master (# 77). Therefore, master side message exchange processing unit 105 transmits message MG1, which is the first message, to modem 10B.

モデム10Bがスレーブとして動作している場合は、メッセージMG1がモデム10Bによって受信されるので、マスタ側メッセージ交換処理部105は、ハンドシェーキングメッセージのやり取りを開始することができる。しかし、そうでない場合は、開始することができない。   When the modem 10B is operating as a slave, the message MG1 is received by the modem 10B, so the master-side message exchange processing unit 105 can start exchanging handshaking messages. However, otherwise it cannot be started.

そこで、マスタ側メッセージ交換処理部105は、ステップ#73で発生した乱数に対応する時間だけ、ハンドシェーキングメッセージのやり取りを試行する。つまり、マスタ側メッセージ交換処理部105は、メッセージMG1を定期的に(例えば、0.1〜0.5秒ごとに)発信する。   Therefore, the master-side message exchange processing unit 105 tries to exchange handshaking messages for the time corresponding to the random number generated in step # 73. That is, the master-side message exchange processing unit 105 transmits the message MG1 periodically (for example, every 0.1 to 0.5 seconds).

そして、時間内にハンドシェーキングメッセージのやり取りが完了できた場合は(#78でYes)、リンク確立処理部107はモデム10Bがスレーブとして動作していると判断し、これによりモデム10Aのモードをマスタに確定する(#79)。そして、モデム10Aは、従来通り、回線などに関する種々の設定を行う(#80)。   When the handshaking message exchange is completed within the time (Yes in # 78), the link establishment processing unit 107 determines that the modem 10B is operating as a slave, thereby changing the mode of the modem 10A. The master is determined (# 79). Then, the modem 10A performs various settings relating to the line and the like as usual (# 80).

一方、時間内にハンドシェーキングメッセージのやり取りを完了できなかった場合は(#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 / slave determination unit 101 re-determines the mode of the modem 10A to the slave mode. Appropriately executes the processing shown in FIG. Also, when the power is turned on and the mode of the modem 10A is first determined to be the slave mode (No in # 72), each unit executes the processing shown in FIG.

乱数発生部102は、所定の範囲の乱数を発生させる(#81)。乱数の発生の処理と前後してまたは並行して、マスタスレーブ決定部101は、ハードウェアの設定値などをリセットし(#82)、スレーブ側切換処理部104は、モデム10Aのモードをスレーブモードに設定する(#83)。   The random number generator 102 generates random numbers within a predetermined range (# 81). Before or after or in parallel with the random number generation processing, the master / slave determination unit 101 resets the hardware setting values (# 82), and the slave side switching processing unit 104 sets the mode of the modem 10A to the slave mode. (# 83).

スレーブ側メッセージ交換処理部106は、スレーブとして、モデム10Bを相手にハンドシェーキングメッセージのやり取りを行う(#85)。したがって、スレーブ側メッセージ交換処理部106は、最初のメッセージであるメッセージMG1がモデム10Bから送信されてくるのを待つ。   The slave-side message exchange processing unit 106 exchanges a handshaking message with the modem 10B as a slave (# 85). Therefore, the slave-side message exchange processing unit 106 waits for the message MG1, which is the first message, to be transmitted from the modem 10B.

モデム10Bがマスタとして動作している場合は、メッセージMG1が送信されてくるので、スレーブ側メッセージ交換処理部106は、メッセージMG1を受信したらハンドシェーキングメッセージのやり取りを開始することができる。しかし、そうでない場合は、開始することができない。   When the modem 10B is operating as a master, the message MG1 is transmitted, so that the slave-side message exchange processing unit 106 can start exchanging handshaking messages when receiving the message MG1. However, otherwise it cannot be started.

そこで、スレーブ側メッセージ交換処理部106は、ステップ#81で発生した乱数に対応する時間だけ、ハンドシェーキングメッセージのやり取りを試行する。つまり、メッセージMG1をその時間だけ待ち続ける。   Therefore, the slave-side message exchange processing unit 106 tries to exchange the handshaking message for the time corresponding to the random number generated in step # 81. That is, the message MG1 is kept waiting for that time.

そして、時間内にハンドシェーキングメッセージのやり取りが完了できた場合は(#86でYes)、リンク確立処理部107はモデム10Bがマスタとして動作していると判断し、これによりモデム10Aのモードをスレーブに確定する(#87)。そして、モデム10Aは、従来通り、回線などに関する種々の設定を行う(#88)。   If the handshaking message exchange is completed within the time (Yes in # 86), the link establishment processing unit 107 determines that the modem 10B is operating as a master, and thereby changes the mode of the modem 10A. The slave is determined (# 87). Then, the modem 10A performs various settings relating to the line and the like as usual (# 88).

一方、時間内にハンドシェーキングメッセージのやり取りを完了できなかった場合(#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 / slave determination unit 101 re-determines the mode of the modem 10A as the master mode, Appropriately executes the processes of steps # 74 to # 80 shown in FIG.

ローカルエリアネットワーク40Bにいるユーザも同様に、ローカルエリアネットワーク40Aとローカルエリアネットワーク40Bとの間に敷設されている電話線をモデム10Bに繋げる。さらに、モデム10Bの電源をオンにする。   Similarly, the user in the local area network 40B connects the telephone line laid between the local area network 40A and the local area network 40B to the modem 10B. Further, the modem 10B is turned on.

すると、モデム10Bも、モデム10Aを相手に、図5および図6に示す各処理を適宜実行する。   Then, the modem 10B also appropriately executes each process shown in FIGS. 5 and 6 with the modem 10A as a counterpart.

これにより、モデム10Aおよびモデム10Bそれぞれのモードがランダムに変わる。したがって、図7または図8に示すように、一方のモデム10がマスタモードでありもう一方のモデム10がスレーブモードである時間帯が生じる。そして、この時間帯に、モデム10Aおよびモデム10Bはハンドシェーキングメッセージのやり取りを行い、モードを確定させることができる。   As a result, the modes of the modem 10A and the modem 10B change randomly. Therefore, as shown in FIG. 7 or FIG. 8, there is a time zone in which one modem 10 is in the master mode and the other modem 10 is in the slave mode. In this time zone, the modem 10A and the modem 10B can exchange handshaking messages to determine the mode.

なお、図9または図10に示すように、ハンドシェーキングメッセージのやり取りを行っている途中で一方のモデム10のモードの切換が行われると、ハンドシェーキングメッセージのやり取りを完了することができずモードを確定できない。しかし、このような場合も、モデム10Aおよびモデム10Bそれぞれのモードがランダムな時間間隔で変わる。よって、モデム10Aおよびモデム10Bは、ハンドシェーキングメッセージのやり取りの機会を再度得ることができ、モードの確定を図ることができる。   As shown in FIG. 9 or FIG. 10, if the mode of one modem 10 is switched during the handshaking message exchange, the handshaking message exchange cannot be completed. The mode cannot be determined. However, even in such a case, the modes of the modem 10A and the modem 10B change at random time intervals. Therefore, the modem 10A and the modem 10B can obtain the opportunity of exchanging handshaking messages again, and can determine the mode.

本実施例によると、ユーザは、2台のモデム10のマスタおよびスレーブの役割分担を、事前の計画を行うことなく従来よりも容易に行うことができる。   According to the present embodiment, the user can perform the role assignment of the master and slave of the two modems 10 more easily than in the past without making a prior plan.

〔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 modem 50, FIG. 12 is a diagram showing an example of a functional configuration realized by the connection software 563, FIG. 13 is a diagram showing an example of the master mode processing unit 504, and FIG. It is a figure which shows the example of the slave mode process part.

次に、モデム10としてSHDSL対応のモデム50を用いかつ既存のドライバなどを用いる場合の実施例を説明する。   Next, a description will be given of an embodiment in which an SHDSL compatible modem 50 is used as the modem 10 and an existing driver is used.

広域ネットワーク30の全体的な構成は、前に図1に示した通りである。モデム50のハードウェアの構成も、前に図2に示したモデム10のハードウェアの構成と基本的に同じである。つまり、図11に示すように、モデム50は、MPU50p、RAM50q、ROM50r、液晶パネル50s、操作ボタン50t、および通信部50uなどを有する。   The overall configuration of the wide area network 30 is as shown in FIG. The hardware configuration of the modem 50 is basically the same as the hardware configuration of the modem 10 shown in FIG. That is, as shown in FIG. 11, the modem 50 includes an MPU 50p, a RAM 50q, a ROM 50r, a liquid crystal panel 50s, operation buttons 50t, a communication unit 50u, and the like.

ただし、モデム50のROM50rには、図11に示すように、物理レイヤ制御用ファームウェア561、ドライバ562、および接続用ソフトウェア563が記憶されている。   However, the ROM 50r of the modem 50 stores physical layer control firmware 561, a driver 562, and connection software 563, as shown in FIG.

物理レイヤ制御用ファームウェア561は、SHDSLおよびイーサネット(登録商標)に従って通信が行われるように各ハードウェアを制御するためのプログラムである。さらに、物理レイヤ制御用ファームウェアには、Application Program Interface(API)が用意されている。   The physical layer control firmware 561 is a program for controlling each hardware so that communication is performed according to SHDSL and Ethernet (registered trademark). Furthermore, Application Program Interface (API) is prepared for the physical layer control firmware.

ドライバ562は、物理レイヤ制御用ファームウェア561に用意されているAPIの関数(機能)を適宜呼び出すなどしてモデム50のハードウェアを制御するプログラムである。   The driver 562 is a program for controlling the hardware of the modem 50 by appropriately calling an API function (function) prepared in the physical layer control firmware 561.

物理レイヤ制御用ファームウェア561およびドライバ562は、モデム50のベンダが予め用意したものである。機種によっては、物理レイヤ制御用ファームウェア561とドライバ562とが1組のソフトウェア(ファームウェア)として一体的に構成される場合もある。   The physical layer control firmware 561 and the driver 562 are prepared in advance by the vendor of the modem 50. Depending on the model, the physical layer control firmware 561 and the driver 562 may be integrally configured as a set of software (firmware).

ところで、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 layer control firmware 561 and the driver 562 are compliant with IEEE 802.3. The driver 562 includes a register defined by IEEE802.3.

接続用ソフトウェア563は、モデム50自身を他のモデム50に新たに接続する際の処理を従来よりも容易に行うためのソフトウェアである。つまり、図3に示した各部と基本的に同じ役割を果たす。   The connection software 563 is software for performing processing when a modem 50 itself is newly connected to another modem 50 more easily than in the past. That is, it basically plays the same role as each part shown in FIG.

しかし、図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 connection software 563 but also by the physical layer control firmware 561 and the driver 562.

接続用ソフトウェア563には、図12に示すようなマスタスレーブ決定部501、リセット指令部502、マスタスレーブ切換部503、マスタモード処理部504、およびスレーブモード処理部505などを実現するためのプログラムおよびデータが含まれている。これらのプログラムは、MPU50pによって実行される。   The connection software 563 includes a program for realizing a master / slave determination unit 501, a reset command unit 502, a master / slave switching unit 503, a master mode processing unit 504, and a slave mode processing unit 505 as shown in FIG. Contains data. These programs are executed by the MPU 50p.

次に、図12に示すモデム50の各部の処理内容などについて、説明する。なお、図3で説明した事項と共通する事項については、説明を省略する。   Next, processing contents of each unit of the modem 50 shown in FIG. 12 will be described. Note that a description of items common to those described in FIG. 3 is omitted.

マスタスレーブ決定部501は、図3のマスタスレーブ決定部101と同様に、モデム50自身のモードをマスタモードとするのかスレーブモードとするのかを決定する。   The master slave determination unit 501 determines whether the mode of the modem 50 itself is set to the master mode or the slave mode, similarly to the master slave determination unit 101 of FIG.

リセット指令部502は、マスタスレーブ決定部501によってモードの決定がなされるごとに、ハードウェアの設定値などをリセットする。リセットは、例えば、リセット用のコマンドまたはAPI関数をドライバ562または物理レイヤ制御用ファームウェア561に対して指定することによって、行えばよい。   The reset command unit 502 resets hardware setting values and the like every time the master / slave determination unit 501 determines a mode. The reset may be performed, for example, by designating a reset command or API function to the driver 562 or the physical layer control firmware 561.

マスタスレーブ切換部503は、マスタスレーブ決定部501がモードをマスタモードに決定した場合は、マスタモード処理部504を有効にして、スレーブモード処理部505を無効にする。一方、マスタスレーブ決定部501がモードをスレーブモードに決定した場合は、マスタスレーブ切換部503は、スレーブモード処理部505を有効にして、マスタモード処理部504を無効にする。   When the master slave determination unit 501 determines the mode to be the master mode, the master slave switching unit 503 enables the master mode processing unit 504 and disables the slave mode processing unit 505. On the other hand, when the master / slave determination unit 501 determines the mode to be the slave mode, the master / slave switching unit 503 enables the slave mode processing unit 505 and disables the master mode processing unit 504.

マスタモード処理部504は、図13に示すように、マスタモード設定指令部571、モード確定処理開始指令部572、乱数発生部573、モード確定チェック部574、および回線設定指令部575などを有する。このような構成により、マスタモード処理部504は、マスタとして他のモデム50と接続するための処理を行う。この処理は、マスタスレーブ切換部503によってマスタモード処理部504が有効に切り換えられたタイミングで開始される。   As shown in FIG. 13, the master mode processing unit 504 includes a master mode setting command unit 571, a mode determination processing start command unit 572, a random number generation unit 573, a mode determination check unit 574, a line setting command unit 575, and the like. With such a configuration, the master mode processing unit 504 performs processing for connecting to another modem 50 as a master. This process is started at the timing when the master mode processing unit 504 is effectively switched by the master / slave switching unit 503.

マスタモード設定指令部571は、モデム50自身のモードをマスタモードに設定する処理を、ドライバ562または物理レイヤ制御用ファームウェア561に行わせる。この際に、マスタモード設定指令部571は、マスタモードへの切換用のコマンドまたはAPI関数をドライバ562または物理レイヤ制御用ファームウェア561に対して指定すればよい。すると、ドライバ562または物理レイヤ制御用ファームウェア561は、モードをマスタモードに設定する。後述するスレーブモード設定指令部581(図14参照)によるスレーブモードの設定の場合も、同様である。   The master mode setting command unit 571 causes the driver 562 or the physical layer control firmware 561 to perform processing for setting the mode of the modem 50 itself to the master mode. At this time, the master mode setting command unit 571 may specify a command or API function for switching to the master mode to the driver 562 or the physical layer control firmware 561. Then, the driver 562 or the physical layer control firmware 561 sets the mode to the master mode. The same applies to the setting of the slave mode by a slave mode setting command unit 581 (see FIG. 14) described later.

モード確定処理開始指令部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 start command unit 572 instructs the driver 562 to start exchanging handshaking messages as a master after the setting to the master mode is completed. The command is “Regulation 6.16 of IEEE802.3”, that is, “Get (BitVal = 10)” in “Discovery Operation (Bit [1: 0])” of the register “45.2.6.6 10P / 2B aggregation discovery control register (Register 6.16)”. ”Is set. Then, the communication unit 50u and the like are controlled by the driver 562 and the physical layer control firmware 561, and the first message, that is, the message MG1 is transmitted to the other party.

乱数発生部573は、マスタモードに設定されるごとに、所定の範囲の乱数を発生させる。   The random number generator 573 generates a random number within a predetermined range every time the master mode is set.

モード確定チェック部574は、マスタモードに設定されてから乱数発生部573が発生させた乱数分の時間(秒)が経過するまでの間、他のモデム50とのリンクが確立されたか否かを、次のようにチェックする。   The mode confirmation checking unit 574 determines whether or not a link with another modem 50 has been established until the time (seconds) of the random number generated by the random number generation unit 573 has elapsed since the master mode was set. Check as follows.

モード確定チェック部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 confirmation check unit 574 reads out the value of “Remote PAF supported Bit [11]” of the register of IEEE802.3 Reg3.60, that is, “45.2.3.17 10P / 2B capability register (register 3.60)”. Then, the mode confirmation checking unit 574 determines that the exchange of the handshaking message has been normally completed because the read value has changed to “link partner supports PAF (BitVal = 1)”, and determines that the mode has been confirmed. To do. Otherwise, it is determined that the mode has not been determined.

ここで、自身と他のモデム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 other modem 50. (PAF: Abbreviation for PME Aggregation Function, which is a function commonly implemented in SHDSL chips.)
When the mode determination check unit 574 determines (detects) that the mode has been determined, the line setting command unit 575 performs line setting with the mode of the modem 50 itself as the master mode. For example, by specifying a command for setting a line or an API function to the driver 562 or the physical layer control firmware 561, various settings relating to the line etc. for the modem 50 to operate as a master can be set. Just do it.

図12に戻って、スレーブモード処理部505は、図14に示すように、スレーブモード設定指令部581、乱数発生部582、モード確定チェック部583、および回線設定指令部584などを有する。このような構成により、スレーブモード処理部505は、スレーブとして他のモデム50と接続するための処理を行う。この処理は、マスタスレーブ切換部503によってスレーブモード処理部505が有効に切り換えられたタイミングで開始される。   Returning to FIG. 12, the slave mode processing unit 505 includes a slave mode setting command unit 581, a random number generation unit 582, a mode confirmation check unit 583, a line setting command unit 584, and the like as shown in FIG. 14. With such a configuration, the slave mode processing unit 505 performs processing for connecting to another modem 50 as a slave. This process is started at the timing when the slave mode processing unit 505 is effectively switched by the master / slave switching unit 503.

スレーブモード設定指令部581は、モデム50自身のモードをスレーブモードに設定する処理をドライバ562または物理レイヤ制御用ファームウェア561に行わせる。   The slave mode setting command unit 581 causes the driver 562 or the physical layer control firmware 561 to perform processing for setting the mode of the modem 50 itself to the slave mode.

乱数発生部582は、スレーブモードに設定されるごとに、所定の範囲の乱数を発生させる。   The random number generator 582 generates a random number within a predetermined range every time the slave mode is set.

モード確定チェック部583は、スレーブモードに設定されてから乱数発生部573が発生させた乱数分の時間(秒)が経過するまでの間、他のモデム50とのリンクが確立されたか否かをチェックする。チェックの方法は、前に説明したモード確定チェック部574によるチェックの方法と、同様である。つまり、モード確定チェック部583は、IEEE802.3のReg3.60の「Remote PAF supported Bit[11]」の値が「link partner supports PAF(BitVal=1)」に変化したことでハンドシェーキングメッセージのやり取りが正常に完了したと判断し、モードが確定されたと判定する。そうでなければ、モードが確定されていないと判定する。   The mode confirmation check unit 583 determines whether or not a link with another modem 50 has been established until the time (seconds) of the random number generated by the random number generation unit 573 has elapsed since the slave mode was set. To check. The checking method is the same as the checking method by the mode confirmation checking unit 574 described above. In other words, the mode confirmation checking unit 583 changes the value of “Remote PAF supported Bit [11]” in Reg3.60 of IEEE 802.3 to “link partner supports PAF (BitVal = 1)”. It is determined that the exchange has been completed normally, and it is determined that the mode has been determined. Otherwise, it is determined that the mode has not been determined.

回線設定指令部584は、モードが確定されたとモード確定チェック部583によって判定(検知)されたら、モデム50自身のモードをスレーブモードとして回線設定を行う。その設定は、例えば、回線設定指令部575と同様、回線設定用のコマンドまたはAPI関数をドライバ562または物理レイヤ制御用ファームウェア561に対して指定することによって、モデム50自身がスレーブとして動作するための、回線などに関する種々の設定を行えばよい。   When the mode determination check unit 583 determines (detects) that the mode has been determined, the line setting command unit 584 performs line setting with the mode of the modem 50 itself as the slave mode. For example, as in the case of the line setting command unit 575, the setting is made so that the modem 50 itself operates as a slave by specifying a line setting command or API function to the driver 562 or the physical layer control firmware 561. Various settings relating to the line and the like may be made.

図12に戻って、マスタスレーブ決定部501は、乱数発生部573または乱数発生部582が発生させた乱数に対応する時間が経過してもモード確定チェック部574またはモード確定チェック部583がモード確定を検知しなかった場合に、モデム50自身のモードを、現在のモードとは反対のモードに決定し直す。   Returning to FIG. 12, the master / slave determination unit 501 determines that the mode determination check unit 574 or the mode determination check unit 583 determines the mode even when the time corresponding to the random number generated by the random number generation unit 573 or the random number generation unit 582 has elapsed. Is not detected, the mode of the modem 50 itself is determined again as a mode opposite to the current mode.

このような構成により、モデム50のモードは、所定の範囲のランダムな時間間隔でマスタモード、スレーブモード、マスタモード、スレーブモード、…、と決定される。または、同様の時間間隔でスレーブモード、マスタモード、スレーブモード、マスタモード、…、と決定される。そして、他のモデム50とのハンドシェーキングメッセージのやり取りが正常に完了したら、モードが確定したこととなり決定の処理が中止される。   With such a configuration, the mode of the modem 50 is determined as a master mode, a slave mode, a master mode, a slave mode,... At random time intervals within a predetermined range. Alternatively, the slave mode, the master mode, the slave mode, the master mode,... Are determined at similar time intervals. When the handshaking message exchange with the other modem 50 is normally completed, the mode is determined and the determination process is stopped.

モデム50の全体的な処理の流れは、基本的に、前に図5および図6に示すフローチャートで説明した通りである。以下、モデム50において既存のドライバなどを用いた場合の各ステップの処理について、説明する。   The overall processing flow of the modem 50 is basically as described above with reference to the flowcharts shown in FIGS. Hereinafter, processing of each step when an existing driver or the like is used in the modem 50 will be described.

ローカルエリアネットワーク40Aにはモデム50としてモデム50Aが備えられている。一方、ローカルエリアネットワーク40Bにはモデム50としてモデム50Bが備えられている。モデム50Aとモデム50Bとは未だ繋がれておらず、これから接続が試みられる。   The local area network 40A includes a modem 50A as the modem 50. On the other hand, the local area network 40B is provided with a modem 50B as the modem 50. The modem 50A and the modem 50B are not yet connected, and a connection is attempted from now on.

ローカルエリアネットワーク40Aにいるユーザは、ローカルエリアネットワーク40Aとローカルエリアネットワーク40Bとの間に敷設されている電話線をモデム50Aに繋げる。さらに、モデム50Aの電源をオンにする。   A user in the local area network 40A connects a telephone line laid between the local area network 40A and the local area network 40B to the modem 50A. Further, the modem 50A is turned on.

すると、モデム50Aは、モデム10Aと同様の処理を実行する。つまり、モデム50Aにおいて、マスタスレーブ決定部501、リセット指令部502、およびマスタスレーブ切換部503は、ランダムな時間間隔でモデム50Aのモードをマスタモードおよびスレーブモードのいずれかに繰り返し切り換える(図5の#71〜#75、図6の#81〜#83)。   Then, the modem 50A executes the same process as the modem 10A. That is, in the modem 50A, the master / slave determination unit 501, the reset command unit 502, and the master / slave switching unit 503 repeatedly switch the mode of the modem 50A to either the master mode or the slave mode at random time intervals (FIG. 5). # 71 to # 75, # 81 to # 83 in FIG.

マスタモード処理部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 mode processing unit 504 attempts to determine the mode with the modem 50B as a master (# 77). At this time, the master mode processing unit 504 sets “Get (BitVal = 10)” in “Discovery Operation (Bit [1: 0])” of Reg 6.16. As a result, the communication unit 50u is controlled by the physical layer control firmware 561 and the driver 562, and the message MG1 is transmitted to the modem 50B. When the message MG1 is not received by the modem 50B, the message MG1 is periodically transmitted from the modem 50A to the modem 50B until the mode is switched to the slave mode.

そして、スレーブモードに切り換わるまでに、メッセージ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 mode processing unit 505 attempts to determine the mode with the modem 50B as a slave (# 85). At this time, it waits for the message MG1 to be transmitted from the modem 50B.

そして、マスタモードに切り換わるまでに、メッセージ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 modems 10 by using a register prepared in advance and defined by IEEE 802.3.

上述の各実施例では、マスタモードを継続する時間およびスレーブモードを継続する時間を、モードの決定または再決定の際に決定したが、それ以外の決定方法を用いてもよい。例えば、モデム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 modems 10 and 50 each receive a random number every time a predetermined time (for example, 1 second) elapses after the time required for completing all handshaking message exchanges has elapsed. Is generated. If the generated random number is a predetermined value, the mode is determined again. Otherwise, continue mode.

その他、広域ネットワーク30、ローカルエリアネットワーク40、モデム10、50の全体または各部の構成、処理内容、処理順序などは、本発明の趣旨に沿って適宜変更することができる。   In addition, the configuration of the entire wide area network 30, the local area network 40, and the modems 10 and 50, the components, the processing contents, the processing order, and the like can be appropriately changed in accordance with the spirit of the present invention.

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.
第1のレジスタに第1の値が設定されたときにハンドシェーキングメッセージのやり取りを開始し、ハンドシェーキングが確立したときに第2のレジスタに第2の値を設定する2台の通信機器のリンクを確立する際に当該2台の通信機器をマスタとスレーブとに確定するマスタスレーブ確定方法であって、
前記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の値を設定する通信制御手段を有した通信機器において実行されるコンピュータプログラムであって、
前記通信機器が有するコンピュータに、
前記通信機器をマスタとして他の通信機器と通信させるマスタモードを前記通信制御手段に対して設定するマスタモード設定指令処理と、
前記マスタモードを前記通信制御手段に対して設定するときに、前記第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 .
JP2010019756A 2010-01-29 2010-01-29 Communication device, master-slave determination method, and computer program Active JP5781272B2 (en)

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)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
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

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