Skip to main content
Open topic with navigation CAPL Functions » Smart Charging » SCC Modeling Libraries (Simulation Setup) » SLAC Test Functions » Shared Functions » SCC_CreateCM_Set_Key_Req

SCC_CreateCM_Set_Key_Req

Valid for:  CANoe DE •  CANoe4SW DE

Function Syntax

void SCC_CreateCM_Set_Key_Req ( byte SourceMac[], byte TargetMac[], byte NID[], byte NMK[] )

Description

Creates a CM_Set_Key.Req message for sending.

Parameters

  • SourceMac: Source address of the Ethernet packet.
  • TargetMac: Destination address of the Ethernet packet.
  • NID: Network ID given by the CCo (EVSE) (7 byte).
  • NMK: NMK to be set (16 byte).

Additional Parameters

  1. KeyType (dword):
    • 0x00 = DAK (AES-128)
    • 0x01 = NMK (AES-128)
    • 0x02 = NEK (AES-128)
    • 0x03 = TEK (AES-128)
    • 0x04 = Hash Key (Random-3072)
    • 0x05 = Nonce Only (no key)
    • 0x06-0xFF = Reserved
  2. MyNonce (byte[]): 4 byte random number.
  3. YourNonce (byte[]): Last received nonce (4 byte).
  4. PID (dword): Protocol ID.
  5. PRN (byte[]): Protocol Run Number (2 byte).
  6. PMN (dword): Protocol Message Number.
  7. CCoCapability (dword): STA’s CCo Capability.
  8. NewEKS (dword): PEKS or EKS.

Return Values

Example