<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
I'm looking at snmp code from OTP 17.1 and the example indeed looks
broken.<br>
The start function you are using takes Address as a parameter but
then uses that value as TargetName and not as the ip of the device.<br>
<br>
You can use the longer alternative, which works for me (mib path may
be different on your machine):<br>
<br>
<tt>snmp_ex2_simple_standard_test:start(["/opt/erlang6.1/lib/erlang/lib/snmp-4.25.1/priv/mibs/STANDARD-MIB"],
"Agent Name",
[{engine_id,""},{address,{192,168,1,1}},{community,"public"}]).</tt><br>
<br>
<div class="moz-cite-prefix">On 03.03.2015 00:00, Frederic Bonfanti
wrote:<br>
</div>
<blockquote
cite="mid:C743D4D0-61EE-42FF-BE3B-EF1500BD9F35@gmail.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
Hi,
<div class=""><br class="">
</div>
<div class="">I have been playing around with snmp but this giving
me a hard time...</div>
<div class=""><br class="">
</div>
<div class="">here is the error I get:</div>
<div class=""><br class="">
</div>
<blockquote style="margin: 0 0 0 40px; border: none; padding:
0px;" class="">
<div class=""><span class="Apple-tab-span"
style="white-space:pre"> </span><span style="font-family:
Menlo; font-size: 11px;" class="">>
snmp_ex2_simple_standard_test:start({192,168,1,1}).</span></div>
<div style="margin: 0px; font-size: 11px; font-family: Menlo;"
class="">snmpm:snmpm:mk_target_name(snmpUDPDomain,
{{192,168,1,1},161}, [{community, "public"}]) ->
"192.168.1.1:161-v1".</div>
<div style="margin: 0px; font-size: 11px; font-family: Menlo;
min-height: 13px;" class=""><br class="">
</div>
<div style="margin: 0px; font-size: 11px; font-family: Menlo;"
class="">Command 1 (get-next [1,1]): error</div>
<div style="margin: 0px; font-size: 11px; font-family: Menlo;"
class=""> {command_failed,not_found}</div>
<div style="margin: 0px; font-size: 11px; font-family: Menlo;"
class="">... </div>
</blockquote>
<div class=""><br class="">
</div>
<div class="">SNMP works fine from both Mac OS X / snmpget and
remote agent perspectives... Only erlang SNMP toolkit refuses to
operate properly.</div>
<div class=""><br class="">
</div>
<div class="">Any hint appreciated</div>
<div class=""><br class="">
</div>
<div class="">+F</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
erlang-questions mailing list
<a class="moz-txt-link-abbreviated" href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a>
<a class="moz-txt-link-freetext" href="http://erlang.org/mailman/listinfo/erlang-questions">http://erlang.org/mailman/listinfo/erlang-questions</a>
</pre>
</blockquote>
<br>
</body>
</html>