Slide 1 - Noppa - Etusivu
Document Sample


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
Bluetooth Profiles and their interdependencies
Generic Access
Service Discovery Cordless Phone
Application Profile PAN Profile Profile
Hard Copy Cable Intercom Profile
HID Profile
Replacement 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
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
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 Bluetooth status ON/OFF
distance from Node (max 10 meters)
and
MIDP application for communication
HELSINKI UNIVERSITY OF
TECHNOLOGY
Communication Procedure (I)
1. turn the Bluetooth of the mobile phone ON
2. run the MIDP application
3. when prompt for, allow the MIDP application to read and
write user data
4. select the BISM-II (mounted on BT Node) module with its
given friendly name and send a connection command via
phone just by selecting the “connect” option
5. 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
Implementation (II)
app
(files responsible for initiating the
application)
bt core
(files responsible for (files having core functions,
configurations of BISM-II) e.g reading port data)
target protocol
(files configuring port type, (files making BISM-II
baudrate, data rate, data bits,etc) communicate with serial board)
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
Software Testing (II)
Identify test conditions (determine
Identify ’what’ can be tested) and prioritize
Design test cases (determine ‘how’ the
Design ’what’ is to be tested)
Build test cases (implement
Build scripts, data, etc.)
Execute test cases
Execute
Compare test case
outcomes to expected
Compare outcomes
HELSINKI UNIVERSITY OF
TECHNOLOGY
Test case Description input Expected result
outcome
tests the condition data Error passed
Test CR/LF
when CR and/or without
CR and/or
LF is not received
LF at the
end
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
Other docs by niusheng11
Get documents about "