<?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[SNMP getValue on Octet-String / Hex-String]]></title><description><![CDATA[<p dir="auto">Hi.<br />
I'm trying to use getValue on Octet-String within scripting, but it returns an empty string.</p>
<pre><code>transport = $node-&gt;createSNMPTransport();
if (transport != null)
{
  testStr = transport-&gt;getValue(".1.3.6.1.4.1.4196.1.1.5.2.100.2.1.4.0");
  if (testStr == "") println "huh ?";
}
</code></pre>
<p dir="auto">The MIB-Browser shows Type Hex-String with Value "00 00 02 00 00"<br />
The DCI with DataType String and no conversion collects the same value.<br />
The code from above returns an empty string   <img src="https://forum.netxms.org/assets/plugins/nodebb-plugin-emoji/emoji/android/1f622.png?v=72b86a538fc" class="not-responsive emoji emoji-android emoji--cry" style="height:1.4em;width:auto;vertical-align:middle" title=":'(" alt="😢" /></p>
<p dir="auto">NetXMS version 3.9.156</p>
<p dir="auto">Any hints?</p>
<p dir="auto">Thanks in advance.</p>
]]></description><link>https://forum.netxms.org/topic/7130/snmp-getvalue-on-octet-string-hex-string</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Nov 2026 10:35:34 GMT</lastBuildDate><atom:link href="https://forum.netxms.org/topic/7130.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 12 Aug 2021 15:14:47 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to SNMP getValue on Octet-String / Hex-String on Tue, 24 Aug 2021 14:19:47 GMT]]></title><description><![CDATA[<p dir="auto">NXSL tried to interpret the HEX as string and taked first 00 as end of string. Try this way:</p>
<p dir="auto">transport = $node-&gt;createSNMPTransport();<br />
if (transport != null)<br />
{<br />
  println transport-&gt;get(".1.3.6.1.4.1.4196.1.1.5.2.100.2.1.4.0")-&gt;printableValue;<br />
}</p>
]]></description><link>https://forum.netxms.org/post/30375</link><guid isPermaLink="true">https://forum.netxms.org/post/30375</guid><dc:creator><![CDATA[Filipp Sudanov]]></dc:creator><pubDate>Tue, 24 Aug 2021 14:19:47 GMT</pubDate></item></channel></rss>