Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Highlighted
Developer
Posts: 211
Registered: ‎04-29-2009
My Device: Not Specified
Accepted Solution

TCP connection problem

Hi,

I am trying to connect to a remote server through socket connection from Blackberry Pearl 8100 device.

I am not able to connect.

I have set APN name provided by service provider.

Also, i am passing "deviceside=true" in url for direct tcp connection. I am not able to connect to server.

What can be done? Please help...

 

 

Developer
Posts: 745
Registered: ‎01-04-2009
My Device: 8300, 8800, 8700f, 9000

Re: TCP connection problem

what exception do You get?
Developer
Posts: 905
Registered: ‎02-07-2009
My Device: BlackBerry Torch 9800
My Carrier: Globe Telecom

Re: TCP connection problem

were you able to set the APN in you device options? it's either you set the apn specifics under device options or you can append it in you url.
Developer
Posts: 3,951
Registered: ‎07-15-2008
My Device: Not Specified

Re: TCP connection problem

Any exceptions getting generated?

 

Is teh remote server you trying to access is on public IP? Is the same code working on Simulator?


Use Search. "Accept Solution" If the problem is resolved.
Developer
Posts: 211
Registered: ‎04-29-2009
My Device: Not Specified

Re: TCP connection problem

[ Edited ]

IO Exception is thrown. The server has a public IP address. My url is as follows:

 

"socket://ip : port;deviceside=true"; 

 

And through simulator I am able to exchange data successfully. 

Also, how do I append APN settings in url?
Message Edited by tejaswini on 09-16-2009 03:18 PM
Developer
Posts: 3,951
Registered: ‎07-15-2008
My Device: Not Specified

Re: TCP connection problem

Something like this....

 

socket://ipSmiley Tongueort;deviceside=true;apn=apn.com;TunnelAuthUsername=uid;TunnelAuthPassword=password

 

TunnelAuthUsername and TunnelAuthPassword is required for few operators.

 

socket://ipSmiley Tongueort;deviceside=true;apn=apn.com


Use Search. "Accept Solution" If the problem is resolved.
Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: TCP connection problem

Here are links to the relevant KB articles:

 

How To - Specify APN information for a direct TCP connection 
Article Number: DB-00532
http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800451/800563/How_To_...

 

 

What Is - Different ways to make an HTTP or socket connection
Article Number: DB-00396
http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800451/800563/What_Is...

Developer
Posts: 211
Registered: ‎04-29-2009
My Device: Not Specified

Re: TCP connection problem

Hi,

I tried with hardcoding apn name in url,

but still not able to connect...

please help 

Developer
Posts: 3,951
Registered: ‎07-15-2008
My Device: Not Specified

Re: TCP connection problem

I guess this is related to the GPRS data plan on your device. Have you checked with any other SIM?

Use Search. "Accept Solution" If the problem is resolved.
Developer
Posts: 905
Registered: ‎02-07-2009
My Device: BlackBerry Torch 9800
My Carrier: Globe Telecom

Re: TCP connection problem

can you try to validate your sim card with your operator if it has a right data plan? can you try browsing using RIM browser?