  In this paper, a methodology is presented and employed for simulating the
Internet of Things (IoT). The requirement for scalability, due to the possibly
huge amount of involved sensors and devices, and the heterogeneous scenarios
that might occur, impose resorting to sophisticated modeling and simulation
techniques. In particular, multi-level simulation is regarded as a main
framework that allows simulating large-scale IoT environments while keeping
high levels of detail, when it is needed. We consider a use case based on the
deployment of smart services in decentralized territories. A two level
simulator is employed, which is based on a coarse agent-based, adaptive
parallel and distributed simulation approach to model the general life of
simulated entities. However, when needed a finer grained simulator (based on
OMNeT++) is triggered on a restricted portion of the simulated area, which
allows considering all issues concerned with wireless communications. Based on
this use case, it is confirmed that the ad-hoc wireless networking technologies
do represent a principle tool to deploy smart services over decentralized
countrysides. Moreover, the performance evaluation confirms the viability of
utilizing multi-level simulation for simulating large scale IoT environments.
