Code:
1> application:start(snmp).
ok
2> snmpm:start().
ok
3> snmpm:register_user(the_user, snmpm_user_default, undefined).
ok
4> snmpm:register_agent(the_user, "myrmidon", [{address, [127,0,0,1]}, {community, "private"}, {engine_id, "the engine"}]).
ok
5> snmpm:load_mib("SNMPv2-MIB").
ok
6> snmpm:sync_get(the_user, "myrmidon", [[sysName, 0]]).
{error,{timeout,1055001784}}
7> snmpm:update_agent_info(the_user, "myrmidon", community, "public").
ok
8> snmpm:sync_get(the_user, "myrmidon", [[sysName, 0]]).
{ok,{noError,0,
[{varbind,[1,3,6,1,2,1,1,5,0],'OCTET STRING',"myrmidon",1}]},
4999}