This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Keil TCPnet stack-SNMP

Hi,

I am using the SNMP demo code for SNMP agent but i cant send trap message from agent, I configured everything that specified in help document of keil. see the code where i am sending trap message.

int main (void)
{ /* Main Thread of the TcpNet */

init (); init_display (); init_TcpNet ();

dhcp_tout = DHCP_TOUT; LED_out (0x55);

while (1) { timer_poll (); main_TcpNet (); dhcp_check (); if (LCDupdate == __TRUE) { upd_display (); snmp_trap (NULL, 6, 1, obj); } }
}

what is wrong in that code? any thing else i need to enable?

-pratheep.k

Parents
  • Never underestimate the value of links - no need to duplicate the Keil text when the manual is available online.

    Interesting that Keil are using so strange terms for describing the obj_list. They call every index position an object. But the code seems to indicate that the array is storing the "path" numbers for forming a single OID while the manual text talks about the ability to send up to 20 objects.

    If the second is true, then obj_list should be index values to point at up to 20 OID stored somewhere else - each OID a sequence of one or more numbers.

    By the way - have you verified if a trap is sent or not? And are you using the correct community? And do your snmp trap listener accepting the used protocol version? You say you can't send traps, but you aren't even checking the return code from the call.

Reply
  • Never underestimate the value of links - no need to duplicate the Keil text when the manual is available online.

    Interesting that Keil are using so strange terms for describing the obj_list. They call every index position an object. But the code seems to indicate that the array is storing the "path" numbers for forming a single OID while the manual text talks about the ability to send up to 20 objects.

    If the second is true, then obj_list should be index values to point at up to 20 OID stored somewhere else - each OID a sequence of one or more numbers.

    By the way - have you verified if a trap is sent or not? And are you using the correct community? And do your snmp trap listener accepting the used protocol version? You say you can't send traps, but you aren't even checking the return code from the call.

Children
No data