为什么有响应和无响应的MTU不同?

问题描述

在iOS上,当我请求MTU时,我得到.withoutResponse.withResponse的不同值。我意识到它可能会有所不同,因为该函数采用了该参数,但是为什么会有所不同?

在设备上(BLE 4.2):

(lldb) po peripheral.maximumWriteValueLength(for: .withoutResponse)
182

(lldb) po peripheral.maximumWriteValueLength(for: .withResponse)
512

在另一台设备上(BLE 5),我得到:

(lldb) po peripheral.maximumWriteValueLength(for: .withoutResponse)
509

(lldb) po peripheral.maximumWriteValueLength(for: .withResponse)
512

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)