Can Android support Zeroconf/Bonjour over Bluetooth? How about TCP/IP?

后端 未结 3 1337
予麋鹿
予麋鹿 2021-02-04 02:27

On iPhone if I create custom service for example \"_test._tcp.local.\" in Bonjour I can seek/broadcast this service through WiFi or/and Bluetooth.

It is possible on Andr

3条回答
  •  逝去的感伤
    2021-02-04 02:48

    There's a couple of reasons why this is not possible currently. The one most related to your question is that - as you probably experienced - jmDNS requires a TCP/IP link to publish or browse services (it requires an IP address to bind to). As the other answers & comments state, you'd need an established PANU link for that, which Android currently doesn't provide.

    The other reasons it will not work are:

    • Apple uses a couple of mechanisms to assure iOS devices will only talk to other iOS devices. So even if you'd get Android into talking Bonjour-over-Bluetooth, it would only work Android-to-Android.
    • Apple certified devices in the MFi program have a special crypto chip which is supplied by Apple. I'm not sure if this applies to Bonjour-over-Bluetooth connections as well, but I'd assume it does.

    You could instead look into using Bluetooth 4 LE - at least there's an Apple API for that starting in iOS 5 providing a Slave profile, and extended to support a Master profile in iOS 6.

提交回复
热议问题