Android:同时从 2 个设备进行多个蓝牙扫描的行为

发布于 2024-11-03 06:05:24 字数 486 浏览 0 评论 0原文

我正在尝试同时从 2 部 Motorola Droid 2 手机执行蓝牙设备发现。他们每个人都会看到不同的设备列表。实际上,除了这 2 部手机之外,他们周围还有 5 部设备。所以我希望他们都能看到所有其他 5 台设备。但是,一个人看到 2 个设备,另一个人看到 4 个设备。该计数在不同的扫描中有所不同。我仔细检查了所有设备是否处于可发现模式。

请帮助我理解这一发现的行为。

问题1:这正常吗?一次进行 2 次扫描,会发生冲突吗?

另外,如果 2 部手机发现同一部手机,请说“X”。

问题 2:这 2 部手机可以同时连接到“X”吗?

实际上,在手机“X”上,我正在运行蓝牙监听器来接受连接。我发现此连接中的行为不一致(有时其中一部手机无法建立连接)。

我在这个论坛中进行了搜索,很少有讨论确实对我理解蓝牙连接有很大帮助。但对于以上2个问题我还是不太清楚。

预先感谢您的帮助。

I am trying to perform bluetooth device discovery from 2 Motorola Droid 2 phones at the same time. Each of them see different list of devices. Actaully there are 5 devices around them other than those 2 mobiles. So I am expecting both of them to see all other 5 devices. But, one sees 2 devices and other sees 4 devices. This count varies in different scans. I double checked that all the devices are in discoverable mode.

Please help me understand the behaviour of this discoveries.

Question 1: Is this normal? Having 2 scans at a time, will conflict some how?

Also, if 2 phones discover the same phone lets say "X".

Question 2: Can these 2 phones connect to "X" at a same time?

Actually on phone "X" I am running a bluetooth listener to accept connections. I see inconsistent behavior in this connections (some times one of the phone cannot establish the connection.)

I searched in this forums and few discussions had really helped me a lot to understand the Bluetooth connections. But still I am not completely clear on the above 2 questions.

Thanks in advance for the help.

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

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

发布评论

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

评论(1

情仇皆在手 2024-11-10 06:05:24
Question 1: Is this normal? Having 2 scans at a time, will conflict some how?

可能会出现罕见的冲突,但扫描过程中内置了足够的冗余,因此这应该不重要。您看到的结果可能是因为作为设备扫描的一部分,设备也会尝试建立短连接并尝试检索名称,在建立连接的这些时间内,设备会短暂停止扫描,因此可能最终会出现以下情况:没有被发现。

Also, if 2 phones discover the same phone lets say "X".
Question 2: Can these 2 phones connect to "X" at a same time?

不,在基本的最低级别(基带/无线电),它一次是一个过程,当它建立一个连接时,它不能做任何其他事情。连接建立过程本身很长并且很复杂,因此当无线电和连接建立过程很可能会发生。基带级连接已完成,上层主机/应用程序级连接正在进行中,设备可以连接到一个设备,并且还扫描来自其他设备的连接,因此在应用程序级,似乎有两件事同时发生。

Question 1: Is this normal? Having 2 scans at a time, will conflict some how?

There can be rare conflicts , but there is enough redundancy built into the scanning procedure that it should not matter. The results you are seeing might be because as part of the scanning for devices the devices also try to establish a short connection and try to retrieve the name, during these times when connection is being established devices stop scanning for short durations and thus could end up not being found.

Also, if 2 phones discover the same phone lets say "X".
Question 2: Can these 2 phones connect to "X" at a same time?

No, at the basic lowest level (baseband / radio) it is one procedure at a time , while it is establishing one connection it cannot do anything else. The connection establishment procedure itself is long and involved so it is possible that while the radio & baseband level connection is done and upper host / application level connections are in progress the device can be connected to one device and also scanning for connections from other devices, so at the application level it can seem like 2 things are happening simultaneously.

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