feat: Implement EZSP v13 SecurityManager API#1479
Merged
cdjackson merged 1 commit intoApr 5, 2026
Merged
Conversation
EZSP v13 (EmberZNet 7.4 / Gecko SDK 4.4) removed 12 legacy security commands and replaced them with a new SecurityManager API. PR zsmartsystems#1413 bumped EZSP_MAX_VERSION to 13 but did not implement the replacement commands, causing all key management operations to silently fail on EZSP v13 firmware. This commit adds: New data structures: - EzspSecurityManagerKeyType enum - EzspSecurityManagerContext struct - EzspSecurityManagerNetworkKeyInfo struct - EzspSecurityManagerApsKeyMetadata struct New EZSP command classes (11 Request/Response pairs): - exportKey (0x0114) - replaces getKey - importKey (0x0115) - replaces setKeyTableEntry - secManImportTransientKey (0x0111) - replaces addTransientLinkKey - secManExportTransientKeyByEui (0x0113) - replaces getTransientLinkKey - secManExportTransientKeyByIndex (0x0112) - secManExportLinkKeyByEui (0x010D) - secManExportLinkKeyByIndex (0x010F) - secManImportLinkKey (0x010E) - secManCheckKeyContext (0x0110) - secManGetNetworkKeyInfo (0x0116) - secManGetApsKeyInfo (0x010C) Version-conditional routing in EmberNcp: - getKey() detects EZSP v13+ and routes to exportKey - addTransientLinkKey() detects v13+ and routes to secManImportTransientKey Backwards compatible: EZSP v4-v12 paths are unchanged. Fixes zsmartsystems#1411 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Member
|
Thanks Abid. One thing to note - I plan to deprecate this EZSP driver after EZSP13. I think I've already pushed the branch with the new driver (called Silabs) - I'll port over this change when I get a chance (maybe next week). The reason for the change is that Silabs made some significant changes to the protocol - small change, but hard to maintain compatibility... In general everything remains the same, but upgraded for v14, and I'm hoping also to add a few enhancements that were difficult to back port into the exisiting driver... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
EZSP v13 (EmberZNet 7.4 / Gecko SDK 4.4) removed 12 legacy security commands and replaced them with a new SecurityManager API. PR #1413 bumped
EZSP_MAX_VERSIONto 13 but did not implement the replacement commands, causing all key management operations to silently fail on EZSP v13 firmware.Observed symptoms on EZSP v13:
getZigBeeNetworkKey()returns null (network key invisible)getZigBeeLinkKey()returns null (link key invisible)addTransientLinkKeyfails silently)Changes
New data structures (4 files)
EzspSecurityManagerKeyType— enum for SecurityManager key typesEzspSecurityManagerContext— context struct for SecurityManager operationsEzspSecurityManagerNetworkKeyInfo— network key info structEzspSecurityManagerApsKeyMetadata— APS key metadata structNew EZSP command classes (22 files — 11 Request/Response pairs)
exportKeygetKey(0x6A)importKeysetKeyTableEntry(0x72)secManImportTransientKeyaddTransientLinkKey(0xAF)secManExportTransientKeyByEuigetTransientLinkKey(0xCE)secManExportTransientKeyByIndexgetTransientKeyTableEntry(0x6D)secManExportLinkKeyByEuigetKeyTableEntryby EUI (0x71)secManExportLinkKeyByIndexgetKeyTableEntryby index (0x71)secManImportLinkKeyaddOrUpdateKeyTableEntry(0x66)secManCheckKeyContextsecManGetNetworkKeyInfosecManGetApsKeyInfoVersion-conditional routing (2 file edits)
EmberNcp.getKey()— detects EZSP v13+ and routes toexportKeyEmberNcp.addTransientLinkKey()— detects v13+ and routes tosecManImportTransientKeyEzspFrame.java— registered all 11 new frame IDs and handler map entriesBackwards compatible
EZSP v4-v12 code paths are completely unchanged. The version check uses
EzspFrame.getEzspVersion() >= 13.References
Test plan
mvn compile— 422 source files, 0 errors)cc @cdjackson