# ViTool-BC: Visualization Tool Based on Cooja Simulator for WSN
## 1 Introduction  
Wireless sensor networks (WSN) are a type of IoT technology that is applied in multiple areas [1, 2]. This field describes the communication of sensors distributed in areas of interest for collecting, monitoring, analyzing, and predicting environmental or external phenomena that affect the mentioned area. The applications of sensor networks include air quality aspects [3], disaster prediction [4], monitoring agriculture areas [5, 6], and smart cities [7, 8], among others. These sensors have many restrictions, from low energy and processing capacity to unstable connections between devices. Consequently, how the information is collected and retransmitted, considering the limitations, will determine the efficiency of the designed topology. For handling these restrictions and controlling the connections of the nodes of a wireless sensor network, several routing protocols are defined [9]. These protocols include rules and steps that govern the communication between the nodes, allowing them to optimize the use of these devices' resources.  
The multiple applications of the WSN require the delimitation of communication protocols, topologies of the network, and physical specifications that adapt to the scenarios of interest. Therefore, it is necessary to understand the theoretical definitions of these protocols and topologies, which allow us to correct the problems and specific phenomena in these scenarios. Given the difficulty of assembling and controlling a testbed of physical sensors [10], simulators emerge as an alternative for validating operations of a WSN with their parameters. The use of simulators on IoT into the deployed WSN helps with the measurement and estimation of the metrics, allowing the evaluation of the performance and quality of service (QoS) of a designed network or its topology control [11, 12]. Some of these used metrics in WSN include energy consumption, latency, bandwidth, stability, and network lifetime, among others [13]. Also on Cloud computing, these metrics extendtheir scope with the inclusion of the monitoring strategy and security aspects [14; 15]. The motivation of this paper is to offer researchers the alternative of having a tool that allows deep analysis of the network behavior, such as energy consumption, packet loss, and parent's changes, among others. In this paper, the ViTool-BC (visualization tool-based Cooja simulator) is described. This tool is oriented to the set of the parameters and metrics arising from a wireless sensor network simulation generated by the Cooja simulator [16]. The main contributions of ViTool-BC are obtaining information related to the consumption and monitoring of energy, a heat map of energy traces, a battery depletion model, the latency of the sending packets, the parent's changes, and the change in the topology in real time in the simulation. The rest of the article is organized as follows: in Section 2, the related works are presented, Section 3 describes the energy model, in Section 4, the design and the implementation of the proposed tool ViTool-BC are described, and finally the conclusions and references are shown.