how could i simulate Device to Device communication concept by using the ZigBee module on software and how do i apply mesh routing for a ZigBee Network . In this project arduino use as a micro-controller.
Zigbee protocol is available in Matlab in version 2017a and on-wards. You can simulate the scenario there. Alternatively, you can use a commercial simulator like Qualnet. The following research article might be of help.