Search by Tags

WiFi configuration from program

Applicable for

Article updated at 08 Feb 2019
Compare with Revision

Subscribe for this article updates

For information about Wi-Fi connectivity on Toradex modules refer this link. This article shows how to connect to a Wi-Fi network from user application.

Windows CE 7

Windows CE 7 provides Wi-Fi configuration support via Native Wi-Fi automatic configuration component and replaces the previous Windows Zero Configuration (WZC) Wi-Fi stack in Windows Embedded CE 6.0 R3.

This demo uses Native Wi-Fi APIs to configure the wireless network. You can refer Native Wi-Fi APIs from here.


  • Some Native Wi-Fi APIs returns "ERROR_ACCESS_DENIED" if Connection Manager is included in the OS design. So, for this demo Connection Manager should not be included in the WinCE 7 image. Connection manager can be disabled temporarily by using this registry. Import it using Regedit tool and save registry and then reboot.
  • Removing Connection manager from the OS design will also remove ActiveSync and FileSync because of their dependency on Connection manager. You can use application debugging over Ethernet as an alternative.
  • If you are using the default connection manager on the device then you will notice this bug. The bug is when 2 preferred Wi-Fi profiles were created that will trigger a dead loop to connect those two profiles and that will leads to memory depleting then the device will be unusable after some time. We recommend a workaround for you to implement your own simple connection manager in your WEC application. It’s your most predictable option with the least risk. It can be done by using the WinCE WLAN APIs and scan for access points if known access points are found, connect to it using credentials which are stored on the device. The only tricky part would be storing the Wifi credentials in some secure way (encrypt it).

Steps to run demo on WinCE 7

  • Download project source code from here.
  • Build and deploy solution.
  • Run the application from program folder and enter preferred network, password and security type of the network.

Windows CE 5/6

In this demo OpenNETCF library V2.3.12004 is used to configure the wireless network. You can refer this link for more information.

Steps to run demo on WinCE 5/6

  • Download project source code from here.
  • Download and Install .NET Compact Framework directly to the FlashDisk of the device from here.
  • Navigate to Solution Explorer in visual studio > Right Click on Solution > Properties > Devices.
  • Uncheck "Deploy the Latest version of the .NET Compact Framework (including Service Packs)".
  • Build and deploy solution.