This work presents a new development model for wireless community networks, framed within the sustainable development goals, SDG 11, to achieve the transformation of cities to environmentally sustainable areas and to take measures to fight climate change; this model is based on the use of renewable energies, mesh routing protocols, the monitoring of air quality and environmental variables, IoT, and the application of educational methodologies in order to reward less polluted areas. There are proposed some ideas about standardization of building networks for measuring air quality in smart cities, which provide a great source of information for location-based services (LBS) that promote environmental awareness services. The CleanWiFi network constantly monitors the air for pollutant gases, uses that information to feed a Big Sensor Data system, and uses the same data for the automatic configuration of the public WiFi service, displaying information about the quality of the air to the user, and rewarding less oolluted areas with a better service. That way it raises public awareness about state of air pollution and how important it is to reduce it; promotes the use of renewable energies and brings WiFi connectivity to the people.