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
Regular Contributor
Posts: 59
Registered: ‎05-10-2012
My Device: 8800
My Carrier: verizon

SSL Socket connection, wifi, local network and carrier wireless

Hi folks

 

I'm testing on a Bold and a Curve, both running OS v5

 

I'm have been using the following code to make an ssl connection:

 

conn = (StreamConnection)Connector.open("ssl://"+server+":10036;interface=wifi");

 

Its been working on both the Bold and the Curve when they are connected to my local wireless network.

 

Problems arise on the Bold when I disconnect from my local wireless network and use my carrier's network.  It shows up in Manage Connections | Wi-Fi Options as "AT&T Wi-Fi"

 

When I'm using "AT&T Wi-Fi" the above code fails to connect.  I believe I get an IOException, but would have to double check to be sure.

 

The following code:

 

conn = (SecureConnection) Connector.open("ssl://"+server+":10036;deviceside=true", Connector.READ_WRITE);

 

establishes a connection when the Curve uses local home network only, when the Bold uses local home network only
BUT throws an IOException "Tunnel failure" for the Bold using AT&T WiFi only.

 

Even more confusing, the follow code:

 

conn = (SecureConnection) Connector.open("ssl://"+server+":10036;deviceside=true", Connector.READ_WRITE);

establishes a connection for the Bold using AT&T wifi only and for the Bold using local home network only.  It establishes a connection on the Curve using local home network only but then the connection halts when a phone call is received.

 

I'm a bit at a loss why "interface=wifi" isn't working with the "AT&T WiFi" connection.  Is it an ssl thing?  Should I be using a StreamConnection instead of a SecureConnection?

 

Mark