Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Dark

Collapse
SHARUR
Community Wiki DLMS/COSEM Tools
Search Sign in

Handling DLMS Push Setup (Class 40) DataNotification APDU with TCP Wrapper on Port 4059

Scheduled Pinned Locked Moved General Discussion
push-setupclass-40data-notificatitcp-wrapperhes
3 Posts 3 Posters 13 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
  • M Offline
    M Offline
    marcus_vance
    wrote on last edited by
    #1

    Architecture & Implementation

    In modern smart metering deployments, meters autonomously push alarm events and hourly load readings using COSEM Class 40 (Push Setup) and Class 41 (Data Notification), instead of relying on round-robin polling from the Head-End System.

    Push APDU Format over TCP Wrapper (Port 4059)

    00 01 00 01 00 01 00 28 0F 00 00 00 01 00 00 01 02 02 09 0C 07 EA 08 16 ...
    

    Wrapper Header Analysis (8 bytes)

    • 00 01: Protocol Version (0x0001 for DLMS TCP Wrapper)
    • 00 01: Source WPort (Meter Logical Client ID)
    • 00 01: Destination WPort (HES Receiver Server ID)
    • 00 28: PDU Length (40 bytes)
    • 0F: APDU Tag -> Data-Notification (Tag 0x0F / 15)

    Key Considerations

    1. Unsolicited Connection Management: The HES TCP server must maintain asynchronous socket listeners capable of handling thousands of simultaneous incoming TCP connections without blocking.
    2. Association Context: Push notifications are often sent without full AARQ authentication handshake. The meter uses predefined ciphering parameters (General-Ciphering 0xDB or General-Signing 0xDF) with Dedicated Encryption Key (DEK).
    1 Reply Last reply
    0
    • S Offline
      S Offline
      sarah_jenkins
      wrote on last edited by
      #2

      When parsing the push_object_list in Attribute 2 of the Push Setup object, ensure your server dynamically deserializes the structure array. Typical push payload includes:

      1. Logical Device Name (0.0.42.0.0.255)
      2. Timestamp (0.0.1.0.0.255)
      3. Active Energy Import (+A) (1.0.1.8.0.255)
      4. Active Power (+P) (1.0.21.7.0.255)

      If the meter firmware adds an alarm code into the push list, dynamic schema decoding prevents parsing crashes.

      1 Reply Last reply
      0
      • A Offline
        A Offline
        alex_turner
        wrote on last edited by
        #3

        For encrypted Push notifications (0xDB tag), the HES receiver must extract the System Title and Invocation Counter from the ciphered APDU header, lookup the corresponding Global Unicast Encryption Key (GUEK) in the HSM / Key Vault, and decrypt using AES-GCM-128.

        1 Reply Last reply
        0

        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

        With your input, this post could be even better 💗

        Register Login
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        Powered by NodeBB Contributors
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups