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.

LAUNCHXL-CC2640R2: Did not ask Passcode

Part Number: LAUNCHXL-CC2640R2

Hi,

I am running 'Multi-role' project on CC2640R2 LaunchPad.

I can use a BLE applications on my iPad to connect to the board.

However, I was never asked a 'Passcode' when I tried to make the connection.

I saw the code for Passcode:

static void multi_role_processPasscode(gapPasskeyNeededEvent_t *pData)
{
  // Use static passcode
  uint32_t passcode = 123456;
  Display_print1(dispHandle, MR_ROW_SECURITY, 0, "Passcode: %d", passcode);
  // Send passcode to GAPBondMgr
  GAPBondMgr_PasscodeRsp(pData->connectionHandle, SUCCESS, passcode);
}

I used a debugger to put a breakpoint inside this function and it never got hit.

How can I make the code to ask the 'Passcode' to the iPad application?

Thanks,

Steven

  • I used two different iPad BLE applications, Light Blue and TI SimpleLink Starter. Neither one got the 'Passcode' request.
  • I am using CCS8.3 with simplelink_cc2640r2_sdk_2_40_00_32 and I am not able to reproduce what you are seeing.
    Can you double check your compiler version?
    You can find information regarding compiler version here:
    dev.ti.com/.../developing_in_ccs.html
  • Hi,

    Thanks for the reply.

    I am also using CCS8.3 with simplelink_cc2640r2_sdk_2_40_00_32.

    I looked at the my CCS Installation Details and attaches a screen capture here .

    What compiler version are you using? BTW, I am using Windows 10 with Lenovo Laptop.

    I looked at the release note:

    SimpleLink CC2640R2 SDK 2_40_00_32 was built & tested on a Windows host platform using the following Integrated Development Environments (IDEs) and components. Using an IDE or toolchain version not listed below may result in compatibility issues with this SDK release.

    Any suggestion?

    Thanks,

    Steven

  • Hi,
    On the release notefor SDK 'simplelink_cc2640r2_sdk_2_40_00_32', it states the test is for "TI Code Generation Tools for ARM: 8.1.4.LTS".

    My CCS ARM Compiler Tools is: 18.1.5.

    Is this correct version?

    Thanks,

    Steven
  • Hi,
    More information:

    The following code did get call during bootup stage. The breakpoint was triggered.
    *****************************************************
    static void multi_role_processPasscode(gapPasskeyNeededEvent_t *pData)
    {
    // Use static passcode
    uint32_t passcode = 123456;
    Display_print1(dispHandle, MR_ROW_SECURITY, 0, "Passcode: %d", passcode);
    // Send passcode to GAPBondMgr
    GAPBondMgr_PasscodeRsp(pData->connectionHandle, SUCCESS, passcode);
    }
    ************************************************************

    However, I was never asked a 'Passcode' when I tried to make the connection from iPad application.
    How can I make this happen: Ask for 'Passcode' on the iPad application?

    Thanks,

    Steven
  • Can you attach sniffer log?
    can you reproduce it using phones?

    Can you specify the iOS and iPad version?
  • Hi Christin,

    I don't have a BLE Sniffing device right now?

    Yes, my Android phone had the same problem.

    I used two differ iPad, iPad 5 (iOs version 12.1.4) and iPad 2017 (iOs version 12.1.1).

    In this version of mine, I changed the predefined symbol 'MAX_NUM_BLE_CONNS' from 1 to 3 since I wanted my board to be able to do 'Advertising' when there were still connections.

    More information: 

    Yesterday, I used a different computer (windows 10) to import a fresh new 'Multi-role' project. Did not make any change and tried.

    In the first few times, the iPad did pop-up 'Password' window and I had to enter the passcode, 123456. But, after a few time, it never asked anymore. I could access all BLE data on the LaunchPad immediately.

    Thanks,

    Steven

  • If you already paired and bonded with a device the first time, then you don't need to pair and bond again.
    What you see there is expected result and it's how it supposed to be.
    For more information please take a look at our SimpleLink Academy BLE Security Training Module
    dev.ti.com/.../
  • Hi,

    Thanks for the reply. I read your link and understand much better now.

    Do you have a way to clean the Paired and Bonding cache so the Passcode will be asked every time when I try to connect to the LaunchPad?

    Thanks,

    Steven

  • For iOS device, you need to do to settings-->Bluetooth -->MY DEVICES

    then click on the ! and then tap forget this device.

    If you want to do it in the LP, then you can disable bonding.Modify the bonding parameter to false. Then it will not save any information after pairing.

        GAPBondMgr_SetParameter(GAPBOND_BONDING_ENABLED, sizeof(uint8_t), &bonding);

  • Hi Christin,

    Thanks for the reply.

    I tried the tasks on your link: dev.ti.com/.../

    It worked.

    Based on your link, I also tried your suggestion. It did ask me the password when I tried to access the 'encrypt' Char. value.

    But, I still got in immediately when I got connected to the LP.

    In other words, GATT encryption worked as expected. But, I still did NOT see the password pop-up window when my iPad tried to connect to the LP.

    How can I make this happen?

    BTW, I also did your suggestion to let iPad forget my LP BLE device.

    Thanks,

    Steven

  • I am not following what you are saying here:
    You first said "It did ask me the password when I tried to access the 'encrypt' Char. value." and then you said "I still did NOT see the password pop-up window when my iPad"
    Can you provide more detail? Are you talking about different devices?

    Your iPad has never managed to ask you for the passcode?
  • Hi Christin,

    In the project that you provided the link: dev.ti.com/.../

    When the iPad application tried to connect to the LP, it was never asked passcode. Instead, iPad application would be asked the passcode when it tried to access the 'encrypted' Characteristic Value (see the Task 2 and 3 in the above project link) in the same LP.

    My 'multi-role' project performed the same.

    In other words, my iPad was never asked passcode when it connected to the LP. But, when it tried to access the Characteristic Value with 'GATT_PERMIT_ENCRYPT_READ' permission in the same LP, it would be asked the passcode.

    Thanks,

    Steven

  • Hi,

    After some investigation, it appears to be that iOS device will do it this way. It's still following the spec. There is nothing we can do from embedded device side.