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
Posts: 3
Registered: ‎10-20-2009
My Device: Not Specified

Can i force to connect a j2me app to use wi-fi instead 3g, throught blackberry enterprise edition?

hi.

i know a bite about BES(blackberry enterprise edition) and one of it is than i can force the blackberrys to only use internal comunication,

my problem is, i´m developing a j2me application for blackberry and it uses internet, i want to force the application to connect throught wi-fi instead 3g, but throught the blackberry enterprise edition, and i need to know if that is posible to configure in BES.

 

thanks a lot! 

Developer
Posts: 1,474
Registered: ‎04-14-2009
My Device: Not Specified

Re: Can i force to connect a j2me app to use wi-fi instead 3g, throught blackberry enterprise editio

[ Edited ]

I don't think you need to configure anything extra on the BES/MDS. The BlackBerry will automatically switch to WiFi (or USB/Bluetooth when connected to a PC running the BlackBerry Device Manager) for communicating with the BES/MDS. I think the BlackBerry creates a VPN tunnel via WiFi to the RIM network infrastructure to which your BES/MDS is connected. So, from the perspective of your BES/MDS nothing will change at all. In fact, an active socket/HTTP/HTTPS connection can be transparently switched between cellular, WiFi, USB, and Bluetooth interfaces without your application or the BES noticing that the underlying transport has changed.

 

I don't know whether you can force WiFi for socket, HTTP, and HTTPS connections MDS, but you could try appending ";interface=wifi" to the Connector.open URL parameter to see whether it does the trick.

New Developer
Posts: 3
Registered: ‎10-20-2009
My Device: Not Specified

Re: Can I force to connect a j2me app to use wi-fi instead 3g, through blackberry enterprise edition

[ Edited ]

Thanks for answer klyubin =)

 

OK, so, to connect to a BES and use their services is necessary have been connected to Blackberry Desktop Manager?

the services of BES are not wireless, so?

 

I told to my boss, the solution of appending "interface=wifi" in the application but he wants it be possible through BES, I mind

configure in BES somehow, than the blackberry than use the application uses the wireless internet through wi-fi, instead 3g, for reduce costs.

Could it be possible?

 

If not what sort of restrictions can you define to blackberry users?

 

Highlighted
Developer
Posts: 1,474
Registered: ‎04-14-2009
My Device: Not Specified

Re: Can I force to connect a j2me app to use wi-fi instead 3g, through blackberry enterprise edition

[ Edited ]

No, Desktop Manager is not necessary. Normally, a BlackBerry communicates with BES/MDS via the cellular interface (GRPS, EDGE, cdmaOne, 3G and so forth).

 

I'm not sure I fully understand your question. If the question is about "least cost routing", then read below. If the question is about prohibiting BlackBerrys from connecting to the BES/MDS via 3G and only allowing them to connect via WiFi (to reduce the costs to the company from your BlackBerry users), then you may wan to read up on BES IT Policy -- it might be possible, but I highly doubt it. If you only want to modify your software to allow it connect to BES/MDS only for free, then you can modify your code to check whether least-cost routing and/or serial bypass (i.e., routing via USB/Bluetooth) is enabled or not and only let your code perform network I/O if it is. This won't work for J2ME MIDlets though -- you'll have to have a proper BlackBerry application.

 

 

... About least-cost routing...

 

For BES/MDS communications BlackBerry uses so-falled "least cost routing". This means it will select a route that has the least cost. In practice, this means that the BlackBerry will re-route it's communications with the BES/MDS from the cellular interface to WiFi, USB, or Bluetooth when possible.

 

As far as I know, the WiFi route becomes available once the BlackBerry connects to a WiFi network and establishes a (VPN?) tunnel to RIM's network infrastructure via that network. This is indicated by the WiFi logo turning from gray to white in the top right corner on the BlackBerry home screen.

 

The USB and Bluetooth routes become available once the BlackBerry connects (via USB or Bluetooth) to a PC that runs BlackBerry Device Manager (not Desktop Manager!) and once that Device Manager manager establishes a (VPN?) tunnel to RIM's network infrastructure from the PC via whatever network interface the PC is using. Once the USB/Bluetooth route is operational, you can switch off the WiFi and cellular radios on the device and see that you can still connect to the BES/MDS just fine with amazing speed and latency.

 

P.S. The BlackBerry Device Manager doesn't usually auto-start by default. So, you may need to manually start it from Start -> Programs -> BlackBerry -> BlackBerry Device Manager.