Method for identifying devices in a communication network and device for implementing said method
In a 1394 bus, during the bus reset procedure, nodes exchange some Self-id packets. The invention presents a method for a node to build the topology of the bus from the information contained in the Self-id packets. Once the node has collected all the Self-id packets, the node goes over nodes to separate parent nodes (with at least one child) and children nodes (with no child). Then by going over nodes from the smallest Phy-id to the root, one can attribute which node is connected to every port of a given node.
The present invention relates to the field of communication networks, especially of the home automation type and relates more particularly to a process for identifying apparatus of a home automation network after a bus reinitialization, as well as to an apparatus for implementing the process.
The IEEE 1394 bus defined in the document ‘IEEE Std 1394-1995 High Performance Bus, 1996-08-30’ describes a serial bus for digital transmission allowing the connection of apparatus also referred to as ‘nodes’. Certain nodes comprise a fixed identification number which is unique to them and which is termed the ‘EUI’. Furthermore, a second identifier or ‘physical address’ is associated with each apparatus during the bus initialization phases. This second identifier is referenced as the ‘Physical_ID’ in the above-mentioned document and may change for one and the same apparatus at the whim of the bus reinitializations, following for example the connection of a new node or the disconnection of an existing node.
An example of reinitialization and of a process for allocating physical addresses is given in appendix E, sections 3.1 to 3.3 of the IEEE document.
Now, following a reinitialization, a node does not know the physical addresses of the other nodes connected to the bus, but only some of the identifiers EUI of these nodes. So that a node can find another node whose identifier EUI it knows, a reading of each identifier EUI must be performed at the level of each apparatus until the sought-after identifier is obtained, assuming that the node has not been disconnected.
This method of recognizing nodes is slow and generates traffic.
A purpose of the invention is to remedy the drawbacks of the method advocated in the prior art.
BRIEF SUMMARY OF THE INVENTIONThe subject of the invention is a process for identifying nodes in a communication network, each node being provided with at least one port for connection to the network, characterized in that it comprises the steps of:
-
- allocating a first unique address to each node of the network according to a given process,
- allocating a second unique address to each node of the network after a reinitialization of the said network,
- following a reinitialization, establishing a correspondence table comprising the relation between the first and the second address of a node.
According to a particular embodiment, the process furthermore comprises the step of determining the set of nodes which are present in the network before reinitialization and not present in the network after reinitialization, and/or the step of determining the set of nodes which are present in the network after reinitialization, but not present in the network before reinitialization.
According to a particular embodiment, the said step of establishing the correspondence table comprises for each port of each node the steps of determining:
-
- the presence of a node connected to this port before and after reinitialization, and as appropriate, the writing of the pair of addresses before and after reinitialization into the said table,
- the presence of a node connected to this port before reinitialization and node absence after reinitialization,
- the presence of a node connected to this port after reinitialization and node absence before reinitialization.
According to a particular embodiment, the step of allocating the unique addresses comprises the step of sending over the network via each node of the network information giving its unique address in the network and for each of its ports the information item according to which a port is connected to a node termed the “father” node, to a node termed the “child” node or whether it is not connected.
According to a particular embodiment, the node intended to determine the correspondence table determines on the basis of the information received from the other nodes linked to the network during the step of allocating the unique addresses, the tree structure of the network before and after reinitialization.
The subject of the invention is also an apparatus intended to be linked to a communication network characterized in that it comprises:
-
- means for participating in obtaining a unique address of a node of this apparatus in the network following a reinitialization;
- means for determining and storing the topology of the network before and after a reinitialization of the network;
- means for establishing a correspondence table between the unique addresses of the nodes of the network before and after the said reinitialization on the basis of the topologies of the network.
Other characteristics and advantages of the present invention will emerge from the description of the illustrative embodiment which follows, taken by way of non-limiting example, with reference to the appended figures in which:
To simplify the description, the same references will be used in the figures to denote the elements fulfilling identical functions.
According to the present illustrative embodiment, a node possesses one or more bidirectional ports via which it can be connected to other nodes. Not all the ports of a node are necessarily used in a given configuration. The connections are such that they do not form any loop, thus constituting a tree structure. A node is the child of another node, the latter being referred to as the father, if it is connected directly to the latter and if it is more distant than its father from the root, the latter being a node chosen by any process whatsoever.
It should be noted that a physical apparatus can comprise several distinct nodes.
An illustrative process allowing this identification and the solving of any conflicts is described in section 3.7.3.1.2 and in appendix E, section 3.2 of the IEEE document.
Secondly, a unique physical address must be associated with each node connected to the bus. An autoidentification mechanism, an example of which is described in section 3.7.3.1.3 and in appendix E, section 3.3, is then implemented. This process allows each node to determine, for itself, its physical address, by accounting for data packets of a certain type (so-called ‘Self_ID’ packets) transmitted by the nodes over the bus. The autoidentification process can be summarized thus: the root node hands over to the node connected to its port having the smallest number and waits for this node, as well for all the ‘child’ nodes which are connected to it to be identified, before passing to the next port. When the root has reviewed all its ports, it is also identified. When a node takes over, it hands over in succession to its child nodes, in the order of its ports. When a node does not possess any children, it is identified by transmitting an appropriate packet over the bus.
For a node, identification consists in transmitting a data packet containing the physical address of the node, when it is its turn and when all its child nodes have been identified. The address of a node is equal to the last address transmitted in a packet over the bus, incremented by one unit. The first node conventionally has the address ‘0’.
The autoidentification packet also contains the category of each of the ports of the node which is identified. A packet may contain an item of information relating to four ports. If a node possesses more than four ports, then it must send several autoidentification packets.
In
Following the implementing of the two processes mentioned above, the following information is available:
This table lists the nodes 0, 1, 2, 3, 4 and 5 of the network 20 of
It is possible, for any entity connected to the network, to construct the topology of the network from the information contained in Table 1. With respect to the contents of this table, the missing information item which fully determines the topology is that which indicates which node is connected to the ‘child’ ports of the ‘parent’ nodes.
According to the present embodiment, this item of information is determined by virtue of the following topology determination process:
-
- 1. Partitioning of the nodes into two sets, the first termed the “set of parents” comprising the nodes which have at least one child and the other termed the “set of children” comprising the nodes which have no child.
- 2. The node having the smallest physical address in the “set of parents” is taken into consideration.
- 3. The nodes of the “set of children” having a physical address smaller than that of the node taken into consideration in point 2 are taken into consideration. Among them, only the N nodes having the largest addresses are taken into consideration, N being the number of ‘child’ ports of the node of point 2. The ‘child’ ports of the node of point 2 are associated in the order of their ascending numbers with the child nodes determined in the previous sentence, likewise taken in the order of their ascending physical addresses.
- 4. Elimination of the “set of parents” of the node taken into account in point 2, and transfer to the “set of children”. Elimination of the child nodes of this node from the “set of children”.
- 5. As long as the “set of parents” is not empty, repeat the steps in order starting from point 2.
This process is illustrated by the flowchart of
Table 2 indicates for the network of
Following a reinitialization of the bus, the three processes mentioned above are implemented. The topology of the bus, as defined in the two tables above and represented by
According to the invention, the table of correspondence of the physical addresses of the nodes before and after initialization is established.
The information known at this instant by the node implementing the process is as follows:
-
- the topology before and after reinitialization,
- the old and the new physical address of the node which will implement the process described below.
It should be observed that the shifting of a node gives rise to two reinitializations, one related to the disconnection of the node, the other to the connection for example to another location. It should also be observed that the connected or disconnected node may itself already be connected to other nodes belonging for example initially to another network. We then speak of connection or disconnection of a branch.
For each port, the following cases may arise:
-
- a node with address X was connected to the port before reinitialization, a node with address Y is connected after reinitialization: the new address of the node X is Y;
- the node with address X attached to the port before reinitialization has disappeared from the network, as have all the ‘child’ nodes of the node X;
- the node with address Y has been attached to the port since reinitialization. ‘Child’ nodes are, as appropriate, connected to the node Y.
The process for establishing the correspondence table checks each of these cases for each port of each node. This process is illustrated by the flowchart of
The procedure is called a first time by a node, the root according to the present illustrative embodiment. The procedure is recursive and calls itself until the desired table of correspondences is determined.
Moreover, two sets of nodes are considered, namely the set of added nodes, and the set of deleted nodes which will contain respectively the old addresses of the nodes disconnected with respect to the old topology and the new addresses of the newly detected nodes. Stated otherwise, these sets contain all the nodes having no corresponding counterpart in the ‘past’ or the ‘future’, with respect to the reinitialization.
The process of establishing the correspondence table is as follows:
-
- 1. If “Old” is different from NOADDRESS, go to step 6.
- 2. Take the first port of the node identified by the ‘New’ parameter.
- 3. If a ‘child’ node (with an address Z) is connected to this port, add the ‘New’ address to the set of added nodes and call ProcessNode (NOADDRESS, Z).
- 4. Repeat step 3 for all the ports of the node.
- 5. Go to step 13.
- 6. Put the relation between “Old” and “New” in the correspondence table.
- 7. Take the first port of the node considered.
- 8. If no ‘child’ node is connected to this port, neither in the old topology nor in the new topology, go to step 12.
- 9. If no ‘child’ node is connected to this port in the new topology, but a node was connected thereto in the old topology, add the old number of the ‘child’ node together with its children to the “eliminated node” set and go to step 12.
- 10. If no ‘child’ node was connected to this port in the old topology, add the new number (Z) of the child node to the set of added nodes and call ProcessNode (NOADDRESS, Z).
- 11. Otherwise (that is to say if a child node was and still is connected to the port), call ProcessNode (old number of the child node, new number of the child node).
- 12. Process the other ports of the node (from step 8).
- 13. End of processing.
Steps 1 to 5 correspond to the processing of a node which has newly appeared in the network (the old address has the value NOADDRESS). Steps 6 to 13 correspond to the processing of a node possessing an old and a new address. The ProcessNode procedure is never called when a node has disappeared from the network: this is a particular case processed at step 9 level.
A change of topology of the network of
Represented in
Node A is chosen as root node as regards the allocating of addresses.
Node F is deleted and node G is introduced, linked by its port number 0 to port number 0 of node D.
Represented in
Node C is chosen as root node as regards the allocating of addresses.
Within the framework of the example, it is assumed that the process for establishing the table of correspondences is implemented by node A. It is implemented by each apparatus of the network desiring to establish the correspondence table, given that the presence within the network of nodes which do not use the process does not disturb the running of the latter.
Table 3 below is a table translating the implementation of the process for establishing the table of correspondence for the numbers of the nodes giving the state of the nodes after reinitialization, their old and new addresses as well as the old addresses of the nodes eliminated from the network and the new addresses of the nodes added. The level of recursivity corresponds to the number of calls of the ProcessNode procedure by itself.
Node A knows that it was the node with address 5 before reinitialization and that it has become node 4 thereafter, starts the process by calling the ProcessNode procedure (5, 4):
Thus, after implementing the above process, the results of which are made explicit in Table 3, we know that:
-
- node F numbered 2 before reinitialization has been eliminated,
- node G numbered 2 after reinitialization has been added,
- a correspondence table indicating for each node other than F and G their number before and after reinitialization: for example, apparatus C was node 3 before reinitialization and has become node 5 thereafter.
Typically, the microprocessor takes on board the implementation of the autoidentification process, as well as of the processes for determining the topology of the network and for establishing the table of correspondences. The information regarding the topology before and after reinitialization, which is obtained according to the present example from the autoidentification packets, as well as the correspondence table are stored for example in the memory 17.
Claims
1-7. (canceled).
8. Method for a node in a network of interconnected nodes to build the network topology, the network being organized in a tree, where each node has at least one communication port, each port being connected to a parent node, a child node or being unconnected, each node possessing a physical identifier from zero to the number of nodes in the network minus one, the root of the tree having the highest physical identifier, the node possessing for each node of the network its physical identifier, and its connection ports with the information whether each port is connected to a parent node, a child node or is unconnected, comprising at least the following steps:
- separating the parent nodes consisting in nodes with at least one port connected to a child, from the child nodes consisting in nodes with no port connected to a child;
- processing each parent node from the node having the smallest physical identifier to the root and attributing the child nodes with the smallest physical identifier to ports of the considered node connected to a child;
- suppressing the attributed child nodes from the child nodes set; and
- adding a processed parent node to the child nodes set if it has a parent port.
9. Method according to claim 8 wherein the network is an IEEE 1394 bus.
10. Apparatus to be connected to a network of interconnected apparatus wherein each apparatus comprises at least one connection port, the network being organized in a tree, each port being connected to a parent apparatus, a child apparatus or being unconnected, each apparatus in the network having a physical identifier from zero to the number of apparatus in the network minus one, the root of the tree having the highest physical identifier, the apparatus possessing for each node of the network its physical identifier, and its connection ports with the information whether each port is connected to a parent node, a childe node or is unconnected, the apparatus comprising:
- means for separating the parent nodes consisting in nodes with at least one port connected to a child, from the child nodes consisting in nodes with no port connected to a child; and
- means for processing parent nodes from node having the smallest physical identifier to the root and for each parent node, attributing the child nodes with the smallest physical identifier to ports of the considered node connected to a child and adding the processed parent node to the child nodes set if it has a parent port while suppressing the attributed child nodes from the child nodes set.
11. Apparatus according to claim 10, wherein the network is an IEEE 1394 bus.
Type: Application
Filed: Oct 12, 2004
Publication Date: Mar 3, 2005
Inventors: Nicolas Burdin (Rennes), Helmut Buerklin (Rennes)
Application Number: 10/964,190