This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

XMPP client continuously recieving message after logout

Other Parts Discussed in Thread: CC3200

Dear All:

    I use the XMPP client example in the CC3200 SDK to connect to my XMPP server (OpenFire). Everything seems fine, but after I leave the CC3200 for some minutes, it will logout from the server. And then, the client continuously shows the last message before logout. I tried to stop the XMPP server but the client is still showing the message.

   Could anybody help the question please?

  • Hi Tonny,

    Please share the below information:

    • Did you modify the SDK example or you are using it as it is?
    • Can you also share the service pack version you are using?

    Service pack version should be printed as 

    Build Version x.x.x.x.31.x.x.......

    Regards,

    Ankur

  • Hi Ankur,

       Thanks a lot for your reply.

       I haven't changed anything of the XMPP client sample code. But I don't know how to find the version of service pack, would you tell me please?

      However, I found another thing may be the reason for the problem. In the main.c, there're the following code of the function "XmppClient":

    while ( Status < 0)
    {
    MAP_UtilsDelay(10000);
    Status = sl_NetAppXmppRecv(pRemoteJid, REMOTE_USERID_LEN, pRecvMessage, RECV_MSG_LEN );
    }

    // the code is omitted

    Status = sl_NetAppXmppSend(pRemoteJid, strlen((char*)pRemoteJid),pRecvMessage,
    strlen((char*)pRecvMessage) );

    and the function of sl_NetAppXmppRecv shows in the xmpp.c that,

    Status = sl_Recv(g_SockID, g_RecvBuf, BUF_SIZE*2, 0);

    //the code is omitted

    return Status;

    In my option, if the connection is closed by remote server, the return value of both "sl_Recv" and "sl_Send" be 0. Hence, the "Status" in the function "XmppClient" would be always 0 in the case, and because of 0<0 is false, it will continuously toggle the LED and send the message to the server.

    Could you help to check the analysis please?

    Thanks a lot. 

     

  • Hello, Can you share connection settings for connection to OpenFire? I've succeded to run the samples with SDK example to gmail account, but cannot connect to local OpenFire server. Thanks.
  • I've finally founded the solution, maybe it can be usefull for other guys that need help. My solution was to configure XmppOption.SecurityMethod = SL_SO_SEC_METHOD_SSLv3_TLSV1_2;
    XmppOption.SecurityCypher = SL_SEC_MASK_SECURE_DEFAULT;
    After this the XMPP SDK example runs flawless.
    Regards.