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
Contributor
Posts: 17
Registered: ‎08-06-2012
My Device: Curve 9320
My Carrier: Vodaphone
Accepted Solution

Connection Time out Error Curve 9320

Hi,

 

My Blackberry curve 9320 device has got a vodaphone SIM, wifi is activated. But when I try to make a http connection, it is showing 'connection timeout error'. The connection is working fine in simulator.

 

s = (StreamConnection) Connector.open(reqStr+";deviceside=true;interface=wifi",Connector.READ_WRITE);
 httpConn = (HttpConnection) s;

 

if I don't add the parameter  interface=wifi, then it shows 'wifi not avaialble'.

 

The device browser is working fine.

 

Please help.

Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: Connection Time out Error Curve 9320

Before we start looking at this problem, I wonder if you are aware of all the possibilities regarding the methods that applications can connect?  I recommend reviewing at least these two things:

 

http://supportforums.blackberry.com/t5/Java-Development/Networking-Transports-II/ta-p/446742

 

http://supportforums.blackberry.com/t5/Java-Development/Different-ways-to-make-an-HTTP-or-socket-con...

 

If this is all familiar to you, then you need to determine which method you are going to use to connect.  Assuming you are trying to develop on OS 5.0,and above then you could use ConnectionFactory or develop your own method of choosing the connection.  Both work fine, but there are quite a number of Threads that talk about connection problems with these.  I recommend you search round to find advise, you should find all you need to know already in Threads in the forum.  . 

Contributor
Posts: 17
Registered: ‎08-06-2012
My Device: Curve 9320
My Carrier: Vodaphone

Re: Connection Time out Error Curve 9320

Hi,

 

I used the ConnectionFactory class and added deviceside=true, and it is working fine now.

 

Thanks

Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: Connection Time out Error Curve 9320

[ Edited ]

If you are using ConnectionFactory you should not need to add anything like ";deviceside=true".  ConnectionFactory should add the correct suffix.  Try it again without that.