Android with BLE
用户昵称2021
这个作者很懒,什么都没留下…
展开
-
【Android】【BLE】L2CAP
通常手机端与蓝牙外设进行BLE连接时,调用如下的API:private BluetoothDevice mDevice;private BluetoothGatt mBluetoothGatt;mBluetoothGatt = mDevice.connectGatt(mContext, false, mGattCallback);private final BluetoothGattCallback mGattCallback = new BluetoothGattCallback() { @Ov原创 2022-02-23 10:39:30 · 450 阅读 · 0 评论 -
BLE5.0 - Long-range mode
Long-range mode (Coded PHY)?https://www.jianshu.com/p/277813a059b1兼容4.2 - 1M PHY更高的通信速率 - 2M PHY更远的通信距离 - 1M CODED PHYAndroid 8.0 Oreo(API LEVEL 26)开始在BLE Manager里增加了5.0BLE相关方法,可以使用下面三个方法来鉴定你的手机对5.0BLE支持到什么程度。isLe2MPhySupported - Return true if LE 2M原创 2022-02-09 10:49:37 · 1540 阅读 · 0 评论 -
Android BLE 扫描广播
本文记录一个不常用的扫描接口:public int startScan (List<ScanFilter> filters, ScanSettings settings, PendingIntent callbackIntent)官方描述:Start Bluetooth LE scan using a PendingIntent. The scan results will be delivered via the P原创 2021-07-15 17:10:22 · 733 阅读 · 0 评论 -
[Android][BLE] 获取连接中的RSSI信号强度值
调用接口:readRemoteRssi()BluetoothGatt mBluetoothGattTemp = mDevice.connectGatt(mContext, false, mGattCallback);mBluetoothGattTemp.readRemoteRssi();收到回调:private final BluetoothGattCallback mGattCallback = new BluetoothGattCallback() { @Override原创 2020-09-23 13:58:17 · 1565 阅读 · 2 评论