This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC2640R2L: Problem with IOS pairing and ADCBuffer

Part Number: CC2640R2L

Hello,
I'm having a problem with IOS pairing when I initialize the ADCBuffer.

Overview:
I am using CC2640R2L with "simple_peripheral" example in sdk 5.30.00.03.

Pairing Mode : GAPBOND_PAIRING_MODE_WAIT_FOR_REQ
Characteristic: GATT_PERMIT_AUTHEN_READ

After doing some tests, I have the following result:

When the ADCBuffer is just initialized "ADCBuf_init();" the pairing request is not trigged on IOS and I get an error of " Encryption is insufficient". When I remove the "ADCBuf_init();" pairing works on IOS succesfully.

On Android I do not see any issue, just with iOS. The ADCBuf is breaking something. Do you have some idea to fix that?

  • Hello Gabriel,

    Can you provide me the logs of the error?

    What are the purpose of using the ADCBuffer?

    Does the issue appears on a specific version of iOS? (I'm asking as I'm really wondering how the ADCbuffer could have an impact directly depending the OS of the phone, maybe a clock already used somewhere else)

    regards,

  • Hi Guilherme,

    Can you provide me with the error logs?
    error: Error Domain=CBATTErrorDomain Code=15 "Encryption is insufficient." UserInfo={NSLocalizedDescription=Encryption is insufficient.}

    What is the purpose of using the ADCBuffer?
    I need a certain amount of sample in a shorter time as per the project requirements. ADCBuffer meets the requirements.

    Well that was the same question I asked myself.
    Model: iPhone Xs
    iOS version: 16.3.1

    I am including these two drivers

    Can't pair on IOS

    Can pair on ios

    So I decided to do some more tests
    I typed ADCBuf_init() in the "ADCBuf.c" file to validate that I was actually entering the file:

    Alright, and if I comment it out it should work, but it's giving the same problem.

  • I'm wondering if it could be a memory usage issue. If iOS is using slightly more memory than Android you can face a bug, could you check the memory for both Android and iOS?

    I need to know where you called the function ADCBuf_init(), maybe it's linked to your issue.

    regards,

  • I did some more tests

    Here is the startup sequence:

    main.c

    simple_peripheral.c

    I'm using BLE Scanner on IOS to test the pairing, as soon as it asks for pairing it pops up to enter the password and instantly comes out that it's insufficient encryption error.

    But when I initialize only the ADCBuf or SPI this error does not exist and it appears to enter the password normally.
    However, when I initialize both, I get the insufficient encryption error again.

  • Hi Gabriel,

    Ok so now I recommand you to maybe delayed the initialization of ADCbuf or SPI, it should be an issue of task managing.

    Also why are you calling Task_sleep()  and the infinite loop just after the initialization?

    regards,