## 3 Key Building Blocks
### M2M Gateway with Constrained Devices
However, the IPv6 protocol is inadequate for low power wireless networks because of high overhead. As a consequence, the IETF 6 LowPAN WG [14] has proposed adaptations of the IPv6 protocol for constrained wireless networks. For example, standards have been proposed for the transmission of compressed IPv6 packets over IEEE 802.15.4 networks [15]. IPv6 and 6 LowPAN network stacks are natively available on common operating systems for embedded devices (e.g., Contiki and TinyOS), therefore making them able to communicate with both Internet and LLNs devices. Another aspect of low power networks is the strong constraints on routing protocols, which must be different from those used in traditional IP networks. First of all, links conditions may change frequently during time, therefore a routing protocol must react quickly to these changes. Second, the nodes have really strong storage constraints; therefore a routing protocol should work even if a node has not stored all the routes to each other node in the network. Third, since the nodes have severe energy constraints, the exchange of control messages should be kept as low as possible. One solution is provided by the RPL routing protocol. It has been developed to have really limited control traffic, to fit harsh and constrained environments, with limited data rate and potentially elevated error rate. RPL is a distance-vector protocol based on the creation of a routing tree, referred to as Destination Oriented Acyclic Directed Graph (DODAG), where the cost of each path is evaluated according the metrics defined in an objective function. The goal of this protocol is the creation of a collection tree protocol, as well as a point-to-multipoint network from the root of the network to the devices. Communication with constrained M2M asset devices has been enabled by energy efficient proxy including CoAP, RPL and 6 LowPAN, Figure 12. CoAP standard is applied to support REST-style applications in constrained environments. 6 lowpan is applied with IEEE 802.15.4, to handle MTU sizes and compress IPv6 headers from 60 bytes to 7 bytes. RPL routing protocol is applied to limit the required control traffic, to enable routing in harsh and constrained environment with limited data rate and low error rate. The proxy component is needed to handle heterogeneity of M2M devices and local M2M asset networks, data delivery over constrained wireless links and interworking functionalities for application messages between local M2M asset network and Internet with ETSI M2M SCL. The proxy can be applied to optimize M2M communications, and it is needed also to enable interworking with ETSI M2M SCL via gateway interworking proxy (GIP), Figure 7. By serving fresh information from a cache instead of querying the endpoint itself, one could experience a shorter delay or a better QoS on a particular request. Also, caching may help reducing the overall consumption of energy-constrained network by reducing the number of wireless transmissions required for collecting data. In the example case, the CoAP, IPv6 and 6 LowPAN network stacks on Contiki platform has been applied [70]. The implementation leverages the ContikiMAC low-power duty cycling mechanism to provide power efficiency. Based on the results of the CoAP request/response cycles are most energy-efficient when each message fits into a single 802.15.4 frame. When messages are bigger than frames, the interoperation of information models, data encoding/decoding, and segmentation/reassembly with constrained M2M capillary networks and M2M asset devices need to be carefully considered together with proxy. In the evaluation environment, it is seen that smart decisions related to querying are able to optimize energy consumption i.e. whether to use cached value or to query over the network. In addition, if several routes are available, smart decisions can be done to minimize energy consumption. Figure 12: M2M communication proxy for energy efficiency.