Dear all
I am using RT1024, and would like to implement a simple SNMP server which can be accessed by a SNMP tester software to GET/SET some information from it, I am new to SNMP, not sure someone can point me to the right direction, like what LWIP options do I need to enable for using SNMP library? is it MIB2_STATS? or any more options ?
Any example I can learn please?
Thank you!
Ping
已解决! 转到解答。
Thanks for your understanding, ping!
Recently, I am really too busy to test the customet's cases, so no time for the detail SNMP research now.
If your project need to use it, you also can collect some testing method, as I know, somd MIB tools also needed, and the SNMP version you need to know which one to use, the new version seems also need the secure operation.
If you meet any issues, you can create the new question case, then when I have time, I will also help you to research it together.
To this case, just let it close, as it is very old to open, thanks a lot for your understanding.
Best Regards,
Kerry
Hi @ping1 ,
I find this is really a little complicated, as it needs to define the private MIB.
From this post:
https://blog.csdn.net/wwwyue1985/article/details/126337330
It also needs to apply the private Enterprise id.
This blog is good:
But, I am still a little confusing about the MIB add.
I am not sure the lwip source code MIB works or not:
static const u32_t prvmib_base_oid[] = { 1,3,6,1,4,1,26381,1 };
const struct snmp_mib mib_private = SNMP_MIB_CREATE(prvmib_base_oid, &example_node.node);
The SNMP is based on the UDP, so if you want to do it, you need to use the UDP project instead of DHCP.
I find the new SDK version already remove the UDP, you can use the SDK_2_11_0_EVK-MIMXRT1060 version which support the UDP.
For the testing, seems also need other tools, eg the MIB related tool.
So, until now, I still didn't find the working example.
Do you have any progress on your side?
Best Regards,
Kerry
Hi @ping1 ,
Welcome back!
Do you have any customer product information about this SNMP? They are in the design phase?
You can give me the private message about it, if you must need to use it in the product with RT chip, then I can put more working time on it. If just check it, maybe you can check the website related code snap.
Best Regards,
Kerry
Hi @ping1 ,
Until now, no directly project for the reference.
Even the testing, also not very familiar, seems some tool are also not free.
I find github have one demo, maybe you also can try it:
https://github.com/particle-iot/lwip-contrib/tree/master/examples/snmp
Best Regards,
Kerry
Thanks for your understanding, ping!
Recently, I am really too busy to test the customet's cases, so no time for the detail SNMP research now.
If your project need to use it, you also can collect some testing method, as I know, somd MIB tools also needed, and the SNMP version you need to know which one to use, the new version seems also need the secure operation.
If you meet any issues, you can create the new question case, then when I have time, I will also help you to research it together.
To this case, just let it close, as it is very old to open, thanks a lot for your understanding.
Best Regards,
Kerry
Hi, Kerry
I tried to copy the SDK from the SDK\board\middleware\lwip\src\apps\snmp folder to my target lwip folder together with SDK\board\middleware\lwip\src\include\lwip\apps\ folder too. But I then noticed there are 2 head files both called snmp.h, one under lwip\src\include\lwip\ folder , and another under lwip\src\include\lwip\apps\ folder, and they are different, I am bit confused and not sure which one is correct.
Any working example like GET something could help, the example under the folder you pointed out doesn't build and looks like much more than I need, and confused with the options as I post earlier.
Thank you!
Ping
Hi @ping1 ,
I find some freertos+lwip+SNMP from the internet, you can try it on your side:
https://blog.csdn.net/wwwyue1985/article/details/126337330
https://www.cnblogs.com/yanhc/p/7481571.html
https://www.nationstech.com/uploadfile/file/20220427/1651054618121392.pdf
If you still have issues, I may also find time to help you to test it. As we don't have the direct example, it may need time to test it.
Do you also have some PC tool to test the SNMP connection? If yes, you can share it with me, then I can also try to create the project.
Best Regards,
Kerry
Hello, Kerry
I use free PC tool SNMP tester here - https://www.paessler.com/tools/snmptester. It looks quite simple, I will be happy if it can get a sysUptime working.
But I am struggling with firmware side, the example doesn't compile when SNMP option is turned on - even just the example code . I guess I have to spend more time on learning on your links.
I am not using RTOS by the way. The product is on market already, so don't have much time to spend unfortunately.
Regards!
Ping
Hi @ping1 ,
Your requrement is interesting, I will find time also test the SNMP function on my MIMXRT1024-EVK board, but it needs time, I will learn and test with you together.
If you have any valid material, please also share it with me, as it can save the time.
So, please give me more time do the testing.
You also can upload your project which have the complie issues, I also can help you to check it.
Best Regards,
Kerry
Hi, Kerry,
Manged to load it up now after clean the build staff. Based on DHCP example, and added
1. added a LWIP_SNMP option in header file.
2.Added SNMP library and example code.
3. Compiles now, but as soon as I call snmp_example_init() in line 209 in lwip_dhcp_bm.c, it give me an error.
Thanks
Ping
Hi, Kerry
Try to load a EVK project to you, but it is exceeding the maximum size of 25M after zipped, is there a way I can email you the project please?
I just started with DHCP example project and added snmp example you pointed together with the folder under lwip/src/apps/snmp, it compiles ok, but as soon as I call the snmp_example_init(), it fails to compile. In lwipopts.h file, just added a line for
#define LWIP_SNMP 1
Ping
Thank you, Kerry
Noticed that too, and struggling to compiling it, what options do I need to sun a simple one GET/SET communication, I set LWIP_SNMP 1, do I need to set LWIP_STATS to 1 and MIB2_STATS to 1 as well?
Regards!
Ping
Hi @ping1 ,
Thank you for your interest in the NXP MIMXRT product, I would like to provide service for you.
We don't include an SNMP example in the SDK, but it should certainly be possible to run SNMP over LWIP. There are actually already some SNMP files included in the SDK (just not a project that makes use of them). Look in the middleware/lwip/contrib/examples/snmp folder.
In fact, the LWIP is similar, you also can search some svmp examples from the internet in the lwip, then you can migrate it.
Wish it helps you!
Best Regards,
kerry