# SDN Architecture for 6 LoWPAN Wireless Sensor Networks
## 1 Introduction  
Due to simplicity and low energy consumption, wireless sensor networks (WSN) are are being increasingly used for data acquisition and control of remote devices. In general, WSN can be considered as a low power and lossy network (LLN), presenting some constraints for use in critical and large-scale scenarios. The main limitations come from the nature of its components, such as lossy links, and devices with power supply limitations, poor processing power and limited memory. Other important limitations are the difficulty of building WSN management systems and the lack of flexibility regarding policy changes [1]. The first prevents deployment in scenarios where the operation is subject to requirements that are more strict concerning reliability and performance, while the second stems from the rigidity of WSN with respect to policy changes, pointing to the difficulty to adapt it to factors external to communication and networking, such as business rules and accessibility. A very important scenario with the aforementioned characteristics is the advanced metering infrastructure (AMI) of the smart grid. A relevant part of the AMI network is to handle communication in the neighborhood area, which usually involves many metering devices deployed in a large and complex geographical area. AMI requires that readings of thousands of metering devices be routed to a central collector and the execution of remote commands, such as cut-off and reconnection of consumers. Considering these requirements, the use of wireless communication is almost unanimous for the collection of information and operation of AMI devices. The possibility of direct and bidirectional access to devices using IP technology considerably reduces the mentioned difficulties, but some issues emerge with respect to the complexity of interconnection. A basic premise of IP is end-to-end communication, which allows devices to be accessed without the need for gateways to adapt protocols. The 6 LoWPAN standard (IPv6 over low power wireless personal area networks) has been developed to avoid adaptation [2], making it possible to reach WSN devices with IPv6 addresses. Routing decisions in 6 LoWPAN are made by distributed protocols, especially the routing protocol for low power networks and losses (RPL) [3]. Each device routes the data using the information computed by RPL. Although 6 LoWPAN (with RPL) has several positive aspects, some constraints have been pointed out: the computational complexity of the protocol executed on devices with low processing power and the lack of a unified vision of the network, which can contribute to high costs for building management systems [4]. A software-defined network (SDN) is an architecture that aims to make networks agile and flexible. SDN's goal is to improve network control by enabling network operators to respond quickly to changes in business requirements. Moreover, because it allows networking applications to reason about the network from a unified view of the topology, it can be considered as an alternative to overcome the above limitations. This main advantage adds to others, such as providing more flexibility in the introduction of new services, allowing for vendor independence and enabling faster innovation [5]. SDN uses a central mechanism to make routing decisions instead of the decentralized protocols. Initially adopted in wired networks, the SDN approach has been expanded to wireless networks such as Wi-Fi mobile networks [6] and software-defined wireless sensor networks (SDWSN) [1]. This paper presents an architecture called SD6 WSN (software-defined 6 LoWPAN wireless sensor network), to control data plane forwarding in 6 LoWPAN according to the SDN approach. SD6 WSN defines a controller that communicates with data plane nodes through a control plane protocol (SD6 WSNP), which uses IPv6 and RPL at layer 3, UDP at layer 4 and the constrained application protocol (CoAP) [7] at the application layer.