414 IEEE COMMUNICATIONS LETTERS, VOL. 12, NO. 6, JUNE 2008 Hybrid Address Configuration for Tree-based Wireless Sensor Networks Yung-Chang Wong, Jui-Tang Wang, Nai-Hsin Chang, Ho-Han Liu, and Chien-Chao Tseng Abstract— This letter proposes a new scheme to alleviate the issue on address acquisition failure in wireless sensor networks (WSNs). The basic idea is to use a hierarchical address struc- ture to make the proposed scheme less susceptible to physical distribution of WSN devices. Simulation results show that the new scheme significantly reduces the failure probability. Index Terms— address allocation, wireless sensor networks, ZigBee networks. I. I NTRODUCTION W IRELESS sensor networks (WSNs) is a rapidly grow- ing technology that offers an unprecedented opportu- nity for a wide spectrum of various applications, including environment and habitat monitoring, healthcare applications, home automation, and traffic control [1], [2]. For each WSN, a coordinator is responsible for starting a new network, when appropriate, setting network parameters, and assigning network addresses to newly associated devices. This paper deals with the problem of address allocation in WSNs. The ZigBee Alliance [3] specifies Distributed Address As- signment (DAA) mechanism for network address allocation. When a new device is willing to join a network, it performs the association process with an existing device in the network. If the existing device has available network addresses, it will assign a free one, in ascending order, to the new device and make it one of its children in the logical address tree. One major advantage of DAA is its tree forwarding capability. For tree forwarding, any device with address a i can determine the next hop for a packet with destination address a j simply by comparing the value of a i with that of a j , instead of performing a routing table lookup. The weakness of DAA is that a device may fail to acquire an available address from its neighbors. This is called addressing failures. Addressing failures arise either from shortage of available addresses on neighboring devices or from mismatch between setting of topological parameters (described in the next section) and geographical distribution of devices. Prime Numbering Address Allocation (PNAA) [4] serves as a means to avoid the mismatch issue mentioned above. Like DAA, PNAA possesses the tree forwarding capability. Unlike DAA, address trees generated by PNAA are left-skew. This restrains the new devices within the right side region from associating with an existing device in the network. Manuscript received December 3, 2007. The associate editor coordinating the review of this letter and approving it for publication was A. Smiljanic. Y.-C. Wong is with the Department of Computer Science and Information Engineering, Providence University, Taiwan (e-mail: ycwong@pu.edu.tw). J.-T. Wang, N.-H. Chang, H.-H. Liu, and C.-C. Tseng are with the Department of Computer Science, National Chiao Tung University, Taiwan (e-mail: {rtwang, nhchang, hohanliu, cctseng}@cs.nctu.edu.tw). Digital Object Identifier 10.1109/LCOMM.2008.072031. This letter aims at designing efficient configuration solutions for moderating the addressing failures further. We propose a compound scheme, named hybrid address assignment (HAA), through combining the advantages of both DAA and PNAA. The basic idea is to use the hierarchical address structure to make the proposed scheme less susceptible to physical distribution of WSN devices, while retain the tree forwarding capability. II. RELATED WORK This section presents the address allocation mechanisms for WSNs, including DAA and PNAA. According to ZigBee specification [3], an address tree generated by DAA is hierarchical in the sense that any subtree possesses a block of consecutive addresses. Usually the coordinator itself has a depth d of 0, while its children have a depth of 1. At any depth d of the tree, the addresses are evenly separated by Cskip(d)= 1+ C m − R m − C m · R m Lm-d-1 1 − R m , where topological parameters C m , L m , and R m =1 stand for the maximum number of children a parent may have, the maximum depth in the network, and the maximum number of routers a parent may have as children, respectively. PNAA [4], another address allocation scheme for WSNs, is based on the fact that every positive integer can be written as a product of prime numbers in a unique way. Consider a device with an address a. Let n be the largest prime factor of a. With PNAA, the device can allocate prime numbers S p (a)= {b|b = a ×p}, where p ≥ n is a prime number, as addresses to new devices attached to it. For example, S p (6) = {6 × 3, 6 × 5, 6 × 7,...}, since prime number n =3 is the largest factor of a =6. Normally a root device has an address of 1. III. HYBRID ADDRESS ASSIGNMENT (HAA) SCHEME This section presents the HAA scheme and the accompany- ing tree forwarding strategy. With HAA, a device is configured with an address consisting of two fields, separated by a dot. The first field is the i-bit group ID, and the second field, containing the host ID, is j -bit in length. Normally the root device A is configured with the address (1.0), as shown in Figure 1. When a type-1 device X (a device with address (a.0), a =0) receives an association request from a device Y , device X allocates a free address (b.0) to Y , where value b is assigned using PNAA. If this fails, device X then allocates the address (a.1), if free, to Y . Figure 1 shows an example address configuration with i =4, j =6, and parameters (C m ,L m ,R m ) = (4, 3, 4). Take device D with address (4.0) 1089-7798/08$25.00 c 2008 IEEE