Top Banner
BlueZ – Plugging the Unpluggable Luiz Von Dentz
17

BlueZ – Plugging the Unpluggable - download.tizen.orgdownload.tizen.org/misc/media/conference2012/wednesday/bayview/... · BlueZ – Plugging the Unpluggable ... Bluetooth data

Apr 28, 2018

Download

Documents

lamdang
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: BlueZ – Plugging the Unpluggable - download.tizen.orgdownload.tizen.org/misc/media/conference2012/wednesday/bayview/... · BlueZ – Plugging the Unpluggable ... Bluetooth data

BlueZ – Plugging the Unpluggable

Luiz Von Dentz

Page 2: BlueZ – Plugging the Unpluggable - download.tizen.orgdownload.tizen.org/misc/media/conference2012/wednesday/bayview/... · BlueZ – Plugging the Unpluggable ... Bluetooth data

tizen.orgtizen.org2

Agenda

● BlueZ High-level Architecture

● Audio Architecture

● With PulseAudio reference design

● Control Architecture

● Telephony Architecture

● With oFono reference design

● Network Architecture

● With ConnMann reference design

Page 3: BlueZ – Plugging the Unpluggable - download.tizen.orgdownload.tizen.org/misc/media/conference2012/wednesday/bayview/... · BlueZ – Plugging the Unpluggable ... Bluetooth data

tizen.orgtizen.org3

BlueZ High-level Architecture

HCI sockets

BlueZ Core

SCOsockets

L2CAPsockets

bluetoothd

User Space

Kernel Space

Control Network

MGMT sockets

RFCOMM sockets

Audio Telephonyobexd

Page 4: BlueZ – Plugging the Unpluggable - download.tizen.orgdownload.tizen.org/misc/media/conference2012/wednesday/bayview/... · BlueZ – Plugging the Unpluggable ... Bluetooth data

tizen.orgtizen.org4

BlueZ Interfaces

● Application interfaces are D-Bus based

● Use cases based high-level interfaces

● Limited exposure to Bluetooth technical low-level details

● Agent based interfaces

Page 5: BlueZ – Plugging the Unpluggable - download.tizen.orgdownload.tizen.org/misc/media/conference2012/wednesday/bayview/... · BlueZ – Plugging the Unpluggable ... Bluetooth data

tizen.orgtizen.org5

D-Bus agents and BlueZ

● User interface creates unique D-Bus object and registers it

● If required daemon will call into that D-Bus object for extra information

● Agent can reply with information or detailed error codes

bluetoothd UI

RegisterAgent

Return empty or error

Return empty or error

RequestPinCode

UnregisterAgent

Page 6: BlueZ – Plugging the Unpluggable - download.tizen.orgdownload.tizen.org/misc/media/conference2012/wednesday/bayview/... · BlueZ – Plugging the Unpluggable ... Bluetooth data

tizen.orgtizen.org6

Audio Architecture

● Hands-free Profile (HFP)

● Mono voice quality at 8khz

● Voice commands, navigation and calls

● Low Latency

● Bluetooth audio link (SCO)

● Advanced Audio Distribution Profile (A2DP)

● Sink or source role

● Stereo

● Medium/High Latency

● Bluetooth data link (ACL)

bluetoothd

Audio/endpoint/path

org.bluez.MediaEndpoint

/org/bluez/[pid]/hci0org.bluez.Media

/org/bluez/[pid]/hci0/device...org.bluez.MediaTransport

Page 7: BlueZ – Plugging the Unpluggable - download.tizen.orgdownload.tizen.org/misc/media/conference2012/wednesday/bayview/... · BlueZ – Plugging the Unpluggable ... Bluetooth data

tizen.orgtizen.org7

Audio Interaction

bluetoothd PulseAudio

org.bluez.Media.RegisterEndpoint

org.bluez.MediaEndpoint.SelectConfiguration

Return configuration

org.bluez.MediaEndpoint.SetConfiguration

Return empty

Return empty

org.bluez.MediaTransport.Acquire

Return file descriptor

Application

org.bluez.Audio.Connect

org.bluez.Media.RegisterEndpoint

Return empty

Page 8: BlueZ – Plugging the Unpluggable - download.tizen.orgdownload.tizen.org/misc/media/conference2012/wednesday/bayview/... · BlueZ – Plugging the Unpluggable ... Bluetooth data

tizen.orgtizen.org8

PulseAudio Integration

● module-bluetooth-discover

● Detects and loads device modules

● module-bluetooth-device

● Card creation and profile detection

● Telephony Duplex (HFP)

– Phone, PC and IVI roles

– PCM and HCI routing

● High Fidelity Playback (A2DP)

– Phone, PC and IVI roles

– SBC codec

Page 9: BlueZ – Plugging the Unpluggable - download.tizen.orgdownload.tizen.org/misc/media/conference2012/wednesday/bayview/... · BlueZ – Plugging the Unpluggable ... Bluetooth data

tizen.orgtizen.org9

Control Architecture

● Audio and Video Remote Control Profile (AVRCP)

● Key input

● Player settings

● Track metadata

● Volume control

● Media Browsing

bluetoothd

Control/player/path

org.bluez.MediaPlayer

/org/bluez/[pid]/hci0org.bluez.Media

Page 10: BlueZ – Plugging the Unpluggable - download.tizen.orgdownload.tizen.org/misc/media/conference2012/wednesday/bayview/... · BlueZ – Plugging the Unpluggable ... Bluetooth data

tizen.orgtizen.org10

Control Interaction

bluetoothd Media Player

org.bluez.Media.RegisterPlayer

org.bluez.MediaPlayer.PropertyChanged

Return empty or error

org.bluez.MediaPlayer.TrackChanged

Page 11: BlueZ – Plugging the Unpluggable - download.tizen.orgdownload.tizen.org/misc/media/conference2012/wednesday/bayview/... · BlueZ – Plugging the Unpluggable ... Bluetooth data

tizen.orgtizen.org11

Telephony Architecture

● Hands-free Profile

● GSM based call states

● AT commands

● Volume control

● Speech control

● Echo Cancellation and Noise Reduction

● Dial-up Network Profile (DUN)

● Sim Access Profile (SAP)bluetoothd

Telephony/telephony/path

org.bluez.TelephonyAgent

/org/bluez/[hci0]/hci0org.bluez.Telephony

/org/bluez/[hci0]/hci0/dev_...org.bluez.MediaTransport

Audio

Page 12: BlueZ – Plugging the Unpluggable - download.tizen.orgdownload.tizen.org/misc/media/conference2012/wednesday/bayview/... · BlueZ – Plugging the Unpluggable ... Bluetooth data

tizen.orgtizen.org12

Telephony Interaction

bluetoothd oFono

org.bluez.Telephony.RegisterAgent

org.bluez.TelephonyAgent.NewConnection

Return empty

org.bluez.MediaTransport.SetProperty

Return empty

Return empty

org.bluez.MediaTransport.PropertyChanged

PulseAudio

org.bluez.MediaTransport.PropertyChanged

org.bluez.MediaTransport.SetProperty

Return empty

Page 13: BlueZ – Plugging the Unpluggable - download.tizen.orgdownload.tizen.org/misc/media/conference2012/wednesday/bayview/... · BlueZ – Plugging the Unpluggable ... Bluetooth data

tizen.orgtizen.org13

Network Architecture

● Personal Area Network Profile (PAN)

● Bluetooth Network Encapsulation Protocol (BNEP)

● Network Access Point (NAP)

● Group Ad-hoc Network (GN)

● PAN user (PANU)

bluetoothd

Network

/org/bluez/[pid]/hci0org.bluez.NetworkServer

Page 14: BlueZ – Plugging the Unpluggable - download.tizen.orgdownload.tizen.org/misc/media/conference2012/wednesday/bayview/... · BlueZ – Plugging the Unpluggable ... Bluetooth data

tizen.orgtizen.org14

Network Interaction

bluetoothd

org.bluez.NetworkServer.Register

Unregister

Return empty or error

ConnMan Network

org.bluez.Network.Connect

org.bluez.Network.Disconnect

Return empty or error

ConnMan Tethering

Page 15: BlueZ – Plugging the Unpluggable - download.tizen.orgdownload.tizen.org/misc/media/conference2012/wednesday/bayview/... · BlueZ – Plugging the Unpluggable ... Bluetooth data

tizen.orgtizen.org15

Future development

● Management interface

● Kernel based handling of Bluetooth controllers

● Power efficient with limited wake-ups of user space

● BlueZ 5.x

● High-Speed support

● Alternate MAC/PHY support

● Work in progress

● Low-Energy support

● Work in progress

Page 16: BlueZ – Plugging the Unpluggable - download.tizen.orgdownload.tizen.org/misc/media/conference2012/wednesday/bayview/... · BlueZ – Plugging the Unpluggable ... Bluetooth data

tizen.orgtizen.org16

Questions?

Page 17: BlueZ – Plugging the Unpluggable - download.tizen.orgdownload.tizen.org/misc/media/conference2012/wednesday/bayview/... · BlueZ – Plugging the Unpluggable ... Bluetooth data

17