How does Bonjour Over Bluetooth Work

假如想象 提交于 2019-12-06 05:13:47

问题


Can anyone explain how bonjour works over bluetooth from iphone OS 3.0 onwards?

The documentation says the Bonjour API's used in the application just works even if Wi-fi is off and Bluetooth is on. It also says , a Bluetooth PAN is established and hence IP address comes into picture.

But Bonjour (based on mdns) requires multicast to work. But , Bluetooth PAN (piconet) works on a master-Slave concept. Any data to be exchanged between peers has to go to the master first and then the master forwards to the all clients. Moreover there is a restriction on the number of slaves in piconet i.e., 8. that means bonjour over bluetooth has a limitation that it would work for a max of 8 devices?


回答1:


Apparently, it's PANU to PANU communication. So the limitation is actually - one-on-one communication. If you use Bluetooth Explorer, included with Xcode, you'll see the iOS device presents a service with ID 0x1115. Since there is no GN nor NAP nodes in the connection, only two devices can participate in the connection.

Bluetooth Explorer also shows various custom fields that serve to exchange metadata about the connection. See my somewhat related question for an example of the service announcement.

I have only been able to get this service to appear when using GameKit, on both iPhone 3G with 4.2.1 and iPad with 5.0.1.




回答2:


I know nothing about Boujour and iPhone... Perhaps Bonjour just sees the TCP/IP network and multicasts on to it -- regardless of whether the IP network is over bluetooth or WiFi or FooBar...

IIRC PAN just forms a point-to-point link to the PAN peer and, thus if the peer is an access-point (rather than just another end-node) it it it that will handle multicasting the packets.



来源:https://stackoverflow.com/questions/3350094/how-does-bonjour-over-bluetooth-work

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!