P2P Bluetooth not working in iOS11

Using NSNetService to establish a p2p bluetooth connection. No longer works with iOS 11.


The sample WiTap also no longer works with iOS11.


Anyone else see this??


Note: You must disable wi-fi and enable bluetooth on both devices to see this problem.

Replies

Yep, thanks for mentioning it. I'm seeing it too in my app and in WiTap. Works fine in iOS 10.3.3/9.3.5.


Just reported Bug 34647123 "Peer to peer Bluetooth not working with NSNetService iOS 11" if you care to submit another and reference it so they know there's more than one of us seeing it.

Hello,


Any news concerning this bug ? I can no longer use my application due to that....


Yann.

Not yet. They've asked me to send in Bluetooth logs. It's taken me a while to get the magic trigger button combination working to generate them and am only just uploading it now. I'll let you know if I hear anything useful back from them, but my experience has been they don't provide much feedback in a bug report.

Yes, I've opened a bug report also on the same subject to see what they would do... but no answer so far...



Thanks for keeping me up to date with the evolution of this support process...


Regards.

I will also send bug report.


In our app we use both NSNetService and low-level DNS bonjour for compatibility with older devices.


If we set NSNetService.includesPeerToPeer to FALSE we can connect via bluetooth using DNS bonjour. However if includesPeerToPeer is TRUE for NSNetService then our DNS bonjour does not work.

OK so I have the answer---not good. Peer to Peer bluetooth was removed from iOS11 according to Eskimo. Here is his answer from my question in another thread...


Can you please verify that P2P bluetooth still works in iOS 11?

It does not. This recently came up on the

bonjour-dev
mailing list. This post is the crux of it but the entire (relatively short) thread is worth reading.

Share and Enjoy


So it looks like the only way is to use the DNS-SD API which I can confirm works as we also use this in our app.

Thanks for the update Ynot. Not great to hear, but good to know!

I have seen a similar issue in multipeer connectivity through MCSession. I don't know whether it is based on NSNetService, but I observed a similar issue (based on complaints by my App Store customers): MCSession seemed to have stopped connecting peer-to-peer over Bluetooth in iOS 11.


Your note "You must disable wi-fi and enable bluetooth on both devices to see this problem." is key. Believe it or not, wi-fi must be enabled on both devices for p2p bluetooth to work, if at least one of the devices runs iOS 11.


I did test this on devices which I told to "ignore" all visible Wi-Fis, and again in a place where no Wi-Fis were visible at all. In both cases they did connect. Unless they established a private Wi-Fi between themselves, I must assume that they connected via Bluetooth. However they stopped connecting when I switched off Wi-Fi entirely, in the Settings app.


They even connect when both Wi-Fi and Bluetooth are only halfway on: on in the Settings app, but off in the Control Center. In this case the status bar shows neither the Wi-Fi nor the Bluetooth icon.


Would somebody on this thread please repeat my experiment with his own implementation based on MCSession or NSNetService and report here? It would also help if somebody could post a reference where this is specified in Apple's documentation.

"However they stopped connecting when I switched off Wi-Fi entirely, in the Settings app."


If you just disable via the control panel wi-fi is still ON. Even though you aren't connected via a router NSNetservice uses ad-hoc or peer to peer wi-fi connection.

You are probably right. They even connect when Bluetooth is entirely off, and Wi-Fi just halfway on (off in the control panel, on in settings). So they probably do connect over peer-to-peer Wi-Fi. In this case the documentation for MultipeerConnectivity is outdated, as it still talks about "Bluetooth personal area networks".


End users might not care whether the actual technology is Bluetooth or direct Wi-Fi. However, with the introduction of three states of activity on Bluetooth and Wi-Fi, and the lack of clear indications what is going on, peer-to-peer connectivity gets really difficult to debug. I wonder how I should explain this mess with how to activate what to my end customers.

I can confirm that I'm seeing the same issue within my application. On devices running iOS 11, you need to turn Wi-Fi on even when you're trying to establish a Bluetooth peer-to-peer connection. This will be a change for our users and I have to say a somewhat confusing one.

It seems with every major release of iOS, MultipeerConnectivity breaks.

Its predecessor GKSession already broke with every major iOS release. Welcome to the club!