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
Developer
Posts: 25
Registered: ‎03-24-2009
My Device: Not Specified
Accepted Solution

Simulator Connectivity

Hi,

 

I have been trying to develop an app which creates a HttpConnection on demand by the user.

I have been ubnable toopen this connection and recieve the following in the debug window:

 

"Refreshing connection on send
Running refresh
Local port: 19780
APN: 'rim.net.gprs'
APN username: 'null'
APN password: 'null'
Connection does not exist
Detected information for 1 GPAK connection(s)"

 

On checking the simulator's browser this does not appear to be working either.

 

1). How do i set up the network connection for the simulator?

     I have looked in Options -> Mobile Network but am unsure what needs to be set.

 

2). Do i have to programatically set these netwotk connection settings in my app?

     i.e. will these settings (possibly different for multiple users) need to be set uniquely for each user or is there a default setting that can apply to everyone. In other words, use my phone's default network connection settings. No need to be set distinctly for each devices personal connection settings.

 

I am pretty new to bb jde and would appreciate any advice.

 

Best Regards,

Bob.

Developer
Posts: 25
Registered: ‎03-24-2009
My Device: Not Specified

Re: Simulator Connectivity

Also whats weird is that BB maps works fine.

So the simulator looks like it has connection of sorts.

 

Any idea how bb maps works but simulator browser does not?

Developer
Posts: 19,629
Registered: ‎07-14-2008
My Device: Not Specified

Re: Simulator Connectivity

Have a look at this Thread, asked a similar question.

 

Server Simulator

http://supportforums.blackberry.com/rim/board/message?board.id=java_dev&message.id=28683

 

Your Browser uses BES/MDS, so you need to start the MDS Simulator to get the Browser going.

 

From your application, you can use Direct TCP, to get connectivity in the Simulator, or BES/MDS if you have the MDS Simulator going.  Remember though, that you might not have these services on a real device.

 

It would appear the BlackBerry maps is using Direct TCP, which is why it is working.

 

Hope that answers the questions.

Developer
Posts: 25
Registered: ‎03-24-2009
My Device: Not Specified

Re: Simulator Connectivity

Hi,

 

Thanks a lot for the reply.

It has answered a few questions for me.

But It also poses a few more. I would appreciate your input greatly.

 

I've got the simulator connectivity up and running with the help of MDS simulator.

 

I've chosen not to consider the Direct TCP method as upon investigation this connection may require carrier specific settings. i.e. APN, username, password. This is precisely what im trying to avoid. I require a seemless, one size fits all solution.

 

Regarding your comment based on MDS:

"Remember though, that you might not have these services on a real device."

 

1). How likely is this?

     Does this service come as standard from a certain OS onward? i.e. 4.2...

     Does this service come as standard from a certain Handset onward?

     Is this a downloadable updatable service for all handsets or a certain set onward?

 

I have spent a bit of time looking for these answers with no success.

the following article is also interesting but does not answer my questions.

 

http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800451/800563/What_Is...

 

However it does mention another option "Blackberry Internet Service"

Do you know anything about this?

Is this service a standard on all devices?

Is it difficult to become part of the Alliance program?

 

Appreciate the help,

 

Best regards,

Bob.

Developer
Posts: 19,629
Registered: ‎07-14-2008
My Device: Not Specified

Re: Simulator Connectivity

This question gets asked often, look round for Threads with connection in the subject!

 

I presume you have reviewed the network transports video:

http://www.blackberry.com/DevMediaLibrary/view.do?name=NetworkingTransports

 

I recommend this post too:

http://supportforums.blackberry.com/rim/board/message?board.id=java_dev&message.id=15610&query.id=32...

 

Have a look at these and then come back with any questions.  OK?

Developer
Posts: 25
Registered: ‎03-24-2009
My Device: Not Specified

Re: Simulator Connectivity

Hi,

 

Thanks for the reply and apologies for the duplicate thread.

Yes i have rewieved the network transports video

http://www.blackberry.com/DevMediaLibrary/view.do?name=NetworkingTransports

 

And have the read the post you reccomended:

http://supportforums.blackberry.com/rim/board/message?board.id=java_dev&message.id=15610&query.id=32...

 

My goal is:

Create a seemless connection regardless of the carrier that does not require the user to configure any settings. And where the url suffix is static for all devices.

 

Is this Possible?

 

As i understand it so:

MDS simulator allows the device simulator to make network connections.

However you cannot assume that real devices will be on the same MDS environment.

 

"Generally large companies may be on MDS but not average consumers"

 

TCP, WAP both require carrier specific settings 

 

The only service im not sure about is BIS.

I understand i need to sign up to the alliance first.

But if i do so will this enable me to achieve the solution i require stated above?

Is this service available on all phones regardless of MDS environment or otherwise?

 

Or is it simply not possible to do achieve my goal and i need to cater for multiple network configuration possibilities?

 

Thanks again.

 

 Bob.

Developer
Posts: 19,629
Registered: ‎07-14-2008
My Device: Not Specified

Re: Simulator Connectivity

You asked:

 

"My goal is:

Create a seemless connection regardless of the carrier that does not require the user to configure any settings. And where the url suffix is static for all devices.

 

Is this Possible?"

 

No.

 

There are two distinct environments, BES and BIS. 

1)  BES is the corporate users, BES user devices are controlled by the corporate staff.  Typically these devices are forced to use the BES/MDS route to the world (i.e. ";deviceside=false") so that internet access can be controlled by the corporate.  Sometimes they are not, in which case application can have access to the outside world in the same way as BIS devices (see next)

2) BIS is the internet service, for BIS devices the connection possibilities are restricted by the data plan they have bought and what the carrier supports, however they will not support BES/MDS (";deviceside=false").  Most carriers support BIS-B (the one you have to sign up for), WAP 1 and 2.0, but WAP can cause problems.  I'm not sure of the support for direct TCP, though it seems OK.

 

So as a minimum, you should support BES/MDS for corporate users and another method for non Corporate users.  BIS-B requires no configuration, but you need to be an alliance member.  WAP 2.0 does not require any configuration, but I have had problems with transcoders on this service.  Direct TCP and WAP 1 require configuration, to my mind this is not excessive. 

 

Basically to ensue that you can get a user going to have to support everything.

 

Not pretty.

Developer
Posts: 25
Registered: ‎03-24-2009
My Device: Not Specified

Re: Simulator Connectivity

Great Explanation, Thanks.

 

So basically if i want to support everyone i need to cater for all these eventualities.

Can i detect users environment on the fly and if so how? and in what order of precedence should i build connections?

 

e.g.

 

if ( MDS )

  do mds connection, deviceside=false

else if ( BIS-B ) // is this always true if not MDS?

  do bis-b connection

else if ( WAP 2.0 )

 do wap 2.0 connection

else if ( WAP 1 )

  do wap 1 connection

else ( TCP DIRECT )

  do tcp direct connection

 

Or would the first 2 steps be enough to cover the vast majority of users?

 

Thanks,

 

Bob.

 

 

Developer
Posts: 19,629
Registered: ‎07-14-2008
My Device: Not Specified

Re: Simulator Connectivity

You need to detect the user environment.

 

The best way for you to work on this is to review the following:

 

What Is - Network Diagnostic Tool
Article Number: DB-00684

http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800451/800563/What_Is...

 

Note the use of CoverageInfo, and note that its support varies depending on the level of OS you have on the device.

 

I must admit that I try to support devices pre CoverageInfo, so directly extract similar information from the ServiceBooks (which I believe s where CoverageInfo gets it from anyway).

 

The first two steps will cover better than 90% of users in the UK (which is where I am based) and I believe, from seeing posts by other people, that it will have a very high coverage in North America and Western Europe too.

 

OK got to throw a curve ball so you realize that it is not all plain sailing.  You might find, for your BES users, that they have some sort of authentication and/or a proxy server that means you can't connect to your server using BES/MDS.  In that situation, you might want to be able to hard code these devices to use BIS-B ( or one of the other connection methods) in its place.

Developer
Posts: 25
Registered: ‎03-24-2009
My Device: Not Specified

Re: Simulator Connectivity

Great stuff,

 

I've just read your latest thread on this issue.

http://supportforums.blackberry.com/rim/board/message?board.id=java_dev&thread.id=29103&view=by_date...

 

Superb post. It answers all my questions.

 

Thanks for your help!