forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


SNMP possible?

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
Rebel49
Contributor
Contributor


Joined: 23 Aug 2002
Posts: 78
Location: Nova Scotia, Canada

PostPosted: Mon Aug 26, 2002 10:57 pm    Post subject: SNMP possible? Reply with quote

Question
I was wondering if anyone has any experience using VDS and perhaps VDSDLL to talk SNMP to a network device. Specifically, I would like to retrieve information from a remote temperature sensor. I have the OID,commmunity and port info and would like just to be able to get a reply from a "GET REQUEST" at this time. Trap handling is not important
yet.


Worship Any hints or example code would be dynamite!!! Worship


thanks,eh!

rebel49
Back to top
View user's profile Send private message
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Tue Aug 27, 2002 12:22 am    Post subject: Reply with quote

Well, here's a slightly different idea...

If the temperature software keeps a log file, you
could check those periodically. If not, you could
run a program at startup to do so on each machine.

I don't have SNMP experience, but I'm sure some of
these other guys do. Wink

Cheers, Mac Smile

_________________
VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
Back to top
View user's profile Send private message Send e-mail
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Tue Aug 27, 2002 8:18 am    Post subject: Reply with quote

There is an IO function in Tommy's vdsdll 2.7...
Also, there is a function to control serial-ports in the vdsdll3 dll.

I think it's possible to make something with that.
Back to top
View user's profile Send private message
Rebel49
Contributor
Contributor


Joined: 23 Aug 2002
Posts: 78
Location: Nova Scotia, Canada

PostPosted: Sun Jan 12, 2003 11:37 pm    Post subject: Is @CHR(0) the kiss of death Reply with quote

I revived this project after many months and
feel like I almost got it working!

The approach I tried was to use VDSIPP to send a UDP packet
that contained a SNMP frame containing the query for
the temperature. Everything works to the point
where I have to assemble a string (message) for the
query. The stumbling point is @CHR(0) which is a null
and is a part of the SNMP frame. VDS will assemble
the string but will only process it up to the point of the
NULL. I use a sniffer program to view the actual message
and its correct up to the @CHR(0) but then everything else
is truncated. Mad

Please consider the following code:

Code:

%A = @CHR(97)@CHR(98)@CHR(99)@CHR(0)@CHR(100)@CHR(101)@CHR(102)
info The length of "%A" is @len(%A) @CR() and it appears @CR() like this: %A


VDS says correctly that is seven characters long but only
displays the 3 before the NULL. When transmitted by VDSIPP
it similarly only transmits the first 3.

To boil it down simply, can VDS assemble and process a
message string with an embedded NULL. Question Question Question

Any thoughts,comments or work arounds greatly appreciated

REB

_________________
OLD and eager!
Back to top
View user's profile Send private message
cnodnarb
Professional Member
Professional Member


Joined: 11 Sep 2002
Posts: 766
Location: Eastman, GA

PostPosted: Mon Jan 13, 2003 12:24 am    Post subject: Reply with quote

Hi! I checked visual basic and it can't do this either....c++ might be able to. I got curious and looked some stuff up on MSDN and found this page.

http://msdn.microsoft.com/library/en-us/vbenlr98/html/vamscANSITable.asp

Characters 0-7 11,12, 14-31 and 127 don't appear to be supported in Windows...


NodNarb
Back to top
View user's profile Send private message AIM Address
Rebel49
Contributor
Contributor


Joined: 23 Aug 2002
Posts: 78
Location: Nova Scotia, Canada

PostPosted: Mon Jan 13, 2003 2:15 am    Post subject: Is @CHR(0) the kiss of death? Reply with quote

Thanks for your input!

But if you substitute @CHR(0) with @CHR(1) it works fine!!
Prints a strange character between "abc" and "def" but you get
a seven character string which you can work with!?!

Hmmmm........
Question Question Question

_________________
OLD and eager!
Back to top
View user's profile Send private message
Tommy
Admin Team


Joined: 16 Nov 2002
Posts: 746
Location: The Netherlands

PostPosted: Mon Jan 13, 2003 3:14 pm    Post subject: Reply with quote

Indeed, VDS can not handle the NULL character directly while other Windows languages
such as Delphi, C and C++ can. That's why "hex code" was invented by the author of VDSINOUT
to allow the DLL to work with null characters, though none of the currently available socket DLLs
support hex code.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Rebel49
Contributor
Contributor


Joined: 23 Aug 2002
Posts: 78
Location: Nova Scotia, Canada

PostPosted: Mon Jan 13, 2003 4:30 pm    Post subject: @CHR(0) is the kiss of death! Reply with quote

That confirms my suspicions.. Sad

Curses! Foiled again! Mad

Anyway, I will have a look at VDSinout to see
what I can learn from it.

Thanks for this!

REB

_________________
OLD and eager!
Back to top
View user's profile Send private message
Rebel49
Contributor
Contributor


Joined: 23 Aug 2002
Posts: 78
Location: Nova Scotia, Canada

PostPosted: Fri Jan 17, 2003 2:05 am    Post subject: and the answer is....... Reply with quote

Well my original post asked if SNMP (SIMPLE NETWORK MANAGEMENT PROTOCOL) was possible using VDS.
And I think I have covered enough turf to say definately
YES and NO. Or more correctly NO and YES.

NO because of the NULL transmission problem mentioned above prohibits
VDS and any existing externals from transmittting the desired data to the network.

YES because I found a work around. There is a wonderful FREE and simple program at www.snmpview.de that will do the network polling and log the results to a file. I then scan the the log file at regular intervals to obtain the data which I customize and filter with VDS. So , indirectly, it works quite well. I am now monitoring temperature environments at
several distant communication sites in my province.

So thanks to MAC for the suggestion to scan log files (BTW the native
device wasnt capable of logging). Worship
And to Tommy for that information on the NULL character. Worship Worship
And also to Lutz Schulz , the author of SNMPVIEW. Worship Worship Worship

Anyboby interested in Network monitoring or device monitoring could approach it in a like manner, probably with good results.


REB

_________________
OLD and eager!
Back to top
View user's profile Send private message
vdsalchemist
Admin Team


Joined: 23 Oct 2001
Posts: 1448
Location: Florida, USA

PostPosted: Fri Jan 17, 2003 1:39 pm    Post subject: Reply with quote

Hi Rebel49,
Actually this is not really true. There is an External DLL that can transfer that NULL character. I just have not had time to build a SNMP example for the Gadget.dll.... But yes you can build character Arrays that have NULL characters in the array at different locations and read those characters out. I just don't think that there are any External DLL's that deal specifically with Network protocols that can handle these characters.

It is very possible to do every thing that you are trying to do with the Gadget.dll Wink

_________________
Home of

Give VDS a new purpose!
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group