In this paper a prototype framework for simulation of wireless sensor network and its protocols are presented. The framework simulates operation of a sensor network with data transmission, which enables simultaneous development of the sensor network software, its hardware and the protocols for wireless data transmission. An advantage of using the framework is converging simulation with the real software. Instead of creating a model of the sensor network node, the same software is used in real sensor network nodes and in the simulation framework. Operation of the framework is illustrated with examples of simulations of selected transactions in the sensor network.