SNMP v2c and v3 Support in STM32H753ZI with LwIP
Hello,
I am working on an SNMP implementation using STM32H753ZI with the LwIP Ethernet stack.
Currently, SNMP v1 is working successfully, including trap generation and reception testing using Net-SNMP tools. I am able to send enterprise-specific traps from the STM32 device.
Below is the trap code currently working for SNMP v1:
void send_temp_fault_trap(void)
{
static const u32_t enterprise_oid_arr[] = {1,3,6,1,4,1,50598};
struct snmp_obj_id enterprise_oid;
enterprise_oid.len = LWIP_ARRAYSIZE(enterprise_oid_arr);
memcpy(enterprise_oid.id,enterprise_oid_arr,sizeof(enterprise_oid_arr));
ip_addr_t dst;
IP4_ADDR(&dst, 192,168,0,255);
snmp_trap_dst_ip_set(0, &dst);
snmp_trap_dst_enable(0, 1);
static const u32_t msg_oid_arr[] =
{
1,3,6,1,4,1,50898,10
};
static struct snmp_varbind vb;
static struct snmp_obj_id msg_oid;
static char msg[] = "System Working";
msg_oid.len = LWIP_ARRAYSIZE(msg_oid_arr);
memcpy(msg_oid.id,msg_oid_arr,sizeof(msg_oid_arr));
vb.next = NULL;
vb.oid = msg_oid;
vb.type = SNMP_ASN1_TYPE_OCTET_STRING;
vb.value = (void*)msg;
vb.value_len = strlen(msg); snmp_send_trap(&enterprise_oid,SNMP_GENTRAP_ENTERPRISE_SPECIFIC,MYTRAP_TEMP_FAULT,&vb);
printf("SNMP Trap Sent\r\n");
}
Now I want to implement:
- SNMP v2c support
- SNMP v3 support
I have some questions regarding LwIP SNMP support on STM32:
- Does the current LwIP SNMP agent fully support SNMP v2c and SNMP v3?
- Are SNMPv2 traps/informs supported?
- Is there any example project available for STM32H7 series?
- Does LwIP provide built-in support for:
- authentication (MD5/SHA)
- privacy/encryption (DES/AES)
- user-based security model (USM)
- Are there any limitations in the STM32CubeH7 package regarding SNMP v3?
- Is Net-SNMP interoperability tested with LwIP SNMP v3 implementation?
I would appreciate guidance or reference examples for enabling SNMP v2c/v3 in STM32 + LwIP.
Thank you.