01-22-2013 04:40 PM
I was informed that the transport needs to be specified in the HttpConnection URL.
For example, if I want to use WiFi I would need to append ";interface=wifi" onto the end of the URL, like this:
Is this true?
If true, does it only pertain to certain versions of the OS?
Currently, I get a "DNS error" when I suffix the URL in this way.
I would like to understand why I get a "DNS error" and how to correct my code so WiFi is used whenever possible.
01-22-2013 07:11 PM
The BB uses a 'connection suffix' to specify the communication path that then request will be directed over. To understand the possible options see this video:
This KB article details the available suffixes:
Now I recommend that instead of worrying about which suffix to use, you can use ConnectionFactory and let it worry about it for you.
There is more on this recent Thread:
Now this doesn't specifically help you. In your case you have chosen WiFi and correctly specified the connection suffix that will direct your request over WiFi.
I have not really studied it, but I have seen DNS issues on device when they have been recently switched to WiFi. My experience is that this will settle down. My impression of this processing is that the WiFi routing actually attempts to resolve the IP Address for itself.
But this is hypothetical. Can you tell us more about the environment for your DNS error. Is it on device or Simulator? What OS Levels are involved in development and on device/Simulator? Does it take 2 minutes to get this error or does it happen quickly. What is the URL you are trying to reach? Is the URL accessible on the device's Browser?
01-22-2013 07:40 PM
Thank you very much for your very informative and helpful post, Peter.
> Can you tell us more about the environment for your DNS error.
> Is it on device or Simulator?
Device -- Torch 9800
> What OS Levels are involved in development
> and on device/Simulator?
> Does it take 2 minutes to get this error
> or does it happen quickly.
It takes a while (perhaps 2 minutes). It seems like a connection timeout.
> What is the URL you are trying to reach?
> Is the URL accessible on the device's Browser?
01-22-2013 08:14 PM
OK, All looks like it should work.
I'm not sure I can really help here, but I would like to do some more investigation.
In Manage connections, turn everything off, then turn WiFi back on. Leave it for a bit until the WiFi indicator is showing. Then try again in Browser and in program.