iOS 设备之间的 BLE 数据包长度有区别吗?

发布于 2025-01-16 10:29:10 字数 257 浏览 2 评论 0原文

我正在尝试实现一个具有BLE功能的APP。

尝试从 UpdatedCharacterteristicValue() 获取数据。

但我发现当我期望收到大约200字节长的数据时。

在我的 iPhone 12 Pro(iOS 15)上。效果很好。

在我的 iPhone 8(iOS 12)上。它不起作用。

如果我期望收到大约 60 字节长的数据。

两种设备都工作正常。

这两种设备之间的差异会导致这个结果吗?

I am trying implement an APP with BLE function.

Tried to get data back from UpdatedCharacterteristicValue().

But I found out that when I am expecting to receive about 200 bytes long data.

On my iPhone 12 Pro(iOS 15). It works fine.

On my iPhone 8(iOS 12). It's not working.

If I am expecting to receive about 60 bytes long data.

Both device works fine.

What would be the difference between these two device that cause this result?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

终陌 2025-01-23 10:29:10

连接建立后检查协商的 ATT MTU 并使用它来确定最大特征大小。
您可以在链路上使用的最大特征大小为 ATT MTU - 3,因为 1 个字节用于操作码,2 个字节用于属性句柄。

Check the negotiated ATT MTU after the connection is established and use it to determine the maximum characteristic size.
The maximum characteristic size you can use on the link is ATT MTU - 3, as 1 byte is used for op-code, and 2 bytes as attribute handle.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文