Yes, you might see if there is a method of the connection manager which will
establish a suitable connection and, if there seems not to be one, do that
(I suppose that this might use GPRS, 802.11, etc., whatever seems to it to
be available). Or, you might try forgetting about connection manager and
just attempt to establish a connection to each of the SSID values that you
know about via the WZC wrapper in OpenNETCF. I don't do any Pocket PC
programming, so I don't know which is more likely to be the right answer,
maybe someone else can help, but I think that you're on the right track.
Paul T.
> OK, the problem is the Connection Manager I think, not WZC, but only if
> I don't have a previous connection.
> Thanks.
indiekiduk@gmail.com - 13 Jan 2006 15:07 GMT
Looks to me like you are doing things in the wrong order, surely you
should be doing:
private void First_Time()
{
OpenNETCF.Net.AdapterCollection oCol =
OpenNETCF.Net.Networking.GetAdapters();
foreach (OpenNETCF.Net.Adapter a in oCol)
{
if (a.IsWireless)
{
a.SetWirelessSettings("PDATeam");
a.RebindAdapter();
TakeConnection();
}
}
}
i.e. connect to an SSID and wait to see if you get a connection. When
I'm doing this (In StreetHawk
http://www.aspecto-software.com/Streethawk/ ) I dont use the connection
manager at all. I set the SSID and then keep checking my IP address to
see if I have been given one by DHCP, if not I give up and move onto
the next SSID.