On 18 January 2013 19:57, Farid Farid <farid21...@yahoo.com> wrote:
> When I run  snmpget to read my_mib   I get the Hex and not  ASCII for "Hello
> World".
>
> So I get 48 65 6c 6c 6f 20 57 6f 72 6c 64 1f.   instead of  "Hello World"
>
> How can I send the data to see the string in ASCII format

Looking at those hex values, I suspect the problem is the last
one ('1f') - that's probably being regarded as "non-printable",
so the whole string is represented in hex, rather than ascii.

Try setting the value using
  snmp_set_var_typed_value( request->requestvb , ASN_OCTECT_CTR,
       (u_char *) &my_data , strlen(my_data));

(instead of 'sizeof'), and see if that helps.

Dave

------------------------------------------------------------------------------
Master HTML5, CSS3, ASP.NET, MVC, AJAX, Knockout.js, Web API and
much more. Get web development skills now with LearnDevNow -
350+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122812
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to