ocean iot platform guide
TRANSCRIPT
![Page 1: Ocean IoT platform guide](https://reader033.vdocuments.mx/reader033/viewer/2022061602/589c62511a28abc4358b6f45/html5/thumbnails/1.jpg)
1
OCEAN IoT Platform Guide IoT Platform Startup guide
July 17th, 2016
Youngmin Kim
![Page 2: Ocean IoT platform guide](https://reader033.vdocuments.mx/reader033/viewer/2022061602/589c62511a28abc4358b6f45/html5/thumbnails/2.jpg)
2
INDEX
• IoT Platform
– Mobius Yellow Turtle– &Cube: Thyme (TAS)
• Process (without MQTT)
• MQTT broker
– Mosquitto
• Process (with MQTT)
• Reference
CrePAS 6th the first session
![Page 3: Ocean IoT platform guide](https://reader033.vdocuments.mx/reader033/viewer/2022061602/589c62511a28abc4358b6f45/html5/thumbnails/3.jpg)
3
IoT Platform
![Page 4: Ocean IoT platform guide](https://reader033.vdocuments.mx/reader033/viewer/2022061602/589c62511a28abc4358b6f45/html5/thumbnails/4.jpg)
4CrePAS 6th the first session
IoT Platform• OCEAN– Formerly Open alliance for iot standard– Global partnership based on open source and IoT
standards– Aims to promote the development and commer-
cialization of IoT platforms, products, and services by widespread adoption of IoT standards-compli-ant open source.
– http://iotocean.org/
![Page 5: Ocean IoT platform guide](https://reader033.vdocuments.mx/reader033/viewer/2022061602/589c62511a28abc4358b6f45/html5/thumbnails/5.jpg)
5CrePAS 6th the first session
IoT Platform• Mobius – Yellow Turtle– An open source software of oneM2M-based IoT
Server Platform based on Node.js Java Script.– The source code and files of Yellow Turtle are under
the OCEAN license terms and conditions, i.e., 3-clause BSD open source license.
– http://www.iotocean.org/download/?tab1=1&tab2=20
![Page 6: Ocean IoT platform guide](https://reader033.vdocuments.mx/reader033/viewer/2022061602/589c62511a28abc4358b6f45/html5/thumbnails/6.jpg)
6CrePAS 6th the first session
IoT Platform• &Cube: Thyme– An open source software of oneM2M-based IoT
Device Platform based on Node.js Java Script.– The source code and files of Thyme are under the
OCEAN license terms and conditions, i.e., 3-clause BSD open source license.
– http://www.iotocean.org/download/?tab1=2
![Page 7: Ocean IoT platform guide](https://reader033.vdocuments.mx/reader033/viewer/2022061602/589c62511a28abc4358b6f45/html5/thumbnails/7.jpg)
7CrePAS 6th the first session
IoT Platform Schema
ADNAE
ADNAE
ADNAE
IN
CSE
AEMca
Mca Mcc’
Mobius – Yel-low Turtle
&Cube -Thyme
Mcn
Figure 1. Example (Node. js version)
![Page 8: Ocean IoT platform guide](https://reader033.vdocuments.mx/reader033/viewer/2022061602/589c62511a28abc4358b6f45/html5/thumbnails/8.jpg)
8CrePAS 6th the first session
IoT Platform Schema
AE(Con-tents)
IN-CSE(Mobius:
Yellow Tur-tle
Beacon
TAS AE (&Cube: Thyme)
Raspberry Pi
CSE-Mo-bius
AE
ss_1_ctrl
ss_1Subscrip-
tionSubscrip-
tion
BLE
![Page 9: Ocean IoT platform guide](https://reader033.vdocuments.mx/reader033/viewer/2022061602/589c62511a28abc4358b6f45/html5/thumbnails/9.jpg)
9CrePAS 6th the first session
Process ( without MQTT )
Server
Yellow Turtle
Database
MySQLRaspberry PiBlue
z TAS Thyme
Raspberry PiBlue
z TAS Thyme
Raspberry PiBlue
z TAS Thyme USERApplica-
tion
Beacon
Data
![Page 10: Ocean IoT platform guide](https://reader033.vdocuments.mx/reader033/viewer/2022061602/589c62511a28abc4358b6f45/html5/thumbnails/10.jpg)
10CrePAS 6th the first session
Process ( without MQTT )• Start Mobius– First implement make CSE ID.– ER_DUP_ENTRY is because of second implement.– QnA page
• http://www.iotocean.org/Community/?tab1=2
Figure 4. Console of Mobius ( Pictures can be little different. )
![Page 11: Ocean IoT platform guide](https://reader033.vdocuments.mx/reader033/viewer/2022061602/589c62511a28abc4358b6f45/html5/thumbnails/11.jpg)
11CrePAS 6th the first session
Process ( without MQTT )• Start Thyme– We must modify conf.xml of Thyme in order to con-
nect Mobius (cbhost = Mobius server’s IP address).– Create IDs that can be modified conf.xml
( Pictures can be little different. )Figure 5. Console of Thyme
Figure 6. Console of Mo-bius
![Page 12: Ocean IoT platform guide](https://reader033.vdocuments.mx/reader033/viewer/2022061602/589c62511a28abc4358b6f45/html5/thumbnails/12.jpg)
12CrePAS 6th the first session
Process ( without MQTT )• Start Thyme_TAS– We can see data transfer ( TAS -> Thyme -> Mobius ).– If you want to implement TAS in windows, http://www.iotocean.org/Community/view.asp?pageNo=2&tab1=1&tab2=0&tab3=all&sType&word=&idx=1163
Figure 7. Console of TAS
Figure 8. Console of Thyme( Pictures can be little different. )
![Page 13: Ocean IoT platform guide](https://reader033.vdocuments.mx/reader033/viewer/2022061602/589c62511a28abc4358b6f45/html5/thumbnails/13.jpg)
13CrePAS 6th the first session
Process ( without MQTT )• Start Thyme_TAS– You can see data transfer ( TAS -> Thyme ->
Mobius ).
Figure 9. Console of Mobius
( Pictures can be little differ-ent. )
![Page 14: Ocean IoT platform guide](https://reader033.vdocuments.mx/reader033/viewer/2022061602/589c62511a28abc4358b6f45/html5/thumbnails/14.jpg)
14
MQTT broker
![Page 15: Ocean IoT platform guide](https://reader033.vdocuments.mx/reader033/viewer/2022061602/589c62511a28abc4358b6f45/html5/thumbnails/15.jpg)
15CrePAS 6th the first session
MQTT Protocol• MQTT– Formerly MQ Telemetry Transport– A lightweight messaging protocol for
small sensors and mobile devices.– The publish-subscribe messaging pat-
tern requires a message broker.– http://mqtt.org/
![Page 16: Ocean IoT platform guide](https://reader033.vdocuments.mx/reader033/viewer/2022061602/589c62511a28abc4358b6f45/html5/thumbnails/16.jpg)
16CrePAS 6th the first session
MQTT Method• MQTT Method
– Connect• Waits for a connection to be established with the server.
– Disconnect• Waits for the MQTT client to finish any work it must do, and
for the TCP/IP session to disconnect.– Subscribe
• Waits for completion of the Subscribe or Unsubscribe method.– Unsubscribe
• Requests the server unsubscribe the client from one or more topics.
– Publish• Returns immediately to the application thread after passing
the request to the MQTT client.
![Page 17: Ocean IoT platform guide](https://reader033.vdocuments.mx/reader033/viewer/2022061602/589c62511a28abc4358b6f45/html5/thumbnails/17.jpg)
17CrePAS 6th the first session
MQTT broker• Mosquitto– Open source message broker that imple-
ments the MQTT– https://mosquitto.org/
• Others– Emqttd, ActiveMQ, Apollo, HiveMQ, IBM
MessageSight, JoramMQ, RabbitMQ, Solace Message Routers, and VerneMQ.
![Page 18: Ocean IoT platform guide](https://reader033.vdocuments.mx/reader033/viewer/2022061602/589c62511a28abc4358b6f45/html5/thumbnails/18.jpg)
18CrePAS 6th the first session
MQTT broker• Mosquitto– Synopsis
• Mosquitto [-c config file] [-d | --daemon][-p port number][-v]
– Options• -p, --port
– Listen on the port specified instead of the default 1883.
• -v, --verbose– Use verbose logging.
![Page 19: Ocean IoT platform guide](https://reader033.vdocuments.mx/reader033/viewer/2022061602/589c62511a28abc4358b6f45/html5/thumbnails/19.jpg)
19CrePAS 6th the first session
Process ( with MQTT )ServerYellow Turtle
ServerMosquit-tobroker
Database
MySQLRaspberry Pi
Bluez TAS Thyme
Raspberry PiBlue
z TAS Thyme
Raspberry PiBlue
z TAS Thyme USERApplica-
tion
Beacon
Data
MQTT proxy
Figure 10. Example (Remote MQTT broker)
![Page 20: Ocean IoT platform guide](https://reader033.vdocuments.mx/reader033/viewer/2022061602/589c62511a28abc4358b6f45/html5/thumbnails/20.jpg)
20CrePAS 6th the first session
Process ( with MQTT )• This case implements the former.• But something different.
– We must implement two js file in Mobius (app.js, pxymqtt.js).
– We have to change implement file in Thyme (app.js -> mqtt_app.js).
– We use mosqutto (MQTT broker).– We must modify TAS conf.xml in order to match
Thyme’s mqtt_conf.xml (parentport = tasport).– Also we have to assign mqtt proxy (conf.json of Mobius –
mqttproxy = mosquitto’s IP address).– We need forwarding, so we have to uncomment func-
tion (mqtt_forwarding).
![Page 21: Ocean IoT platform guide](https://reader033.vdocuments.mx/reader033/viewer/2022061602/589c62511a28abc4358b6f45/html5/thumbnails/21.jpg)
21CrePAS 6th the first session
Process ( with MQTT )• Start mosquitto.– We use this for MQTT broker.– If we want to use proxy server, we must modify
Mobius conf.json file (mqttproxy = MQTT server IP address).
– Command : mosquitto.exe -v
Figure 11. Console of Mosquitto
( Pictures can be little different. )
![Page 22: Ocean IoT platform guide](https://reader033.vdocuments.mx/reader033/viewer/2022061602/589c62511a28abc4358b6f45/html5/thumbnails/22.jpg)
22CrePAS 6th the first session
Process ( with MQTT )• Start Mobius - pxymqtt.
– We need forwarding, so we have to uncomment function (mqtt_forwarding).
Figure 13. Console of Mosquitto ( Pictures can be little dif -ferent. )
Figure 12. Console of Mobius (pxymqtt)
![Page 23: Ocean IoT platform guide](https://reader033.vdocuments.mx/reader033/viewer/2022061602/589c62511a28abc4358b6f45/html5/thumbnails/23.jpg)
23CrePAS 6th the first session
Process ( with MQTT )• All program start like the former process.–We can see data transmission.
Figure 14. Console of mosquito ( Pictures can be little differ-ent. )
![Page 24: Ocean IoT platform guide](https://reader033.vdocuments.mx/reader033/viewer/2022061602/589c62511a28abc4358b6f45/html5/thumbnails/24.jpg)
24CrePAS 6th the first session
TEST Environment• Raspberry Pi
– node : v0.10.29– npm : v1.4.21– Thyme : v1.5– Thyme TAS : v1.3
• Server (Windows 10, Windows server 2012 R2)– Node.js : v4.4.4, v4.4.6, v4.4.7– Nginx : v1.10.1– Mobius (Yellow Turtle) : v2.0.5– Mosquitto : v1.3.5
![Page 25: Ocean IoT platform guide](https://reader033.vdocuments.mx/reader033/viewer/2022061602/589c62511a28abc4358b6f45/html5/thumbnails/25.jpg)
25
Reference
![Page 26: Ocean IoT platform guide](https://reader033.vdocuments.mx/reader033/viewer/2022061602/589c62511a28abc4358b6f45/html5/thumbnails/26.jpg)
26CrePAS 6th the first session
Reference• Web page
– http://iotocean.org– https://en.wikipedia.org/wiki/MQTT– http://mqtt.org– https://mosquitto.org/
• Document– 『 oneM2M 서비스 플랫폼 표준 해설서』 , 한국정보통신기술협회 ,
2014-11-30– 『 oneM2M 어플리케이션 개발자 가이드 표준 해설서』 ,
한국정보통신기술협회 , 2015-11-30– 「 MQTT Version 3.1.1 」 , OASIS, 2014-10-29– 「 Mobius : Yellow Turtle Installation Guide v1.9 」 , OCEAN, 2016-
12– 「“개방형 사물인터넷 플랫폼 (Mobius, &Cube) 기반 서비스 개발 실습”
교육 과정」 , 전자부품연구원