Date post: | 30-May-2018 |
Category: |
Documents |
Upload: | farrukhsaleem01 |
View: | 219 times |
Download: | 0 times |
of 50
8/14/2019 Wireless Cost Effective Security System Using GPRS Final
1/50
8/14/2019 Wireless Cost Effective Security System Using GPRS Final
2/50
Wireless Cost Effective
Security System UsingGPRS/EDGE
Group MembersRafay Hassan Niazi (303)Nisar Hussain (140)Syed Zain Abbas Jafri (106)Farrukh Saleem (03)
8/14/2019 Wireless Cost Effective Security System Using GPRS Final
3/50
Description
Its a Network Application based onClient/Server Architecture for RemoteMonitoring with the aid of mostcommonly used hand held device i.e.Cell Phone.
Mobile Application will interact with themobile camera and take snapshots atusers will. At the same time theapplication will establish connection
with the Server using GPRS or EDGE
8/14/2019 Wireless Cost Effective Security System Using GPRS Final
4/50
Description
The current image uploaded to webserver and stored in database, nowcan be viewed on any otherGPRS/EDGE enabled cell phonerunning our Receiver MobileApplication.
8/14/2019 Wireless Cost Effective Security System Using GPRS Final
5/50
obileameraithGPRSEB SERVER PRS NABLEDDEVICE
8/14/2019 Wireless Cost Effective Security System Using GPRS Final
6/50
Motivation
The idea is to build an applicationthat would monitor any remote
location without the constraints ofthe following.
Wired system of Devices.
Specified Region/Boundary.Higher Cost of Implementation.
8/14/2019 Wireless Cost Effective Security System Using GPRS Final
7/50
Solution
Wireless Device Cell Phone is the most commonly
used and easily available WirelessDevice.
No Boundary limit Once uploaded to the Web Server ,
images/snapshots of the distantlocation would be easily accessible
via Internet.
8/14/2019 Wireless Cost Effective Security System Using GPRS Final
8/50
Solution
Cost Efficient Implementation Our Mobile Sender Application will
turn a simple mobile camera intoSurveillance Camera and upload thecurrent images with the aid ofGPRS/EDGE without requiring any
additional Hardware.
8/14/2019 Wireless Cost Effective Security System Using GPRS Final
9/50
Solution
Our project comprises of two mobileapplications run separately on two
cell phones and a Serverapplication runs on Web Server.
Both Mobile applications connect
with Server application to performtheir respective functions.
8/14/2019 Wireless Cost Effective Security System Using GPRS Final
10/50
Major Concepts Of TheProject
8/14/2019 Wireless Cost Effective Security System Using GPRS Final
11/50
GPRS (General PacketRadio Service)
2.5G Cellular Communication (GSM).Packet Oriented Mobile data service.
a best-effort packet switchedservice.Data rates of 56-114 Kbit/s.Supports WAP (Wireless Application
Protocol)WAP enables access to Mobile Web.GPRS data transfer is typically
charged per megabyte of traffic
http://en.wikipedia.org/wiki/Best-efforthttp://en.wikipedia.org/wiki/Best-effort8/14/2019 Wireless Cost Effective Security System Using GPRS Final
12/50
GPRS (General PacketRadio Service)
It provides moderate speed datatransfer, by using unused
time division multiple access(TDMA) channels in the GSMsystem.
WhenTCP/IP is used, each phone
can have one or more IP addressesallocated.
TCP handles any packet loss (e.g.
due to a radio noise induced
http://en.wikipedia.org/wiki/Time_division_multiple_accesshttp://en.wikipedia.org/wiki/Internet_protocol_suitehttp://en.wikipedia.org/wiki/IP_addresshttp://en.wikipedia.org/wiki/IP_addresshttp://en.wikipedia.org/wiki/Internet_protocol_suitehttp://en.wikipedia.org/wiki/Time_division_multiple_access8/14/2019 Wireless Cost Effective Security System Using GPRS Final
13/50
8/14/2019 Wireless Cost Effective Security System Using GPRS Final
14/50
8/14/2019 Wireless Cost Effective Security System Using GPRS Final
15/50
EDGE (Enhanced Datarates for GSM Evolution)
It is an upgrade that provides morethan three-fold increase in both the
capacity and performance ofGSM/GPRS networks.In addition to
Gaussian minimum-shift keying
(GMSK), EDGE useshigher-order PSK/8 phase shift keying(8PSK).
http://en.wikipedia.org/wiki/Gaussian_minimum-shift_keyinghttp://en.wikipedia.org/wiki/Phase_shift_keyinghttp://en.wikipedia.org/wiki/Phase_shift_keyinghttp://en.wikipedia.org/wiki/Gaussian_minimum-shift_keying8/14/2019 Wireless Cost Effective Security System Using GPRS Final
16/50
MIDP (Mobile InformationDevice Profile)
A specification published for the useofJava on embedded devices such
as mobile phones and PDAsMIDP is part of theJava Platform, Micro Edition (JavaME) framework
There are several different ways tocreate MIDP applications.Code can be written in a plain
text editor.
http://en.wikipedia.org/wiki/Java_(programming_language)http://en.wikipedia.org/wiki/Embedded_devicehttp://en.wikipedia.org/wiki/Mobile_phonehttp://en.wikipedia.org/wiki/Personal_digital_assistanthttp://en.wikipedia.org/wiki/Java_Platform,_Micro_Editionhttp://en.wikipedia.org/wiki/Frameworkhttp://en.wikipedia.org/wiki/Text_editorhttp://en.wikipedia.org/wiki/IntelliJ_IDEAhttp://en.wikipedia.org/wiki/NetBeanshttp://en.wikipedia.org/wiki/Text_editorhttp://en.wikipedia.org/wiki/Frameworkhttp://en.wikipedia.org/wiki/Java_Platform,_Micro_Editionhttp://en.wikipedia.org/wiki/Personal_digital_assistanthttp://en.wikipedia.org/wiki/Mobile_phonehttp://en.wikipedia.org/wiki/Embedded_devicehttp://en.wikipedia.org/wiki/Java_(programming_language)8/14/2019 Wireless Cost Effective Security System Using GPRS Final
17/50
MIDlet
An application that conforms to theMIDP standard.
Typically implemented on a Java-enabled cell phone or other
embedded device or emulatorUnlike aJava applet, a MIDlet is
limited to use of the LCDUIThe main class needs to be a
subclass of
javax.microedition.midlet.MIDlet
http://en.wikipedia.org/wiki/Cell_phonehttp://en.wikipedia.org/wiki/Embedded_devicehttp://en.wikipedia.org/wiki/Java_applethttp://en.wikipedia.org/wiki/LCDUIhttp://en.wikipedia.org/wiki/LCDUIhttp://en.wikipedia.org/wiki/Java_applethttp://en.wikipedia.org/wiki/Embedded_devicehttp://en.wikipedia.org/wiki/Cell_phone8/14/2019 Wireless Cost Effective Security System Using GPRS Final
18/50
Mobile Media API(MMAPI)
Embedding multimedia capabilitiesin a MIDlet.
Java Specification Requests (JSR) 135Play different formats of audio and
video files from the network, arecord store, or a Java Archive (JAR)
file.Capture audio and video and take
snapshots.
Different device manufactures
8/14/2019 Wireless Cost Effective Security System Using GPRS Final
19/50
Mobile Media API(MMAPI)
Allow you to access media over HTTPand play the WAV file format for
audio and MP3 for video.All devices can be queried todiscover their capabilities.
8/14/2019 Wireless Cost Effective Security System Using GPRS Final
20/50
Servlet
A servlet is a Java programminglanguage class used to extend the
capabilities of servers.Host applications accessed via arequest-response programmingmodel.
Java Servlet technology definesHTTP-specific servlet classes forapplications hosted by Web
servers.
8/14/2019 Wireless Cost Effective Security System Using GPRS Final
21/50
Servlet
The Basic Servlet Architecture orLife Cycle
8/14/2019 Wireless Cost Effective Security System Using GPRS Final
22/50
Servlet Container
A specialized web server thatsupports servlet execution.
The ability to automatically translatespecific URLs into servlet requests.
Servlets are registered with a servletcontainer.
Also referred to as webcontainers or web engines.
Our Server Application uses Tomcatas servlet container.
8/14/2019 Wireless Cost Effective Security System Using GPRS Final
23/50
Hyper Text Transfer
Protocol
8/14/2019 Wireless Cost Effective Security System Using GPRS Final
24/50
Overview
Core of our project.An application-level TCP/IP based
protocol.Deliver virtually all files and otherdata, collectively called resources,on the World Wide Web.
A browser works as an HTTP client.Sends requests to an HTTP server
which is called Web server.
Port for HTTP servers to listen on is
8/14/2019 Wireless Cost Effective Security System Using GPRS Final
25/50
Overview
HTTP is connectionless.HTTP is media independent.
HTTP is stateless.
8/14/2019 Wireless Cost Effective Security System Using GPRS Final
26/50
Message Format
HTTP uses the client-server model.An HTTP client opens a connection
and sends a request message to anHTTP server.The server then returns a response
message, usually containing the
resource.The format of the request and
response messages is similar.
Structure of Message:
8/14/2019 Wireless Cost Effective Security System Using GPRS Final
27/50
Message Format
Zero or more header lines CRLF
A blank line i.e.. a CRLF
An optional message body like file,query data or query output.
8/14/2019 Wireless Cost Effective Security System Using GPRS Final
28/50
Methods()
The GET Method.Client application.
The GET method means retrieveinformation.
Identified by the Request-URI.
Request-URI refers to a data-producing
process.Produced data shall be returned as the
entity in the response.
The GET method can also be used to
8/14/2019 Wireless Cost Effective Security System Using GPRS Final
29/50
Methods()
Entire form submission can beencapsulated in one URL.
You can access the CGI or Servletprogram with a query.
Fully includes it in the URL.
Example:
http://myhost.com/mypath/myscript.cgi?name1=value1&name2=value2.
8/14/2019 Wireless Cost Effective Security System Using GPRS Final
30/50
Methods()
The POST MethodClient Application.
A POST request is used to send data to
the server to be processed byServlet.
A block of data sent with the request,
in the message body.Extra headers like Content-Type: and
Content-Length:
The request URI is not a resource to
retrieve.
8/14/2019 Wireless Cost Effective Security System Using GPRS Final
31/50
Methods()
The HTTP response is normallyprogram output, not a static file.
Query length can be unlimited (unlikein GET)
Can send entire files using post.
Form data is attached to the end of
the POST request (as opposed to theURL).
Not as quick and easy as using GET,but more versatile.
8/14/2019 Wireless Cost Effective Security System Using GPRS Final
32/50
Methods()
The doGet MethodServer application.
Performs the HTTP GET operation.
Overriding this method to support theGET operation also automaticallysupports the HEAD operation.
Set entity headers in the response.Access the writer or output stream.
Write any response data.
8/14/2019 Wireless Cost Effective Security System Using GPRS Final
33/50
Methods()
Include content type, and encoding.
Headers before the response data.
May include Data retrieval fromdatabase.
Parameters:req - HttpServletRequest that
encapsulates the request to the servlet.resp - HttpServletResponse that
encapsulates the response from theservlet.
8/14/2019 Wireless Cost Effective Security System Using GPRS Final
34/50
Methods()
The doPost methodServer application.
Performs the HTTP POST operation.
Read any data from the request (forexample, form parameters).
May include storing data in Database.
Set entity headers in the response.
Access the writer or output stream.
Write any response.
8/14/2019 Wireless Cost Effective Security System Using GPRS Final
35/50
Methods()
Parameters:req - HttpServletRequest that
encapsulates the request to the servlet.
resp - HttpServletResponse thatencapsulates the response from theservlet.
8/14/2019 Wireless Cost Effective Security System Using GPRS Final
36/50
Phases of Project
8/14/2019 Wireless Cost Effective Security System Using GPRS Final
37/50
Modules
Sender Client
Web Server
Receiver Client
8/14/2019 Wireless Cost Effective Security System Using GPRS Final
38/50
Sender Client
A Mobile client software/application.Coding in J2ME (refer as MIDlet)
Works in two phases:Capture ImageTransfer Image
Both phases take place concurrently.
Nothing in common when comes tothe implementation in form ofcode.
8/14/2019 Wireless Cost Effective Security System Using GPRS Final
39/50
Sender Client
8/14/2019 Wireless Cost Effective Security System Using GPRS Final
40/50
Sub Modules
Web Server
Get Image Code to receive the image in form
of byte stream from Mobile Client.
Display Image Code to display the image on Mobile
webpage in proper format.
8/14/2019 Wireless Cost Effective Security System Using GPRS Final
41/50
Sub Modules
Viewer Client
Utilizing simple Web Browser (e.g.Opera Mini) in Cell Phone forViewing current image on MobileWebpage.
Viewer Client Application (if timepermits)
Proper application on Viewer Client
for downloading image from Web
8/14/2019 Wireless Cost Effective Security System Using GPRS Final
42/50
Application Flow
ImageCapture()
onitorClient
ImageUpload() ReceiveImage()DisplayImag()
eb Server
Browser
DisplayImag()
DownloadImage()
iewerClientstablish connection
stablish connection
8/14/2019 Wireless Cost Effective Security System Using GPRS Final
43/50
Project Progress
8/14/2019 Wireless Cost Effective Security System Using GPRS Final
44/50
8/14/2019 Wireless Cost Effective Security System Using GPRS Final
45/50
ImageCapture();
/* the first step in taking pictures (officially called video capture) isobtaining a Player(to control media) from the Manager. Manager is theaccess point for obtaining system dependent resources*/
private void ImageCapture() {try { mPlayer=Manager.createPlayer("capture://video"); /*image
captured from camera using default image size*/
mPlayer.realize(); /*construct portion of the player w/o acquiringexclusive resources(examine media data & may take some time tocomplete)*/
mVideoControl=(VideoControl)mPlayer.getControl(VideoControl");/*video is displayed on the screen as an Item(superclass of componentthat can be added to a form). VideoControl class makes this possible*/
Form form = new Form("Camera"); Item item =
(Item)mVideoControl.initDisplayMode(GUIControl.USE_GUI_PRIMITIVE,* *
8/14/2019 Wireless Cost Effective Security System Using GPRS Final
46/50
ImageCapture();
form.append(item);form.addCommand(mBackCommand);form.setCommandListener(this);mDisplay.setCurrent(form);mPlayer.start(); }
catch (IOException ioe) { handleException(ioe); } /*IO exception ofsome sort occur*/
catch (MediaException me) { handleException(me); } /*indicateunexpected error condition in a method*/
while(true) {try { byte[] raw = mVideoControl.getSnapshot(null); /*get the
snapshot of the displayed content and return as a byte array*/ Image image = Image.createImage(raw, 0, raw.length);
/*creates immutable image decoded from the data stored in theb te arra *
8/14/2019 Wireless Cost Effective Security System Using GPRS Final
47/50
ImageCapture();
catch (MediaException me) { handleException(me); } } }
private void handleException(Exception e) { Alert a= new Alert("Exception", e.toString(), null,
null); /*to inform the user about errors and otherexception condition*/
a.setTimeout(Alert.FOREVER); /*set the time for
which the Alert is to be shown*/ mDisplay.setCurrent(a, mForm); }
8/14/2019 Wireless Cost Effective Security System Using GPRS Final
48/50
8/14/2019 Wireless Cost Effective Security System Using GPRS Final
49/50
Tools & Resources
Tools J2ME (NetBeans IDE 6.5.1) Tomcat
Resources java.sun.com/javame
JAVA2 by Ivor Horton J2ME Tutorials
8/14/2019 Wireless Cost Effective Security System Using GPRS Final
50/50
End Of Presentation