Abstract In this paper, we propose a protocol for dynamic reconfiguration of ad-hoc wireless networks with movable base stations in presence of obstacles. Hosts are assigned to base stations according to a probabilistic throughput function based on both the quality of the signal and the base station load. In order to optimize space coverage, base stations cluster hosts using a distributed clustering algorithm. Obstacles may interfere with transmission and obstruct base stations and hosts movement. To overcome this problem, we perform base stations repositioning making use of a motion planning algorithm on the visibility graph based on an extension of the bottleneck matching technique. We implemented the protocol on top of the NS2 simulator as an extension of the AODV. We tested it using both Random Way Point and Reference Point Group mobility models properly adapted to deal with obstacles. Experimental analysis shows that the protocol ensures the total space coverage together with a good throughput on the realistic model (Reference Point Group) outperforming both the standard AODV and DSR.