58
HCI TRANSPORT LAYER BLUETOOTH SPEC. Version 1.1 Presented by Leon Lee 2001/09/12

HCI TRANSPORT LAYER - Ting-Chao Hou's Home Page

  • Upload
    others

  • View
    4

  • Download
    0

Embed Size (px)

Citation preview

Page 1: HCI TRANSPORT LAYER - Ting-Chao Hou's Home Page

HCI TRANSPORT LAYER

BLUETOOTH SPEC. Version 1.1

Presented by Leon Lee

2001/09/12

Page 2: HCI TRANSPORT LAYER - Ting-Chao Hou's Home Page

OUTLINE

n Introductionn HCI USB Transport Layern HCI RS232 Transport Layern HCI UART Transport Layern Conclusion and discussionn Implementation of HCI driver

Page 3: HCI TRANSPORT LAYER - Ting-Chao Hou's Home Page

INTRODUCTION

n What is HCI transport layer

n Physical object photos

n The position of transport layer

n Bluetooth implementation solutions

Page 4: HCI TRANSPORT LAYER - Ting-Chao Hou's Home Page

WHAT IS THE TRANSPORT LAYER

n Physical link : between Host and Host Controller

n Transparency : NOT decode the packet flow (packet payload)

n Supported physical busesn USB (Universal Serial Bus)

n RS232

n UART (Universal Asynchronous Receiver/Transmitter)

n PC card(derivatives of the ISA bus (Compact Flash/PC Card

interfaces)

Page 5: HCI TRANSPORT LAYER - Ting-Chao Hou's Home Page

PHYSICAL OBJECT PHOTO

Bluetooth module(ericsson)

Interface through USB,UART/PCM

USB 1.1 compliant(voice and data)

Application tool kit

USBRS232

RESETJumper

Page 6: HCI TRANSPORT LAYER - Ting-Chao Hou's Home Page

PHYSICAL OBJECT PHOTO(con’d)

Page 7: HCI TRANSPORT LAYER - Ting-Chao Hou's Home Page

POSITION OF TRANSPORT LAYER

n Bluetooth device end to end viewn Bluetooth low layer software view

n Bluetooth hardware block diagram viewn Bluetooth components viewn Bluetooth physical block diagram view

Page 8: HCI TRANSPORT LAYER - Ting-Chao Hou's Home Page

BLUETOOTH DEVICE END TO END VIEW

Page 9: HCI TRANSPORT LAYER - Ting-Chao Hou's Home Page

BLUETOOTH LOW LAYER SOFEWARE VIEW

Page 10: HCI TRANSPORT LAYER - Ting-Chao Hou's Home Page

BLUETOOTH HARDWARE BLOCK DIAGRAM VIEW

Page 11: HCI TRANSPORT LAYER - Ting-Chao Hou's Home Page

BLUETOOTH COMPONENTS VIEW

Page 12: HCI TRANSPORT LAYER - Ting-Chao Hou's Home Page

BLUETOOTH COMPONENTS VIEW(con’d)

Page 13: HCI TRANSPORT LAYER - Ting-Chao Hou's Home Page

BLUETOOTH PHYSICAL DIAGRAM VIEW

Page 14: HCI TRANSPORT LAYER - Ting-Chao Hou's Home Page

BLUETOOTH IMPLEMENTATION SOLUTIONS

Page 15: HCI TRANSPORT LAYER - Ting-Chao Hou's Home Page

BLUETOOTH IMPLEMENTATION SOLUTIONS(con’d)

Page 16: HCI TRANSPORT LAYER - Ting-Chao Hou's Home Page

BLUETOOTH IMPLEMENTATION SOLUTIONS(con’d)

Page 17: HCI TRANSPORT LAYER - Ting-Chao Hou's Home Page

BLUETOOTH IMPLEMENTATION SOLUTIONS(con’d)

Page 18: HCI TRANSPORT LAYER - Ting-Chao Hou's Home Page

BLUETOOTH IMPLEMENTATION SOLUTIONS(con’d)

Page 19: HCI TRANSPORT LAYER - Ting-Chao Hou's Home Page

HCI USB TRANSPORT LAYER

n Introduction to USB

n Relationship figure

n Flow of data

n USB endpoint expectations

n Class code

Page 20: HCI TRANSPORT LAYER - Ting-Chao Hou's Home Page

INTRODUCTION TO USB

n Characters of USB 1.0

n Bus topology

n Taxonomy of application space

n USB packet types

n Data flow types

Page 21: HCI TRANSPORT LAYER - Ting-Chao Hou's Home Page

CHARACTERS OF USB 1.0

n Hot-plugn Ease of usen High performance: 12 Mbpsn Up to 127 devicesn Power supplied by cablen Power management:enter suspend when no

activity,and the current will be changed to 0.5mA

n Error detection and recovery

Page 22: HCI TRANSPORT LAYER - Ting-Chao Hou's Home Page

BUS TOPOLOGY

Page 23: HCI TRANSPORT LAYER - Ting-Chao Hou's Home Page

TACONOMY OF APPLICATION SPACE

From USB 2.0 for ref.

Page 24: HCI TRANSPORT LAYER - Ting-Chao Hou's Home Page

USB PACKET TYPES (USB 1.0)

n Tocken: SOF,SETUP,IN,OUTn DATA: DATA0,DATA1

n Handshake: ACK,NAK,STALLn Special: PRE(Low-speed(1.5Mbps))n Others

Page 25: HCI TRANSPORT LAYER - Ting-Chao Hou's Home Page

USB PACKET TYPES(con’d)

n Start-Of-Frame(SOF) : 1ms per packet, 11bits for frame num, 5bits for CRC check

n Setup,IN,and OUT : including 7-bit device address,a 4-bit endpoint address,and a 5-bit CRC

n DATA0,DATA1 : A data transfer packet can have a payload varying from 0 to 1023 bytes and a 16-bit CRC

n ACK NAK: acknowledge, and not acknolwdge

n STALL : failed commands

Page 26: HCI TRANSPORT LAYER - Ting-Chao Hou's Home Page

DATA FLOW TYPES

n Control transfers : setup phase,data phase,status phase

n Bulk data transfers : large and bursty quantities (ack)

n Interrupt data transfers : for timely but reliable delivery of data

n Isochronous data transfers : occupy aprenegotiated amount of USB bandwidth with a prenegotiated delivery latency(no ack)

Page 27: HCI TRANSPORT LAYER - Ting-Chao Hou's Home Page

RELATIONSHIP FIGURE

Page 28: HCI TRANSPORT LAYER - Ting-Chao Hou's Home Page

FLOW OF DATAS

Page 29: HCI TRANSPORT LAYER - Ting-Chao Hou's Home Page

USB ENDPOINT EXPECTATIONS

n Required configuration

n Control endpoint expectations

n Bulk endpoint expectations

n Interrupt endpoint expectations

n Isochronous endpoint expectations

Page 30: HCI TRANSPORT LAYER - Ting-Chao Hou's Home Page

REQUIRED CONFIGURATION

Page 31: HCI TRANSPORT LAYER - Ting-Chao Hou's Home Page

REQUIRED CONFIGURATION(con’d)

Page 32: HCI TRANSPORT LAYER - Ting-Chao Hou's Home Page

CONTROL ENDPOINT EXPECTATONS

n Endpoint 0 n Configuring and controlling the USB device

n Host to send HCI-specific commands to host controller

n UBS commands vs. HCI commands

Page 33: HCI TRANSPORT LAYER - Ting-Chao Hou's Home Page

BULK ENDPOING EXPECTATIONS

n Data integrity issuen Bulk maximum packer size = 64 bytes

n The ability of error detecting and correcting

n Starvation avoidance

Page 34: HCI TRANSPORT LAYER - Ting-Chao Hou's Home Page

INTERRUPT ENDPOING EXPECTATIONS

n Guaranteed latency (event)n Time interval : 1ms

n No intimate knowledge about events

Page 35: HCI TRANSPORT LAYER - Ting-Chao Hou's Home Page

ISOCHRONOUS ENDPOING EXPECTATIONS

n Transferring SCO datan Timely sending packet

n 1 ms intervaln Three 64 kb/s channels => 64 bytes(max

packet size)n One/two channels => 32 bytes (max

packet size)

Page 36: HCI TRANSPORT LAYER - Ting-Chao Hou's Home Page

CLASS CODE

From spec. 1.1 p794

Page 37: HCI TRANSPORT LAYER - Ting-Chao Hou's Home Page

HCI RS232 TRANSPORT LAYER

n Introduction to RS232

n HCI RS232 packet

n Using delimiters with COBS for synchronization(Consistent Overhead Byte Stuffing)

n Using RTS/CTS for synchronization(Ready to send/Clear to send)

Page 38: HCI TRANSPORT LAYER - Ting-Chao Hou's Home Page

INTRODUCTION TO RS232

n Recommended Standard by EIA n Data terminal equipment(DTE) : ex. PC

n Data communication equipment(DCE) : ex. MODEM

n Transfer rate : 0-20000 bps

Page 39: HCI TRANSPORT LAYER - Ting-Chao Hou's Home Page

HCI RS232 PACKET

Basic RS232 transport packet frame

Page 40: HCI TRANSPORT LAYER - Ting-Chao Hou's Home Page

HCI RS232 PACKET(con’d)

•The Error Mes-sage Packet (0x05) is used by the receiver to report the nature of error to the transmitting side

•The Negotiation Packet (0x06) is used to negotiate the communication

settings and protocols

Page 41: HCI TRANSPORT LAYER - Ting-Chao Hou's Home Page

BASIC RS232 TRANSPORT PACKET FRAME

Page 42: HCI TRANSPORT LAYER - Ting-Chao Hou's Home Page

NEGOTIATION PROTOCOL

n Initiating parametersn The negotiation packet format

Page 43: HCI TRANSPORT LAYER - Ting-Chao Hou's Home Page

INITIATING PARAMETERS

n Baud rate : 9600n Parity type : no parity

n Number of data bit : 8n Number of stop bit : 1n Protocol mode : 0x13

Page 44: HCI TRANSPORT LAYER - Ting-Chao Hou's Home Page

THE NEGOTIATION PACKET FORMAT

Page 45: HCI TRANSPORT LAYER - Ting-Chao Hou's Home Page

USING DELIMITERS WITH COBS FOR SYNCHRONIZATION

Frame format

Error message format

Page 46: HCI TRANSPORT LAYER - Ting-Chao Hou's Home Page

USING DELIMITERS WITH COBS FOR SYNCHRONIZATION(con’d)

Error types

Page 47: HCI TRANSPORT LAYER - Ting-Chao Hou's Home Page

USING RTS/CTS FOR SYNCHRONIZATION

Error-message packet format

Page 48: HCI TRANSPORT LAYER - Ting-Chao Hou's Home Page

HCI UART TRANSPORT LAYER

n Introduction to UART(Universal Asynchronous Receiver Transmitter)

n Protocol

n RS232 settings

Page 49: HCI TRANSPORT LAYER - Ting-Chao Hou's Home Page

INTRODUCTION TO UART

n A programmable processor(8250)n Parallel data to serial data

n Control , status , and buffer registersn Working standalonen UART I/O ports

Page 50: HCI TRANSPORT LAYER - Ting-Chao Hou's Home Page

PROTOCOL

Page 51: HCI TRANSPORT LAYER - Ting-Chao Hou's Home Page

RS232 SETTINGS

Page 52: HCI TRANSPORT LAYER - Ting-Chao Hou's Home Page

CONCLUSION AND DISCUSSION

Page 53: HCI TRANSPORT LAYER - Ting-Chao Hou's Home Page

CONCLUSION AND DISCUSSION(con’d)

NO HCI

Page 54: HCI TRANSPORT LAYER - Ting-Chao Hou's Home Page

CONCLUSION AND DISCUSSION(con’d)

NO HCI

Page 55: HCI TRANSPORT LAYER - Ting-Chao Hou's Home Page

IMPLEMENTATION OF HCI DRIVER

n Function introductionn HCI driver use case

n HCI driver architecture

Page 56: HCI TRANSPORT LAYER - Ting-Chao Hou's Home Page

FUNCTION INTRODUCTION

n HCI Driver n 提供HCI 的 Commands 以及和L2CAP 溝通的命令n 接收並區分上層所送來的packet type n 將收到的Command或DATA Packet轉成HCI

Firmware 可以接受的HCI Packet形式n 透過 Transport Layer 將HCI Packets 送給 HCI

Firmware n 接收由 Transport Layer 所送來的 DATA Packet 和

Event Packet做分析並做出相應的動作n 將相應的資料往上傳

Page 57: HCI TRANSPORT LAYER - Ting-Chao Hou's Home Page

HCI DRIVER USE CASE

Initial the system

Interprete HCI Event from lowwer layer

Receive data packet

Send data packet

L2CAP Software

TCS Software

Host controller

Interprete HCI command from higher l a y e r

Receive data from High layer

<<Uses>>

Receive data from lower layer

<<Uses>>

<<Uses>>

<<Uses>>

Page 58: HCI TRANSPORT LAYER - Ting-Chao Hou's Home Page

HCI DRIVER ARCHITECTURE