小编use*_*603的帖子

ios ble - Write Without Response"属性 - 忽略无响应写入

在iOS7.1.1上,以下BLE操作成功 - 它假设我有一个BLE连接设置等...

[[self peripheral]writeValue:dataToWrite forCharacteristic:nextCharacteristic type:CBCharacteristicWriteWithResponse];
Run Code Online (Sandbox Code Playgroud)

但如果我切换"类型" CBCharacteristicWriteWithoutResponse,我得到以下警告,外围设备没有收到命令:(

[[self peripheral]writeValue:dataToWrite forCharacteristic:nextCharacteristic type:CBCharacteristicWriteWithoutResponse];
Run Code Online (Sandbox Code Playgroud)

错误:

CoreBluetooth[WARNING] Characteristic <CBCharacteristic: 0x178081f90 UUID = 249C2001-00D7-4D91-AC75-22D57AE2FFB8, Value = (null), Properties = 0x28, Notifying = YES, Broadcasting = NO> does not specify the "Write Without Response" property - ignoring response-less write**
Run Code Online (Sandbox Code Playgroud)

任何线索都赞赏!

ios core-bluetooth bluetooth-lowenergy

1
推荐指数
1
解决办法
5128
查看次数

标签 统计

bluetooth-lowenergy ×1

core-bluetooth ×1

ios ×1