piclist 2014\12\09\080527a >
Thread: Problem using Unix net-snmp tools with snmpv3_nvm_mpfs demo on PIC32 ESK board (part no. DM320004) [reposted with subject prefix]
www.piclist.com/techref/microchip/devices.htm?key=pic
flavicon
face BY : TPCpiclistRemoveME@RemoveMEmklab.ph.rhul.ac.uk email (remove spam text)



>
> Rather than guessing, look at it from the bottom up.
> If the Linux box has a head on it load Wireshark and its GUI there.
> If not then capture the session with tcpdump and move the file to a machine with the Wireshark GUI.

I had hoped it would work out of the box and would not have to resort to watching the traffic on the wire.  It was worth doing however.  The 'problem' turned out to be
the Microchip SNMP agent's variables were in different sub-trees.  snmpwalk with the default options just listed the first one and stopped.  The -CE option was needed to
list all the available sub-tree.  Specifying '-CE 2' makes it list every sub-tree starting with .1.  Here are some samples/demos which might help others...

tom@RM:$ snmpwalk -CE 2 -m MICROCHIP-MIB -c public -v 1 mechpboard_e
SNMPv2-SMI::mib-2.1.1.0 = STRING: "Microchip Harmony"
SNMPv2-SMI::mib-2.1.2.0 = OID: MICROCHIP-MIB::microchipInfo
SNMPv2-SMI::mib-2.1.3.0 = Timeticks: (806010) 2:14:20.10
SNMPv2-SMI::mib-2.1.4.0 = STRING: "admin"
SNMPv2-SMI::mib-2.1.5.0 = STRING: "Microchip"
SNMPv2-SMI::mib-2.1.6.0 = STRING: "office"
SNMPv2-SMI::mib-2.1.7.0 = INTEGER: 7
MICROCHIP-MIB::name.0 = STRING: SNMPv3Agent
MICROCHIP-MIB::version.0 = STRING: v7.21
MICROCHIP-MIB::date.0 = STRING: Aug 21 2014
MICROCHIP-MIB::ipv4TrapReceiverNumber.0 = INTEGER: 0
MICROCHIP-MIB::ipv4TrapReceiverNumber.1 = INTEGER: 1
MICROCHIP-MIB::ipv4TrapEnabled.0 = INTEGER: no(0)
MICROCHIP-MIB::ipv4TrapEnabled.1 = INTEGER: no(0)
MICROCHIP-MIB::ipv4TrapReceiverIPAddress.0 = IpAddress: 0.0.0.0
MICROCHIP-MIB::ipv4TrapReceiverIPAddress.1 = IpAddress: 0.0.0.0
MICROCHIP-MIB::ipv4TrapCommunity.0 = STRING:
MICROCHIP-MIB::ipv4TrapCommunity.1 = STRING:
MICROCHIP-MIB::ipv6TrapReceiverNumber.0 = INTEGER: 0
MICROCHIP-MIB::ipv6TrapReceiverNumber.1 = INTEGER: 1
MICROCHIP-MIB::ipv6TrapEnabled.0 = INTEGER: no(0)
MICROCHIP-MIB::ipv6TrapEnabled.1 = INTEGER: no(0)
MICROCHIP-MIB::ipv6TrapReceiverIPv6Address.0 = STRING: 0:0:0:0:0:0:0:0
MICROCHIP-MIB::ipv6TrapReceiverIPv6Address.1 = STRING: 0:0:0:0:0:0:0:0
MICROCHIP-MIB::ipv6TrapCommunity.0 = STRING:
MICROCHIP-MIB::ipv6TrapCommunity.1 = STRING:
MICROCHIP-MIB::ledD5.0 = INTEGER: off(0)
MICROCHIP-MIB::ledD6.0 = INTEGER: off(0)
MICROCHIP-MIB::pushButton.0 = INTEGER: open(1)
MICROCHIP-MIB::analogPot0.0 = INTEGER: 0
End of MIB

tom@RM:$ snmpwalk -CE 2 -c public -v 1 mechpboard_e
SNMPv2-MIB::sysDescr.0 = STRING: Microchip Harmony
SNMPv2-MIB::sysObjectID.0 = OID: SNMPv2-SMI::enterprises.17095.1
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (795360) 2:12:33.60
SNMPv2-MIB::sysContact.0 = STRING: admin
SNMPv2-MIB::sysName.0 = STRING: Microchip
SNMPv2-MIB::sysLocation.0 = STRING: office
SNMPv2-MIB::sysServices.0 = INTEGER: 7
SNMPv2-SMI::enterprises.17095.1.1.1.0 = STRING: "SNMPv3Agent"
SNMPv2-SMI::enterprises.17095.1.1.2.0 = STRING: "v7.21"
SNMPv2-SMI::enterprises.17095.1.1.3.0 = STRING: "Aug 21 2014"
SNMPv2-SMI::enterprises.17095.1.2.1.1.1.0 = INTEGER: 0
SNMPv2-SMI::enterprises.17095.1.2.1.1.1.1 = INTEGER: 1
SNMPv2-SMI::enterprises.17095.1.2.1.1.2.0 = INTEGER: 0
SNMPv2-SMI::enterprises.17095.1.2.1.1.2.1 = INTEGER: 0
SNMPv2-SMI::enterprises.17095.1.2.1.1.3.0 = IpAddress: 0.0.0.0
SNMPv2-SMI::enterprises.17095.1.2.1.1.3.1 = IpAddress: 0.0.0.0
SNMPv2-SMI::enterprises.17095.1.2.1.1.4.0 = ""
SNMPv2-SMI::enterprises.17095.1.2.1.1.4.1 = ""
SNMPv2-SMI::enterprises.17095.1.2.2.1.1.0 = INTEGER: 0
SNMPv2-SMI::enterprises.17095.1.2.2.1.1.1 = INTEGER: 1
SNMPv2-SMI::enterprises.17095.1.2.2.1.2.0 = INTEGER: 0
SNMPv2-SMI::enterprises.17095.1.2.2.1.2.1 = INTEGER: 0
SNMPv2-SMI::enterprises.17095.1.2.2.1.3.0 = Hex-STRING: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
SNMPv2-SMI::enterprises.17095.1.2.2.1.3.1 = Hex-STRING: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
SNMPv2-SMI::enterprises.17095.1.2.2.1.4.0 = ""
SNMPv2-SMI::enterprises.17095.1.2.2.1.4.1 = ""
SNMPv2-SMI::enterprises.17095.1.3.1.0 = INTEGER: 0
SNMPv2-SMI::enterprises.17095.1.3.2.0 = INTEGER: 0
SNMPv2-SMI::enterprises.17095.1.3.3.0 = INTEGER: 1
SNMPv2-SMI::enterprises.17095.1.3.4.0 = INTEGER: 0
End of MIB

tom@RM:$ snmpwalk -On -CE 2 -c public -v 1 mechpboard_e
..1.3.6.1.2.1.1.1.0 = STRING: Microchip Harmony
..1.3.6.1.2.1.1.2.0 = OID: .1.3.6.1.4.1.17095.1
..1.3.6.1.2.1.1.3.0 = Timeticks: (810225) 2:15:02.25
..1.3.6.1.2.1.1.4.0 = STRING: admin
..1.3.6.1.2.1.1.5.0 = STRING: Microchip
..1.3.6.1.2.1.1.6.0 = STRING: office
..1.3.6.1.2.1.1.7.0 = INTEGER: 7
..1.3.6.1.4.1.17095.1.1.1.0 = STRING: "SNMPv3Agent"
..1.3.6.1.4.1.17095.1.1.2.0 = STRING: "v7.21"
..1.3.6.1.4.1.17095.1.1.3.0 = STRING: "Aug 21 2014"
..1.3.6.1.4.1.17095.1.2.1.1.1.0 = INTEGER: 0
..1.3.6.1.4.1.17095.1.2.1.1.1.1 = INTEGER: 1
..1.3.6.1.4.1.17095.1.2.1.1.2.0 = INTEGER: 0
..1.3.6.1.4.1.17095.1.2.1.1.2.1 = INTEGER: 0
..1.3.6.1.4.1.17095.1.2.1.1.3.0 = IpAddress: 0.0.0.0
..1.3.6.1.4.1.17095.1.2.1.1.3.1 = IpAddress: 0.0.0.0
..1.3.6.1.4.1.17095.1.2.1.1.4.0 = ""
..1.3.6.1.4.1.17095.1.2.1.1.4.1 = ""
..1.3.6.1.4.1.17095.1.2.2.1.1.0 = INTEGER: 0
..1.3.6.1.4.1.17095.1.2.2.1.1.1 = INTEGER: 1
..1.3.6.1.4.1.17095.1.2.2.1.2.0 = INTEGER: 0
..1.3.6.1.4.1.17095.1.2.2.1.2.1 = INTEGER: 0
..1.3.6.1.4.1.17095.1.2.2.1.3.0 = Hex-STRING: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
..1.3.6.1.4.1.17095.1.2.2.1.3.1 = Hex-STRING: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
..1.3.6.1.4.1.17095.1.2.2.1.4.0 = ""
..1.3.6.1.4.1.17095.1.2.2.1.4.1 = ""
..1.3.6.1.4.1.17095.1.3.1.0 = INTEGER: 0
..1.3.6.1.4.1.17095.1.3.2.0 = INTEGER: 0
..1.3.6.1.4.1.17095.1.3.3.0 = INTEGER: 1
..1.3.6.1.4.1.17095.1.3.4.0 = INTEGER: 0
End of MIB

Here are some examples reading the ESK board's push-button,

tom@RM:$ snmpget -v 1 -c public mechpboard_e MICROCHIP-MIB::pushButton.0   # Read pushButton0 in normal state
MICROCHIP-MIB::pushButton.0 = INTEGER: open(1)
tom@RM:$ # Depress Switch SW1
tom@RM:$ snmpget -v 1 -c public mechpboard_e MICROCHIP-MIB::pushButton.0   # Read pushButton0 in activated state
MICROCHIP-MIB::pushButton.0 = INTEGER: closed(0)

tom@RM:$ snmpget -On -v 1 -c public mechpboard_e MICROCHIP-MIB::pushButton.0       # Read pushButton0 in normal state, use -On to get its OID
..1.3.6.1.4.1.17095.1.3.3.0 = INTEGER: open(1)
tom@RM:$ snmpget -v 1 -c public mechpboard_e .1.3.6.1.4.1.17095.1.3.3.0            # Read pushButton0 in normal state using OID
SNMPv2-SMI::enterprises.17095.1.3.3.0 = INTEGER: 1
tom@RM:$ # Depressing pushButton0...
tom@RM:$ snmpget -On -v 1 -c public mechpboard_e MICROCHIP-MIB::pushButton.0       # Read pushButton0 in activated state
..1.3.6.1.4.1.17095.1.3.3.0 = INTEGER: closed(0)
tom@RM:$ snmpget -v 1 -c public mechpboard_e .1.3.6.1.4.1.17095.1.3.3.0            # Read pushButton0 in activated state using OID
SNMPv2-SMI::enterprises.17095.1.3.3.0 = INTEGER: 0

My thanks to all who replied, inc. directly by email.

Tom Crane.



>
>
>
> {Original Message removed}
<201412091305.sB9D5Ldu030516@mklab.ph.rhul.ac.uk> quoted-printable

In reply to: <14384084.1417624611119.JavaMail.root@wamui-hunyo.atl.sa.earthlink.net>
See also: www.piclist.com/techref/microchip/devices.htm?key=pic
Reply You must be a member of the piclist mailing list (not only a www.piclist.com member) to post to the piclist. This form requires JavaScript and a browser/email client that can handle form mailto: posts.
Subject (change) Problem using Unix net-snmp tools with snmpv3_nvm_mpfs demo on PIC32 ESK board (part no. DM320004) [reposted with subject prefix]

month overview.

new search...