Z-Monitor: Monitoring and Analyzing IEEE 802.15.4-based Wireless Sensor Networks Anis Koubˆ aa ¶§ , Shafique Chaudhry ¶ , Olfa Gaddour * , Rihab Chaari * , Nada Al-Elaiwi ¶ , Hanan Al-Soli ¶ , Hichem Boujelben * ¶ COINS Research Group, Al-Imam Mohamed bin Saud University (CCIS-IMAMU), Saudi Arabia § CISTER Research Unit, Polytechnic Institute of Porto (ISEP/IPP), Portugal. * CES Research Unit, National School of Engineers of Sfax (University of Sfax), Tunisia. Emails: aska@isep.ipp.pt, shafique@coins-lab.org, olfa.gaddour@enis.rnu.tn, rihab.chaari@ceslab.org, st-nada.alelaiwi@coins-lab.org, st-hanan.alsoli@coins-lab.org, hichem.boujelben@ceslab.org Abstract—Monitoring of Wireless Sensor Networks (WSNs) is a fundamental task to track the network behavior and measure its performance in real-world deployments. In this paper, we present Z-Monitor, a monitoring and a protocol ana- lyzer solution to control and debug IEEE 802.15.4-compliant Low Power Wireless Personal Area Networks (LoWPANs). Z-Monitor does not only support the analysis of well-known ZigBee, 6LoWPAN and RPL protocols, but is also designed to be modular and easily extensible for adding new protocols. The motivation behind the design and implementation of Z- Monitor is the fact that commercially-available products for monitoring and testing IEEE 802.15.4-compliant LoWPANs are mainly too expensive, and typically require special sniffing hardware. Z-Monitor represents a free and extensible solution, does not require special sniffing hardware, and provides comparable services to proprietary and commercial products. We also share our experimental study results that demonstrate the effectiveness of Z-Monitor in meeting its objectives. I. I NTRODUCTION Low Power Wireless Personal Area Networks (LoW- PANs) are IEEE 802.15.4 [1] compliant networks, which are becoming increasingly important because of their essential role in Cyber-Physical Systems. LoWPANs are characterized by low-cost, low-speed communication, infrastructure-less connectivity and suitability to a wide range of applications, making them an essential compo- nent of the ubiquitous computing paradigm. In order to ensure that the LoWPANs are operating at the desired performance level, it is essential to provide end-users with tools for network monitoring and protocol analysis. Network Monitoring is, in fact, a fundamental operation that enables to: (i.) perform performance analysis, (ii.) track the network behavior, (iii.) support network programmers in debugging their programs, and (iv.) perform network management operations. There exist a few solutions for LoWPAN monitoring, but they are either very expensive or of proprietary nature. In this paper, we present Z-Monitor (ZM) [2], a modular application for monitoring and controlling IEEE 802.15.4- compliant LoWPANs. Z-Monitor provides a convenient solution for researchers and students for developing, debug- ging and deploying wireless sensor network applications based on IEEE 802.15.4 standard protocol and underly- ing network protocols (i.e. 6LoWPAN, ZigBee, RPL). Z- Monitor is compatible with the open-source official TinyOS implementation of the IEEE 802.15.4 recently released by the TinyOS 15.4 Working Group. It also provides support for both ZigBee and 6LoWPAN [3], the two mostly used protocols deployed over LoWPANs. The rest of this paper is as follows. Section II presents the motivation behind the design of Z-Monitor application. In Section III, we present the software design of Z-Monitor and describe its main software components. Section IV demonstrates the effectiveness of Z-Monitor through several experiments. Section V overviews the most relevant research efforts and commercial products, and presents the contributions of Z- Monitor as compared to these efforts. Finally, Section VI closes the paper with discussions about future extensions. II. BACKGROUND AND MOTIVATION LoWPANs are typically composed of devices that con- form to the IEEE 802.15.4-2003 standard. While IEEE standard 802.15.4 specifies the Physical and Medium Ac- cess Control (MAC) layers and underlying services for LoWPANs, upper layers like Network and Application layers are defined by other standards like ZigBee and 6LoWPANs. ZigBee technology [4] is well-known and widely de- ployed in wireless control and monitoring applications [5, 6]. The ZigBee specification mainly provides four higher layer components, i.e., Network layer, Application layer, ZigBee Device Objects(ZDO) and Manufacturer- defined Application Objects, which allow for customization and favor total integration. Fundamentally, ZigBee enables mesh networking by supporting three types of topologies, i.e., star, tree and mesh networks. While the network layer takes care of routing issues, the Application Layer (APL) is responsible for discovering devices on the network