How to access openfire server from another local machine using smack4.1 for android?

Hi all,

I am using local network.

I am trying to access openfire server from another local machine using smack4.1 for android app. But i am unable get success.

The openfire server running on host: “10.42.0.10”

Android app running on : “10.42.0.3”

Here is my code (i am using smack4.1):

XMPPTCPConnectionConfiguration.Builder configBuilder = XMPPTCPConnectionConfiguration.builder();

configBuilder.setSecurityMode(XMPPTCPConnectionConfiguration.SecurityMode.disabl ed);

configBuilder.setServiceName(“localhost”);

configBuilder.setPort(5222);

configBuilder.setHost(“10.42.0.10”);

configBuilder.setDebuggerEnabled(false);

mConnection = new XMPPTCPConnection(configBuilder.build());

I am unable to get which was wrong in my code.

I really hanged here since couple of weeks. Could any one help me regarding this issue?

Thanks in advance…