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

iOS BLE not showing passcode popup

Hi Guys,

I need to connect to a BLE device using NRF52480 using passcode (6 digit pincode)

on Android it works just fine, I attempt to connect and displays the popup for entering the code.

on iOS nothing happens, I can only see the UART service and cannot connect.. I also tried to read, write, subscribe to the cccd but nothing happens.

I have tried to discover services but I cannot because I am not connected... (see logs below)

I have searched everywhere and in all related question in Nordic Q&A forum and couldn't find any solution for my issue.
I have also checked the glucose example you provided and it failed.

This is very urgent for my company and I need to get this working ASAP. Please help me

I am using iPhone 11 with iOS 14.4

Is there a specific configuration that you know of that I need to set in the peripheral in order for it to work? I have tried a lot of combinations with no success.

I get the following errors on the mobile side:


discoverServices, ERROR: PlatformException(flutter_reactive_ble.Central.(unknown context at $1079e3cf0).Failure:1, The operation couldn’t be completed. (flutter_reactive_ble.Central.(unknown context at $1079e3cf0).Failure error 1.), {}, null)


flutter: readCharacteristic, err: Exception: GenericFailure<CharacteristicValueUpdateError>(code: CharacteristicValueUpdateError.unknown, message: "A peripheral F4A9ECC7-D985-E28A-18F6-9C35F931679A is unknown (make sure it has been discovered)")


flutter: readCharacteristic, err: Exception: GenericFailure<CharacteristicValueUpdateError>(code: CharacteristicValueUpdateError.unknown, message: "A peripheral F4A9ECC7-D985-E28A-18F6-9C35F931679A is unknown (make sure it has been discovered)")

Best regards,

Asaf

  • In addition - when replacing all the services in Glucose example with one NUS service - it doesn't work anymore

  • Hi Edvin - issue is solved.

    The problem was that the case of BLE_GAP_EVT_PHY_UPDATE_REQUEST event was under #ifdef S140, so it was a disabled code.

    Can you please explain what is the propose of this code, and how did it work with Android?

    Another fix was setting SEC_PARAM_MITM and SEC_PARAM_LESC to 1, and SEC_PARAM_IO_CAPABILITIES to BLE_GAP_IO_CAPS_DISPLAY_ONLY. Again - I can't understand how did it work with Android.

    Finally - under nfc_ble_pair_lib.c file - I had to set m_sec_param.mitm to 1, under case NFC_PAIRING_MODE_LESC_JUST_WORKS and NFC_PAIRING_MODE_LESC_OOB, even though I don't think it's the right thing to do, but it's the only way to fix that.

    Can you please give me your inputs regarding the fixes? Can I do something else regarding the last one?

    Thanks!! 

  • This is a bit outside the topic of the issue in this post. Probably, the reason that it behaved different was because one phone requested 2MBPS, and the other one didn't. 

     

    Roei said:
    I had to set m_sec_param.mitm to 1, under case NFC_PAIRING_MODE_LESC_JUST_WORKS

    Why are you using the NFC pairing file? Note that you didn't mention NFC until now. NFC is an OOB in itself, so it wouldn't typically prompt a passkey. I suggest you fetch your inspiration from the ble_app_gls example, which requires a passkey.

    Best regards,

    Edvin

  • Ok,

    Can you please tell me about BLE_GAP_EVT_PHY_UPDATE_REQUEST? What does it do and what is the reason that Android didn't require that?

    Thanks for your help!

  • That is also outside this topic, but it is a request to change the PHY (physical layer) from the default 1MBPS and probably to 2MBPS. It gives a more efficient link with higher throughput. As long as the devices are fairly close, it also gives a lower power consumption, because it spends less time on the radio transmitting the same amount of data.

Related