I have done research on IoTivity for months. I found that there is a problem. The IoTivity doesn’t support LoRa network. Another problem is that the CoAP message is too big for the LoRa network. Therefore, I need to figure out a solution for LoRa network. The solution is data compression.
We all know that IoTivity have a connection abstraction layer. The IoTivity framework call the connection abstraction API to send the CoAP message. From the CA API slides, we know that there is a CA control component to control CoAP protocol. We can see from the figure 1 below.
Fig.1 CA architecture 
If we go for more details, we can see from figure 2 that there are different handler and thread to control different function of CoAP. What we are looking for is doing message compression in message handler part. There are eight default interfaces and several default well-known URI in IoTivity. We can represent this information into number. We can use mapping to achieve this in message handler function.
Fig.2 CoAP protocol function 
For example, in figure 3, it is a screenshot from Wireshark. It shows the content of a CoAP request which is generated by IoTivity. We can see that there is an interface called oic.if.baseline. It is one of the 8 default interfaces from IoTivity. My idea is to represent this interface name into number, for example, 0. Because CoAP protocol doesn’t have the error correction mechanism, we change the data here will have no influence of the transportation. Hence, the whole procedure is that when client sends a request with default interface, there are no change in IoTivity framework, we do the data compression in the CA control component and send it out. When the server receives the message, it will go to CA control first, we expand the message to original interface name and forward it to the upper layer so that we don’t need to modify the IoTivity main part and achieve the goal of data compression.
Fig. 3 Wireshark screenshot
As a matter that I'm not a programmer, so I shared my idea here, anyone who is interested in the idea, can do the implementation and test the idea by writing a LoRa API and then compressing the data using my idea.
My contact information: email@example.com