The automatic configuration of Access Points (APs) is a new subject, since the Wi-Fi technology, which underlies hotspots by a wireless local area network, appears on the world market in 2001. The first market relevance has been in 2002. APs channel assignment at hotspots, and more generally APs configuration and management, has to be done manually, except for very recent APs. In this paper, we intend to partially solve the problem of automatic APs management. The goal to achieve is to have an autonomous system able to perform dynamic channel allocation of WLAN APs, in the context of multiple APs in a restricted area. Moreover, the solution has to be independent from sellers (manufacturers) or owners (generally service providers). Given a set of APs located nearby each other, the problem to be solved consists in assigning a channel to each AP such that the overall throughput is maximized, or, in other words, such that the overall perturbation is minimized. Moreover, the system has to adapt himself to dynamic variations of the environment, such as the number of associated users, the usage of the APs, and so on. The solution developed in this paper uses a distributed algorithm to solve the problem. One software agent manages one AP and is able to communicate with its neighbors in order to optimize the global throughput. Tests with different topologies have been done by simulation, as well as some real implementation. These experiments have given good results, even when networks get very dense and have many APs. Comparison with optimal solution on small networks has shown that the performance of the algorithm described in this paper is very close to the optimum.