有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

安卓蓝牙通信中的java错误检测

我有一个Sparkfun "BlueSmirf"蓝牙模块(基于Rovings的RN-41模块),我用它在微控制器和Java应用程序之间传输串行数据

现在,我当然想确保我的数据包按预期到达——那么我必须在两侧实现某种error detection and correction,还是这已经包含在蓝牙协议栈中

根据this answer from Dennis Mathews的说法,我不需要担心SPP上的数据损坏。Sparkfun tutorial说“这些蓝牙调制解调器可以与支持SPP的任何其他蓝牙设备通信”。我想这意味着我的手机属于这个列表,因为我可以与BlueSmirf通信

我是否正确地理解了这一点——意思是——我不必关心错误控制

编辑:根据蓝牙SPP specification

For any products that will be transferring large data files and where the receiving device will be subject to radio interference causing packet losses, it is recommended that the Error Control feature in L2CAP (Core Specification V3.0 and later) be utilized by configuring the channel to use Enhanced Retransmission mode.

很明显,这不是默认设置,必须以某种方式进行配置,还是我遗漏了什么


共 (1) 个答案

  1. # 1 楼答案

    Am I understanding this correctly - meaning - I do not have to care about error control?

    对!如果你设置了错误控制,那么这也不会导致任何错误,但一般来说,这不需要任何控制。您可以在不检查错误的情况下使用它