IOS、CoreBluetooth
首先使用scanForPeripheralsWithServices 方法搜索设备
并且回调didDiscoverPeripheral 成功找到我要寻找的设备
然后调用connectPeripheral进行连接
成功连接后在回调函数didConnectPeripheral中调用discoverServices 寻找制定的UUID服务
接着在回调函数didDiscoverServices中找到服务调用discoverCharacteristics 寻找制定的特征
在didDiscoverCharacteristicsForService找到特征后 对这个特征进行读取操作
最后在didUpdateValueForCharacteristic中正确读出数据
浙公网安备 33010602011771号