Achieving end-to-end goals of Wireless Machine to Machine Networks (M2M) is a highly challenging task. These goals include guaranteeing connectivity and maximizing throughput while satisfying application layer Quality of Service (QoS) requirements. Moreover, the problem becomes more complicated in the context of emerging dynamic allocation of application layer software components. This paper presents a collaborative framework for communications in M2M wireless networks. This framework is composed of a context-aware and application-aware software platform and a reasoning machine for network management. The software platform uses multi-level adaptation mechanisms to support dynamic collaboration activities. The platform is also capable of installing the required software components on the appropriate nodes. On the other hand, the reasoning machine for network management is designed using the tool known as Weighted Cognitive Map (WCM). The inference properties of WCMs allow the system to self-organize while considering multiple objectives and constraints. Methods for achieving different objectives using WCMs are illustrated, as well as how system processes can operate coherently to achieve end-to-end goals. Computer simulations show that the system achieves excellent performance results in metrics of call dropping and blocking probabilities and achieving the required Quality of Service (QoS) parameters of the applications.