| View previous topic :: View next topic |
| Author |
Message |
Rebel49 Contributor


Joined: 23 Aug 2002 Posts: 78 Location: Nova Scotia, Canada
|
Posted: Mon Aug 26, 2002 10:57 pm Post subject: SNMP possible? |
|
|
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.
Any hints or example code would be dynamite!!!
thanks,eh!
rebel49 |
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Tue Aug 27, 2002 12:22 am Post subject: |
|
|
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.
Cheers, Mac  _________________ 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 |
|
 |
Skit3000 Admin Team

Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
Posted: Tue Aug 27, 2002 8:18 am Post subject: |
|
|
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 |
|
 |
Rebel49 Contributor


Joined: 23 Aug 2002 Posts: 78 Location: Nova Scotia, Canada
|
Posted: Sun Jan 12, 2003 11:37 pm Post subject: Is @CHR(0) the kiss of death |
|
|
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.
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.
Any thoughts,comments or work arounds greatly appreciated
REB _________________ OLD and eager! |
|
| Back to top |
|
 |
cnodnarb Professional Member


Joined: 11 Sep 2002 Posts: 766 Location: Eastman, GA
|
|
| Back to top |
|
 |
Rebel49 Contributor


Joined: 23 Aug 2002 Posts: 78 Location: Nova Scotia, Canada
|
Posted: Mon Jan 13, 2003 2:15 am Post subject: Is @CHR(0) the kiss of death? |
|
|
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........
 _________________ OLD and eager! |
|
| Back to top |
|
 |
Tommy Admin Team
Joined: 16 Nov 2002 Posts: 746 Location: The Netherlands
|
Posted: Mon Jan 13, 2003 3:14 pm Post subject: |
|
|
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 |
|
 |
Rebel49 Contributor


Joined: 23 Aug 2002 Posts: 78 Location: Nova Scotia, Canada
|
Posted: Mon Jan 13, 2003 4:30 pm Post subject: @CHR(0) is the kiss of death! |
|
|
That confirms my suspicions..
Curses! Foiled again!
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 |
|
 |
Rebel49 Contributor


Joined: 23 Aug 2002 Posts: 78 Location: Nova Scotia, Canada
|
Posted: Fri Jan 17, 2003 2:05 am Post subject: and the answer is....... |
|
|
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).
And to Tommy for that information on the NULL character.
And also to Lutz Schulz , the author of SNMPVIEW.
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 |
|
 |
vdsalchemist Admin Team

Joined: 23 Oct 2001 Posts: 1448 Location: Florida, USA
|
Posted: Fri Jan 17, 2003 1:39 pm Post subject: |
|
|
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  _________________ Home of
Give VDS a new purpose!
 |
|
| Back to top |
|
 |
|