AnsweredAssumed Answered

ZBPro Configuration JN-AN-1218

Question asked by youpko on Mar 16, 2019
Latest reply on Apr 8, 2019 by Mario Ignacio Castaneda Lopez

I tried to connect the JN-AN-1218 to a Philips Hue bridge but it didn't work because I never specified the necessary keys.

I have since found where the keys need to be placed.

I have to edit zps_gen.c (row 575)

PRIVATE ZPS_tsAplApsKeyDescriptorEntry s_keyPairTableStorage[4] = {
    { 0, 0xFFFF, { }  },
    { 0, 0xFFFF, { }  },
    { 0, 0xFFFF, { 0x5a, 0x69, 0x67, 0x42, 0x65, 0x65, 0x41, 0x6c, 0x6c, 0x69, 0x61, 0x6e, 0x63, 0x65, 0x30, 0x39}  },
    { 0, 0xFFFF, { 0x81, 0x42, 0x86, 0x86, 0x5D, 0xC1, 0xC8, 0xB2, 0xC8, 0xCB, 0xC5, 0x2E, 0x5D, 0x65, 0xD1, 0xB8}  },
};
ZPS_tsAplApsKeyDescriptorEntry  *psAplDefaultDistributedAPSLinkKey = &s_keyPairTableStorage[2];
ZPS_tsAplApsKeyDescriptorEntry  *psAplDefaultGlobalAPSLinkKey = &s_keyPairTableStorage[3];

 

My first question is how to do this in the app.zpscfg with the configuration tool.

I tried to add the keys (increased the APS Key table size to 2):

Zigbee Pro->Router "DimmableLight"->APS

and add 2 children (Preconfigured Key) with the key as value.(dont know why it also ask for a IEEE Address)


But that generates some invalid code in zps_gen.c (wont compile due to the errors):

PRIVATE ZPS_tsAplApsKeyDescriptorEntry s_keyPairTableStorage[5] = {
    { 0x0000000000000000ULL, { 0x39, 0x30, 0x65, 0x63, 0x6e, 0x61, 0x69, 0x6c, 0x6c, 0x41, 0x65, 0x65, 0x42, 0x67, 0x69, 0x5a }, 0 , 0 , 0 },
    { 0x0000000000000000ULL, { 0xb8, 0xd1, 0x65, 0x5d, 0x2e, 0xc5, 0xcb, 0xc8, 0xb2, 0xc8, 0xc1, 0x5d, 0x86, 0x86, 0x42, 0x81 }, 0 , 0 , 0 },
    { 0, 0xFFFF, { }  },
    { 0, 0xFFFF, { }  },
    { 0, 0xFFFF, { }  },
};
ZPS_tsAplApsKeyDescriptorEntry  *psAplDefaultDistributedAPSLinkKey = &s_keyPairTableStorage[3];
ZPS_tsAplApsKeyDescriptorEntry  *psAplDefaultGlobalAPSLinkKey = &s_keyPairTableStorage[4];

As you can see the key is in the wrong place and there are trailing zero's that shouldn't be there.

And the &s_keyPairTableStorage[3] and &s_keyPairTableStorage[4] point to empty keys.

They should point to &s_keyPairTableStorage[0] and &s_keyPairTableStorage[1] 

 

How do I put the keys in the correct place using the configuration tool?

Outcomes