Timo Müller, Mikel Astiz AUTOMOTIVE BLUETOOTH TELEPHONY. COMBINING BlueZ AND THE MODERN VEHICLE.
AUTOMOTIVE BLUETOOTH TELEPHONY. WHY ARE WE DOING THIS? Building Open Source IVI Stack for Bluetooth Use Cases using BlueZ, ofono and PulseAudio feeding back APIs and architectural decisions into the GENIVI Alliance Page 2
BLUETOOTH BASICS. DATA TRANSPORT ARCHITECTURE. L2CAP Layer L2CAP Channels Logical Links Logical Layer Logical Transports Physical Links Physical Layer Physical Channel (cf. [1] Architecture &Terminology Overview, p. 39) Page 3
BLUETOOTH BASICS. PHYSICAL LAYER. Physical Channel Frequency Hopping Sequence Access Code Packet Timing Master Slave L2CAP Layer L2CAP Channels Physical Link represents a connection between Bluetooth devices Logical Layer Physical Layer Logical Links Logical Transports Physical Links Physical Channel (see. [2] Core System Package, p. 71ff and 96ff) Page 4
BLUETOOTH BASICS. LOGICAL LAYER. Logical Transport defines a communication channel with a set of characteristics: Flow control Acknowledgment and repeat mechanisms Sequence numbering Scheduling behaviour Logical Link associated with a logical transport supports applications with different transport requirements L2CAP Layer Logical Layer Physical Layer L2CAP Channels Logical Links Logical Transports Physical Links Physical Channel (see. [1] Architecture & Terminology Overview, p. 61) Page 5
BLUETOOTH BASICS. LOGICAL TRANSPORTS. ACL (Asynchronous Connection-Oriented) Packet-switched communication Master Slave SCO (Synchronous Connection-Oriented) Circuit-switched communication Master Slave L2CAP Layer Logical Layer Physical Layer L2CAP Channels Logical Links Logical Transports Physical Links Physical Channel Page 6
BLUETOOTH BASICS. LOGICAL LINK CONTROL AND ADAPTATION PROTOCOL LAYER. L2CAP Channel used for connection-oriented and connectionless data services offers Segmentation and reassembly of packets Flow Control Error Control and retransmission L2CAP Layer L2CAP Channels Logical Layer Logical Links Logical Transports Physical Layer Physical Links Physical Channel (see. [3] Core System Package, p. 30ff) Page 7
HANDS-FREE PROFILE (HFP). ROLES. Headset Bluetooth connection Cellular connection Cellular Network Hands-free car kit Hands-Free Unit (HF) Audio Gateway (AG) (cf. [4] Hands-Free Profile 1.6, p. 14) Page 8
HANDS-FREE PROFILE (HFP). STRUCTURE. Hands-Free Profile (HFP) AT CMD Serial Port Profile (SPP) SCO and esco (Audio) Generic Access Profile (GAP) RFCOMM Service Discovery Profile (SDP) Logical Link and Adaption Layer (L2CAP) Host Controller Interface (HCI) Controller(s) (cf. [4] Hands-Free Profile 1.6, p. 10) Page 9
HANDS-FREE PROFILE (HFP). STRUCTURE. Hands-Free Profile (HFP) AT CMD Serial Port Profile (SPP) SCO and esco (Audio) Generic Access Profile (GAP) RFCOMM RFCOMM Socket Service Discovery Profile (SDP) SCO Socket Logical Link and Adaption Layer (L2CAP) Host Controller Interface (HCI) Controller(s) L2CAP Socket (cf. [4] Hands-Free Profile 1.6, p. 10) Page 10
HANDS-FREE PROFILE (HFP). STRUCTURE. Hands-Free Profile (HFP) AT CMD Serial Port Profile (SPP) SCO and esco (Audio) Generic Access Profile (GAP) RFCOMM RFCOMM Socket Service Discovery Profile (SDP) SCO Socket Logical Link and Adaption Layer (L2CAP) Host Controller Interface (HCI) Controller(s) L2CAP Socket (cf. [4] Hands-Free Profile 1.6, p. 10) Page 11
ARCHITECTURE. CORE COMPONENTS AND APIs. ofono D-Bus API BlueZ D-Bus API Pulseaudio RFCOMM Socket Management Socket SCO Socket Kernel Host Controller Interface (HCI) Bluetooth Hardware Page 12
ARCHITECTURE. CORE COMPONENTS AND APIs. User Interface (Human Machine Interface) ofono BlueZ Pulseaudio Handsfree API Handle Connections Handover RFCOMM Media API Handle audio streams Suspend and resume Echo cancellation and noise reduction Page 13
ARCHITECTURE. CORE COMPONENTS AND APIs. User Interface (Human Machine Interface) Telephony Control Dialing Call Handling (Accept, Reject, Hold) Multiparty Call Handling Bluetooth Device Control Device Inquiry Device Pairing Profile Activation Priority Handling Audio Control Microphone Mute Echo Cancellation / Noise Reduction Policy Handling ofono BlueZ Pulseaudio Page 14
ARCHITECTURE. HUMAN MACHINE INTERFACE. User Interface (Human Machine Interface) ofono BlueZ Pulseaudio Page 15
BLUETOOTH BASICS. OTHER RELEVANT AUDIO PROFILES. A2DP (Advanced Audio Distribution Profile) Setup, Control and manipulate streaming of compressed audio Stream high-quality Audio over ACL-Link AVRCP (Audio/Video Remote Control Profile) Control a media player and retrieve current status Browse and Search library of a media player HSP (Headset Profile) Full-duplex audio connection over SCO-Link Minimal device control Page 16
SINGLE PHONE USE CASES. PUTTING CALLS ON HOLD. Bluetooth connection Call active Call on hold Audio connection (HFP) Active call Put call on hold Hold call Activate held call Activate call Page 17
SINGLE PHONE USE CASES. PRIVATE MODE (ACTIVE CALL). Bluetooth connection Call active Call on hold Audio connection (HFP) Active call Enter private mode Disconnect Audio Leave private mode Connect Audio Page 18
SINGLE PHONE USE CASES. PRIVATE MODE (INCOMING CALL). Bluetooth connection Call active Call on hold Audio connection (HFP) Answer call Ringing Active call Leave private mode Connect Audio Page 19
SINGLE PHONE USE CASES. AUDIO PRIORITIES. Bluetooth connection Call active Call on hold Audio connection (HFP) Audio stream (A2DP) Ringing Active call Answer call Hang up call Hang up call Page 20
SINGLE PHONE USE CASES. AUDIO PRIORITIES. Bluetooth connection Call active Call on hold Audio connection (HFP) Audio stream (A2DP) Ringing Active call Answer call Hang up call Hang up call Page 21
SINGLE PHONE USE CASES. AUDIO PRIORITIES UNDER THE HOOD. ofono BlueZ Pulseaudio UI Bluetooth connection Call active Call on hold Audio connection (HFP) Audio stream (A2DP) +CIEV SCO connect ATA OK Stop audio new_call() PropertyChanged() Acquire() SCO Socket Ringing call_answer() PropertyChanged(call active) Notify Answer OK Page 22
DEMO. Page 23
MULTI-PHONE USE CASES. HOLD AND ANSWER. Bluetooth connection Call active Call on hold Audio connection (HFP) 2 1 1 2 Active call Ringing Put call on hold Hold and Answer Answer call Page 24
MULTI-PHONE USE CASES. SWAPPING CALLS. Bluetooth connection Call active Call on hold Audio connection (HFP) 2 1 1 2 Call on hold Active call Activate held call Swap calls Put call on hold Page 25
MULTI-PHONE USE CASES. AUTOMATIC REJECT. Bluetooth connection Call active Call on hold Audio connection (HFP) 2 1 1 2 Active call Call on hold Ringing Reject Ringing Reject Page 26
THE ROAD AHEAD. Wide band speech Transition to BlueZ 5.0 Audio Routing IOP Testing Used Versions: BlueZ: dbd9c3109e77088de3d7e35dec78524ba73d1ad4 ofono: ce79121d27555dc8ad43b5db49a35db83a01a0b8 PulseAudio: a423ee0f3d36b98baff64cc31558632e738b402d Page 27
THANK YOU VERY MUCH FOR YOUR INTEREST. Page 28
RESOURCES. www.bluetooth.org www.genivi.org www.press.bmwgroup.com www.bluez.org www.ofono.org www.pulseaudio.org [1] Bluetooth SIG, Specification of Bluetooth System, Core, v4.0, Volume 1: Architecture & Terminology Overview [2] Bluetooth SIG, Specification of Bluetooth System, Core, v4.0, Volume 2: Core System Package [BR/DER Controller Volume] [3] Bluetooth SIG, Specification of Bluetooth System, Core, v4.0, Volume 3: Core System Package [Host Volume] [4] Bluetooth SIG, Specification of Bluetooth System, Profiles, Version 1.6, Hands-Free Profile Page 29