# An Efficient Interface for the Integration of IoT Devices with Smart Grids
## 3 Related Work  
This section discusses a set of works that present the adaptation of CoAP to communication protocols used in SGs, such as the ETSI M2M, Distributed Network Protocol 3.0 (DNP3.0) and International Electrotechnical Commission (IEC) 61850 protocols. As we can see in the works summarized in Table 1, some techniques used for protocol adaptation include native Application Interface Programming (API), Uniform Resource Identifier (URI), and packet mapping. These solutions are analyzed below. In [28], the authors present the ETSI M2M system that addresses some issues in SGs identified and discussed in the literature. The work adopts CoAP as its native application layer protocol and uses it to carry all messages. Such services are made available using an open and native API. CoAP is used for communication with the transmission system, the distribution system, and consumers. The service-oriented demonstration prototype enables integration of a variety of M2M devices and utilizes a variety of communication technologies such as IEEE 802.15.4, 3G and GSM/GPRS. The authors of [29] present an integration between CoAP and DNP3.0 protocols in order to implement a gateway to support CoAP in SGs; the integration allows communication M2M communication. To perform the integration between the protocols, the authors implemented a mapping layer as an interface. This interface is required because both protocols use layers that offer services with different protocols. DNP3.0 uses High-level Data Link Control (HDLC) and CoAP uses UDP. The authors used the GET and PUT methods of CoAP mapped, respectively, to the READ and WRITE methods of DNP3.0 to test and evaluate their implementation. A comparison of CoAP with Simple Object Access Protocol (SOAP) showed that the former performs better than the latter because SOAP adopts TCP, even using DNP3.0 services through adaptations. An integration of CoAP with the IEC 61850 protocol for SGs is presented in [30]. In the paper, the authors also applied a mapping layer approach to tailor message exchange between CoAP and \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Work** & **IoT** & **SG** & **Adaptation** \\ \hline
[28] & CoAP & ETSI M2M & Native API \\
[29] & CoAP & DNP3.0 & URI mapping \\
[30] & CoAP & IEC 61850 & URI mapping \\
[31] & CoAP & IEC 61850 & URI mapping \\
[32] & CoAP+CBOR & IEC 61850 & URI mapping \\
[33] & XMPP & IEC 61850 & Packet mapping \\ This work & CoAP & OSGP & Packet mapping \\ \hline \hline \end{tabular} Note: CBOR – Concise Binary Object Representation.  
\end{table} 
Table 1: Related work. Figure 2: Simplified layered stack of Open Smart Grid Protocol (OSGP) (adapted from [27]). IEC 61850, which uses TCP as the transport layer. The methods offered by both protocols are mapped to perform the conversion and enable message exchange. A gateway is responsible for protocol integration through a mapping layer. On conversion, the IEC 61850 protocol information model is converted to a URI of the CoAP protocol. In traffic tests, the authors observed that packet delay in the network was negatively affected, having a higher latency than in the individual evaluation of the protocols. In [31], the authors review protocols possible to be integrated with IEC 61850. Through this review, the authors decided to use CoAP because it is a standard already used in IoT and for being targeted at resource-constrained devices. The mapping of CoAP (GET, PUT, POST, and DELETE) methods to IEC 61850 methods is performed using CoAP URI. For adaptation between the protocols, the authors developed modules that have specific functions and reduce the complexity of integration. The authors state that their implementation is better than that of [30] because it covers all Abstract Communication Service Interface (ACSI) services. To improve the adaptation between the protocols, in [32], the same authors developed a version integrating CoAP and Concise Binary Object Representation (CBOR) in which they reduced the message size by 44%.