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.

ZDSECMGR_TC_DEVICE_MAX in znp-host-framework

Other Parts Discussed in Thread: Z-STACK, CC2531

Hi,

How to set the number of devices (ZDSECMGR_TC_DEVICE_MAX) in znp host framework?

Regards

Srikanth

  • ZDSECMGR_TC_DEVICE_MAX is a compile time option.

    Starting on line 79 in ZDSecMgr.c you'll find the following,

    #if !defined ( ZDSECMGR_TC_DEVICE_MAX )
      #define ZDSECMGR_TC_DEVICE_MAX 1
    #endif

    Alternatively you can add ZDSECMGR_TC_DEVICE_MAX to the preprocessor defined symbols list

  • Hi Jason,

    ZDSecMgr.c is there only in z-stack. I couldn't find the equivalent of ZDSECMGR_TC_DEVICE_MAX in znp-host framework. How does znp know the number of devices configured in memory?

    Regards

    Srikanth

  • Do you intend to know ZDSECMGR_TC_DEVICE_MAX from ZAP?
  • I want to configure IEEE address and TC Link Keys of devices that will be there on my network. In case of z-stack we define ZDSECMGR_TC_DEVICE_MAX. In this case, i'm just wondering how znp will know number of devices configured.
  • If you need to know ZDSECMGR_TC_DEVICE_MAX in ZNP, you can add a global variable and assign it equal to ZDSECMGR_TC_DEVICE_MAX. In this way, you can read this global variable in ZNP to know ZDSECMGR_TC_DEVICE_MAX value.
  • But, how to make the znp read global variable ZDSECMGR_TC_DEVICE_MAX
    I'm using CC2531ZNP-Pro-Secure_LinkKeyJoin.hex in my ZNP
  • I mean you have to modify the znp source code using global variable to read ZDSECMGR_TC_DEVICE_MAX
    and rebuild your own CC2531ZNP-Pro-Secure_LinkKeyJoin.hex
  • can you please give the location of znp source code
  • ZNP source code is located under Z-Stack installed folder/Project/ZStack/ZNP.
  • Will I get the equivalent of CC2531ZNP-Pro-Secure_LinkKeyJoin.hex if I compile CC2531 ProdHex project?
  • Yes, although mind the defined symbols list. The default configuration may not be what you need for your application.
  • If you set SECURE=1 and define TC_LINKKEY_JOIN to ZNP example, it should be the same.
  • What is the default ZDSECMGR_TC_DEVICE_MAX and security configuration (global, unique) defined in CC2531ZNP-Pro-Secure_LinkKeyJoin.hex
  • The default ZDSECMGR_TC_DEVICE_MAX is 1 and I had replied how to do security settings to build CC2531ZNP-Pro-Secure_LinkKeyJoin.hex. Maybe Jason can help to verify this.
  • In znp-host-framework (using CC2531ZNP-Pro-Secure_LinkKeyJoin.hex), I experimented by with different NV ID locations (0x01a1 in below settings). Each time end device is able to join the network. How can it happen if default ZDSECMGR_TC_DEVICE_MAX is 1.

    nvWrite.Id = ZCD_NV_USE_DEFAULT_TCLK;
    nvWrite.Offset = 0;
    nvWrite.Len = 1;
    nvWrite.Value[0] = 0;
    status = sysOsalNvWrite(&nvWrite);

    nvWrite.Id = 0x01a1;
    nvWrite.Offset = 0;
    nvWrite.Len = 32;
    nvWrite.Value[0] = 0x9C;
    nvWrite.Value[1] = 0xCE;
    nvWrite.Value[2] = 0x17;
    nvWrite.Value[3] = 0x05;
    nvWrite.Value[4] = 0x00;
    nvWrite.Value[5] = 0x4B;
    nvWrite.Value[6] = 0x12;
    nvWrite.Value[7] = 0x00;
    nvWrite.Value[8] = 0x02;
    nvWrite.Value[9] = 0x02;
    nvWrite.Value[10] = 0x02;
    nvWrite.Value[11] = 0x02;
    nvWrite.Value[12] = 0x02;
    nvWrite.Value[13] = 0x02;
    nvWrite.Value[14] = 0x02;
    nvWrite.Value[15] = 0x02;
    nvWrite.Value[16] = 0x02;
    nvWrite.Value[17] = 0x02;
    nvWrite.Value[18] = 0x02;
    nvWrite.Value[19] = 0x02;
    nvWrite.Value[20] = 0x02;
    nvWrite.Value[21] = 0x02;
    nvWrite.Value[22] = 0x02;
    nvWrite.Value[23] = 0x02;

    nvWrite.Value[24] = 0x00;
    nvWrite.Value[25] = 0x00;
    nvWrite.Value[26] = 0x00;
    nvWrite.Value[27] = 0x00;
    nvWrite.Value[28] = 0x00;
    nvWrite.Value[29] = 0x00;
    nvWrite.Value[30] = 0x00;
    nvWrite.Value[31] = 0x00;

    status = sysOsalNvWrite(&nvWrite);
  • I would like to reconfirm the difference between default znp-hex files in ZAP folder and the compilation output of CC2531 ProdHex after refering to this post e2e.ti.com/.../353054

    According to above post both are different ( "The ZNP Images delivered with the Home Automation Gateway are different from the ones that you would build from the current Z-Stack Home - 1.2 installer. ").
  • Yes, the ZNP Images delivered with the Home Automation Gateway are different from the ones that you would build from the current Z-Stack Home.
  • In this case, what are the features that are there in CC2531ZNP-Pro-Secure_LinkKeyJoin.hex that will be missed in compiled hex file?
    Also, if TI doesn't want to share the exact source files for generating CC2531ZNP-Pro-Secure_LinkKeyJoin.hex, do they enable any feature to set number of TC link key devices?
  • The source files are the same. To get CC2531ZNP-Pro-Secure_LinkKeyJoin.hex, you have to set SECURE=1 in f8wconfig.cfg and define TC_LINKKEY_JOIN in compile option of CC2531ZNP-Pro project.