230 likes | 493 Views
Controlling Devices using Bluetooth technology Adnan Ali. Problem Statement Currently, most access methods require physical contact to a device: swipe-card / push button /magnetic keys a short-range wireless technolgy can be used instead: Bluetooth access control from a distance
E N D
Controlling Devices using Bluetooth technology Adnan Ali HELSINKI UNIVERSITY OF TECHNOLOGY
Problem Statement • Currently, most access methods require physical contact to a device: swipe-card / push button /magnetic keys • a short-range wireless technolgy can be used instead: Bluetooth • access control from a distance • less to carry, same device used for voice communication: mobile HELSINKI UNIVERSITY OF TECHNOLOGY
why Bluetooth for implementation??? low cost non-LOS nature easily programmable unlicensed frequency band IrDA vs Bluetooth: 0-1m vs 10-100 m ZigBee vs Bluetooth:TTGB 3.1 day vs 2.2 hrs soon Bluetooth will be embedded into almost every device HELSINKI UNIVERSITY OF TECHNOLOGY
Bluetooth Overview Frequency Band Range: 2.400 - 2.4835 GHz Lower Guard Band: 2 MHz Upper Guard Band: 3.5 MHz Power Classes: A, B, and C How to determine power class ??? A protocol similar to HTTP, FTP ??? Most popular among the short-range wireless technologies HELSINKI UNIVERSITY OF TECHNOLOGY
Bluetooth Protocol Stack •Physical Layer (PHY) • Medium Access Control (MAC) • Host Controller Interface (HCI) • Logical Link Control and Adaptation Protocol (L2CAP) • Service Discovery Protocol (SDP) • RFCOMM • Telephony Control Protocol Specification (TCS-BIN) • Wireless Access Protocol (WAP) • Object Exchange (OBEX) • Bluetooth Network Encapsulation Protocol (BNEP) • Human Interface Device Protocol (HID) HELSINKI UNIVERSITY OF TECHNOLOGY
Generic Access Service Discovery Application Profile Cordless Phone Profile PAN Profile Hard Copy Cable Replacement Profile Intercom Profile HID Profile Serial Port Generic Object Exchange Dial-Up Networking Profile File Transfer Profile FAX Profile Object Push Profile Headset Profile Synchronization Profile LAN Access Profile Basic Imaging Profile Hands Free Profile Basic Printing Profile Bluetooth Profiles and their interdependencies HELSINKI UNIVERSITY OF TECHNOLOGY
Advantages and Disadvantages of Bluetooth Advantages Disadvantages wireless low data rate simple connectivity security low cost low interface low energy consumption voice & data both Bluetooth Low Energy*** HELSINKI UNIVERSITY OF TECHNOLOGY
System Components • Bluetooth Node • Serial Board • Serial programmable chip/card • Bluetooth Intelligent Serial Module (BISM-II) • Mobile Phone • JSR-82 compatible (JAVA Specification Requests) HELSINKI UNIVERSITY OF TECHNOLOGY
Requirements for communication (I) Bluetooth Node: • should be in running state powered by 12V DC • installed on a place easily accessible by user (max distance of 10 meters) and • BTNode application for communication HELSINKI UNIVERSITY OF TECHNOLOGY
Requirements for communication (II) Mobile Phone: • compatibility with JAVA Bluetooth (JSR-82) • Embedded Bluetoothstatus ON/OFF • distance from Node (max 10 meters) and • MIDP application for communication HELSINKI UNIVERSITY OF TECHNOLOGY
Communication Procedure (I) • turn the Bluetooth of the mobile phone ON • run the MIDP application • when prompt for, allow the MIDP application to read and write user data • select the BISM-II (mounted on BT Node) module with its given friendly nameand send a connection command via phone just by selecting the “connect” option • after a successful connection, an action command option is received, “unlock the door”, select it to close the relay of BT Node. HELSINKI UNIVERSITY OF TECHNOLOGY
Communication Procedure (II) HELSINKI UNIVERSITY OF TECHNOLOGY
Implementation (I) • Programming the Serial Card • C language • AT Commands interface (AT commands set in pdf) • Programming the Mobile Phone • JAVA 2 Micro Edition, MIDP 2.0 HELSINKI UNIVERSITY OF TECHNOLOGY
app • (files responsible for initiating the application) bt (files responsible for configurations of BISM-II) • core • (files having core functions, e.g reading port data) target (files configuring port type, baudrate, data rate, data bits,etc) protocol (files making BISM-II communicate with serial board) Implementation (II) HELSINKI UNIVERSITY OF TECHNOLOGY
Implementation (III) MIDP Application • Device discovery • cert send • service discovery protocol implemented HELSINKI UNIVERSITY OF TECHNOLOGY
Implementation (IV) source code snippets C file(s) HELSINKI UNIVERSITY OF TECHNOLOGY
Software Testing (I) 3 types of SW testing performed during implementation • unit testing (automated) • integration testing (automated) • system testing (automated + manual) • regression testing: not needed HELSINKI UNIVERSITY OF TECHNOLOGY
Identify test conditions (determine ’what’ can be tested) and prioritize Identify Design test cases (determine ‘how’ the ’what’ is to be tested) Design Build test cases (implement scripts, data, etc.) Build Execute test cases Execute Compare test case outcomes to expected outcomes Compare Software Testing (II) HELSINKI UNIVERSITY OF TECHNOLOGY
Tools used for SW design and development • Eclipse • Microchip MPLAB ICD 2 • Sun Wireless Toolkit HELSINKI UNIVERSITY OF TECHNOLOGY
System’s Areas of Use • wherever relays are used • lights control via Bluetooth • door opening closing via Bluetooth • car’s lock • morning coffee maker • etc. HELSINKI UNIVERSITY OF TECHNOLOGY
Future Work • LAN interface to control over internet (might be useful if a capable MIDP device is stolen) • more than one devices controlled by a single MIDP application simultaneously HELSINKI UNIVERSITY OF TECHNOLOGY