我的问题是我的Java程序无法获得SHT31智能小工具的温度值的任何输出。

使用的硬件


SHT31 Smart Gadget Development Kit
Smart Gadget Firware


UUID:

private static final UUID TEMPERATURE_UUID = UUID.fromString("00002235-b38d-4985-720e-0F993a68ee41");


我的电话

BluetoothDevice device = result.getDevice();
BluetoothGatt gatt = device.connectGatt(this, true, gattCallback);
BluetoothGattService tempOutput = gatt.getService(TEMPERATURE_UUID);


结果

null


要真正输出温度,我必须更改什么?

最佳答案

我将从正确的UUID开始。根据文档,UUID为

UUID.fromString("00002235-B38D-4985-720E-0F993A68EE41")


UUID区分大小写

07-26 09:41
查看更多