简体   繁体   中英

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM