This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

iOS13 Compatibility

I'm just finishing a BLE project for a client. The code is based primarily on examples\ble_central_and_peripheral\experimental\ble_app_att_mtu_throughput. I'm using SDK 15.3.0. The host is a BMD-300 module incorporating a nRF52832.

It works fine with nRF Connect on the PC desktop and either a nRF52 or nRF52840 DK. It works fine with nRF Connect on Android. We don't have Apple resources, but our customer reports that it works with iPhones running iOS earlier than version 13. With iOS13, most of the time they can't see it advertising, and on the rare occasions when they do, they can't connect.

I've got the Apple Accessory Design Guidelines, but it's a stiff slog through the BLE section. The Number 1 Question is: Does Nordic have an iOS compatibility guide or blog post? It isn't just popping right up on the website.

I've looked at examples\ble_peripheral\ble_app_ancs_c as something that should work with Apple. Is there a more appropriate example to look at for working with iOS13? I've corresponded with the US field engineer; he has tried the ANCS example from both SDK 15.3.0 and 17.0.2 running on a nRF52840-DK, and his iOS13 phone does not see advertising.

a. I get that Apple is picky about advertising intervals. Got that; easy. The ANCS doesn't seem to bother (2.0 seconds, versus the listed largest 1.285 seconds in the Apple guide).
b. I should send the UUID for my proprietary service? Given that it is proprietary, should I send the entire 128-bit version or is the 16-bit version (bytes 13 & 14) adequate?
c. There were some remarks in a six-year-old DevZone trace about Apple "pairing" really being "bonding", and something about not initiating bonding until getting an ATT Insufficient Authorization response. I don't see this in the ANCS example, and my program currently does pairing without bonding. The Apple guide seems to indicate bonding is optional (section 35.10).  I'm guessing this is not an issue if iOS devices earlier than 13 can connect.
d. There was another remark in a more recent DevZone post about nRF Connect possibly not working right on iOS and we should try LightBlue.

  • This was weird yes. Looks like even the default examples fails in his case.

    Are we sure that the peripheral examples are advertising? I am thinking his hardware might have been previously used with central devices that have bonded and paired with the hardware he is using, typically if these central devices are still in the area they would immediately connect since they believe they are still in a "relationship" with the hardware. Also, if you support bonding in the peripheral device, then the peripheral device may also enable whitelisting (this would prevent other peers to connect even if advertisement was visible).

    In general you may find chapter 36 useful for iOS in specific:
    https://developer.apple.com/accessories/Accessory-Design-Guidelines.pdf

    To comment on your questions:

    1. This will only influence discovery time, not that it's not visible or not able to connect.

    2. For proprietary you need the entire 128-bit UUID yes.

    3. This would not explain why it is not visible in nRF Connect app, since this only affect what happens while in a connection.

    4. I am not aware of any issue, but trying Lightblue is worth a try in any case.

  • Our client loaned us an iPhone8, and I put nRF Connect on it.  I got a nRF52-DK and built and loaded the ANCS example.  I _do_ see the ANCS advertising, and can get through all the steps of the example.  I will poke our US field engineer with what I did.

    I also tried to follow the example instructions using another nRF52-DK talking to nRF Connect running on the desktop.  The docs state that after loading the ANCS_central.ncs setup file, I should be able to set some characteristics to send to the example.  I don't see these characteristics.  In fact, looking at this file, I should see a ANCS service with several characteristics.  I don't see any effect in nRF Connect from loading this server setup file.

    Further, when I'm looking at the devices scanned by nRF Connect on either iPhone or desktop, I see several devices.  Some report a "Services" with a 16-bit or 128-bit number, and some of those report a "Service Data" with another 16-bit number and a series of bytes.  I can see in the ANCS project that the service UUID is being included in the advertising packet, but nRF Connect isn't reporting any info.

Related