同时建立多个蓝牙SPP [英] Establishing multiple bluetooth SPPs at the same time

查看:461
本文介绍了同时建立多个蓝牙SPP的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

据我了解,我只能连接到某个UUID的单个服务.我查看了属性,发现每个设备都有自己的命令,并猜想我一定是错的.我用32feet.net测试了多个连接,事实证明我可以同时连接和通信(并接收数据).

From my understanding I can only connect to a single service of a certain UUID. I looked in the properties and found that each device had it's own comport and guessed I had to be wrong. I tested multiple connections with 32feet.net and it turns out I can connect and communicate to both at the same time (and receive data).

我阅读了 Android:蓝牙UUID如何工作?.其中提到我需要UUID才能连接到我所做的串行端口服务,这很棒( https://groups.google.com/forum/#!topic/android-developers/adeBD275u30 ),此链接进行了讨论.

I read Android: How do bluetooth UUIDs work? . Which mentions I need to the UUID to connect to a serial port service which I do and this is great (https://groups.google.com/forum/#!topic/android-developers/adeBD275u30) this link has the discussion.

阅读各种文章给我的印象是,蓝牙无法连接到多个耳机/键盘/鼠标,蓝牙不允许您连接到Android/Iphone上同一UUID的多个服务.这些限制是由操作系统/应用程序造成的吗?

I had been under the impression from reading various posts about not being able to connect to multiple headphones / keyboards / mice that bluetooth didn't allow you to connect to multiple services of the same UUID on Android / Iphone. Are these restrictions made by the OS / application?

阅读Wikipedia后/ http://people.csail.mit .edu/rudolph/Teaching/Articles/PartOfBTBook.pdf 似乎是这样.

After reading wikipedia / http://people.csail.mit.edu/rudolph/Teaching/Articles/PartOfBTBook.pdf that seems to be the case.

我只是很久以前就假设了这一点,而忘记了它是由非具体的东西假设的吗?

Did I just assume this a long time ago and forget that it was assumed from something non concrete?

推荐答案

设备A一次只能连接一个 到设备B上的S.设备A 可以同时连接到设备B,C,D和E等设备上的服务S.

Device A can connect only one at a time to service S on Device B. Device A can connect to service S on Device B, C, D and E, etc at the same time.

详细地,RFCOMM服务侦听端口号,并将该端口号发布在UUID列出的SDP记录中.与TCP/IP在其数据包中使用源端口号和目标端口号不同,RFCOMM在其数据包中仅使用一个端口号,因此,一对设备之间只能对该端口号建立一个连接.

In details a RFCOMM service listens on port number and publishes that port number in a SDP record listed by UUID. Unlike TCP/IP which uses source and destination port numbers in its packets RFCOMM only uses one port number in its packets and therefore only one connection can be active to that port number between a pair of devices.

这篇关于同时建立多个蓝牙SPP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆