
Solved!
Go to SolutionSeeing Hex in ASL --- SNMP Poll
I want to be able to see the hex values of an SNMP poll (ASL code below with my
results). What I get back is what looks to be partial responses or mixed
responses maybe. Seeing \X00\X1Ez\X19\XCA\XA0 or \XF0%r\XDA\X04` does not make
sense to me (yes, I expect the \X00 but not an ascii character in with it.
Ideas on being able to see just ascii or just hex -- what am I missing?
+++++++++++++++++++++++++
Typical Response
------------------------------------------
OID clientAPmac -->\XF0%r\XDA\X04`
no Hex to string ==\X00\X1Ez\X19\XCA\XA0
OID clientAPmac -->\X00\X1Ez\X19\XCA\XA0
no Hex to string ==\X00\X1Ez\X19\XCA\XA0
OID clientAPmac -->\X00\X1Ez\X19\XCA\XA0
no Hex to string ==\X00\X19\XA9\XFFJP
OID clientAPmac -->\X00\X19\XA9\XFFJP
+++++++++++++++++++++++++++++++++++++++++++
Code used
-------------------------------------------
snmp = create( "ACT_SNMP", "ACT_SNMP-my-snmp");
timeout = 30;
retries = 2;
OIDindex = ".0";
wlcMacAddressTable = table();
if (!snmp->started) { snmp->start(timeout, retries); }
system = object( "P_WLC", "ccxxwlc");
agent = system->getSNMPAgent();
startoid = ".1.3.6.1.4.1.14179.2.2.1.1.3";
oid = ".1.3.6.1.4.1.14179.2.2.1.1.3";
getOIDList = list(list("clientAPmac", ".1.3.6.1.4.1.14179.2.1.4.1.4"));
tm = object("ICF-TopologyManager");
START {
.. eol
} do {
foreach getOID (getOIDList)
{
result = list( "", "error", "" );
notDone = TRUE;
startoid = getOID[1];
oid = getOID[1];
print("===================================");
print("================ New OID ==========");
print("oid using-->".oid);
while (notDone)
{
result = tm->snmpActGetNext(snmp, agent, oid)?IGNORE;
curOID = result[0];
if (result[1] == "error") {
print( "Attempt to get ".oid." failed");
}
if (result[2] != -1 )
{
if (!glob(startoid . ".*", result[0]))
{
notDone = FALSE;
print("End of MIB tree");
} else {
print("no Hex to string ==".result[2]);
getResult = hexToString(result[2]);
print("OID ".getOID[0]." -->".result[2]);
oid = curOID;
}
} // End of if (result[0]
} // End of while (notDone)
} // End of foreach getOID
}
Responses (0)
Solutions (0)
