network_connect_event

P

Peter Huish

I am using the OpenNETCF DeviceManagement NetworkConnected event
(rightly or wrongly) to determine when after a power on the network is
in a state where I can connect to and exchange data over a socket. In
WM2005 it seems that when a device is powered on this event occurs 4
times after which point the network indicator on the PPC indicates that
there is a connection to the wireless network.

Currently I am using a simple count of this event to determine when I
can enable users to transmit their data and I am a bit concerned that
this is not a failsafe means to assume network connectivity exists.

Is there a more robust means of determining that the netowrk us
connected?

If I click on the network notification bar it will tell me the network
that it is connected to and the signal strength. How can I access that
programatically?


thanks


pete
 
P

Paul G. Tobey [eMVP]

You should not assume that getting a connect event indicates that the
network *is* connected. When you get that event, you need to use other
means to check and make sure that the network is connected and, if you can
convince yourself, indicate that to the rest of the code. The events are
only useful to avoid polling all the time for the network to come up. You
can't count on them to indicate status and make sense (if you quickly pass
into and out of a covered area with a WiFi card, you might get two
disconnect events and a connect event or you might get a disconnect event
after the connect event, even if you end up in a connected state. The
system just isn't that careful about making sure that drivers indicate
things in a logical manner.

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