<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Handling DLMS Push Setup (Class 40) DataNotification APDU with TCP Wrapper on Port 4059]]></title><description><![CDATA[<h3>Architecture &amp; Implementation</h3>
<p dir="auto">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.</p>
<h4>Push APDU Format over TCP Wrapper (Port 4059)</h4>
<pre><code class="language-hex">00 01 00 01 00 01 00 28 0F 00 00 00 01 00 00 01 02 02 09 0C 07 EA 08 16 ...
</code></pre>
<h4>Wrapper Header Analysis (8 bytes)</h4>
<ul>
<li><code>00 01</code>: Protocol Version (<code>0x0001</code> for DLMS TCP Wrapper)</li>
<li><code>00 01</code>: Source WPort (Meter Logical Client ID)</li>
<li><code>00 01</code>: Destination WPort (HES Receiver Server ID)</li>
<li><code>00 28</code>: PDU Length (40 bytes)</li>
<li><code>0F</code>: APDU Tag -&gt; <strong><code>Data-Notification</code></strong> (Tag <code>0x0F</code> / 15)</li>
</ul>
<h4>Key Considerations</h4>
<ol>
<li><strong>Unsolicited Connection Management</strong>: The HES TCP server must maintain asynchronous socket listeners capable of handling thousands of simultaneous incoming TCP connections without blocking.</li>
<li><strong>Association Context</strong>: Push notifications are often sent without full AARQ authentication handshake. The meter uses predefined ciphering parameters (General-Ciphering <code>0xDB</code> or General-Signing <code>0xDF</code>) with Dedicated Encryption Key (DEK).</li>
</ol>
]]></description><link>https://dlms.sharur.org/topic/29/handling-dlms-push-setup-class-40-datanotification-apdu-with-tcp-wrapper-on-port-4059</link><generator>RSS for Node</generator><lastBuildDate>Fri, 16 Oct 2026 19:49:15 GMT</lastBuildDate><atom:link href="https://dlms.sharur.org/topic/29.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 22 Aug 2026 12:36:00 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Handling DLMS Push Setup (Class 40) DataNotification APDU with TCP Wrapper on Port 4059 on Sat, 22 Aug 2026 12:36:03 GMT]]></title><description><![CDATA[<p dir="auto">For encrypted Push notifications (<code>0xDB</code> 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.</p>
]]></description><link>https://dlms.sharur.org/post/66</link><guid isPermaLink="true">https://dlms.sharur.org/post/66</guid><dc:creator><![CDATA[alex_turner]]></dc:creator><pubDate>Sat, 22 Aug 2026 12:36:03 GMT</pubDate></item><item><title><![CDATA[Reply to Handling DLMS Push Setup (Class 40) DataNotification APDU with TCP Wrapper on Port 4059 on Sat, 22 Aug 2026 12:36:01 GMT]]></title><description><![CDATA[<p dir="auto">When parsing the <code>push_object_list</code> in Attribute 2 of the Push Setup object, ensure your server dynamically deserializes the structure array. Typical push payload includes:</p>
<ol>
<li>Logical Device Name (<code>0.0.42.0.0.255</code>)</li>
<li>Timestamp (<code>0.0.1.0.0.255</code>)</li>
<li>Active Energy Import (+A) (<code>1.0.1.8.0.255</code>)</li>
<li>Active Power (+P) (<code>1.0.21.7.0.255</code>)</li>
</ol>
<p dir="auto">If the meter firmware adds an alarm code into the push list, dynamic schema decoding prevents parsing crashes.</p>
]]></description><link>https://dlms.sharur.org/post/65</link><guid isPermaLink="true">https://dlms.sharur.org/post/65</guid><dc:creator><![CDATA[sarah_jenkins]]></dc:creator><pubDate>Sat, 22 Aug 2026 12:36:01 GMT</pubDate></item></channel></rss>