Not logged in. · Lost password · Register
Forum: agsXMPP RSS
Avatar
St3v3 #1
Member since Oct 2013 · 6 posts
Group memberships: Members
Show profile · Link to this post
Subject: Problem sending presence
In my application I set AutoPresence = true and I also tried setting the following:
  1. // sgc, none of this seems to make any diffrence
  2. Presence p = new Presence(ShowType.chat, "Online");
  3. p.Type = PresenceType.available;
  4. xmppCon.Send(p);
  5. xmppCon.Status = "OnLine";
  6. xmppCon.Show = agsXMPP.protocol.client.ShowType.chat;
  7.  
  8. xmppCon.SendMyPresence();

I have established two way communication with an Android app and my app (see the last two lines of xml) but the Android app never sees my client as anything other than offline.

  1. Send: <stream:stream to='lightwitch.org' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0' xml:lang='en'>
  2. Recv: <stream:stream xmlns:stream="http://etherx.jabber.org/streams" xml:lang="en" id="0919242f-bd86-4793-8ff8-f39bebf4cfd5" from="lightwitch.org" version="1.0" >
  3. 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>SCRAM-SHA-1</mechanism></mechanisms></stream:features>
  4. Send: <starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls" />
  5. Recv: <proceed xmlns="urn:ietf:params:xml:ns:xmpp-tls" />
  6. Send: <stream:stream to='lightwitch.org' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0' xml:lang='en'>
  7. Recv: <stream:stream xmlns:stream="http://etherx.jabber.org/streams" xml:lang="en" id="1b54e0a5-bb88-41f8-978b-a89daa5c81d8" from="lightwitch.org" version="1.0" >
  8. Recv: <stream:features xmlns:stream="http://etherx.jabber.org/streams"><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>PLAIN</mechanism><mechanism>EXTERNAL</mechanism><mechanism>SCRAM-SHA-1</mechanism></mechanisms></stream:features>
  9. Send: <auth xmlns="urn:ietf:params:xml:ns:xmpp-sasl" mechanism="SCRAM-SHA-1">biwsbj1iaWdnZXJwYyxyPS9sdmRPYXA2b1hPKzl3VWRWTHpuaEx6MjQwSm14VDhY</auth>
  10. Recv: <challenge xmlns="urn:ietf:params:xml:ns:xmpp-sasl">cj0vbHZkT2FwNm9YTys5d1VkVkx6bmhMejI0MEpteFQ4WDE2YWQyZGMwLWZiYjEtNGE1MC1hYjlkLTVhZmEzYTMxOGQzOSxzPU5HVm1NekE0WkRrdE5XVmtPQzAwTW1KbUxXSTJaamN0T0dSbE9EbGlNV0ZoWVdaaixpPTQwOTY=</challenge>
  11. Send: <response xmlns="urn:ietf:params:xml:ns:xmpp-sasl">Yz1iaXdzLHI9L2x2ZE9hcDZvWE8rOXdVZFZMem5oTHoyNDBKbXhUOFgxNmFkMmRjMC1mYmIxLTRhNTAtYWI5ZC01YWZhM2EzMThkMzkscD1MMkI0MDhIUEszREhQRnl1RzVEU2FEVlRvNzA9</response>
  12. Recv: <success xmlns="urn:ietf:params:xml:ns:xmpp-sasl">dj1FUGlkZi9hUE8rclVHUXdXaG01RklwUmJEMUE9</success>
  13. Send: <stream:stream to='lightwitch.org' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0' xml:lang='en'>
  14. Recv: <stream:stream xmlns:stream="http://etherx.jabber.org/streams" xml:lang="en" id="ef3ac7c3-f554-4ad8-a31e-a069c8628068" from="lightwitch.org" version="1.0" >
  15. Recv: <stream:features xmlns:stream="http://etherx.jabber.org/streams"><c xmlns="http://jabber.org/protocol/caps" node="http://lightwitch.org/metronome" ver="P9PJszr3/Ggzh4twC5j/sbMCktM=" hash="sha-1" /><ver xmlns="urn:xmpp:features:rosterver" /><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"><required /></bind><session xmlns="urn:ietf:params:xml:ns:xmpp-session"><optional /></session></stream:features>
  16. Send: <iq id="agsXMPP_1" type="set"><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"><resource>agsXMPP</resource></bind></iq>
  17. Recv: <iq xmlns="jabber:client" id="agsXMPP_1" type="result"><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"><jid>bpc@lightwitch.org/agsXMPP</jid></bind></iq>
  18. Send: <iq id="agsXMPP_2" type="set" to="lightwitch.org"><session xmlns="urn:ietf:params:xml:ns:xmpp-session" /></iq>
  19. Recv: <iq xmlns="jabber:client" to="bpc@lightwitch.org/agsXMPP" id="agsXMPP_2" type="result" from="lightwitch.org" />
  20. Send: <iq id="agsXMPP_3" type="get" to="lightwitch.org"><query xmlns="jabber:iq:agents" /></iq>
  21. Send: <iq id="agsXMPP_4" type="get"><query xmlns="jabber:iq:roster" /></iq>
  22. Recv: <iq xmlns="jabber:client" to="bpc@lightwitch.org/agsXMPP" id="agsXMPP_3" type="error" from="lightwitch.org"><error type="cancel"><service-unavailable xmlns="urn:ietf:params:xml:ns:xmpp-stanzas" /></error></iq>
  23. Recv: <iq xmlns="jabber:client" to="bpc@lightwitch.org/agsXMPP" id="agsXMPP_4" type="result"><query xmlns="jabber:iq:roster" ver="1" /></iq>
  24. Send: <presence><status /><priority>5</priority></presence>
  25. Send: <presence><show>chat</show><status>Online</status></presence>
  26. Send: <presence><show>chat</show><status>OnLine</status><priority>5</priority></presence>
  27. Recv: <presence xmlns="jabber:client" from="bpc@lightwitch.org/agsXMPP"><status /><priority>5</priority></presence>
  28. Recv: <presence xmlns="jabber:client" from="jm@lightwitch.org" type="subscribe" />
  29. Recv: <presence xmlns="jabber:client" from="bpc@lightwitch.org/agsXMPP"><show>chat</show><status>Online</status></presence>
  30. Recv: <presence xmlns="jabber:client" from="bpc@lightwitch.org/agsXMPP"><show>chat</show><status>OnLine</status><priority>5</priority></presence>
  31. Recv: <message xmlns="jabber:client" to="bpc@lightwitch.org/agsxmpp" id="T4Qae-1688" type="chat" from="jm@lightwitch.org/androidBHriiX27"><body>Hello</body><thread>87OGV7bkPi1x</thread><request xmlns="urn:xmpp:receipts" /></message>
  32. Send: <message type="chat" to="JM@lightwitch.org"><body>Hi back</body></message>
This post was edited 3 times, last on 2013-11-02, 11:47 by St3v3.
Edit reason: Please use code and xml formatting in future posts
Avatar
Alex #2
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
in your log the server returns an empty contact list.
The server publishes your presence only to your subscribed contacts. You have none of them.

Alex
Avatar
St3v3 #3
Member since Oct 2013 · 6 posts
Group memberships: Members
Show profile · Link to this post
When you say that out loud it makes perfect sense. And after fixing that detail it works exactly as it should.
Vielen Dank!
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