I am building an app that sends information between two iPhones. The app is working great but the one problem I am having is that I have no way of telling whether bonjour is choosing wi-fi or bluetooth to make the connection. I would like to allow the user to be able to choose which they prefer. Also, is there way to programmatically tell is the device's bluetooth is on?
Asked
Active
Viewed 972 times
5
-
Have a similar situation but with different transport layers. My NAS is accessible both over wireless and wired GB ethernet. The samba shares on the NAS are advertised on both interfaces. But Bonjour always prefers the slower wireless link. – m000 Mar 29 '11 at 10:17
2 Answers
5
There is NO WAY TO TELL.
It's just one of those weird things.
And in fact there is no way to programmatically choose WiFi or Bluetooth. It's annoying but true.
Often, multidevice games will have a warning for users:
"Be sure to TURN OFF Bluetooth, to ensure you are using your WiFi connection."
That's the situation.
3
Bonjour is just a service discovery protocol - it doesn't care what kind of network you have. It will discover services across a mixture of networks (e.g. via bridges and routers), so it doesn't really make sense to try to map a service discovered via Bonjour to a single type of transport layer.

Paul R
- 208,748
- 37
- 389
- 560