revision Dynamic Bluetooth File Sharing With Cellular...

Post on 31-Jan-2020

4 views 0 download

Transcript of revision Dynamic Bluetooth File Sharing With Cellular...

1

Dynamic Bluetooth File Sharing With Cellular Devices

Steve BrarGeorge ChenMichael HairJon Wagoner

Project Goals

• Establishing a Bluetooth connection

• Download application software to client

• Look up existing shared directory

• File Browsing Functionality

• Connection Identification

• Descriptions of Peripheral Nodes

• Download Status

2

Software/Hardware

• Simulation Environment - Java J2ME SDK 2.2.3– http://developer.sonyericsson.com/site/global/docstools/java/p_j

ava.jsp– http://developer.sonyericsson.com/getDocument.do?docId=65256

• Modified Bluetooth Plug-in – Sony Ericsson JSR82• Java SE Development Kit (JDK 1.4.2)• Windows Script 5.6• Devices – Sony Ericsson w600i Multimedia Phone• Testing/Emulator Environment – Personal Computer -

Cellular Emulation and directly on the Sony Ericsson w600i

Overview

• Bluetooth Protocol Stack

• Mobile Device Information Profile (MIDP)

• Program Hierarchy

• Live Demo

• Final Thoughts

3

Bluetooth Protocol Stack

Bluetooth Discovery

• Device needs to do device discovery and service discovery

• Device discovery: methods• Inquiry:

• startInquiry()• retrieveDevices()• cancelInquiry()

• Callbacks:• devicesDiscovered()• inquiryCompleted()

4

Bluetooth Discovery

Bluetooth Discovery

• Service Discovery: Methods• Inquiry:

• selectServices() == searchServices()

• cancelServiceSearch()

• Callbacks:• servicesDiscovered()

• serviceSearchCompleted()

• Needs to implement DiscoveryAgent and DiscoveryListner class • Agent looks for services and devices

• Listener implements callback mechanisms

5

Bluetooth Discovery

RFCOMM vs. OBEX

•• RFCOMMRFCOMM•• Better choice when you want to send/receive Better choice when you want to send/receive

stream datastream data•• OBEXOBEX

•• Allows one to send not only data, but also send Allows one to send not only data, but also send context or metadata about the payload. context or metadata about the payload.

•• Our project deals with sharing music files, Our project deals with sharing music files, so we chose OBEX! (thatso we chose OBEX! (that’’s the red pill in s the red pill in case you didncase you didn’’t know)t know)

6

Semantics of OBEX

• OBEX is not native to Bluetooth• Derived from IrDA (Infrared Data Association)

• Works not only through Bluetooth, but also other transport protocols (TCP/UDP)

OBEX operations

• An OBEX operation is an interaction between the server and the client

• The client sends commands to server• Server handles command• Commands available

• CONNECT• GET• PUT• …

7

MIDP

• Stands for Mobile Information Device Profile– Profile: set of standard APIs that support narrower

category of devices

• Part of J2ME specification• Specification for APIs to support broad portability

and deployment– Application delivery and billing– End-to-end secure transaction (e.g. https)– Signing model and security model– … a lot more!

• Currently version 2.0, but is backward compatible

MIDP Architecture

• From the high level point of view, the lowest level is the MID, which is the device hardware. The highest level is all the possible applications that can run on a MID

• CLDC: VM and

associated libraries

8

MIDP Security

• Sensitive Operations– javax.microedition.io.connector

• Protection Domains– Trusted/Untrusted MIDlets

• Signing MIDlet Suites– Certificates

– Code Verification

CLDC

• Stands for Connection Limited Device Configuration– Configuration: most basic set of libraries and

VM features

• Just like MIDP, it is also part of J2ME

• CLDC is aimed towards resource-constraint devices that have networking capability.

9

Live Demo

• Demo

• About Emulators– Availability

– Issues

Program Hierarchy

10

DemoMIDlet

• Creates the top-level interface to allow the user to select either the Server or Client

• Creates the appropriate Client or Server object

GUIMusicServer

• Merely provides the interface to the user and the actual device to select features of the BTMusicServer

• Also establishes the connection between the GUI and the device

• Allows the user to select which music files to share for other clients to download

11

BTMusicServer

• Makes the device discoverable by creating the Bluetooth OBEX server

• Adds the music server UUID to the service record

• Broadcasts the shared filenames

• Will send the shared music file to the client upon the client’s request

GUIMusicClient

• Provides the interface for the user to select which file (shared on the server) to download

• Will create the new file and save it in a specific location on the device

• Provides search error notification

12

BTMusicClient

• Actively searches for Bluetooth servers that are discoverable

• Upon discovering a server device, will connect to that device and retrieve list of shared music files

• Will download the music file from the server via OBEX

Challenges

• Setting up the Emulator properly• Signing the MIDlet• Having proper permissions for files

• J2ME specific function objects• File transfer• Finding devices able to accept open source modification:

• MIDP 2.0 compatible phones• Security certificates accepted

13

Our Pitfalls

• OBEX vs. RFComm Software Limitations

• Data Connectivity Compatibility to upload files to cellular devices

• SDK/Project compilation

• Carrier protected access to the MIDletnetwork functions

Future Considerations

• Power Consumption

• Enhanced On-the-Fly Connection/File Transfer Applications

• Continuous Device Discovery during file transfers

• PC-to-Cellular Device audio streaming

• Advanced lookup algorithms

• Multiple Simultaneous File Downloads

• Cross Platform Compatibility

• Security