If you are using Internet Explorer, please remove blackberry.com from your compatibility view settings.

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
joven
Posts: 37
Registered: ‎10-06-2008
My Device: Not Specified

Using direct TCP on multiple carriers

I am working on a project targeted at users on multiple carriers with and without access to a BES. I am using the deviceside=true parameter to force HTTP connections to use direct TCP. In testing this on multiple carriers it seems that many do not include the APN settings by default. T-Mobile and Rogers are two examples I have encountered so far. I obviously don't want users to have to tweak TCP settings for my app to work so I read the KB doc on specifying the APN in the connection parameters. This does indeed work, and by using special case logic for each carrier, my app now works on Verizon, T-Mobile and Rogers. The logic I am using to identify the carriers looks like the following:

 

private boolean onTMobile()
{
return RadioInfo.getCurrentNetworkName() != null &&
RadioInfo.getCurrentNetworkName().indexOf("T-Mobile") != -1;
}

 

 

I have two questions: 1) is using special-case logic for each carrier to specify the apn the way other third party apps deal with direct TCP? and 2) is my approach to identifying the carriers robust? I looked into the MNC bu **bleep** seems each carrier can use multiple MNCs.

 

Thanks,

Andy

Please use plain text.
Developer
peter_strange
Posts: 19,601
Registered: ‎07-14-2008
My Device: Not Specified

Re: Using direct TCP on multiple carriers

1) Don't know about other people, but we do this.

2) Because some of our code runs on older devices, we actually search the Service Books for something that identifies the carrier.

 

Be advised, in the UK, we only have a few carriers, so your mileage may vary.....

 

 

Please use plain text.
Developer
Developer
bo
Posts: 167
Registered: ‎11-12-2008
My Device: Not Specified

Re: Using direct TCP on multiple carriers

Just out of curiousity how are you handling WiFi?
Please use plain text.
New Developer
joven
Posts: 37
Registered: ‎10-06-2008
My Device: Not Specified

Re: Using direct TCP on multiple carriers

We don't do anything special for wifi at this point. Empirically, we have shown that the direct tcp connection still works over wifi.
Please use plain text.
Developer
jonberry
Posts: 484
Registered: ‎07-17-2008
My Device: Not Specified

Re: Using direct TCP on multiple carriers


joven wrote:

2) is my approach to identifying the carriers robust?


What happens when you have the same carrier in different countries with a different APN?

 

(eg. T-Mobile US vs T-Mobile UK)

 

-Jon

Please use plain text.
New Developer
renuka_anil
Posts: 30
Registered: ‎11-17-2008
My Device: Not Specified

Re: Using direct TCP on multiple carriers

Hello,

 

Im new to development and wants to develop an application that will run on all carriers.

Im using following url:

http://myServer.com/servlet/SampleServlet?type=0;deviceside=true

My application is not running on T-mobile? Is there anything to add here.

Also what type of settings to be done or what parameters to be added in url to run application on EDGE, 3GP

You have done this. Please help me. Im not able to get anything.

Thanks

Please use plain text.
New Developer
joven
Posts: 37
Registered: ‎10-06-2008
My Device: Not Specified

Re: Using direct TCP on multiple carriers

Hi Renuka,

 

You need to include the apn settings for T-Mobile.

 

http://someurl.com;deviceside=true;apn=wap.voicestream.com

 

If you search for blackberry apn on google you should be able to find similar information for other carriers.

 

Andy

 

Please use plain text.
Developer
robinShazam
Posts: 85
Registered: ‎12-05-2008
My Device: Blackberry 8900 Javelin

Re: Using direct TCP on multiple carriers

[ Edited ]

For your info, T-Mobile UK may use WAP2 settings. Check for service books for cid WPTCP and look for "wap2" (ignoring case) in the service book name. If you find a WPTCP/wap2 entry (and book is valid) (and book is not disabled) use it in your connection string, e.g ;deviceside=true;ConnectionUID=<the-uid-from-the-service-book>

 

I haven't found any other WAP2 providers in the UK - they need APN'age. O2 needed manual APN; Vodafone UK has two possible APNs (annoying!); Orange UK i have had little time to test with but i think i used APN for that; Three UK untested.

 

Message Edited by robinShazam on 01-19-2009 04:56 PM
Please use plain text.
New Developer
renuka_anil
Posts: 30
Registered: ‎11-17-2008
My Device: Not Specified

Re: Using direct TCP on multiple carriers

Hello,
 
I using following url in making httpConnection
http://myServer.com/servlet/Sample?type=0;deviceside=true;apn=apnname

 

for T-mobile apn=wap.voicestream.com and for Orange apn=orange
 
When i connect to my server without writing anything in outstream i am able to do so.(get method)
When i try to send information server(post method) i get Bad DNS Address error.
First i get data from server then I closed inputStream and connection.
After that I tried to send the data to server using connection.post method but got Bad DNS address.
 
I checked the apn is correct. Im trying this on Orange (France), T-monile(US).
Gmail, facebook and other application with same functionality are running successfully, only my application is not running.

The deivce im using is Blackberry bold 9000.

From where I will get the information regarding service book?


Thanks

Please use plain text.
New Developer
renuka_anil
Posts: 30
Registered: ‎11-17-2008
My Device: Not Specified

Re: Using direct TCP on multiple carriers

What about T-mobile US and Orange in France. My application is not working on these network carrier.

I have tried all things. Can you please help me in this?

 

Thanks

Please use plain text.