Discussion:
TidSNMP indy example?
(too old to reply)
Mindaugas
2003-07-11 10:27:39 UTC
Permalink
????

Thank You very much!
Zeiss Contarex
2003-07-12 00:08:24 UTC
Permalink
If you got Delphi 6 then you should find a demo in the directory
C:\Program Files\Borland\Delphi6\Demos\Indy\MailClient (standard
installation of course:-).

Download it from http://www.indyproject.org/download/Indy9.html if you've
haven't got any indy demo's (they are not shipped with Delphi 7 (if am
correct?))

If not you haven't got Delphi 6, try to install it from the
Post by Mindaugas
????
Thank You very much!
Chad Z. Hower aka Kudzu
2003-07-12 16:30:22 UTC
Permalink
Post by Zeiss Contarex
If you got Delphi 6 then you should find a demo in the directory
C:\Program Files\Borland\Delphi6\Demos\Indy\MailClient (standard
He's looking for SNMP, not SMTP though. :)


--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
"Programming is an art form that fights back"

Qualified help FAST with Indy Experts Support
from the experts themselves:

http://www.atozedsoftware.com/indy/experts/support.html


ELKNews - Get your free copy at http://www.atozedsoftware.com
NeonBlue
2003-07-12 09:10:22 UTC
Permalink
Mr. Hower instead of laughing to this demo topic, please develop a little
demo app for us in 5 min :))

Kind Regards,
Post by Chad Z. Hower aka Kudzu
Post by Zeiss Contarex
If you got Delphi 6 then you should find a demo in the directory
C:\Program Files\Borland\Delphi6\Demos\Indy\MailClient (standard
He's looking for SNMP, not SMTP though. :)
--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
"Programming is an art form that fights back"
Qualified help FAST with Indy Experts Support
http://www.atozedsoftware.com/indy/experts/support.html
ELKNews - Get your free copy at http://www.atozedsoftware.com
Chad Z. Hower aka Kudzu
2003-07-13 02:50:25 UTC
Permalink
Post by NeonBlue
Mr. Hower instead of laughing to this demo topic, please develop a little
demo app for us in 5 min :))
Im sorry but I just dont have 5 minutes to devote to ever user in this group
- I wish I did. Furthermore Im not an expert on every protocol, Indy is very
big. SNMP is one that I am not an expert in. And SNMP is very "broad" so to
develop a demo would likely not address your situation, and would certainly
take more than 5 minutes.


--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
"Programming is an art form that fights back"

Want more Indy stuff? Try the Atozed Indy Portal at
http://www.atozedsoftware.com/
* More Free Demos
* Free Articles
* Extra Support


ELKNews - Get your free copy at http://www.atozedsoftware.com
Chad Z. Hower aka Kudzu
2003-07-13 14:12:24 UTC
Permalink
OK, I got - it is impossible to make a demo in 5 minutes!?
A) Yes. As I said, Im not the SNMP expert.

B) If I spent 5 minutes writing your demo - everyone is going to expect that.
And it wont be 5 minutes - it will be much more. Then each day I'll do
nothing but write peoples demos for free, I'll have to forget about my job,
then I'll have to beg in the metro and wont be able to answer any ones
questions.


--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
"Programming is an art form that fights back"

Need extra help with an Indy problem?

http://www.atozedsoftware.com/indy/experts/support.html


ELKNews - Get your free copy at http://www.atozedsoftware.com
Mindaugas
2003-07-13 11:25:01 UTC
Permalink
OK, if nobody has a demo, maybe anybody has a link to demo???
And why IndyDemos have no TidSNMP demo?
Thanks!
Post by Chad Z. Hower aka Kudzu
OK, I got - it is impossible to make a demo in 5 minutes!?
A) Yes. As I said, Im not the SNMP expert.
B) If I spent 5 minutes writing your demo - everyone is going to expect that.
And it wont be 5 minutes - it will be much more. Then each day I'll do
nothing but write peoples demos for free, I'll have to forget about my job,
then I'll have to beg in the metro and wont be able to answer any ones
questions.
--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
"Programming is an art form that fights back"
Need extra help with an Indy problem?
http://www.atozedsoftware.com/indy/experts/support.html
ELKNews - Get your free copy at http://www.atozedsoftware.com
g***@hotmail.com
2003-07-18 18:23:21 UTC
Permalink
After the SendQuery, you're looking at the IdSNMP1.Query members. You
should be looking into the IdSNMP1.Reply members:

IdSNMP1.active:=true;
IdSNMP1.Query.Clear;
IdSNMP1.Query.Host:='192.168.100.1';
IdSNMP1.Query.Port:=161;
IdSNMP1.Query.MIBAdd('1.3.6.1.2.1.1.1.0','');
IdSNMP1.Query.PDUType:=PDUGetRequest;
IdSNMP1.SendQuery;
if IdSNMP1.Reply.ValueCount>0 then
Edit1.Text:=IntToStr(IdSNMP1.Reply.ValueCount)+':
'+IdSNMP1.Reply.Value[0]
else
Edit1.Text:='Value count zero';
IdSNMP1.active:=false;
Hi,
I got one, but it seems that it is not working - returns empty string in any
case.
IdSNMP1.active:=true;
IdSNMP1.Host:='192.168.100.1';
IdSNMP1.Port:=161;
IdSNMP1.Query.Clear;
IdSNMP1.Query.Host:='192.168.100.1';
IdSNMP1.Query.Port:=161;
IdSNMP1.Query.MIBAdd('1.3.6.1.2.1.1.4.0','');
IdSNMP1.Query.PDUType:=PDUGetNextRequest;
IdSNMP1.SendQuery;
if IdSNMP1.Query.ValueCount>0 then
Edit1.Text:=IntToStr(IdSNMP1.Query.ValueCount)+': '+IdSNMP1.Query.Value[0]
else
Edit1.Text:='Value count zero';
IdSNMP1.active:=false;
What i am doing wrong?
Mindaugas
Post by Mindaugas
And why IndyDemos have no TidSNMP demo?
Probably because no one has written one.
--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
"Programming is an art form that fights back"
Want to keep up to date with Indy?
Join Indy News - it free!
http://www.atozedsoftware.com/indy/news/
ELKNews - Get your free copy at http://www.atozedsoftware.com
Mindaugas
2003-07-20 12:19:18 UTC
Permalink
Thank You in deep!
now it works fine!
Post by g***@hotmail.com
After the SendQuery, you're looking at the IdSNMP1.Query members. You
IdSNMP1.active:=true;
IdSNMP1.Query.Clear;
IdSNMP1.Query.Host:='192.168.100.1';
IdSNMP1.Query.Port:=161;
IdSNMP1.Query.MIBAdd('1.3.6.1.2.1.1.1.0','');
IdSNMP1.Query.PDUType:=PDUGetRequest;
IdSNMP1.SendQuery;
if IdSNMP1.Reply.ValueCount>0 then
'+IdSNMP1.Reply.Value[0]
else
Edit1.Text:='Value count zero';
IdSNMP1.active:=false;
Hi,
I got one, but it seems that it is not working - returns empty string in any
case.
IdSNMP1.active:=true;
IdSNMP1.Host:='192.168.100.1';
IdSNMP1.Port:=161;
IdSNMP1.Query.Clear;
IdSNMP1.Query.Host:='192.168.100.1';
IdSNMP1.Query.Port:=161;
IdSNMP1.Query.MIBAdd('1.3.6.1.2.1.1.4.0','');
IdSNMP1.Query.PDUType:=PDUGetNextRequest;
IdSNMP1.SendQuery;
if IdSNMP1.Query.ValueCount>0 then
'+IdSNMP1.Query.Value[0]
Post by g***@hotmail.com
else
Edit1.Text:='Value count zero';
IdSNMP1.active:=false;
What i am doing wrong?
Mindaugas
Post by Mindaugas
And why IndyDemos have no TidSNMP demo?
Probably because no one has written one.
--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
"Programming is an art form that fights back"
Want to keep up to date with Indy?
Join Indy News - it free!
http://www.atozedsoftware.com/indy/news/
ELKNews - Get your free copy at http://www.atozedsoftware.com
Lukas Gebauer
2003-07-14 08:47:44 UTC
Permalink
But here in Indy are IdSNMP1.Query, IdSNMP1.Reply, etc... - why?
Chad Z.! Could you write me a working code in 5 minutes,
which would snmpget('.1.3.6.1.2.1.1.4.0')?
Leave Indy and get Synapse. (SNMP implementation in INDY is based on my
Synapses code!)

In Synapse I have this simple function:

function SNMPGet(const OID, Community, SNMPHost: string; var Value:
string): Boolean;

OID is your '1.3.6.1.2.1.1.4.0', Communicty is community string for yous
SNMp query (if you not know this, then try 'public'), SNMPhost is
address of your SNMP server. When fynction retur true (succes), then you
have readed value in Value string.

Simple, or not? ;-)
--
Lukas Gebauer.
http://www.ararat.cz/synapse/ - Synapse Delphi and Kylix TCP/IP Lib.
t***@gmail.com
2020-04-05 18:42:13 UTC
Permalink
Post by Mindaugas
????
Thank You very much!
It's been a long time since this thread was active, but I thought I'd add a surprising discovery about this component (or SNMP in general).

I've seen other posts that have a leading decimal for OIDs, so I thought it was the normal syntax. I was using this:
".1.3.6.1.4.1.3808.1.1.1.3.2.1.0"
I could run a test with the Paessler SNMP tester and it worked perfectly.

However, when I used the same string with the Synapse release 40 SNMPget function in the SnmpTest project, it didn't work. I could see the request and response on Wireshark, but the response was always empty.

I noticed that the failing requests from SNMPget looked like this:
"get-request itu-t.1.3.6.1.4.1.3808.1.1.1.3.2.1.0"

The successful requests from Paessler SNMP tester looked like this:
"get-request 1.3.6.1.4.1.3808.1.1.1.3.2.1.0"

I found that I had to remove the leading decimal from the MIB OID number to prevent the itu-t prefix being added: "1.3.6.1.4.1.3808.1.1.1.3.2.1.0"
then it would be sent correctly and a valid response would be received.

I was curious where the "itu-t" prefix was coming from, but that string is not found in any of the Synapse libraries, so it is a mystery.
Loading...