# An IoT System for Remote Monitoring of Patients at Home
## 5 Protocol Conversion in the IoT System
### Protocol Conversion Cases  
Table 4 shows the mapping between oneM2M protocol Request messages (right column) and ISO/IEEE 11073 protocol Request messages (left column). The mapping between response messages is similar, and for this reason a description of those is omitted here. In the table, an Association Request (ISO/IEEE 11073) message is converted into a Retrieve Request (oneM2M) message. A Present (Store Sensing Data) Request message is converted into two types of oneM2M messages (i.e., a Retrieve Request message and Update Request messages). Because a Present (Store Sensing Data) Request message can contain multiple biomedical sensing data items, Update Request messages are generated according to the number of sensed data items in the Present (Store Sensing Data) Request message. Before generating the Update Request messages, one Retrieve Request message is generated to access environmental information for the sensed data items. It is not necessary to perform a protocol conversion on the incoming Association Release Request message. When a PHD wants to communicate, it initially sends an ISO/IEEE 11073 Association Request message to the other side. Figure 5 shows how to convert an ISO/IEEE 11073 Association Request message into a oneM2M Retrieve primitive Request message in a gateway (MN-CSE). Information related to the thick lines in the figure is involved in the protocol conversion process. In other words, the \"System ID\" field in the ISO/IEEE 11073 Association Request message is used to make the \"<to>\" tag field in the oneM2M Retrieve primitive Request message. The \"System ID\" field is 8 bytes long and contains the identification number of the PHD (ADN-AE). Before building the oneM2M Retrieve primitive Request message, the gateway must check whether the PHD whose ID is in the \"System ID\" has been registered in the IoT server (IN-CSE) or the gateway. Information in the other fields in the ISO/IEEE 11073 Association Request message is saved for later use (i.e., building the related ISO/IEEE 11073 Association Response message which will be sent in the opposite direction). Figure 6 shows an example of the process shown in Figure 5. An ISO/IEEE 11073 Association Request message (i.e., a message before conversion) is represented in the upper box, while the resulting oneM2M Retrieve primitive Request message (i.e., a message after conversion) is in the lower box. From the first line of the ISO/IEEE 11073 Association Request message, the gateway knows that \"APDU Choice Type\" is 0 xE2 0x00, which means this message is an ISO/IEEE 11073 Association Request message. \"System Type\" on the eleventh line is 0x00 0x80 0x00 0x00, which means that the PHD, the source of this message, is an agent. \"System ID\" of the PHD on the twelfth line is 0x11 0x22 0x33 0x44 0x55 0x66 0x77 0x04, which goes to the \"<to>\" tag field in the resulting oneM2M Retrieve primitive Request message and it is represented in URL (\"//CSEBase/1122334455667704\"). Just above the \"<to> tag, \"<operation>\" tag must be defined and \"2\" is inserted, which means that this message is built for Retrieve operation. \begin{table}
\begin{tabular}{c c} \hline ISO/IEEE 11073 Protocol Request message & oneM2M Protocol Request message \\ \hline Association Request message & Retrieve primitive Request message \\ \hline Present (Notice Configuration) Request message & Create primitive Request message(s) \\ \hline Present (Store Sensing Data) Request message & Retrieve primitive Request message(s) \\ \hline Association Release Request message & - \\ \hline - & Delete primitive Request message \\ \hline \end{tabular}
\end{table} 
Table 4: Mapping between oneM2M request messages and ISO/IEEE 11073 request messages. Figure 5: Conversion of an ISO/IEEE 11073 Association Request message to a oneM2M Retrieve primitive Request message. Figure 6: An example of the process described in Figure 5.  
When the IOT server decides to communicate with the PHD, the server sends a oneM2M Retrieve primitive Response message.