1.1代码位置
1.1.1 Java层
packages/apps/Bluetooth
frameworks/base/core/java/android/bluetooth/
1.1.2 JNI层
packages/apps/Bluetooth/jni
1.1.3 C框架层
hardware/libhardware/include/hardware/bluetooth.h
hardware/libhardware/include/hardware/bt_*.h
bluetooth.h:这里包含蓝牙硬件的接口定义;
bt_gatt.h, bt_gatt_client.h, 和 bt_gatt_server.h:这里包含 GATT profile 相关的接口定义;
bt_hf.h:HFP(Hands-FreeProfile)相关接口的定义;
bt_hh.h:HID(HumanInterface Device) host profile 相关接口的定义;
bt_hl.h:HDP(HealthDevice Profile)相关接口的定义;
bt_mce.h:MAP(MessageAccess Profile)相关接口的定义;
bt_pan.h:PAN(PersonalArea Networking) profile 相关接口的定义;
bt_rc.h:AVRCP(Audio-VisualRemote Control Profile) 相关接口的定义;
bt_sock.h:RFCOMMprofile 相关接口的定义;
蓝牙协议栈: external/bluetooth/bluedroid
厂商支持:hardware/qcom/bt/libbt-vendor
kernel/net/bluetooth
kernel/drivers/bluetooth/
1.2框架图