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
serge_o
Posts: 3
Registered: ‎03-28-2009
Accepted Solution

HTTP Connectivity Problem from a device

Hello,


I am working on an application that will work with our web server over HTTP and HTTPS.

 

As this is a consumer application, we want to make it work without MDS, out-of-the-box when a smartphone is purchased retail with a web access data plan.  

 

I assumed that this means using Direct TCP when Wi-Fi is not available.

 

The following code snippet prepares the URL depending on configuration and opens the connection:

 

        String fullUrl = (isSecure ? "https://" : "http://") + appConfig.getServerHost() + "/" + url + (bbAppState.isWiFiOnly() ? ";interface=wifi" : "") + (bbAppState.isDeviceSide() ? ";deviceside=true" : "");


            c = (HttpConnection) Connector.open(fullUrl, Connector.READ_WRITE, true);

 

 

Device and network details:

 

Device: 8320
OS 4.5.0.81
T-Mobile US network
Have a data plan (Unlimited web and 400 messages)
Connection preference: Wi-Fi preferred
No apn is specified
Browser and third party apps downloaded from App World can access internet via both Wi-Fi and EDGE/GPRS with the settings above
 


Tried:

  1. Wi-Fi and EDGE: deviceside=true - getting "Tunnel failed"
  2. Wi-Fi and EDGE: no deviceside, only the url - getting "Tunnel failed"
  3. no deviceside, only interface=wifi - works over Wi-Fi, reports "Tunnel failed" when out of Wi-Fi range.
  4. I tried setting APN to internet2.voicestream.com just to test - got the same "Tunnel failed" error.  I would not want to use that as the browser and other apps don't need it and work when APN is blank.


My question is if I am doing something wrong, or missing something.  My hypothesis is that the browser and third-party apps use BlackBerry Internet Service.  Is there a way to find out?  Is there a way to disable it (e.g. to make sure the browser and other apps do use it)? Our company recently became a BlackBerry Alliance Partner, so we can apply for BlackBerry Internet Service, but I don't understand if this is needed for consumer applications, or whether consumer applications should rely on Direct TCP.

 

Any help will be greatly appreciated.

 

Thanks,

Sergey

Please use plain text.
Developer
peter_strange
Posts: 19,515
Registered: ‎07-14-2008

Re: HTTP Connectivity Problem from a device

To use ";deviceside=true", you also have to specify the APN details, either in the options for the device or in the string that you supply with ";deviceside=true".  if you don't, you will get "Tunnel failed".

 

I would confirm the APN settings for T-Mobile - the value you used doesn't match what I find in a google search.

 

Browser and other apps will use either WAP 2.0 or BIS-B, both of which don't require any configuration.  You could use WAP 2.0 - the standard KB article for details:

 

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

 

Recommendation - Use BIS-B (Alliance Partner service) if you can, works in more cases that anything else.

Please use plain text.
New Developer
serge_o
Posts: 3
Registered: ‎03-28-2009

Re: HTTP Connectivity Problem from a device

Thank you so much Peter!

 

To test quickly, I put in wap.voicestream.com into the APN name and it worked.  Thanks for sending the link describing how to enumerate service entries to make it generic.

 

One thing I've noticed connecting through WAP was a considerable latency added on top of the usual 1sec EDGE latency - I would say extra 3-4 seconds were added.  Is this normal for WAP gateways?  Do you happen to know if latency is better with BIS?

 

Thanks again for your help!

Sergey

Please use plain text.
Developer
peter_strange
Posts: 19,515
Registered: ‎07-14-2008

Re: HTTP Connectivity Problem from a device

Sorry I can't really comment on the WAP performance that you see.  I would suggest that it is likely to be carrier dependent.  I can say that we have what I would call very good performance from BIS-B.
Please use plain text.