Menu

Send Message not Working for me

2008-10-15
2012-09-15
  • Gregoire Diboula

    Hi,

    I have ICQ 6 on both ends and i'm trying to send a message from one user to the other one. Although i can login into the sender account, i seem not to be able to send messages. I got the latest from CVS. Here are my log messages and thanks in advacne for any input.

    15.10.2008 11:15:13 JOscarLib.Core.OscarPacketAnalyser handleService
    INFO: Received 1 - 3
    15.10.2008 11:15:13 JOscarLib.Core.OscarPacketAnalyser handleService
    INFO: --> JOscarLib.Packet.Received.ServerReady1_3 loaded
    15.10.2008 11:15:13 JOscarLib.Core.OscarPacketAnalyser handleService
    INFO: Received 1 - 24
    15.10.2008 11:15:13 JOscarLib.Core.OscarPacketAnalyser handleService
    INFO: --> JOscarLib.Packet.Received.ServerFamilies
    1_24 loaded
    15.10.2008 11:15:13 JOscarLib.Core.OscarPacketAnalyser handleService
    INFO: Received 1 - 19
    15.10.2008 11:15:13 JOscarLib.Core.OscarPacketAnalyser handleService
    INFO: --> JOscarLib.Packet.Received.Motd1_19 loaded
    15.10.2008 11:15:14 JOscarLib.Core.OscarPacketAnalyser handleService
    INFO: Received 1 - 7
    15.10.2008 11:15:14 JOscarLib.Core.OscarPacketAnalyser handleService
    INFO: --> JOscarLib.Packet.Received.RateReply
    1_7 loaded
    15.10.2008 11:15:14 JOscarLib.Core.OscarPacketAnalyser handleService
    INFO: Received 2 - 3
    15.10.2008 11:15:14 JOscarLib.Core.OscarPacketAnalyser handleService
    INFO: --> JOscarLib.Packet.Received.LocationRightsReply2_3 loaded
    15.10.2008 11:15:14 JOscarLib.Core.OscarPacketAnalyser handleService
    INFO: Received 3 - 3
    15.10.2008 11:15:14 JOscarLib.Core.OscarPacketAnalyser handleService
    INFO: --> JOscarLib.Packet.Received.BuddyListRightsReply
    3_3 loaded
    15.10.2008 11:15:14 JOscarLib.Core.OscarPacketAnalyser handleService
    INFO: Received 4 - 5
    15.10.2008 11:15:14 JOscarLib.Core.OscarPacketAnalyser handleService
    INFO: --> JOscarLib.Packet.Received.ICBMParametersReply4_5 loaded
    15.10.2008 11:15:14 JOscarLib.Core.OscarPacketAnalyser handleService
    INFO: Received 1 - 15
    15.10.2008 11:15:14 JOscarLib.Core.OscarPacketAnalyser handleService
    INFO: --> JOscarLib.Packet.Received.OnlineInfoResp
    1_15 loaded
    15.10.2008 11:15:14 JOscarLib.Core.OscarPacketAnalyser handleService
    INFO: Received 9 - 3
    15.10.2008 11:15:14 JOscarLib.Core.OscarPacketAnalyser handleService
    INFO: --> JOscarLib.Packet.Received.BosRightReply9_3 loaded
    15.10.2008 11:15:14 JOscarLib.Core.OscarPacketAnalyser handleService
    INFO: Received 19 - 3
    15.10.2008 11:15:14 JOscarLib.Core.OscarPacketAnalyser handleService
    INFO: --> JOscarLib.Packet.Received.RespSSILimits
    19_3 loaded
    max contacts : 3000
    max groups : 51
    max visible contacts : 1000
    max invisibles contacts : 1000
    max vis/inv bitmask : 1
    max presence info fields : 1
    max ignore list entries : 128
    15.10.2008 11:15:14 JOscarLib.Core.OscarPacketAnalyser handleService
    INFO: Received 11 - 2
    15.10.2008 11:15:14 JOscarLib.Core.OscarPacketAnalyser handleService
    INFO: --> JOscarLib.Packet.Received.MinReportInterval11_2 loaded
    Report interval : 30h
    15.10.2008 11:15:14 JOscarLib.Core.OscarPacketAnalyser handleService
    INFO: Received 1 - 10
    15.10.2008 11:15:14 JOscarLib.Core.OscarPacketAnalyser handleService
    INFO: Received 4 - 12
    15.10.2008 11:15:14 JOscarLib.Core.OscarPacketAnalyser handleService
    INFO: --> JOscarLib.Packet.Received.MessageAck
    4_12 loaded
    15.10.2008 11:15:14 JOscarLib.Core.OscarPacketAnalyser handleService
    INFO: Received 1 - 15
    15.10.2008 11:15:14 JOscarLib.Core.OscarPacketAnalyser handleService
    INFO: --> JOscarLib.Packet.Received.OnlineInfoResp__1_15 loaded

     
    • Gregoire Diboula

      Here is what i can say about my settings:

      1) I one computer, call it C1
      2) On this computer i have two virtual machines V1 and V2;
      3) the java code is running on C1 and i have two ICQ clients on V1 and V2
      4) The ICQ users on V1 and V2 can chat with each other without problem
      5) In one test case i run the Java example using V2's user. On V2, ICQ will disconnect the user with the message "Someone has signed in to your account on a different computer" And while the Java code is runing with V2's user, V1 will show that the V2's user is online.
      6) I can change my online status form the Java code with the following:

      OscarInterface.changeStatus(con, new StatusModeEnum(StatusModeEnum.AWAY));

      7) When the test code is executed i can see that the following instryction is indeed executed: OscarInterface.sendBasicMessage(con, receiver, "Dude, I'm online !");
      I have a debug message before and after it.

      8) In another trial, i installed ICQ on C1 where the Java code is running. i got the same result. I could see the user on the Java code running and i could see the status changed. But i got no chat message.

      9) I replaced the JOscar build with the source code with the aim of denuging it. What i saw is that the packet with the chat message is indeed being sent to the server. That is OscarClient.sendPacket is called.

      Attached is the log message using the latest code from repository.

      So, what else can i do, any idea?

      Thanks,
      gregoire

      Jar file location; F:\Development\workspace\Voovu\JOscarLib.jar
      20.10.2008 21:11:57 JOscarLib.Core.JarClassLoader cacheClasses
      INFO: Jar file location; F:\Development\workspace\Voovu\JOscarLib.jar
      20.10.2008 21:11:58 JOscarLib.Core.OscarPacketAnalyser handleService
      INFO: Received 1 - 3
      20.10.2008 21:11:58 JOscarLib.Core.OscarPacketAnalyser handleService
      INFO: --> JOscarLib.Packet.Received.ServerReady1_3 loaded
      20.10.2008 21:11:58 JOscarLib.Core.OscarPacketAnalyser handleService
      INFO: Received 1 - 24
      20.10.2008 21:11:58 JOscarLib.Core.OscarPacketAnalyser handleService
      INFO: --> JOscarLib.Packet.Received.ServerFamilies
      1_24 loaded
      20.10.2008 21:11:58 JOscarLib.Core.OscarPacketAnalyser handleService
      INFO: Received 1 - 19
      20.10.2008 21:11:58 JOscarLib.Core.OscarPacketAnalyser handleService
      INFO: --> JOscarLib.Packet.Received.Motd1_19 loaded
      20.10.2008 21:11:58 JOscarLib.Core.OscarPacketAnalyser handleService
      INFO: Received 1 - 7
      20.10.2008 21:11:58 JOscarLib.Core.OscarPacketAnalyser handleService
      INFO: --> JOscarLib.Packet.Received.RateReply
      1_7 loaded
      20.10.2008 21:11:58 JOscarLib.Core.OscarPacketAnalyser handleService
      INFO: Received 2 - 3
      20.10.2008 21:11:58 JOscarLib.Core.OscarPacketAnalyser handleService
      INFO: --> JOscarLib.Packet.Received.LocationRightsReply2_3 loaded
      20.10.2008 21:11:58 JOscarLib.Core.OscarPacketAnalyser handleService
      INFO: Received 3 - 3
      20.10.2008 21:11:58 JOscarLib.Core.OscarPacketAnalyser handleService
      INFO: --> JOscarLib.Packet.Received.BuddyListRightsReply
      3_3 loaded
      20.10.2008 21:11:58 JOscarLib.Core.OscarPacketAnalyser handleService
      INFO: Received 4 - 5
      20.10.2008 21:11:58 JOscarLib.Core.OscarPacketAnalyser handleService
      INFO: --> JOscarLib.Packet.Received.ICBMParametersReply4_5 loaded
      20.10.2008 21:11:58 JOscarLib.Core.OscarPacketAnalyser handleService
      INFO: Received 9 - 3
      20.10.2008 21:11:58 JOscarLib.Core.OscarPacketAnalyser handleService
      INFO: --> JOscarLib.Packet.Received.BosRightReply
      9_3 loaded
      20.10.2008 21:11:58 JOscarLib.Core.OscarPacketAnalyser handleService
      INFO: Received 1 - 15
      20.10.2008 21:11:58 JOscarLib.Core.OscarPacketAnalyser handleService
      INFO: --> JOscarLib.Packet.Received.OnlineInfoResp1_15 loaded
      20.10.2008 21:11:58 JOscarLib.Core.OscarPacketAnalyser handleService
      INFO: Received 19 - 3
      max contacts : 3000
      max groups : 51
      20.10.2008 21:11:58 JOscarLib.Core.OscarPacketAnalyser handleService
      INFO: --> JOscarLib.Packet.Received.RespSSILimits
      19_3 loaded
      max visible contacts : 1000
      max invisibles contacts : 1000
      max vis/inv bitmask : 1
      max presence info fields : 1
      max ignore list entries : 128
      update received; sending message
      Message sent
      20.10.2008 21:11:58 JOscarLib.Core.OscarPacketAnalyser handleService
      INFO: Received 11 - 2
      Report interval : 30h
      20.10.2008 21:11:58 JOscarLib.Core.OscarPacketAnalyser handleService
      INFO: --> JOscarLib.Packet.Received.MinReportInterval11_2 loaded
      20.10.2008 21:11:58 JOscarLib.Core.OscarPacketAnalyser handleService
      INFO: Received 1 - 10
      20.10.2008 21:11:59 JOscarLib.Core.OscarPacketAnalyser handleService
      INFO: Received 4 - 12
      20.10.2008 21:11:59 JOscarLib.Core.OscarPacketAnalyser handleService
      INFO: --> JOscarLib.Packet.Received.MessageAck
      4_12 loaded
      20.10.2008 21:11:59 JOscarLib.Core.OscarPacketAnalyser handleService
      INFO: Received 1 - 15
      20.10.2008 21:11:59 JOscarLib.Core.OscarPacketAnalyser handleService
      INFO: --> JOscarLib.Packet.Received.OnlineInfoResp1_15 loaded
      20.10.2008 21:12:03 JOscarLib.Core.OscarPacketAnalyser handleService
      INFO: Received 1 - 10
      20.10.2008 21:12:03 JOscarLib.Core.OscarPacketAnalyser handleService
      INFO: Received 4 - 12
      20.10.2008 21:12:03 JOscarLib.Core.OscarPacketAnalyser handleService
      INFO: --> JOscarLib.Packet.Received.MessageAck
      4_12 loaded

       
    • Lolo101

      Lolo101 - 2008-10-15

      Hi Gregoire and thanks for using JOscarLib !

      From the log you show, i can tell your message was correctly send to the server because you recieve the 4-12 SNAC (MessageAck) from server.
      However, the server seems to have NOT relayed your message to the peer because you went over server's rate limit.
      I invite you to read this : http://iserverd1.khstu.ru/oscar/rate_limits.html
      for more information about rate limits.

      Hope this helps ! ;o)

       
    • Gregoire Diboula

      Thanks for the clarification. Got two follow up questions:

      1) is the API supposed to work with AIM?
      2) Is there a way to control the rate limit from the JOscar?

      Best,

      gregoire.

       
      • Lolo101

        Lolo101 - 2008-10-16

        Gregoire,

        1) The API aims ICQ protocol only, not AIM.
        The two protocols are very close, except for some functionalities that require the UIN to be numeric, whereas AIM uses arbitrary string as user ID, and other subtleties.
        Actually I guess it would be quite easy to make the lib works with AIM, but i dont have the time for it... I should be not much change, but it would have to be cautiously thought.
        2) For the moment there's no support for rate limit. I'll add a Feature Request about that ;)

         
    • Gregoire Diboula

      Thanks for the reply. I waited one day and then trried sending the message again; it still didn't work. Then i created two different accounts on two different windows machines and tried from there and nothing worked :(.

      The only success i had was that the login was working.

      Do you think that sponsoring one or two evening tow make the library compatible to AIM would make sense?

      Thanks,

      Klaus.

       
      • Daniel

        Daniel - 2008-10-17

        Hi guys,

        Just a small addition: the lib does support both ICQ and AIM but in a limited fashion. You can login to an ICQ server with an ICQ account and message ICQ users. Similarly, you can login to an AIM server with an AIM account and message AIM users.

        In addition, the AIM and ICQ networks have been connected to each other for a while now and it's the inter-network messaging that didn't work when I tried it.

        This was tested a while ago though, and I didn't look that deeply into it but I'm not so sure that it's so trivial to implement.

         
    • Gregoire Diboula

      I'm really no lucking with JOscar. I waited one day long and then tried again and again. The few first times i get the trace that i pasted above. After some times i will get the rate limit exceeded exception.

      So, as long as the rate limit is not reached, i can login. I know this because the ICQ client where my test user is loged in is disconnected by ICQ. But my messages are never delivered.

      I tried AIM but it also didn't work.

      Seems i'm pretty unlucky guy.

      gregoire.

       
      • Lolo101

        Lolo101 - 2008-10-19

        It's difficult to see what's the problem just with the trace you provided.
        Is it possible to see the code you use ? And the content of the message you try to send ? Because you said:
        "The few first times i get the trace that i pasted above. After some times i will get the rate limit exceeded exception. "
        But in the trace you pasted you already have a rate limit message... Unfortunately it's not handled at all. I'll code a handler for this SNAC 1-10. Stay tuned !

         
    • Gregoire Diboula

      Here is the latest trace:

      Received 1 - 3
      --> JOscarLib.Packet.Received.ServerReady1_3 loaded
      Received 1 - 24
      --> JOscarLib.Packet.Received.ServerFamilies
      1_24 loaded
      Received 1 - 19
      --> JOscarLib.Packet.Received.Motd1_19 loaded
      Received 1 - 7
      --> JOscarLib.Packet.Received.RateReply
      1_7 loaded
      Received 2 - 3
      --> JOscarLib.Packet.Received.LocationRightsReply2_3 loaded
      Received 3 - 3
      --> JOscarLib.Packet.Received.BuddyListRightsReply
      3_3 loaded
      Received 4 - 5
      --> JOscarLib.Packet.Received.ICBMParametersReply4_5 loaded
      Received 1 - 15
      --> JOscarLib.Packet.Received.OnlineInfoResp
      1_15 loaded
      Received 9 - 3
      --> JOscarLib.Packet.Received.BosRightReply9_3 loaded
      Received 19 - 3
      max contacts : 3000
      max groups : 51
      max visible contacts : 1000
      max invisibles contacts : 1000
      max vis/inv bitmask : 1
      max presence info fields : 1
      max ignore list entries : 128
      --> JOscarLib.Packet.Received.RespSSILimits
      19_3 loaded
      Received 11 - 2
      Report interval : 30h
      --> JOscarLib.Packet.Received.MinReportInterval11_2 loaded
      Received 1 - 15
      --> JOscarLib.Packet.Received.OnlineInfoResp
      1_15 loaded

      And my code is following:

      import java.util.;
      import JOscarLib.Core.
      ;
      import JOscarLib.Tool.*;

      /
      JOscarLib provides a simple interface to perform current tasks such
      as sending messages, which is defined in OScarInterface class.<br/>
      */

      public class SampleSendMessage implements Observer {
      private static final String SERVER = "login.icq.com";
      private static final int PORT = 5190;
      private OscarConnection con;
      private String receiver;

      public SampleSendMessage(String login, String password, String receiver) {
      this.receiver = receiver;
      con = new OscarConnection(SERVER, PORT, login, password);
      con.getPacketAnalyser().setDebug(true);
      //con.getPacketAnalyser().getJarClassLoader().setPath("war/WEB-INF/lib/JOscarLib.jar");
      / to be notify when connection is ready. /
      con.addObserver(this);
      }

      public void update(Observable obs, Object obj) {
      OscarInterface.sendBasicMessage(con, receiver, "Dude, I'm online !");
      }

      public static void main(String[] args) {
      if (args.length < 3) {
      System.out.println("Use : SampleSendMessage MY_UIN MY_PASSWORD RECEIVER_UIN");
      }
      else {
      SampleSendMessage sample = new SampleSendMessage(args[0], args[1], args[2]);
      }
      }
      }

      Thanks,

      gregoire.

       
      • Lolo101

        Lolo101 - 2008-10-20

        Ok, it's the basic sendMessage test.
        The code looks ok, but in the trace i dont see any message sent.
        In the previous trace, i could see the message sent and acknowledged... And the rate limit warning.
        Here, it looks like you just logged in.

         

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.