Abstract: A method for providing frequency agility in a wireless network with a plurality of RF frequency channels. The nodes are formed into a hierarchical branching tree for communication. The RF environment for each of the plurality of RF channels is sensed as a function of time and the sensed measurements are stored. Based on the stored measurements of RF environment, a channel assignment scheme as a function of time is selected and transmitted to the network nodes. Nodes within the tree can be segmented geographically and assigned channels based on the sensed local RF environment. Nodes can also be segmented to reduce the density of nodes using the same assigned channels. Such frequency agility enhances the communication capability of a wireless sensor network in a harsh RF environment.