You are on page 1of 7

Internet hom control

system usin luetooth

by K. K. Tan and C.Y Soh


This paper presents the development of a systemfor controlling lionze electrical appliances over the Internet.
The needjw a physical conriection to the Internet is removed by usirig Bluetooth wireless technology to
provide a linkfrom the appliance to the Irrternet and the Wireless Application Protocol (WAF') to provide
a data link between the Internet and a mobile phone. The paper describes the hardware and software design
considerations offlie system and discusses possiblefntnre developments exploiting thelini and third
generation wireless techriologies.

0
ne of mankind's greatest dreanls has always intercom~nutucation between devices throughout an
been to have an intelligent home, such as entire house. The oldest standard is X102.The SMART
those depicted in the Hollywood movies HOUSE' standard has been utihsed for years, hut in a
Jctsons and Bark E The Future 11. The limited fashion because of the proprietary nature of the
obvious benefits of convenience and conlfort brought technology. Other, more open protocols under
by home automation, as well as the possibilities for discussion include the Consumer Electronics Bus
remote operation ofday-to-day home processes such as (CEBus') and the LonWorks systemspan open,
gardening and pet feeding, have fuelled the networked automation and control solution for the
development of such system over the past decade. building, industrial equipment, transportation, and
Home automation' involves the use of nucro- home markets. Based on physical transceivers and
processor-based intehgence to integrate or control application layer software, LonWorks nodes can he
electronic products and systems in the home. These connected to multiple types ofniedia; twisted-wire pair
products and systems include ' floodlight?, coffee and power lines are among the niost conmion.
makers,' computers, security systems, heating and Although there are many home networks already in
cooling system, lighting control system?, and existence, and new protocols for wired networks such as
audiohide0 (home theatre) systems. Siinple Conml Protocol (SCP) and the HomePlug
The home automation conmiunity is striving to I'owerline technologes arc emerging,to-date no industry
develop a technical standard-in the form ofa chip that standard ha? prevailed. T h s h z probably acted as a major
can he built into home elecmnics-that d facilitate disiiicentive to home ownen to h e s t in inihrmctu~.

thermostat

television

dimmer SwnCh

ceiling light

Wll&SS
network

Fig. 1 Hardware interaction

ENGINEERING SCIENCE AND EIXJCATION JOUKNAL AUGUST 2002

126
0 ' 0 0

Fig. 2 Hardware
connectivity within the
' Bluetooth network

-- ---
- - embedded

I SlgnalS to
I Switch appliance
I on or on

Wiring up an entire house (whether new or old) with Bluetooth into most of the products they manufacture,
twisted-wire pain involves making a big decision. A includng consumer electrical home appliances, for
wireless (infra-red or radio fiequency) solution is example toasters, video recorders and nucmwave ovens.
pmbably more easiiy adoptable. Much of the effotr expended around the Bluetooth
This paper addresses the control of a home network technology is aimed at promoting interoperability To
through a wireles medium by exploiting the emerging this end the Bluetooth Special Interest Group (SIG) has
wireless technologies of Bluetooth and Wirelrss produced over 400 pages ofproues (publishedas volume
Application Protocol (WAP). There are reasom for 2 of the version 1.1 specification)'. Cross-platform,
adoptinga wireless approach apart From ensuring that the cross-vendor interoperability is a goal shared by many
system will he able to work in most existing homes with vendors and is a fuudamental objective ofthe technology
nunimum modifications and these will be elaborated as it will allow future home appliances manufactured by
in the following sections. An overview of other different vendors to talk to each other, thus making the
WAl-over-Bluetooth applications can be found in integration of the appliances into a home automation
Reference 6. system @oweredby Bluetooth) a seamless process.
Bluetooth is a sinipler technoloby than any of the
Bluetooth and WAP variants ofthr popular IEEE 802.1 1 standard for wireless
local-area networks. By 'simpler' is nieant here fewer
Bluetooth*' refers to a new ndio technology, expected and/or less-demanding RF semiconductor chips, fewer
to be delivered commercially in hulk h m 2002, which passive coniponents arid less complex dgital baseband
promises to change sigdcandy the way machines are chips. Over the next few years it looks 3s if the bdl of
used. It is a small-forn-factor, low~-costtechnology that materials (UOM)for a Uluetooth system will be halfthat
provides low-power, short-range (up to 1Oni) links of an equivalent IEEE 802.11 system. As more
between mobile PCs, cell phones, printers or other companies adopt Bluetooth in their product5, the price
devices arranged in ad hoc 'piconetq' of up to eight of Bluetooth chips is e*pected to drop further.
devices. It operates in the 2.4GHz band and uses a In view of its cost advantage and greater popularity
frequency hopping (FH) scheme. amongst home appliance manufactures, Bluetooth was
Conceived initially by Ericsson, the Bluetooth the candidate identified for the wireless control network
standard has been adopted by many conipanies world- used in the work described in this paper.
wide. A Bluetooth clup is designed to replace cables by The Wireless Application Protocol (WAP) is an open,
talang the information normdly carried by the cable and global spechcation that enables users easily and
trammining it at a special frrquency to a receiver instantaneously to access and interact with information
Bluetooth chip, which will then give the information and services through mobile wireless devices. In the
received to the computer, phone, etc. work described in this article we have used it for long-
Interest in Bluetooth has been increasingover last few m g e conlmunication between a user at a remote
years and consumers may expect to encounter an location and a Bluetooth network in the user's home by
abundance of Bluetooth-enabled products as many leveraging on the Internet revolution.
companies have invested in this technolog. Companies
such a Toshiba and Sony are planning to build System architecture

*'Bluetooth' 15 rhc Englirh name for thc Danish Viking King The hardware needed for our home control systern is
Hanld Blbrand, who lived in rhc latier part of the 10th century shown in Fig. 1. A Pentium 111 450MHz personal
Harald Ullrarid unircd and cunrrollrd Ilcnmark 2nd Noway
Similarly die Biuctooth radio technology i s intended to unite computer with 192 Mbytes ofmemory is linked to the
devices. Internet by a broadband connection or a modeni. The

ENGINEEKING SCIENCE AND EDUCATION JOURNAL AUGUST 2002

127
Fig. 3 Switching circuit
for controlling AC power

triac
switch
MOC3010
220 V AC

host computer operates on a RedHat 6.2 platform with


an upgraded version 2.4.2 kernel.
The hardware connectivity within the back-end
Bluetooth network, or piconet, is shown in Fig. 2.
Other hardware consideration3
Preferably the home automation system should be
backwards compatible with existing home appliances
that are not Bluetooth enabled. To achieve this, an
external Bluetooth-enabled device has to be wired to
the conventional home appliance in order to integrate
it into the system.
As a pilot system, a simple Bluetooth-enabled
switching device has been constructed to facilirate the
switching on and off of conventional appliances.
Fig. 3 shows the circuit of this device (Fig. 4), which
may be controlled by a PC or via an embedded
Bluetooth-enabled system. A 5 V signal at the input of
Fig. 4 The switching device the MOC3010 optoisolator d turn on the triac,
hence switching on the appliance; a ground signal will
switch off the appliance.
The power to a home appliance can be controlled by
plugging its power leads into the socket of the device,
as shown in Fig. 5. Thus existing appliances as well as
future Bluetooth-enabled apphcances can be part ofthe
home automation network.

Software implementation details

The software architecture is shown in Fig. 6. It is


essentially made up of two subsystem-the hnt-end
graphical user interface (CUI) on the niobile phone and
the back-end Bluetooth powered automation system-
which interact with each other through WN.

Front-end CUI

The hnt-end graphical user interface is implemented


Fig. 5 An electric kettle being controlled by the switching
device using Wireless Markup Language (WML), a markup

ENGINEERING SCIENCE AND EDUCATION JOURNAL AUGUST 2002

128
Fig. 6 Interaction of the subsystem software

language based on XML (Extensible Markup devices and acts as the bridge for conmiunication
Language)'. The official WML specification is devel- between the individual Bluetooth devices.
oped and maintained by the WAP Forum, an industry- In addition, the host computer also rum a Web service
wide consortium founded by Nokia, Phone.com, provided by Apache 1.3.12 that coma with the RedHat
Motorola, and Ericsson. This specification defines the 6.2 distribution. The Web service facilitates Web access,
syntax, variables, and elements used in a valid WML connecting the WAE' phone user from a remote location
file. A valid WML document must correspond to the to the Bluetooth network back at home.
specification or it cannot be processed. Slave device system: The slave device in our work is the
The user interface allows user input h m the phone switching device shown in Figs. 4 and 5. The system
keypads using input fielh and presents data in the form controls the switching circuit, and hence the electrical
of static text, tables, hyperlinks and monochrome appliance, by providing a 0 or 5 V signal according to
images. Fig. 7 shows the user interface on a WAP phone. commands h m the users.

Back-end sysfem

In a typical Bluetooth network, or piconet, R F


connections are established between a master device,
which controls the network, and up to a maximum of
seven active slave devices, which communicate with
the master when permitted. Slave devices do not
communicate with one another directly.
Master device system: The master device in our piconet
is the personal computer that functions as a server and
w h c h has a Bluetooth module wired to it via a serial
cable. It pmvides critical information related to SeNiCeS
that are active, on the Bluetooth devices. Essentially, it i
handles all connections b m the client Bluetooth Fig. 7 The GUI displayed on a Siemens WAP phone

ENGINEERING SCIENCE AND EDUCATION JOUKNAL AUGUST 2002

129
support and the attributes of these services.
Service search: Upon obtaining the Bluetooth address
of the master devicr in its vicinity the client device
searches the service discovery server ofthe master to get
information about the services offered. Important
information presented to the client includes not only
the services offerrd but also the way that the client must
establish a connection. In our work, a connection will
be made by an emulated serial link.
Eniulated serial comertion: Armed with the necessary
information, the client attempts to access the server,
which it does by senmng a connection request to
establish a connection. The connection is established
upon acknowledgment from the server.
Point-to-point protocol: Next, the Point-to-Point
Protocol (PPP) is activated by the application program
to facilitate the use of TCP/IP (Transmission Control
Protocol/lnternet Protocol) components. The server,
in this application, assumes the IP address of
Fig. 8 Screenshot of an authenticationprocess on a WAP 192.168.65.1, which resides in the band of class C
phone
private IP addresses"'. The IP address of the client is
Operational principles assigned by the server. The application, running on
TCP/IP and on the corresponding sewer node, can
Back-end connections now be started and used.
The Bluetooth application that we have developed Application Layer: Next, the application on the client
resides on top of the host stack and uses the protocol connects to the server on TCP/IP and initialises a
components malang up the stack to establish service database with information on the service
connections between the master and slave devices. provided by the device and the commands it accepts.
The application program communicates with the For the switching device in our work, the conunands
stack using function calls and the stack communicates 'switch:l', 'switch:2' and 'switch:3' will switch on,
with the former using event triggers. In establishing the switch off and display the power status of the electrical
connection, the program perform the steps outlined appliance, respectively
below:
Inquiry: After initialising all the necessary components Security
in the stack, the client Bluetooth device begins a 'device O n the client side, a user begins a session with the
discovery' (or inquiry). When it conies to within home automation system by logging into the system
amund lOnr of thc master device it determines the (Fig. 8).
addresses of other Bluetooth devices in its vicinity as Since the Internet is a public network, security
well as their capability using the class of device (COD) measures have to be used to protect the back-end home
information. The client device does h s by repetitively automation system from unauthorised access. It would
transmittingINQUIRY packets. Other devices wishing be catastrophic if an unauthorised user could access the
to reveal their presence within a 10m service area system illegally and do things like opening the door of
respond with messages containing their unique address, the house.
as well as illformation indcating the seMces they The WAP specifications do not include a basic

A
authenucallon

Fig. 9 The authentication process

ENGINEERING SCIENCE AND EDUCATIONJOURNAL AUGUST mnz

130
authentication scheme like that of HTTI? As a result,
security in the system is provided by verifying
information about the users and their passwords stored
in a Microsoft Access database on the host computer
through ODBC (Open Database Connectivity), see
Fig. 9. I
CCI program
CGI (Common Gateway Interface) is used to run
an application on the host coniputer and to form
connections to the Bluetooth devices. For our control
application we have written the CGI program in the
PEKL language. Having S U C C C S S ~ ~ Ilogged
~~Y on to the
system, the CGI program telnets* to the application
program server. A command is issued to the server,
requesting it to search for all Bluetooth devices that
are connected to the system. The names ofthe devices
together with the services they provide are fed back
to the client WAP browser (see Fig. 10). When a
device to he connected to is selected, a menu of the Fig. 10 Screenshot of a WAP interface showing the
devices connected
functions that can be executed on that device is
displayed on the graphical user interface, as shown in
Fig. 11.
Besides acting as a bridge between the WAP phone
user and the back-end Bluetooth devices, the CGI
program also has a certain amount of built-in
intelligence. Upon receiving data fiom a Bluetooth
device, the CGI program WIU parse the data and
recognise any commands embedded in it. The
commands are converted into hyperlinks for
presentation to the user. This enables the user to
control the device without actually keying in
conmunds. Instead, a click on the hyperlink enables
thr user to switch the electrical appliance on or off.

On-demand WAP service


A dial-in server is a host cquipped with a modem and
phone line that allows clients to call in and connect to
it. There are several reasons 3 person nught want to do
this, e.g. to use the resources on the did-in server, or,
if the dial-in server is on a network, to use the dial-in
server to access the network. Fig. 11 Screenshot of functions supported by the
We wanted our home automation system to be switching device
avallablr to a wide nnge of users and not just to a small
group of usen having broadband access in their homes. Evaluationof the system
Hence, the host computer was configured as a dial-in
server, as in Reference 11. A GSM (Global System for WAP emulators that model mobile phones such as the
Mobile connnunicationr) modem is connected to the Siemens SL45, No!& 6210, Nokia 7110, Motorola
host on conmunications port 2, through which it Talkahout T2288 and Ericsson R380 have been used
receives data calls 6-om mobile phones and establishes a to test the system, which can be accessed and controlled
PPP connection with them. using all these WAF’ simulators. In addition, a Web-
The last component needed to allow a WAP phone based WAP simulator from a US-based web site has
user to access the system via dial-up is the WAP been included in the test so as to evaluate the system3
’gateway’ or server. Gateways are pruxies that do response outside Singapore.
compression before serving them to a hand-held A system based on the Internet can exploit its ever-
device. Depending on the vmdor, gateways can have a changing technologies but at the same time is
variety of enhancements beyond this basic subject to its linutations. Internet delay caused by
functionality The trend is for WAP server products to unpredictable network traffic is the number one
additionally offer scripting and Java servlet support. problem facing Internet applications. The local WAP
‘Tclnet is a tcrmiod emulation pmgiam for TCP/II’ networks. simulators responded alniost instantaneously whereas

ENGINEERING SCIENCE AND EDUCATIONJOURNAL AtiGUST 2002

131
their Web-based counterpart was a few seconds slower; This should provide a more sophisticated and diverse
nonetheless, the delay was still acceptable. range of services than ever before offered. For
In adhtion to meeting or exceeding the capabilities example a mobile phone could be used 3s if it were a
ofconventional home automation system running over camera, video camera, computer, stereo and radio all
wires, the system presented here is fully wireles. Home rolled into one. Fbch media information wdl be at
appliances can easily be integrated into the system 3s our fingertips whenever it is needed as long as we are
there is no need for any retrofitting of the house. within range of a wireless network.
Thc wider bandwidth provided by the 3G network
Future trends will allow large amounts of information to be
transmitted across the wireless Internet at a faster
The work reported in this paper represents a small but speed. This will makes wireless Internet a very
significant step in the evolution of Internet-based favourable medium for control in many areas in the
home automation systems. Although our pilot system future. For instance, live video images of the home
merely switches electrical appliances on or off, it could be streamed over the network onto the mobile
could be extended to control the speed of a fan, to phone. This would allow users to monitor what was
control remotely a video recorder or to perform many happening at home and take the concept of the
other functions by Bluetooth-enabling existing home Internet-based smart home to a new level of
appliances as was done with the switching device sophistication.
described in this paper. This will involve more work
and it may be necessary to use analogue signals. Conclusion
However, increasing adoption of the Bluetooth
standard among home appliance manufacturers in the This paper has presented the development of a Web-
near hture will reduce the amount of work needed based home automation system that provides simple
to provide control of appliances in the home network on-off control and monitoring from a remote
and interoperability will be guaranteed by the location using a WAP phone. The pilot set-up could
Bluetooth standard. All that will be requircd will be a be extended to many other ways of controlling home
host computer that issues commands specified in its appliances. The connection of appliances to the
profile to control the Bluetooth-enabled devices. Internet opens the door to many creative ways of
enhancing the quality of our lives through convenient
Jini and flexible control and co-ordination of these
Being a connectivity tool, Bluetooth technology appliances. We anticipate that our system will be able
can provide the physical medium for other emerging to work in conjunction with other existing
technologies that will enhance the service of home technologies in the near future.
automation systems. One such technology is Sun
Microsystem's Jini technologyI2. The Jini system is a References
network-centric technology that assumes and
1 See l , t t p : / / w w w a l b a n y n r t / ~ ~ E ~ ~ ~ l / a(Audio
vc/ Vidco
requires that the communication between a client and
Connection Web site)
the services used by that client is accomplished 2 'What is XlO!'. See h t r p : / / s m a r t h o m r . c o * ~ / ~ h ~ " ~ l O . h ~
through a Java interface. Therefore when a device is 3 See http://www.smart-hourecom/ (Smart House Inc.)
needed, it is plugged into the network and Jini 4 See http://wwwcebus.org/ (CEBur Industry Council Inc.)
downloads the information needed to connect it. As 5 See http://wwwechelon.corn/ (Echelon Corp.)
6 HARTWIG, S., RAUTENBERC, T., SIMMER, M.,
a result, a device A can communicate with a device B TEMOVIC, D., and VAN BEBBER, A,: 'WAP over
that it has never before encountered without a human Bluctooth technology and applications'. Proc. ICCE Int.
having to install the required drivers for B. This non- Conf on Consumer Electronics, Lor Angrlrr, CA, USA,
protocol based methodology is a new approach in 19th-2lrtJune 2001, pp.12-13 (IEEE, 2001)
distributed computing. 7 See http://~.bluetooth.com (the official Bluetooth
Web rite)
One day all of our digital devices will be able to 8 'Bluetooth specification'. See hrtp://~.bluetaoth.com/
communicate easily with one another. For example, a dev/rpecificarions.ap (Huetooth SIG)
kidge in the home network will automatically 9 'Extensible Markup Language'. See http://\nuww3.arg/
synchronisewith the host computer. Should there be a XML/
shortage of certain groceries, the fridge will alert the 10 'RFC1918. See ftp://ftp.iri.edu/in.notes/*cl918.~t
11 GENTRY, JOSH: 'Lmux di&n S C W ~ T setup guide'. See
host computer, which will link this information to a http://~.swcp.com/-jgenny/pers.html
grocery distributor via the Internet. The union of 12 lini technology'. Sec http://\n\?YJini.org/
Bluetooth andJini promises to enable all this and more. 13 'Third generation mobile telephony'. See http://
\\Ruwerics~ron.com/technoloW/3G.rhnlll
3G networks
QIEE: 2002
The wireless world is undergoing another
revolution with the imuunent introduction of 3rd The authors are with the Dcpartnient of Electrical and
generation (3G) wireless technology" based on Computer Engineering, National Univrrriry of Singpopore,
wideband code division multiple access (W-CDMA). 4 Engineering Drive 3, Singpore 117576.

ENGINEERING SCIENCE A N D EDUCATIONJOURNAL AUGUST 2002

132

You might also like