0

We have an iOS peripheral mode app that has been in use since iOS 10. We are now starting to see issues when the app is used on iPhone 8 or X.

The failure we see is that the app does not Advertise even though the peripheralManager.startAdvertising(nil) function call completes successfully (no errors thrown)

When viewing the logs through the console application I see the following entries that seem troubling...

error 14:29:20.743060 -0500 bluetoothd LE Advertising already in progress (handle:0 state:2). (status=65535)  
error 14:29:20.743103 -0500 bluetoothd LE Advertising already in progress (handle:0 state:2). (status=65535)  
error 14:29:20.743529 -0500 bluetoothd LE_StartAdvertising failed with status BM3 STATUS 118 currentAdvHandle=0 gMultiAdvCompleteCb=0x00000001025CEE84 numOfInstances=2  
error 14:29:20.743574 -0500 bluetoothd LE_StartAdvertising failed with status BM3 STATUS 118 currentAdvHandle=0 gMultiAdvCompleteCb=0x00000001025CEE84 numOfInstances=2  
error 14:29:20.744222 -0500 bluetoothd Failed to start advertising with result 118  
error 14:29:20.744274 -0500 bluetoothd Failed to start advertising with result 118  

We have not changed any code in our app and it seems to function properly with older device up to iPhone 7 Plus. The problem can be alleviated by cylcing Bluetooth in Settings (not Control Center) or restarting the device. However, the issue will come back and it is unpredictable.

Has anyone else experience this problem or have any insight into what may be going on?

Thanks

  • We're definitely going to need to see more code than this to try and debug. Bluetooth has a lot of moving parts so would be mostly impossible to guess without seeing as much code as possible :) alternatively, I recommend setting up a sample project which helps hugely with Bluetooth when there's nothing else going on. If/when you get that working you can compare to your main project's code. – Kane Cheshire Jan 08 '18 at 13:39
  • I can get together some of the code I use. However, we have been using this successfully for about 2 years now. These new phones running on the latest OS are the only ones that have the problem. Older phones with the latest OS work just fine. – Brian Benavides Jan 08 '18 at 13:56
  • I know, there have been some changes in iOS 11 that makes it more stringent with regards to making sure you retain certain things so might be good to just have a look. I've got an iOS 11.2 app with a peripheral advertising okay, so it's definitely possible, but I imagine our setups are a bit different. – Kane Cheshire Jan 08 '18 at 14:49
  • Also worth nothing there was a major bug in iOS 11.0-11.2 with regards to background state restoration, if that could be related – Kane Cheshire Jan 08 '18 at 14:52
  • iPhone 8 or higher device uses bluetooth version 5. And the old devices uses BLE 4.0. May be there is a bug here. I am also getting a problem to connect wahoo TICKR device with iPhone 8 or higher. – Jamshed Alam Apr 07 '18 at 15:26

0 Answers0