Professional Documents
Culture Documents
Androidbluetoothintro 090913215656 Phpapp02
Androidbluetoothintro 090913215656 Phpapp02
ErinYueh 2009/06/26
Agenda
Androidarchitecture
Relatedsourcecode
Bluez3.36(userspaceandkernel)
/mydroid/externel/bluez /mydroid/kernel/drivers/bluetooth /mydroid/kernel/net/bluetooth
Androidappframework(java&c++)
/mydroid/frameworks/base/core/jni/android_bluetooth_*.cpp /mydroid/frameworks/base/core/java/android/bluetooth/*.java /mydroid/frameworks/base/services/java/com/android/server/(SystemServer)
AndroidUIapplication
/mydroid/packages/apps/Phone/src/com/android/phone/(PhoneApp) /mydroid/packages/apps/Settings/src/com/android/settings/bluetooth/(SettingsApp)
InitBluetooth
/root/init.trout.rc servicehciattach(disabled)
ddms:dalvikdebugmonitorI.
ddms:dalvikdebugmonitorII.
Bluetoothheadset
Musicplayer+Dialer
ConnectwithotherBTdevices
Bluez: hcid daemon dbus-daemon: connections between hcid and system server D-Bus is a simple inter-process communication (IPC) system for software applications to communicate with one another. dbus-daemon is the D-Bus message bus daemon. D-Bus is first a library that provides one-to-one communication between any two applications; dbus-daemon is an application that uses this library to implement a message bus daemon. Multiple programs connect to the message bus daemon and can exchange messages with one another. debug utility: d-feet, dbus-monitor, dbus-send
BlueZDBusArchitecture
DFeet:DBusvieweranddebugger
Dbussend:sendamessagetoamessage bus
ScannearbyBTdevicesinAndroid
Signals
HowtopairwithaBTdevice?I.Register PasskeyAgent
II.RequestPINcode
RFCOMM(RadioFrequency Communication)
SendATcommandsviabluetooth
OBEX(ObjectEXchange)
SOCKET
ReceivefilesviaBTinAndroid
SendfilesviaBTinAndroid
ThankYou!