views:

2976

answers:

5

Hi,

I need to configure Wifi Settings for a Win Mobile application using C# (compact framework).

So the deal is: - Configure the network (SSID for an hiden AP) - WPA authentication with TKIP - Force user and password (the end-user won't be prompted for authentication)

Any suggestions, code sample, third party application proposition, ... welcome.

Regards

+3  A: 

Take a look at the Smart Device Framework. It has a NetworkInformation namespace that wrap a large amount of the WZC functionality. I know it will do WEP and WPA with TKIP (as well as open). It allows you to pass in the key material, set up most options, etc.

Look specifically at the WirelessZeroConfigNetworkInterface class and it's AddPreferredNetwork method.

Edit: If you're curious what APIs you'd use directly, you'd start here.

ctacke
A: 

I'm not sure whether it's possible to programatically change those settings.

The Configuration Service Providers is what you usually use to provision devices with settings like these (also it's used for GPRS settings for example).

What you do is that you create a special CAB-file containing a special _setup.xml which Windows Mobile will use to change the settings.

Read about it here on MSDN (and here for the specific Wifi configuration).

Also note that depending on the device, your cab-file will need to be signed by the device manufacturer (good luck with that...)

pilif
It certainly is possible to change those settings. It's done using the WZC APIs.
ctacke
A: 

Alternatively, you could probably utilize the Connection Manager API.

Simon Jensen
A: 

Thanks for your help, but configuring Wifi SSID (and settings) is quite easy. My problem is to supply default user/password !

Regards,

A: 

Hi,

I need to do the same thing as what you did.

I need setup wifi connection in WindowsCE environment without user interaction..

Plz Give me some suggestions Or Sample Code.

Thanks in advance

nRk

nRk
Did you actually read any of the answers already given?
ctacke