Search by Tags

Setting up Wi-Fi Connectivity in Windows CE with Toradex Computer on Modules (COMs)

 
Applicable for

Article updated at 24 Oct 2019
Compare with Revision



Subscribe for this article updates

Introduction

This article shows how to connect to a Wi-Fi network from the user application using Windows CE.

Other Wi-Fi related articles

If this is not the information you are looking for, please, expand the menu below for more WiFi related information.

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.

NOTE:

  • Some Native Wi-Fi APIs return "ERROR_ACCESS_DENIED" if the Connection Manager is included in the OS design. So, for this demo Connection Manager should not be included in the WinCE 7 image. The 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 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 that 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 the solution.
  • Run the application from the program folder and enter the 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 the 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.