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
arbiarbi
Posts: 7
Registered: ‎01-19-2009
My Device: Not Specified

Network issue impossible to resolve for us - please help

[ Edited ]

Hi,

 

We have built an application that uses JDE 4.2.1 and connects to an HTTP based rest service to fetch data.  Already thousands of users are active users of this application, however, some of our users are reporting that the application fails to connect to the web service.

 

We had already tried all the different network connectivity techniques discussed on this forum, to make sure that we try every transport mechanism available on any user's device (e.g. WiFi, BES, WAP2 and DirectTCP) except BIS because we are not ISV partners and WAP because we can not ask our users to give APN settings inside the application.

 

After all else failed, we integrated the network diagnostic tool in our code and asked the users having problems to send us their logs.  Here comes the most frustrating part.  The log shows failed connections for all transport modes but the user insists that all other applications for example gmail and opera are working on their device.  I have attached such a log from a user who insists that our application only works on WiFi while his other applications (opera, gmail etc.) do work on his regular EDGE/GPRS connection.  Looking at this log, we are at the end of our wits.  Can anyone shed any light on what other possibility we can try?  Please note that this log is from the first request sent by the application so any "tunnel failed" messages cannot be because of excessive http connections.

 

I will really appreciate a quick response from the RIM team if they are reading this.  Please see the log below.  BTW, we have masked the URL for privacy reasons.  Please assume that the user who reported this issue is able to browse to http://www.oururl.com from his or her blackberry browser.

 

Thanks.

Perturbed BB developers.

 

------------------------------------------------------------------------------------------------- 

 Transport: Direct TCP (HTTP)

Result: fail

Response: -1

Length: -1

URL: http://www.oururl.com:80/helpdata/blackberry/OurApp.jad;deviceside=true

Log:

 

Coverage Status: Online

Connecting to http://www.oururl.com:80/helpdata/blackberry/OurApp.jad;deviceside=true

Openning connection

Tunnel failed

========END OF LOG========

 

Transport: Direct TCP (Socket)

Result: fail

Response: -1

Length: -1

URL: socket://www.oururl.com:80;deviceside=true

Log:

 

Connecting socket to socket://www.oururl.com:80;deviceside=true

Openning connection

Tunnel failed

========END OF LOG========

 

Transport: MDS (HTTP)

Result: fail

Response: -1

Length: -1

URL: No url available

Log:

 

Skipped test: No MDS service records found.

Skipped test: MDS coverage is not available

 

Transport: MDS (Socket)

Result: fail

Response: -1

Length: -1

URL: No url available

Log:

 

Skipped test: No MDS service records found.

Skipped test: MDS coverage is not available

 

Transport: Unite (HTTP)

Result: fail

Response: -1

Length: -1

URL: No url available

Log:

 

Skipped test: No Unite service records found.

Skipped test: Unite coverage is not available

 

Transport: Unite (Socket)

Result: fail

Response: -1

Length: -1

URL: No url available

Log:

 

Skipped test: No Unite service records found.

Skipped test: Unite coverage is not available

 

Transport: BIS-B (HTTP)

Result: fail

Response: -1

Length: -1

URL: www.oururl.com:80/helpdata/blackberry/OurApp.jad;***

Log:

 

Coverage Status: Online

Connecting to http://www.oururl.com:80/helpdata/blackberry/OurApp.jad;deviceside=false

Openning connection

Invalid url parameter.

========END OF LOG========

 

Transport: BIS-B (Socket)

Result: fail

Response: -1

Length: -1

URL: www.oururl.com:80/helpdata/blackberry/OurApp.jad;***

Log:

 

Connecting socket to socket://www.oururl.com:80;deviceside=false

Openning connection

Invalid url parameter.

========END OF LOG========

 

Transport: WAP (HTTP)

Result: fail

Response: -1

Length: -1

URL: No url available

Log:

 

Coverage Status: Online

Skipped test: No WAP service records found.

Skipped test: Please provide WAP parameters

 

Transport: WAP (Socket)

Result: fail

Response: -1

Length: -1

URL: No url available

Log:

 

Skipped test: No WAP service records found.

Skipped test: Please provide WAP parameters

 

Transport: WAP2 (HTTP)

Result: fail

Response: -1

Length: -1

URL: http://www.oururl.com:80/helpdata/blackberry/OurApp.jad;deviceside=true;ConnectionUID=WAP2 trans

Log:

 

Coverage Status: Online

Connecting to http://www.oururl.com:80/helpdata/blackberry/OurApp.jad;deviceside=true;ConnectionUID=WAP2 trans

Openning connection

Tunnel failed

========END OF LOG========

 

Transport: WAP2 (Socket)

Result: fail

Response: -1

Length: -1

URL: socket://www.oururl.com:80;deviceside=true;ConnectionUID=WAP2 trans

Log:

 

Connecting socket to socket://www.oururl.com:80;deviceside=true;ConnectionUID=WAP2 trans

Openning connection

Tunnel failed

========END OF LOG========

 

Transport: WiFi (HTTP)

Result: pass

Response: 200

Length: 1550

URL: http://www.oururl.com:80/helpdata/blackberry/OurApp.jad;interface=wifi

Log:

 

Coverage Status: Online

Connecting to http://www.oururl.com:80/helpdata/blackberry/OurApp.jad;interface=wifi

Openning connection

Connection opened

Getting response code

Got response: 200

Reading content

Received content. Length: 1550

Closing connection

Connection closed

========END OF LOG========

 

Transport: WiFi (Socket)

Result: pass

Response: 400

Length: 447

URL: socket://www.oururl.com:80;interface=wifi

Log:

 

Connecting socket to socket://www.oururl.com:80;interface=wifi

Openning connection

Connection opened

OutputStream opened

Sent:

GET /helpdata/blackberry/OurApp.jad HTTP/1.0

 

 

Received content. Length: 447

Closing connection

Connection closed

========END OF LOG========


Message Edited by arbiarbi on 09-09-2009 03:39 AM
Please use plain text.
Developer
marchywka
Posts: 1,415
Registered: ‎07-30-2008
My Device: Not Specified

Re: Network issue impossible to resolve for us - please help

What vendor ID or network are they using? AFAIK tunnell failure goes with need for an APN. You can try dumping the service

book and see if you can figure out what records opera or google use that may help. Maybe you can extract the APN info

 

 

 

Please use plain text.
New Developer
arbiarbi
Posts: 7
Registered: ‎01-19-2009
My Device: Not Specified

Re: Network issue impossible to resolve for us - please help

Hey, thanks for the quick response.

 

Our user has roaming on.  Roaming is on the AT&T network in NY.

 

APN information (or the lack thereof) may explain the failure of DirectTCP or WAP1.  But why is WAP2 failing?

 

Ill try to get a dump of their service records from our user. 

Please use plain text.
Developer
amardeepjaiman
Posts: 293
Registered: ‎02-25-2009
My Device: Not Specified

Re: Network issue impossible to resolve for us - please help

try running network diagnostic tool first. this will let you knw which service is failing on your device.

 

~amardeep

www.impetus.com

Please use plain text.
New Developer
arbiarbi
Posts: 7
Registered: ‎01-19-2009
My Device: Not Specified

Re: Network issue impossible to resolve for us - please help

We know which services are failing.  See log in the first post on this thread.

 

We just dont know why they are failing. 

Please use plain text.
Developer
amardeepjaiman
Posts: 293
Registered: ‎02-25-2009
My Device: Not Specified

Re: Network issue impossible to resolve for us - please help

are you sure. your apn settings are correct ?
Please use plain text.
Developer
RexDoug
Posts: 4,764
Registered: ‎07-21-2008
My Device: Not Specified

Re: Network issue impossible to resolve for us - please help

The network diagnostic tool does not attempt to detect the carrier or insert carrier-specific APN's (Direct) or Gateways (WAP1.1).

 

Those other apps that you mention are using BIS-B - that is why the work when your app fails.

 

In the absence of BIS-B, your application will have to either a) detect the carrier and provide programmatically-generated APN or WAP info, or b) as the user to identify his carrier from a list of carriers for which you have provided APN or WAP info, or c) when all else fails, ask the user for WAP gateway or APN data and construct the parameters accordingly.

 

Please use plain text.
New Developer
arbiarbi
Posts: 7
Registered: ‎01-19-2009
My Device: Not Specified

Re: Network issue impossible to resolve for us - please help

Thanks. Your response makes a lot of sense to me.  Our conclusion was also the BIS-B unavailability and we have already applied for ISV alliance partnership.

 

However,I have two questions:

 

1.  Isnt APN or WAP info needed for DirectTCP or WAP connections only?  Why is my WAP2 connection complaining about "failed tunnel"?

 

2.  How can the carrier be detected from within the application?

 

Ill appreciate further insight.

Please use plain text.
Developer
RexDoug
Posts: 4,764
Registered: ‎07-21-2008
My Device: Not Specified

Re: Network issue impossible to resolve for us - please help

You can retrieve the carrier name like this:

 

        String name = RadioInfo.getCurrentNetworkName()

Also keep in mind that if you are operating in multiple countries, the APN info may change from country to country even on the same carrier. For example, T-Mobile US is different from T-Mobile Germany.

 

Regarding the WAP2, there may be a flaw in your WAP2 service book detection, or the carrier may not support it. Not all carriers support WAP2.

 

 

 

 

Please use plain text.