all groups > dotnet compact framework > april 2008 >
You're in the

dotnet compact framework

group:

using EVDO to connect to a webservice


using EVDO to connect to a webservice David
4/22/2008 11:24:16 AM
dotnet compact framework:
Hi all,
I have a Symbol MC70 with WiFi, and a data access plan through the
cell phone. If I am in IE, call up web page and a WiFi connection is
not available, *somehow* the phone uses an EVDO connection to connect
to the internet.
I would like to do the same type of thing through code, using C# and
VS 2005. If you have a suggestion of where to look to get started
Re: using EVDO to connect to a webservice Paul G. Tobey [eMVP]
4/22/2008 12:09:37 PM
You need to P/Invoke the Connection Manager. You can look up the calls in
the C/C++ API help for your target device type (Windows Mobile <whatever>).
OpenNETCF has the Connection Manager wrapped in Smart Device Framework, so
you might save yourself a pile of time by just using that,
www.opennetcf.com.

Paul T.

[quoted text, click to view]

Re: using EVDO to connect to a webservice David
4/22/2008 1:33:39 PM
Paul,

thanks for the reply. I did indeed look at the wrappers from
OpenNetCF; I used this code fragment to try and get to the connection
I was looking for:

using OpenNETCF.Net;

DestinationInfoCollection dic = new DestinationInfoCollection();
foreach (DestinationInfo di in dic)
{
Console.WriteLine(di.Description);
}

but the collection showed a count of 0.

On the device itself there's a Connection called "NationalAccess",
which has a special number that gets dialed along with some bit rate
information and a user id / password; this is what IE is triggering to
have called.
Re: using EVDO to connect to a webservice David
4/22/2008 1:50:15 PM
Paul,

thanks for the reply. I'm familiar with OpenNETCF and had tried the
following code fragment:

using OpenNETCF.Net;

DestinationInfoCollection dic = new DestinationInfoCollection();
foreach (DestinationInfo di in dic)
{
Console.WriteLine(di.Description);
}

but the collection comes back empty; from the code samples I saw, it
seemed as though the collection should have the Connections
information defined on the device.
On the device when I check in Connections, there's a connection that
is what is getting triggered by IE; it has a special phone number, bit
rate information, user id / password, etc; but that connection isn't
in the collection above. Is there a way to add that connection to the
collection?
Re: using EVDO to connect to a webservice Paul G. Tobey [eMVP]
4/22/2008 2:03:04 PM
You haven't put anything in that collection. Try something more like
ConnectionManager.EnumDestinations(). As I said, I don't do much WM stuff,
but, based on looking at the class declaration, it appears to me that you
should not be building any instances of DestinationInfoCollection yourself
and that, if you do, you just get an empty collection, rather like creating
a new array or list.

Paul T.

[quoted text, click to view]

AddThis Social Bookmark Button