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.

CC2640R2F: CC2640R2F: In simple_serial_socket_server, What is the default IRK value?

Part Number: CC2640R2F

Dear TI member:

==== My code enviroment showed as following ====

My SDK version is : 3_40

IDE Tool: CCS 9.1.0

Using Example: examples\rtos\CC2640R2_LAUNCHXL\ble5apps\simple_serial_socket_server

==============================================

I have the following question:

If I use the example and I didn't modify the default mode (Random Device Address-RPA)

What is the default IRK value? Where can I find it?

Thanks!

  • Hi,

    You may want to refer to the following function in the gap.h file:

    /**
     * Get the IRK
     *
     * @warning The memory indicated by the returned pointer should not be modified
     * directly if it is desired to update the IRK. Instead, use the
     * @ref GAP_CONFIG_PARAM_IRK
     *
     * @return  pointer to the 16-byte IRK
     */
    extern uint8_t *GAP_GetIRK(void);
    

    I hope it will help,

    Best regards,

  • Dear TI member:
        Where is the 16 Byte IRK defined? Can we change it?
        I cannot find the value in source code. What is the default value in SDK or in the example?

    Thank you~ 

  • Hi,

    The IRK can be set by the application using the function GapConfig_SetParameter() with the parameter GAP_CONFIG_PARAM_IRK.

    Please refer to the documentation of GAP_CONFIG_PARAM_IRK (in gap.h) for additional details:

      /**
       * @brief Can be used by the application to set the IRK
       *
       * It is not necessary to set this parameter. If it is not set, a random IRK
       * will be generated unless there is a valid IRK in NV.
       *
       * @warning This must be set before calling @ref GAP_DeviceInit
       *
       * The priority is:
       * 1. Set manually with GapConfig_SetParameter before @ref GAP_DeviceInit
       * 2. Previously stored in NV by the gapbondmgr
       * 3. Set randomly during @ref GAP_DeviceInit
       *
       * size: 16 bytes
       *
       * @note The IRK can be read with @ref GAP_GetIRK
       */

    To be clear, in our examples, the application does not set the IRK value. Instead, the IRK is generated (randomly) by the stack. So you will not find any default value for the IRK.

    With all that being said, I ask you to be careful when changing the way the IRK is generated as this could impact privacy.

    Best regards,

  • Dear TI member:
       Thanks for your response. But I have one question.

       The example default is using randomly IRK.

       We install the Android APK named "Bluefruit Connect" in our CellPhone.

       We don't know why the BLE device can be scanned by the Mobile app. Do you know the reason?

       Or this app can scan all "Resolvable Private Address" BLE?

    Thanks!

  • Hi,

    Do you mean the mobile app is able to resolve the BLE address of the device? It should not be possible unless the device get already connected to the phone. 

    If you meant the advertisement shows up in the mobile app (but the BLE address is not resolved), then it is expected behavior. Using RPA doies not prevent the scanner to find the device. The RPA only prevent scanners to resolve the Bluetooth address.

    I hope this will help,

    Best regards,