Bluetooth Radio and Baseband Kuei-Ann Wen Kawen@cc.nctu.edu.tw National Chiao Tung University Institute of Electronics 2016/3/22 Part A RADIO SPECIFICATION Page 2 National Chiao Tung University Stella Kuei Ann Wen 2016/3/22 CONTENTS 1 Scope 2 Frequency Bands and Channel Arrangemen 3 Transmitter Characteristics 4 Receiver Characteristics 5 Appendix A 6 Appendix B Page 3 National Chiao Tung University Stella Kuei Ann Wen 2016/3/22 2 FREQUENCY BANDS AND CHANNEL ARRANGEMENT Page 4 National Chiao Tung University Stella Kuei Ann Wen 2016/3/22 Page 5 National Chiao Tung University Stella Kuei Ann Wen 2016/3/22 3 Transmitter Characteristics 3.1 Modulation Characteristics 3.2 Spurious Emissions 3.2.1 In-band Spurious Emission 3.2.2 Out-of-Band Spurious Emission 3.3 Radio Frequency Tolerance Page 6 National Chiao Tung University Stella Kuei Ann Wen 2016/3/22 TRANSMITTER POWER CHARACTERISTICS Page 7 National Chiao Tung University Stella Kuei Ann Wen 2016/3/22 3.1 MODULATION CHARACTERISTICS GFSK (Gaussian Frequency Shift Keying) with a BT=0.5. The Modulation index must be between 0.28 and 0.35. A binary one is represented by a positive frequency deviation. The symbol timing shall be better than +20 ppm. Page 8 National Chiao Tung University Stella Kuei Ann Wen 2016/3/22 3.2.1 In-band Spurious Emission Page 9 National Chiao Tung University Stella Kuei Ann Wen 2016/3/22 3.2.2 Out-of-Band Spurious Emission Page 10 National Chiao Tung University Stella Kuei Ann Wen 2016/3/22 4 Receiver Characteristics 4.1 Actual Sensitivity Level 4.2 Interference Performance 4.3 Out-of-band Blocking 4.4 Intermodulation Characteristics 4.5 Maximum Useable Level 4.6 Spurious Emissions 4.7 Receiver Signal Strength Indicator (optional) 4.8 Reference Interference-signal Definition Page 11 National Chiao Tung University Stella Kuei Ann Wen 2016/3/22 4.1 ACTUAL SENSITIVITY LEVEL The actual sensitivity level is defined as the input level for which a raw bit error rate (BER) of 0.1% is met. The requirement for a Bluetooth receiver is an actual sensitivity level of -70 dBm or better. In order to measure the bit error rate performance; the equipment must have a loop back facility as specified in Test Mode Specification. Page 12 National Chiao Tung University Stella Kuei Ann Wen 2016/3/22 The signal to interference ratio shall be: Page 13 National Chiao Tung University Stella Kuei Ann Wen 2016/3/22 In-band Interference - 27dBm - 30dBm L L - 60dBm - 71dBm 2500 MHz f 0 + 3MHz f 0 + 2 MHz f 0 + 1MHz f0 f 0 - 1MHz f 0 - 2 MHz f 0 - 3MHz 2400 MHz Page 14 National Chiao Tung University Stella Kuei Ann Wen 2016/3/22 4.3 OUT-OF-BAND BLOCKING The out of band blocking is measured with the wanted signal 3 dB over the reference sensitivity level. The interfering signal shall be a continuous wave signal. The BER shall be 0.1 %. The Out of band blocking requirements: Page 15 National Chiao Tung University Stella Kuei Ann Wen 2016/3/22 Out-of-Band Interference - 10dBm - 27dBm L L L L - 67dBm 12.75GHz 3001MHz 3000 MHz 2500 MHz f0 2400 MHz 2000 MHz 1999 MHz 30 MHz Page 16 National Chiao Tung University Stella Kuei Ann Wen 2016/3/22 4.4 INTERMODULATION CHARACTERISTICS The reference sensitivity performance, BER = 0.1%, shall be met under the following conditions: 1. The wanted signal at frequency f 0 with a power level 6 dB over the reference sensitivity level. 2. A static sine wave signal at f 1 with a power level of -39 dBm. 3. A Bluetooth modulated signal at f 2 with a power level of 39dBm. Such that f 0 =2f 1 -f 2 and ÷ f 2 -f 1 ÷ =n*1 MHz where n can be 3, 4, or 5. The system must fulfil one of the three alternatives. Page 17 National Chiao Tung University Stella Kuei Ann Wen 2016/3/22 Intermodulation characteristic - 39dBm - 64dBm n MHz n MHz n = 3,4,5 Page 18 National Chiao Tung University Stella Kuei Ann Wen 2016/3/22 4.5 MAXIMUM USEABLE LEVEL The maximum useable input level the receiver shall operate at shall be better than -20 dBm. The BER shall be less or equal to 0,1% at -20 dBm input power. 4.6 SPURIOUS EMISSIONS The spurious emission for a Bluetooth receiver shall not be more than: Page 19 National Chiao Tung University Stella Kuei Ann Wen 2016/3/22 4.8 REFERENCE INTERFERENCE-SIGNAL DEFINITION A Bluetooth modulated interfering signal is defined as: Modulation = GFSK Modulation index = 0.32% BT= 0.5+1% Bit Rate = 1 Mbps +1 ppm Modulating Data = PRBS9 Frequency accuracy better than +1 ppm. Page 20 National Chiao Tung University Stella Kuei Ann Wen 2016/3/22 Bluetooth Baseband National Chiao Tung University Institute of Electronics 2016/3/22 1. General Description Baseband Packet BT Link Controller 2.4GHz BT Radio BT Link Manager & I/O Bluetooth Host Bluetooth Host Other Higher Layer Driver Other Higher Layer Driver HCI Driver Bluetooth hardware HCI HCI Driver Bluetooth hardware Baseband Baseband Physical Bus Driver (USB, PCCard) HOST LM Physical Bus(USB, PCCard…) Firmware HCI LM Physical Bus(USB, PCCard…) Firmware Physical Bus Driver (USB, PCCard…) Page 22 National Chiao Tung University Stella Kuei Ann Wen 2016/3/22 System Partition X X DA GFSK fc=1M Packet Composer 42 0~78 VCO 1M X 2.4Ghz FH Acq 2M~81M Hop Net Demod AD 4 Code r Encry. Packet Composer CLK 13M CLK 32k SH Interface 2M~81M Control Buffer 2871bx2 2.4Ghz 27 Page 23 National Chiao Tung University Stella Kuei Ann Wen 2016/3/22 Specification Overview : HCI Packet Command Packet: OpCode (2 bytes) Parameter Length (1 byte) Parameters (the rest of the packet) Event Packet: Event Code (1 byte) Parameter Length (1 byte) Parameters… Parameters (the rest of the packet) Page 24 National Chiao Tung University Stella Kuei Ann Wen 2016/3/22 Specification Overview ACL Packet: Flags (4 bits) Connection Handle (12 bits) Length (2 bytes) Data (the rest of the packet) SCO Packet: Connection Handle (12 bits) Reserved (4 bits) Length (1 byte) Data Data (the rest of the packet) Page 25 National Chiao Tung University Stella Kuei Ann Wen 2016/3/22 Specification Overview Command Groups(OGF) Link Control Link Policy Host Controller & Baseband Informational Status Testing Examples Create_Connection Hold_Mode Write_Page_Timeout Read_BD_ADD Read_RSSI Page 26 National Chiao Tung University Stella Kuei Ann Wen 2016/3/22 545 Page 27 National Chiao Tung University Stella Kuei Ann Wen 2016/3/22 Propagation Scheme: Page 28 National Chiao Tung University Stella Kuei Ann Wen 2016/3/22 2. PHYSICAL CHANNEL Band Selection : 79MHz or 64MHz Channel Selection : 1MHz With digital synthesizer being controlled by LM/HCI signaling Geography Regulatory Change RF Channels Bandwidth USA 2.400-2.4835 GHz f=2402+k Mhz k = 0,…,78 80 Mhz Europe 2.400-2.4835 GHz f=2402+k Mhz k = 0,…,78 80 Mhz Spain 2.445-2.475 GHz f=2449+k Mhz k = 0,…,22 24 Mhz France 2.4465-2.4835 GHz f=2454+k Mhz k = 0,…,22 24 Mhz Japan 2.471-2.491 GHz f=2473+k Mhz k = 0,…,22 24 Mhz Page 29 National Chiao Tung University Stella Kuei Ann Wen 2016/3/22 FH (1600 hops/s)/TDD Channel Slot numbering range : 0 ~ 227-1 f(2k) f(2k+1) f(2k+2) master t slave t 625 ms Page 30 National Chiao Tung University Stella Kuei Ann Wen 2016/3/22 Frequency Hopping Spread Spectrum f5 f4 AMPLITUDE f3 f2 FREQUENCY f1 1 2 3 4 5 6 7 8 9 10 11 12 TIME National • FSK DATA MODULATION • PERIODIC CHANGES IN THE CARRIER FREQUENCY SPREADS THE SIGNAL • CARRIER FREQUENCY CHANGES AT A SPECIFIED HOP RATE • CARRIER FREQUENCY HOPS AFTER A PRESCRIBED TIME C h•i a oTOTAL T u n g U n i v SYSTEM ersity BANDWIDTH INCLUDES ALL OFAnnTHE Stella Kuei Wen CHANNEL FREQUENCIES USED IN HOPPING Page 31 AP96358 2-13 2016/3/22 Master Timing f(2k) f(2k+1) TX RX f(2k+2) TX t 625 ms 1250 ms Page 32 National Chiao Tung University Stella Kuei Ann Wen 2016/3/22 Slave Timing f(2k) f(2k+1) RX TX f(2k+2) RX t 625 ms 1250 ms Page 33 National Chiao Tung University Stella Kuei Ann Wen 2016/3/22 Multi-slot Packets 625 ms f(k) f(k+1) f(k+2) f(k) f(k) f(k+3) f(k+4) f(k+5) f(k+3) f(k+4) f(k+5) f(k+5) Page 34 National Chiao Tung University Stella Kuei Ann Wen 2016/3/22 3. PHYSICAL LINKS Synchronous Connection-Oriented (SCO) Link •circuit switching •symmetric, synchronous services •slot reservation at fixed intervals Asynchronous Connection-Less (ACL) Link •packet switching •(a)symmetric, asynchronous services •polling access scheme SCO(Synchronous Connection-Oriented Link ) : 1. LM protocol sending SCO setup ( Tsco ( counted in slots), Dsco ) 2. SCO send in Tsco 3. Clock wrap-around should be resolved with LMP setup message. 4. CLK(k+1)=CLK(k)+Tsco Page 35 National Chiao Tung University Stella Kuei Ann Wen 2016/3/22 4. Packets Packet Format 72 54 access code packet header 0-2745 payload Page 36 National Chiao Tung University Stella Kuei Ann Wen 2016/3/22 PACKET COMPOSER Access Code Composer Preamble+Sync.+(Tail) HeaderComposer AM_ADDR +TYPE +FLOW+SEQN +ARQN +HEC Payload Composer Modem 7.Whitening GFSK 11.Hopper Coder 13.Sync. Code Composer 5..ARQ Handler 12.Voice 5.Coder HEC - CRC- FEC Coding Controler 6.Logical Channel 8.9.TX/RX Routine & Timing Link Controller Link Manager 10 Channel Control 14.Security 13.BD_ADD, 10CLK... Page 37 National Chiao Tung University Stella Kuei Ann Wen 2016/3/22 Access Code 34 BCH BRKR 4 PREAMBLE LSB 24 6 LAP 64 SYNC WORD 4 TRAILER MSB Page 38 National Chiao Tung University Stella Kuei Ann Wen 2016/3/22 SYNC WORD 145 1. Generate information sequence; 2. XOR this with the “information covering” part of the PN overlay sequence; 3. Generate the extended BCH codeword; 4. XOR the codeword with all 64 bits of the PN overlay sequence; Page 39 National Chiao Tung University Stella Kuei Ann Wen 2016/3/22 Access Code Types Device Access Code (DAC): unit identifier derived from unit LAP Channel Access Code (CAC): channel identifier derived from master LAP Inquiry Access Code (IAC): reserved identifier derived from reserved address Page 40 National Chiao Tung University Stella Kuei Ann Wen 2016/3/22 Packet Header 3 AM_ADDR 4 TYPE 1 1 FLOW ARQN 1 SEQN parameter information AM_ADDR slave active member address TYPE payload type FLOW LC flow control ARQN ACK/NAK SEQN retransmit ordering HEC header error check 8 HEC Page 41 National Chiao Tung University Stella Kuei Ann Wen 2016/3/22 Packet Types TYPE SCO link 1 0000 0001 0010 0011 NULL POLL FHS DM1 2 0100 0101 0110 0111 1000 1001 SEGMENT ACL link NULL POLL FHS DM1 DH1 HV1 HV2 HV3 DV AUX1 3 1010 1011 1100 1101 DM3 DH3 4 1110 1111 DM5 DH5 Page 42 National Chiao Tung University Stella Kuei Ann Wen 2016/3/22 Link Control Packets ID packet IQ packet NULL packet POLL packet FHS packet 34 24 2 ID packet consists of DAC or IAC. It has a fixed length of 68 bits. It is a very robust packet since the receiver uses a bit corrector to match the received packet to the known bit sequence of the ID packet. 2 2 8 16 24 3 26 3 Parity bits | Lap | NA| SR| SP| UAP |NAP | Class of | AM-ADDR | CLK27-2| Page Scan device Mode Page 43 National Chiao Tung University Stella Kuei Ann Wen 2016/3/22 Data Rates (kb/s) Maximum packet size: 28x8+16(crc)+72(access)+54(header)=366 Page 44 National Chiao Tung University Stella Kuei Ann Wen 2016/3/22 Payload Header 2 L_CH L_CH 1 5 FLOW 4 LENGTH channel 4 reserved information 00 - 01 UA/UI continuation of L2CAP message 10 UA/UI start of L2CAP message 11 LM reserved LMP message Page 45 National Chiao Tung University Stella Kuei Ann Wen 2016/3/22 5. Error Control Coding Forward-Error Correction (FEC) 1/3 rate: bit-repeat code 2/3 rate: (15,10) shortened Hamming code Automatic Retransmission Query (ARQ) 1-bit fast ACK/NAK 1-bit sequence number header piggy-backing Page 46 National Chiao Tung University Stella Kuei Ann Wen 2016/3/22 ARQ (I) A B B X C MASTER G SLAVE 1 F Z SLAVE 2 NAK H Z ACK Page 47 National Chiao Tung University Stella Kuei Ann Wen 2016/3/22 ARQ (II) CRC check RX ACK/NAK ACK/NAK retransmission TX new Page 48 National Chiao Tung University Stella Kuei Ann Wen 2016/3/22 ARQ Scheme Page 49 National Chiao Tung University Stella Kuei Ann Wen 2016/3/22 Error Checking HEC CRC Page 50 National Chiao Tung University Stella Kuei Ann Wen 2016/3/22 Error Checking HEC CRC Page 51 National Chiao Tung University Stella Kuei Ann Wen 2016/3/22 6. Logical Channels Logical Channels Control Channels: LC LM link control link manager Traffic Channels: US UA UI synchronous user data asynchronous user data isochronous user data Page 52 National Chiao Tung University Stella Kuei Ann Wen 2016/3/22 7. Data Whitening For Header and Payload Page 53 National Chiao Tung University Stella Kuei Ann Wen 2016/3/22 8. TX/RX Routines Page 54 National Chiao Tung University Stella Kuei Ann Wen 2016/3/22 BITSTREAM PROCESSES Page 55 National Chiao Tung University Stella Kuei Ann Wen 2016/3/22 9. TX/RX Timing RX/TX cycle of Bluetooth master transceiver in normal mode for single-slot packets. Page 56 National Chiao Tung University Stella Kuei Ann Wen 2016/3/22 RX/TX cycle of Bluetooth transceiver in PAGE mode. Page 57 National Chiao Tung University Stella Kuei Ann Wen 2016/3/22 SLAVE RESPONSE/MASTER RESPONSE Page 58 National Chiao Tung University Stella Kuei Ann Wen 2016/3/22 Multi-slave transmission Page 59 National Chiao Tung University Stella Kuei Ann Wen 2016/3/22 10. Channel Control • CLKN native clock • CLKE estimated clock • CLK master clock Page 60 National Chiao Tung University Stella Kuei Ann Wen 2016/3/22 Clock Derivation Page 61 National Chiao Tung University Stella Kuei Ann Wen 2016/3/22 State Transition Page 62 National Chiao Tung University Stella Kuei Ann Wen 2016/3/22 Overall standby SLAVE YES NO NO waken by DAC? initiating? NO NO page scan inquiry scan Slave response? inquiry response? YES MASTER YES sent out DAC? YES inquiry page Master response? NO YES NO connection Page 63 National Chiao Tung University Stella Kuei Ann Wen 2016/3/22 Page / Page Scan master standby page scan window Tw slave DAC (slave ID) standby page scan page Slave ID no FHS Master response Slave response no Slave ID yes yes (data) connection connection (ack) Page 64 National Chiao Tung University Stella Kuei Ann Wen 2016/3/22 Page Trains A f(k-8) f(k-7) f(k) f(k+1) f(k+7) B f(k-16) f(k-15) f(k-9) f(k+8) f(k+15) Page 66 National Chiao Tung University Stella Kuei Ann Wen 2016/3/22 Connection Setup 1.25ms FHS MASTER train A A A A B B 10 ms CONNECTION SLAVE scan f(k) B f(k+1) sleep B 11.25 ms Page 67 National Chiao Tung University Stella Kuei Ann Wen 2016/3/22 Page 68 National Chiao Tung University Stella Kuei Ann Wen 2016/3/22 Inquiry / Inquiry Scan master standby Inquiry inquiry scan window Tw IAC (slave ID) standby Inquiry scan FHS no Inquired? yes (page...) slave no Inquiry response yes (page...) Page 69 National Chiao Tung University Stella Kuei Ann Wen 2016/3/22 Inquire 1.25ms INQUIRER train A A A A A B A A A 10 ms STANDBY scan f(k) A sleep RAND1 f(k) f(k+1) A A FHS sleep RAND2 f(k+1) f(k+2) A A FHS 11.25 ms Page 70 National Chiao Tung University Stella Kuei Ann Wen 2016/3/22 Inquiry Response f(k) f(k+1) IQ f’(k) f’(k+1) f(k+4) IQ IQ f(k+1) FHS 625 ms Page 71 National Chiao Tung University Stella Kuei Ann Wen 2016/3/22 Sniff Example ACL ACL ACL MASTER lost SLAVE 1 SNIFF INTERVAL SLAVE 2 Page 72 National Chiao Tung University Stella Kuei Ann Wen 2016/3/22 Park Mode BEACON PM_ADDR active slave master parked slaves Page 73 National Chiao Tung University Stella Kuei Ann Wen 2016/3/22 Park Example PARK INTERVAL BC ACL ACL BC MASTER SLAVE X SLAVE 2 SLAVE Y Page 74 National Chiao Tung University Stella Kuei Ann Wen 2016/3/22 11. Hop Selection 0 2 4 6 8 626466 78 1 3 737577 segment 1 segment 2 segment 3 Segment # of hops length Europe/US 79 32 16 Japan/France/Spain 23 16 8 Page 75 National Chiao Tung University Stella Kuei Ann Wen 2016/3/22 A B C D E F 5 Y1 4 5 XOR 9 7 7 5 5 5 ADD X X O R 5 PERM5 5 ADD 7 0 2 4 mod 79 78 1 3 Y2 77 Block diagram of the hop selection kernel for the 79-hop system Page 76 National Chiao Tung University Stella Kuei Ann Wen 2016/3/22 Page 77 National Chiao Tung University Stella Kuei Ann Wen 2016/3/22 Page 78 National Chiao Tung University Stella Kuei Ann Wen 2016/3/22 Page 79 National Chiao Tung University Stella Kuei Ann Wen 2016/3/22 Page 80 National Chiao Tung University Stella Kuei Ann Wen 2016/3/22 12. Bluetooth Audio Continous Variable Slope Delta-Modulation (CVSD) 1 1 0 0 0 0 0 0 1 0 1 1 1 1 1 0 1 0 0 0 0 1 1 1 0 0 0 1 0 1 0 1 0 . . . . . . . Page 81 National Chiao Tung University Stella Kuei Ann Wen 2016/3/22 13. Bluetooth Address Bluetooth Device Address (BD_ADDR) 48-bit IEEE 802 address 24-bit lower address part (LAP) 8-bit upper address part (UAP) Active Member Address (AM_ADDR) 3-bit active slave address all-zero broadcast address Parked Member Address (PM_ADDR) 8-bit parked slave address Page 82 National Chiao Tung University Stella Kuei Ann Wen 2016/3/22 14. Bluetooth Security In order to accommodate for different types of applications, four types of link keys have been defined: • the combination key KAB • the unit key KA • the temporary key K master • the initialisation key K init Page 83 National Chiao Tung University Stella Kuei Ann Wen 2016/3/22 REFERENCE DESIGNS Page 84 National Chiao Tung University Stella Kuei Ann Wen 2016/3/22 HW Blocks Bluetooth Module RF ASIC - Rx/Tx - regulators - clocking 3.0 .. 5.2 V Control 4 2 Data 13MHz Applic. IF BB ASIC - Rx/Tx Control - ARM7TDI - CVSD codec - Applic. IF 1.8 V Vappl 1.8V, 2.78 or 3.3V Flash 13 MHz 32 kHz Page 85 National Chiao Tung University Stella Kuei Ann Wen 2016/3/22 BB ASIC: Block Diagram Buffer/MCU RAM HW Link Controller Receiver Clock Truncs ResetX 13 MHz SysResetX Clock, Reset, Watchdog MCU Subsystem Data IF Unit Power Control Unit Page 86 National Chiao Tung University Stella Kuei Ann Wen 2016/3/22 VLSI Technologies Page 87 National Chiao Tung University Stella Kuei Ann Wen 2016/3/22 HAVE A NICE LUNCH Page 88 National Chiao Tung University Stella Kuei Ann Wen 2016/3/22