Tamsui Oxford Journal of Mathematical Sciences 19(1) (2003) 99-115 Aletheia University
Role Switching Techniques for Improving Throughput over Bluetooth Wireless Networks* Gwo-Jong Yu1 Dept. Computer and Information Science, Aletheia University
Chih-Min Wang2 Graduate School of Mathematical Sciences, Aletheia University
and Chih-Yung Chang3 Dept. Computer Science and Information Engineering, Tamkang University Received January 17, 2003, Accepted March 18, 2003.
Abstract In Bluetooth radio system, a piconet consists of a master and at most 7 active slaves. A device that simultaneously participates more than one piconet is called relay. By sharing common relays, two or more piconets can construct a bigger connected network, called scatternet, providing the multi-hop services over Bluetooth networks. This paper presents distributed role switch techniques to dynamically swap the role of two devices. By adopting the role switching operations, the unnecessary relay and piconet can be dynamically removed so that the packet error rate could be improved, the guard slots could be saved, and the average routing length could be reduced. The proposed protocol is expected to improve the performance of data transmission for Bluetooth scatternet. * 1 2 3
This work was supported by Ministry of Education, ROC, under contract no. 90-H-FA07-1-4.
[email protected] [email protected] [email protected]
100
Gwo-Jong Yu, Chih-Min Wang, and Chih-Yung Chang
1. Introduction Bluetooth [1] is a low-power, low-cost, and short-range wireless technology. Equipped with Bluetooth module, Bluetooth device is able to communicate with other Bluetooth devices in the unlicensed ISM band at 2.4GHz. To combat interference and fading, Bluetooth technology applies a fast frequency hop scheme that hops over 79 channels 1600 times per second. Applied the Time Division Duplex (TDD) scheme, a slotted channel is assigned with a nominal slot length of 625μs. On the channel, information is exchanged through packet. A piconet consists of a master and up to seven active slaves that share the same channel with master. Each piconet has its own hopping sequence that is controlled by master. The master device transmits packet in even slot whereas the slave device transmits packet in odd slot. A device that participates multiple piconets is called relay. A slave can participate different piconets on a time division multiplex basis. In addition, a master in one piconet can be a slave of another piconet. Several piconets connected by some common relays form a connected scatternet. Through relay, packet in one piconet can be transmitted to another over scatternet. The performance of a scatternet is determined by factors such as the number of piconets, the number of relays and the role of each device. [2][3][4] Descriptions of these factors are given below. Each piconet has its own hopping sequence. The increasing of piconets will enhance the channel utilization. However, two different piconet transmit data on the same channel will result in packet lost which is defined as collision [5]. As the number of piconet is increased, two devices that belong to different piconet have a high probability of hopping to the same channel for data transmission. This increases the probability of packet lost and drops the performance of a scatternet. Besides, the increasing of piconets will also grow the average routing path which delays the time for route construction and packet transmission [6] and increase the bandwidth and power consumption. A proper reduction of the number of piconets will improve the performance by reduce the packet error rate and average route length.
Bluetooth Role Switching Techniques
101
In addition to the number of piconet, the number of relay is another key parameter for determining scatternet performance. Two piconets that share common relay can transmit data from one piconet to another. However, to construct a connected scatternet, a number of devices are assigned to be relays. [7][8] The time cost for relay switching from one piconet to another is referred to guard time. Too many relays are not only helpless to piconet connection but also creating guard slots. Relay switching among different piconets also makes it difficult for scheduling among those masters of piconets the relay participated. This arise the packet lost problem that also drops the performance of data transmission. Therefore, properly reduce the unnecessary relays will improve the performance of scatternet. In addition to the number of piconets and relays, the role playing is another key parameter of scatternet performance. [9] Device plays an improper role will create the new piconets and relays. Role Switch is an operation that changes roles of master and slave devices in a very short time. A master could also initial a role switch command to one of its slave so that the specific slave could take over all the master’s resources. In this paper, each device monitors the bandwidth requirement, guard slot overhead, and packet lost parameters. While the performance drops because of these monitored parameters, the device initiates the role switch request so that the number of piconet and relays is reduces. Analysis of effect of role switch on scatternet performance is made in this paper. A dynamic role switching protocol is developed in this paper for improving the performance of data transmission. The remainder of this paper is organized in the following. In Section 2, the basic operations of role switch are introduced. In Section 3, an analysis of role switching is proposed for device to determine when and how to get benefit from executing role switch operation. Session 4 concludes the works.
Master Slave Figure 1: Structure of a Piconet.
102
Gwo-Jong Yu, Chih-Min Wang, and Chih-Yung Chang
2. Basic Operations of Role Switching In a Bluetooth radio network, two devices establish a connection by executing Inquiry/Inquiry Scan and Page/Page scan operations. [7][10][11] The device, say device a, that hopes to play the master role will stay in Inquiry state and send the inquiry ID packet to inquire the slave device. As a device, say device b, that is willing to play the slave role receives the second ID packet from device a, it replies the FHS packet that contains the information of its 48-bit BD_ADDR and native clock so that device a can estimate its page scan hopping sequence. After that, device b then enters the page scan state. On receiving the FHS packet, device a that is in inquiry state could enter page state and estimate the channel device b stays according to the information in the received FHS packet. Device a then send FHS packet to device b so that device b could use the 48-bit and native clock information of device a to derive the hopping sequence of the constructed piconet. Two devices, a and b, thus create a connection and a new piconet is constructed. In a piconet, a master connects at most seven slaves and controls the scheduling of data transmission of its slaves. Devices that simultaneously participates multiple piconets is called relay. Through the connection of relays, several piconets construct a connected scatternet. Slave LM
Master LM LMP_slot_offset LMP_switch_req
LMP_accepted or LMP_not_accepted
Figure 2: Information exchange during executing the role switch operation.
Sometime, master or slave requires changing their role. For example, an access point that is play the slave role should change to master role to provide the bridge function of internet access [12]. Role switch operation provides two devices change their roles. Fig. 2 displays the information exchange of master and slave devices during executing the role switch commands defined in link management protocol. As a slave initiates the role switch request, it firstly sends a LMP_slot_offset command to
Bluetooth Role Switching Techniques
103
recover the inaccuracy clock of two devices. The slave then sends a LMP_switch_req command to ask for role switch with master. A master will send a LMP_not_accepted command back to slave to indicate the disapprove. In contrary, if the master approves the slave’s request, it sends LMP_accepted command as an acknowledgment of approves and then exchanges the BD_ADDR information with the slave. Compared with executing Inquiry/Inquiry Scan and Page/Page Scan operation to change the devices’ role, executing standard role switch operation defined in Bluetooth spec 1.1[1] saves a number of slots. In what follows, three major types for executing role switch operation are discussed. [Type 1]: Combining Operation As shown in Fig. 3(a), although device b hops to play the role of slave, however, the random switch [7] among inquiry and inquiry scan state may cause device b staying in inquiry state which is a state of being a master. As shown in Fig. 3(a), after the piconet P2 is constructed, devices b and a play the roles of master and slave, respectively. Hereafter, device b may initiate a role switch request to device a so that it plays a slave role in piconet P1. The role switch operation will cause two piconets P1 and P2 combine into one piconet P1 as shown in Fig. 3(b). The role switch operation also remove the relay role of device a. This type of role switch can reduce the number of relay and the number of piconets. P1
P1 a
d
a d
b b
c
c P2 Master-Slave Relay
(a) Before executing the combining operation.
(b) After executing the combining operation.
Figure 3: The combining operation of role switch.
104
Gwo-Jong Yu, Chih-Min Wang, and Chih-Yung Chang
[Type 2]: Splitting Operation A role switch operation also can split a piconet into two piconets. As shown in Fig. 4(a), in piconet P1, slave device b hops to create a new piconet P2, in which device b plays the master role. Device b thus initiates a role switch request to device a. As shown in Fig. 4(b), device b creates a new piconet P2 and plays a master role in P2. Device a then simultaneous participates two piconets P1 and P2 and respectively plays master and slave roles. This type of role switch operation generates more piconets and relay device and is referred as splitting operation. [Type 3]: Take-Over Operation Role switch operation also can be applied for a slave to take over the resource of its master. For example, as shown in Fig. 5(a), device b initiates a role switch request. On receiving the request, device a ask all other slaves c and d entering in page scan state and transfer their BD_ADDR and clock information to device b. Device b thus enters page state and tries to act as a master and connect s to those slaves in page scan state. After that, as shown in Fig. 5(b), the master of the constructed piconet has been changed to device b. Due to this type of role switch operation provide a slave to take over all slaves belonging to its master, the operation is defined by take-over operation. Moreover, Bluetooth provides another scheme to speed up the execution of take-over operation. As shown in Fig. 5(a), slave device b initiates a role switch request and then master a ask device b to emulate a master in this piconet; that is, slave b sends data packet in even slot and device a sends data packet in odd slot. Slave b then try to transfer its 48-bit and native clock to all other slave in this piconet so that all devices in the piconet can derive the new hopping sequence, according device b’s 48-bit and clock information. After that, device b will be a new master of the original piconet, as shown in Fig. 5(b). To guarantee that the role switch operation could be safely executed, a lock on the simultaneous accept of role switch should be prevented. Due to that there are at most seven active slaves in a piconet, prevention of two slaves simultaneously initiate the role switch operations should be made. Once the master receives the first role switch request, if it agrees with this request, it will refuse any other role switch request until the first request of role switch is complete. The master can send a lock
Bluetooth Role Switching Techniques
105
message to any other device that initiates any role switch request other than the first on. This will guarantee that the first role switch operation can be safely completed.
a
P1
P1
d
b c
a
d
b
c P2
(a) Original piconet.
(b) Piconet after executing the splitting operation.
Figure 4: The execution of splitting operation.
a
P1
a
d
b c
P2
d
b c
(a) Original piconet. (b) Piconet after executing the take-over operation. Figure 5: The execution of take-over operation.
Owing to that Bluetooth radio system applies the Time Division Duplex (TDD) technique to resolve the contention problem, the master device is scheduled to start transmitting data at even slot whereas slave device is scheduled to start transmitting data at odd slot. The role switch operation change the role of master and slave devices so that the master device plays the slave role and is scheduled to start transmitting data at odd slot. Similarly, slave device will play the master role and be scheduled to start transmitting data at even slot. Since the role change is completed without entering the inquiry and inquiry scan states, the role switch operation can be completed within a very few slots. This implies that applying the role switch operation to dynamically reorganize the scatternet is cost effective.
106
Gwo-Jong Yu, Chih-Min Wang, and Chih-Yung Chang
3. Analysis of Role Switching Operation In a Bluetooth radio system, a master device goes through the inquiry and page states to create a connection with a slave device. All slave devices follow the master’s hopping sequence and clock to communicate with master under the control and scheduling of master device. The relay device relays the packet from one piconet to another, which provides the inter-piconet service in scatternet. Bluetooth technique adopts the FHSS (Frequency Hopping Spectrum Spread) scheme to avoid the inference problem. As the number of piconet is small, different piconets will have different hopping sequence and packets can be simultaneously transmitted in each piconets without collision. However, as the number of piconet is increasing, the hopping sequence of one piconet may collide with another. This causes that devices belonging to different piconets transmit packet on the same frequency at the same time and results in packet lost. The retransmission of lost packet drops the system performance. In addition, a large number of piconet also creates a longer length of average routing path, which delays the packet transmission and consumes the bandwidth and power resource. Thus, a large number of piconet will causes problems such as long routing path, high probability of packet lost, and long delay time. Besides, to guarantee that the constructed scatternet is connected, there may a large number of relays exist to connect two or more piconets. [8][13][14][15][16] A relay forwarding the packet from one piconet to another provides the inter-piconet service but causes the guard slots overhead. A relay that switch among the participated piconets will adjust its hopping sequence and clock. Due to that the clock of different piconet is not synchronized, a relay may adjust its clock according to the clock of piconet it serves. As the relay switches to another piconet, it should follow the rule that slave transmits packet starting at odd slot and master should transmit packet staring at even slot. This action takes time one or two slots to synchronize with the active piconet rather than transmitting data. The slots spent for synchronization is
Bluetooth Role Switching Techniques
107
referred as guard slots. Therefore, a large number of relays will create the guard slot overhead. In this paper, role switch techniques are proposed to remove the unnecessary piconet and relay and reduce the length of average routes. Effect on reducing the number of piconet and relay is analyzed in this section. Examples are also given to show that applying the proposed protocol reduces the packet collision rate, guard slots, and the length of averaged routing path. P1
a
P2
b c
d
f
e
(a) Relay Device c participates two Piconets. P3 a
b
c
d f e
(b) The piconet after relay c executing TakeOver Operation.
P2 f
P1
e
a b
d c
(c) An example that a M/S relay a participates two piconets Figure 6: Problems arisen from the poor structure of scatternet.
Gwo-Jong Yu, Chih-Min Wang, and Chih-Yung Chang
108
Fig. 7 reveals the problem arisen from the poor structure of a scatternet. In Fig. 6(a), relay device c simultaneously participates piconets P1 and P2 that are respectively managed by devices a and b. While relay c initiates a role switch request to devices a and b, two piconets P1 and P2 will be combined into one piconet P3 as shown in Fig. 6(b). The new piconet P3 consists of a new master device c and slaves a, b, d, e, and f. In a scatternet, if there are several relays concurrently execute the TakeOver operation on those piconets they participate, the unnecessary piconets and relay could be effectively removed, causing the performance of packet transmission is highly improved. Another functionality of role switch operation is the reduction of the routing path. Within a piconet, one slave cannot directly transmit packet to another. Instead, the packet should be sent to master and then be forwarded from master to another slave. If the source and destination devices belong to different piconets, the packet should pass through a routing path that connects the source and destination piconets. The length of routing path determines the performance of data transmission on this route. A long path consumes long delay time and more power and arises a higher probability of route break and packet lost. One functionality of role switch operation is to reduce the length of a routing path in a scatternet. As demonstrated in Fig. 6(a), there is a routing path eÖaÖcÖbÖf between source device e and destination device f. As relay device c initiates TakeOver operations TakeOver(c, a) and TakeOver(c, b), the resultant structure of scatternet is shown in Fig. 6(b) where the original routing path has been changed to eÖcÖf. The number of hops of the route from e to f has been reduced from 4 to 2. Factors, such as power consumption, delay time, packet lost, and route break, that determine the performance could be improved. In addition, the role switch operation can change the role relation in a piconet. For example, in Fig. 6(c), device a participates piconets P1 and P2 and respectively plays the master and slave roles. While device a switches to piconet P2, slaves c and d in piconet P2 will be idle due to that their master device a is not active in piconet P1. The bandwidth utilization thus drops. However, executing role switch operation
Bluetooth Role Switching Techniques
109
between devices a and c will resolve this problem. As far as there are many relays with poor roles, the role switch operation will save the guard slots and change the poor role to a better one. In summary, a proper role switch improves the performance of data transmission for the following factors. (1) Reduce the number of piconet so that the packet collision phenomenon can be avoided. (2) Remove the unnecessary relays so that the guard slots can be saved. (3) Reduce the average routing path. (4) Avoid the slaves idle due to their master in not active in their piconet. Executing role switch operation can improve the performance of scatternet. However, an improper execution of role switch will cause negative effect on scatternet. Fig. 7 exhibits the problem arisen from the improper execution of role switch operation. In Fig. 7(a), there exist three routing paths: Route 1: cÖb Route 2: dÖb Route 3: cÖbÖaÖe If relay a initiates a TakeOver (a, b) operation, the scatternet structure will be changed as shown in Fig. 7(b). Although the length of route 3 is reduced from 3 to 2, however, both routes 1 and 2 increase their length by one. Therefore, before executing the role switch operation, it is necessary to measure whether or not the role switch is proper. For example, after device a executing the role switch operation, routes 1 and 2 increase the length by 1. In case that the three routes have same traffic Ti=α, for 1≤i≤3, the value of Benefit (a) can be calculated by α*(–1)+ α*(–1)+ α*1=-α This implies that executing role switch on device d will obtain a negative effect.
Gwo-Jong Yu, Chih-Min Wang, and Chih-Yung Chang
110
c
c 1
3
b
a
1 e
2 d
3
b
a
e
2 d
(a) A scatternet before executing TakeOver operation. (b) A scatternet after executing the TakeOver operation. Figure 7: Problem arisen from the improper execution of role switch operation.
Role switch changes not only the roles of master and slave, but also the piconet topology, the packet transmission slot, and the controller of a piconet. To ensure the performance of scatternet is improved by adopting role switch, each device should analyze the effect on the change of scatternet structure before it initiates the role switch request. Fig. 9 demonstrates the opportunities of adopting role switch operation. There are three piconets P1, P2, and P3 in Fig. 8(a). All possible combination of roles in piconets can be found in Fig. 8(a). Masters a and g respectively control the piconets P1 and P3. Slaves f, g, e under the controlled by master. The S/S relay d simultaneously participates two piconets P1 and P2. A M/S relay also participates piconets P2 and P3 and plays the master and slave roles, respectively. In what follows, the role switch is applied to observe the effect of role switch operation. (1) Slave executes the role switch operation Fig. 8(b), displays the scatternet structure after slave f executes a TakeOver(f, a) operation. The number of piconet is three, which is the same as one before executing the TakeOver operation. Thus, the execution of TakeOver operation by a slave device will not change the number of piconet. The only different before and after executing the TakeOver operation is that the master device has been changed from device a to device f. This type of role switch can be applied when an improper master cannot normally operate possibly due to the power off or other traffic consideration reasons.
Bluetooth Role Switching Techniques
111
(2) Master executes the role switch operation A master initiates a TakeOver operation is similar to a slave. For example, in Fig. 8(a), a master f initiates a TakeOver (a, f) operation will result the scatternet structure as shown in Fig. 8(b), which is the same as the one that slave f initiates the TakeOver (f, a) operation. This type of role switch can not help to reduce the number of piconet, but master has various choices to select one of its slaves as a new master. (3) M/S relay executes the role switch operation Consider a device participates two piconets as a M/S relay. As shown in Fig. 8(a), device b participate piconets P2 and P3 and plays the role of Master and Slave, respectively. If device b use slave role to initiate a role switch operation to take over all the slaves of piconet P3, the resultant scatternet structure is shown in Fig. 8(c). After relay b executing the role switch operation TakeOver(b, c), the number of piconets is reduced from three to two. This example illustrates that a M/S relay initiates a role switch operation to those piconets where the relay plays a slave role will reduce the number of piconet and relay. A proper execution of this type role switch operation can alleviate the packet lost phenomenon arisen from the collision of hopping sequence or save guard time caused from relay switching among the participated piconets. (4) S/S relay executes the role switch operation A S/S Relay could changed to a M/S relay by executing a role switch operation TakeOver. Consider Fig. 8(c). After device d executes a role switch operation TakeOver(d, a), the resultant scatternet structure is shown in Fig. 8(d). Device could apply the role switch operation TakeOver (d, b) to take over all slaves in piconet P4. The number of piconet is therefore one, as shown in Fig. 8(e). This indicates that a S/S relay executes the role switch operation is capable of reducing the number of piconet.
112
Gwo-Jong Yu, Chih-Min Wang, and Chih-Yung Chang
Observation (1): As a master has very few traffic or exhausted power, it is proper opportunity to execute a role switch with one of its slave. In case the amount of packets whose destination is master is small; the master may choose one slave that has large amount of packets with destination of this slave. The role switch operation will reduce the route one hop and save the old master’s power consumption. In case that the master’s power is nearly exhausted, it may select one of its slaves that has maximal power to be a new master so that the lifetime of piconet is keeping longer. Observation (2): As there are too many piconets existed in scatternet so that the packet error rate is raised due to collision of hopping sequence, the M/S relay or S/S relay may initiate the TakeOver operation to reduce the number of piconet. P2 e d
P1
b a
g c
f
P3
(a) A scatternet considering all combinations of role relation. P2 e d
P1
b
a
g f
c P3
(b) Scatternet structure after slave f executing the TakeOver operation.
Bluetooth Role Switching Techniques
e d P1
b a
g c
f
P2
(c) Scatternet structure after M/S Relay b executing the TakeOver operation.
e d P4
b
a
g c
f
P2
(d) Scatternet structure after the S/S Relay d executing the TakeOver operation. P4 e d
b
a
g f
c
(e) Scatternet structure after the M/S Relay d executing the TakeOver operation. Figure 8 :Effect on applying role switch to different scatternet topology
113
114
Gwo-Jong Yu, Chih-Min Wang, and Chih-Yung Chang
4. Conclusions In this paper, distributed role switch techniques are proposed to dynamically swap the role of two devices. By adopting the role switching operation, the unnecessary relays and piconet can be removed. The adoption of the proposed techniques could reduce the packet error rate and routing path and saves the guard slots. Experimental study is under going now. We expect that the proposed scheme can effectively improve the performance of data transmission for Bluetooth scatternet.
References [1]
Specification of the Bluetooth system-CORE v1.0A, July 26th 1999.
[2]
Slim Souissi, Eric F,meihofer, Performance evaluation of a Bluetooth network in the Adjacent and co-channel interference, in Motorola Personal Communications Sector 5401 North Beach Street, Fort worth, TX76137USA.
[3]
S. Zilrbes, W. Stahl, K. Matheus, J. Haartsen, Radio network performance of Bluetooth, Communications, 2000. IEEE International Conference on Vol. 3, 1563 –1567, 2000.
[4]
Setting up a Bluetooth Packet Transport Link http://citeseer.nj.nec.com/392522.html.
[5]
Rene Nusser, Robert Bosch, Rodolfo Mann Pelz, Bluetooth-based wireless connectivity in an automotive environment, in IEEE Vehicular Technology Society, 2000.
[6]
Pravin Bhagwat, Adrian Segall, A routing vector method (RVM) for routing in Bluetooth scatternets, The Sixth IEEE International Workshop on Mobile Multimedia Communications (MOMUC'99), 375-379, No. 1999.
[7]
Lakshmi Ramachandran, Manika Kapoor, Abhinanda Sarkar, Alok Aggarwal, Clustering algorithms for wireless Ad Hoc networks, Proceedings of the 4th International Workshop on Discrete Algorithms and Methods for Mobile Computing and Communications 2000.
Bluetooth Role Switching Techniques
115
[8]
Kalia, M., Bansal, D., Shorey, R, MAC scheduling and SAR policies for bluetooth: a master driven TDD Pico-cellular wireless system, Mobile Multimedia Communications, 1999. (MoMuC '99). 1999 IEEE International Workshop, 384 –388.
[9]
W. Zhang, H. Zhu, and G. Cao, On improving the performance of Bluetooth networks through dynamic role management, Technical Report, CSE-01-018 Pennsylvania State University.
[10] The Bluetooth ™ Wireless Technology White Paper in White Paper, Product Plans, Early Access Program. [11] J. Haartsen, The Bluetooth radio system, IEEE Personal Communications, vol. 7(2000) 1, 28–36. [12] S. Baatz, M. Frank, R. Gvpffarth, D. Kassatkine, P. Martini, M. Schetelig, A. Vilavaara, Handoff Support for Mobilty with IP over Bluetooth, The 25th Annual IEEE Conference on Local Computer Networks (LCN), 2000. [13] Mattisson, S., Low power electronics and design, 2000. ISLPED '00. Proceedings of the 2000 International Symposium, 151 –154, 2000. [14] Manish Kalia, Sumit Garg and Rajeev Shorey, Efficient policies for increasing capacity in Bluetooth: an indoor Pico-Cellular wireless system, IEEE Vehicular Technology Conference (VTC), May 15-18, 2000, Tokyo, Japan. [15] Famolari, D.; Agrawal, P., Architecture and performance of an embedded IP bluetooth personal area network, Personal Wireless Communications, IEEE International Conference, 75 –79, 2000.