A METHOD AND APPARATUS FOR ROUTING MESSAGES IN A NETWORK OF NODES

Abstract: A system that includes a multihop broadcast network of nodes that may have a minimum of hardware resources, such as memory and processing power. The network is configured by gathering information concerning which nodes can communicate with each other using flooding with hop counts and parent routing protocols. A partitioned spanning tree is created and node identifiers are assigned so that the identifier of a child node includes as its most significant bits the identifier of its parent. This allows the identifier of the node to be used to determine if the node is to process or resend the packet so that the node can make complete packet routing decisions using only its own identifier.

Description: A METHOD AND APPARATUS FOR ROUTING MESSAGES IN A NETWORK OF NODES BACKGROUND OF THE INVENTION Field of the Invention The present invention is directed to a method of configuring a network, comprising: determining which nodes of the network can communicate with each other; and assigning identifiers to the nodes. The invention further relates to a method of routing a message within a network of nodes, wherein the nodes are identified by unique node identifiers. The invention also relates to a communications network, comprising a plurality of nodes, wherein the nodes are identified by unique node identifiers; and to nodes for use in such a network. The invention further relates to a communication network node, comprising a memory storing a logical identifier of the node; and a processor determining whether the node is in a message path to a destination node. The invention also relates to a network control node for a communication network, comprising a memory storing a network configuration; and a processor. Description of the Related Art Today's typical networks, particularly those used for real time control of modem buildings, include wire connected nodes that are installed when the building is built. In these systems the networks are used to control lighting heating/cooling, elevators, etc. The nodes of the network are typically microcomputers with substantial amounts of memory and other resources. Because these systems are wired and have relatively powerful nodes, they are expensive and generally only justified in the largest of buildings. In addition, they are generally not suitable for retrofitting older buildings that can be the most suitable subjects for power usage control systems in particular. What is needed is a network of very low cost nodes, that is, nodes that have minimal resources or resource starved nodes, that are wirelessly connected together and thus suitable for small to medium size buildings and for retrofitting older buildings. In typical network based control systems the nodes of a data communication network exchange units of information amongst themselves. These units are commonly referred to as packets, frames or cells. In a multi-hop network, a node does not have a direct communication link with every other node of the network, and a packet may need to be forwarded by intermediate nodes that lie in a communication path from the source node to the destination node. Depending upon the type of network and its features, this function of routing of packets may involve one of the following at the intermediate nodes: 1) the selection of one of many links leaving the intermediate node (e.g., in a point-to-point multi-hop network like the Internet), or 2) a decision about whether or not to forward (retransmit) a received packet (e.g., in a wireless multi-hop broadcast network where all nodes share a common channel). Most of the popular routing techniques used in data communication networks utilize routing tables or decision tables to make routing decisions in an operation in which an address of a message is used to access the table to make a routing decision or selection. A routing table in an intermediate node typically indicates the best outgoing link or shortest path to the destination node where the packet is destined. Decision tables help in deciding whether or not to further forward a received packet. However, such tables take up space in a node's memory. For example, in a network of 256 nodes, about the size for a typical medium size building, if each node were to store a simple routing table, it would need at least 512 bytes to indicate to which node to forward a packet. A decision table in such a 256 node network may take 288 bytes, 256 bytes for the addresses of nodes, and 32 bytes to indicate using bits whether or not to forward a packet destined for each node in the table. In a network of resource-starved nodes of the low memory type, there is not enough memory available to store such tables. Memory, in such nodes, is shared between data communication functions and system or application specific functions. Thus, different routing techniques need to be devised. These routing methods not only should use very little RAM, but should also be efficient in transporting packets from source to destination with acceptable delays. What is needed is a network of nodes that have minimal resources, particularly memory and a routing protocol that will operate with such nodes. SUMMARY OF THE INVENTION It is an object of the present invention to provide a system that connects a network of low cost, minimal resource nodes wirelessly. It is also an object of the present invention to provide a system that connects nodes using broadcast communication techniques. It is an additional object of the present invention to provide a network that does not require that routing tables be stored in the nodes. It is another object of the present invention to provide a routing protocol that is suitable for networks of resource starved nodes. It is also an object of the present invention to provide a system that configures a network of nodes. It is a further object of the present invention to provide a system that allows small to medium size buildings to be equipped and allows older buildings to be retrofitted with low cost networks. The method of configuring a network is characterised in that the method comprises forming a spanning tree of the nodes that can communicate with each other; and in that the assigning identifiers to the nodes is based on the spanning tree. The method of routing a message is characterised in that the nodes form a spanning tree of nodes that can communicate with each other; in that an unique part of an identifier of a child node includes a unique part of an identifier of a parent node of the child node; and in that the method comprises transmitting a message to another node when a message address includes the unique part of a current node identifier. The communications network is characterised in that the nodes form a spanning tree of nodes that can communicate with each other; and in that an unique part of an identifier of a child node includes a unique part of an identifier of a parent node of the child node. The communication network node is characterised in that the processor is conceived to perform said determining by comparing a message address of the message only with the logical identifier of the node. the network control node is characterised in that the processor is conceived to determining partitioned spanning tree identifiers of nodes of the network, storing the identifiers in the network configuration and sending messages to the nodes using the network configuration. Preferably, the system includes a multihop, wireless broadcast network of nodes that may have a minimum of hardware resources, such as memory and processing power. The network is configured using a partitioned spanning tree and node addresses are assigned so that the address of an intermediate node can be compared to the destination address of a packet to make complete packet routing decisions. These, together with other objects and advantages which will be subsequently apparent, reside in the details of construction and operation as more fully hereinafter described and claimed, reference being had to the accompanying drawings forming a part hereof, wherein like numerals refer to like parts throughout. BRIEF DESCRIPΗON OF THE DRAWINGS Figure 1 depicts nodes of a network according to the present invention; Figure 2 depicts a network of wireless multihop nodes; Figure 3 is a flowchart of the process performed by a network control node; Figures 4, 5, 6, 10, 11, 13, 19, 20 and 22-25 depict message packets; Figure 7 is a flowchart of a flooding with hop counts process; Figure 8 is a flowchart of a parent routing process; Figure 9 depicts an initialization process of the network control node; Figure 12 depicts an initialization process of a network node; Figure 14 is a flowchart of a graph creation process performed by the network control node; Figure 15(a) depicts a network of nodes; Figure 15(b) depicts a data structure representing the network of figure 15(a); Figure 16 depicts a spanning tree of the network of figure 2; Figure 17 illustrates the addresses assigned to the nodes of the network of figure 17 in accordance with the present invention; Figure 18 depicts a monitor and control process of the network control node; and Figure 21 is a flowchart of the process performed by the network nodes after network initialization. DESCRIPTION OF THE PREFERRED EMBODIMENTS The present invention is directed to a network of low cost nodes suitable for performing simple functions, such as the control of the light level in a single room, and where each node can be incorporated into the device being controlled, such as a light switch. The nodes of such a network are "resource starved". A node is said to be resource starved if it has insufficient memory to store routing information like routing tables, and it has insufficient processing power to compute a "best route" for an outgoing packet or message based on information like shortest path, network congestion, link control, etc. The preferred embodiment includes network nodes 10, such as illustrated in figure 1, that each include a low cost, four or eight bit microcontroller processing unit (MCU) 12, such as the Motorola 68HC11 microcontroller, that includes a very limited amount of on chip RAM 14 (on the order of 32 bytes), PROM 18, preferably of the EEPROM type, for holding programmable but nonvolatile information such as the node address (that is , about 4 bytes), and ROM 18 (about 1 or 2K bytes) holding the control and network routing programs or software. Each node 10 also includes a conventional wireless transmitter/receiver 20 that allows communication with other nodes of the system. The transmitter/receiver 20 is a low power device that typically transmits only a few dozen feet, such as the distance of one the size of one to three or so rooms of a building. Because the nodes have minimal resources, such as RAM memory, the nodes cannot hold sophisticated routing programs that depend on routing or decision tables. To manage the network and determine network configuration an intelligent and relatively powerful node called a network control node (NCN) 30 is provided. The NCN 30 may include the same version of the MPU 32, RAM 34, PROM 36, ROM 38 and transmitter/receiver 40 as the nodes 10 and also includes a conventional serial port 42 connected to a conventional computer 44, such as a PC or workstation, that includes the conventional disk storage and I/O devices suitable for performing network and system control, such as building lighting control. The NCN 30 is responsible for implementing a PArtitioned Spanning Tree (PAST) routing protocol. The partitioned spanning tree routing protocol of the present invention is applicable to almost any type of multi-hop network and uses no routing or decision tables. It is, however, best suited for networks of resource-starved nodes (with little processing power and memory) and relies on the availability of a network control node that has enough processing power and memory to assign addresses to the other nodes and to initialize the network at startup. For a better understanding of the protocol, we will consider a network, as illustrated in figure 2, where end-to-end communication takes place between the NCN 60 and the resource-starved nodes 62-76, and back, but not between two resource-starved nodes, such as 70 and 72, other than for the exchange of packets for relaying them on towards a destination node. To describe the operation of the protocol, we consider the case of a broadcast-channel network where each node is within direct wireless communication range of a few other nodes of the network, for example, node 68 is in range of nodes 62, 64, 66, 70 and 72 but no other nodes. Thus, there exist overlapping neighborhoods (the neighborhood of node 66 overlaps that of node 68), each centered around a transmitter, within which may lie some neighbor nodes of the transmitter. All nodes in the network use a common broadcast channel. Collisions are avoided using a conventional CSMA (carrier sense multiple access) protocol by requiring each transmitter to monitor the channel and transmit only if there is no traffic. A node that lies in the intersection of the neighborhoods of two nodes that are out of hearing range from each other may receive invalid data if the two neighbor nodes transmit simultaneously thinking that the channel is free. An implicit hop-by-hop (IHBH) acknowledgment scheme is used to recover from such collisions. This IHBH acknowledgment scheme is discussed later. Packets travelling from a resource-starved node, such as 74, to the NCN 60 will be said to be travelling upstream and those travelling from the NCN 60 to a resource-starved node will be said to be travelling downstream. Each resource-starved node may be manufactured with a unique identifier, called its physical ID or the ID may be assigned to a node manually during installation. When the nodes 62-76 are first turned on they start up in an initialization phase in which they await a communication from the NCN 60. The network control node (NCN) 60, which has large processing power and memory capacity, first, in the initialization phase 90 (see figure 3), based on information input by the user as to the number of nodes in the network, gathers information from the resource-starved nodes 62-64 to form a complete and accurate representation of the network in the form of a graph, such as that of figure 2. The information needed is an indication of which nodes can hear each other, that is, a list of what nodes are in broadcast range of what other nodes. The information is obtained by broadcasting initialization messages using a flooding with hop counts protocol (to be discussed later) to all the nodes of the network. This broadcast proceeds level by level such that nodes in the middle levels of the network broadcast to those further down. This allows each node to record the node that is its parent node, that is, the node from which it received the first initialization broadcast. The nodes respond with the needed information via a response message returned using a parent routing protocol (to be discussed later). The response messages also indicate what other nodes besides the parent the node can hear. Each arc of the graph represents a direct link between the two nodes that it connects. The graph is then partitioned into a spanning tree. The nodes are then assigned logical (partitioned spanning tree - PAST) addresses in such a way that the path that a packet is to take is uniquely identified by the address of the destination-node or sending-node, for packets travelling downstream or upstream, respectively, from the NCN 60. In this addressing scheme an intermediate node, such as node 64, that receives a packet simply examines the address of the destination node (for packets travelling downstream), or the address of the node sending the packet (for packets travelling upstream) by comparing it to the address of that intermediate node. From the address comparison alone, the intermediate node is able to tell if the intermediate node lies in the path that the packet is to take. If the intermediate node is in the path, it forwards the packet; otherwise the packet is discarded. Once the addresses are assigned the NCN 60 enters a monitoring and control phase 92 in which messages concerning events and commands are passed through the network using the PAST routing protocol. The details of the phases of the NCN 60 operation will be discussed in more detail later. However, before discussing the details of the initialization phase it is helpful to understand two routing protocols utilized during the initialization phase: 1) flooding with hop counts (FHC) and 2) parent routing (PA). These two protocols will be discussed below with respect to figures 7 and 8. But first the structure of each packet transmitted in the network using the protocols will be explained. The structure of the packets used in the discussions below is given in figure 4. Each packet 100 contains a "Flag" byte 102 at a fixed location. This byte 102 has the following bit-fields (with the least significant bit on the right): Bits 0 and 1 - reserved for future use; Bit 2 - packet priority: 1 indicates "urgent" and 0 indicates a "non-urgent" packet; Bits 3 and 4 - addressing: 11 indicates that the packet is a "broadcast" packet, i.e., the packet is to be processed by every node in the network; 10 indicates that the packet is a "multi-cast" packet, i.e., multiple nodes in the network, identified by a group address, are to receive and process the packet; 01 indicates that the packet is a "unicast" packet and is destined for only one node; Bits 5 and 6 - routing type: 11 indicates that the packet is to be routed using the parent routing scheme; 10 indicates that the packet is to be routed using the FHC routing protocol; and 01 indicates that the PAST protocol is to be used; and Bit 7 - direction of travel: 0 indicates that the packet is travelling upstream to the NCN; 1 indicates that the packet is moving away from the NCN. A unique packet ID is provided in the second byte 104. The next field 106 of the packet 100 is a variable length field that includes the logical address of the destination (or source) node. The fourth field 108 includes a one byte command. The next field 110 is a variable length data field. The last field 112 of the packet 100 is a checksum field used for error checking. The initialization phase uses two versions of the packet 100 of figure 4 which are shown in figures 5 and 6. The initialization or INIT packet 120 of figure 5 is only used during the FHC downstream routing initialization process (see figure 7). The network control node (NCN) 60 broadcasts packet 120 of figure 5 to all nodes that are within direct communicating range of the NCN 60. The flooding with hop counts (FHC) routing scheme is used to broadcast (the Addressing bits in the Flag byte are set to 11) the packet 120. Each packet 120 contains the physical ID 104 of the sending node. In the data field 110 the hop counter 122 for FHC is set to one, so that only immediate neighbors of the sending node process the packet, but do not forward the packet further onwards (as described in more detail with respect to figure 7). The address 124 of the node sending the packet is included in the data field 110. The packet 120 also contains the number of hops 126 that the sender of the INIT packet is away from the NCN. In the example of figures 5 and 6, the INIT packet 120 is sent from a node whose ID is ec3f(hex), and is received by a node whose ID is 6bfl(hex). The address field 106 in a packet is always set to ffff(hex) as the hop count field 122 ensures that the INIT packet 120 does not propagate beyond one hop away. The response or RESPONSE INIT packet 130 of figure 6 is only used in the upstream parent routing process (see figure 8). The packet 130 has the address field 106 set to the address of the NCN 60 (0000 hex). Within the data field 110 a field 132, called the parents address for routing field, is included, the contents of which gets replaced by the ID of the parent node of every intermediate node that receives that packet 130 and forwards (broadcasts) it. The second field 134 includes the parent node address for the network graph that will be built by the NCN 60. The address of the initial node sending the RESPONSE INIT packet 130 is stored in the next field 136 and the distance in hop count of the initial node from the NCN is stored in the next field 140. The flooding with hop counts (FHC) routing scheme, as illustrated in figure 7, uses a maximum hop-counter (field 122) in each INIT packet 120 to indicate the maximum number of hops that the packet can take as it propagates from the source node to its destination in a broadcast network. The source node has to know the exact (or minimum) number of hops required before the packet will reach its destination. A unique packet identifier is also inserted in the packet. Every intermediate node, for example node 64, that receives 150 a packet determines 152 whether the packet is an FHC packet and if not discards 154 the packet. Otherwise the node examines 156 the hop counter and decreases 158 it by one. If the counter would reach zero, the packet is not retransmitted. Otherwise the intermediate node broadcasts 160 the packet for neighboring nodes to hear. The packet's identifier is also recorded for a reasonable duration of time so that if the packet is received again from a neighboring node, the packet is discarded. The packet is sure to reach the destination node before the hop count reaches zero, provided no nodes fail. This method of routing a packet can be used for packets travelling upstream as well as downstream from the NCN. The destination node's physical ID, which is specified in the packet, is used by the destination node to recognize 162 that the packet is to be processed 164 and not forwarded further on. It is easy to see that this routing scheme is very inefficient as multiple copies of the packet may exist in disconnected parts of the network. Some copies of the packet may travel away from the destination node, thus wasting network resources. Additional details of this routing scheme can be obtained from Boeh , S.P. and P. Baran, "Digital Simulation of Hot-Potato Routing in a Broadband Distribution Communication Network," RAND Corporation, Memorandum RM-3103-PR, August, 1964. Figure 7 provides a generalized description of the operations performed during routing by the flooding with hop counts and the performance of this routing protocol within the processes of the present invention at the control (60) and resource starved (62-76) nodes will be discussed in more detail with respect to figures 9 and 12. The parent routing scheme illustrated in figure 8 is useful only for routing packets that are travelling upstream to the NCN 60. Each node in the network stores the physical ID of a node that is within direct communicating range, and is closer to the NCN by at least one hop. The node whose ID is stored is referred to as the parent node. The source node inserts into an outgoing RESPONSE_INIT packet 130 the ID of its parent node and broadcasts the packet. An intermediate node that receives 170 a packet 130, examines 172 the routing flag to ensure that the type is parent routing and drops 174 the packet if it is not the correct type. If it is the correct type the node examines 176 the destination address contained in it. If the address is not that of the intermediate node, the parent address is examined 178. If the parent address is the address of the intermediate node, the address is replaced 180 with that of the parent node of the intermediate node, and the packet is transmitted 182. This continues until the destination node (the NCN 60) receives the packet 130 and processes 184 the RESPONSE NIT packet 130. Thus, the packet 130 travels to the NCN by hopping from one node to its parent which is one hop closer to the NCN. This method of routing is more efficient than flooding with hop counts (FHC), as only those nodes whose IDs appear in the packet, relay the packet onwards. Figure 8 provides a generalized description of the operations performed during parent routing and the performance of this routing operation within the processes of the present invention at the control (60) and resource starved (62-76) nodes will be discussed in more detail with respect to figures 9 and 12. The network control node (NCN) 60 during the initiation phase 90, as illustrated in figure 9, after the user has indicated the number of nodes in the network, starts by creating 200 an initialization packet 120, as illustrated in figure 5, with the ID (field 104) of 0 and an FHC hop count (field 122) of 1. This packet is then sent 202. The NCN 60 then waits until a packet is received 204. The NCN 60 then determines 206 if the routing type is FHC. If not a determination 208 is made as to whether the routing method of the packet is the parent routing type. If not the packet is discarded 210. If the packet was routed by FHC routing a determination 212 is made as to whether it is an initiation packet 120. If not the packet is discarded 214. If it is an initiation packet 120 a determination 216 is made as to whether the hop count is 1. If so, a node is inserted 218 into a graph of the nodes of the network, such as that of figure 2. This insertion operation 218 also occurs if the NCN receives and recognizes 220 a parent routed response packet 130 that includes the NCN node ID. If the NCN determines 220 that all the nodes for the graph have not been entered into the graph, that is, when the number of nodes of the network specified by the user does not equal the number of nodes in the graph, the system returns to wait 204 for another packet. If the graph is complete, the NCN 60 assigns 222 logical partitioned spanning tree (PAST) addresses to the nodes, which will be discussed in more detail later. Once the logical addresses are assigned 222, the NCN 60 then informs each node of its address. This is done by constructing 224 SET_ADDRS packets 240 (see figure 10) and sending 226 them to the nodes 62-76. Each SET ADDRS packet 240, as illustrated in figure 10, contains the physical ID 104 of the destination node, and the logical PAST address 242 assigned to the destination, so that the destination node can accept the packet and store its logical PAST address. The packets 240 are routed using the flooding with hop counts previously discussed. The exact hop count 244 from the NCN to each node is known as this information was part of the RESPONSE_INIT packet received from the destination node. The packet 240 also contains an indication 246 of the number of bits in the logical address. A node that receives a SET_ADDRS packet 240 confirms the reception of its PAST address by sending a RESPONSE_SET_ADDRS packet 250 (see figure 11) to the NCN 60. These packets 250 are routed using the parent routing scheme. The operations of the resource starved nodes 62-76 during the initialization phase in determining the type of routing are the same as in the NCN 60 as illustrated by the reference numerals of the same operations of figure 12. After the hop count check 216 is made, each node that receives 240 an INIT packet 120 for the first time, saves the physical ID of the sender of the packet 120 and marks 242 the sender as its parent node. Additionally, the receiving node adds one to the value in the packet that gives the number of hops from the NCN 60 to the sender of the INIT packet 120, and stores the result as the number of hops that the receiving node is away from the network control node (NCN) 60. The receiving node then makes 244 and sends 246 a RESPONSEJNIT packet 130 to the NCN 60 to notify the NCN 60 that the receiving node is within direct communicating range of the node that sent the INIT packet 120 (i.e., the parent node). RESPONSEJNIT packets 130 are routed using the parent routing scheme previously discussed. Thus, to begin with, each RESPONSE INIT packet 130 contains the physical ID of the parent node of the node that constructs the packet, the physical ID of the node that sends the response packet 130, and the number of hops it is away from the NCN 60. The node then broadcasts this packet, but only the parent node, whose ID appears in the packet, retransmits the packet after replacing its ID with that of its own parent. Thus a RESPONSEJNIT packet 130 is first forwarded by the sender of the initialization packet 120 that caused the generation of the packet 130. Upon receiving a RESPONSEJNIT packet 130, the NCN 60 creates an entry in a graph to represent the source node that sent the RESPONSEJNIT packet 130. An arc is constructed in the graph, actually pointers in a linked list data structure, to connect the entries representing the sender of the packet 130 and the node whose packet 120 caused the sending of the packet 130. The number of hops from the NCN 60 to the sender (source) of the packet 130 is also saved. A node that receives a packet 120 for the first time, in addition to sending 246 a packet 130 to the NCN, also constructs 248 (see figure 12) an INIT packet 120 with a hop count of 1 and an ID of ffff(hex) and broadcasts 250 it for all immediate neighbors to hear. A node that receives an INIT packet 120 subsequent to the first one, does not save the physical ID of the sender of the packet 120 as a parent. It also refrains from constructing and broadcasting an initialization packet 120. The node does, however, construct 252 an HEARJNIT packet 260. This packet 260 is similar in structure and purpose to a RESPONSEJNIT packet 130 and is illustrated in figure 13. However, a HEARJNIT packet 260 does not travel via the sender of the INIT packet 120 that caused the generation of the packet 260. A HEARJNIT packet 260 travels by the same path that the first RESPONSE INIT packet 130 took to reach the NCN 60 from the node sending the HEARJNIT packet 260. The packet 260 also causes the NCN 60 to insert an arc in the graph to connect the sender of the packet 260 and the sender of the packet 120 that caused the generation of the packet 260. If the packet received is determined 254 (figure 12) to be the address setting packet for this node, the logical address is saved 256 and the network communication and control phase which will be described with respect to figure 21 is entered. The process 218 (see figure 9) of building the graph is illustrated in more detail in figure 14. When a packet is received by the NCN 60 it is checked 272 to determine the type of packet (130 or 260) and if it is the wrong type it is discarded 274. If the correct type of packet has been received the sender and parent addresses are extracted 276 and used to create 278 a linked list data structure list entry that will be discussed in more detail with respect to figures 15(a) and 15(b) into which the data is inserted 280. The NCN 60 then determines 282 whether the entry in the linked list for the parent exists. If not the entry for the parent is created 284. Next, the pointers between the entries are inserted 286 into the entries. Then the steps 220 and 222 previously discussed with respect to figure 9 are performed. The process of building the graph continues until the NCN 60 receives response packets (130/260) from each of the resource starved nodes 62-76 in the network and thus is able to represent every node and link in the network. The graph that results is like that of figure 2 and is represented in memory as a linked list such as illustrated in figures 15(a) and 15(b). Figure 15(a) depicts an NCN 300 that can communicate with nodes that have physical identifiers (IDs) 3abc and 769. Node 3abc can communicate with nodes having IDs 209, 152, 622 and 622 as well as node 769 and the NCN 300. Node 769 can communicate with nodes having IDs 152 and 622 as well as 3abc and the NCN 300 but not with 209. The nodes having IDs 209, 152 and 622 can hear and send to the nodes as indicated by the graph connections. This arrangement is reflected in the pointer directed linked list data structure 310 of figure 15(b). As can be seen each item or entry 312 in the list 310 includes a physical ID field 314 containing the physical ID of the corresponding node, a parent ID field 316 that identifies the parent node, a hop count field 318 that includes the count of the number of hops to the root node or NCN, one or more child pointer fields 320 that identify the nodes further down in the network that the current node can hear and communicate with and which sent packets 260, and a parent pointer 322 that identifies the first node that sent the current node an initialization packet 120. Each entry 312 also includes a field 324 storing the PAST address which will be assigned to the corresponding node. This type of graph is used by the network control node (NCN) in the next phase of the initialization to construct a spanning tree and assign addresses to the nodes of the spanning tree. The next phase in initializing the network consists of deriving a separate spanning tree data structure (graph) from the original graph that is built in the NCN's memory. The spanning tree graph is built as a separated graph (linked list data structure) and the original graph is maintained for future network changes and additions. The process includes a modified depth first search of the graph of figure. In a depth first search a node (right most) is selected if it has children one of its children (right most) is selected, if it has children it is selected and so on until a leaf is encountered. At which point the siblings of the parent of the leaf node are depth first searched. In this type of search the process goes as deep as possible along one path before other paths are processed. In a breadth first search all nodes (siblings) at each level in the network are processed before nodes in a deeper level are processed. In the modified depth first search of the present invention the breadth of each level is minimized by an operation that can divide a level into two levels to help optimize the length of the resultant address. In this discussion figure 2 will be used as the original or source graph. No resource-starved nodes are involved in this phase, and this entire phase takes place within the NCN's memory. Because this is a recursive operation in which several things are happening (creation of spanning tree and address assignment) and is not easily represented by flow charts an Appendix including a code algorithm is provided herewith. The NCN 60 starts by considering itself the root of the spanning tree, and calculates its number of neighbors by adding one to the actual number of neighbor nodes in the graph. For example, NCN 60 has two neighbors so three is the calculated number of neighbors. If the calculated number of neighbors is a power of two, then each neighbor node is entered as a child node in the spanning tree. In the current example it is not. If the number of neighbors is not a power of two, then some of the neighbor nodes may or may not be excluded from being children nodes in the spanning tree. To decide this, the NCN 60 calculates the largest power of two, denoted by 12, less than the number of neighbors, and the smallest power of two, denoted by T 2, greater than the number of neighbors. If the number of neighbors is closer to T2 than to 12, then all the neighbor nodes are entered as children in the spanning tree. If, however, the number of neighbors is closer to 12, then the NCN 60 tries to determine which of the neighboring nodes in the graph can be excluded from being children nodes in the spanning tree. In the case of a tie in the closeness of the number of neighbors to T 2 and 12, the NCN 60 decides to exclude some neighbors. For this determination, the NCN follows the arcs of the graph to see if any of the neighbor nodes are reachable from one of the other neighbors. In the current example node 62 is reachable from node 64. Any neighbor that can be reached from any other neighbor node is not entered as a child in the spanning tree and the number of neighbors is reduced by 1. As soon as the number of neighbors reaches 12 the exclusion process stops for the current node's neighbors. These excluded neighbors will be entered into the spanning tree in the future. If the NCN 60 determines that no neighbors can be excluded from being considered as children nodes in the spanning tree, then all the neighbors are entered into the tree. Each neighbor that is entered into the spanning tree is marked as visited, and the above procedure is performed again starting at each entered neighbor, thus building a spanning sub-tree rooted at the neighbor. If a neighbor is found to be marked as visited, that indicates that a spanning subtree rooted at the visited node already exists. The process continues further with the next neighbor that has not yet been visited. The reason behind the extra effort to exclude some neighbors from being a child in the spanning tree if the number of neighbors is not close to 12, is to keep the breadth of the spanning tree to a minimum. This will be better understood when the process of assigning logical PAST addresses is described below. At the end of this phase, there exists in the NCN's memory, a spanning tree 330, separate from the original graph, (see figure 2), that is rooted at the NCN 60, and in which a single path exists from the NCN 60 to every node in the network and back as illustrated in figure 16. Note this graph is represented by a data structure like that of figure 15(b). All nodes (62-76), except the NCN 60, have a parent node which is one hop closer to the NCN 60. All nodes, except the leaf nodes (66,70,74 and 76), have children nodes that are one hop further away from the NCN 60. A node may or may not have a sibling node with which it shares a parent. Other spanning trees for figure 2 are of course possible. In the final phase of the network initialization process of logical partitioned spanning tree (PAST) identifiers are assigned to each node in the network. More specifically, address may be assigned to each node. In the remainder of the document, the term addresses is used. In this assignment scheme each child inherits the address of its parent which is combined with its own unique address at its level. To do this, the NCN 60 starts by assigning itself an address consisting of all zero bits (the length of this address will be decided based on the assignment of addresses to the resource-starved nodes and the length will be the same as that of the addresses of the leaf nodes 66,70,74 and 76 of the spanning tree). The NCN 60 then calculates the number of children by adding one to the actual number of children nodes in the spanning tree of the NCN 60. In the current example this would be two. The minimum number of bits, say n, required to address each child node uniquely is then calculated. If any neighbor nodes were excluded as children during the construction of the spanning tree, then 12 should be the power of two raised to the number of bits calculated here. If no neighbor nodes were left out, then the number of bits ought to lead to 12, or to a power of two that was exactly equal to the number of neighbors in the graph. In the example of figure 16 this would be a single bit. The logical PAST address assigned to each child node consists of a unique n-bit pattem that distinguishes it from all other children nodes. These n-bits are referred to as the unique child part. In the example shown in Figure 17, the n-bits form the most significant bits of the address and are, therefore, also referred to as the most significant PAST bits. It will be appreciated that other assignments of the unique part to address bits are possible. After assigning the PAST address to its children in the spanning tree of the NCN 60, the NCN 60 then continues the above procedure with the sub-trees rooted at each child node. The unique part of the addres of any node in the spanning tree (in the example of Figure 17, the unique part is formed by the k most significant PAST bits) comprises the unique part (in the example, n most significant PAST bits) of its parent node in the tree, concatenated with a unique child part (in the example, a unique m-bit pattem, where m is the least number of bits needed to uniquely address each sibling). Thus, in the example, addresses of siblings differ only in the m least significant bits. Zero bits are used as pads to the right of the k-bit PAST address to make every node's address appear to be of the same length. The results of this procedure are illustrated in figure 17 where the most significant PAST bits are marked with a solid underscore. The zero bits used to pad each PAST address to the same length, have no underscore. In figure 17 since the leaf node 76 requires six bits for its address all node addresses are padded with zeros to obtain a six bit address. As can be seen by examining figure 17 each child node includes the most significant bits of the childs parent. As previously discussed, once each node has an address the addresses are sent by the network control node (NCN) 60 to the resource starved nodes 62-76 and stored in the PROM therein. This ends the initialization phase. During the monitor and control phase, as illustrated in figure 18, the NCN 60 waits for an input 340 from the user. To instruct (command) a node to perform an operation, such as to perform a specific operation, or to query the node and ask it to retum back any information, the NCN 60 constructs 342 a SEND_VALUE packet 360, as illustrated in figure 19, with an appropriate command therein. This packet 360 is sent 344 and the NCN 60 waits 346 for a retum packet. The receiving node, once the operation is performed or query completed, retums the results using a RESPONSE_SEND_VALUE packet 362 as illustrated in figure 20. This packet is examined 348 to determine whether it is a packet routed using the PAST protocol and the NCN 60 discards 350 the packet if it is not. The NCN 60 also determines 354 whether the packet is the response packet 362 and if so processes the packet 362 accordingly, such as by updating a display or a device status. After receiving and storing a logical PAST address at the end of the initialization phase, each node (62-76) is capable of routing packets whose flag bytes indicate that they are to be routed using the partitioned spanning tree (PAST) protocol. During the monitor and control phase for packets travelling downstream from the NCN 60, each packet is routed using PAST, and contains the PAST address of the destination node, for example 110111 when node 70 is the destination node. Packets travelling upstream to the NCN contain the PAST address of the sender node, for example 111000 if node 62 is the source node. An intermediate node, as illustrated in figure 21, upon receiving 370 a packet, determines 372 whether the packet is being routed using the correct protocol. If the protocol is correct the packet address is compared 376 to the node address. If there is not a match the node compares 378 the k most significant bits of its own PAST address with the PAST address in the packet (the destination or sender node's PAST address, for downstream and upstream packets respectively). If all k bits match in the two addresses, then the intermediate node definitely lies in a direct path from the NCN 60 to the destination/sender node. The intermediate node therefore retransmits 380 the packet to forward it. All other recipients of the packet, whose PAST addresses do not have a k-bit match with the packet's address, refrain from retransmitting the packet and discard it 382. If the destination address matches the node address the packet is processed 384 and the command therein is executed. Based on the particular process executed, the results are placed 386 in a RESPONSE_SEND_VALUE 362 (see figure 20) and this packet 362 is sent. If the routing protocol is not the PAST protocol, the node determines 390 whether the protocol is the flooding with hop counts protocol (FHC), if not the packet is dropped 391. If the packet is an FHC packet, a determination 392 is made whether the packet is an INSERT packet (see figure 22). If not a determination 394 is made as to whether the packet is an INIT packet 120 (see figure 5). If it is, the node enters 396 the initialization phase. If the packet is an INSERT packet, the node makes a HEARJNSERT packet 401 (see figure 23) which is then sent 380. After a network has been initialized, i.e., all resource-starved nodes have received their logical PAST addresses, it may be necessary to add a new resource-starved node to the network. The simplest solution is to have the entire network reinitialized as described above. However, this may be undesirable in many circumstances. As an altemative solution, each new resource-starved node, can broadcast an INSERT packet 400 (see figure 22). This packet is heard by its neighbor nodes (which have already been initialized). The neighbors create a HEARJNSERT packet 401 (see figure 23) and send it to the NCN 60 using the PAST protocol. The HEARJNSERT packets contain the physical ID of the new node, and the ID of the node that created the packet, along with its hop-count to the NCN 60. The NCN 60, after collecting HEARJNSERT packets from multiple neighbors of the new node, tries to select the best location for the new node in the spanning tree. A good location is one where a logical PAST address can be assigned to the new node with little or no change to the PAST addresses or length of PAST addresses of other nodes. In the example of figure 17, a new node can be easily inserted into the spanning tree as a child of the node with physical ID 2 (node 64). Any other placement will require a change in logical PAST addresses of other nodes. Thus, if a new node were to require insertion in the neighborhood of node 64, then the NCN would assign a logical PAST address of 101000 to this new node. However, if a new node were to require insertion outside of neighborhood of node 64, some of the logical PAST addresses would be required to be changed to accommodate the new node's PAST address. It may be necessary for the NCN 60 to reassign new PAST addresses to all or many of the nodes. The changed PAST address of nodes, and the new PAST address of the new node, are disseminated using the SET_ADDRS packets and sent using FHC routing. If required, the NCN 60 may start the entire initialization procedure. End-to-end acknowledgments are used in the present invention to detect node failures. If the NCN 60 sends a request or query for information to a node, and it does not receive a response back, it assumes that a node in the path to the destination may have failed. It then starts to traverse down the path in the spanning tree that leads to the destination node, and sequentially sends an ECHO (see figure 24) packet 402 using PAST protocol to each node in the path and awaits for a PAST protocol response. A node that receives an ECHO packet 402, simply copies it back to the NCN 60, thus notifying the NCN 60 that the node is in proper working condition. Failure to receive a response to an ECHO packet 402 indicates to the NCN 60 that the node addressed by the ECHO packet 402 is down. The NCN 60 then reconfigures the spanning tree to connect the spanning subtree, rooted at the failed node, to a different part of the network such that the new parent of the subtree is within hearing range of all the new children. This reconfiguration is performed by eliminating the arc from the parent node to the down node in the original graph and performing the spanning tree and address assignment operations previously described. The NCN 60 may have to break up parts of the subtree to ensure that all nodes in the subtree are reconnected to other parts of the spanning tree. The NCN 60 then assigns new logical PAST addresses to the reconfigured parts of the spanning tree and sends out packets 240 to notify the affected nodes about the changes in their PAST addresses. Again, a complete reinitialization of the network may be required if the failed node lies in a critical part of the network. An implicit hop-by-hop acknowledgment (IHBH) scheme used in the present invention also helps in detecting node failures. Each source or intermediate node that transmits a packet, expects to hear the packet being retransmitted by one of its neighbors (a node in the same path in the spanning tree). If within a specified period of time, no retransmissions are heard, then the source or intermediate node assumes that node failures are preventing its packets from traversing the path of the spanning tree. The source or intermediate node then sends out a SQUEAL packet 404 (see figure 25) that has its broadcast bits in the FLAG byte set appropriately. A SQUEAL packet 404 contains the PAST address of the sending node, and is routed to the NCN 60 using the flooding with hop counts protocol. The NCN 60 then starts its procedure to discover which node along the path to the complaining node is down. A reconfiguration of part or all of the network follows. The many features and advantages of the invention are apparent from the detailed specification and, thus, it is intended by the appended claims to cover all such features and advantages of the invention which fall within the tme spirit and scope of the invention. Further, since numerous modifications and changes will readily occur to those skilled in the art, it is not desired to limit the invention to the exact constmction and operation illustrated and described, and accordingly all suitable modifications and equivalents may be resorted to, falling within the scope of the invention. For example, the packet stmctures described above can be changed as long as the functionality of the data elements in each packet is provided by similar other fields in a new packet format. The algorithm executed at the NCN and used to generate PAST addresses for the nodes can be changed as long as any new algorithm is able to generate PAST addresses with bit fields that uniquely identify each node's children nodes. All nodes do not need to be resource-starved in terms of memory and processing power, the protocol works for any type of nodes. The PAST protocol does not restrict the network to communication between only the NCN and each nodes, and back, but can also be used for communication between non-NCN nodes. Communication between two non-NCN nodes can be achieved by sending packets to the NCN first, which in turn can send them to the appropriate destination. The discussion describes a minimization of the breadth of the spanning tree using powers of two. This minimization need not be performed and is provided to optimize the length of the PAST addresses. The linked-list data stmcture used to represent the graph in the NCN, can be replaced with any other type of data stmcture (e.g. array) and the order of the elements of the linked-list data stmcture can be changed as long as the functionality of each element is fulfilled with new or newly ordered elements.

Claims: Claims: 1. A method of configuring a network, comprising: determining which nodes of the network can communicate with each other; and assigning identifiers to the nodes, characterised: in that the method comprises forming a spanning tree of the nodes that can communicate with each other; and in that the assigning identifiers to the nodes is based on the spanning tree. 2. A method as claimed in claim 1, characterised in that the assigning of identifiers comprises assigning a logical node identifier to a child node with the logical node identifier comprising a unique part of a logical node identifier of a parent node of the child node. 3. A method as claimed in claim 2, characterised in that the assigning a logical node identifier comprises: forming for the child node a unique child part uniquely distinguishing between children nodes of the parent node; and forming for the child node a unique part of the logical node identifier of the child node by combining the unique part of the logical node identifier of the parent node with the unique child part. 4. A method as claimed in claim 2 or 3, characterised in that the assigning further comprises sending the logical node identifier of a child node to the child node. 5. A method as claimed in claim 1, 2, 3, 4, or 5, characterised in that the determining comprises: sending initialization messages to all nodes; and recording as a parent node one of the nodes from which the initialization message is received; 6. A method as claimed in claim 4 or 5, characterised in that the sending comprises using a flooding with hop counts communication protocol. 7. A method as claimed in claim 5 or 6, characterised in that the determining further comprises responding to the initialization messages. 8. A method as claimed in claim 7, characterised in that the responding comprises using a parent routing communication protocol. 9. A method as claimed in any one of the preceding claims, characterised in that the method further comprises reconfiguring the network to one of add and remove nodes from the network by communicating using a partitioned spanning tree communication protocol. 10. A method as claimed in any one of the preceding claims, characterised in that the forming includes minimizing a breadth of the network by segmenting the nodes responsive to a closest power of two. 11. A method as claimed in any one of the preceding claims, characterised in that the spanning tree comprises a linked list data stmcture with entries including a parent pointer, a child pointer, a node physical identifier of the node, a parent physical identifier, a hop count and a partitioned spanning tree logical identifier. 12. A method of routing a message within a network of nodes, wherein the nodes are identified by unique node identifiers, characterised: in that the nodes form a spanning tree of nodes that can communicate with each other; in that an unique part of an identifier of a child node includes a unique part of an identifier of a parent node of the child node; and in that the method comprises transmitting a message to another node when a message address includes the unique part of a current node identifier. 13. A method as claimed in claim 12, characterised in that the unique part of the identifier of the child node further includes a unique child part uniquely identifying the child node amongst all children nodes of the parent node. 14. A method as claimed in claim 12 or 13, characterised in that the message address and the node identifier substantially correspond in format. 15. A method as claimed in claim 12, 13, or 14, characterised in that the method comprises determining whether a receiving node receiving a message is in a path to a destination node by comparing the message address only with an identifier of the receiving node. 16. A method as claimed in claim 12, 13, 14 or 15, characterised in that the transmitting comprises: comparing the message address to the current node identifier and if a match occurs processing the message; comparing the unique part of the current node identifier with a corresponding part of the message address; discarding the message if the corresponding parts do not match; and transmitting the message if the corresponding parts match. 17. A method as claimed in claim 12, 13, 14, 15, or 16, characterised in that the method further comprises: determining whether the message transmitted has been rebroadcast; and indicating a failed node when the message has not been rebroadcast. 18. A method as claimed in claim 17, characterised in that the method further comprises: sequentially polling all nodes along a path to the failed node; and reconfiguring the network based on responses to the polling. 19. A method as claimed in any one of claim 12 to 18, characterised in that the method comprises: sending all upstream packets received by a node to the parent node of the node. 20. A communications network, comprising a plurality of nodes, wherein the nodes are identified by unique node identifiers, characterised: in that the nodes form a spanning tree of nodes that can communicate with each other; and in that an unique part of an identifier of a child node includes a unique part of an identifier of a parent node of the child node. 21. A communication network as claimed in claim 20, characterised in that the network comprises a network control node, wherein the network control node and the network nodes each include a wireless transmitter/receiver via which the network control node and the network nodes communicate. 22. A computer readable memory including a method of directing a computer to configure a network of nodes comprising: determining which nodes of the network can communicate with each other; and assigning identifiers to the nodes based on a partitioned spanning tree protocol. 23. A communication network node, comprising: a memory storing a logical identifier of the node; and a processor determining whether the node is in a message path to a destination node, characterised in that the processor is conceived to perform said determining by comparing a message address of the message only with the logical identifier of the node. 24. A node as claimed in claim 23, characterised in that said processor compares a unique part of the logical identifier with a corresponding part of message address. 25. A network control node for a communication network, comprising: a memory storing a network configuration; and a processor, characterised in that the processor is conceived to determining partitioned spanning tree identifiers of nodes of the network, storing the identifiers in the network configuration and sending messages to the nodes using the network configuration.

Inventors: DASGUPTA ANINDA V, DASGUPTA, ANINDA, V.
Applicants: PHILIPS ELECTRONICS NV, PHILIPS NORDEN AB, PHILIPS ELECTRONICS N.V.
Application year: 1996
Main classification: H04L12
IPC codes: H04L12