In the winbox, in the new terminal, I type:
tool snmp-get address=10.9.8.7 community=public version=1 oid=1.2.840.10036.3.1.2.1.3.6
and I have the return:
OID TYPE VALUE
1.2.840.10036.3.1.2.1.3.6 octet-string NanoStation2
Using the mikrotik API, how can I do the same thing? Any idea?
$API = new RouterosAPI();
$API->write( "/snmp-get" );
$API->write('=address=10.9.8.7=');
$API->write('=version=1=');
$API->write('=community=public=');
$API->write('=oid=1.2.840.10036.3.1.2.1.3.6=');
$ARRAY = $API->read();
var_dump( $ARRAY );
Returns the “no such command”
I researched google, forums, read the documentation, asked another question here, but I still did not succeed. Thank you.
RouterOS PHP API class v1.6 https://github.com/BenMenking/routeros-api/blob/master/routeros_api.class.php