RESUMO
Simulation is a useful and common technique to evaluate the performance of networks when the implementation of a real scenario is not available. Specifically for Wireless Body Area Networks (WBAN), it is crucial to perform evaluations in environments as close as possible to the real conditions of use. To achieve that, simulations must include different protocol layers involved in WBAN and models close to reality to create realistic simulation environments for e-health applications. To satisfy these needs, this work presents the BNS framework, a flexible tool for WBAN simulations. The proposal is an extension of the Castalia framework, which includes: (1) a new wireless channel model considering real radio-propagation over the human body; (2) an updated implementation of the WBAN MAC protocol in Castalia, with functionalities and requirements in accordance with the IEEE 802.15.6 standard; (3) a new comprehensive and configurable mobility model for simulating intra-WBAN communication; (4) a temperature module based on the Pennes bioheat transfer equation, to model the temperature of a WBAN node based on the activity of the node; and (5) a Healthcare Application Layer that implements data representation and a communication protocol between Personal Health Devices (PHD) following the ISO/IEEE 11073 standard. Three use cases are presented, where WBAN scenarios are simulated and evaluated using the proposed BNS framework. Results show that BNS is a valid and flexible tool to evaluate WBAN solutions through simulation.