uni-app低功耗蓝牙
- 初始化:uni.openBluetoothAdapter({});
- 开始搜索蓝牙:uni.startBluetoothDevicesDiscovery({});
- 处理目标蓝牙:uni.onBluetoothDeviceFound((v) => {});
- 停止搜索蓝牙:uni.stopBluetoothDevicesDiscovery();
- 建立连接:uni.createBLEConnection({});
- 获取服务id:uni.getBLEDeviceServices({});
- 获取特征id:uni.getBLEDeviceCharacteristics({});
- 发送指令:uni.writeBLECharacteristicValue({})