Beruflich Dokumente
Kultur Dokumente
Abstract - Measurement and control information should be devices, collect information , and schedule all the home
transmitted in time between devices in Bluetooth Home Control devices in case of emergency . At the same time, EBHS
Network (BHCN) to provide a safe and efficient environment. A provide a connection device for internal network and external
scheme for improving real-time performance of BHCN is network , so remote user can login the EBHS to control and
discussed in this paper. Taking JlC/OS-II which is a real-time OS monitor the devices .
as platform, Embedded B1uetooth Home Server (EBHS) is
constructed as the core of BHCN to realize centralized control of
home devices. By selecting reasonable development protocol
layer and establishing Home Information Storage Structure
(HISS) in EBHS, the time of transmitting information and
connecting device is reduced effectively. According to the
0 :1! Air 'onditiore' I
demand of BHCN, we put forward an improved Bluetooth G :II Ri, e ,o oker I
polling algorithm. The weight of every node is decided by its
polling success rate (PSR) and vacancy rate (VR), and is used to
determine the polling sequence. The simulations show that the
o :II Lighting 'o ntrol I
improvement can effectively reduce the average delay of
transporting data packet and increase the polling success rate.
~~ DerectingTask =:=>~
[3]. While the data is out of security range, the detecting task
Adopting HCI protocol to exchange information can
will communicate with security control task through mailbox.
reduce the data redundancy caused by complex protocol, and
2) Security Control Task: When security control task
reduce the slot time spent by transmitting control commands
receives a message sent by detecting task from mailbox , the
and improve communications quality. In BHCN, the
security control task will schedule all of the home devices and
transmission data is almost control commands and parameter
alarm immediately.
information with short length. Synthesizing hardware
3) Local Control Task: Control the home devices except
conditions , we use RS232 HCI protocol.
sensors through EBHS or human-machine interaction device.
4) Remote Control Task: Log on the EBHS and control C. Constructing Device HISS
the home devices except sensors through Internet remotely. In theory, the time of completing a successful process of
From Fig. 2, we see that these four tasks all need access inquiring and connecting is shown in TABLE II.
the database to modify or read the information of BHCN, From TABLE II, we can see that the inquiring time that is
which will cause conflict. Semaphore which can limit much longer than connecting time, so reducing the inquiring
accessing is set to solve the mutual exclusion problem . time can quickly establish connection . The effective method is
The task priority is assigned based on real-time of each to register home device information in EBHS, thereby the
task. The priority of a task must be a number, and the priority EBHS need not inquire the device. EBHS connects the home
becomes higher as the number becomes smaller. The priorities TABLE II
of every task are shown in TABLE 1. TIM E OF COMPLETI NG A S UCCESSFUL PRO CESS OF INQUIRING AN D
CONNECTING
B. Selection ofDevelopment Protocol Layer Minimum Average Maximum
Operation
The specification of Bluetooth system contains Core timc(s) time (s) timc(s)
specification and Profile specification. The Core specification Inquire 0.00125 3-5 10.24-30.72
defines protocol of every layer, and its model is shown in Fig.
Connect 0.0025 1.28 2.56
TABLE I
PR IORITY OF EA CH T AS K
Total 0.00375 4.28-6.28 12.8-3 3.28
Task Name Priority
Security Control Task 2
device using the registered information , so this method can
Local Control Task 4
avoid delay caused by inquiring frequently. We define a
Local Control Task 6 structure called by DeviceInfo to store device information :
Detecting Task 10 struct DeviceInfo
{
unsigned char DeviceID[1 0];
3. The Profile specification defines a mechanism that runs /*Device ID*/
coordinately among the layers to actualize a specific unsigned char DeviceName[30];
application model. /*Device name */
Host Controller Interface (HC!) is an interface for the
unsigned char DeviceManufactureID[16] ;
higher layers in the protocol stack accessing to lower layer
/*Manufacturer*/
transmission proto col. All commands of Bluetooth controller
unsigned char DeviceType;
must be interpreted by HCI, and then they can be executed .
/*Device type */
1753
unsigned char DeviceFunction[ 16]; devices use active mode, and have a little amount of
/*Device function */ information and short transmission delay.
unsigned char DeviceVersionNum[8]; Normal devices include the devices low transmission rate,
/*Device version */ such as television, air conditioner and rice cooker. These
unsigned char DeviceAddress[6]; devices belong to controlled devices and adopt uplink and
/*Bluetooth Address */ downlink transmission mode. We don't need to monitor status
unsigned int DevicePriority; of these devices.
/* Device priority */ The priorities are set according to real-time and security
/* */ requirement, and stored into variable DevicePriority of HISS.
The priorities of normal devices are lower than that of key
};
devices. The order of polling devices is strictly in accordance
D. Polling Scheme with device priority. We use improved algorithm to poll
The traditional polling scheme of Bluetooth is Round devices with the same priorities.
Robin (RR). The master polls the slaves according to a fixed For devices the same priorities, the weight of every device
cyclic order, so this scheme is apt to cause large resource waste is decided by its polling success rate (PSR) and vacancy rate
and low efficiency. There are many related polling schemes for (VR), and is used to determine the polling sequence. PSR is
Bluetooth. Some of these schemes are complex to be defined as follows.
implemented, and excessively demand fairness and efficiency, P .
d
. =~
fD
which leads to increase cost. PS1\. (i=0,1, ... ,N-1) (1)
1) Related Research
1 P
1
1754
device i without data packets over a successive time and The average delay of data packet is shown in Fig. 4.
average PSR of device i. The condition of status exchanging In Fig. 4, the average delay of data packet in improve
is defined as follows. algorithm is less than that in other two algorithms, and delay
NDj ~ND in RR is the highest. The more devices in BHCN, the higher
delay we get.
PSR j ~NDR (i =O,I, ... ,N-I) (5)
Fig. 5 shows the correlation curve ofPSR.
{
NS =0j
the same as that in improved algorithm. The parameters of Fig.5 correlation curve of PSR
improved algorithm are shown in TABLE IV.
900 ,---------.----,--------.----,-----~
TAB L E IV
P ARAMETER OF IMPROVED A LGOR ITHM IN THIS SIM ULATION ~J
Value in this 800
Parameter Range
iI
simul ation
N N~2 2-7 700
a 0.5-1.0 0.5 m
;;
~ 600
TG 0-1.0 0.5 ~
m
h 0-1.0 0.002 ~
~ 500
ND any integer 5 ~
~
Polling delay any integer ND - t - - RR
----e- FEP
-r-e-r- Jmproved Algorithm
1755
N
REFERENCES
[1] Lanying Li and Chen Yang, "Design and Implementation of Smart
Home's Terminal Control System Based on S3C44BOX," JOURNAL
HARBIN UNIV SCI. &TECH, vol. 12, no. 3, pp. 84-86,2007.
[2] Zhenchun Wei, Jianghong Han and Jianjun Zhang, "Design of the
Remote Control System in Smart Home," Journal of Hefei University of
Technology (Natural Science), vol. 28, no. 7, pp. 751-754,2005.
[3] Yu Zhou and Bo Jing, "Research and implementation on IlC/OS-II
operating system into wireless networked sensors," in Proc.8th Int. Conf
Electronic Measurement and Instruments, Xi 'an, China, 2007, pp. 4-199 -
4-204.
[4] Fan Yang, Ke Wang and Zhihong Qian, "Polling-on-Demand Scheduling
Algorithm for Bluetooth Piconet and Performance Evaluation," Acta
Electronica Sinica, vol. 35, no. 4, pp. 647-652,2007.
[5] Yeng-Zhong Lee, Rohit Kapoor and Mario GerlaAn, "Efficient and Fair
Polling Scheme for Bluetooth," in Proc. IEEE Military Communications
Conf, 2002, vol. 2, pp. 1062-1068.
[6] Joao Henrique Kleinschmidt, Marcelo E. Pellenz and Luiz A. de Paula
Lima Jr, "An Efficient Polling Strategy for Bluetooth Piconets using
Channel State Information," in Proc. IEEE 6th CAS Symp. on Emerging
Technologies: Mobile and Wireless Comm , Shanghai, China, 2004, vol.
2, pp. 667-670.
[7] Ting-Yu Lin, Yu-Chee Tseng and Yuan-Ting Lu, "An Efficient Link
Polling Policy by Pattern Matching for Bluetooth Piconets," in Proc.
IEEE 36th Hawaii Int. Con! on System Sciences, 2003.
1756