This application profile defines the application requirements for Bluetooth™ devices necessary for the support of the Basic Printing usage model. The requirements are expressed in terms of end-user services, and by defining the features and procedures that are required for interoperability between Bluetooth devices in the Basic Printing usage model.
2023-04-20 11:41:11 3.68MB 蓝牙通信协议
1
BluetoothKit是一款功能强大的Android蓝牙通信框架,支持经典蓝牙和低功耗蓝牙设备混合扫描,提供了一系列简单易用的接口用于低功耗蓝牙设备的连接,数据读写,通知等。 特点 一、支持经典蓝牙和BLE蓝牙混合扫描,支持自定义扫描策略  作为智能家居平台,接入的设备包括经典蓝牙和BLE,因此扫描设备时需要两者混合进行,而设备扫描场景不同,扫描策略也会不一样,因此需要支持扫描策略可配置。 二、充分解决了Android中BLE兼容性和稳定性问题  Android系统对蓝牙4.0支持得并不完善,有许多bug, BluetoothKit很好地解决了其中大部分已知的问题。  三、简单易用,接口简洁明了  BluetoothKit采用异步串行化策略处理所有设备操作,并支持任务超时及出错重试。  技术 一、实现了一个完整的跨进程异步任务队列,支持任务超时、出错重试及防御队列溢出 二、拦截并Hook系统层蓝牙Binder,实现对所有蓝牙设备通信的监控,当同时连接设备数过多时会自动断掉活跃度最低的设备 三、整个框架封装在一个service中,可灵活指定service所在进程。通过client与service通信,client可源于多个不同进程,因此适用于多进程架构的app 四、屏蔽了接口异步回调可能持有调用端Activity引用导致的内存泄露 五、利用动态代理自动将所有操作封闭在工作线程,所以整个框架无锁 使用 // 首先,需要按如下方式初始化BluetoothClient: BluetoothClient mClient = BluetoothClient.getInstance(context); // 扫描设备:支持经典蓝牙和BLE设备混合扫描,可自由定制扫描策略如下: SearchRequest request = new SearchRequest.Builder() .searchBluetoothLeDevice(3000, 3) .searchBluetoothClassicDevice(5000) .searchBluetoothLeDevice(2000) .build(); mClient.search(request, new SearchResponse() { @Override public void onSearchStarted() { } @Override public void onDeviceFounded(SearchResult device) { } @Override public void onSearchStopped() { } @Override public void onSearchCanceled() { } }); // 停止蓝牙扫描 mClient.stopSearch(); // BLE设备连接 mClient.connect(MAC, new BleConnectResponse() { @Override public void onResponse(int code, Bundle data) { if (code == REQUEST_SUCCESS) { } } }); // BLE设备断开连接 mClient.disconnect(MAC); // 读取BLE设备 mClient.read(MAC, serviceUUID, characterUUID, new BleReadResponse() { @Override public void onResponse(int code, byte[] data) { if (code == REQUEST_SUCCESS) { } } }); // 写BLE设备 mClient.write(MAC, serviceUUID, characterUUID, bytes, new BleWriteResponse() { @Override public void onResponse(int code) { if (code == REQUEST_SUCCESS) { } } }); // 打开设备通知 mClient.notify(MAC, serviceUUID, characterUUID, new BleNotifyResponse() { @Override public void onNotify(UUID service, UUID character, byte[] value) { } @Override public void onResponse(int code) { if (code == REQUEST_SUCCESS) { } } }); // 关闭设备通知 mClient.unnotify(MAC, serviceUUID, characterUUID, new BleUnnotifyResponse() { @Override public void onResponse(int code) { if (code == REQUEST_SUCCESS) { } } }); // 读取rssi mClient.readRssi(MAC, new BleReadRssiResponse() { @Override public void onResponse(int code, Integer rssi) { if (code == REQUEST_SUCCESS) { } } }); 标签:BluetoothKit
2023-03-05 11:52:01 419KB 开源项目
1
STM32F407核心板+OLED显示+MPU6050显示X轴角度+蓝牙通信 实现计步功能
2023-03-01 23:30:19 11.18MB STM32
1
蓝牙技术注定会成为一项通用的低成本无线技术,可适用于一系列范围广泛的数据通信应用。但仍有两个主要方面需要进一步的考虑,即有关蓝牙通信中的数据安全性和数据完整性的问题。这两个方面会限制蓝牙技术的适用范围。在设计无线产品时,通过采用可编程逻辑,可以使蓝牙技术同时满足数据安全性和完整性的要求。
2023-03-01 20:00:42 105KB FPGA
1
Bluetooth是几乎现在每部手机标准配备的功能,多用于耳机mic等设备与手机的连接,除此之外,还可以多部手机之间建立bluetooth通信,本文就通过SDK中带的一个聊天室的例程,来介绍一下Android上的Bluetooth的开发。
2023-02-09 17:36:26 237KB BluetoothChat
1
第一个是蓝牙设配器,对蓝牙的操作都需要用到它,很重要,BluetoothGatt作为中央来使用和处理数据,使用时有一个回调方法BluetoothGattCallback返回中央的状态和周边提供的数据,BluetoothCattService作为周边来提供数据;BluetoothGattServerCallback返回周边的状态。BluetoothDevice是蓝牙设备,BluetoothCattCharacteristic是蓝牙设备的特征。
2023-01-03 13:50:30 354KB android 蓝牙 通信
1
现在很多电脑提供了蓝牙支持,很多笔记本网卡也集成了蓝牙功能,也可以采用USB蓝牙方便的连接手机等蓝牙设备进行通信。 操作蓝牙要使用类库InTheHand.Net.Personal 首先在项目中引用该类库; static void Main(string[] args) { BluetoothRadio bluetoothRadio = BluetoothRadio.PrimaryRadio; if (bluetoothRadio == null) { Console.WriteLine(没有找到本机蓝牙设备!); } else { Console.Writ
2022-11-29 10:14:24 187KB android蓝牙开发 do dow
1
基于android的蓝牙通信demo,可以实现单向的通信
2022-11-28 10:38:43 1.62MB 蓝牙
1
android蓝牙开发,两个手机之间的蓝牙通信,包括自动配对,连接,发送文件
2022-11-05 08:54:02 2.34MB 蓝牙
1
蓝牙通信恒电位仪式电-生化信号读取电路设计
2022-10-25 09:22:55 2.06MB 研究论文
1