Not logged in. · Lost password · Register
Forum: agsXMPP RSS
Visual Basic 2003, Connecting to Google Talk
Avatar
mikesena #1
Member since Apr 2006 · 7 posts
Group memberships: Members
Show profile · Link to this post
Subject: Unable to Use!  Please Help!
Hi,

I want to make a client that connects to Google Talk using Visual Basic 2003 (well preferably VB6 but you don't support that :) )

I have seen this:
http://www.ag-software.net/index.php?option=content&ta…

How do I do this in VB?  Can someone give me a working sample?  I'd greatly appreciate it.

Btw, I have seen the MiniClientVB sample, but I can't get that to work at all, let alone connect to a server.

Michael
Avatar
Jabberer #2
Member since Feb 2006 · 249 posts
Group memberships: Members
Show profile · Link to this post
Hello,

To get the MiniClient working with google talk you have to update the code like mentioned in the link you posted.
Set the AutoResolveConnectServer = true or xmpp.ConnectServer = "talk.google.com";
You have to add this in the Login Form in the MiniClient.

If you prefer VB6 then you have to compile a activeX component from agsXMPP which is possible with .NET. There are some articles in the MSDN library how to do that. But if you start your client form scratch this would make no sense for me.
Software Developer
AG-Software
This post was edited on 2006-04-19, 08:51 by Jabberer.
Avatar
mikesena #3
Member since Apr 2006 · 7 posts
Group memberships: Members
Show profile · Link to this post
I've tried adding those things in and it doesn't work.  Are you able to test them?

And yes that is pointless to do that, i'm happy to stick with 2003
Avatar
Alex #4
Member since Feb 2003 · 4317 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Hello,

i just downloaded the VS2003 MiniClient VB sample and added the following line in frmLogin.vb in line 236:

_connection.ConnectServer = "talk.google.com"

So the Click event of the login Button looks like that:

Private Sub cmdLogin_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdLogin.Click
    Dim jid As Jid = New Jid(txtJid.Text)
    _connection.Server = jid.Server
    _connection.Username = jid.User
    _connection.Password = txtPassword.Text
    _connection.Resource = txtResource.Text
    _connection.Priority = CType(numPriority.Value, Integer)
    _connection.Port = Integer.Parse(txtPort.Text)
    _connection.UseSSL = chkSSL.Checked
    _connection.RegisterAccount = chkRegisterAccount.Checked
    _connection.ConnectServer = "talk.google.com"

    Me.DialogResult = DialogResult.OK
    SaveSettings()
    Me.Close()
End Sub

works for me with several gmail accounts without problems. There are sometimes problems with the SRV Lookups for GTalk, so its better to specify the ConnectServer yourself instead of using the AutoResolveConnectServer property.

Alex
Avatar
mikesena #5
Member since Apr 2006 · 7 posts
Group memberships: Members
Show profile · Link to this post
SEND: <stream:stream to='gmail.com' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0' xml:lang='en'>

RECV: <stream:stream xmlns:stream="http://etherx.jabber.org/streams" version="1.0" from="gmail.com" id="1BB8BD7F50FCB696" >


That's all I got with port 5222 and use SSL unchecked.  I tried adding starttls but that didn't help.

A couple of times, I managed to somehow receive another message, but then when miniclient sent a reply to that message, nothing came back.

What's wrong?

            _connection.Server = jid.Server
            _connection.Username = jid.User
            _connection.Password = txtPassword.Text
            _connection.Resource = txtResource.Text
            _connection.Priority = CType(numPriority.Value, Integer)
            _connection.Port = Integer.Parse(txtPort.Text)
            _connection.UseSSL = chkSSL.Checked
            _connection.RegisterAccount = chkRegisterAccount.Checked
            _connection.ConnectServer = "talk.google.com"
            Me.DialogResult = DialogResult.OK
            SaveSettings()
            Me.Close()

That's my current cmdLogin_Click code
Avatar
Jabberer #6
Member since Feb 2006 · 249 posts
Group memberships: Members
Show profile · Link to this post
your code looks OK.
Can you try to get the debug directly from the socket (incoming and outgoing). Then we can see if this debug is everything that is coming from the google server, or if there is more. Then we can narrow down the problems.
Did you try to connect to another server? Feel free to use our server at ag-software.de for testing.
Did you try one of the other MiniClients? c# version or vs2005 version?
Software Developer
AG-Software
This post was edited on 2006-04-19, 08:51 by Jabberer.
Avatar
mikesena #7
Member since Apr 2006 · 7 posts
Group memberships: Members
Show profile · Link to this post
How do I test your server?
Avatar
Jabberer #8
Member since Feb 2006 · 249 posts
Group memberships: Members
Show profile · Link to this post
Hello,

take a jabber client of your choice and create account. After that you should be able to login with this account using the MiniClient samples.
here is a list of available jabber /XMPP clients: http://www.jabber.org/software/clients.shtml
Software Developer
AG-Software
This post was edited on 2006-04-19, 08:51 by Jabberer.
Avatar
mikesena #9
Member since Apr 2006 · 7 posts
Group memberships: Members
Show profile · Link to this post
I downloaded and installed GAIM and created a new jabber account on ag-software.de, called "sena", so "sena@ag-software.de"

I then opened up mini client (clean, nothing changed) and entered "sena@ag-software.de", my password, priority 10, port 5222, resource MiniClient, ssl wasn't ticked, i didn't register an account.

The debug came up with this:

SEND: <stream:stream to='ag-software.de' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0'>
RECV: <stream:stream xmlns:stream="http://etherx.jabber.org/streams" version="1.0" from="ag-software.de" xml:lang="en" id="b0bedff6" >
RECV: <stream:features xmlns:stream="http://etherx.jabber.org/streams"><starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls" /><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>CRAM-MD5</mechanism><mechanism>DIGEST-MD5</mechanism><mechanism>PLAIN</mechanism><mechanism>ANONYMOUS</mechanism></mechanisms><compression xmlns="http://jabber.org/features/compress"><method>zlib</method></compression><auth xmlns="http://jabber.org/features/iq-auth" /><register xmlns="http://jabber.org/features/iq-register" /></stream:features>
SEND: <starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls" />
Avatar
Jabberer #10
Member since Feb 2006 · 249 posts
Group memberships: Members
Show profile · Link to this post
Hello,

it looks like your client is hanging in the StartTLS process. This looks for me like the Mono.Security problem in this thread:
http://forum.ag-software.de/forum.php?req=thread&id=135.
Could you try it with UseStartTLS = false and the new Mono.Security.dll?
Software Developer
AG-Software
Avatar
mikesena #11
Member since Apr 2006 · 7 posts
Group memberships: Members
Show profile · Link to this post
Ok, I changed usestarttls to false.  I got this:

SEND: <stream:stream to='ag-software.de' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0'>
RECV: <stream:stream xmlns:stream="http://etherx.jabber.org/streams" version="1.0" from="ag-software.de" xml:lang="en" id="5a69085b" >
RECV: <stream:features xmlns:stream="http://etherx.jabber.org/streams"><starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls" /><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>CRAM-MD5</mechanism><mechanism>DIGEST-MD5</mechanism><mechanism>PLAIN</mechanism><mechanism>ANONYMOUS</mechanism></mechanisms><compression xmlns="http://jabber.org/features/compress"><method>zlib</method></compression><auth xmlns="http://jabber.org/features/iq-auth" /><register xmlns="http://jabber.org/features/iq-register" /></stream:features>
SEND: <auth xmlns="urn:ietf:params:xml:ns:xmpp-sasl" mechanism="DIGEST-MD5" />

Then it stops, same number of send and receives.

What's this new mono.security thing?

EDIT:  I see the mono.security thing, but I can't download it.  I'm downloading showattachment.cgi for some reason.  Would it be possible for you to send it to my email?  mikesena[at]gmail[colon]com

(it's not colon, it's dot, but it's for anti bot thingos :))
This post was edited on 2006-04-19, 15:53 by mikesena.
Avatar
Jabberer #12
Member since Feb 2006 · 249 posts
Group memberships: Members
Show profile · Link to this post
Hello,

the Mono.Security library is used for SSL encryption and StartTLS.
But your last log stops somewhere else. So i dont think the SSL library is the problem. Could you try to debug the MiniClient with the agsXMPP library?
Could you try the c# version and the VS2005 version? If you don't have VS20005 could you please try the binary version of the .NET 2.0 MiniClient?

PS: you can rename showattachment.cgi to Mono.Security.dll. If its about 260KB then it should be OK.
Software Developer
AG-Software
Avatar
mikesena #13
Member since Apr 2006 · 7 posts
Group memberships: Members
Show profile · Link to this post
With the binary versoin of VS2005, VB version I got:
SEND: <stream:stream to='ag-software.de' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0'>
RECV: <stream:stream xmlns:stream="http://etherx.jabber.org/streams" from="ag-software.de" version="1.0" xml:lang="en" id="be39276a" >
RECV: <stream:features xmlns:stream="http://etherx.jabber.org/streams"><starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls" /><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>CRAM-MD5</mechanism><mechanism>DIGEST-MD5</mechanism><mechanism>PLAIN</mechanism><mechanism>ANONYMOUS</mechanism></mechanisms><compression xmlns="http://jabber.org/features/compress"><method>zlib</method></compression><auth xmlns="http://jabber.org/features/iq-auth" /><register xmlns="http://jabber.org/features/iq-register" /></stream:features>
SEND: <starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls" />

With the binary version of VS2005

SEND: <stream:stream to='ag-software.de' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0'>
RECV: <stream:stream xmlns:stream="http://etherx.jabber.org/streams" from="ag-software.de" version="1.0" xml:lang="en" id="6c2b7ae7" >
RECV: <stream:features xmlns:stream="http://etherx.jabber.org/streams"><starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls" /><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>CRAM-MD5</mechanism><mechanism>DIGEST-MD5</mechanism><mechanism>PLAIN</mechanism><mechanism>ANONYMOUS</mechanism></mechanisms><compression xmlns="http://jabber.org/features/compress"><method>zlib</method></compression><auth xmlns="http://jabber.org/features/iq-auth" /><register xmlns="http://jabber.org/features/iq-register" /></stream:features>
SEND: <starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls" />

And socket debug:

SEND: <stream:stream to='ag-software.de' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0'>

RECV: <?xml version='1.0' encoding='UTF-8'?><stream:stream xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client" from="ag-software.de" id="6c2b7ae7" xml:lang="en" version="1.0"><stream:features><starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls"></starttls><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>CRAM-MD5</mechanism><mechanism>DIGEST-MD5</mechanism><mechanism>PLAIN</mechanism><mechanism>ANONYMOUS</mechanism></mechanisms><compression xmlns="http://jabber.org/features/compress"><method>zlib</method></compression><auth xmlns="http://jabber.org/features/iq-auth"/><register xmlns="http://jabber.org/features/iq-register"/></stream:features>

SEND: <starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls" />



I tried using that new Mono.Security thing, and got:

SEND: <stream:stream to='ag-software.de' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0'>
RECV: <stream:stream xmlns:stream="http://etherx.jabber.org/streams" version="1.0" from="ag-software.de" xml:lang="en" id="11b9b9db" >
RECV: <stream:features xmlns:stream="http://etherx.jabber.org/streams"><starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls" /><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>CRAM-MD5</mechanism><mechanism>DIGEST-MD5</mechanism><mechanism>PLAIN</mechanism><mechanism>ANONYMOUS</mechanism></mechanisms><compression xmlns="http://jabber.org/features/compress"><method>zlib</method></compression><auth xmlns="http://jabber.org/features/iq-auth" /><register xmlns="http://jabber.org/features/iq-register" /></stream:features>
SEND: <auth xmlns="urn:ietf:params:xml:ns:xmpp-sasl" mechanism="DIGEST-MD5" />
Avatar
Alex #14
Member since Feb 2003 · 4317 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Hello,

can you please contact us by email. We will send you a binary version then which works 100% on or machines. If this doesnt work on your machine, then we have no idea whats going on. You have to debug the code then step by step to see why it stops.

Alex
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Forum: agsXMPP RSS