NivaarExam PrepOfficial exam papers ↗

22-Elec-B4 Information Technology Networks · December 2018

Question 5 of 5: WiFi and Bluetooth Wireless Protocols

Nivaar worked solution (AI-drafted; not reviewed by a licensed engineer)

Notes on this paper

Paper format. Professional Engineers of Ontario — National Examinations, December 2018, 16-Elec-B4 Information Technology Networks. Three hours, closed book; one approved Casio or Sharp calculator permitted. The paper prints five questions of 25 marks each, and any four constitute a complete paper worth 100 marks, with the marks for every sub-part shown in the left margin. All five questions are solved here, because this set is a study resource rather than an exam attempt, and a candidate choosing which four to write benefits from seeing the fifth worked out.

Reference texts. A. Leon-Garcia and I. Widjaja, Communication Networks: Fundamental Concepts and Key Architectures, 2nd ed. (the syllabus reference for this code); J. F. Kurose and K. W. Ross, Computer Networking: A Top-Down Approach, 8th ed.; A. S. Tanenbaum and D. J. Wetherall, Computer Networks, 5th ed.; W. Stallings, Wireless Communications and Networks, 2nd ed.; T. S. Rappaport, Wireless Communications: Principles and Practice, 2nd ed.; S. Sesia, I. Toufik and M. Baker, LTE — The UMTS Long Term Evolution, 2nd ed.

Question 5: WiFi and Bluetooth Wireless Protocols (25 marks)

Question text not reproduced: the examination questions are © Engineers and Geoscientists BC. Open the official past paper (linked at the top of this page) to read the question, then follow the worked solution below.

Part (a) — Frequency hopping in a Bluetooth piconet (5 marks)

Bluetooth divides the 2.4 GHz ISM band into 79 carriers spaced 1 MHz apart and divides time into slots of 625 µs, giving a nominal hop rate of 1600 hops per second. A piconet consists of one master and up to seven active slaves, and the master alone defines the piconet's channel: the hop sequence is a pseudo-random function of the master's device address, and the position within that sequence is a function of the master's clock. Every slave learns the address and clock during paging and therefore reproduces the identical sequence, so all members of the piconet hop together and remain on the same carrier in every slot.

Within a piconet the medium is then shared by time-division duplex polling rather than by contention. The master transmits in even-numbered slots and a slave may reply only in the odd slot that follows, and only if the master addressed it — so there are no collisions inside a piconet at all, and the master's polling schedule is what allocates capacity among the slaves. The hopping serves two other purposes. It spreads each transmission over the whole band, so a narrowband interferer — a microwave oven, a cordless phone, a WiFi channel — corrupts only the slots that happen to land on the affected carriers, and the rest get through; this is frequency-hop spread spectrum used for interference averaging rather than for processing gain. And because two piconets derive their sequences from different master addresses, their sequences are effectively independent, so several piconets can overlap in the same room and interfere only in the occasional slot where they coincide — which part (b) quantifies. Adaptive frequency hopping, added in Bluetooth 1.2, sharpens this further by removing persistently busy carriers from the sequence altogether.

Part (b) — Collision probability between two synchronised piconets (5 marks)

Given. Two co-located Bluetooth piconets, hopping over $n = 79$ carriers of 1 MHz each. Their slot boundaries are synchronised, and their hop sequences are independent and uniform over the 79 carriers.

Find. The probability that, in a given slot, both piconets transmit on the same carrier and collide.

f8f7f6f5f4f3f2f1123×4567×8Synchronised hop sequences over 8 carriersblue = piconet 1, red = piconet 2a shaded cell is a slot in which both land on one carrierslot numberone hop per slot; the sequences are independent, so a clash costs one slot and no more
Two synchronised hop sequences on an eight-carrier illustration. The two piconets choose independently in each slot; slot 3 is a clash. With 79 carriers such a clash occurs in about one slot in 79.

Approach. Condition on the carrier chosen by the first piconet; the second collides only if it independently chooses the same one.

  1. Fix the first piconet's carrier. In the slot under consideration, piconet 1 hops to some carrier $f_k$. Which one is irrelevant, because the second piconet's choice is uniform over all 79 regardless.
  2. Ask for the second piconet to match it. Piconet 2 selects independently and uniformly from the same 79 carriers, so $$P(\text{collision}) = P(f^{(2)} = f_k) = \frac{1}{n} = \frac{1}{79} = \boxed{0.01266 \approx 1.27\%}$$
  3. Confirm by summing over the carriers. Working from the joint distribution instead, the two piconets collide on carrier $i$ with probability $(1/79)^2$, and there are 79 carriers on which they could collide: $$P = \sum_{i=1}^{79}\frac{1}{79}\cdot\frac{1}{79} = 79\cdot\frac{1}{79^{2}} = \frac{1}{79}$$ which agrees, as it must.

About one slot in 79 is therefore lost, and a lost slot is not a lost connection: the affected packet is simply retransmitted in a later slot on a different carrier, so the throughput penalty is roughly 1.3 per cent. Extending the argument, with three synchronised piconets the probability that a given piconet's slot is disturbed by at least one of the other two is $1-(1-1/79)^{2}$, and the chance that any two of the three coincide is $1-(1-1/79)^{3} = 3.75\%$; the degradation is gradual, which is exactly the property that lets many Bluetooth devices share a room.

Check: independence and synchronisation. The 1/79 figure assumes the hop sequences are independent and uniform, which is the intent of the Bluetooth hop-selection kernel but not exactly true of it, and that the piconets are slot-synchronised, which the question grants for simplicity. Unsynchronised piconets overlap only partially in time and the collision probability rises somewhat above 1/79, because a slot can be hit by either of the two overlapping slots of the other piconet.

Part (c) — Services of the BSS and the ESS (5 marks)

A basic service set is the fundamental building block of an 802.11 network: a group of stations that are all within range of, and coordinated by, one access point (in the infrastructure form) or of one another (in an independent BSS, the ad-hoc form). The BSS provides the station services, which are the functions available inside a single cell: authentication and deauthentication, which establish and revoke a station's identity to the access point; privacy, the encryption of frames over the air; and MSDU delivery, the actual transport of data frames between stations of the set. It also runs the medium-access coordination described in part (d), and it is identified to users by its SSID and to the protocol by the access point's BSSID.

An extended service set joins two or more BSSs through a distribution system — typically a wired Ethernet backbone — so that they appear to the logical link control layer as a single network. The ESS provides the distribution-system services, which are the functions that only make sense across cells: association, which registers a station with one access point and tells the distribution system where to deliver its frames; reassociation, which transfers that registration to another access point and is the mechanism of roaming; disassociation; distribution, the delivery of a frame to the correct access point; and integration, the translation of frames to and from a non-802.11 network. The practical consequence is mobility: within an ESS a station may move from the coverage of one access point to another without changing its IP address or breaking its transport connections, because the distribution system tracks its current association.

Part (d) — Medium access sharing in WiFi and the inter-frame spaces (5 marks)

timeBusy mediumDIFSBackoffDATASIFSACKDIFSnextDCF timing: SIFS < PIFS < DIFS < EIFSa shorter inter-frame space wins the medium, so the ACK never has to contendSIFS = 10 µs, slot = 20 µs, DIFS = SIFS + 2 slots = 50 µs (802.11 DSSS)
802.11 DCF timing. A station must find the medium idle for a DIFS and then count down a random backoff, while an acknowledgement needs only the shorter SIFS — so the acknowledgement always wins the medium.

WiFi's basic access method is the distributed coordination function, a form of carrier-sense multiple access with collision avoidance. A radio cannot listen while it transmits, so 802.11 cannot detect a collision the way Ethernet does; it must instead make collisions unlikely and confirm every frame explicitly. A station with a frame to send first senses the medium, both physically and virtually through the network allocation vector set by any overheard RTS or CTS. If the medium has been idle for at least a DIFS it may transmit; if it was busy, the station waits for a DIFS after it goes idle and then counts down a backoff timer chosen uniformly from the contention window, decrementing only while the medium remains idle and freezing whenever it goes busy. The station that draws the smallest count transmits first, and the others resume their countdown from where they froze, which gives a station that has already waited a long time an advantage. Each unsuccessful attempt doubles the contention window — binary exponential backoff — and the receiver returns an acknowledgement, whose absence is the only evidence of a collision.

The inter-frame spaces are what impose priority on this scheme, and they work simply because a station that must wait a shorter idle period always seizes the medium before one that must wait a longer one. Four are defined, in increasing length: SIFS (short inter-frame space, 10 µs in the DSSS PHY) precedes an acknowledgement, a CTS, or the next fragment of a fragmented frame — the frames that complete an exchange already in progress, and which therefore must never have to contend; PIFS (= SIFS + one slot time, 30 µs) is used by the point coordination function to start a contention-free period, giving the access point priority over ordinary stations but not over an in-progress exchange; DIFS (= SIFS + two slots, 50 µs) is what ordinary data frames must wait under the DCF; and EIFS, much longer, is used after receiving a frame whose CRC failed, so that a station which cannot decode an exchange does not disrupt its acknowledgement. The design is elegant precisely because it needs no central clock: a single ordering of four constants distributes the priorities.

Part (e) — One advantage and one disadvantage of the ISM band (5 marks)

Advantage — no licence, hence no barrier to deployment. The ISM bands are available worldwide under a general authorisation: any manufacturer may build for them and any user may install equipment without applying to a regulator, paying for spectrum or coordinating with incumbents. In Canada this is Innovation, Science and Economic Development Canada's licence-exempt regime (RSS-247), and the equivalent rules elsewhere are close enough that one radio design sells globally. That absence of friction is what made both WiFi and Bluetooth mass-market technologies; a licensed equivalent would have required a spectrum auction and a network operator standing between the user and the equipment.

Disadvantage — no protection from interference. The same open access means no user has any right to a clean channel. The 2.4 GHz band carries WiFi, Bluetooth, Zigbee, cordless telephones, video senders, wireless microphones and the leakage of microwave ovens, all of them entitled to be there and none of them obliged to coordinate. Performance therefore depends on the neighbours, cannot be guaranteed by design, and degrades unpredictably as the band fills; users must accept interference as a condition of licence-exempt operation. The technical responses are visible throughout this paper — Bluetooth's frequency hopping and adaptive hop-set selection, WiFi's channel selection, rate adaptation and retransmission, and transmit-power limits that keep cells small so that interference is at least localised.

Final results — Question 5
QuantityResult
Bluetooth channelisation79 carriers, 1 MHz apart; 625 µs slots, 1600 hops/s; master's address and clock set the sequence
Collision probability, two synchronised piconets$1/79 = 0.01266$, i.e. 1.27% of slots
Three synchronised piconets (any clash)$1-(1-1/79)^{3} = 3.75\%$
BSS servicesAuthentication, deauthentication, privacy, MSDU delivery
ESS servicesAssociation, reassociation, disassociation, distribution, integration
802.11 inter-frame spacesSIFS 10 µs, PIFS 30 µs, DIFS 50 µs, EIFS longest
ISM band tradeLicence-exempt worldwide access, in exchange for no interference protection
Back to the paper →