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 <STRING> > > > 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