SlideShare une entreprise Scribd logo
1  sur  18
Télécharger pour lire hors ligne
IS 748 – MOBILE PERVASIVE COMPUTING
Midterm Project
MQTT ANDROID APPLICATION IMPLEMENTATION
Fatih Özlü
1777762
Information Systems
Middle East Technical University
06.01.2013
fatihozlu@aselsan.com.tr
2
TABLE OF CONTENTS
1. MQTT ANDROID APPLICATION.....................................................................................3
1.1. Overview ...........................................................................................................3
1.2. Definitions, Abbreviations and Acronyms ......................................................................3
1.3. Design of the Application .........................................................................................3
1.4. Platform ............................................................................................................7
1.5. Testing the Application ...........................................................................................8
2. TECHNOLOGIES USED IN THE PROJECT......................................................................... 14
2.1. AChartEngine .................................................................................................... 14
2.2. MQTT from PAHO ............................................................................................... 14
2.3. ActiveMQ Broker Configuration ............................................................................... 17
3. REFERENCES........................................................................................................ 18
3
1. MQTT ANDROID APPLICATION
1.1. Overview
This document is prepared as a project for IS 748 lecture. The document is based on the
implementation project of the lecture. In this project, an Android application is implemented
by using MQTT for communication. It is thought to be client of a CEP (Complex Event
Processing) engine developed for IS 589 Master Project, which is based on collecting sensor
data from classroom environment and extracting complex events. This Android project is the
high-level application part of the Master Project to visualize sensor data and inform the
users.
1.2. Definitions, Abbreviations and Acronyms
CEP Complex Event Processing
JMS Java Messaging Service
M2M Machine-to-Machine
MQTT MQ Telemetry Transport
1.3. Design of the Application
In this implementation project, Android client will be informed about condition of a smart
classroom. The condition contains information like ambient temperature and light status,
motion detection, etc. Phone-Server communication will be based on MQTT (a topic based
publish-subscribe model). According to the proposed design, a mobile client could be able to
subscribe several pre-defined topics and will be notified whenever the server publishes a
message on any of the subscribed topics. Mobile application will use MQTT protocol for
communicating with the server (Figure 1).
In addition, mobile clients will show meaningful information rules defined in the CEP engine
to inform users to trigger events like opening air conditioner, or opening the windows in the
classroom as well as statistics about the server data that is collected from sensors. So the
application will subscribe predefined topics to be informed, whenever event occurs, the
message about the event will be published to the user. The user can be able to monitor
these messages/events.
4
The application is implemented in Eclipse environment by using Java programming language
in Android platform. The application is composed from four packages each of which is
separated for a different purpose (Figure 2). graphics package is used for visual purposes
to show sensor data by using charts on time axis. The data package is used for storing the
sensor data on the application side to retrieve in case of needs from other packages. In
mqtt package, communication with the broker is implemented to get messages over a topic
based messaging system. client package is used for showing context information on a
tabbed structure by using Android Activity classes. This is the starting point of the
application and it contains the user interface tabs for making several operations.
publish
/subscribe
publish
/subscribe
sensor
events
complex
events ACTIVEMQ
BROKER
(SERVER)
Android
MQTT Client
MQTT
Protocol
Classroom
Setups
Collecting
sensor data
CEP
Engine
Figure 1 System design
5
Figure 2 Package Diagram
1.3.1. client Package
In this package, main operations are managed by using Activity classes on Tabbed layout.
For each operation of the application, there are several Activity classes started from the
MainActivity class. MainActivity is the container class of the other Activity classes
Figure 3 client Package Class Diagram
6
In addition, MainActivity takes published messages from MQTTConnectorTask class that
deals with receiving messages from subscribed messages from the broker. The MainActivity
forwards the relevant message to the active Activity class. By this way, active Activity class
can update the display to show new messages on the screen. Each derived concrete Activity
class is used for different purpose. DoorInActiviy, DoorOutActivity, WallTeacherActivity,
WallWindowActivity, WindowActiviy is used for demonstrating the classroom setups to
provide monitoring the sensors deployed to these places. SettingsActivity is responsible for
starting/stopping the application or exiting from the application and setting the broker
server url of the application, since the broker can be interchangeable with respect to needs.
GraphicsActivity is used for visualizing the sensor data on charts and graphics. It is designed
as extendable as possible; so the classroom temperature of the inside and the outside is
used for the present, but other sensors can be added to the system easily to show on
charts, as well. CEPInfoActivity is used to monitor complex events extracted from the CEP
engine on the broker side.
1.3.2. data Package
This package contains classes of the sensors used in the classroom. Each sensor value is
stored on the SensorDataFactory to use in charts or for monitoring, etc.
Figure 4 data Package Class Diagram
1.3.3. graphics Package
This package contains classes for showing the sensor data on the charts. The design is
flexible and extendable to add new types of the sensors to visualize. Each sensor data is
inserted to the dataset of the SensorChart of the current sensor type.
7
Figure 5 graphics Package Class Diagram
1.4. Platform
The properties of the each platform and library used in the project is given in Table 1.
Table 1.4-1 Platforms and Libraries used in the Project
Apache ActiveMQ Version 5.7.0
Eclipse SDK Version: 3.7.1
Android Platform Version: 2.3.3
achartengine-1.0.0.jar for charting the sensor data
org.eclipse.paho.client.mqttv3.jar for communicating and getting messages
from the broker
8
1.5. Testing the Application
For testing the application, CEP on the broker is simulated the real time environment of the
classroom. To this simulation, the stored sensor data is retrieved from the database and
sent to the rule machine, as if the sensors are working in the real time. The CEP engine on
the broker side is even run to process messages and extract high level information. In
addition, the sensor data which is read from the database is also published to the topics that
the Android client listens. Therefore, the Android application can receive messages from
both sensor data topics and the CEP machine topics.
Listened Topic Source: Clasroom Setup /
CEP
Hall Effect – 0 Door Setup Out
Infrared Proximity – 0 Door Setup Out
Optical – 0 Door Setup Out
Motion - 0 Door Setup Out
Infrared Proximity – 1 Door Setup In
Temp - 1 Outside(Window) Setup
Light - 1 Outside(Window) Setup
Electret - 0 Wall Setup Teacher
Temp - 0 Wall Setup Teacher
Light - 0 Wall Setup Teacher
Motion - 1 Wall Setup Window
Light – 2 Wall Setup Window
Esper CEP Engine
1.5.1.Starting ActiveMQ Broker
Apcahe ActiveMQ Broker is started from the batch file activemq.bat located in the activemq
installation folder. When the batch file is called from the command line, the broker is
executed on the machine (Figure 6). After the broker is started, the publishers and
subscribers get ready for communicating over publish-subscribe topics. This messaging is
based on JMS (Java Messaging Service), but in this project, the broker is configured to
support MQTT Connections to receive and send MQTT messages, which are, some kind of
publish/subscribe messaging service. The configuration is mentioned, in the next sections.
9
Figure 6 Starting ActiveMQ Broker
1.5.2.Starting Simulator and CEP Engine
JMSToEsper Java application is implemented for simulating the classroom environment. This
application reads data from database and both publishes messages to corresponding topics
and starts the CEP engine to take events for extracting complex events. When the
application is executed, the sensor data which is stored on the database with time stamp is
published in the real time sequence as the order and duration of the real time. If the user
wants, the simulation can be speeded up to 2x, 4x, or faster to see messages more fast
moving from the real time.
10
Figure 7 Starting the Simulator - CEP Engine
1.5.3. Running Android Application
After starting both the Simulator with CEP Engine and the broker, the mobile application can
be run. When the application is executed, Settings menu is opened by default. From this
menu, users can start the application to receive messages or can update the url of broker.
Figure 8 Settings Menu and Updating the Broker URL
11
The application can be started or stopped, whenever the user wants. The example screens of
the application is given in Figure 9.
After starting, the application will display a message about connecting to the topics. The
messages comes from the server side could be monitored from the Tabs located on the
upper side of the screen. The tabs are located corresponsding to the classroom sensor
setups. There are 4 four setups: DoorIn, DoorOut, WallTeacher, WallWindow and Window
setups. Door setups are located to the door of the classroom; Wall setups are located on the
inside wall of the classroom; Window setup is located to the outside of the classroom’s
window. The complex events extracted from CEP Rule Machine Esper are given in tab CEP
Info. Example screens from these setups are given in below Figures 10-11.
Figure 9 Starting(left)/Stopping(right) the Application
12
Figure 10 Screens from DoorOut and Window Setups
Figure 11 Screens from Extracted CEPInformation and WallTeacher Setup
13
Lastly, user can see the chart of the temperature of the inside and the outside of the
classroom, until the present time from the Graphics tab (Figure 12).
Figure 12 Monitoring the Classroom Inside and Outside Temperature on Chart
14
2. TECHNOLOGIES USED IN THE PROJECT
2.1. AChartEngine
AChartEngine is a charting library for Android applications [1]. It is used for several kinds of
chart types, as given in [1]:
 line chart
 area chart
 scatter chart
 time chart
 bar chart
 pie chart
 bubble chart
 doughnut chart
 range (high-low) bar chart
 dial chart / gauge
 combined (any combination of line, cubic line, scatter, bar, range bar, bubble) chart
 cubic line chart
In this project, I used the line chart for two series (inside and outside temperature) with X
time axis. The collected data could be also shown in other charts, since the design is flexible
to use other charts.
AChartEngine is currently at the 1.0.0 release and it is free to use. It is licensed under
Apache License 2.0. This library is also open-source; the source codes can be reachable from
its repository on the Web.
2.2. MQTT from PAHO
MQTT [2], which is a lightweight publish/subscribe messaging protocol and widely used in
sensors, home automation, mobile applications and such small devices which also is used in
this study. MQTT is a (M2M) machine-to-machine publish/subscribe messaging protocol
based on topic structure. The topic structure is used for messaging between subscribers and
publishers. The publisher send messages over a predefined topic, the consumers
(subscribers) receive messages from the topics to which they subscribe.
15
There are several open source and free MQTT Clients and Brokers (Servers) to be used for
this type messaging for different platforms and programming languages such as C, C++,
Java, Python, Delphi, PHP etc. as given below:
Servers / Brokers for MQTT (taken from [3])
IBM WebSphere MQ Telemetry
It provides full MQTT v3.1 support with WebSphere MQ. Supports Java (MIDP and above) and
C clients.
IBM Lotus Expeditor micro broker
Part of the Lotus Expeditor product, micro broker is an OSGi Java implementation of MQTT
server. It provides Java (including JMS), C# and C clients.
Really Small Message Broker
It provides complete MQTT v3.1 support, and a C client API.
Mosquitto
An Open Source MQTT server with C, C++, Python and JavaScript clients.
Eclipse Paho
The Eclipse Paho project hosts a version of the mosquitto broker for the Machine-to-Machine
Industry Working Group [4].
MQTT.js
A node.js MQTT server.
eMQTT
m2m.io
webMethods Nirvana Messaging
A messaging engine with support for many different transports. It also supports MQTT.
RabbitMQ
An AMQP message broker – with an MQTT plugin.
Apache ActiveMQ
ActiveMQ has a support for MQTT with configuration.
Apache Apollo
Moquette
A Java MQTT broker.
IBM WebSphere Message Broker
It supports MQTT v3.
16
Clients for MQTT (taken from [3]): Only C,C++ and Java Clients are given:
ActionScript
C
 Eclipse Paho – a C client (based on the IBM WebSphere MQ Telemetry C client)
 libmosquitto – a C client library provided with the mosquitto server
 IBM WebSphere MQ Telemetry provides a C client API (largely identical to Eclipse Paho)
 IBM Lotus Expeditor micro broker includes a C client API
 liblwmqtt - a very lightweight C client undeveloped – use Eclipse Paho instead
C++
 libmosquittopp – a C++ client library provided with the mosquitto server
Delphi
Erlang
Java
 Eclipse Paho - a Java client (based on the IBM WebSphere MQ Telemetry Java client)
 MeQanTT
 mqtt-client – a Fusesource Java MQTT client with a variety of API styles
 moquette-mqtt – a Java client
 IBM WebSphere MQ Telemetry provides a Java client API
 IBM Lotus Expeditor micro broker includes two Java client APIs
Javascript / node.js
LotusScript
.NET
Objective-C
Perl
PHP
Python
Ruby
17
In this project, as a broker, ActiveMQ Broker [5] is used and as a client, Eclipse Paho [6]
MQTT Client is used. Paho Client is developed under Eclipse Technology Project as open
source. It is given a solution as Machine-to-Machine (M2M) from Eclipse Project. First
releases are aimed to be developed for MQTT Java and C client code. The client library is
used in the mobile application.
2.3. ActiveMQ Broker Configuration
To make integrity of MQTT with ActiveMQ, which is broker of the publish/subscribe
messaging and supports MQTT protocol connection, configuration is done on the broker side.
To enable MQTT on ActiveMQ [5], given xml code is inserted in to the configuration file of
broker ActiveMQ:
<transportConnectors>
<transportConnector name="mqtt"
uri="mqtt://localhost:1883?transport.defaultKeepAlive=60000"/>
</transportConnectors>
This enables ActiveMQ to support connection comes from MQTT clients for 60 seconds. After
60 seconds, the broker stops hanging inactive connections. The default port of MQTT is 1883
for TCP/IP, for secure connections, MQTT could be able to use TCP/IP port 8883 over SSL.
18
3. REFERENCES
[1] "AChartEngine Web Site," [Online]. Available: http://www.achartengine.org/. [Accessed
2 1 2013].
[2] "MQ Telemetry Transport," [Online]. Available: http://mqtt.org/. [Accessed 25 12 2012].
[3] "MQTT Softwares," [Online]. Available: http://mqtt.org/software. [Accessed 2 1 2013].
[4] "Machine-to-Machine Industry Working Group," [Online]. Available:
http://m2m.eclipse.org/. [Accessed 1 1 2013].
[5] "MQTT on Apache ActiveMQ," [Online]. Available: http://activemq.apache.org/mqtt.html.
[Accessed 26 12 2012].
[6] "Paho Project," [Online]. Available: http://www.eclipse.org/paho/. [Accessed 28 12
2012].

Contenu connexe

Tendances

Mqtt(Message queue telemetry protocol) presentation
Mqtt(Message queue telemetry protocol) presentation Mqtt(Message queue telemetry protocol) presentation
Mqtt(Message queue telemetry protocol) presentation Piyush Rathi
 
[http://1PU.SH] Building Wireless Sensor Networks with MQTT-SN, RaspberryPi a...
[http://1PU.SH] Building Wireless Sensor Networks with MQTT-SN, RaspberryPi a...[http://1PU.SH] Building Wireless Sensor Networks with MQTT-SN, RaspberryPi a...
[http://1PU.SH] Building Wireless Sensor Networks with MQTT-SN, RaspberryPi a...Zvi Avraham
 
MQTT - Protocol for the Internet of Things
MQTT - Protocol for the Internet of ThingsMQTT - Protocol for the Internet of Things
MQTT - Protocol for the Internet of ThingsUniversity of Pretoria
 
Getting started with MQTT - Virtual IoT Meetup presentation
Getting started with MQTT - Virtual IoT Meetup presentationGetting started with MQTT - Virtual IoT Meetup presentation
Getting started with MQTT - Virtual IoT Meetup presentationChristian Götz
 
MQTT - A practical protocol for the Internet of Things
MQTT - A practical protocol for the Internet of ThingsMQTT - A practical protocol for the Internet of Things
MQTT - A practical protocol for the Internet of ThingsBryan Boyd
 
Powering your next IoT application with MQTT - JavaOne 2014 tutorial
Powering your next IoT application with MQTT - JavaOne 2014 tutorialPowering your next IoT application with MQTT - JavaOne 2014 tutorial
Powering your next IoT application with MQTT - JavaOne 2014 tutorialBenjamin Cabé
 
MQTT
MQTTMQTT
MQTTESUG
 
MQTT with Eclipse Paho: A protocol for IoT and M2M communication
MQTT with Eclipse Paho: A protocol for IoT and M2M communicationMQTT with Eclipse Paho: A protocol for IoT and M2M communication
MQTT with Eclipse Paho: A protocol for IoT and M2M communicationChristian Götz
 
Introduction to MQ Telemetry Transport (MQTT)
Introduction to MQ Telemetry Transport (MQTT)Introduction to MQ Telemetry Transport (MQTT)
Introduction to MQ Telemetry Transport (MQTT)Amarjeetsingh Thakur
 
Lightweight Messaging (Apache Retreat Hursley 2010)
Lightweight Messaging (Apache Retreat Hursley 2010)Lightweight Messaging (Apache Retreat Hursley 2010)
Lightweight Messaging (Apache Retreat Hursley 2010)Andy Piper
 
Real World Applications of MQTT
Real World Applications of MQTTReal World Applications of MQTT
Real World Applications of MQTTManoj Gudi
 
Messaging for the Internet of Awesome Things
Messaging for the Internet of Awesome ThingsMessaging for the Internet of Awesome Things
Messaging for the Internet of Awesome ThingsAndy Piper
 
Connecting Internet of Things to the Cloud with MQTT
Connecting Internet of Things to the Cloud with MQTTConnecting Internet of Things to the Cloud with MQTT
Connecting Internet of Things to the Cloud with MQTTLeon Anavi
 
Mqtt overview (iot)
Mqtt overview (iot)Mqtt overview (iot)
Mqtt overview (iot)David Fowler
 
Iot Conference Berlin M2M,IoT, device management: one protocol to rule them all?
Iot Conference Berlin M2M,IoT, device management: one protocol to rule them all?Iot Conference Berlin M2M,IoT, device management: one protocol to rule them all?
Iot Conference Berlin M2M,IoT, device management: one protocol to rule them all?Julien Vermillard
 

Tendances (20)

Mqtt(Message queue telemetry protocol) presentation
Mqtt(Message queue telemetry protocol) presentation Mqtt(Message queue telemetry protocol) presentation
Mqtt(Message queue telemetry protocol) presentation
 
[http://1PU.SH] Building Wireless Sensor Networks with MQTT-SN, RaspberryPi a...
[http://1PU.SH] Building Wireless Sensor Networks with MQTT-SN, RaspberryPi a...[http://1PU.SH] Building Wireless Sensor Networks with MQTT-SN, RaspberryPi a...
[http://1PU.SH] Building Wireless Sensor Networks with MQTT-SN, RaspberryPi a...
 
MQTT - Protocol for the Internet of Things
MQTT - Protocol for the Internet of ThingsMQTT - Protocol for the Internet of Things
MQTT - Protocol for the Internet of Things
 
Getting started with MQTT - Virtual IoT Meetup presentation
Getting started with MQTT - Virtual IoT Meetup presentationGetting started with MQTT - Virtual IoT Meetup presentation
Getting started with MQTT - Virtual IoT Meetup presentation
 
Mqtt
MqttMqtt
Mqtt
 
Mqtt
MqttMqtt
Mqtt
 
Understanding of MQTT for IoT Projects
Understanding of MQTT for IoT ProjectsUnderstanding of MQTT for IoT Projects
Understanding of MQTT for IoT Projects
 
MQTT - A practical protocol for the Internet of Things
MQTT - A practical protocol for the Internet of ThingsMQTT - A practical protocol for the Internet of Things
MQTT - A practical protocol for the Internet of Things
 
Powering your next IoT application with MQTT - JavaOne 2014 tutorial
Powering your next IoT application with MQTT - JavaOne 2014 tutorialPowering your next IoT application with MQTT - JavaOne 2014 tutorial
Powering your next IoT application with MQTT - JavaOne 2014 tutorial
 
MQTT
MQTTMQTT
MQTT
 
MQTT with Eclipse Paho: A protocol for IoT and M2M communication
MQTT with Eclipse Paho: A protocol for IoT and M2M communicationMQTT with Eclipse Paho: A protocol for IoT and M2M communication
MQTT with Eclipse Paho: A protocol for IoT and M2M communication
 
Introduction to MQ Telemetry Transport (MQTT)
Introduction to MQ Telemetry Transport (MQTT)Introduction to MQ Telemetry Transport (MQTT)
Introduction to MQ Telemetry Transport (MQTT)
 
An introduction to MQTT
An introduction to MQTTAn introduction to MQTT
An introduction to MQTT
 
Lightweight Messaging (Apache Retreat Hursley 2010)
Lightweight Messaging (Apache Retreat Hursley 2010)Lightweight Messaging (Apache Retreat Hursley 2010)
Lightweight Messaging (Apache Retreat Hursley 2010)
 
Real World Applications of MQTT
Real World Applications of MQTTReal World Applications of MQTT
Real World Applications of MQTT
 
MQTT
MQTTMQTT
MQTT
 
Messaging for the Internet of Awesome Things
Messaging for the Internet of Awesome ThingsMessaging for the Internet of Awesome Things
Messaging for the Internet of Awesome Things
 
Connecting Internet of Things to the Cloud with MQTT
Connecting Internet of Things to the Cloud with MQTTConnecting Internet of Things to the Cloud with MQTT
Connecting Internet of Things to the Cloud with MQTT
 
Mqtt overview (iot)
Mqtt overview (iot)Mqtt overview (iot)
Mqtt overview (iot)
 
Iot Conference Berlin M2M,IoT, device management: one protocol to rule them all?
Iot Conference Berlin M2M,IoT, device management: one protocol to rule them all?Iot Conference Berlin M2M,IoT, device management: one protocol to rule them all?
Iot Conference Berlin M2M,IoT, device management: one protocol to rule them all?
 

En vedette

Android Push Server & MQTT
Android Push Server & MQTTAndroid Push Server & MQTT
Android Push Server & MQTT광운 이
 
Introduction MQTT in English
Introduction MQTT in EnglishIntroduction MQTT in English
Introduction MQTT in EnglishEric Xiao
 
Coap based application for android phones
Coap based application for android phonesCoap based application for android phones
Coap based application for android phonesMd Syed Ahamad
 
The House That Twitters
The House That TwittersThe House That Twitters
The House That Twittersandysc
 
M2M for Java Developers: MQTT with Eclipse Paho - Eclipsecon Europe 2013
M2M for Java Developers: MQTT with Eclipse Paho - Eclipsecon Europe 2013M2M for Java Developers: MQTT with Eclipse Paho - Eclipsecon Europe 2013
M2M for Java Developers: MQTT with Eclipse Paho - Eclipsecon Europe 2013Dominik Obermaier
 
Eclipse Paho Progress Report - EclipseCon 2012
Eclipse Paho Progress Report - EclipseCon 2012Eclipse Paho Progress Report - EclipseCon 2012
Eclipse Paho Progress Report - EclipseCon 2012Andy Piper
 
Bringing M2M to the web with Paho: Connecting Java Devices and online dashboa...
Bringing M2M to the web with Paho: Connecting Java Devices and online dashboa...Bringing M2M to the web with Paho: Connecting Java Devices and online dashboa...
Bringing M2M to the web with Paho: Connecting Java Devices and online dashboa...Dominik Obermaier
 
Eclipse Democamps 2013 - M2M for Java Developers with MQTT
Eclipse Democamps 2013 - M2M for Java Developers with MQTTEclipse Democamps 2013 - M2M for Java Developers with MQTT
Eclipse Democamps 2013 - M2M for Java Developers with MQTTDominik Obermaier
 
MQTT Hacks for Fun and... Fun!
MQTT Hacks for Fun and... Fun!MQTT Hacks for Fun and... Fun!
MQTT Hacks for Fun and... Fun!Andy Piper
 
Protocols for IoT
Protocols for IoTProtocols for IoT
Protocols for IoTAmit Dev
 
Android coding standard
Android coding standard Android coding standard
Android coding standard Rakesh Jha
 
IoT with MQTT and Paho for Webpages - Eclipse Democamp München 2014
IoT with MQTT and Paho for Webpages - Eclipse Democamp München 2014IoT with MQTT and Paho for Webpages - Eclipse Democamp München 2014
IoT with MQTT and Paho for Webpages - Eclipse Democamp München 2014Dominik Obermaier
 
Eclipse Paho - MQTT and the Internet of Things
Eclipse Paho - MQTT and the Internet of ThingsEclipse Paho - MQTT and the Internet of Things
Eclipse Paho - MQTT and the Internet of ThingsAndy Piper
 
What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final
What a Back-end Java Developer Doesn't Know About the Modern Web Stack-finalWhat a Back-end Java Developer Doesn't Know About the Modern Web Stack-final
What a Back-end Java Developer Doesn't Know About the Modern Web Stack-finalRikard Thulin
 
WebSphere Liberty Real-Time Communications (WebRTC)
WebSphere Liberty Real-Time Communications (WebRTC)WebSphere Liberty Real-Time Communications (WebRTC)
WebSphere Liberty Real-Time Communications (WebRTC)Brian Pulito
 
Bluemix與車聯網
Bluemix與車聯網Bluemix與車聯網
Bluemix與車聯網Hsuan-Ju Lin
 
Android security in depth
Android security in depthAndroid security in depth
Android security in depthSander Alberink
 
Mqtt 소개
Mqtt 소개Mqtt 소개
Mqtt 소개Junho Lee
 

En vedette (20)

Android Push Server & MQTT
Android Push Server & MQTTAndroid Push Server & MQTT
Android Push Server & MQTT
 
Introduction MQTT in English
Introduction MQTT in EnglishIntroduction MQTT in English
Introduction MQTT in English
 
Coap based application for android phones
Coap based application for android phonesCoap based application for android phones
Coap based application for android phones
 
The House That Twitters
The House That TwittersThe House That Twitters
The House That Twitters
 
M2M for Java Developers: MQTT with Eclipse Paho - Eclipsecon Europe 2013
M2M for Java Developers: MQTT with Eclipse Paho - Eclipsecon Europe 2013M2M for Java Developers: MQTT with Eclipse Paho - Eclipsecon Europe 2013
M2M for Java Developers: MQTT with Eclipse Paho - Eclipsecon Europe 2013
 
Eclipse Paho Progress Report - EclipseCon 2012
Eclipse Paho Progress Report - EclipseCon 2012Eclipse Paho Progress Report - EclipseCon 2012
Eclipse Paho Progress Report - EclipseCon 2012
 
Bringing M2M to the web with Paho: Connecting Java Devices and online dashboa...
Bringing M2M to the web with Paho: Connecting Java Devices and online dashboa...Bringing M2M to the web with Paho: Connecting Java Devices and online dashboa...
Bringing M2M to the web with Paho: Connecting Java Devices and online dashboa...
 
Eclipse Democamps 2013 - M2M for Java Developers with MQTT
Eclipse Democamps 2013 - M2M for Java Developers with MQTTEclipse Democamps 2013 - M2M for Java Developers with MQTT
Eclipse Democamps 2013 - M2M for Java Developers with MQTT
 
MQTT Hacks for Fun and... Fun!
MQTT Hacks for Fun and... Fun!MQTT Hacks for Fun and... Fun!
MQTT Hacks for Fun and... Fun!
 
Protocols for IoT
Protocols for IoTProtocols for IoT
Protocols for IoT
 
Android coding standard
Android coding standard Android coding standard
Android coding standard
 
IoT with MQTT and Paho for Webpages - Eclipse Democamp München 2014
IoT with MQTT and Paho for Webpages - Eclipse Democamp München 2014IoT with MQTT and Paho for Webpages - Eclipse Democamp München 2014
IoT with MQTT and Paho for Webpages - Eclipse Democamp München 2014
 
IoT transport protocols
IoT transport protocolsIoT transport protocols
IoT transport protocols
 
Eclipse Paho - MQTT and the Internet of Things
Eclipse Paho - MQTT and the Internet of ThingsEclipse Paho - MQTT and the Internet of Things
Eclipse Paho - MQTT and the Internet of Things
 
What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final
What a Back-end Java Developer Doesn't Know About the Modern Web Stack-finalWhat a Back-end Java Developer Doesn't Know About the Modern Web Stack-final
What a Back-end Java Developer Doesn't Know About the Modern Web Stack-final
 
WebSphere Liberty Real-Time Communications (WebRTC)
WebSphere Liberty Real-Time Communications (WebRTC)WebSphere Liberty Real-Time Communications (WebRTC)
WebSphere Liberty Real-Time Communications (WebRTC)
 
Bluemix與車聯網
Bluemix與車聯網Bluemix與車聯網
Bluemix與車聯網
 
Android security in depth
Android security in depthAndroid security in depth
Android security in depth
 
Mobile and IoT testing
Mobile and IoT testingMobile and IoT testing
Mobile and IoT testing
 
Mqtt 소개
Mqtt 소개Mqtt 소개
Mqtt 소개
 

Similaire à Android Implementation using MQTT Protocol

Web Server-based Distributed Machine Socialization System
Web Server-based Distributed Machine Socialization System Web Server-based Distributed Machine Socialization System
Web Server-based Distributed Machine Socialization System IJECEIAES
 
Smart Data Server for Smart Shops
Smart Data Server for Smart ShopsSmart Data Server for Smart Shops
Smart Data Server for Smart ShopsIOSR Journals
 
Network Monitoring System for University
Network Monitoring System for UniversityNetwork Monitoring System for University
Network Monitoring System for Universityijtsrd
 
AN EFFICIENT AND SECURED FRAMEWORK FOR MOBILE CLOUD COMPUTING
AN EFFICIENT AND SECURED FRAMEWORK FOR MOBILE CLOUD COMPUTINGAN EFFICIENT AND SECURED FRAMEWORK FOR MOBILE CLOUD COMPUTING
AN EFFICIENT AND SECURED FRAMEWORK FOR MOBILE CLOUD COMPUTINGCHANDUVEERARAMAKRISH
 
Java project titles
Java project titlesJava project titles
Java project titlesAshly Liza
 
IRJET- Application Backup and Restore across Multiple Devices
IRJET-	 Application Backup and Restore across Multiple DevicesIRJET-	 Application Backup and Restore across Multiple Devices
IRJET- Application Backup and Restore across Multiple DevicesIRJET Journal
 
IRJET- Machine Learning for Weather Prediction and Forecasting for Local Weat...
IRJET- Machine Learning for Weather Prediction and Forecasting for Local Weat...IRJET- Machine Learning for Weather Prediction and Forecasting for Local Weat...
IRJET- Machine Learning for Weather Prediction and Forecasting for Local Weat...IRJET Journal
 
IRJET- Improvising Reliability of Autonomous Car using Risk Detection
IRJET-  	  Improvising Reliability of Autonomous Car using Risk DetectionIRJET-  	  Improvising Reliability of Autonomous Car using Risk Detection
IRJET- Improvising Reliability of Autonomous Car using Risk DetectionIRJET Journal
 
IRJET- Development of Uncrackable Software
IRJET- Development of Uncrackable SoftwareIRJET- Development of Uncrackable Software
IRJET- Development of Uncrackable SoftwareIRJET Journal
 
ANET SureLog SIEM IntelligentResponse
ANET SureLog  SIEM IntelligentResponseANET SureLog  SIEM IntelligentResponse
ANET SureLog SIEM IntelligentResponseErtugrul Akbas
 
A prototype framework_for_high_performance_push_no
A prototype framework_for_high_performance_push_noA prototype framework_for_high_performance_push_no
A prototype framework_for_high_performance_push_noDavidNereekshan
 
IRJET- Dynamic Status Tracking & Security System
IRJET- Dynamic Status Tracking & Security SystemIRJET- Dynamic Status Tracking & Security System
IRJET- Dynamic Status Tracking & Security SystemIRJET Journal
 
Towards a distributed framework to analyze multimodal data.pdf
Towards a distributed framework to analyze multimodal data.pdfTowards a distributed framework to analyze multimodal data.pdf
Towards a distributed framework to analyze multimodal data.pdfCarlosRodrigues517978
 
Development of email notification system based on user criteria
Development of email notification system based on user criteriaDevelopment of email notification system based on user criteria
Development of email notification system based on user criteriaIRJET Journal
 
OFFLINE CONTEXT AWARE COMPUTING FOR PROVIDING USER SPECIFIC RESULTS
OFFLINE CONTEXT AWARE COMPUTING FOR PROVIDING USER SPECIFIC RESULTSOFFLINE CONTEXT AWARE COMPUTING FOR PROVIDING USER SPECIFIC RESULTS
OFFLINE CONTEXT AWARE COMPUTING FOR PROVIDING USER SPECIFIC RESULTSJournal For Research
 
LunchBox:- A Web And Mobile Application
LunchBox:- A Web And Mobile ApplicationLunchBox:- A Web And Mobile Application
LunchBox:- A Web And Mobile ApplicationIRJET Journal
 
Real-time Text Audio to Video PPT Converter Tablet App
Real-time Text Audio to Video PPT Converter Tablet AppReal-time Text Audio to Video PPT Converter Tablet App
Real-time Text Audio to Video PPT Converter Tablet AppMike Taylor
 

Similaire à Android Implementation using MQTT Protocol (20)

Web Server-based Distributed Machine Socialization System
Web Server-based Distributed Machine Socialization System Web Server-based Distributed Machine Socialization System
Web Server-based Distributed Machine Socialization System
 
Smart Data Server for Smart Shops
Smart Data Server for Smart ShopsSmart Data Server for Smart Shops
Smart Data Server for Smart Shops
 
Network Monitoring System for University
Network Monitoring System for UniversityNetwork Monitoring System for University
Network Monitoring System for University
 
combinepdf
combinepdfcombinepdf
combinepdf
 
AN EFFICIENT AND SECURED FRAMEWORK FOR MOBILE CLOUD COMPUTING
AN EFFICIENT AND SECURED FRAMEWORK FOR MOBILE CLOUD COMPUTINGAN EFFICIENT AND SECURED FRAMEWORK FOR MOBILE CLOUD COMPUTING
AN EFFICIENT AND SECURED FRAMEWORK FOR MOBILE CLOUD COMPUTING
 
Java project titles
Java project titlesJava project titles
Java project titles
 
IRJET- Application Backup and Restore across Multiple Devices
IRJET-	 Application Backup and Restore across Multiple DevicesIRJET-	 Application Backup and Restore across Multiple Devices
IRJET- Application Backup and Restore across Multiple Devices
 
IRJET- Machine Learning for Weather Prediction and Forecasting for Local Weat...
IRJET- Machine Learning for Weather Prediction and Forecasting for Local Weat...IRJET- Machine Learning for Weather Prediction and Forecasting for Local Weat...
IRJET- Machine Learning for Weather Prediction and Forecasting for Local Weat...
 
UDP Report
UDP ReportUDP Report
UDP Report
 
IRJET- Improvising Reliability of Autonomous Car using Risk Detection
IRJET-  	  Improvising Reliability of Autonomous Car using Risk DetectionIRJET-  	  Improvising Reliability of Autonomous Car using Risk Detection
IRJET- Improvising Reliability of Autonomous Car using Risk Detection
 
IRJET- Development of Uncrackable Software
IRJET- Development of Uncrackable SoftwareIRJET- Development of Uncrackable Software
IRJET- Development of Uncrackable Software
 
Design of Remote Video Monitoring and Motion Detection System based on Arm-Li...
Design of Remote Video Monitoring and Motion Detection System based on Arm-Li...Design of Remote Video Monitoring and Motion Detection System based on Arm-Li...
Design of Remote Video Monitoring and Motion Detection System based on Arm-Li...
 
ANET SureLog SIEM IntelligentResponse
ANET SureLog  SIEM IntelligentResponseANET SureLog  SIEM IntelligentResponse
ANET SureLog SIEM IntelligentResponse
 
A prototype framework_for_high_performance_push_no
A prototype framework_for_high_performance_push_noA prototype framework_for_high_performance_push_no
A prototype framework_for_high_performance_push_no
 
IRJET- Dynamic Status Tracking & Security System
IRJET- Dynamic Status Tracking & Security SystemIRJET- Dynamic Status Tracking & Security System
IRJET- Dynamic Status Tracking & Security System
 
Towards a distributed framework to analyze multimodal data.pdf
Towards a distributed framework to analyze multimodal data.pdfTowards a distributed framework to analyze multimodal data.pdf
Towards a distributed framework to analyze multimodal data.pdf
 
Development of email notification system based on user criteria
Development of email notification system based on user criteriaDevelopment of email notification system based on user criteria
Development of email notification system based on user criteria
 
OFFLINE CONTEXT AWARE COMPUTING FOR PROVIDING USER SPECIFIC RESULTS
OFFLINE CONTEXT AWARE COMPUTING FOR PROVIDING USER SPECIFIC RESULTSOFFLINE CONTEXT AWARE COMPUTING FOR PROVIDING USER SPECIFIC RESULTS
OFFLINE CONTEXT AWARE COMPUTING FOR PROVIDING USER SPECIFIC RESULTS
 
LunchBox:- A Web And Mobile Application
LunchBox:- A Web And Mobile ApplicationLunchBox:- A Web And Mobile Application
LunchBox:- A Web And Mobile Application
 
Real-time Text Audio to Video PPT Converter Tablet App
Real-time Text Audio to Video PPT Converter Tablet AppReal-time Text Audio to Video PPT Converter Tablet App
Real-time Text Audio to Video PPT Converter Tablet App
 

Plus de Fatih Özlü

Commonly Used Image File Formats
Commonly Used Image File FormatsCommonly Used Image File Formats
Commonly Used Image File FormatsFatih Özlü
 
Mobile cloud computing
Mobile cloud computingMobile cloud computing
Mobile cloud computingFatih Özlü
 
Presentation: Location in ubiquitous computing
Presentation: Location in ubiquitous computingPresentation: Location in ubiquitous computing
Presentation: Location in ubiquitous computingFatih Özlü
 
Marketing and sales in Cloud Computing
Marketing and sales in Cloud ComputingMarketing and sales in Cloud Computing
Marketing and sales in Cloud ComputingFatih Özlü
 
Measuring e-Governance as an Innovation in the Public Sector
Measuring e-Governance as an Innovation in the Public SectorMeasuring e-Governance as an Innovation in the Public Sector
Measuring e-Governance as an Innovation in the Public SectorFatih Özlü
 
The computer for the 21st century
The computer for the 21st centuryThe computer for the 21st century
The computer for the 21st centuryFatih Özlü
 
Operating System Windows CE 7.0 and Processor ARM Advantages and Disadvantages
Operating System Windows CE 7.0 and Processor ARM Advantages and DisadvantagesOperating System Windows CE 7.0 and Processor ARM Advantages and Disadvantages
Operating System Windows CE 7.0 and Processor ARM Advantages and DisadvantagesFatih Özlü
 
Porters Value Chain
Porters Value ChainPorters Value Chain
Porters Value ChainFatih Özlü
 

Plus de Fatih Özlü (9)

Commonly Used Image File Formats
Commonly Used Image File FormatsCommonly Used Image File Formats
Commonly Used Image File Formats
 
Design Patterns
Design PatternsDesign Patterns
Design Patterns
 
Mobile cloud computing
Mobile cloud computingMobile cloud computing
Mobile cloud computing
 
Presentation: Location in ubiquitous computing
Presentation: Location in ubiquitous computingPresentation: Location in ubiquitous computing
Presentation: Location in ubiquitous computing
 
Marketing and sales in Cloud Computing
Marketing and sales in Cloud ComputingMarketing and sales in Cloud Computing
Marketing and sales in Cloud Computing
 
Measuring e-Governance as an Innovation in the Public Sector
Measuring e-Governance as an Innovation in the Public SectorMeasuring e-Governance as an Innovation in the Public Sector
Measuring e-Governance as an Innovation in the Public Sector
 
The computer for the 21st century
The computer for the 21st centuryThe computer for the 21st century
The computer for the 21st century
 
Operating System Windows CE 7.0 and Processor ARM Advantages and Disadvantages
Operating System Windows CE 7.0 and Processor ARM Advantages and DisadvantagesOperating System Windows CE 7.0 and Processor ARM Advantages and Disadvantages
Operating System Windows CE 7.0 and Processor ARM Advantages and Disadvantages
 
Porters Value Chain
Porters Value ChainPorters Value Chain
Porters Value Chain
 

Dernier

OS Services, System call, Virtual Machine
OS Services, System call, Virtual MachineOS Services, System call, Virtual Machine
OS Services, System call, Virtual MachineDivya S
 
ASME BPVC 2023 Section I para leer y entender
ASME BPVC 2023 Section I para leer y entenderASME BPVC 2023 Section I para leer y entender
ASME BPVC 2023 Section I para leer y entenderjuancarlos286641
 
Transforming Process Safety Management: Challenges, Benefits, and Transition ...
Transforming Process Safety Management: Challenges, Benefits, and Transition ...Transforming Process Safety Management: Challenges, Benefits, and Transition ...
Transforming Process Safety Management: Challenges, Benefits, and Transition ...soginsider
 
Multicomponent Spiral Wound Membrane Separation Model.pdf
Multicomponent Spiral Wound Membrane Separation Model.pdfMulticomponent Spiral Wound Membrane Separation Model.pdf
Multicomponent Spiral Wound Membrane Separation Model.pdfGiovanaGhasary1
 
Lecture 1: Basics of trigonometry (surveying)
Lecture 1: Basics of trigonometry (surveying)Lecture 1: Basics of trigonometry (surveying)
Lecture 1: Basics of trigonometry (surveying)Bahzad5
 
nvidia AI-gtc 2024 partial slide deck.pptx
nvidia AI-gtc 2024 partial slide deck.pptxnvidia AI-gtc 2024 partial slide deck.pptx
nvidia AI-gtc 2024 partial slide deck.pptxjasonsedano2
 
Lifting Plan | Lifting Plan for Different Process Equipment | Gaurav Singh Ra...
Lifting Plan | Lifting Plan for Different Process Equipment | Gaurav Singh Ra...Lifting Plan | Lifting Plan for Different Process Equipment | Gaurav Singh Ra...
Lifting Plan | Lifting Plan for Different Process Equipment | Gaurav Singh Ra...Gaurav Singh Rajput
 
Quasi-Stochastic Approximation: Algorithm Design Principles with Applications...
Quasi-Stochastic Approximation: Algorithm Design Principles with Applications...Quasi-Stochastic Approximation: Algorithm Design Principles with Applications...
Quasi-Stochastic Approximation: Algorithm Design Principles with Applications...Sean Meyn
 
ChatGPT-and-Generative-AI-Landscape Working of generative ai search
ChatGPT-and-Generative-AI-Landscape Working of generative ai searchChatGPT-and-Generative-AI-Landscape Working of generative ai search
ChatGPT-and-Generative-AI-Landscape Working of generative ai searchrohitcse52
 
How to Write a Good Scientific Paper.pdf
How to Write a Good Scientific Paper.pdfHow to Write a Good Scientific Paper.pdf
How to Write a Good Scientific Paper.pdfRedhwan Qasem Shaddad
 
Modelling Guide for Timber Structures - FPInnovations
Modelling Guide for Timber Structures - FPInnovationsModelling Guide for Timber Structures - FPInnovations
Modelling Guide for Timber Structures - FPInnovationsYusuf Yıldız
 
Engineering Mechanics Chapter 5 Equilibrium of a Rigid Body
Engineering Mechanics  Chapter 5  Equilibrium of a Rigid BodyEngineering Mechanics  Chapter 5  Equilibrium of a Rigid Body
Engineering Mechanics Chapter 5 Equilibrium of a Rigid BodyAhmadHajasad2
 
Guardians and Glitches: Navigating the Duality of Gen AI in AppSec
Guardians and Glitches: Navigating the Duality of Gen AI in AppSecGuardians and Glitches: Navigating the Duality of Gen AI in AppSec
Guardians and Glitches: Navigating the Duality of Gen AI in AppSecTrupti Shiralkar, CISSP
 
SATELITE COMMUNICATION UNIT 1 CEC352 REGULATION 2021 PPT BASICS OF SATELITE ....
SATELITE COMMUNICATION UNIT 1 CEC352 REGULATION 2021 PPT BASICS OF SATELITE ....SATELITE COMMUNICATION UNIT 1 CEC352 REGULATION 2021 PPT BASICS OF SATELITE ....
SATELITE COMMUNICATION UNIT 1 CEC352 REGULATION 2021 PPT BASICS OF SATELITE ....santhyamuthu1
 
Renewable Energy & Entrepreneurship Workshop_21Feb2024.pdf
Renewable Energy & Entrepreneurship Workshop_21Feb2024.pdfRenewable Energy & Entrepreneurship Workshop_21Feb2024.pdf
Renewable Energy & Entrepreneurship Workshop_21Feb2024.pdfodunowoeminence2019
 
Graphics Primitives and CG Display Devices
Graphics Primitives and CG Display DevicesGraphics Primitives and CG Display Devices
Graphics Primitives and CG Display DevicesDIPIKA83
 
The relationship between iot and communication technology
The relationship between iot and communication technologyThe relationship between iot and communication technology
The relationship between iot and communication technologyabdulkadirmukarram03
 

Dernier (20)

OS Services, System call, Virtual Machine
OS Services, System call, Virtual MachineOS Services, System call, Virtual Machine
OS Services, System call, Virtual Machine
 
ASME BPVC 2023 Section I para leer y entender
ASME BPVC 2023 Section I para leer y entenderASME BPVC 2023 Section I para leer y entender
ASME BPVC 2023 Section I para leer y entender
 
Transforming Process Safety Management: Challenges, Benefits, and Transition ...
Transforming Process Safety Management: Challenges, Benefits, and Transition ...Transforming Process Safety Management: Challenges, Benefits, and Transition ...
Transforming Process Safety Management: Challenges, Benefits, and Transition ...
 
Présentation IIRB 2024 Marine Cordonnier.pdf
Présentation IIRB 2024 Marine Cordonnier.pdfPrésentation IIRB 2024 Marine Cordonnier.pdf
Présentation IIRB 2024 Marine Cordonnier.pdf
 
Multicomponent Spiral Wound Membrane Separation Model.pdf
Multicomponent Spiral Wound Membrane Separation Model.pdfMulticomponent Spiral Wound Membrane Separation Model.pdf
Multicomponent Spiral Wound Membrane Separation Model.pdf
 
Lecture 1: Basics of trigonometry (surveying)
Lecture 1: Basics of trigonometry (surveying)Lecture 1: Basics of trigonometry (surveying)
Lecture 1: Basics of trigonometry (surveying)
 
nvidia AI-gtc 2024 partial slide deck.pptx
nvidia AI-gtc 2024 partial slide deck.pptxnvidia AI-gtc 2024 partial slide deck.pptx
nvidia AI-gtc 2024 partial slide deck.pptx
 
Présentation IIRB 2024 Chloe Dufrane.pdf
Présentation IIRB 2024 Chloe Dufrane.pdfPrésentation IIRB 2024 Chloe Dufrane.pdf
Présentation IIRB 2024 Chloe Dufrane.pdf
 
Lecture 2 .pptx
Lecture 2                            .pptxLecture 2                            .pptx
Lecture 2 .pptx
 
Lifting Plan | Lifting Plan for Different Process Equipment | Gaurav Singh Ra...
Lifting Plan | Lifting Plan for Different Process Equipment | Gaurav Singh Ra...Lifting Plan | Lifting Plan for Different Process Equipment | Gaurav Singh Ra...
Lifting Plan | Lifting Plan for Different Process Equipment | Gaurav Singh Ra...
 
Quasi-Stochastic Approximation: Algorithm Design Principles with Applications...
Quasi-Stochastic Approximation: Algorithm Design Principles with Applications...Quasi-Stochastic Approximation: Algorithm Design Principles with Applications...
Quasi-Stochastic Approximation: Algorithm Design Principles with Applications...
 
ChatGPT-and-Generative-AI-Landscape Working of generative ai search
ChatGPT-and-Generative-AI-Landscape Working of generative ai searchChatGPT-and-Generative-AI-Landscape Working of generative ai search
ChatGPT-and-Generative-AI-Landscape Working of generative ai search
 
How to Write a Good Scientific Paper.pdf
How to Write a Good Scientific Paper.pdfHow to Write a Good Scientific Paper.pdf
How to Write a Good Scientific Paper.pdf
 
Modelling Guide for Timber Structures - FPInnovations
Modelling Guide for Timber Structures - FPInnovationsModelling Guide for Timber Structures - FPInnovations
Modelling Guide for Timber Structures - FPInnovations
 
Engineering Mechanics Chapter 5 Equilibrium of a Rigid Body
Engineering Mechanics  Chapter 5  Equilibrium of a Rigid BodyEngineering Mechanics  Chapter 5  Equilibrium of a Rigid Body
Engineering Mechanics Chapter 5 Equilibrium of a Rigid Body
 
Guardians and Glitches: Navigating the Duality of Gen AI in AppSec
Guardians and Glitches: Navigating the Duality of Gen AI in AppSecGuardians and Glitches: Navigating the Duality of Gen AI in AppSec
Guardians and Glitches: Navigating the Duality of Gen AI in AppSec
 
SATELITE COMMUNICATION UNIT 1 CEC352 REGULATION 2021 PPT BASICS OF SATELITE ....
SATELITE COMMUNICATION UNIT 1 CEC352 REGULATION 2021 PPT BASICS OF SATELITE ....SATELITE COMMUNICATION UNIT 1 CEC352 REGULATION 2021 PPT BASICS OF SATELITE ....
SATELITE COMMUNICATION UNIT 1 CEC352 REGULATION 2021 PPT BASICS OF SATELITE ....
 
Renewable Energy & Entrepreneurship Workshop_21Feb2024.pdf
Renewable Energy & Entrepreneurship Workshop_21Feb2024.pdfRenewable Energy & Entrepreneurship Workshop_21Feb2024.pdf
Renewable Energy & Entrepreneurship Workshop_21Feb2024.pdf
 
Graphics Primitives and CG Display Devices
Graphics Primitives and CG Display DevicesGraphics Primitives and CG Display Devices
Graphics Primitives and CG Display Devices
 
The relationship between iot and communication technology
The relationship between iot and communication technologyThe relationship between iot and communication technology
The relationship between iot and communication technology
 

Android Implementation using MQTT Protocol

  • 1. IS 748 – MOBILE PERVASIVE COMPUTING Midterm Project MQTT ANDROID APPLICATION IMPLEMENTATION Fatih Özlü 1777762 Information Systems Middle East Technical University 06.01.2013 fatihozlu@aselsan.com.tr
  • 2. 2 TABLE OF CONTENTS 1. MQTT ANDROID APPLICATION.....................................................................................3 1.1. Overview ...........................................................................................................3 1.2. Definitions, Abbreviations and Acronyms ......................................................................3 1.3. Design of the Application .........................................................................................3 1.4. Platform ............................................................................................................7 1.5. Testing the Application ...........................................................................................8 2. TECHNOLOGIES USED IN THE PROJECT......................................................................... 14 2.1. AChartEngine .................................................................................................... 14 2.2. MQTT from PAHO ............................................................................................... 14 2.3. ActiveMQ Broker Configuration ............................................................................... 17 3. REFERENCES........................................................................................................ 18
  • 3. 3 1. MQTT ANDROID APPLICATION 1.1. Overview This document is prepared as a project for IS 748 lecture. The document is based on the implementation project of the lecture. In this project, an Android application is implemented by using MQTT for communication. It is thought to be client of a CEP (Complex Event Processing) engine developed for IS 589 Master Project, which is based on collecting sensor data from classroom environment and extracting complex events. This Android project is the high-level application part of the Master Project to visualize sensor data and inform the users. 1.2. Definitions, Abbreviations and Acronyms CEP Complex Event Processing JMS Java Messaging Service M2M Machine-to-Machine MQTT MQ Telemetry Transport 1.3. Design of the Application In this implementation project, Android client will be informed about condition of a smart classroom. The condition contains information like ambient temperature and light status, motion detection, etc. Phone-Server communication will be based on MQTT (a topic based publish-subscribe model). According to the proposed design, a mobile client could be able to subscribe several pre-defined topics and will be notified whenever the server publishes a message on any of the subscribed topics. Mobile application will use MQTT protocol for communicating with the server (Figure 1). In addition, mobile clients will show meaningful information rules defined in the CEP engine to inform users to trigger events like opening air conditioner, or opening the windows in the classroom as well as statistics about the server data that is collected from sensors. So the application will subscribe predefined topics to be informed, whenever event occurs, the message about the event will be published to the user. The user can be able to monitor these messages/events.
  • 4. 4 The application is implemented in Eclipse environment by using Java programming language in Android platform. The application is composed from four packages each of which is separated for a different purpose (Figure 2). graphics package is used for visual purposes to show sensor data by using charts on time axis. The data package is used for storing the sensor data on the application side to retrieve in case of needs from other packages. In mqtt package, communication with the broker is implemented to get messages over a topic based messaging system. client package is used for showing context information on a tabbed structure by using Android Activity classes. This is the starting point of the application and it contains the user interface tabs for making several operations. publish /subscribe publish /subscribe sensor events complex events ACTIVEMQ BROKER (SERVER) Android MQTT Client MQTT Protocol Classroom Setups Collecting sensor data CEP Engine Figure 1 System design
  • 5. 5 Figure 2 Package Diagram 1.3.1. client Package In this package, main operations are managed by using Activity classes on Tabbed layout. For each operation of the application, there are several Activity classes started from the MainActivity class. MainActivity is the container class of the other Activity classes Figure 3 client Package Class Diagram
  • 6. 6 In addition, MainActivity takes published messages from MQTTConnectorTask class that deals with receiving messages from subscribed messages from the broker. The MainActivity forwards the relevant message to the active Activity class. By this way, active Activity class can update the display to show new messages on the screen. Each derived concrete Activity class is used for different purpose. DoorInActiviy, DoorOutActivity, WallTeacherActivity, WallWindowActivity, WindowActiviy is used for demonstrating the classroom setups to provide monitoring the sensors deployed to these places. SettingsActivity is responsible for starting/stopping the application or exiting from the application and setting the broker server url of the application, since the broker can be interchangeable with respect to needs. GraphicsActivity is used for visualizing the sensor data on charts and graphics. It is designed as extendable as possible; so the classroom temperature of the inside and the outside is used for the present, but other sensors can be added to the system easily to show on charts, as well. CEPInfoActivity is used to monitor complex events extracted from the CEP engine on the broker side. 1.3.2. data Package This package contains classes of the sensors used in the classroom. Each sensor value is stored on the SensorDataFactory to use in charts or for monitoring, etc. Figure 4 data Package Class Diagram 1.3.3. graphics Package This package contains classes for showing the sensor data on the charts. The design is flexible and extendable to add new types of the sensors to visualize. Each sensor data is inserted to the dataset of the SensorChart of the current sensor type.
  • 7. 7 Figure 5 graphics Package Class Diagram 1.4. Platform The properties of the each platform and library used in the project is given in Table 1. Table 1.4-1 Platforms and Libraries used in the Project Apache ActiveMQ Version 5.7.0 Eclipse SDK Version: 3.7.1 Android Platform Version: 2.3.3 achartengine-1.0.0.jar for charting the sensor data org.eclipse.paho.client.mqttv3.jar for communicating and getting messages from the broker
  • 8. 8 1.5. Testing the Application For testing the application, CEP on the broker is simulated the real time environment of the classroom. To this simulation, the stored sensor data is retrieved from the database and sent to the rule machine, as if the sensors are working in the real time. The CEP engine on the broker side is even run to process messages and extract high level information. In addition, the sensor data which is read from the database is also published to the topics that the Android client listens. Therefore, the Android application can receive messages from both sensor data topics and the CEP machine topics. Listened Topic Source: Clasroom Setup / CEP Hall Effect – 0 Door Setup Out Infrared Proximity – 0 Door Setup Out Optical – 0 Door Setup Out Motion - 0 Door Setup Out Infrared Proximity – 1 Door Setup In Temp - 1 Outside(Window) Setup Light - 1 Outside(Window) Setup Electret - 0 Wall Setup Teacher Temp - 0 Wall Setup Teacher Light - 0 Wall Setup Teacher Motion - 1 Wall Setup Window Light – 2 Wall Setup Window Esper CEP Engine 1.5.1.Starting ActiveMQ Broker Apcahe ActiveMQ Broker is started from the batch file activemq.bat located in the activemq installation folder. When the batch file is called from the command line, the broker is executed on the machine (Figure 6). After the broker is started, the publishers and subscribers get ready for communicating over publish-subscribe topics. This messaging is based on JMS (Java Messaging Service), but in this project, the broker is configured to support MQTT Connections to receive and send MQTT messages, which are, some kind of publish/subscribe messaging service. The configuration is mentioned, in the next sections.
  • 9. 9 Figure 6 Starting ActiveMQ Broker 1.5.2.Starting Simulator and CEP Engine JMSToEsper Java application is implemented for simulating the classroom environment. This application reads data from database and both publishes messages to corresponding topics and starts the CEP engine to take events for extracting complex events. When the application is executed, the sensor data which is stored on the database with time stamp is published in the real time sequence as the order and duration of the real time. If the user wants, the simulation can be speeded up to 2x, 4x, or faster to see messages more fast moving from the real time.
  • 10. 10 Figure 7 Starting the Simulator - CEP Engine 1.5.3. Running Android Application After starting both the Simulator with CEP Engine and the broker, the mobile application can be run. When the application is executed, Settings menu is opened by default. From this menu, users can start the application to receive messages or can update the url of broker. Figure 8 Settings Menu and Updating the Broker URL
  • 11. 11 The application can be started or stopped, whenever the user wants. The example screens of the application is given in Figure 9. After starting, the application will display a message about connecting to the topics. The messages comes from the server side could be monitored from the Tabs located on the upper side of the screen. The tabs are located corresponsding to the classroom sensor setups. There are 4 four setups: DoorIn, DoorOut, WallTeacher, WallWindow and Window setups. Door setups are located to the door of the classroom; Wall setups are located on the inside wall of the classroom; Window setup is located to the outside of the classroom’s window. The complex events extracted from CEP Rule Machine Esper are given in tab CEP Info. Example screens from these setups are given in below Figures 10-11. Figure 9 Starting(left)/Stopping(right) the Application
  • 12. 12 Figure 10 Screens from DoorOut and Window Setups Figure 11 Screens from Extracted CEPInformation and WallTeacher Setup
  • 13. 13 Lastly, user can see the chart of the temperature of the inside and the outside of the classroom, until the present time from the Graphics tab (Figure 12). Figure 12 Monitoring the Classroom Inside and Outside Temperature on Chart
  • 14. 14 2. TECHNOLOGIES USED IN THE PROJECT 2.1. AChartEngine AChartEngine is a charting library for Android applications [1]. It is used for several kinds of chart types, as given in [1]:  line chart  area chart  scatter chart  time chart  bar chart  pie chart  bubble chart  doughnut chart  range (high-low) bar chart  dial chart / gauge  combined (any combination of line, cubic line, scatter, bar, range bar, bubble) chart  cubic line chart In this project, I used the line chart for two series (inside and outside temperature) with X time axis. The collected data could be also shown in other charts, since the design is flexible to use other charts. AChartEngine is currently at the 1.0.0 release and it is free to use. It is licensed under Apache License 2.0. This library is also open-source; the source codes can be reachable from its repository on the Web. 2.2. MQTT from PAHO MQTT [2], which is a lightweight publish/subscribe messaging protocol and widely used in sensors, home automation, mobile applications and such small devices which also is used in this study. MQTT is a (M2M) machine-to-machine publish/subscribe messaging protocol based on topic structure. The topic structure is used for messaging between subscribers and publishers. The publisher send messages over a predefined topic, the consumers (subscribers) receive messages from the topics to which they subscribe.
  • 15. 15 There are several open source and free MQTT Clients and Brokers (Servers) to be used for this type messaging for different platforms and programming languages such as C, C++, Java, Python, Delphi, PHP etc. as given below: Servers / Brokers for MQTT (taken from [3]) IBM WebSphere MQ Telemetry It provides full MQTT v3.1 support with WebSphere MQ. Supports Java (MIDP and above) and C clients. IBM Lotus Expeditor micro broker Part of the Lotus Expeditor product, micro broker is an OSGi Java implementation of MQTT server. It provides Java (including JMS), C# and C clients. Really Small Message Broker It provides complete MQTT v3.1 support, and a C client API. Mosquitto An Open Source MQTT server with C, C++, Python and JavaScript clients. Eclipse Paho The Eclipse Paho project hosts a version of the mosquitto broker for the Machine-to-Machine Industry Working Group [4]. MQTT.js A node.js MQTT server. eMQTT m2m.io webMethods Nirvana Messaging A messaging engine with support for many different transports. It also supports MQTT. RabbitMQ An AMQP message broker – with an MQTT plugin. Apache ActiveMQ ActiveMQ has a support for MQTT with configuration. Apache Apollo Moquette A Java MQTT broker. IBM WebSphere Message Broker It supports MQTT v3.
  • 16. 16 Clients for MQTT (taken from [3]): Only C,C++ and Java Clients are given: ActionScript C  Eclipse Paho – a C client (based on the IBM WebSphere MQ Telemetry C client)  libmosquitto – a C client library provided with the mosquitto server  IBM WebSphere MQ Telemetry provides a C client API (largely identical to Eclipse Paho)  IBM Lotus Expeditor micro broker includes a C client API  liblwmqtt - a very lightweight C client undeveloped – use Eclipse Paho instead C++  libmosquittopp – a C++ client library provided with the mosquitto server Delphi Erlang Java  Eclipse Paho - a Java client (based on the IBM WebSphere MQ Telemetry Java client)  MeQanTT  mqtt-client – a Fusesource Java MQTT client with a variety of API styles  moquette-mqtt – a Java client  IBM WebSphere MQ Telemetry provides a Java client API  IBM Lotus Expeditor micro broker includes two Java client APIs Javascript / node.js LotusScript .NET Objective-C Perl PHP Python Ruby
  • 17. 17 In this project, as a broker, ActiveMQ Broker [5] is used and as a client, Eclipse Paho [6] MQTT Client is used. Paho Client is developed under Eclipse Technology Project as open source. It is given a solution as Machine-to-Machine (M2M) from Eclipse Project. First releases are aimed to be developed for MQTT Java and C client code. The client library is used in the mobile application. 2.3. ActiveMQ Broker Configuration To make integrity of MQTT with ActiveMQ, which is broker of the publish/subscribe messaging and supports MQTT protocol connection, configuration is done on the broker side. To enable MQTT on ActiveMQ [5], given xml code is inserted in to the configuration file of broker ActiveMQ: <transportConnectors> <transportConnector name="mqtt" uri="mqtt://localhost:1883?transport.defaultKeepAlive=60000"/> </transportConnectors> This enables ActiveMQ to support connection comes from MQTT clients for 60 seconds. After 60 seconds, the broker stops hanging inactive connections. The default port of MQTT is 1883 for TCP/IP, for secure connections, MQTT could be able to use TCP/IP port 8883 over SSL.
  • 18. 18 3. REFERENCES [1] "AChartEngine Web Site," [Online]. Available: http://www.achartengine.org/. [Accessed 2 1 2013]. [2] "MQ Telemetry Transport," [Online]. Available: http://mqtt.org/. [Accessed 25 12 2012]. [3] "MQTT Softwares," [Online]. Available: http://mqtt.org/software. [Accessed 2 1 2013]. [4] "Machine-to-Machine Industry Working Group," [Online]. Available: http://m2m.eclipse.org/. [Accessed 1 1 2013]. [5] "MQTT on Apache ActiveMQ," [Online]. Available: http://activemq.apache.org/mqtt.html. [Accessed 26 12 2012]. [6] "Paho Project," [Online]. Available: http://www.eclipse.org/paho/. [Accessed 28 12 2012].