Android 7.0 bluetooth introduction
来源:互联网 发布:java基础代码 编辑:程序博客网 时间:2024/06/07 05:55
- Android提供了一个默认的蓝牙协议栈-BlueDroid,其被分为蓝牙嵌入式系统(BTE)和蓝牙应用(BTA)两层。BTE实现了蓝牙规格的核心功能,BTA实现了与Android框架层的通信。
蓝牙系统服务通过JNI与蓝牙协议栈进行通信,通过Binder IPC与应用层进行通信。系统服务给开发者提供了各种蓝牙profile的访问。下图为蓝牙协议在Android系统的总体架构图。
- 应用框架层
代码目录为frameworks/base/core/java/android/bluetooth。
使用android.bluetooth相关的API和蓝牙硬件进行交互,内部是通过Binder IPC机制来调用bluetooth进程。
- 蓝牙系统服务
该层实际上被打包成一个system APP(Bluetooth.apk),其在Android框架层实现了蓝牙的service和profiles,并通过JNI调用HAL层。
代码目录为packages/apps/Bluetooth。- JNI
代码目录为packages/apps/Bluetooth/jni。
JNI层代码调用到HAL层,并在蓝牙底层发生某些动作(如发现设备)的时候,接受HAL层的回调。
- 硬件抽象层
该层定义了android.bluetooth API和蓝牙进程需要使用的标准接口,只有实现这些接口才能确保蓝牙硬件正常工作。
代码目录为hardware/libhardware/include/hardware。- 蓝牙协议栈
该层实现了通用的蓝牙HAL接口,并且可以进行客制化的扩展和配置。
代码目录为system/bt。
- 供应商扩展
该层专为蓝牙芯片供应商设计。供应商可以通过创建libbt-vendor.so并指定这些模块,来添加自定义扩展和HCI层调试。
阅读全文
0 0
- Android 7.0 bluetooth introduction
- An Introduction to Bluetooth Programming
- [Bluetooth] Android Bluetooth
- Bluetooth--- android -- 蓝牙 bluetooth
- Android Bluetooth
- Android bluetooth
- Android Bluetooth
- android Bluetooth
- Android Bluetooth
- android bluetooth
- android bluetooth
- Android Bluetooth
- Android Bluetooth
- android bluetooth
- Android Bluetooth
- Android Bluetooth
- android.bluetooth
- android bluetooth
- 开屏广告实现
- 8.30 PPT word excel小技巧
- zookeeper注册服务,开机自启动
- web+git
- java中流对文件的操作
- Android 7.0 bluetooth introduction
- leetcode01 Two Sum 寻找列表中和为定值的元素位置
- Apache Kafka监控之Kafka Web Console
- Python StringIO和BytesIO
- 谷歌一调皮:半个日本的网络瘫痪了
- Linq查找指定重复次数的键
- 本文从如何建立mysql索引以及介绍mysql的索引类型,再讲mysql索引的利与弊,以及建立索引时需要注意的地方 首先:先假设有一张表,表的数据有10W条数据,其中有一条数据是nickname='
- 修改限制端口访问wdcp后台
- 04.Spring Cloud学习笔记之客户端负载均衡组件Ribbon