You stated "decision by your client". Does this mean that when the "snmpget"
command is made and the data is returned, then the "snmpget" logic determines
to display the results as hex? Basically, is the "snmpget" command which you
are calling the "client"?
--- On Mon, 11/10/08, Magnus Fromreide <[EMAIL PROTECTED]> wrote:
From: Magnus Fromreide <[EMAIL PROTECTED]>
Subject: Re: Why does SNMP query return HEX string value instead of text string?
To: [EMAIL PROTECTED]
Cc: "net-snmp Coders" <[email protected]>
Date: Monday, November 10, 2008, 11:06 AM
mån 2008-11-10 klockan 06:02 -0800 skrev Need Help:
>
> I am using NetSNMP v5.4.1.
>
> I am issuing the following SNMP command:
>
> /usr/bin/snmpget -v 2c -c myaccess_ro 127.0.0.1 pageAppCodeModules.0
>
> This command usually returns a string value like:
>
> "000-03341-85696-216|DATAPAGE=1(Application Code Modules)|
> DATASECTION=TABLE(Downloaded Object List)|
> Module,Version,Status,AppId,Location,Size|
> nfs_kern,01.01,ENABLED,0,FLASH,2806808|
> MCblCard,02.65,ENABLED,---,MCARD,---|DATASECTION=TABLE(Downloading
> Object List)|Module,Version,Virtual Channel,Num Seg,Num Seg Rcvd,Num
> Seq Remain|---,---,---,---,---,---|DATASECTION=TEXT(Downloading
> Status)|Total Packets=N/A|Total Packets Remaining=N/A|Updating
> flash=NO|"
>
> .... however, every once in a while the command will return HEX values
> instead of text:
>
> /*DIAG-MIB::diagPageAppCodeModules.0 = Hex-STRING:
> 30 30 30 2D 31 30 37 34 31 2D 39 38 31 38 30 2D
> 32 34 35 7C 44 41 54 41 50 41 47 45 3D 31 28 41
> 70 70 6C 69 63 61 74 69 6F 6E 20 43 6F 64 65 20
> 4D 6F 64 75 6C 65 73 29 7C 44 41 54 41 53 45 43
> 54 49 4F 4E 3D 54 41 42 4C 45 28 44 6F 77 6E 6C
> 6F 61 64 65 64 20 4F 62 6A 65 63 74 20 4C 69 73
> 74 29 7C 4D 6F 64 75 6C 65 2C 56 65 72 73 69 6F
> 6E 2C 53 74 61 74 75 73 2C 41 70 70 20 49 64 2C
> 4C 6F 63 61 74 69 6F 6E 2C 53 69 7A 65 7C B4 9C
> E8 2A 18 34 E0 2A 2C F0 51 02 10 2C 45 4E 41 42
Note the nonprintables ----> ^^ ^^
> ...
>
> Any idea why a SNMP command will return a HEX value instead of text?
First, it is not the SNMP command that returns a HEX value, the HEX part
is a decision by your client.
The reason it decide to treat the response as HEX and not character data
is that it contains nonprintable characters.
/MF
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders