Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

TidSNMP indy example?

1,239 views
Skip to first unread message

Mindaugas

unread,
Jul 11, 2003, 6:27:39 AM7/11/03
to
????

Thank You very much!


Zeiss Contarex

unread,
Jul 11, 2003, 8:08:24 PM7/11/03
to
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
"Mindaugas" <ad...@roventa.lt> wrote in message
news:3f0e...@newsgroups.borland.com...

Chad Z. Hower aka Kudzu

unread,
Jul 12, 2003, 12:30:22 PM7/12/03
to
"Zeiss Contarex" <ze...@contarex.com> wrote in news:3f0f516f$1
@newsgroups.borland.com:

> 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

unread,
Jul 12, 2003, 5:10:22 AM7/12/03
to
Mr. Hower instead of laughing to this demo topic, please develop a little
demo app for us in 5 min :))

Kind Regards,

"Chad Z. Hower aka Kudzu" <cp...@hower.org> wrote in message
news:Xns93B6750...@127.0.0.1...

Mindaugas

unread,
Jul 12, 2003, 11:50:21 AM7/12/03
to

Which version of MIBs it supports?
I spend 10 hours, but can't get TidSNMP working, while all other snmp tools
worked fine.
For example php on Win2K has snmpset, snmpget, snmpwalk - everything there
is clear and works perfect.
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')?
Thanks in deep!

Mindaugas


"NeonBlue" <neonb...@hotmail.com> wrote in message
news:3f0f...@newsgroups.borland.com...

Chad Z. Hower aka Kudzu

unread,
Jul 12, 2003, 10:50:25 PM7/12/03
to
"NeonBlue" <neonb...@hotmail.com> wrote in news:3f0fd080
@newsgroups.borland.com:

> 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

Mindaugas

unread,
Jul 12, 2003, 4:19:57 PM7/12/03
to
OK, I got - it is impossible to make a demo in 5 minutes!?
While in PHP i done everything i need with SNMP in 5 minutes.

:(((((

M.

"Chad Z. Hower aka Kudzu" <cp...@hower.org> wrote in message

news:Xns93B6DE2...@127.0.0.1...

Chad Z. Hower aka Kudzu

unread,
Jul 13, 2003, 10:12:24 AM7/13/03
to
"Mindaugas" <ad...@roventa.lt> wrote in news:3f10...@newsgroups.borland.com:

> 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

Mindaugas

unread,
Jul 13, 2003, 7:25:01 AM7/13/03
to
OK, if nobody has a demo, maybe anybody has a link to demo???
And why IndyDemos have no TidSNMP demo?
Thanks!


"Chad Z. Hower aka Kudzu" <cp...@hower.org> wrote in message

news:Xns93B75DA...@127.0.0.1...

Chad Z. Hower aka Kudzu

unread,
Jul 13, 2003, 8:30:42 PM7/13/03
to
"Mindaugas" <ad...@roventa.lt> wrote in news:3f1141e9$1
@newsgroups.borland.com:

> 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/

Lukas Gebauer

unread,
Jul 14, 2003, 4:47:44 AM7/14/03
to
Mindaugas wrote:

> 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.

Mindaugas

unread,
Jul 17, 2003, 11:14:16 AM7/17/03
to
Hi,

I got one, but it seems that it is not working - returns empty string in any
case.
Here it is:

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


"Chad Z. Hower aka Kudzu" <cp...@hower.org> wrote in message

news:Xns93B7C67...@127.0.0.1...

guit...@hotmail.com

unread,
Jul 18, 2003, 2:23:21 PM7/18/03
to
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;

Mindaugas

unread,
Jul 20, 2003, 8:19:18 AM7/20/03
to
Thank You in deep!
now it works fine!

<guit...@hotmail.com> wrote in message news:3F183B...@hotmail.com...

tim....@gmail.com

unread,
Apr 5, 2020, 2:42:14 PM4/5/20
to
On Friday, July 11, 2003 at 5:27:39 AM UTC-5, Mindaugas wrote:
> ????
>
> 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.



0 new messages