Other Parts Discussed in Thread: CC2652R7
Hello,
I have two LP-CC2652R7, one as a Border Router and one as a CoaP node. The node successfully join the network, and I would like to print the network key being used after connection. I found some functions, and especially, I use ApiMac_mlmeGetSecurityReqStruct. Here is its description:
The MAC key entry, an entry of the key table.
To GET or SET to this attribute, setup the keyIndex
field of ApiMac_securityPibKeyEntry_t, call
ApiMac_mlmeGetSecurityReqStruct() or ApiMac_mlmeSetSecurityReqStruct()
with a pointer to the ApiMac_securityPibKeyEntry_t structure.
For the GET, the rest of the fields will contain the required data.
What I do for now :
ApiMac_securityPibKeyEntry_t key; key.keyIndex = 0; ApiMac_mlmeGetSecurityReqStruct(ApiMac_securityAttribute_keyEntry , &key); tr_info(" key ? :"); for(uint8_t i = 0; i<16; i++){ tr_info("0x%02x ", (key.keyEntry[i])); }
I assume it is not the way to print the final network key actually being used, because it prints me 0xFFFFFFFFFFF etc but it is to show what I want to do.
How can I do so acheive this please?
Thank you for your help
Best regards