Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS : Losing Bluetooth Connection

I succesfully managed to connect an iPhone and a Mac using Bluetooth.

The iPhone is the central and the Mac is the peripheral. After the connection, both can communicate (the iPhone is subscribing to some characteristics, advertised by the Mac).

But, after some (random ?) time, the iPhone's Bluetooth icon is grayed out and the iPhone doesn't receive Bluetooth messages from the Mac anymore.

Why? How can I make the communication last ?

EDIT : here is the error : advertised by didDisconnectPeripheral:

Domain=CBErrorDomain Code=6 "The connection has timed out unexpectedly.

like image 381
Lou Avatar asked Aug 15 '14 14:08

Lou


1 Answers

After several days of research, I find out what was the problem.

Might help you if you have the same problem :

I had an interference problem between the Bluetooth and the Wifi on my mac. So each time I was using the Wifi, the Bluetooth connection crashed.

Maybe one way to solve the problem is to change the frequency of the wifi provided.

like image 126
Lou Avatar answered Sep 27 '22 21:09

Lou