I'm writing a php script that allows me to get and set certain values on a device using snmp. I've got the the device's MIB and can load it easily into php. The problem is that I can't get the values I'm looking for using a 'human readable' oid string instead of a numeric one (the numeric oid works fine).
my code:
$host = "localhost";
$community = "public";
$mibFile = "C:\wamp\www\extra\AvenueMIBv105.mib";
$oid = '.1.3.6.1.4.1.19021.1.1.0.0.1';
snmp_read_mib($mibFile);
print_r(snmprealwalk($host, $community, $oid));
with $oid = '.1.3.6.1.4.1.19021.1.1.0.0.1', I get this output:
Array ( [AvenueMIBv105::private.1.19021.1.1.0.0.1.1.0] => INTEGER: 1 [AvenueMIBv105::private.1.19021.1.1.0.0.1.2.0] => INTEGER: 1
with $oid = 'AvenueMIBv105::private.slotSelect' I get this output:
Array([AvenueMIBv105::internet.2.1.1.3.0] => INTEGER: 129663870 [AvenueMIBv105::internet.2.1.1.4.0] => Hex-STRING: 75 73 65 72 4E 61 6D 65 00
I want both outputs to be the same. I realise that I must have the 'human readable' oid wrong, but I've tried loads of different strings for that and I always get the same wrong output. How should I be doing this? Also I know it sometimes makes a difference, the php script is running on a WAMP server.
Here is my MIB tree:
