BLE Device Discovery Inconsistent Across iPhone Models with Same iOS Version

I'm encountering an issue where a specific BLE device (a Telematics Control Unit) is being discovered by some iPhone models but not others, all running the same iOS version (18.0.1).

Here's the breakdown: Successful discovery: iPhone 11, iPhone 14 Plus, iPhone 6s No discovery: iPhone 13, iPhone 12 mini Firmware: The TCU firmware is up-to-date. BLE: Bluetooth is enabled on all devices.

I've tried basic troubleshooting like restarting devices and resetting network settings, but the issue persists. Could this be related to differences in Bluetooth chipsets or antenna designs between iPhone models, even with the same iOS version? Are there any known compatibility issues between this TCU and specific iPhone models?

Any insights or suggestions for further debugging issue would be greatly appreciated!

While different chipsets and antenna designs can definitely be a factor, I would suppose app and iOS device state can also be a factor, and a bigger one at that.

But in any case, difficulties in discovery mostly lie in the advertising. If you are having difficulties with discovery when the app is not active in the foreground, then the issue is very likely with the advertising interval, and to some extent with which advertising packet (ADV_INT or SCAN_RSP) the scanned for service, or any other properties you might be filtering on within the didDiscover() callback.

So, the questions you need to ask and consider in your debugging efforts are:

  • is this problem occurring when the app is in the foreground or the background, or with the iPhone locked?
  • is the device advertising at one of the recommended rates (20 ms, 152.5 ms, 211.25 ms, 318.75 ms, 417.5 ms, 546.25 ms, 760 ms, 852.5 ms, 1022.5 ms, 1285 ms)
  • if it is advertising slower than 20ms, are you waiting long enough (30 seconds to several minutes) for the discovery, especially if the app is in the background or the screen is off
  • assuming the scan parameters are identical between the versions of the app running on all the devices, are you making sure didDiscover() is not called, rather than being called but you have code that checks for certain properties and returns without "discovering'
  • if you are indeed checking for properties, what advertising packet are those carried on?
  • if the TCU is not advertising fast enough, are you waiting long enough? Especially when the app is in the background it will take a lot longer

Argun Tekant /  DTS Engineer / Core Technologies

@Engineer (Argun Tekant ) Thank you for the detailed response and suggestions!

Here's some additional information based on your questions:

** App State: I've observed this issue consistently when the app is in the foreground. It seems that background operation isn't a factor here.

** Scanning Duration: I've extended the scanning duration well beyond a minute in my app's code, but the didDiscover() callback is still not being triggered for the TCU on the iPhone 13 and 12 mini.

** Third-Party Scanners: Interestingly, I've tested with 3-4 different third-party BLE scanner apps, and they also fail to discover the TCU on the iPhone 13 and 12 mini, while successfully detecting it on the iPhone 11, 14 Plus, and 6s. This seems to indicate a broader compatibility issue, potentially related to the Bluetooth hardware or software on those specific iPhone models.

To further investigate, I'll try to gather information about the TCU's advertising interval and packet structure. Could you provide any guidance on how to obtain this information if it's not readily available in the TCU's documentation?

I'll keep the thread updated with my findings. Any further suggestions would be greatly appreciated!

If the issue is happening when the app is in the foreground, the TCU would have to be advertising quite out of spec for this to be an issue. While it would be still helpful to find out specific details about the device, I think we should have our Bluetooth team to take a look as well.

To that end, we will need some diagnostic logs. Please go to https://developer.apple.com/bug-reporting/profiles-and-logs/ and follow the instructions for Bluetooth for iOS to install a logging profile on your device.

Then, once the logging profile is installed:

  • reproduce the problem, keeping track of the actual time of the actions you take and the result you see.
  • please have your app use os_log() statements to indicate what CoreBluetooth actions it is taking
  • also include a sniffer log of the same if you have one. Please include the actual log, and an ASCII export of it from the logger.
  • make sure there aren’t any extraneous BLE devices around, and no other apps are trying to connect to some other BLE device while you are conducting this test.

Once the problem is reproduced, follow the instructions at the above link to trigger a sysdiagnose

Please also let us know the BLE hardware you are using, along with specific hardware model and firmware version info.

What would also help is if you can provide a sample project which builds, that focuses on reproducing the problem. Please do not send your existing entire code base. This way we can follow together through code and try to determine what breaks when.

Once you have all this ready, file a bug report at https://developer.apple.com/bug-reporting

Once you do that, please share the Feedback ID here


Argun Tekant /  DTS Engineer / Core Technologies

BLE Device Discovery Inconsistent Across iPhone Models with Same iOS Version
 
 
Q