J
James Black
In my mobile app I have a valid adapter in
WirelessZeroConfigNetworkInterface, and when I call the function below with a
passphrase I get the error that follows, but, if I don't pass in a passphrase
and use AuthenticationMode.OPEN and WEPStatus.WEPDisabled I don't get any
errors, it appears to work.
m_Interface.AddPreferredNetwork("myssid", true, "somepass", 1,
AuthenticationMode.Shared, WEPStatus.TKIPEnabled, null);
System.ComponentModel.Win32Exception: Unable to Set WZC Interface
at
OpenNETCF.Net.NetworkInformation.WirelessZeroConfigNetworkInterface.AddPreferredNetwork(String
SSID, Boolean infrastructureMode, Byte[] keyMaterial, Int32 keyIndex,
AuthenticationMode authMode, WEPStatus privacyMode, KeyType kt, String
wpaPassphrase, EAPParameters eapParams)
at
OpenNETCF.Net.NetworkInformation.WirelessZeroConfigNetworkInterface.AddPreferredNetwork(String
SSID, Boolean bInfrastructure, String sKey, Int32 keyIndex,
AuthenticationMode authMode, WEPStatus privacyMode, EAPParameters eapParams)
at ICx.Plugins.WiFiPlugin.AddPreferredAccessPoint(String ssid, String sKey)
I am curious what I may be doing wrong. Should I be generating the key from
the passphrase, or should it be done within AddPreferredNetwork?
If I should be doing it, is there is class/function to generate it?
When I go through the device's wireless setup, then the wep and auth
settings above match what I do manually, and that works.
Thank you.
WirelessZeroConfigNetworkInterface, and when I call the function below with a
passphrase I get the error that follows, but, if I don't pass in a passphrase
and use AuthenticationMode.OPEN and WEPStatus.WEPDisabled I don't get any
errors, it appears to work.
m_Interface.AddPreferredNetwork("myssid", true, "somepass", 1,
AuthenticationMode.Shared, WEPStatus.TKIPEnabled, null);
System.ComponentModel.Win32Exception: Unable to Set WZC Interface
at
OpenNETCF.Net.NetworkInformation.WirelessZeroConfigNetworkInterface.AddPreferredNetwork(String
SSID, Boolean infrastructureMode, Byte[] keyMaterial, Int32 keyIndex,
AuthenticationMode authMode, WEPStatus privacyMode, KeyType kt, String
wpaPassphrase, EAPParameters eapParams)
at
OpenNETCF.Net.NetworkInformation.WirelessZeroConfigNetworkInterface.AddPreferredNetwork(String
SSID, Boolean bInfrastructure, String sKey, Int32 keyIndex,
AuthenticationMode authMode, WEPStatus privacyMode, EAPParameters eapParams)
at ICx.Plugins.WiFiPlugin.AddPreferredAccessPoint(String ssid, String sKey)
I am curious what I may be doing wrong. Should I be generating the key from
the passphrase, or should it be done within AddPreferredNetwork?
If I should be doing it, is there is class/function to generate it?
When I go through the device's wireless setup, then the wep and auth
settings above match what I do manually, and that works.
Thank you.