private synchronized void discoverServices() throws InterruptedException {
if (VDBG) { Log.d(TAG, "discoverServices: [CMD]"); }
while (lastMessage != MESSAGE_SERVICES_DISCOVERED) {
mBtGatt.discoverServices();
wait(1000);
}
if (VDBG) {
Log.d(TAG, "discoverServices: [DONE] ");
for (BluetoothGattService s : mBtGatt.getServices()) {
Log.d(TAG, "discoverServices: found " + s.getUuid());
for (BluetoothGattCharacteristic c : s.getCharacteristics()) {
Log.d(TAG, "--> characteristic: " + c.getUuid() + ":" + String.format("%x", c.getInstanceId()));
}
}
}
lastMessage = -1;
}
GattClient.java 文件源码
java
阅读 27
收藏 0
点赞 0
评论 0
项目:mDL-ILP
作者:
评论列表
文章目录