Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống
1
/ 13 trang
THÔNG TIN TÀI LIỆU
Thông tin cơ bản
Định dạng
Số trang
13
Dung lượng
488,64 KB
Nội dung
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 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 Bluetooth Protocol Stack Bluetooth Discovery • Device needs to device discovery and service discovery • Device discovery: methods • Inquiry: • startInquiry() • retrieveDevices() • cancelInquiry() • Callbacks: • devicesDiscovered() • inquiryCompleted() 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 Bluetooth Discovery RFCOMM vs. OBEX • RFCOMM • Better choice when you want to send/receive stream data • OBEX • Allows one to send not only data, but also send context or metadata about the payload. • Our project deals with sharing music files, so we chose OBEX! (that’s the red pill in case you didn’t know) 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 … 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 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. Live Demo • Demo • About Emulators – Availability – Issues Program Hierarchy 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 10 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 11 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 12 Our Pitfalls • OBEX vs. RFComm Software Limitations • Data Connectivity Compatibility to upload files to cellular devices • SDK/Project compilation • Carrier protected access to the MIDlet network 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 13 [...]...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... 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 11 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 . 1 Dynamic Bluetooth File Sharing With Cellular Devices Steve Brar George Chen Michael Hair Jon Wagoner Project Goals • Establishing a Bluetooth connection • Download application. Ericsson w600i Overview • Bluetooth Protocol Stack • Mobile Device Information Profile (MIDP) • Program Hierarchy •Live Demo • Final Thoughts 3 Bluetooth Protocol Stack Bluetooth Discovery • Device. retrieveDevices() • cancelInquiry() • Callbacks: • devicesDiscovered() • inquiryCompleted() 4 Bluetooth Discovery Bluetooth Discovery • Service Discovery: Methods • Inquiry: • selectServices() == searchServices() •