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.

Compiler/CC2640R2F: how to get IRK Informatins

Part Number: CC2640R2F


Tool/software: TI C/C++ Compiler

I use the CC2640R2F chip as a BLE peripheral role. When it is connected, paired and bond. How do I get the IRK/RPA information?

  • I suppose you can call GAP_GetIRK to get IRK and read rpa[B_ADDR_LEN] to get RPA.

  • Hi,

    Thanks YK Chen,

    I met the question that how to enable RPA as peripheral role when use CC2640R2F chip,and scan the device.

    after initial Gap protocol,I call GAP_ConfigDeviceAddr(ADDRMODE_PRIVATE_RESOLVE, NULL) to enbale RPA after disable Adv, and know enable RPA successfully from UART information,but I can't scan the device by sniffer or cellphone without adv.

    the RPA codes are as follows:

    static void enablePeripheralRpa(uint8_t *adv,uint8_t len)
    {
      uint8_t initialAdvertEnable = FALSE;
        // Set the Peripheral GAPRole Parameters

      GAPRole_SetParameter(GAPROLE_ADVERT_ENABLED, sizeof(uint8_t),
      &initialAdvertEnable);

      uint8_t status = GAP_ConfigDeviceAddr(ADDRMODE_PRIVATE_RESOLVE, NULL);
      if (status != SUCCESS)
      {
          SDITask_PrintfToUART("%s\r\n", "set random adddres failed");
      }else{
          SDITask_PrintfToUART("%s\r\n", "set random adddres success!!!");
      }
      delay_ms(100);
      initialAdvertEnable = TRUE;
      GAPRole_SetParameter(GAPROLE_ADVERT_ENABLED, sizeof(uint8_t),
      &initialAdvertEnable);
      SDITask_PrintfToUART("%s\r\n", "Before enable RPA,Need disable Adv,then enable RPA ,then enable adv");
    }