How can I connect to a wifi network with wlantool.exe in Compact 7?

Can someone give me an example on how to connect to a wifi network with wlantool.exe on Compact 7?

From a command promt in Compact 7 I try to execute something like this:

wlantool -c -i CCWMXWIFI1 -ssid CiscoNet -auth wpa2psk -encr aes -key mypassword

I get this error:
[WLANTOOL] WlanReasonCodeToString() FAILED error: 1814

By using the GUI in Compact 7 I can connect and it works with these settings:
Network name (SSID): CiscoNet
Encryption: AES
Authentication: WPA2-PSK
Network key: mypassword

What am I doing wrong in my command promt above? And how do I find out what error 1814 is?

I want to call the command line tool wlantool.exe from a C# program to let the user handle wifi-connections from within my app.

Board: Digi CCWi-i.MX53

Try omitting the interface:
wlantool -c -ssid CiscoNet -auth PA2PSK -encr AES -key mypassword

Hello, Follow the proper commands as mentioned below.

To connect to a specific AP, use the –c option. For example, to connect to an AP with SSID myAPname with WPA-PSK authentication with TKIP encryption and password fY5jHot6, execute:

> wlantool -c -ssid myAPname -auth WPAPSK -encr TKIP -key fY5jHot6

If connecting to an AP with SSID myAPname open authentication and no encryption, the command is:

> wlantool -c -ssid myAPname -auth open -encr none