为什么具有不同 COM 端口分配的多个蓝牙 SPP 设备不是唯一的?
设置如下:我有两个蓝牙设备与一台电脑配对。两者都是 SPP,旨在与单独的虚拟 COM 端口一起使用。一台设备分配为 COM9,另一台设备分配为 COM11。如果我打开 COM9 端口,即使我没有打开 COM11 端口,它也会“看到”来自 COM11 配对设备的数据。
看起来好像来自配对设备的任何数据,无论与哪个 COM 端口配对,都将在任何已打开的 COM 端口上接收。我本以为只有在打开 COM9 虚拟端口等情况下才会收到来自与 COM9 配对的设备的数据。
谁能告诉我为什么配对端口的行为不独特?有什么办法可以迫使它们变得独特吗?
Here's the setup: I have two bluetooth devices paired with a single PC. Both are SPP, intended to be used with separate virtual COM ports. One device is assigned COM9, the other is assigned COM11. If I open the COM9 port, it 'sees' the data from the COM11-paired device, even though I didn't open the COM11 port.
It looks as if any data from a paired device, regardless of which COM port it is paired with, will be received on whatever COM port has been opened. I would have expected that data from the device paired with COM9 would only be received if I opened the COM9 virtual port, etc.
Can anyone tell me why the paired ports aren't behaving uniquely? Any way to force them to be unique?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
通常,我看到分配给单个设备的 2 个 com 端口(传入和传出),您确定您所关心的 com 9 和 11 不是同一设备的传入和传出端口吗?
typically I have seen 2 com ports (incoming and outgoing) that gets assigned to a single device, are you sure com 9 and 11 in your care are not the incoming and outgoing port to the same device ?
我在 Windows 7 和 Windows 8 上观察到类似的行为。我已配对两个 SPP 蓝牙设备。因此,Windows 创建了四个虚拟 COM 端口:每个设备一个传入端口和一个传出端口。
然后我打开了两个传入端口。尽管如此,我无法同时连接两个设备。第一个连接到任何传入端口,只要第一个连接,第二个就无法连接。
看起来 Windows 只能在任何传入虚拟 COM 端口上接受一个传入连接。
I have observed a similar behaviour on Windows 7 and Windows 8. I have paired two SPP Bluetooth devices. Thus Windows has created four virtual COM ports: one incoming and one outgoing for each device.
I then opened the two incoming ports. Nevertheless, I could not connect both devices simultaneously. The first one gets connected to whatever incoming port and the second one cannot connect as long as the first is connected.
It looks as if Windows can accept only one incoming connection, on whatever incoming virtual COM port.