using EVDO to connect to a webservice

D

David

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
with this, I would appreciate it.
 
P

Paul G. Tobey [eMVP]

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.
 
D

David

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.
Any tips, pointers would be appreciated.
 
D

David

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?
Any tips, hints, etc would be appreciated.
 
P

Paul G. Tobey [eMVP]

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top