4. Benefits

weaverchurchΛογισμικό & κατασκευή λογ/κού

15 Αυγ 2012 (πριν από 5 χρόνια και 2 μήνες)

267 εμφανίσεις

Aymeric PIERRE



870120
-
*397

Quentin THIBERVILLE


860411
-
*339











Mighty Screen

Pervasive Computing project


Aymeric PIERRE


Quentin THIBERVILLE

M7012E Pervasive Computing

2

10/12/2008





Table of contents




1.

Project Description

................................
................................
................................
..........................

3

2. Req
uirements Specification

................................
................................
................................
.................

4

2.1 User Characteristics
-

Actors

................................
................................
................................
.........

4

2.2 Use Cases and Functional Requirements

................................
................................
......................

4

2.2.1 Use cases

................................
................................
................................
................................

4

2.2.3

Use case
diagram

................................
................................
................................
.............

4

2.2.4 Storyboard

................................
................................
................................
................................
..

5

3. Technologies used.

................................
................................
................................
..............................

6

3.1 NFC

................................
................................
................................
................................
................

6

3.2 Bluetooth

................................
................................
................................
................................
.......

6

3.3 Java

................................
................................
................................
................................
................

6

4. Benefits

................................
................................
................................
................................
................

7

4.1 Before NFC

................................
................................
................................
................................
.....

7

4.2 With NFC

................................
................................
................................
................................
........

7

5. The application

................................
................................
................................
................................
....

8

5.1 Design

................................
................................
................................
................................
............

8

5.2 What wo
rks

................................
................................
................................
................................
...

8

5.3 What didn’t work

................................
................................
................................
...........................

9

6. Conclusion

................................
................................
................................
................................
.........

10



Aymeric PIERRE


Quentin THIBERVILLE

M7012E Pervasive Computing

3

10/12/2008


1.

Project Description


The assignment is to deve
lop
an application which transfers almost instantaneously the contents
(music, photos, films…) of a mobile phone on a computer screen. The application must start by
scanning a simply RFID tag with the mobile phone equipped with NFC technology.

For this we
have to implement a server application on the computer, a client application on the
mobile phone, use NFC reader of the phone and Bluetooth protocol to transfer the contents.




Simply put our mobile phone on our PC and let see pictures inside!





Aymeric PIERRE


Quentin THIBERVILLE

M7012E Pervasive Computing

4

10/12/2008

2. Re
quirements Specification


2.1 User Characteristics
-

Actors


Home User

It’s the final user for the application.

A typical user

has no knowledge of computer programming, so
the application needs to
be as simple as possible.


2.2 Use Cases and Functional R
equirements

2.2.1 Use cases


Connection


Participating actors

Home user.

Entry condition

User tags the mobile phone on the RFID tag.

Event flow

-

Application starts on the phone.

-

Bluetooth connection established between the phone and the computer.

-

C
ontents are transferred.

Exit condition

All the contents on the phone are now on the computer


Navigation


Participating actors

Home user.

Entry condition

User uses the phone pad.

Event flow

-

Information

sent

via Bluetooth.

-

The cursor moves on the s
creen.

Exit condition

Home
user stops

navigating.


Disconnection


Normal

Participating actors

Home user.

Entry condition

User
tags the phone on the RFID tag.

Event flow

-

Application on the mobile phone sends an End of connection request to
the server.

-

Application closes the connection.

Exit condition

The
Application is closed on the mobile phone.


Forced

Participating actors

Home user.

Entry condition

User go too far away from the computer with the mobile phone in his
pocket

Event flow

-

The conn
ection is lost between the server and the client, due to the
distance.

-

Application closes automatically on the phone.

Exit condition

Application is closed on the mobile phone.


2.2.3

Use case
diagram


Aymeric PIERRE


Quentin THIBERVILLE

M7012E Pervasive Computing

5

10/12/2008


2.2.4 Storyboard

1)

Mobile phone detects PC’s Bluetooth ad
dress from the NFC tag.

2)

It establishes the connection between both devices.










3)

Automatically transfers data and detects services

4)

Wait for user actions









5)

Shutdown application if we sweep tag again


Aymeric PIERRE


Quentin THIBERVILLE

M7012E Pervasive Computing

6

10/12/2008

3. Technologies

used.


3.1 NFC


NFC is
RF
ID based:



Useful contactless connection



Short range

: 4cm



Small storage capacity

Also, it is s
upported by Nokia, Philips, Sony and
120 organizations since 2004

(semiconductor, mobile
device, operator, financial, IT, and services companies)



3.2 Bluetooth


Major and reliable protocol



Range : a room



Bandwidth up to 1Mb/s



3.3 Java


Reliable programming language with
Portability
(
Nokia, PC, Mac, Linux
)


Using this kind of language we can move a part of our application from the client to the
server without

any major trouble. It is very flexible.






Aymeric PIERRE


Quentin THIBERVILLE

M7012E Pervasive Computing

7

10/12/2008



4. Benefits

4.1 Before NFC


Today, if you want to connect a device
-
for example a mobile phone
-

to another device
-
for example
PC B here
-

you will have to do the discovery step, your Bluetooth will detect a
ll devices and it will be
a mess to choose which PC you want to connect.


4.2 With NFC

Idea: Do not care about device discovery, which is a boring part of a Bluetooth transfer.


Advantages:

-

From

NFC about the locality of the transmission to read right ad
dress

-

From Bluetooth, because connection range is much important with Bluetooth (a room) than
with NFC (few centimeters)

Withdraws:

-

Using two technologies means
two invest
ments

-

Need to write PC’s Bluetooth address on the NFC tag

Aymeric PIERRE


Quentin THIBERVILLE

M7012E Pervasive Computing

8

10/12/2008


5.
The application

5.1
De
sign



On the computer side, we have the MightyScreen class which is the main class. It starts the program,
and launches a listener on the Bluetooth device of the computer (using the jsr
-
082). It controls all the
Bluetooth activity when a connection is es
tablished.

The Gui class create the graphic interface on which we will see the phone pictures (and other media).

The DisplayImage class is used to display image in the Gui (to resize the image).

In this part we will be able to add other classes for the oth
er functionalities, like a Music class to play
music, or a Video class.


On the phone side, we only have one main class, which using the NFC reader of the phone to read
Bluetooth address on a NFC tag, and which start the connection and the transfer of the
media.


5.2 What works


We succeed to create the Gui on the computer. We simulate a fake Bluetooth connection on the
computer to see how the program responds to an attempt of connection. It works, and the program
shows an image in the Gui, using the Displa
yImage class to resize it.

It wasn’t easy, especially for the Bluetooth part: there is a lot of different distribution of JSR 082.
Some of them only work on Windows, other only on Linux or Mac, and there are not very stable.
Some distributions stable and c
omplete exist, but you have to buy them.

We choose the Bluecove distribution.


It was also a tough task to simulate a Bluetooth connection on a computer without Bluetooth device.

Aymeric PIERRE


Quentin THIBERVILLE

M7012E Pervasive Computing

9

10/12/2008


5.3 What didn’t work


We got a mountain of problem on the phone part.

First
, the compilation of the class: we used the Nokia library (because we wanted to use the NFC
reader of the Nokia), but for an obscure reason, Netbeans didn’t want to compile the class. After
some changes in the Nokia library (by deleting some files), the co
mpilation finally works.


Unfortunately, the program didn’t work on the Nokia emulator. When we launched the program, it
was like there was no program to launch (no application available to launch). We suspect an error on
our side at first, but it was more

complicated. After trying with a simple HelloWorld application, we
notice that there was something wrong with the Netbeans compiler. Indeed, when we compile the
HelloWorld application using the compiler of the mobility pack (using code line), it works, bu
t when
we used the Netbeans compiler, we got the same problem (no application available to launch). So we
try to compile with the mobility pack, but as we are not used to use code line, specifying the libraries
used and her path..., that doesn’t work (and
we had not enough time to see more deeply).


We didn’t succeed to find out what was the problem on the Netbeans compiler, so we couldn’t be
able to continue the phone part and to have a demo of our program.

Aymeric PIERRE


Quentin THIBERVILLE

M7012E Pervasive Computing

10

10/12/2008


6. Conclusion


This project was very interestin
g. We discover a lot of new technologies in the course, and with this
project (use NFC and Bluetooth technology in a java application was new for us). But as for all new
technology, it was hard, very hard, to correctly use them, and to find help on them (N
FC is very new).


We encountered two major problems: the lack of time (as we are exchange student, we travel a lot
to visit and enjoy Sweden) and the lack of background in Java programming (We never worked on a
real java project before).


Our application d
oesn’t work, but I think that the most important for us is that now we have an
experience in a big project, dealing with new technology, with its own difficulties. It will help us
someday if we’ll have the occasion to work on java programming.