SNMP support for RT1024

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

SNMP support for RT1024

Jump to solution
2,320 Views
ping1
Contributor V

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

0 Kudos
1 Solution
1,827 Views
kerryzhou
NXP TechSupport
NXP TechSupport

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

View solution in original post

0 Kudos
18 Replies
1,981 Views
kerryzhou
NXP TechSupport
NXP TechSupport

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:

https://blog.csdn.net/pzs0221/article/details/121174611?spm=1001.2101.3001.6650.6&utm_medium=distrib...

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

 

0 Kudos
1,902 Views
ping1
Contributor V
Dear Kerry

Thanks for your hard work, it does look complicated and there is no any working examples to follow, I have been away for holiday, and no progress from my side.
Ping
0 Kudos
1,892 Views
kerryzhou
NXP TechSupport
NXP TechSupport

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

0 Kudos
1,875 Views
ping1
Contributor V
Hi, Kerry
Don't have any customer product information, sorry, it is our product and some customer want this feature, so they can use it to configure some settings. I am not sure whether this is too much for implement it on a embedded system.

I am totally new to this, and didn't know it is so complicated.
Regards!
Ping
0 Kudos
1,861 Views
kerryzhou
NXP TechSupport
NXP TechSupport

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

0 Kudos
1,848 Views
ping1
Contributor V
No worry, Kelly
Understand it is not easy. The link you sent look same as your SDK example, and also not easy to get it working.
Thanks for your effort!
Ping
1,828 Views
kerryzhou
NXP TechSupport
NXP TechSupport

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

0 Kudos
2,299 Views
ping1
Contributor V

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

0 Kudos
2,264 Views
kerryzhou
NXP TechSupport
NXP TechSupport

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

0 Kudos
2,250 Views
ping1
Contributor V

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

0 Kudos
2,241 Views
kerryzhou
NXP TechSupport
NXP TechSupport

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

0 Kudos
2,233 Views
ping1
Contributor V

Thank you, Kerry

I looking forward to your contribution, so far no more things to share. I will try to do a small project just for SNMP, so we can focus on that only.

Ping  

0 Kudos
2,227 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Please give me more time, let's learn and debug it together, go forward together!

 

Best Regards,

Kerry

0 Kudos
2,191 Views
ping1
Contributor V

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

 

0 Kudos
2,116 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @ping1 ,

   Ok, Got it, please keep patient, I will find time to test it.

   Any updated information, will let you know, thanks.

 

Best Regards,

Kerry

0 Kudos
2,195 Views
ping1
Contributor V

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

0 Kudos
2,306 Views
ping1
Contributor V

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

0 Kudos
2,309 Views
kerryzhou
NXP TechSupport
NXP TechSupport

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.

kerryzhou_0-1685442739818.png

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

 

0 Kudos