C# – Configure Wifi Settings using C#

cwifiwindows-mobile

How 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)

Best Answer

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.