revision dynamic bluetooth file sharing with cellular...

13
1 Dynamic Bluetooth File Sharing With Cellular Devices Steve Brar George Chen Michael Hair Jon 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

Upload: others

Post on 31-Jan-2020

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: revision Dynamic Bluetooth File Sharing With Cellular Deviceschuah/rubinet/people/chuah/classes/eec173... · • Windows Script 5.6 • Devices – Sony Ericsson w600i Multimedia

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

Page 2: revision Dynamic Bluetooth File Sharing With Cellular Deviceschuah/rubinet/people/chuah/classes/eec173... · • Windows Script 5.6 • Devices – Sony Ericsson w600i Multimedia

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

Page 3: revision Dynamic Bluetooth File Sharing With Cellular Deviceschuah/rubinet/people/chuah/classes/eec173... · • Windows Script 5.6 • Devices – Sony Ericsson w600i Multimedia

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()

Page 4: revision Dynamic Bluetooth File Sharing With Cellular Deviceschuah/rubinet/people/chuah/classes/eec173... · • Windows Script 5.6 • Devices – Sony Ericsson w600i Multimedia

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

Page 5: revision Dynamic Bluetooth File Sharing With Cellular Deviceschuah/rubinet/people/chuah/classes/eec173... · • Windows Script 5.6 • Devices – Sony Ericsson w600i Multimedia

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)

Page 6: revision Dynamic Bluetooth File Sharing With Cellular Deviceschuah/rubinet/people/chuah/classes/eec173... · • Windows Script 5.6 • Devices – Sony Ericsson w600i Multimedia

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• …

Page 7: revision Dynamic Bluetooth File Sharing With Cellular Deviceschuah/rubinet/people/chuah/classes/eec173... · • Windows Script 5.6 • Devices – Sony Ericsson w600i Multimedia

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

Page 8: revision Dynamic Bluetooth File Sharing With Cellular Deviceschuah/rubinet/people/chuah/classes/eec173... · • Windows Script 5.6 • Devices – Sony Ericsson w600i Multimedia

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.

Page 9: revision Dynamic Bluetooth File Sharing With Cellular Deviceschuah/rubinet/people/chuah/classes/eec173... · • Windows Script 5.6 • Devices – Sony Ericsson w600i Multimedia

9

Live Demo

• Demo

• About Emulators– Availability

– Issues

Program Hierarchy

Page 10: revision Dynamic Bluetooth File Sharing With Cellular Deviceschuah/rubinet/people/chuah/classes/eec173... · • Windows Script 5.6 • Devices – Sony Ericsson w600i Multimedia

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

Page 11: revision Dynamic Bluetooth File Sharing With Cellular Deviceschuah/rubinet/people/chuah/classes/eec173... · • Windows Script 5.6 • Devices – Sony Ericsson w600i Multimedia

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

Page 12: revision Dynamic Bluetooth File Sharing With Cellular Deviceschuah/rubinet/people/chuah/classes/eec173... · • Windows Script 5.6 • Devices – Sony Ericsson w600i Multimedia

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

Page 13: revision Dynamic Bluetooth File Sharing With Cellular Deviceschuah/rubinet/people/chuah/classes/eec173... · • Windows Script 5.6 • Devices – Sony Ericsson w600i Multimedia

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