android bluetooth系统自上而下包含了 驱动程序和协议,Bluez库,Bluetooth的android适配库,java中的bluetooth类等几部分:
1. 内核层:
蓝牙系统的内核部分,有两个层次,分别是蓝牙的驱动程序和蓝牙的协议层。
2. Bluez库:
代码路径:/external/bluetooth/*
生成libbluetooth.so, bluetoothd, 及hcidump等众多工具和库。
CONFIG_BT_L2CAP=y
CONFIG_BT_SCO=y
CONFIG_BT_RFCOMM=y
CONFIG_BT_RFCOMM_TTY=y
CONFIG_BT_BNEP=y
CONFIG_BT_BNEP_MC_FILTER=y
CONFIG_BT_BNEP_PROTO_FILTER=y
CONFIG_BT_HIDP=y
# Bluetooth device drivers
#
# CONFIG_BT_HCIBTUSB is not set
# CONFIG_BT_HCIBTSDIO is not set
CONFIG_BT_HCIUART=y
CONFIG_BT_HCIUART_H4=y
# CONFIG_BT_HCIUART_BCSP is not set
# CONFIG_BT_HCIUART_ATH3K is not set
CONFIG_BT_HCIUART_LL=y
# CONFIG_BT_HCIBCM203X is not set
# CONFIG_BT_HCIBPA10X is not set
# CONFIG_BT_HCIBFUSB is not set
# CONFIG_BT_HCIVHCI is not set
# CONFIG_BT_MRVL is not set
CONFIG_BT_WL1271=y
# CONFIG_AF_RXRPC is not set
@echo "Installing WLAN/BT firmwares and tools to rootfs.."
@install ../firmwares/TIInit_7.2.31.bts $(DESTDIR)/system/lib/firmware/
@install ../firmwares/ti-connectivity/wl1271-fw-2.bin $(DESTDIR)/system/etc/firmware/ti-connectivity/
@install ../firmwares/ti-connectivity/wl1271-nvs.bin $(DESTDIR)/system/etc/firmware/ti-connectivity/
@install ../tools/wl1271bt_enable $(DESTDIR)/root/
socket dbus stream 660 bluetooth bluetooth
user bluetooth
group bluetooth net_bt_admin
socket bluetooth stream 660 bluetooth bluetooth
socket dbus_bluetooth stream 660 bluetooth bluetooth
# let bluetoothd drop uid to bluetooth with the right linux capabilities
group bluetooth net_bt_admin misc
disabled
user bluetooth
group bluetooth net_bt_admin
disabled
oneshot
user bluetooth
group bluetooth net_bt_admin
disabled
oneshot
user bluetooth
group bluetooth net_bt_admin
disabled
oneshot
user bluetooth
group bluetooth net_bt_admin
disabled
oneshot
service btpwr /wl1271bt_enable /dev/ttyO1 // here it seems using btpwr to replace rfkill.
disabled
oneshot
user root
group bluetooth net_bt_admin misc
disabled
oneshot
V/BluetoothEventRedirector( 1595): Received android.bluetooth.adapter.action.STATE_CHANGED
D/bluedroid( 1221): bt_enable
D/bluedroid( 1221): defined OMAP3EVM_BTPWR
[ 62.133941] Set BT_EN of WL1271
[ 62.137207] WL1271: Powering on
I/bluedroid( 1221): Starting hciattach daemon
E/bluedroid( 1221): bt_enable: Timeout waiting for HCI device to come up
D/BluetoothService( 1221): Bluetooth state 11 -> 10
V/BluetoothEventRedirector( 1595): Received android.bluetooth.adapter.action.STATE_CHANGED
D/dalvikvm( 1459): GC_EXPLICIT freed 495K, 52% free 2783K/5703K, external 716K/1038K, paused 24ms
1688



被折叠的 条评论
为什么被折叠?



