This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] CC2650:cc2650

Guru**** 2587345 points
Other Parts Discussed in Thread: CC2650

请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/wireless-connectivity/bluetooth-group/bluetooth/f/bluetooth-forum/635072/cc2650-cc2650

器件型号:CC2650

在 Android 中  

传感器标签中

我 可以使用其 UUID 获取所有服务 、但如何获取与 UUID 相对应的名称

TI 是否为 CC2650传感器标签提供了任何列表  

调用以下方法

@覆盖 
公共空特性更改(BluetoothGatt GATT、BluetoothGattCharacteristic Characteristic){
super.onCharacteristic Changed (GATT、Characteristic);


使用 UUID (如 AA01*)配置数据的内容
如何启用?
有一个类似的代码

BluetoothGattDescriptor descriptor = characteristic_getDescriptor( 
    UUID.fromString(UUID));
descriptor.setValue(BluetoothGattDescriptor.ENABLE_NOTIFICATION_VALUE);
mBluetoothGatt.writeDescriptor (描述符);

上面代码中的 UUID 是什么?
谢谢您...


  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    您好普拉什特、

    此页面上列出了所有 SensorTag 服务: www.ti.com/.../tearDown.html

    谢谢、
    Fredrik
  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    Fredic
    现在我可以从上面的链接源代码中找到服务名称及其 uuid

    我获得了所有可用的服务 ID 及其 uuid
    在 cc2650 sensortag 中、有13个服务和39个字符及其 UUID

    在获得服务之后
    我必须配置每项服务以获取温度、陀螺仪等数据。。

    配置每个服务的代码:

    //通过 GATT 发送 config UUID、dataUUID 和 serviceUUID
    public void setCharacteristicNotification (BluetoothGatt GATT、UUID serviceUUID、UUID configUUID、UUID dataUUID){
    BluetoothGattService temp_service = GATT.getService (serviceUUID);
    BluetoothGattistic Characteristic = temp_service.getCharacteristic (configUUID);
    characteristic.setValue(new 字节[]{0x01});
    GATT.writeCharacteristic (Characteristic);
    布尔结果= gatt.setCharacteristicNotification(temp_service.getCharacteristic(dataUUID),true);
    //获取结果为 true

    这一切之后
    @覆盖
    公共空特性更改(BluetoothGatt GATT、BluetoothGattCharacteristic Characteristic)


    上述函数不会调用以读取每个服务数据
    谢谢你。