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
New Developer
mskrebs
Posts: 10
Registered: ‎10-23-2009
My Device: Not Specified

Re: wifi or 3G Socket Connections - immediately after wifi connection, 3G connection works

Hello,

 

I am working with a BlackBerry BOLD 9000 with OS 4.6.0. The 3G TCP connection service provider is Rogers.

The handset nevere had an IT policy or a connection through a BES server. The Firewall option is Disabled.

We have a test j2me client application that can use wifi or 3G independently through the deviceside=true to receive data from our webserver.
The handset Firewall option is Disabled.
We are having trouble making a socket connection through 3G - with wifi there is no problem.
I have also verified that when I try 3G that I can access the server server through an http connection.
The strangest behavior is if I first access the socket successfully in a wifi connection and then immediately turn off wifi and try to access through 3G, it works! If I close the application and wait a few minutes and try again, I cannot connect through 3G, but of course have no trouble making a socket connection through wifi or using an http connection.
Would this have something to do with the version of my OS. The last time I upgraded the system software was the end of August, 2009?
Retired
bzubert
Posts: 86
Registered: ‎07-11-2008
My Device: Not Specified

Re: wifi or 3G Socket Connections - immediately after wifi connection, 3G connection works

[ Edited ]

To make a wifi connection, should use ;interface=wifi.  For direct TCP on Rogers, you need to specify the APN information either manually via Options > Advanced Options > TCP or programmatically via ;deviceside=true;apn=internet.com

Brian Zubert
Technical Partnership Manager
Research In Motion
New Developer
mskrebs
Posts: 10
Registered: ‎10-23-2009
My Device: Not Specified

see next message

[ Edited ]
 
New Developer
mskrebs
Posts: 10
Registered: ‎10-23-2009
My Device: Not Specified

Re: wifi or 3G Socket Connections - immediately after wifi connection, 3G connection works

Hi Brian,

 

Thanks. We're doing that( for wifi and TCP) and wifi does work independently and very successfully.

 

The problem is with making the raw socket connection (which works perfectly with wifi) work with 3G reliably.

 

The 3G connection does seems to work if we exit the application and immediately switch to 3G.

 

Our application in this context is just a test utility that downloads and writes some data to the socket.

(we are not using port 80)

 

If I wait a few minutes after a successful wifi or 3G read/write and try again, 3G cannot make the connection.

Trying it again through wifi always succeeds.

 

Would there be an issue with the TCP stack?

 

Regards,

 

Mark

 

 

New Developer
mskrebs
Posts: 10
Registered: ‎10-23-2009
My Device: Not Specified

Re: wifi or 3G Socket Connections - immediately after wifi connection, 3G connection works

note: alternatively, an http connection over 3G will always work reliably

New Developer
mskrebs
Posts: 10
Registered: ‎10-23-2009
My Device: Not Specified

Re: wifi or 3G Socket Connections - immediately after wifi connection, 3G connection works

Hi,

 

We have done this in our code and wifi is working properly and 3G does work properly when streaming data from our

server over an http connection.

 

We can stream data through wifi from our server with a raw socket connection and if we use 3G alone immediately after a wifi connection, that will work too.

 

What doesn't work is using 3G if there has not been a successful wifi (or 3G) connection a few seconds before.

 

We have built a test utility just to connect with the socket and download/upload very small amounts of data to it...so the problem has nothing to do with our server side video streaming application software.

New Developer
mskrebs
Posts: 10
Registered: ‎10-23-2009
My Device: Not Specified

Re: wifi or 3G Socket Connections - immediately after wifi connection, 3G connection works

Hi Brian,

 

Thanks. We're doing that( for wifi and TCP) and wifi does work independently and very successfully.

 

The problem is with making the raw socket connection (which works perfectly with wifi) work with 3G reliably.

 

The 3G connection does seems to work if we exit the application and immediately switch to 3G.

 

Our application in this context is just a test utility that downloads and writes some data to the socket.

(we are not using port 80)

 

If I wait a few minutes after a successful wifi or 3G read/write and try again, 3G cannot make the connection.

Trying it again through wifi always succeeds.

 

Would there be an issue with the TCP stack?

 

Regards,

 

Mark

New Developer
mskrebs
Posts: 10
Registered: ‎10-23-2009
My Device: Not Specified

Re: wifi or 3G Socket Connections - immediately after wifi connection, 3G connection works

Has anyone else had a similar experience with BlackBerry 3G and raw socket connections?

BlackBerry Development Advisor
MSohm
Posts: 14,757
Registered: ‎07-09-2008
My Device: BlackBerry Passport

Re: wifi or 3G Socket Connections - immediately after wifi connection, 3G connection works

What happens when you try to connect?  Are you able to connect to your server and the connection fails?  Or does it fail to connect to your server at all?  What exception is thrown and what are its toString details?  What line of code is triggering the exception?

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
New Developer
mskrebs
Posts: 10
Registered: ‎10-23-2009
My Device: Not Specified

Re: wifi or 3G Socket Connections - immediately after wifi connection, 3G connection works

Hi,

 

We don't have any problem connecting over wifi.

 

If we turn off wifi and reconnect using the 3G connection quickly, the connection also works.

 

If there is a delay, say, 1 minute or so, before attempting the connection, the 3G connection does not work.

 

What I have described above is simply a test utility we've written in j2me (all our programming is in j2me) that simply writes/reads a string of data to the socket.  In the case of the 3G that doesn't work, the connection is made from the client to the server but then is dropped after a few seconds without a server timeout. There is no error message.

 

Here is the address of our utility: http://logovis.ath.cx/multifeed09/dv/     It is a small java midlet called DeviceValidator.

 

Note: this is not through http. We have other video applications which stream through http (either wifi or 3G, etc) and there are no connection problems. See www.mymovy.com  (all http streaming)

 

Regards,

 

Mark