This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

iPhone7 + nrf52 + SDK12/s132 doesn't connect

I have an odd situation. I've been using an iPhone 5 and 6 to connect to, and test against, both an nRF51 (redbear nano) and the same code built for nRF52. It works fine.

Today I provisioned an iPhone 7, with the latest version of ios of course.

And my app works perfectly fine with the nRF51, but it is completely unable to talk with the nRF52.

When I explore using nRF Connect on the iPhone 7, as you'd expect I can see everything perfectly when looking at the nRF51.

But when I explore the nRF52 using nRF Connect, and tap the advertised device, something different happens. On the Service screen, it says "Connected", however there are zero advertised services listed. It is truly bizarre.

Using wireshark I've done a capture - see response.

I am not an expert at on-wire analysis or even wireshark, so I'm hoping that you might be able to suggest what I do to take next steps to debug.

Your thoughts would be appreciated; thanks.

  • couple of things you could try - actually set a long data packet length, set it to 251 bytes, which is what the phone is claiming to support, see if that jerks it out of inactivity.

    One thing to note - wireshark (still) decodes feature bits backwards, so the softdevice is actually reporting LE Security + LE Data Packet Extension, not what wireshark dissects, I've reported this, should have done it years ago, it's been like that since version 1.08 or something.

    Also since the softdevice does support LE Ping I don't know why that flag isn't set - Nordic?

    And finally it's rather odd that the phone starts the Data Length Extension procedure before it checks the features flag, but it doesn't really matter, odd though.

    On the iOS side are you getting the bluetooth Connect callback and starting characteristic discovery, or is the phone not even reporting itself connected?

  • Hi @ray, to help find out where the issue stems from, can you try to connect to the peripheral with any other app than nRF Connect and see if it reproduces ? also it's always a good idea to unpair from that peripheral and toggle airplane mode to flush the BT cache. let me know and we can take it from there

  • Yes, Mostafa. The entire reason I ended up using Ned connect, and using the sniffer, is that it fails in y own app.

    My app, just like nrf connect and nrf toolbox, fails with an incomplete connect.

    And yes I do the toggle to flush but cache as a matter of course during these tests.

  • That's interesting, Will try to get hold of an iPhone 7 to test this out, which version of iOS do you have on the iPhone 6 that worked by the way ?, if it's not 10 , can you try updating one of those iPhones to iOS 10 and see if the issue reproduces then ?, this will help a lot

  • Thanks. Please see remainder of answer in my other comments below.

    The 5s is running 9.3.5, and the 7 is running 10.0.1.

    The iPhone 7 works perfectly against my app when my app is running on nRF51822 hardware with the S130 softdevice.

    The iPhone 7 also works perfectly against my app when my app is running on nRF52832 hardware with the S132 softdevice from SDK11 and compiled using SDK11.

    The iPhone 7 fails only against my app (and nRF Connect, and nRF Toolbox) when my app is running on nRF52832 hardware with the S132 softdevice from SDK12 and compiled using SDK12.

    I could be wrong of course, but even if it is a new behavior introduced by Apple, it looks like a bug that is correctable in the softdevice or SDK.

Related