Changing WiFi Security in RunTime

  1. Can someone check if the syntax is correct in order to change the security setting during runtime

OPEN Authen WEP Encryp (key index 0):
ifconfig (IF_WIFI0, IFS_WIFI_AUTHENTICATION, IFPARAM_WIFI_AUTH_OPEN, IFS_END);
ifconfig (IF_WIFI0, IFS_WIFI_ENCRYPTION, IFPARAM_WIFI_ENCR_WEP, IFS_WIFI_WEP_KEYNUM , 0, IFS_WIFI_WEP_KEY_HEXSTR, “1122311223”, IFS_END);

WPA-PSK Authen TKIP Encryp:
ifconfig (IF_WIFI0, IFS_WIFI_AUTHENTICATION, IFPARAM_WIFI_AUTH_WPA_PSK, IFS_END);
ifconfig (IF_WIFI0, IFS_WIFI_ENCRYPTION, IFPARAM_WIFI_ENCR_TKIP, IFS_WIFI_WPA_PSK_PASSPHRASE, “password”, IFS_END);

  1. What is the meaning of IFPARAM_WIFI_ENCR_ANY and IFPARAM_WIFI_AUTH_ANY

  2. Can the hexkey and password be in “”, can they be a variable of type character array, i.e. char[20]

Thanks!