Troubleshooting SNMP

Discussion to talk about software related topics only.
Post Reply
SeeCwriter
Posts: 630
Joined: Mon May 12, 2008 10:55 am

Troubleshooting SNMP

Post by SeeCwriter »

I have my SNMP application up and running on a Nano. It responds to Discover correctly, and I can read the various
read-only parameters with my Mib Browser. However, writing (set) does not work. I've put printf() statements in
my write callback function to see where it goes off the rails, but none print. This suggests that it's not even getting
to write callback function.

I have Wireshark running, and it sees the set command, and it records it as going to the right OID. But no response. There
are numerous retries by the browser before it gives up.

This is the Write Table definition for the parameter I'm focusing on:

Code: Select all

SNMPWRITEFUNC(  excWGSwitch,
                "1.3.6.1.4.1.30679.1.2.2.1.2.2.2.0",
                ASN_typeString,
                WriteFuncexcWGSwitch,
                WRITE_COMMUNITY_MASK );
This is the callback function:

Code: Select all

int WriteFuncexcWGSwitch( snmp_typeString var, int bTest )
{
	printf("WGCmd\r\n");
	if ( bTest )
	{/* Test the value here */
		if ( !strlen(var) ) {
			printf("Zero Len\r\n");
			return SNMP_SET_FAIL;
		}
		if ( !isdigit(*var) || !isalpha(*(var+1)) ) {
			printf("Bad Cmd: %s\r\n", var);
			return SNMP_SET_FAIL;
		}
	}
	else
	{/* Set the value here */
		xudpWGSwitchControl( (char*)var );
	}
	return SNMP_SET_OK;
}
Any ideas on how to troubleshoot this?
SeeCwriter
Posts: 630
Joined: Mon May 12, 2008 10:55 am

Re: Troubleshooting SNMP

Post by SeeCwriter »

Never mind. It was a MIB Browser configuration issue.
Post Reply