This project has moved. For the latest updates, please go here.

UPS and SharpSNMPLib...?

Topics: bug report (break and fix)
Oct 7, 2008 at 10:29 AM
Edited Oct 7, 2008 at 12:52 PM
Hi,
I'm trying to get values from My UPS according to specification in MIB file RFC1628A.MIB. But always get Lextm.SharpSnmpLib.SharpTimeoutException from agent. any suggestions? We are now using SNMPDll implementation for C# and can read values from the same agent.

Oct 8, 2008 at 11:09 AM
OK I did a little debugging on actual SNMP packets send by #SNMP and SNMPDll. For same OID requested by #SNMP and SNMPDll libraries I get different packet lenght in bytes. Here is example:

This is SNMPDll request
Length = 43 bytes
30 29 02 01 00 04 06 70 75 62 6C 69 63 A0 1C 02
02 05 7C 02 01 00 02 01 00 30 10 30 0E 06 0A 2B
06 01 02 01 21 01 01 05 00 05 00

for this one i get response from agent!!!

This is the same request send by #SNMPlib
Length = 52 bytes
30 81 31 02 81 01 00 04 81 06 70 75 62 6C 69 63
A0 81 21 02 81 01 0A 02 81 01 00 02 81 01 00 30
81 12 30 81 0F 06 81 0A 2B 06 01 02 01 21 01 01
05 00 05 00

It can be noticed the after each Datatype byte additional bytes with value 0x81 is send....According to my SNMP packet specifications this is not OK. I new to this so it is possible that I'm wrong.


for this one i dont get response from agent!!!


Coordinator
Oct 11, 2008 at 9:30 AM
Hi bvolkan,

I will check the source code to see if #SNMP generates the packet bytes correctly in your case. Update will be posted later.

-Lex
Coordinator
Oct 12, 2008 at 2:39 AM
I am here again.

According to the byte analysis, I saw that you were using a relatively old build of #SNMP. Like you said it generated additional bytes which may be the cause of the problem (some SNMP agents cannot handle such packets correctly).

During the development of TwinTower Release, I have already improved the packet generation algorithm to remove those additional bytes. Thus, may you kindly test TwinTower RC2 (verion 1.5) here to see if it works fine?

http://www.codeplex.com/sharpsnmplib/Release/ProjectReleases.aspx?ReleaseId=15319

Thank you.

-Lex
Marked as answer by lextm on 10/6/2013 at 9:10 PM
Nov 13, 2008 at 11:44 AM
Hi,
Can you assist me with decoding this message to find the community string and the OID

SNMP Message:
30 29 02 01 00 04 06 70 75 62 6c 69 63 a0 1c 02 04 4f 89 fb dd
02 01 00 02 01 00 30 0e 30 0c 06 08 2b 06 01 02 01 01 05 00 05 00
Coordinator
Nov 15, 2008 at 12:05 AM
Hi,

This is a GET request message whose community string is public, and the OID is .1.3.6.1.2.1.1.5.0

By the way, next time may you initiate a new thread instead of appending in the end? :)

-Lex