Software => Microchip TCP/IP stack => Topic started by: techadmin on March 14, 2011, 04:34:21 PM

Title: SNMP (Simple Network Management Protocol)
Post by: techadmin on March 14, 2011, 04:34:21 PM
The marketing material for the SBC68EC, and others provides instructions for enabling SNMP.  I have tried this in the past and it did not work.  Adding snmp.c file to the project disallows compiling.

Has anyone been able to actually get SNMP working, Modtronix?
Title: Re: SNMP (Simple Network Management Protocol)
Post by: Rick314 on March 17, 2011, 05:13:47 PM
Good timing -- I just started looking into the same thing today, 3 days after your post.  I am a graduate student, working on my computer science masters project.  I have a new Modtronix SBC65EC + Microchip MPLAB IDE, and have built and re-network-loaded Modtronix code onto the board.  So now on to my SNMP project hoping to use the Microchip SNMPv2c agent described in their 10/2009 Application Note 870b:

(This is an update to their 2003 SNMPv1 Agent, described in Application Note 870a.)

How about it Modtronix and other forum readers -- Has anyone ever gotten either version of the Microchip SNMP Agent working on any Modtronix board?

As far as I can tell, there is no such evidence here in the forums.  Any help would be much appreciated.
Title: Re: SNMP (Simple Network Management Protocol)
Post by: Danchoi-955 on March 24, 2011, 09:04:28 AM
I would also like to get this to work if Modtronix or anyone has more information.  There's were some requests for help dated back to Aug 2004 in this forum, but not very many solid responds, so I take it that either people are secretive and protecting their development, or no one has gotten this to successfully to work.  So far, I tried to compile the included snmp.c and initializing the SNMPInit() after StackInit(), and the compiler points to a bunch of "function without prototype" errors.  Without spending more time, maybe someone out there has gotten this to work.  Ultimately, I want to get one SBC65EC talking to another SBC65EC.
Title: Re: SNMP (Simple Network Management Protocol)
Post by: Rick314 on April 07, 2011, 09:21:45 AM
Regarding SNMPv1/SNMPv2c/SNMPv3 and the Modtronix SBC65EC/SBC66EC:

The Modtronix SBC65EC is based on the Microchip TCP/IP stack v3.75 (2006-08-14), and a PIC18 MCU.  The Modtronix SBC66EC introduced last month (2011-03) is based on the Microchip TCP/IP stack v5.31 (2010-10-19, 14 significant revisions later!) and a PIC24 MCU.

To learn about the differences among SNMPv1, SNMPv2c, and SNMPv3, see

To learn about SNMP support in each version of the Microchip TCP/IP stack, download the latest Microchip Application Libraries (2010-10-19, 2000+ files) from
and see file "TCPIP Stack Version.txt".  There might be easier ways to get this file, but that is how I found it.  It is about 80 pages of ASCII text with well-written summaries of each release.  Searching for "SNMP" shows its development by Microchip from 2002 to present.  A comment in v3.75 notes says "SNMP, TFTPc modules have not been tested with this version."  The same comment appears in v3.60 (2006-07-12), v3.50 (2006-04-13), v3.16.00 (2006-03-06), and that's as far back as I looked.

Microchip published Application Note (AN) 870a "An SNMP Agent for the Microchip TCP/IP Stack" (42 pages) in 2003.  They updated it to AN870b "SNMP V2c Agent for the Microchip TCP/IP Stack" (40 pages) in 2009.  That version is available at

I am interested in SNMPv3, because of its security enhancements over SNMPv1 and SNMPv2c.  The following paragraph is taken from "TCPIP Stack Version.txt", notes for Microchip TCP/IP Stack v5.31 (2010-10-19):

"16. Added preliminary SNMPv3 module. This module, enabled with the STACK_USE_SNMPV3_SERVER option in TCPIPConfig.h, implements the Simple Network Management Protocol, version 3. Among other things, SNMPv3 adds secure authentication and cryptographic privacy as compared to SNMPv2C. This implementation currently only supports AES encryption (no DES support). It also has only been tested with the PIC32 Ethernet Starter Kit (TCPIP Demo App - C32 - PIC32_ENET_SK_DM320004_INTERNAL_ETHERNET.mcp MPLAB IDE project). SNMPv3 on PIC18, PIC24, and dsPIC platforms are not supported at this time. Because AES encryption has specialized United States export requirements, this TCP/IP Stack release does not include the required AES library to enable SNMPv3. To obtain the needed AES library, you must purchase SW300052 v2.6 or later. Older v2.5 and previous versions include AES related files on them, but do not include the new AES files required by SNMPv3. For more information on using SNMP, refer to the TCP/IP Stack Help (Demo Information -> Available Demos -> TCPIP Demo App -> Demo Modules -> Network Management (SNMP) Server)."

Notice PIC18 (Modtronix SBC65EC) and PIC24 (Modtronix SBC66EC) are "not supported at this time" for SNMPv3, while PIC32 (used on the Microchip "PIC32 Ethernet Kit" hardware) is.  SNMPv3 is "preliminary", even in this most recent release.


On the SBC65EC, I think SNMPv1 is possible but needs more investigation.  Microchip published AN870a in 2003, and released their TCP/IP Stack v3.75 in 2006, that Modtronix uses in the SBC65EC.  But the Microchip TCP/IP Stack revision history shows that although SNMPv1 likely worked in 2003, it went untested through several TCP/IP Stack revisions through the v3.75 (2006-08-14) release.  Others in this forum have said that trying to compile it fails.  I haven't tried getting it to work.  AN870a would be the key to getting this to work.  I don't think SNMPv2c or SNMPv3 will work on the SBC65EC, because Microchip published AN870b, advertising SNMPv2c, in 2009, 3 years after the TCP/IP stack version used in the SBC65EC.  If Modtronix were to update the SBC65EC Web Server from Microchip TCP/IP Stack v3.75 to v5.31 (a 14-revision jump and maybe not even possible), then I think the SBC65EC would cleanly support either SNMPv1 or SNMPv2c.

On the SBC66EC, I think SNMPv1 and SNMPv2c should both work as described in Microchip AN870b.  But I don't think SNMPv3 will work, because (in the note above) "SNMPv3 on PIC18, PIC24, and dsPIC platforms are not supported at this time."  "This time" is 2010-10-19, Microchip TCP/IP stack v5.31, the most current version today, as used in the SBC66EC.

If you want SNMPv3 as I do, I think neither the Modtronix SBC65EC or SBC66EC will work because Microchip's SNMPv3 currently only works on PIC32 MCUs, not PIC24 (SBC66EC) or PIC18 (SBC65EC).

Title: Re: SNMP (Simple Network Management Protocol)
Post by: Rick314 on June 04, 2011, 08:22:11 PM
An update to those of you interested in SNMPv3, about 2 months after what I wrote above.  I am finishing up my grad student project, and have SNMPv3 working on the Microchip PIC32 Ethernet Starter Kit hardware, after doing the following:

- Get a Microchip PIC32 Ethernet Starter Kit (about $70).
- Install its software CD, and build/run some of the 15 short 1-file demo programs.
- Download the Microchip Application Libraries version 2010-10-19.
- Install only the TCP/IP Applications (1 of 11 available check-boxes).
- Build the "TCP/IP Demo App”, which includes "TCP/IP Stack v5.31".
- Download/install/learn the iReasoning MIB Browser, Enterprise Edition, 30-day free trial.
- Turn on SNMPv3 as per instructions in the Microchip TCP/IP Stack Help File.

The instructions in the Help file (about 30 pages) use the iReasoning MIB Browser software as example PC software to get SNMPv3 working.  I estimate the above steps would take about 20 hours, and they accomplished my needs.

Then it could be investigated if the Microchip SNMPv3 code could be made to work on the Modtronix SBC66EC.  As mentioned earlier, Microchip documentation says that their SNMPv3 code (introduced in the 2010-10-19 Application Libraries, so still fairly new) is currently only supported on PIC32 (32-bit) MCUs, not PIC24 (16-bit) as used in the SBC66EC.  But I would guess that Microchip is currently working on extending/testing it on PIC24 MCUs.  I am looking forward to Microchip's next release of the TCP/IP Stack and TCP/IP Demo Application to see if they include SNMPv3 supported on PIC24 MCUs.
Title: Re: SNMP (Simple Network Management Protocol)
Post by: cmcguire on September 10, 2011, 08:32:40 AM
I've just started looking at trying to get SNMP running and have also come across the compile errors. It seems the SNMP files included by Modtronix do not use the current file system (maybe a previous one?) Does anyone know about this?

From my understanding (and looking at the Microchip reference code) it seems the MIBs are stored in a compressed form in memory and the file system lookup searches for these based on the OIDs. I might try and remove this feature to try and get things working.

If anyone is working on this I'd appreciate any tips.