Bluetooth piconet

8 minute read

Published:

This post covers WIRELESS COMMUNICATIONS AND NETWORKS by William Stallings.

Basic Ideas

Physical Links

  • Two types of links can be established between a master and a slave.
  • Synchronous connection oriented (SCQ): Allocates a fixed bandwidth between a point-to-point connection involving the master and a single slave
  • The master maintains the SCO link by using reserved slots at regular intervals.
  • The basic unit of reservation is two consecutive slots (one in each transmission direction). The master can support up to th lee simultaneous SCO links while a slave can support two or three SCO links.SCO packets are never retransmitted.
  • Asynchronous connectionless (ACL): A point-to-multipoint link between the master and all the slaves in the piconet. In slots not reserved br SCO links, the master can exchange packets with any slave on a per-slot basis, including a slave already engaged in an SCO link. Only a single ACL link can exist. For most ACL packets, packet retransmission is applied.
    • SCO links are used primarily to exchange time-bounded daJ!l requiring guaranteed data rate but without guaranteed delivery.
    • One example, us in a number of Bluetooth profiles, is digitally encoded audio data with built-in tolerance to lost data. The guaranteed data rate is achieved through the reservati ill of a particular number of slots.
    • ACL links provide a packet-switched style of connection. No bandwidth reservation is possible and delivery may be guaranteed through error detection and retransmission.
    • A slave is permitted to return an ACL packet in the slave-to-master slot if and only if it has been addressed in the preceding master-Io-slave slot.
    • For ACL links, 1-slot, 3-slot, and 5-slot packets have been defined. I)data can be sent either unprotected (although ARQ can be used at a higher layer) or protected with a 2/3 forward error correction code.
    • The maximum data rate that can be achieved is with a 5-slot unprotected packet with asymmetric capacity allocation, resulting in 721 kbps in the forward direction and 57.6 kbps in the reverse direction.
  • Packets

  • The packet format for all Bluetooth packets is shown in below figure. It consists of

    three fields:

    • Access code: Used for timing synchronization, offset compensation, paging, and inquiry

    • Header: Used to identify packet type and to carry proUocol control information

    • Payload: If present, contains user voice or data and, in most cases, a payload header

    • Access Code There are three types of access codes:

    • Channel access code (CAC): Identifies a piconet (unique for a piconet)

    • Device access code (DAC): Used for paging and its subsequent responses

    • Inquiry access code (lAC): Used for inquiry purpose

    • An access code consists of a preamble, a sync word, and a trailer. The preamble is used for DC compensation. It consists of the pattern 0101 if the least significant (leftmost) bit in the sync word is 0 and the pattern 1010 if the least significant bit in the sync word is 1.

    • Similarly, the trailer is 0101 if the most significant bit (rightmost) of the sync word is 1 and 1010 if the most significant bit is 0.

    • The 64-bit sync word consists of three components and is worth examining in some detail.

    • Each Bluetooth device is assigned a globally unique 48-bit address. The 24 least significant bits are referred to as the lower address part (LAP) and are used in forming the sync word.

    • For a CAC, the LAP of the master is used; for a DAC, the LAP of the paged unit. There are two different lACs. The general lAC (GIAC) is a general inquiry message used to discover which Bluetooth devices are in range, and for this a special reserved value of LAP is available.

    • A dedicated lAC (DIAC) is common for a dedicated group of Bluetooth units that share a common characteristic, and a previously defined LAP corresponding to that characteristic is used.

    • Using the appropriate LAP, the sync word is formed as follows:

    • The purpose of including a Barker sequence is to further improve the autocorrelation properties of the sync word.

    • Generate a 64-bit pseudonoise (PN) sequence, $P_0, P_1 … ,P_{63}$. The sequence is defined by the equation $P(X) = 1 + X^2 + X^3 + X^5 + X^6$ and can be implemented with a 6-bit linear feedback shift register with seed value for the PN sequence is 100000.

    • Take the bitwise XOR of $P_{34}, P_{35}, … ,P_{63}$ and the 30 bit sequence produced in step1.

    • This “scrambles” the information, removing unwanted regularities.

    • Generate a 34-bit error-correcting code for the scrambled information block an place this at the beginning to form a 64-bit codeword.

    • Thus, we have a (64,30) code. To generate this code, start with a (63,30) BCH code.

    • Then define the generator polynomial $g(X) = (1 + X)g’(X),$ where $g’(X)$ is the generator polynomial for the (63,30) BCH code.

    • This produces the desired 34-bit code.

    • Take the bitwise XOR of $P_{0}, P_{1}, … ,P_{63}$ and the 64-bit sequence produced in step 4. This step descrambles the information part of the codeword so that the original LAP and Barker sequence are transmitted. The step also scrambles the block code.

    • The scrambling of the information part of the codeword in step 3 is designed to strengthen the error-correcting properties of the block code.

    • The subsequent descrambling enables the receiver to recover the LAP easily. In the words of the specification, the scrambling of the 34-bit error code removes the cyclic properties of the underlying code.

    • This might give better transmission spectral qualities and also improve autocorrelation properties.

    • Packet Header The header format for all Bluetooth packets is shown in Figure 15.7c.

      It consists of six fields:

    • AM_ADDR: Recall that a piconet includes at most seven active slaves. The 3-bit AM_Addr contains the “active mode” address (temporary address assigned to this slave in this piconet) of one of the slaves.

    • A transmission from the master to a slave contains that slave’s address; a transmlssion from a slave contains its address. The 0 value is reserved for a broadcast from the master to all slaves in the piconet.

    • Type: Identifies the type of packet. Four type codes are reserved for control packets common to both SCQ and ACL links.

    • The remaining packet types are used to convey user information.

    • For SCO links, the HVl, HV2, HV3 packets each carry 64-kbps voice.

    • The difference is the amount of error protection provided, which dictates how frequently a packet must be sent to maintain the 64-kbps data rate.

    • The DV packet carries both voice and data. For ACL links, 6 different packets are defined. These, together with the DMI packet, carry user data with different amounts of error protection and different data rates.

    • There is another packet type common to bot physical links; it consists of only the access code, with a fixed length of 68 bits (does not include trailer). This is referred to as the ID packe: and is used in the inquiry and access procedures.

    • Flow: Provides a I-bit flow control mechanism for ACL traffic only. When a packet with Flow = 0 is received, the station receiving the packet must temporarily halt the transmission ofACL packets on this link. When a packet with Flow = 1 is received, transmission may resume.

    • ARQN: Provides a I-bit acknowledgment mechanism for ACL traffic protected

      by a CRC.

    • If the reception was successful, an ACK (ARQN = 1) is returned; otherwise a NAK (ARQN = 0) is returned. When no return message regarding acknowledge is received, a NAK is assumed implicitly.

    • If a NAK is received, the relevant packet is retransmitted.

    • SEQN: Provides a 1-bit sequential numbering schemes. Transmitted packets are alternately labeled with a 1 or 0.

    • This is required to filter out retransmissions at the destination; if a retransmission occurs due to Cl failing ACK, the destination receives the same packet twice.

    • Header error control (HEC): An 8-bit error detection code used to protect the

    packet header.