Professional Documents
Culture Documents
: Protocol for Plug and Play in Bluetooth based Home Networks 457
Abstract — Home Networks, interlinking devices like in the market, Bluetooth is a suitable standard for Home
fridges, air conditioners, home theatres, security devices, Networks[3]. Hence our network is primarily based on the
lighting systems are about to realize the concept of a smart Bluetooth technology.
home. Among the competing technologies, Bluetooth, with its In this paper, we discuss the features of our network model,
low cost, low power consumption and its easily configurable the HomeBT protocol and the implementation of the
devices has emerged as one of the most suitable wireless appliances.
standard for Home Networks. In order to find a large market
for any automated home system, it must be user friendly, since II. NETWORK MODEL
most consumers are non-technical users. Hence, Plug and
Play is an important feature that must be incorporated into In a Bluetooth piconet, a collection of seven slave devices
any home network environment. In this paper we suggest a can operate together with one common Master. All devices on
method for data transfer, through the proposed HomeBT the piconet follow the frequency hopping scheme and timing
protocol. This protocol provides Plug and Play feature to of the master[1]. In our network model, shown in figure 1, the
appliances, in Home Networks using the Bluetooth Access Point (AP) acts as the master of its piconet. The
technology. Further, an Appliance_Changed_Status appliances or the attached devices (AD) connect to the home
Command and Status Change Event have been suggested as network through the AP. This architecture ensures scalability
additions in the Bluetooth HCI specifications1. of the system, as with addition of a new AP, seven more
Index Terms — Bluetooth, Home Networks, Home
devices can be added. The AP in turn, connects to the Host
Automation, Plug n Play. Control Device (HCD) through Ethernet (wired or wireless).
This HCD serves as a gateway for the home network. This
network model provides flexibility of building an entirely
I. INTRODUCTION wireless network by using 802.11 cards at the AP to connect to
Home environments require a cost-effective network, with
minimum network infrastructure involved in them. They
should be simple to use, easily configurable and easily
manageable even by a novice user, who doesn’t have much
knowledge of the system. The design considerations require
that the network architecture makes the system scalable, so
that new devices can easily be integrated into it. The overall
system should be fast enough to undertake the processes in real
time. At the same time, the system, with all these features,
should be cost effective in order to justify its application in
home automation.
Bluetooth technology, which was meant to provide a
replacement for cables, is optimized for limited wireless
network capability. It operates over a range of 100m/10m
(Class I/Class II), at 2.4 GHz frequency, providing data rate of
1 Mbps[1]. In comparison to 802.11, Bluetooth is preferred
where size, cost and mobility are more important than range
and throughput[2]. With single chip solutions being available
1
This work was supported in part by the Infoccom Development Authority,
Singapore.
Nadarajah Sriskanthan is an Associate Professor at the School of
Computer Engineering, Nanyang Technological University, Singapore
639811 (e-mail: esris@ntu.edu.sg). Fig. 1. Network Model of the Home Network. AD stands for Attached
Devashi Tandon was with the School of Computer Engineering, Nanyang Devices and refers to the controllable Appliances on the network.. AP
Technological University, Singapore 639811 for six months. He is now with stands for Access Point and provides interface between the Ethernet
Infosys Technologies, India. (e-mail: devashi@indiatimes.com). network and the Bluetooth (BT) connection. The Wireless Remote,
Keok Kee Lee is an Associate Professor at the School of Computer Internet, PC form the user-side devices which connect to the Host
Engineering, Nanyang Technological University, Singapore 639811 (e-mail: Controller (HCD).
ekklee@ntu.edu.sg).
Contributed Paper
Manuscript received January 23, 2004 0098 3063/04/$20.00 © 2004 IEEE
458 IEEE Transactions on Consumer Electronics, Vol. 50, No. 2, MAY 2004
Fig. 2. HomeBT Protocol. This Diagram illustrates the behaviour of the protocol. Then number in parentheses denotes the sequence of the packet. It
demonstrates the use of the descriptor tables and the operation of Plug and Play, using examples of some of the possible scenarios.
N. Sriskanthan et al.: Protocol for Plug and Play in Bluetooth based Home Networks 459
the user-device and establish a connection with the HCD. Once tests the driver communicated with its appliance (the robotic
it connects to the HCD, the HCD will generate an NDP vehicle), uninterrupted for 12 minutes 32 seconds before a
including information for all the requested devices. This will Bluetooth Hardware error occurred. On hardware error, the
inform the user about the device ID’s of the various appliances appliance was able to re-establish connection automatically
and the appliance names. The MAC address information is within 20 seconds and the communication resumed, before
kept within the internal network. Subsequently, a MDP will be being terminated by the user.
issued to the user, informing the user about the current status It must be noted that since the AP acts as master of its
of the appliances. piconet, the Bluetooth device on the appliance must support
The packet formats are represented in figure 4. The shaded master-slave switch[9], to be compatible with the system.
portion in the data packet is issued by the driver of the Also, when an appliance changes its status it must inform the
appliance (mentioned earlier) at the user side, and then Bluetooth through a Bluetooth command to generate a
transferred to the appliance. The AP sends this data to the Bluetooth event, which informs the AP of the status change.
relevant AD as a Bluetooth Data Packet which is then Only after this, the AP can generate a HomeBT Status Change
interpreted by the AD. When the communication is other way, Packet. This Bluetooth command Appliance_Changed_Status
this data is issued by the AD, and passed on to the AP as a and the Event Status Change can be defined in Bluetooth as
Bluetooth data packet, which then transfers it to the driver at mentioned in the next section.
the user side. The driver of the appliance at the user side then
interprets this data and takes necessary action. V. SUGGESTED ADDITIONS IN BLUETOOTH
The Appliance_Changed_Status command and the Status
IV. IMPLEMENTATION Change event explained in this section are suggested as
The stack implementations on the various devices are additions in the HCI specifications of Bluetooth. The number
illustrated in Figure 5. The network was tested by simulating in the parentheses denotes the section number they would
the various devices on a computer. For the Bluetooth possess, if included in the Bluetooth specification. Care has
implementations, the modules [5] were kept in presence of a been taken to define the commands in accordance with the
total of five neighbourhood Bluetooth devices2 to test the definition format used in the Bluetooth specifications. Hence,
behaviour of the network in presence of other devices. When in order to understand these packets, knowledge of the HCI
the mobile phone tried to connect to the Access Point, it was specifications of Bluetooth is required. These packets would
refused connection as it was not listed in the AP descriptor help the appliance in informing the user of a status change in
table. Two systems were used as appliances. One was an I2C the appliance, almost immediately after the status change
(Inter Integrated Circuit Communication) based system of occurs, thereby fully implementing Plug n Play.
circuits[6] connected to a 8051 microcontroller and a
A. (4.9.5) Appliance_Changed_Status Command
Bluetooth module. The other was a robotic vehicle with a
infra-red feedback. Both these devices were developed by This command falls in Status Parameters Group (of
different projects (appliance manufacturers). The robotic Bluetooth Commands). Hence the OGF (Op-Code Group
vehicle had its driver implemented in Java. This driver was Field) for this command will be 0x05.
made to communicate with the HCD through TCP/IP[7],[8]. TABLE II
The performance tests of the system showed that the HCD was COMMAND DEFINITION
able to generate the NDP and SCP packets as suggested in this Command OCF
Command Return
Parameters Parameters
paper. Also, the driver was able to communicate with the
HCI_Appliance_ 0x0006 New_State
robotic device appropriately. The driver instructed the robotic Changed_Status
vehicle on the basis of feedback received from it. In one of the
Fig. 5. Implementation Block Diagram. This Diagram illustrates the stack implementations on the various devices on the network.
N. Sriskanthan et al.: Protocol for Plug and Play in Bluetooth based Home Networks 461
1) Description: TABLE IV
The Appliance_Changed_Status command is used to inform EVENT DEFINITION
the remote devices connected to the local device about the Event Event Code Event Parameters
change in status of the appliance. The New_State command
parameter indicates the new status of the device. The remote Status Change Event 0x21 Status, Connection Handle,
New_State
Bluetooth device will receive the New_State command
parameter in the Status Change event. In Byte format an 2) Event Parameters:
example of the command packet would be 0x01, 0x06, 0x14,
TABLE V
0x01, 0x02 where 0x01 is the Packet Type Identifier for EVENT PARAMETERS
Command Packet, 0x1406 is the Op-Code Status: Size: 1 Byte
(OGF=0x05;OCF=0x06), 0x01 is the parameter total length
and 0x02 is the new status of the appliance. Value Parameter Description
2) Command Parameters 0x00 Status Change successfully completed
0x01-0xFF Status Change failed to complete. Error Code according
TABLE III to Table 6.1 in Bluetooth Specifications.
COMMAND PARAMETERS
New_State: Size: 1 Byte Connection Handle: Size: 2 Bytes (12 Bits Meaningful)
0x00 Disconnection. Since this gives same result as 0xXXXX Connection Handle for which Status has changed. Valid
Disconnection Command/Disconnection Complete Range (0x0000-0x0EFF)
event, the Disconnection command may be called
instead. New_State: Size: 1 Byte
0x01-0xFE New Status of the appliance. The codes are appliance
specific and will be interpreted by the appliance driver. Value Parameter Description
0xFF Connection. Since this gives same result as Connection
0x01-0xFE New Status of the appliance. The codes are appliance
Request Command/ Connection Complete Event,
specific and will be interpreted by the appliance driver.
Connection Request command may be called instead.
0x00, 0xFF These values represent Disconnection and Connection
3) Return Parameters respectively which will be handled by the
Disconnection Event and Connection Complete events
None. respectively. Hence they are redundant here.
4) Event(s) generated (unless masked away):
When the Host Controller receives the Appliance-
_Changed_Status command, it sends the Command Status VI. SECURITY
event to the Host. Subsequently, it will inform all the For any successful home system, security is an important
Bluetooth devices connected to the local device about the necessity. It can be said that our system relies on the security
Status Change. The Status Change event will occur at each features provided by Bluetooth. It has been assumed that two
Host (including the local host), on successful completion. This Bluetooth devices would always have an unique MAC address,
event will indicate (to the local host) that the command has assigned by the IEEE[10]. The descriptor tables defined on the
been completed successfully and hence no Command AP and the AD would ensure that connection is provided only to
Complete event will be sent by the Host Controller to the local the devices having one of the pre-listed MAC addresses.
host. Particularly, a secure method is necessary for the appliance(AD)
to connect to the Access Point (AP), since this is an automated
B. (5.2.33) Status Change event
process, undertaken without user intervention. The PIN Code
1) Description: method provided in Bluetooth would not be sufficient here, since
The Status Change Event occurs whenever the status of the the PIN code of an AD would have to be stored in an AP (or
appliance is modified. This event will be generated (at the vice versa) and hence can be retrieved by a third device.
Access Point) whenever the remote device (Appliance)
modifies its status. The remote device (Appliance) Bluetooth VII. SUMMARY
will inform the local device (Access Point) Bluetooth of the
new status, leading to the generation of this event. The The HomeBT Protocol proposed in this paper has been
Connection_Handle must be a Connection_Handle for an verified for it’s plug and play features. The implementation of
ACL Connection. In Byte format an example of the event the AD-side Bluetooth and the AP-side Bluetooth was done on
packet would be 0x04, 0x21, 0x04, 0x00, 0x01, 0x00, 0x02 a PC[11]. These programs can be loaded into micro-
where 0x04 is the Packet Type Identifier for Event Packet, controllers on the devices, and run from there itself.
0x21 is the Event Code, 0x04 is the parameter total length, Eventually, the HCD would be a stand-alone device. The user
0x00 is the status of the command, 0x0001 is the Connection would be communicating with the HCD through a separate
Handle and 0x02 is the new status of the appliance. device. This device will have the device drivers for all the
appliances loaded on it.
Contributed Paper
Manuscript received January 23, 2004 0098 3063/04/$20.00 © 2004 IEEE
462 IEEE Transactions on Consumer Electronics, Vol. 50, No. 2, MAY 2004
Although, in our implementation only one user was defined, Devashi Tandon (M’02) became a Member(M) of IEEE
since 2002. He completed his Bachelors in Technology
user profiles can be implemented to have multiple users and to
majoring in Electrical Engineering, from the Indian
distinguish different users. Their priorities can be set in order Institute of Technology, Roorkee (Former Univ. of
to identify which user has higher priority while trying to Roorkee) , India. He was awarded the Institute medal for
control an appliance. A default value of appliance settings can his undergraduate thesis on Robotics and Control. After
that he was attached with the School of Computer
be provided for each user in these user profiles, so that the Engineering, NTU, Singapore during the course of
network adapts to each user. which he worked on the Home Automation Project. Currently he is with
Infosys Technologies. His research interests include Home Networking,
Intelligent Control, Autonomous Systems and Robotics.
REFERENCES
[1] Bluetooth Committee “Specifications of the Bluetooth v1.1 System
(Core)” vol. 1, pp 41-42. Feb. 2001.
[2] Silicon Wave “White Paper: Bluetooth and 802.11 compared”. Nov. Lee Keo Kee (M’95) . This author became a Member
2001. (M) of IEEE in 1995. He is an associate professor in the
[3] http://www.thewirelessdirectory.com/BluetoothDevelopment, School of Computer Engineering, Nanyang
“Semiconductors-Single-Chip-Bluetooth.htm”. Oct. 2003 Technological University, Singapore. He obtained his
[4] James Kelsey, “Programming Plug and Play” , Sams Publication, 1995. B.Eng.(Elect.) from the National University of
[5] Bluetooth Committee “Profiles of the Bluetooth v1.0b System Singapore and M.E.E. from Rice University. His
(Profiles).” Dec. 1999 interests are in computer architecture, parallel I/O and
[6] N. Sriskanthan, F. Tan, A. Karande, “Bluetooth based Home scheduling, and electronics and digital systems.
Automation System”, Elsevier Microprocessors and Microsystems, pp.
281-283, May, 2002.
[7] http://java.sun.com/developer/onlineTraining/Programming/BasicJava2/
socket.html. Jan. 2004.
[8] http://java.sun.com/developer/onlineTraining/Programming/BasicJava2/
Code/SocketServer.java. Jan. 2004.
[9] Bluetooth Committee “Specifications of the Bluetooth v1.1 System
(Core)” vol. 1, pp 121-123. Feb. 2001.
[10] Bluetooth Committee, “Bluetooth Assigned Numbers v2.25”, Jan. 2003.
[11] Ericsson Mobile Communications AB, “User Manual (Bluetooth PC
Reference Stack)”, 2001.