我使用以下调用通过 BLE 发送数据
[peripheral writeValue:dataPiece forCharacteristic:characteristic
type:CBCharacteristicWriteWithResponse];
当 dataPiece 大小为180 bytes
或小于时,一切正常:接受设备接收所有数据,在调用设备上调用相应的回调 ( peripheral: didWriteValueForCharacteristic: error:
)。当大小变大时>180
(180 bytes
但是在后一种情况下,不会调用传输设备上的回调。
还[peripheral maximumWriteValueLengthForType:CBCharacteristicWriteWithResponse]
返回512
超过180
,所以我希望200
工作正常。
我错过了什么(显然是的,但是什么)?