1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106
|
import bellows.types as t
from ..v12.commands import COMMANDS as COMMANDS_v12
COMMANDS = {
**COMMANDS_v12,
"getNetworkKeyInfo": (
0x0116,
{},
{
"status": t.sl_Status,
"network_key_info": t.SecurityManagerNetworkKeyInfo,
},
),
"gpSecurityTestVectors": (
0x0117,
{},
{
"status": t.EmberStatus,
},
),
"tokenFactoryReset": (
0x0077,
{
"excludeOutgoingFC": t.Bool,
"excludeBootCounter": t.Bool,
},
{},
),
"gpSinkTableGetNumberOfActiveEntries": (
0x0118,
{},
{
"number_of_entries": t.uint8_t,
},
),
# The following commands are redefined because `SecurityManagerContext` changed
"exportKey": (
0x0114,
{
"context": t.SecurityManagerContextV13,
},
{
"key": t.KeyData,
"status": t.sl_Status,
},
),
"exportTransientKeyByEui": (
0x0113,
{
"eui64": t.EUI64,
},
{
"context": t.SecurityManagerContextV13,
"plaintext_key": t.KeyData,
"key_data": t.SecurityManagerAPSKeyMetadata,
"status": t.sl_Status,
},
),
"exportTransientKeyByIndex": (
0x0112,
{
"index": t.uint8_t,
},
{
"context": t.SecurityManagerContextV13,
"plaintext_key": t.KeyData,
"key_data": t.SecurityManagerAPSKeyMetadata,
"status": t.sl_Status,
},
),
"getApsKeyInfo": (
0x010C,
{
"context_in": t.SecurityManagerContextV13,
},
{
"eui": t.EUI64,
"key_data": t.SecurityManagerAPSKeyMetadata,
"status": t.sl_Status,
},
),
"importKey": (
0x0115,
{
"context": t.SecurityManagerContextV13,
"key": t.KeyData,
},
{
"status": t.sl_Status,
},
),
}
del COMMANDS["becomeTrustCenter"] # this one was likely removed earlier
del COMMANDS["getKey"]
del COMMANDS["getKeyTableEntry"]
del COMMANDS["setKeyTableEntry"]
del COMMANDS["addOrUpdateKeyTableEntry"]
del COMMANDS["addTransientLinkKey"]
del COMMANDS["getTransientLinkKey"]
del COMMANDS["getTransientKeyTableEntry"]
del COMMANDS["setSecurityKey"]
del COMMANDS["setSecurityParameters"]
del COMMANDS["resetToFactoryDefaults"]
del COMMANDS["getSecurityKeyStatus"]
|