Re: Help! Convert OCTET string to READABLE string

2013-12-03 Thread Niels Baggesen
Den 04-12-2013 07:09, namgmail skrev:
> Now it work if i add "-Oa" or"-OT" in the snmpset command.I can see
> readable string .
>
> But it shows only   half of string not full string...

Are you it isn't the agent that truncates the string?

Try adding -d to the snmpset command to see the packets crossing the 
wire. And if still in doubt, post the complete command and the output here.

/Niels

-- 
Niels Baggesen - @home - Ã…rhus - Denmark - n...@users.sourceforge.net
The purpose of computing is insight, not numbers   ---   R W Hamming

--
Sponsored by Intel(R) XDK 
Develop, test and display web and hybrid apps with a single code base.
Download it for free now!
http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: Help! Convert OCTET string to READABLE string

2013-12-03 Thread namgmail
On 12/4/2013 6:55 AM, Magnus Fromreide wrote:
Hi Magnus Fromreide,

Thank you so much  for your valuable suggestions.

Now it work if i add "-Oa" or"-OT" in the snmpset command.I can see 
readable string .

But it shows only   half of string not full string...

Thanks,
Have a nice working day!
Nam.


--
Sponsored by Intel(R) XDK 
Develop, test and display web and hybrid apps with a single code base.
Download it for free now!
http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders


Re: Help! Convert OCTET string to READABLE string

2013-12-03 Thread Magnus Fromreide
On Tue, 2013-12-03 at 10:22 +0800, namgmail wrote:
> Hi pro,
> 
> I have a problem with SNMPSET ,this is my command:
> 
> snmpset   -v1  -c private
> 192.168.x.x.1.3.6.1.4.1.426.8.1.20.5.1.1   s
>   
> 
> If it's short string it work fine but   with long string it automatic
> convert to octet  string.Here is what i got from receiver:
> 
> 
> -s .1.3.6.1.4.1.426.8.1.20.5.1.1 octet 76 61 70 5f 69 64 3d 35 32 
> ...
> 30 34 3a 46 30 3a 32 31 3a 30 37 3a 44 39 3a 41 38 0a 76 61 70 5f

> 69 64 3d 35 32 34 67 68 7a 5f 31 30 26 76 61 70 5f 6d 61 63 5f 61 64
> ...
> 
> 
> So my question is : how can covert this octet string to readable
> string? or have another way to use SNMPSET with long string?

Please read up on the -Oa and/or -OT options to snmpset.
Additionally, upgrade snmpset as I can't repeat your problem here.

The octet string data is just the hex values of your data, if you give
snmpset the flag -Oa it will refrain from converting it but note that
your output won't fit on a single line then.

/MF


--
Sponsored by Intel(R) XDK 
Develop, test and display web and hybrid apps with a single code base.
Download it for free now!
http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
___
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders