Documente Academic
Documente Profesional
Documente Cultură
Redistribution and use in source and binary forms, with or without modification, are permitted
provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and
the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions
and the following disclaimer in the documentation and/or other materials provided with the
distribution.
3. The name of the author may not be used to endorse or promote products derived from this
software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
2
Developer Guide LWM2M IPE
Contents
1. Introduction ...................................................................................................................................................... 4
3
Developer Guide LWM2M IPE
1. Introduction
oneM2M is an IoT server platform standard that supports devices as well as cloud server,
while LWM2M(Light Weight Machine to Machine) is an IoT service platform that supports
devices. IPE(Interworking Proxy Entity) defined in oneM2M enables LWM2M device to work
with oneM2M server side platform.
LWM2M IPE uses Eclipse Leshan source code as a basis which is aligned with LWM2M
standard implemented in C and Java. A gateway is required to run Eclipse Leshan core
and oneM2M device platform which is implemented in Java or Node.js. For instance, IPE
needs an OS that can run JVM(Java Virtual Machine) or Node.js and Eclipse Leshan core
that can run on the Raspberry pi.
4
Developer Guide LWM2M IPE
2.1. Introduction
In this IPE sample case, a LWM2M device by ourselves because it is difficult to find a
representative commercial product. So we will use the Arduino UNO, Raspberry Pi, Humiture sensor
and LED light to simulate a real LWM2M real device.
Figure 2 shows hardware devices needed. Raspberry pi runs LWM2M Client and oneM2M
IPE(LWM2M Server inside), PL2303 USB UART is used to make Raspberry pi and Arduino UNO
transport data with each other through serial port. Arduino UNO collects sensing data from DHT11
sensor and controls LED light ON and OFF.
Ω resistance for pull up data pin of DHT11 Sensor and 220Ω resistance for protecting LED light.
5
Developer Guide LWM2M IPE
3.1. Download
1. Download the LWM2M IPE Sample source from IoT Ocean home page.
6
Developer Guide LWM2M IPE
7
Developer Guide LWM2M IPE
If you are first time to import these maven project maybe it will cost a few minutes for downloading
depended libraries. When import finish you can find the keti_lwm2m_device and keti_lwm2m_ipe
8
Developer Guide LWM2M IPE
4. Download DHT11 library from here and add to Arduino IDE project.
9
Developer Guide LWM2M IPE
3.3. Execution
1. Connect Arduino UNO to PC with debug USB cable then compile and upload source.
3. Export “keti_lwm2m_ipe” as runnable jar file named “<name.jar>” then copy “<name>.jar”
file and “tas_conf.xml”(In project) file to raspberry pi.
10
Developer Guide LWM2M IPE
4. Copy webapp folder to raspberry pi jar file path from “keti_lwm2m_device” project.
11
Developer Guide LWM2M IPE
In port.conf file, set serial communication for Arduino board. It contains serial port name and
baud rate.
6. Run java thyme 1.5(Refer to Thyme guide document from IoT Ocean Home page).
12
Developer Guide LWM2M IPE
4. Test
13
Developer Guide LWM2M IPE
If web browser shows the content as Figure 18, LWM2M is properly functioning.
2. Input AE resource path (depended the thyme conf.json) in textbox and click start then the
above LWM2M IPE’s resource structure will be displayed. If temperature or humidity value
is changed then viewer will add new resource object with “new!” tag.
3. Open post man from google chrome and send content instance create request to mobius-
yt as figure 20.
4. If IPE sample build is successfully done, the physical LED light turns on when LWM2M log
device “led” status changes “off” to “on”.
14
Developer Guide LWM2M IPE
15