In this paper, we propose a comprehensive framework for mining Wireless Ad-hoc Sensor Networks (WASNs) that is able to extract patterns regarding the sensors' behaviors. The main goal of determining behavioral patterns is to use these to generate rules that will improve the WASN's Quality of Service by participating in the resource management process or compensating for the undesired side effects of wireless communication. The proposed framework consists of a formal definition of sensor behavioral patterns and sensor association rules, a novel representation structure named the Positional Lexicographic Tree (PLT) that is able to compress the data gathered for the mining process and thus allows the fast and efficient mining of sensor behavioral patterns, as well as a distributed data extraction mechanism to prepare the data required for mining sensor behavioral patterns. To report on the performance of the mining framework, several experiments have been conducted to evaluate the PLT structure and the proposed data extraction mechanism.