Proposal of an architecture for sensor networks monitoring in Open Access Metropolitan Area Networks

Sensor networks have been used in a wide range of applications. In Digital Cities they play an important role in gathering real-time data in urban scale. However, the heterogeneous and complex technologies applied in such applications make it difficult to monitor and manage different sensor networks, and also prevents the interoperation between systems. Thus, this paper presents a proposal of a novel architecture based on service orientation for homogeneous interoperation among sensor networks used in a Digital City scenario. Based on the outlined architectural model, a case study took place in a Brazilian operational Digital City in the state of São Paulo. The objective of the study is to demonstrate that architecture can be used for monitoring heterogeneous environments in a unified way, promoting datasharing and interoperability.


Introduction
Advances in wireless communications and microelectronics have enabled the development of low-cost and low-power sensor nodes with small sizes.A sensor network is made up of a large number of sensor nodes, usually densely deployed close to a phenomenon of interest (Akyildiz et al., 2002).These nodes work in a collaborative way in order to gather data and send them to a device with higher computing capacity called sink.Although the sensor networks may be made up of a range of technologies, the state-of-the-art of sensor networks consists of Wireless Personal Area Networks (WPAN), short-range and low-powered capacity (Hui et al., 2011) built upon the family IEEE 802.15 standard.
Digital Cities, fostered by the great development reached by Information and Commu-nication Technologies in the last 30 years, arise today as a new paradigm in those areas.According to Mendes et al. (2010), a Digital City is a converged multimedia network which allows, among other things, free Internet access to the whole population of a city.In Brazil the project of Open Access Metropolitan Area Networks (Open Access MAN) aims at constructing communication infrastructure to develop Digital Cities.A wide range of network solutions are involved in an Open Access MAN project.The main communication protocols employed belong to the TCP/IP stack: 10G Ethernet, IEEE 802.11,IEEE 802.16,GigabitEthernet.These protocols compose a network environment where scalability and flexibility are easily reached, enabling the provision of a wide range of applications and services, such as: IP Telephony (VoIP); e-Gov and e-learning environments; telemedicine; and control and monitoring systems.Recently, sensor networks are been increasingly employed for monitoring and control applications (Juraschek et al., 2012;Hernández-Muñoz et al., 2011;Bartlett et al., 2011).Sensor Networks have been particularly important in the improvement of security, health, automation, and public services (Molina et al., 2014).
Nowadays, cities are searching more and more for technological solutions to address actual issues in the municipality, such as electricity, clean water, sanitation, and urban mobility (Barone et al., 2014), which are severely aggravated by population growth (Bartlett et al., 2011).The main problem with such solutions is that a big deal of them are constrained to specific application domains, normally unable to share data with other systems, therefore, making the city even more distant of a smart city in a broader context.Further, proprietary and heterogeneous approaches make this inflexibility even more evident.
Thus, when developing applications for sensor networks in metropolitan networks scenarios one should focus on the utilization of means to promote interoperability among the monitoring systems and integration of heterogeneous data.In terms of distributed systems, SOA (Service-oriented Architecture) is considered a promising solution to promote the integration of different systems in a high level of abstraction.Its goal is to improve efficiency, agility and productivity by using services to accomplish business logic targets (Erl, 2008).While SOA is a neutral architecture in terms of technological platform, the Web, by means of Web Services (W3C, 2004), is the technology that more closely follows its design (Erl, 2008).Web Services allows to create communication interfaces among different systems through the adoption of platform independent protocols and programming languages.This culminates in scalable environments and loose coupling applications capable of interoperating with each other.Among other things, SOA is one of the major architectures to build smart cities, because of the heterogeneity of devices that it can handle (Jin et al., 2014).
Sensor networks have potential to help the development of Digital Cities.Thus, this paper presents a service-oriented architecture for sensor network monitoring to be applied in the context of Digital Cities built upon Open Access MAN.This architecture makes use of Open Access MAN resources to create an urban scale sensor environment.Platform independ-ent protocols and technologies are employed promoting data sharing and interoperability among different systems.To evaluate the feasibility of the proposed architecture, a case study took place in the Digital City of Pedreira, located in the state of São Paulo, Brazil.
The remaining of the paper is structured as follows: the second section presents a survey on related approaches of urban scenarios monitoring.The proposed architecture is presented in the third section, along with the case study which is presented and discussed in the fourth section.In the fifth section some results are presented.Finally, the conclusions are given in the last section.

Monitoring in urban scenarios
A Digital City is a huge system made up of subsystems.In this new city model, it is necessary to build systems that can provide data on the daily life of the city.Different approaches have been used to monitor and control tasks in urban management scenarios.This has led to the development of distinct architectures and system models.
As an example, Vikatos (Vikatos et al., 2011) describes a system architecture for monitoring harmful gases in the city of Patras, Greece.This architecture includes the employment of mobile sensors attached to vehicles to gather data about air conditions and to store it in a central database.Data mules acting as gateways are responsible for visiting each node in the network, and to extract and convey the node gathered data to the central database.
An architecture to apply Wireless Personal Area Networks in metropolitan scenarios is presented in Pires (2010).The proposed architecture is composed of four layers.Considering a bottom-up approach, in level 0 (zero) of Pires architecture are the processing stations, which are computers used to monitor specific networks in the city.Level 1 (one) consists of the digital communication infrastructure of an Open Access MAN, responsible for connecting the stations at level 0 (zero) to the sensor network in level 3 (three).Gateway devices are in level 2 (two), and is responsible for the interconnection between the Open Access MAN and the sensor network.In the case study, a device in level 2 establishes communication with the center station through a TCP socket.At last, in level 3 (three) lies the sensor network.The author has considered mainly a ZigBee network at this level.Pires's paper shows the huge potential of Open Access MAN, through its available resources, to create urban scale sensor systems.However, the proposed architecture holds a strong coupling with the protocols and technologies used, what makes it difficult to scale the system and to use heterogeneous sensor networks.
Taking in consideration the heterogeneity of the sensor networks that coexist in a municipality, Molina et al. (2014) came up with a solution to integrate the data of the sensor networks existing in a given area of interest, which is called by the authors Area Sensor Network (ASN).In the context presented by the authors, an ASN comprises body sensors, wireless sensor networks and also fixed nodes in the environment.Each network has its own technology and sends its information to a station named Sensor Observation Service (SOS), one of the standards of the Sensor Web Enablement (SWE) framework, proposed by the OGC.Each SOS, on its turn, supplies data for external applications by means of Web services.
According to the authors, a smart city is supposed to have various ASNs, which centralize information in a management center.Under a perspective of monitoring the status and configuration of the sensor networks, the solution presented does not allow different networks to be monitored from a unified vision.In the way it was structured, each network should be observed independently, surely by proprietary software.What we are doing by proposing this work is to break this kind of restriction.There have to be generic interfaces which enable to monitor and also carry on some management functions, for instance, accounting, from a generic interface without utilizing specific systems and proprietary protocols for such a function.Fan and Guo (2011), in their work, present the application of low-power networks (Zig-Bee) in urban scenarios, by means of a system for controlling public lighting.An architecture is shown in their paper.The motivation of the authors regards the population increase and city expansion, factors that bring about bigger demand of electricity, plus the existing problems of the traditional control systems.The proposition consists of ZigBee terminals installed in the lampposts building, this way, a meshed network to control the lighting.Controlling nodes, acting as gateways, are responsible for communicating with the ZigBee network and with the monitoring and controlling center of lighting, through the GPRS modules.The monitoring center allows the remote control of the bulbs and is also responsible for the data storage.
Concerned about the population increase of the big cities, and about its impact on the consumption of natural resources (water, soil, vegetation), Corici et al. (2014) came up with a reference architecture for Smart Cities based on the Machine-to-Machine (M2M) frameworks, specifically on the ETSI M2M/oneM2M platform.This platform is the middleware of the architecture, in which the smart devices localized in interest points are connected, and integrated to the Smart City platform.Such an architecture supplies support for the development of applications of Smart Energy, Smart Home and Smart Green City.The authors reinforce the fundamental role that the interoperability plays in this scenario, bearing in mind the amplitude that technologies and standards can take.The architecture is, nevertheless, solely conceptual, being itself part of a TRESCIMO group publishing, whose purpose is to apply it in the cities of Gauteng (South Africa) and Sant Vicenç dels Horts (Spain).It should be pointed out that the authors do not specify means to monitor and manage the various heterogeneous devices that can be part of the environment, neither the means nor standardized interfaces for information exchange in a generic way among applications.
The heterogeneity of sensor devices and the matters regarding interoperability among systems have led the proposals to be designed for aiming to integrate computing mechanisms addressed to services, which, by their very nature, present a low coupling and highly scalable solution.Wang et al. (2012) bring us a model of layers that includes semantic solutions on the sensing level (sensor devices).This model is known as Semantic Sensor Service Networks.The authors point out that those solutions provide support to the access, discovery and composition to semantic services supplied by the sensors.According to them, the connectivity to semantic sensors may occur in a two-fold way: direct, when the sensor itself supplies services to external systems; or intermediated, when there is the utilization of intermediary nodes, known as gateways.The first approach demands more robust nodes, with bigger computing capacity.The second approach enables the organization and composition of services; however, it requires intermediary processing.
The authors do not describe the processing of observations, measures and data abstractions.Several approaches are also presented for the utilization of semantic.It is worth considering the viability and benefits that the use of certain existing standards can bring, bearing in mind the dimension of the target project.All leads to believe, nevertheless, that the future of the semantic sensor networks lies in the use of REST(ful) interfaces.
Presently, the growth of efforts to apply sensor networks in urban scenarios is evident.However, the architectures are used to having low flexibility and, most of the times, are restricted to specific application domains.The lack of a proper communication infrastructure to cover a wide area, such as an entire city, makes the integration of sensor networks difficult.Open Access MAN's provides both scalability and flexibility to easily and efficiently integrate remote nodes in a city.However, in order to integrate heterogeneous sensor networks ensuring efficient monitoring and management of distinct technologies, the development of an architecture based on generic and independent platform standards is still necessary to allow monitoring the state of the sensor nodes by means of an ubiquitous system.Thus, we propose the architecture presented in this paper, which is based on service-oriented concept, employing Web services both at the application as well as at the communication levels.

The proposed architecture
The deployment of sensor systems in this scenario is complex and has to be carefully analyzed.Distinct application domains must share real-time sensor data in order to help expert systems to analyze and correlate these data, then predicting phenomenon, identifying patterns, suggesting improvements and proactively reacting to events.
Considering the elements that compose both sensor networks and the digital communication infrastructure of an Open Access MAN, a layered architecture composed of Application, Communication and Sensing layers is presented in this paper.Figure 1 shows the layers of the architecture.
This architecture uses Web standards, such as HTTP protocol, XML and JSON data format, to create Web services where services can be employed at both communication and application layers.Thus, this architecture permits the design of generic and platform independent interfaces.
The application layer includes the Web server and the database instances of the sensor system.It is responsible for centralizing the data gathered by the sensor networks of different domains and also provides friendly interfaces for the network managers.This layer allows third party systems to obtain, through REST (Representational State Transfer) architecture based Web Services, the collected data in flexible data formats, such as JSON (JavaScript Object Notation) and XML.
Due to hardware and software heterogeneity that can be employed to create sensor networks, generic interfaces must be provided to abstract those differences.The communication layer comprises the communication infrastructure (data network) of an Open Access MAN, which is responsible for interconnecting the monitored environments in the urban scenario, and gateway devices, responsible for mediating the interactions between the application and the sensing layers through the Open Access MAN.In this layer, these gateways act as service providers, providing discovery, security, setting and data collection services for the underlying sensor networks.It is considered the use of XML-RPC (XML Remote Procedure Call) based Web services to interconnect the application and sensing layers through gateway devices.
The sensing layer is composed by sensor networks that are responsible for gathering data about the environment phenomenon of interest.It can also have elements able to intervene in the state of the environment, the socalled actuators.Gateways are also part of this layer, once they intercommunicate through a specific protocol with the network of subjacent sensors.It is considered that heterogeneous sensor networks could be employed in this layer.It is important to notice that the appli-cation layer is unaware of the communication protocols used in the sensing layer, since the gateways must provide uniform interfaces to access the network information.

Open Access Metropolitan Networks
The convergence among high-speed optical and wireless networks enables the offering of almost unlimited bandwidth and provides a wide range of services by means of digital communication networks.Open Access Metropolitan Networks provide the infrastructure necessary to create the called Digital Cities.This is an ideal infrastructure for applying sensor networks, allowing the deployment of Wireless Personal Area Networks, like ZigBee, in metropolitan scenarios.An Open Access MAN provides a reliable and efficient mean to convey different traffic sources and to interconnect remote places in a Digital City.
Our proposed architecture is based on the Open Access MAN model presented in Mendes et al. (2010)  The Network Core is built using an optical fiber network, being capable of supporting heavy traffic demand of the city, reaching about hundreds of gigabits of information per second.It has to attend the demands of the largest bit rates generators of the city.The core also offers interconnection points to the distribution layer.
The distribution layer centralizes the input and output data flow from the points connected to the access layer.The points in this layer are connected directly to the core through a GPOP.The information transfer rate in this layer is lower than the one existing in the core.Those points are labeled as DPOP.
The access layer provides points to connect houses and small businesses.These points are derived from the DPOP and can employ technologies such as Wi-Fi, twisted-pair cable or optical fiber.
The Open Access MAN is capable of interconnecting the monitoring environments in the proposed architecture.Its digital communication infrastructure, based on TCP/IP and Ethernet standards, is the base of the sensor network monitoring architecture.The Open Access MAN interconnects the sensor network gateways, which in turn communicates with the underlying sensor networks.

Security of information
Security in Open Access MANs is very important.When considering the role played by the network interconnecting public administration buildings, private homes and businesses as well, data handled by the network may become very sensitive.The proposed architecture described in this paper provides different approaches regarding to information security to be applied on its three layers.In the application layer the access to the monitoring system is performed through the use of credentials based on username and password.In the communication layer, the sensor networks traffic is separated from the others through VLANs (Virtual Local Area Networks).Another approach to establish secure communication between the gateways and the server in the application layer is the HTTP (Hypertext Transfer Protocol) protocol over SSL/TLS (Secure Socket Layer) (HTTPS).This approach, along with BASIC-AUTH, restricts the access to the services provided by the gateways and avoids tampering of data.The sensing layer security is dependent on the employed technology.

Software modeling
Regardless the application context, the main goal of sensor networks is gathering data.To develop a system suitable to the proposed architecture is necessary to identify the main entities related, their attributes and features, as well as the relations between them.General models must be designed so that they can be used to guide developers in the development process of similar systems.
A domain model is important to represent features of the concerned entities.The purpose of a domain analysis is to create classes of analysis or patterns that are as reusable as possible, so they can be applied to solve common problems (Pressman, 2009).A domain model provides the basis, the structure for the system information needs of the system.Deployment diagrams are also employed to expose the software components of the system in the physical architecture.Hardware components and protocols are exposed as well.
Supported by the Web application context, the MVC (Model-View-Controller) pattern has been used to model the application layer.Figure 3 shows the application layer of the architecture according to MVC.
MVC allows decoupling the business logic from the presentation of the information.The model of MVC corresponds to the system business layer.It is responsible for encapsulating and managing all applicationspecific content and processing logic.The model layer supplies abstract mechanisms of access to data stored in relational database, through the DAO (Data object access), so that this layer is independent from the DBMS (Database management system) used.The view enables the content presentation.The user interaction layer is responsible for monitoring the city sensor networks.A Web Portal represents this layer in the architecture.The controller layer is responsible for managing the communication between the view and the model.The Router in this layer is responsible for determining which module, controller and action should be called upon with base on the endpoint URI received in the request.According to Figure 3 the gateways communicate directly to this layer through the exchange of XML messages.The same happens to Web service clients, but the data must be in JSON format.
A layered system allows the modularization and facilitates its maintenance.

Case study
This section describes the configuration of a case study performed in the Digital City of Pedreira, in the state of São Paulo, Brazil.As a proof of concept, an environmental monitoring system was developed in accordance to the proposed architecture, following the software modeling shown in section 3.3.The reminder of this section describes the study conducted, beginning with the description of the setting target.

Pedreira's Open Access MAN
Pedreira city holds around 45,000 inhabitants and received the Open Access MAN project in 2006, an initiative of LaRCom (Unicamp) along with the municipal government.Its communication infrastructure is hybrid, comprising a fiber-optic backbone Gigabit Ethernet (about 30 km of mono-modal optical fiber) and wireless access cells based on the IEEE802.11 a and g standards.Currently, there are about 60 cells spread throughout the city.The Open Access MAN 's objective is to interconnect public buildings, such as schools, Gbuildings and health centers.The Open Access MAN also links about 4,200 houses, providing countless services to the municipality, for instance, the free-of-charge access to Internet.
The components of the architecture were deployed in different spots of the city.The chosen spots were the City Hall (P01) and the Open Access MAN management center (P90).The Figure 4 displays a partial map of Pedreira Open Access MAN, highlighting the spots utilized in the case study and the means of interconnection among them.
In the Open Access MAN management center was deployed the Web application and database servers.In the city hall building it was configured the ZigBee wireless network, made up of temperature sensor nodes and a gateway device.The gateway is connected to the Open Access MAN, so that it sets up the communication with the Web server in the application layer through XML messages by HTTP.
Figure 5 illustrates the logical interconnection among the mentioned spots.
The Open Access MAN is responsible for interconnecting the spots monitored in the municipality.Specifically, it connects the gateway devices that are able to establish communication with the underlying sensor network.
For granting the security of information in the Open Access MAN, it was created a VLAN to segregate the sensor network traf-fic from other existing traffics.Also, we have adopted the basic HTTP authentication based on username and password for communication between the server station and the gateways.Only by providing these credentials, it was possible to get data from the monitored network.

Sensor network
A ZigBee network was deployed in the city hall building.The network, which is part of the sensing layer of the architecture, is made up of two sensor nodes capable of gathering temperature information and also  the levels of wireless signals of the network in the place.The sensors were positioned in different rooms of the building.One of the monitored places was the Data Center, where the Open Access MAN traffic is centralized.The other monitored place was a regular room of the city hall building.
For making the sensor nodes two micro-controlling boards Arduino Uno R3 have been used.Two different temperature sensors were employed: the LM35 and the LM61.Both the sensors have output voltage linearly proportional to the temperature in degrees Celsius (+10 mW/ºC), showing, however, different precisions.
In order to establish communication between the sensors and the gateway through ZigBee protocol, it was used two Digi XBee 802.15.4/ZigBeeSeries 2 modules (Digi, 2014a) , with wire antenna, 2.4 GHz of frequency, 1.25 mW transmission power, and 3.3V power supply.The other component of the sensor network is a component of the gateway.It is an XBee 802.15.4/ZigBee with 2.4 GHz RPSMA antenna, configured to act as the coordinator of the network.
To constitute the communication layer, it was used a gateway device, the commercial version of ZigBee/IP ConnectPort X2 (Digi, 2014b).It is made up of an XBee radio for wireless communication by IEEE802.15.4 protocol, and has an embedded Web server.It also has an Ethernet port to allow connection with the Open Access MAN. Figure 6 shows both the gateway and one of the sensors deployed.

Web application server and monitoring application
The server in the application layer was developed with the server side script PHP (Hy-pertext Preprocessor), version 5.4.12.It was employed to connect to the database service and also to create REST based Web services to share sensor data between external systems in the city.As an HTTP server, we used Apache, version 2.4.4.Both the technologies, Apache and PHP, run on platforms based on Unix and Windows.
For the logging of information from the sensor networks, it was used DBMS MySQL 5.6.12.All the tools mentioned hold free-ofcharge commercial licenses.
To be the front-end of the system, it was developed an interface that allows the network managers to monitor the ZigBee sensor network deployed in the city hall.It was considered the state-of-the-art of Web technologies, such as thin-clients and Responsible Web Design.
The access made by the administrators should be done in the face of credentials based on username and password.The system does identify the user and his access privileges to enable the handling only of places where it has enough permission.Figure 7 shows part of the Web Interface after the mentioned filters have been applied, with details of the ZigBee network in the city hall.
As shown in Figure 7, the network manager is able to visualize the nodes components of the sensor network as well as their state, whether it is reachable or not.That information is provided by the gateway in the communication layer through the query state service.Since the gateway also provides discovery service, the administrator can, by Web interface, call this service by clicking in the "Search nodes" button.The details of new nodes are then shown in the same interface, if there is one.Also, in this interface, the network topology is presented in real-time, showing the By selecting one of the devices in the network, the Web application performs a XML-RPC call to the gateway to gather settings information from the selected node.Those data change based on the selected node.The administrator can also, by Web interface, perform and apply changes in such settings, such as network address, and destination data node address, among others.
An important module of the developed interface is the data viewer, where the collected data from the sensor network are displayed graphically.Figure 8 shows an example.
Charts are generated in real-time according to the parameters provided by the administrator.Also, through this interface the administrator can allow or deny access to the sensor network data from external services though the REST Web services exposed in the context of the Open Access MAN.

Results
As we have already mentioned, the objective of the case study is to show that the architecture proposed can be used for monitoring the heterogeneous environments in a unified way, promoting the data-sharing and interoperability among the systems.Thus, it is worth stressing that the objective in this item is not to carry on a deep analysis of the data collected, but to demonstrate that the use of the architecture in the scenario in question has the power to collect data from the sensor networks.The way we show this issue is by elaborating graphs capable of demonstrating the data gathering by Pedreira's Open Access MAN.Implicitly, we are demonstrating the coherence of the data collected, as well as, the continuity, i.e., the architecture revealed a steady and uniform behavior throughout all the tests submitted.Surely, for the graphs to be within a context, we have offered an analysis regarding the data behavior, without concerning the details.The monitoring of the spots in the Pedreira city hall was carried out between March 27 th and May 12 th , 2014.During this period, the data collected by the ZigBee network fed the storage database in the application layer and were used to perform some simple statistical analyses.
After the deployment of the sensor network in the city hall and the setup of the application server, ZigBee network was configured through the Web application.Figure 9 shows a comparison among the daily average temperatures gathered in the period of two weeks during March and April.
Based on the collected data, it is possible to build a temperature background which can lead us to predictions, identifications of patterns and abnormalities.It can be seen in Figure 9 that the sensor terminal installed in the regular room (LM35) of the building collected higher temperatures than the Data Center (LM61).This is because there were air conditioners in Data Center's room for cooling Data Center equipment's.
The gateway provides service with information about the ZigBee wireless communi-cation.For each temperature sampling, it was also taken information on the intensity of the received signal (RSSI) and of the quality of the link (LQI) between the gateway and the radios to evaluate the levels of quality of wireless communication in the network.The RSSI is an indicator, measured in -dBm, of the power of the signal received by the antenna of the coordinator, where a higher value means a stronger signal.The LQI, used in the IEEE802.15.4 network is a quality metric of the received signal, which considers the intensity of the signal and also of the received error ratio.
The limits of the LQI are 0 and 255.Likewise, the greater the value, the better the quality of the signal.The Figure 10 displays the values collected from the Data Center node.
The data presented in Figure 10 show small variations concerning the LQI.However, these variations were not sufficient to degrade the communication between the coordinator and the Data Center XBee terminal.The black shadow existing in some points is due to the great amount of samples with the same values of RSSI and LQI, which, as previously mentioned, show very low variation.
Figure 11 exposes information of the wireless communication collected from the node implemented in the room next to the Data Center.It is also possible to remark the big concentration of samples with the same values.
By analyzing Figure 11, it is possible to notice that the established wireless communication was of good quality.It is also possible to conclude that the intensity of the received signal is not directly related to the quality of the link, once some higher values of the RSSI were accompanied by smaller LQI values.That is because the LQI considers both the signal strength and the errors received regarding the environment noise.In possession of these   pieces of information on wireless communication, it is possible to identify electromagnetic interferences and perform changes in the topological organization of the nodes.
It is possible to conclude that there were no considerable levels of interferences in the monitored environments, although ZigBee operates in the ISM (Industrial, Scientific and Medical) band, along with Wi-Fi capable devices and others, like microwave ovens.

Data sharing
The sharing of data collected from the different sensor networks was possible through the use of REST Web services.Figure 12 shows the data collected from the Data Center environment in the city hall, reported in the XML and JSON formats.
Sharing data in different formats allows external systems to opt for the alternatives that most meet their needs.It is important to mention that the formats used are supported by the great majority of the programming languages.

Conclusions
The digital revolution that has been occurring for the last two decades boosted by the information and communication technology breakthrough has been changing our way of communicating, working and living.
Our cities are becoming intelligent.This new model of technological city, one that reacts to people's actions, will be even more pervasive.It is important, then, to apply open standards and non-proprietary technologies to easily deploy and integrate systems, avoiding the independent growth of systems unable to cooperate among themselves.Therefore, this paper has presented an architecture based on the concept of service orientation for monitoring the sensor networks in Digital Cities, conceived on the Communication Infrastructure of Open Access Metropolitan Area Networks.
The proposed architecture takes advantage from the benefits of modularity and separation of concerns.The Open Access MAN sets the base for the construction of the architecture, as it supplies the physical environment to interconnect different sensor networks existing in the municipality.Also, in the communication layer, the platform independence and the possibility of monitoring heterogeneous devices, concerning to hardware and software, were reached through the use of Web services.This way, different sensor networks can be used to promote improvements of services in the municipality.Such architecture allows the centralization of information of different domains, imposing to the network administrators only the use of a Web browser to carry on the management of those pieces of informa-  Information collected in real time can be shared in flexible formats of data through the Web services.The key to enhance the services in a municipality is an intelligent decisionmaking process.Using information from different domains allows the definition of better strategies for optimizing the services.The applied technologies make heterogeneous network monitoring easy.
The application of the environmental monitoring system in the city of Pedreira has allowed evaluating the work proposal.The interface and standards applied allowed quick and fast installation and the setting of the sensor environment.The system implemented was able to collect data from different networks and report data to the user in an efficient way, besides allowing the management of the environment and of the network components, similarly, providing interfaces with external systems.
New applications can be developed with the services of data sharing in the application layer.Some examples of services include upto-date information about climate conditions in determined points of the city, traffic conditions in different places of the city as well, localization of people and things, and so on.
It is important to highlight the importance of the described experimentation in a real scenario, what is usually performed constrainedly in laboratorial environments.We have realized that the model of the architecture proposed in this work goes beyond the context of Digital Cities, and can be employed in situations where there is a diversity of applications being monitored, as well as wide-scale scenarios.We also point out that the architecture proposed proved to be reliable, since we did not identify communication failures between the sensor networks and the servers in the application layer.

Figure 1 .
Figure 1.Layers of the proposed architecture.
. On the physical point of view, this model is split into three layers: Network Core Layer; Distribution Layer; and Access Layer.These layers are interconnected through Points of Presence (POPs), which can be either of Distribution (Distribution POP), or with high traffic demand (Gigabit POP). Figure 2 presents the Open Access MAN layers mentioned above.

Figure 2 .
Figure 2. Physical structure of an Open Access MAN.Changed from Breda et al. (2011).

Figure 3 .
Figure 3. Application layer according to MVC.

Figure 4 .
Figure 4. Open Access MAN spots of Pedreira utilized in the case study.

Figure 5 .
Figure 5. Network structure used in the case study.

Figure 6 .
Figure 6.Devices deployed in the city hall building.(a) Sensor device (b) Gateway ConnectPort X2

Figure 7 .
Figure 7. State and topology of the ZigBee network.

Figure 8 .
Figure 8. Sensor network data view module.

Figure 9 .
Figure 9. Daily average temperatures throughout March and April.

Figure 10 .
Figure 10.RSSI values and LQI of communication between the coordinator and the Data Center node.

Figure 11 .
Figure 11.RSSI values and LQI of the communication between the coordinator and the node of the room.

Figure 12 .
Figure 12.Sensor data reported in different flexible format.

( a )
Records in XML format (b) Records in JSON format tion, and, among other things, the presentation of sensor data.