GattClient.java 文件源码

java
阅读 27 收藏 0 点赞 0 评论 0

项目:mDL-ILP 作者:
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;
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号