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
marcn
Posts: 53
Registered: ‎01-08-2009
My Device: Not Specified

Is it possible to disable "automatic" Wi-Fi routing?

In various posts and documentation, it is mentioned that a Wi-Fi-capable device will (in some cases) automatically use the Wi-Fi connection for BES, BIS, and even DirectTCP connections - i.e. without specifying ";interface=wifi" on the URL.  Does anyone know if there is a way to disable this behavior?

 

Specifically, I'm working with code to detect if DirectTCP is working properly on the device and/or if an APN is required.  We do this by requesting a "test" URL over DirectTCP both without an APN and (if that doesn't work) with an APN appropriate for the current network name.

 

My concern is that if the "automatic Wi-Fi routing" is kicking in and the HTTP connection is routed over Wi-Fi, we'll get a false positive for the "test" URL and store the incorrect APN value (i.e. "no APN required") in persistence, causing the app to break later on when the user is not on Wi-Fi.

 

So my question again - is it possible to disable this "automatic" routing of HTTP requests over Wi-Fi, at least temporarily?

 

Thanks!

Marc

Please use plain text.
Developer
cagdasgerede
Posts: 241
Registered: ‎11-20-2008
My Device: Not Specified

Re: Is it possible to disable "automatic" Wi-Fi routing?

I have not observed such "automatic" behavior. More

specifically, when I specify DirectTCP, my app does

communicate over the carrier, not WiFi.

 

I think "automatic" behavior is more for BES communication

(I think also known as least cost routing).

 

I would be curious to hear if someone observed the otherwise.

Please use plain text.
Developer
simon_hain
Posts: 15,846
Registered: ‎07-29-2008
My Device: Z10 LE
My Carrier: O2 Germany

Re: Is it possible to disable "automatic" Wi-Fi routing?

this video should make things clear:

http://www.blackberry.com/DevMediaLibrary/view.do?name=NetworkingTransports
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Please use plain text.
Developer
marcn
Posts: 53
Registered: ‎01-08-2009
My Device: Not Specified

Re: Is it possible to disable "automatic" Wi-Fi routing?

Thanks for the link Simon, I had seen it before but probably should have reviewed it (I even attended this same presentation that Mike Kirkup gave at WES 2009!).  Around 4:20 into the video, he says "The only time you have to explicitly determine that you want to make your connection over Wi-Fi is if your connection is using Direct TCP or WAP."

 

So -- it sounds from the video like Wi-Fi may be automatically used by the device for BIS or BES transports, but not for Direct TCP.

Please use plain text.
Developer
Posts: 1,474
Registered: ‎04-14-2009
My Device: Not Specified

Re: Is it possible to disable "automatic" Wi-Fi routing?

Try interface=cellular, although WiFi won't be used for Direct TCP connections anyway, unless you specify interface=wifi (and unless your OS is susceptible to the WAP TCP-instead-of-Direct TCP bug).
Please use plain text.